1'use strict'; 2const Top = (() => { 3 const {$window, $document, $html, $body, vh, vw, mq, userAgent, delay, throttle, rafThrottle, getParameterByName, createEmitter} = util_; 4 const symbol = { 5 index: 0, 6 create() { 7 symbol.index++; 8 return Date.now().toString() + ''.concat(symbol.index) + Math.floor(Math.random() * 10).toString(); 9 }, 10 }; 11 12 const Bnr = (() => { 13 const $el = $('.js-top-bnr'); 14 let app; 15 let json; 16 const slide = () => { 17 const emitter = createEmitter(); 18 let app; 19 const $area = $('.js-bnr_slide'); 20 const $item = $('.js-bnr_slide_item'); 21 const set = () => { 22 app = new Swiper('.js-bnr_slide', { 23 init: true, 24 speed: 1200, 25 direction: 'horizontal', 26 slidesPerView: 1.6, 27 spaceBetween: '3%', 28 centeredSlides: true, 29 loop: $item.length > 1, 30 loopAdditionalSlides: 5, 31 runCallbacksOnInit: false, 32 followFinger: false, 33 preventInteractionOnTransition: true, 34 preloadImages: false, 35 slideActiveClass: 'is-slide-current', 36 slideDuplicateActiveClass: 'is-slide-current', 37 slideNextClass: 'is-slide-next', 38 slideDuplicateNextClass: 'is-slide-next', 39 slidePrevClass: 'is-slide-prev', 40 slideDuplicatePrevClass: 'is-slide-prev', 41 containerModifierClass: 'is-slide', 42 wrapperClass: 'js-bnr_slide_list', 43 slideClass: 'js-bnr_slide_item', 44 navigation: { 45 nextEl: '.js-bnr_slide_next', 46 prevEl: '.js-bnr_slide_prev', 47 disabledClass: 'is-slide-disable', 48 }, 49 breakpoints: { 50 961: { 51 slidesPerView: 3, 52 spaceBetween: '1.5%', 53 }, 54 }, 55 autoplay: { 56 delay: 10000, 57 disableOnInteraction: false, 58 }, 59 on: { 60 async init() { 61 base_.Lazy.update(); 62 }, 63 }, 64 }); 65 }; 66 const init = () => { 67 if ($area.length) { 68 set(); 69 } 70 }; 71 const change = (index) => { 72 var _app2; 73 (_app2 = app) === null || _app2 === void 0 || _app2.slideToLoop(index); 74 }; 75 const next = () => { 76 var _app3; 77 (_app3 = app) === null || _app3 === void 0 || _app3.slideNext(); 78 }; 79 const destroy = () => { 80 var _app4; 81 (_app4 = app) === null || _app4 === void 0 || _app4.destroy(); 82 }; 83 init(); 84 return { 85 init, 86 change, 87 next, 88 destroy, 89 on: emitter.on, 90 once: emitter.once, 91 }; 92 }; 93 const setup = function () { 94 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 95 const callback = symbol.create(); 96 const _option = { 97 target: '[data-base="bnr"]', 98 targetTemplate: '[data-template="bnr"]', 99 postsPerPage: 100, 100 itemsPerPage: 100, 101 }; 102 const OPTION = Object.assign(_option, option); 103 return new Promise((resolve) => { 104 if (!$(OPTION.target).length) resolve(); 105 const timeout = setTimeout(() => { 106 resolve(); 107 }, 5000); 108 const _app = new DATA_BASE_JSON({ 109 ...OPTION, 110 dataJsonList: ['https://www.sonymusic.co.jp/json/v2/artist/'.concat(artistCode, '/hottopic/start/0/count/{{itemsPerPage}}/callback/callback_').concat(callback, '?callback=callback_').concat(callback)], 111 functions: { 112 img2() { 113 return 'https://www.sonymusic.co.jp'.concat(this.image_url); 114 }, 115 }, 116 on: { 117 loaded: (state) => { 118 clearTimeout(timeout); 119 json = state.list; 120 resolve(_app); 121 }, 122 ended: () => {}, 123 }, 124 }); 125 }); 126 }; 127 const init = async function () { 128 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 129 app = await setup(option).then(async () => { 130 if (json) { 131 const bnrSlide = slide(); 132 } 133 }); 134 }; 135 return { 136 init, 137 }; 138 })(); 139 140 const News = (() => { 141 let app; 142 let json; 143 const setup = function () { 144 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 145 const callback = symbol.create(); 146 const _option = { 147 target: '[data-base="news"]', 148 targetTemplate: '[data-template="news"]', 149 postsPerPage: 3, 150 itemsPerPage: 3, 151 }; 152 const OPTION = Object.assign(_option, option); 153 return new Promise((resolve) => { 154 if (!$(OPTION.target).length) resolve(); 155 const timeout = setTimeout(() => { 156 resolve({}); 157 }, 5000); 158 const _app = new DATA_BASE_JSON({ 159 ...OPTION, 160 dataJsonListAll: ['https://www.sonymusic.co.jp/json/v2/artist/'.concat(artistCode, '/information/list/start/{{count}}/count/{{itemsPerPage}}/callback/callback_').concat(callback, '?callback=callback_').concat(callback)], 161 functions: { 162 date2() { 163 return this.date.replace(/\./g, '/'); 164 }, 165 y() { 166 return this.date.split(/\./)[0]; 167 }, 168 m() { 169 return this.date.split(/\./)[1]; 170 }, 171 d() { 172 return this.date.split(/\./)[2]; 173 }, 174 category2() { 175 switch (this.category) { 176 case 'INFO': 177 return 'INFO'; 178 case 'LIVE': 179 return 'LIVE/EVENT'; 180 case 'MEDIA': 181 return 'MEDIA'; 182 case 'VIDEO': 183 return 'VIDEO'; 184 case 'RELEASE': 185 return 'RELEASE'; 186 default: 187 return this.category; 188 } 189 }, 190 article2() { 191 return this.article.replace(/src\="\//g, 'src="//www.sonymusic.co.jp/'); 192 }, 193 }, 194 on: { 195 loaded: (state) => { 196 clearTimeout(timeout); 197 json = state.list; 198 resolve(_app); 199 }, 200 ended: () => {}, 201 }, 202 }); 203 }); 204 }; 205 const init = async function () { 206 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 207 app = await setup(option); 208 }; 209 return { 210 init, 211 }; 212 })(); 213 214 const Live = (() => { 215 let app; 216 let json; 217 const setup = function () { 218 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 219 const callback = symbol.create(); 220 const _option = { 221 target: '[data-base="live"]', 222 targetTemplate: '[data-template="live"]', 223 postsPerPage: 3, 224 itemsPerPage: 3, 225 }; 226 const OPTION = Object.assign(_option, option); 227 return new Promise((resolve) => { 228 if (!$(OPTION.target).length) resolve(); 229 const timeout = setTimeout(() => { 230 resolve({}); 231 }, 5000); 232 const _app = new DATA_BASE_JSON({ 233 ...OPTION, 234 dataJsonListAll: ['https://www.sonymusic.co.jp/json/v2/artist/'.concat(artistCode, '/live/start/{{count}}/count/{{itemsPerPage}}/callback/callback_').concat(callback, '?callback=callback_').concat(callback)], 235 functions: { 236 liveItemflg() { 237 return !!this.liveItem.length; 238 }, 239 tourImage_flg() { 240 return !!this.tourImage; 241 }, 242 tourInfo2() { 243 return this.tourInfo.replace(/src\="\//g, 'src="//www.sonymusic.co.jp/'); 244 }, 245 tourImage2() { 246 return '//www.sonymusic.co.jp/' + this.tourImage; 247 }, 248 startYear() { 249 return this.liveItem[0].date.slice(0, 4); 250 }, 251 startMonth() { 252 return this.liveItem[0].date.slice(5, 7); 253 }, 254 startDay() { 255 return this.liveItem[0].date.slice(8, 10); 256 }, 257 endDate_flg() { 258 return this.liveItem.length > 1; 259 }, 260 endYear() { 261 return this.liveItem[this.liveItem.length - 1].date.slice(0, 4); 262 }, 263 endMonth() { 264 return this.liveItem[this.liveItem.length - 1].date.slice(5, 7); 265 }, 266 endDay() { 267 return this.liveItem[this.liveItem.length - 1].date.slice(8, 10); 268 }, 269 liveDate() { 270 if (this.liveItem.length > 0) { 271 if (this.liveItem.length > 1) { 272 const firstD = ''.concat(this.liveItem[0].date, '(').concat(tWeek(this.liveItem[0].youbi), ')'); 273 const lastD = ''.concat(this.liveItem[this.liveItem.length - 1].date, '(').concat(tWeek(this.liveItem[this.liveItem.length - 1].youbi), ')'); 274 if (firstD !== lastD) { 275 return ''.concat(firstD, ' - ').concat(lastD); 276 } else { 277 return firstD; 278 } 279 } else { 280 return ''.concat(this.liveItem[0].date, '(').concat(tWeek(this.liveItem[0].youbi), ')'); 281 } 282 } else { 283 return 'ã'; 284 } 285 }, 286 }, 287 on: { 288 loaded: (state) => { 289 clearTimeout(timeout); 290 json = state.list; 291 resolve(_app); 292 }, 293 ended: () => {}, 294 }, 295 }); 296 }); 297 }; 298 const init = async function () { 299 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 300 app = await setup(option); 301 }; 302 return { 303 init, 304 }; 305 })(); 306 307 const Disco = (() => { 308 let app; 309 let json; 310 const setup = function () { 311 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 312 const callback = symbol.create(); 313 const _option = { 314 target: '[data-base="disco"]', 315 targetTemplate: '[data-template="disco"]', 316 postsPerPage: 1, 317 itemsPerPage: 1, 318 }; 319 const OPTION = Object.assign(_option, option); 320 return new Promise((resolve) => { 321 if (!$(OPTION.target).length) resolve(); 322 const timeout = setTimeout(() => { 323 resolve(); 324 }, 5000); 325 const _app = new DATA_BASE_JSON({ 326 ...OPTION, 327 sort: true, 328 sortKey: 'display_release_date', 329 dataJsonList: ['https://www.sonymusic.co.jp/json/v2/artist/'.concat(artistCode, '/discography/{{#category}}category/{{category}}/{{/category}}start/{{count}}/count/{{itemsPerPage}}/callback/callback_').concat(callback, '?callback=callback_').concat(callback)], 330 dataJsonAddList: ['./disco/data/data.js'], 331 332 functions: { 333 category() { 334 switch (this.type) { 335 case 'ã·ã³ã°ã«': 336 return 'Single'; 337 case 'ã¢ã«ãã ': 338 return 'Album'; 339 case 'ããã¢ã«ãã ': 340 return 'Mini Album'; 341 case 'é ä¿¡éå®': 342 return 'Streaming'; 343 case 'DVD': 344 return 'DVD'; 345 case 'BD': 346 return 'Blu-ray'; 347 default: 348 return this.type; 349 } 350 }, 351 date2() { 352 return this; 353 }, 354 }, 355 on: { 356 loaded: (state) => { 357 clearTimeout(timeout); 358 json = state.list; 359 resolve(_app); 360 }, 361 ended: () => {}, 362 }, 363 }); 364 }); 365 }; 366 const init = async function () { 367 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 368 app = await setup(option); 369 }; 370 return { 371 init, 372 }; 373 })(); 374 375 const Movie = (() => { 376 const $el = $('.js-top-movie'); 377 let app; 378 let json; 379 const player = async function () { 380 let list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; 381 const emitter = createEmitter(); 382 let player = null; 383 const set = async () => { 384 const api = () => { 385 const getApi = (resolve) => { 386 var _YT; 387 if (typeof YT !== 'undefined' && (_YT = YT) !== null && _YT !== void 0 && _YT.Player) { 388 return resolve(); 389 } else { 390 window.onYouTubeIframeAPIReady = () => { 391 return resolve(); 392 }; 393 } 394 }; 395 return new Promise((resolve) => { 396 getApi(resolve); 397 }); 398 }; 399 await api(); 400 player = new YT.Player('top_movie', { 401 videoId: movieList[0], 402 host: 'https://www.youtube-nocookie.com', 403 playerVars: { 404 rel: 0, 405 loop: 1, 406 cc_load_policy: 0, 407 controls: 0, 408 showinfo: 0, 409 disablekb: 1, 410 playsinline: 1, 411 suggestedQuality: 'hd1080', 412 modestbranding: 1, 413 html5: 1, 414 }, 415 }); 416 player.addEventListener('onReady', onReady); 417 player.addEventListener('onStateChange', stateChange); 418 }; 419 const change = (index) => { 420 var _player, _player$loadVideoById; 421 if (!player) return; 422 (_player = player) === null || _player === void 0 || (_player$loadVideoById = _player.loadVideoById) === null || _player$loadVideoById === void 0 || _player$loadVideoById.call(_player, movieList[index]); 423 }; 424 const play = () => { 425 var _player2, _player2$playVideo; 426 if (!player) return; 427 (_player2 = player) === null || _player2 === void 0 || (_player2$playVideo = _player2.playVideo) === null || _player2$playVideo === void 0 || _player2$playVideo.call(_player2); 428 }; 429 const pause = () => { 430 var _player3, _player3$pauseVideo; 431 if (!player) return; 432 (_player3 = player) === null || _player3 === void 0 || (_player3$pauseVideo = _player3.pauseVideo) === null || _player3$pauseVideo === void 0 || _player3$pauseVideo.call(_player3); 433 }; 434 const onReady = () => { 435 if (!player) return; 436 player.mute(); 437 player.playVideo(); 438 emitter.emit('onReady'); 439 }; 440 const stateChange = (_ref) => { 441 let {data: state} = _ref; 442 emitter.emit('onStateChange', state); 443 }; 444 if (typeof list === 'undefined') return; 445 const movieList = list.map((d) => (d === null || d === void 0 ? void 0 : d.video_id)); 446 447 const getDuration = () => { 448 var _player4, _player4$getDuration; 449 if (!player) return false;
450 return (_player4 = player) === null || _player4 === void 0 || (_player4$getDuration = _player4.getDuration) === null || _player4$getDuration === void 0 ? void 0 : _player4$getDuration.call(_player4); 451 }; 452 453 await set(); 454 return { 455 play, 456 pause, 457 change, 458 get time() { 459 return getDuration(); 460 }, 461 on: emitter.on, 462 once: emitter.once, 463 }; 464 }; 465 const cover = () => { 466 const $el = $('.js-movie_cover'); 467 const $img = $('.js-movie_cover_img'); 468 const change = (index) => { 469 $img.removeClass('is-current').eq(index).addClass('is-current'); 470 }; 471 const hide = () => { 472 $el.addClass('is-hide'); 473 }; 474 const show = () => { 475 $el.removeClass('is-hide'); 476 }; 477 change(0); 478 return { 479 change, 480 hide, 481 show, 482 }; 483 }; 484 const slide = () => { 485 const emitter = createEmitter(); 486 let app; 487 const $area = $('.js-movie_slide'); 488 const set = () => { 489 app = new Swiper('.js-movie_slide', { 490 init: true, 491 speed: 1200, 492 direction: 'horizontal', 493 slidesPerView: 1.15, 494 spaceBetween: '1%', 495 centeredSlides: true, 496 loop: json.length > 1, 497 loopAdditionalSlides: 5, 498 runCallbacksOnInit: false, 499 followFinger: false, 500 preventInteractionOnTransition: true, 501 preloadImages: false, 502 slideActiveClass: 'is-slide-current', 503 slideDuplicateActiveClass: 'is-slide-current', 504 slideNextClass: 'is-slide-next', 505 slideDuplicateNextClass: 'is-slide-next', 506 slidePrevClass: 'is-slide-prev', 507 slideDuplicatePrevClass: 'is-slide-prev', 508 containerModifierClass: 'is-slide', 509 wrapperClass: 'js-movie_slide_list', 510 slideClass: 'js-movie_slide_item', 511 navigation: { 512 nextEl: '.js-movie_slide_next', 513 prevEl: '.js-movie_slide_prev', 514 disabledClass: 'is-slide-disable', 515 lockedClass: 'is-slide-disable', 516 }, 517 breakpoints: { 518 961: { 519 slidesPerView: 1.8, 520 spaceBetween: '14%', 521 }, 522 }, 523 autoplay: { 524 delay: 10000, 525 disableOnInteraction: false, 526 }, 527 on: { 528 async init() { 529 await delay(100); 530 base_.Lazy.update(); 531 $el.addClass('is-slide-init'); 532 await delay(1000); 533 $el.addClass('is-slide-active'); 534 }, 535 slideChange(_ref2) { 536 let {realIndex} = _ref2; 537 emitter.emit('change', realIndex); 538 }, 539 setTransition(e, transition) {}, 540 async slideChangeTransitionStart() { 541 $el.addClass('is-slide-change'); 542 await delay(600); 543 $el.removeClass('is-slide-change-anim'); 544 await delay(100); 545 $el.addClass('is-slide-change-anim'); 546 }, 547 async slideChangeTransitionEnd() { 548 $el.removeClass('is-slide-change'); 549 }, 550 slideNextTransitionStart() { 551 $el.addClass('is-slide-next'); 552 }, 553 slideNextTransitionEnd() { 554 $el.removeClass('is-slide-next'); 555 }, 556 slidePrevTransitionStart() { 557 $el.addClass('is-slide-prev'); 558 }, 559 slidePrevTransitionEnd() { 560 $el.removeClass('is-slide-prev'); 561 }, 562 }, 563 }); 564 }; 565 const init = () => { 566 if ($area.length) { 567 set(); 568 } 569 }; 570 const change = (index) => { 571 var _app5; 572 (_app5 = app) === null || _app5 === void 0 || _app5.slideToLoop(index); 573 }; 574 const next = () => { 575 var _app6; 576 (_app6 = app) === null || _app6 === void 0 || _app6.slideNext(); 577 }; 578 const destroy = () => { 579 var _app7; 580 (_app7 = app) === null || _app7 === void 0 || _app7.destroy(); 581 }; 582 init(); 583 return { 584 init, 585 change, 586 next, 587 destroy, 588 on: emitter.on, 589 once: emitter.once, 590 }; 591 }; 592 const setup = function () { 593 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 594 const callback = symbol.create(); 595 const _option = { 596 target: '[data-base="movie"]', 597 targetTemplate: '[data-template="movie"]', 598 postsPerPage: 100, 599 itemsPerPage: 100, 600 }; 601 const OPTION = Object.assign(_option, option); 602 return new Promise((resolve) => { 603 if (!$(OPTION.target).length) resolve(); 604 const timeout = setTimeout(() => { 605 resolve(); 606 }, 5000); 607 const _app = new DATA_BASE_JSON({ 608 ...OPTION, 609 dataJsonList: ['https://www.sonymusic.co.jp/json/v2/artist/'.concat(artistCode, '/video/category/ALL/start/{{count}}/count/{{itemsPerPage}}/callback/callback_').concat(callback, '?callback=callback_').concat(callback)], 610 functions: {}, 611 on: { 612 loaded: (state) => { 613 clearTimeout(timeout); 614 json = state.list; 615 resolve(_app); 616 }, 617 ended: () => {}, 618 }, 619 }); 620 }); 621 }; 622 const init = async function () { 623 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 624 app = await setup(option).then(async () => { 625 if (json) { 626 const moviePlayer = await player(json); 627 const movieSlide = slide(); 628 const movieCover = cover(); 629 630 movieSlide.on('change', (index) => { 631 moviePlayer.change(index); 632 movieCover.change(index); 633 }); 634 moviePlayer.on('onStateChange', (state) => { 635 if (state === 1) { 636 movieCover.hide(); 637 } 638 if (state === 0 || state === 2) { 639 movieCover.show(); 640 } 641 }); 642 } 643 }); 644 }; 645 return { 646 init, 647 }; 648 })(); 649 650 const Profile = (() => { 651 let app; 652 let json; 653 const setup = function () { 654 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 655 const callback = symbol.create(); 656 const _option = { 657 target: '[data-base="profile"]', 658 targetTemplate: '[data-template="profile"]', 659 }; 660 const OPTION = Object.assign(_option, option); 661 return new Promise((resolve) => { 662 if (!$(OPTION.target).length) resolve(); 663 const timeout = setTimeout(() => { 664 resolve(); 665 }, 5000); 666 const _app = new DATA_BASE_JSON({ 667 ...OPTION, 668 page: 'detail', 669 dataJsonDetail: 'https://www.sonymusic.co.jp/json/v2/artist/'.concat(artistCode, '/profile/callback/callback_').concat(callback, '?callback=callback_').concat(callback), 670 functions: { 671 body_text2() { 672 var _this$detail; 673 return (_this$detail = this.detail) === null || _this$detail === void 0 || (_this$detail = _this$detail.body_text) === null || _this$detail === void 0 ? void 0 : _this$detail.replace(/src\="\//g, 'src="//www.sonymusic.co.jp/'); 674 }, 675 visual() { 676 var _this$detail2, _this$detail3; 677 return (_this$detail2 = this.detail) !== null && _this$detail2 !== void 0 && _this$detail2.images.length 678 ? (_this$detail3 = this.detail) === null || _this$detail3 === void 0 || (_this$detail3 = _this$detail3.images) === null || _this$detail3 === void 0 || (_this$detail3 = _this$detail3[0]) === null || _this$detail3 === void 0 679 ? void 0 680 : _this$detail3.image_original.replace('http', 'https') 681 : './assets/img/yousti/img_main.jpg'; 682 }, 683 }, 684 on: { 685 loaded: (state) => { 686 clearTimeout(timeout); 687 json = state; 688 resolve(_app); 689 }, 690 ended: () => {}, 691 }, 692 }); 693 }); 694 }; 695 const init = async function () { 696 let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 697 app = await setup(option); 698 }; 699 return { 700 init, 701 }; 702 })(); 703 704 base_.On.beforeLoad = async () => { 705 await Promise.all([Bnr.init(), News.init(), Live.init(), Disco.init(), Movie.init(), Profile.init()]); 706 base_.Lazy.update(); 707 }; 708 709 return {}; 710})();
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.