1!(function (e) { 2 function t(t) { 3 for ( 4 var n, r, s = t[0], i = t[1], l = t[2], u = 0, w = []; 5 u < s.length; 6 u++ 7 ) 8 (r = s[u]), 9 Object.prototype.hasOwnProperty.call(c, r) && c[r] && w.push(c[r][0]), 10 (c[r] = 0); 11 for (n in i) Object.prototype.hasOwnProperty.call(i, n) && (e[n] = i[n]); 12 for (d && d(t); w.length; ) w.shift()(); 13 return a.push.apply(a, l || []), o(); 14 } 15 function o() { 16 for (var e, t = 0; t < a.length; t++) { 17 for (var o = a[t], n = !0, s = 1; s < o.length; s++) { 18 var i = o[s]; 19 0 !== c[i] && (n = !1); 20 } 21 n && (a.splice(t--, 1), (e = r((r.s = o[0])))); 22 } 23 return e; 24 } 25 var n = {}, 26 c = { 1: 0 }, 27 a = []; 28 function r(t) { 29 if (n[t]) return n[t].exports; 30 var o = (n[t] = { i: t, l: !1, exports: {} }); 31 return e[t].call(o.exports, o, o.exports, r), (o.l = !0), o.exports; 32 } 33 (r.m = e), 34 (r.c = n), 35 (r.d = function (e, t, o) { 36 r.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: o }); 37 }), 38 (r.r = function (e) { 39 "undefined" != typeof Symbol && 40 Symbol.toStringTag && 41 Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), 42 Object.defineProperty(e, "__esModule", { value: !0 }); 43 }), 44 (r.t = function (e, t) { 45 if ((1 & t && (e = r(e)), 8 & t)) return e; 46 if (4 & t && "object" == typeof e && e && e.__esModule) return e; 47 var o = Object.create(null); 48 if ( 49 (r.r(o), 50 Object.defineProperty(o, "default", { enumerable: !0, value: e }), 51 2 & t && "string" != typeof e) 52 ) 53 for (var n in e) 54 r.d( 55 o, 56 n, 57 function (t) { 58 return e[t]; 59 }.bind(null, n) 60 ); 61 return o; 62 }), 63 (r.n = function (e) { 64 var t = 65 e && e.__esModule 66 ? function () { 67 return e.default; 68 } 69 : function () { 70 return e; 71 }; 72 return r.d(t, "a", t), t; 73 }), 74 (r.o = function (e, t) { 75 return Object.prototype.hasOwnProperty.call(e, t); 76 }), 77 (r.p = ""); 78 var s = (window.wsc_webpackJsonp = window.wsc_webpackJsonp || []), 79 i = s.push.bind(s); 80 (s.push = t), (s = s.slice()); 81 for (var l = 0; l < s.length; l++) t(s[l]); 82 var d = i; 83 a.push([3, 0]), o(); 84})({ 85 0: function (e, t, o) { 86 function n(e, t) { 87 for (var o = 0; o < t.length; o++) { 88 var n = t[o]; 89 (n.enumerable = n.enumerable || !1), 90 (n.configurable = !0), 91 "value" in n && (n.writable = !0), 92 Object.defineProperty(e, n.key, n); 93 } 94 } 95 NodeList.prototype.forEach = Array.prototype.forEach; 96 var c = (function () { 97 function e() { 98 !(function (e, t) { 99 if (!(e instanceof t)) 100 throw new TypeError("Cannot call a class as a function"); 101 })(this, e); 102 } 103 var t, o, c; 104 return ( 105 (t = e), 106 (o = [ 107 { 108 key: "isMobile", 109 value: function () { 110 return window.innerWidth <= 1280; 111 }, 112 }, 113 { 114 key: "collapse", 115 value: function (e, t) { 116 var o = document.querySelectorAll(e); 117 o.forEach(function (e, n) { 118 e.collapseClickHandler && 119 e.removeEventListener("click", e.collapseClickHandler), 120 (e.collapseClickHandler = function (c) { 121 "false" === e.getAttribute("aria-expanded") 122 ? (e.setAttribute("aria-expanded", "true"), 123 t && t(e, "expanded")) 124 : (e.setAttribute("aria-expanded", "false"), 125 t && t(e, "collapsed")), 126 o.forEach(function (e, t) { 127 t != n && e.setAttribute("aria-expanded", "false"); 128 }); 129 }), 130 e.addEventListener("click", e.collapseClickHandler); 131 }); 132 }, 133 }, 134 { 135 key: "subsciribe", 136 value: function (e) { 137 var t = this; 138 document.querySelectorAll(e).forEach(function (e, o) { 139 e.subsciribeHandler && 140 e.removeEventListener("submit", e.subsciribeHandler), 141 (e.subsciribeHandler = function (o) { 142 o.preventDefault(); 143 var n = new XMLHttpRequest(); 144 n.open( 145 e.getAttribute("method") || "get", 146 e.getAttribute("action"), 147 "true" 148 ), 149 n.setRequestHeader( 150 "Content-type", 151 "application/x-www-form-urlencoded" 152 ), 153 n.send(t.serialize(e)), 154 (n.onreadystatechange = function () { 155 4 === n.readState && n.status, 156 (e.querySelectorAll('input[type="email"]')[0].value = 157 ""), 158 (e.querySelectorAll( 159 ".wsc-footer2020-form-success" 160 )[0].style.display = "block"); 161 }); 162 }), 163 e.addEventListener("submit", e.subsciribeHandler); 164 }); 165 }, 166 }, 167 { 168 key: "serialize", 169 value: function (e) { 170 for (var t = [], o = 0; o < e.elements.length; o++) { 171 var n = e.elements[o]; 172 if ( 173 n.name && 174 !n.disabled && 175 "file" !== n.type && 176 "reset" !== n.type && 177 "submit" !== n.type && 178 "button" !== n.type 179 ) 180 if ("select-multiple" === n.type) 181 for (var c = 0; c < n.options.length; c++) 182 n.options[c].selected && 183 t.push( 184 encodeURIComponent(n.name) + 185 "=" + 186 encodeURIComponent(n.options[c].value) 187 ); 188 else 189 (("checkbox" !== n.type && "radio" !== n.type) || 190 n.checked) && 191 t.push( 192 encodeURIComponent(n.name) + 193 "=" + 194 encodeURIComponent(n.value) 195 ); 196 } 197 return t.join("&"); 198 }, 199 }, 200 { 201 key: "tab", 202 value: function (e) { 203 document.querySelectorAll(e).forEach(function (e, t) { 204 var o = e.parentElement.parentElement; 205 e.querySelectorAll( 206 ".wsc-header2020-dropdownMenuTabs-item" 207 ).forEach(function (t, n) { 208 var c = t.querySelectorAll( 209 ".wsc-header2020-dropdownMenuTabs-nav" 210 )[0]; 211 c && 212 (c.tabClickHandler && 213 c.removeEventListener("click", c.tabClickHandler), 214 (c.tabClickHandler = function () { 215 e 216 .querySelectorAll( 217 ".wsc-header2020-dropdownMenuTabs-nav" 218 ) 219 .forEach(function (e) { 220 e.setAttribute("aria-expanded", "false"); 221 }), 222 c.setAttribute("aria-expanded", "true"), 223 o 224 .querySelectorAll(".wsc-header2020-dropdownMenu-body") 225 .forEach(function (e) { 226 e.style.display = "none"; 227 }), 228 o.querySelectorAll(".wsc-header2020-dropdownMenu-body")[ 229 n 230 ] && 231 (o.querySelectorAll( 232 ".wsc-header2020-dropdownMenu-body" 233 )[n].style.display = "flex"); 234 }), 235 c.addEventListener("click", c.tabClickHandler)); 236 }); 237 }); 238 }, 239 }, 240 { 241 key: "scroll", 242 value: function () { 243 if ( 244 document.querySelectorAll( 245 ".wsc-header2020 .wsc-header2020-navbar-main" 246 ).length > 0 247 ) { 248 var e = document.querySelector(".wsc-header2020"), 249 t = document.querySelectorAll( 250 ".wsc-header2020 .wsc-header2020-navbar-master" 251 )[0].clientHeight, 252 o = document.querySelectorAll( 253 ".wsc-header2020 .wsc-header2020-navbar-main" 254 )[0], 255 n = o.offsetHeight, 256 c = e.offsetTop; 257 window.scrollHandler && 258 window.removeEventListener("scroll", window.scrollHandler), 259 (window.scrollHandler = function () { 260 var a = 261 document.documentElement.scrollTop || 262 document.body.scrollTop; 263 a > 0 && a > t + c
264 ? (o.setAttribute("data-fixed", "true"), 265 (e.style.paddingTop = n + "px")) 266 : (o.setAttribute("data-fixed", "false"), 267 (e.style.paddingTop = "0px")); 268 }), 269 window.addEventListener("scroll", window.scrollHandler); 270 } 271 }, 272 }, 273 { 274 key: "exposeBrand", 275 value: function () { 276 var e = document.querySelector( 277 ".wsc-header2020-navbar-main .wsc-header2020-navbar-brand img" 278 ); 279 if (e) { 280 if (-1 === e.src.indexOf("horizontal")) return; 281 e.src = e.src.replace("horizontal", "header"); 282 } 283 }, 284 }, 285 { 286 key: "handleLogin", 287 value: function () { 288 if ( 289 document.querySelector( 290 ".wondershare-user-panel.log-out [data-href]" 291 ) && 292 document.querySelector(".wondershare-user-panel") && 293 (!document.querySelector(".wondershare-user-panel.log-in") || 294 !document 295 .querySelector(".wondershare-user-panel.log-in") 296 .classList.contains("listened")) 297 ) { 298 var e = _("user_identity"), 299 t = document.querySelector( 300 ".wondershare-user-panel.log-out [data-href]" 301 ), 302 o = t.getAttribute("data-href").replace(/\/$/, ""), 303 n = t.getAttribute("data-source"), 304 c = t.getAttribute("data-hide-sns") || "", 305 a = t.getAttribute("data-sns") || "", 306 r = t.getAttribute("data-lang") || "", 307 s = t.getAttribute("data-login-mode") || "", 308 i = location.origin + location.pathname, 309 l = encodeURIComponent( 310 "" 311 .concat(window.ws_redirect_url_login || i, "?source=") 312 .concat(n || "") 313 ); 314 if ( 315 (document 316 .querySelectorAll( 317 ".wondershare-user-panel.log-out .login-link" 318 ) 319 .forEach(function (e) { 320 var t = e.getAttribute("data-type") || ""; 321 e.setAttribute( 322 "href", 323 "" 324 .concat(o, "/web/") 325 .concat( 326 "register" === t ? "register" : "login", 327 "?source=" 328 ) 329 .concat(n || "", "&redirect_uri=") 330 .concat(l, "&site=") 331 .concat(location.host, "&verify=no") 332 .concat( 333 (function (e, t, o, n) { 334 var c = ""; 335 return ( 336 (c += e ? "&hide_sns=" + e : ""), 337 (c += t ? "&sns=" + t : ""), 338 (c += o ? "&lang=" + o : ""), 339 (c += n ? "&login_mode=" + n : "") 340 ); 341 })(c, a, r, s) 342 ) 343 ); 344 }), 345 setTimeout(function () { 346 "function" == typeof getProductIDByCookie && 347 getProductIDByCookie() && 348 document 349 .querySelectorAll( 350 ".wondershare-user-panel.log-out .login-link" 351 ) 352 .forEach(function (e) { 353 e.setAttribute( 354 "href", 355 e.getAttribute("href") + 356 "&product_id=" + 357 getProductIDByCookie() 358 ); 359 }); 360 }, 1e3), 361 e) 362 ) { 363 var d = function (e) { 364 !(function (e) { 365 var t = e.url, 366 o = e.type, 367 n = e.data, 368 c = e.success, 369 a = e.fail, 370 r = (e.always, new XMLHttpRequest()); 371 r.open(o, t, !0), 372 (r.timeout = 5e3), 373 (r.withCredentials = !0), 374 n && 375 r.setRequestHeader( 376 "content-type", 377 "application/x-www-form-urlencoded" 378 ), 379 r.send(n || null), 380 (r.onreadystatechange = function () { 381 if (4 === r.readyState) { 382 if (200 == r.status) 383 return void (c && c(JSON.parse(r.responseText))); 384 a && a(r); 385 } 386 }); 387 })({ 388 url: 389 o.replace("accounts", "event") + 390 "/api/v3/market/user/logout", 391 type: "get", 392 success: function () { 393 location.href = 394 e || 395 document.querySelector( 396 ".wondershare-user-panel .account_url_sign_out" 397 ).href; 398 }, 399 fail: function () { 400 location.href = 401 e || 402 document.querySelector( 403 ".wondershare-user-panel .account_url_sign_out" 404 ).href; 405 }, 406 }); 407 }; 408 e = JSON.parse(e); 409 var u = document.querySelector( 410 ".wondershare-user-panel.log-out" 411 ), 412 w = document.querySelector( 413 ".wondershare-user-panel.log-in" 414 ), 415 f = document.querySelector(".ws-user-panel-dropdown"), 416 m = document.querySelector( 417 ".wondershare-user-panel.log-in .avatar" 418 ); 419 (u.style.display = "none"), (w.style.display = "block"); 420 var p = e, 421 g = p.avatar, 422 h = p.email, 423 b = p.nickName, 424 v = p.first_name, 425 y = p.last_name, 426 $ = p.t; 427 (v = v ? S(v) : ""), 428 (y = y ? S(y) : ""), 429 (b = b ? S(b) : ""), 430 g && m.setAttribute("src", g); 431 var x = document.querySelectorAll( 432 ".wondershare-user-panel .account_url_sign_out" 433 ); 434 (document.querySelector( 435 ".wondershare-user-panel .account_name" 436 ).innerText = v && y ? "".concat(v, " ").concat(y) : b || h), 437 document 438 .querySelector(".wondershare-user-panel .account_url") 439 .setAttribute("href", o), 440 x.forEach(function (e) { 441 e.setAttribute( 442 "href", 443 o + 444 "/v3/user/oauth/logout?redirect=" + 445 (window.ws_redirect_url_logout || i) 446 ); 447 }); 448 var k = _("mk_user_identity"), 449 A = x[0].href; 450 x[0].dataset.requset && k 451 ? (window.exitMarket = d) 452 : k && 453 x.forEach(function (e) { 454 e.addEventListener("click", function (e) { 455 e.preventDefault(), d(A); 456 }); 457 }), 458 new Date() - new Date($) > 864e5 && 459 aiax({ 460 url: o + "/api/v3/account?detail=0", 461 type: "get", 462 success: function (e) { 463 0 == e.code && m.setAttribute("src", e.data.avatar); 464 }, 465 }), 466 w.classList.contains("listened") || 467 (w.classList.add("listened"), 468 f && 469 w.addEventListener("click", function (e) { 470 if (e.target.classList.contains("avatar")) { 471 var t = "none" === getComputedStyle(f).display; 472 f.style.display = t ? "block" : "none"; 473 var o = f.getBoundingClientRect().right, 474 n = document.body.offsetWidth - o; 475 (f.style.willChange = "transform"), 476 (f.style.transform = "translate3d(".concat( 477 n < 0 ? n : 0, 478 "px, 0, 0)" 479 )), 480 document 481 .querySelectorAll( 482 ".wsc-header2020 .wsc-header2020-navbar-collapse" 483 ) 484 .forEach(function (e) { 485 e.style.overflow = t ? "visible" : "hidden"; 486 }); 487 } 488 })); 489 } 490 } 491 function _(e) { 492 var t = document.cookie.match("(^|;) ?" + e + "=([^;]*)(;|$)"); 493 return t ? decodeURIComponent(t[2]) : null; 494 } 495 function S(e) { 496 return 0 === e.length 497 ? "" 498 : e 499 .replace(/&/g, "&") 500 .replace(/</g, "<") 501 .replace(/>/g, ">") 502 .replace(/ /g, " ") 503 .replace(/'/g, "'") 504 .replace(/"/g, '"'); 505 } 506 }, 507 }, 508 { 509 key: "init", 510 value: function () { 511 var e = navigator.userAgent; 512 (window.ActiveXObject || 513 "ActiveXObject" in window || 514 e.indexOf("Trident") > -1) && 515 (document 516 .querySelector(".wsc-footer2020-subnav") 517 .classList.add("wsc-footer2020-subnav-ie"), 518 document 519 .querySelector(".wsc-footer2020-mobile-language-menu") 520 .classList.add("wsc-footer2020-mobile-language-menu-ie")), 521 this.exposeBrand(), 522 this.collapse(".wsc-header2020-navbar-collapse-toggle"), 523 this.collapse(".wsc-header2020-navbarDropdown-toggle"), 524 this.collapse( 525 ".wsc-header2020-dropdownMenuBody-title", 526 function (e, t) { 527 "expanded" === t && 528 (document 529 .querySelectorAll( 530 ".wsc-header2020 .wsc-header2020-dropdownMenuBody-item" 531 ) 532 .forEach(function (e) { 533 e.setAttribute("aria-expanded", "false"); 534 }), 535 e 536 .closest(".wsc-header2020-dropdownMenuBody-item") 537 .setAttribute("aria-expanded", "true")), 538 "collapsed" === t && 539 e 540 .closest(".wsc-header2020-dropdownMenuBody-item") 541 .setAttribute("aria-expanded", "false"); 542 } 543 ), 544 this.tab(".wsc-header2020-dropdownMenu-tabs"), 545 this.collapse(".wsc-footer2020-dropdown-toggle"), 546 this.subsciribe(".wsc-footer2020-subnav-form"), 547 this.collapse(".wsc-footer2020-mobile-language-toggle"), 548 this.scroll(), 549 this.handleLogin(), 550 (window.wsc_header_footer_2020_init_done = !0); 551 }, 552 }, 553 ]) && n(t.prototype, o), 554 c && n(t, c), 555 e 556 ); 557 })(); 558 e.exports = c; 559 }, 560 12: function (e, t, o) { 561 "use strict"; 562 o.r(t); 563 o(4); 564 var n = o(2), 565 c = function (e) { 566 var t, 567 o = document.currentScript; 568 if (o) t = o.src; 569 else { 570 var n = document.querySelectorAll( 571 "script[src" + (e ? '*="' + e + '"' : "") + "]" 572 ); 573 t = 574 void 0 === (o = n[n.length - 1]).getAttribute.length 575 ? o.getAttribute("src", -1) 576 : o.src; 577 } 578 return t.substring(0, t.lastIndexOf("/") + 1); 579 }; 580 (window.$ = window.jQuery = o(1)), 581 (window.WebFont = o(7)), 582 (window.wsc = {}); 583 var a = window.wscConf || {}; 584 (wsc.store = { 585 path: { 586 base: 587 a.path_base || 588 c("wsc-common.js").replace("js/", "") || 589 "./assets/", 590 }, 591 state: { init: !1, wait: 0, ready: !0, icon: [], id: [] }, 592 setting: { 593 detect: ["win", "mac", "linux", "ios", "android"], 594 load: ["plugin", "vendor"], 595 wait: a.setting_wait || 10, 596 scroll: a.setting_scroll || 1.5, 597 response: a.setting_response || 0.3, 598 style: { 599 font: { 600 google: a.setting_style_font_google || [ 601 "Montserrat:700", 602 "Rubik:400,500", 603 ], 604 adobe: a.setting_style_font_adobe || null, 605 custom: a.setting_style_font_custom || null, 606 }, 607 }, 608 }, 609 plugin: { 610 pool: [ 611 "youtube", 612 "video", 613 "alert", 614 "slideshow", 615 "seasonal", 616 "gotop", 617 "float", 618 "geoip", 619 "background", 620 "expired", 621 "calendar", 622 "coherent", 623 "ad", 624 "adbanner", 625 "adnew", 626 ], 627 need: [], 628 current: [], 629 dependency: [], 630 }, 631 vendor: { 632 pool: [ 633 "swiper", 634 "lodash", 635 "vue", 636 "url", 637 "showdown", 638 "holder", 639 "lottie", 640 "moment", 641 "tinymce", 642 "jquery.countdown", 643 "highlight", 644 "flatpickr", 645 "md5", 646 "uuid", 647 "basicScroll", 648 "clipboard", 649 ], 650 need: [], 651 current: [], 652 folder: ["tinymce"], 653 css: ["swiper", "highlight", "flatpickr"], 654 }, 655 }), 656 (wsc.store.path.icon = wsc.store.path.base + "icon/"), 657 (wsc.store.path.image = wsc.store.path.base + "image/"), 658 (wsc.store.path.script = wsc.store.path.base + "script/"), 659 (wsc.store.path.style = wsc.store.path.base + "style/"), 660 (wsc.store.path.plugin = wsc.store.path.base + "plugin/"), 661 (wsc.store.path.vendor = wsc.store.path.base + "vendor/"),
662 (wsc.common = {}), 663 (wsc.common.init = function () { 664 wsc.store.state.init = !0; 665 }), 666 (wsc.common.client = { 667 width: function () { 668 return document.documentElement.clientWidth; 669 }, 670 height: function () { 671 return document.documentElement.clientHeight; 672 }, 673 agent: navigator.userAgent.toLowerCase(), 674 platform: navigator.platform.match(/mac/i) 675 ? "mac" 676 : navigator.platform.match(/win/i) 677 ? "win" 678 : navigator.platform.match(/ip/i) 679 ? "ios" 680 : navigator.userAgent.match(/android/i) 681 ? "android" 682 : navigator.platform.match(/linux/i) 683 ? "linux" 684 : "other", 685 browser: navigator.userAgent.match(/edge/i) 686 ? "edge" 687 : navigator.userAgent.match(/firefox/i) 688 ? "firefox" 689 : navigator.userAgent.match(/chrome/i) 690 ? "chrome" 691 : navigator.userAgent.match(/safari/i) 692 ? "safari" 693 : navigator.userAgent.match(/trident/i) 694 ? "ie" 695 : "other", 696 }), 697 (wsc.common.id = function () { 698 var e = Math.random().toString(36).substr(2, 4), 699 t = e.charAt(0); 700 return ( 701 (parseInt(t) || "0" === t) && 702 (e = (parseInt(t) + 10).toString(36) + e.substr(1)), 703 wsc.store.state.id.push(e), 704 e 705 ); 706 }), 707 (wsc.common.log = function (e, t, o, n) { 708 if (0 === window.location.hash.indexOf("#wsc-debug")) { 709 var c = $(":root").css("--" + o), 710 a = 711 $(":root").css("--" + t) || $(":root").css("--primary") || "#333", 712 r = navigator.userAgent.match(/trident/i); 713 console.log( 714 (r ? "" : "%c") + "[wsc]" + e, 715 (r ? "" : "color: " + a) + 716 (r || !o ? "" : "; background-color: " + c) + 717 (r || !n ? "" : "; font-weight: bold") 718 ); 719 } 720 }), 721 (wsc.common.need = function (e) { 722 $.each(wsc.store[e].pool, function (t, o) { 723 $('[data-toggle="' + o + '"]').length > 0 && 724 $.inArray(o, wsc.store[e].need) < 0 && 725 wsc.store[e].need.push(o); 726 }), 727 $("body").trigger("wsc.event." + e + ".need"); 728 }), 729 (wsc.common.check = function (e, t, o) { 730 var n = t ? [t] : o ? wsc[o].file.vendor : wsc.store[e].need, 731 c = !0; 732 return ( 733 $.each(n, function (t, o) { 734 $.inArray(o, wsc.store[e].current) < 0 && (c = !1); 735 }), 736 c 737 ); 738 }), 739 (wsc.common.load = function (e, t) { 740 var o = []; 741 $.each(t ? [t] : wsc.store[e].need, function (t, n) { 742 wsc.common.check(e, n) || o.push(n); 743 }), 744 0 === o.length 745 ? "vendor" === e 746 ? $("body").trigger("wsc.event.vendor.none") 747 : $("body").trigger("wsc.event.dependency.check") 748 : $.each(o, function (t, o) { 749 $.getScript( 750 wsc.store.path[e] + 751 ("vendor" === e && $.inArray(o, wsc.store[e].folder) > -1 752 ? o + "/" 753 : "") + 754 ("vendor" === e ? "" : "wsc-") + 755 o + 756 ("vendor" === e ? ".min" : "") + 757 ".js", 758 function () { 759 if ( 760 "vendor" === e && 761 $.inArray(o, wsc.store.vendor.css) > -1 762 ) { 763 var t = 764 '<link id="vendor-' + 765 o + 766 '-css" rel="stylesheet" href="' + 767 wsc.store.path.vendor + 768 ($.inArray(o, wsc.store[e].folder) > -1 769 ? o + "/" 770 : "") + 771 o + 772 '.min.css">'; 773 $('head link[rel="stylesheet"]').length > 0 774 ? $('head link[rel="stylesheet"]:eq(0)').before(t) 775 : $("head").append(t); 776 } 777 wsc.store[e].current.push(o), 778 wsc.common.log("load " + e + ": " + o, "success"), 779 $("body").trigger("wsc.event." + e + ".load"), 780 $("body").trigger("wsc.event." + o + ".load"), 781 "vendor" === e 782 ? $.each(wsc.store.plugin.need, function (e, t) { 783 if (!wsc[t].state.init) { 784 var o = !0; 785 $.each(wsc[t].file.vendor, function (e, t) { 786 $.inArray(t, wsc.store.vendor.current) < 0 && 787 (o = !1); 788 }), 789 o && 790 ($("body").trigger( 791 "wsc.event." + t + ".init" 792 ), 793 (wsc[t].state.init = !0)); 794 } 795 }) 796 : (0 === wsc[o].file.vendor.length 797 ? ($("body").trigger("wsc.event." + o + ".init"), 798 (wsc[o].state.init = !0)) 799 : $.each(wsc[o].file.vendor, function (e, t) { 800 0 === 801 $('#wsc-load [data-toggle="' + t + '"]') 802 .length && 803 $("#wsc-load").append( 804 '<div data-toggle="' + t + '"></div>' 805 ); 806 }), 807 wsc.store.plugin.dependency.push(o),
808 $("body").trigger("wsc.event.dependency.check")); 809 } 810 ).fail(function () { 811 wsc.common.log("fail to load " + e + ": " + o, "danger"); 812 }); 813 }); 814 }), 815 (wsc.common.template = function (e, t, o, n) { 816 wsc[e].state.ready || 817 (wsc[e].file.template && 818 $.get(wsc.store.path.plugin + wsc[e].file.template, function (c) { 819 $(t || "body").append(c), 820 (wsc[e].state.ready = !0), 821 $(t || "body").trigger("wsc.event." + e + ".ready"), 822 o && o.trigger(n); 823 }).fail(function () { 824 wsc.common.log("fail to load " + e + " template", "danger"); 825 })); 826 }), 827 (wsc.common.icon = { 828 check: function (e) { 829 return wsc.store.state.icon.indexOf(e) > -1; 830 }, 831 init: function (e) { 832 $(".wsc-icon") 833 .filter("[data-icon], [data-path]") 834 .not( 835 ".wsc-icon-loaded, .wsc-icon-noload" + 836 (e ? "" : ", .wsc-icon-loading") 837 ) 838 .each(function (e, t) { 839 var o = $(this).is(".wsc-icon-img, .wsc-icon-bg"), 840 n = $(this).attr("data-icon"), 841 c = $(this).attr("data-path"); 842 o 843 ? (wsc.common.icon.load(n, null, !0), 844 $(this).addClass("wsc-icon-loading")) 845 : c 846 ? (wsc.common.icon.load("", c), 847 $(this).addClass("wsc-icon-loading")) 848 : ((n = wsc.common.icon.fixOld(n, null, !0)), 849 wsc.common.icon.check(n) || wsc.store.state.icon.push(n)); 850 }); 851 for (var t = 0; t < wsc.store.state.icon.length; t++) { 852 var o = wsc.store.state.icon[t], 853 n = '.wsc-icon[data-icon="' + o + '"]'; 854 (n = wsc.common.icon.fixOld(o, n)), 855 $(n).length > 0 && 856 $(n).not( 857 ".wsc-icon-loaded, .wsc-icon-loading, .wsc-icon-noload" 858 ).length > 0 && 859 wsc.common.icon.load(o), 860 $(n) 861 .not(".wsc-icon-loaded, .wsc-icon-loading, .wsc-icon-noload") 862 .addClass("wsc-icon-loading"); 863 } 864 }, 865 load: function (e, t, o) { 866 var n = "symbol/close", 867 c = e.indexOf("-") || "", 868 a = e.substr(0, c) || "", 869 r = e.substr(c + 1) || "", 870 s = t || wsc.store.path.icon + a + "/" + r + ".svg"; 871 if (o) { 872 var i = $( 873 '.wsc-icon[data-icon="' + e + '"]:not(.wsc-icon-loaded)' 874 ).filter(".wsc-icon-img, .wsc-icon-bg"); 875 i.hasClass("wsc-icon-img") 876 ? i.empty().append('<img src="' + s + '" alt="' + e + '">') 877 : i.css("backgroundImage", "url(" + s + ")"); 878 } else 879 $.get( 880 s, 881 function (o) { 882 t 883 ? wsc.common.icon.show(null, o, t) 884 : ($("body").trigger("wsc.event.icon.load", e), 885 wsc.common.icon.show(e, o)); 886 }, 887 "text" 888 ).fail(function () { 889 wsc.common.log("fail to load icon: " + e, "warning"), 890 $.get( 891 wsc.store.path.icon + n + ".svg", 892 function (o) { 893 t 894 ? ($('.wsc-icon[data-path="' + t + '"]').addClass( 895 "wsc-icon-default" 896 ), 897 wsc.common.icon.show(e, o, t)) 898 : ($('.wsc-icon[data-icon="' + e + '"]').addClass( 899 "wsc-icon-default" 900 ), 901 $("body").trigger("wsc.event.icon.load", n), 902 wsc.common.icon.show(e, o)); 903 }, 904 "text" 905 ); 906 }, "text"); 907 }, 908 show: function (e, t, o) { 909 var n = '.wsc-icon[data-icon="' + e + '"]'; 910 (n = o 911 ? '.wsc-icon[data-path="' + o + '"]' 912 : wsc.common.icon.fixOld(e, n)), 913 $(n) 914 .filter(".wsc-icon-loading") 915 .not(".wsc-icon-loaded") 916 .empty() 917 .removeClass("wsc-icon-loading") 918 .addClass("wsc-icon-loaded") 919 .append(t), 920 wsc.is.ie && 921 $(n) 922 .filter(".wsc-icon-loaded") 923 .children("svg") 924 .css("width", function () { 925 var e = $(this).attr("viewBox").split(" ") || [0, 0, 1, 1]; 926 return ( 927 (($(this).height() || $(this).parent().height()) * 928 (e[2] - e[0])) / 929 (e[3] - e[1]) || "auto" 930 ); 931 }); 932 }, 933 replace: function (e, t, o) { 934 var n = e.attr("data-icon"); 935 e.removeClass("wsc-icon-loaded wsc-icon-default"), 936 0 === 937 $('.wsc-icon[data-icon="' + n + '"].wsc-icon-loaded').length && 938 wsc.store.state.icon.splice(wsc.store.state.icon.indexOf(n), 1), 939 e.attr("data-icon", t), 940 o || wsc.common.icon.init(); 941 }, 942 fixOld: function (e, t, o) { 943 return o 944 ? (0 === e.indexOf("3p") 945 ? (e = e.replace("3p-", "brand-")) 946 : 0 !== e.indexOf("brand-") && 947 0 !== e.indexOf("logo-") && 948 0 !== e.indexOf("flag-") && 949 0 !== e.indexOf("symbol-") && 950 0 !== e.indexOf("extra-") && 951 (e = "symbol-" + e), 952 e) 953 : (0 === e.indexOf("brand-") 954 ? (t = 955 t + 956 ', .wsc-icon[data-icon="' + 957 e.replace("brand-", "3p-") + 958 '"]') 959 : e.indexOf(!1) && 960 (t = 961 t + 962 ', .wsc-icon[data-icon="' + 963 e.replace("symbol-", "") + 964 '"]'), 965 t); 966 }, 967 }), 968 (wsc.common.box = { 969 init: function () { 970 $(".wsc-box[data-box]") 971 .not(".wsc-box-loaded") 972 .each(function () { 973 var e = $(this), 974 t = 975 wsc.store.path.image + "box/" + $(this).data("box") + ".png"; 976 $.get(t, function () { 977 e.css("backgroundImage", "url(" + t + ")"); 978 }) 979 .fail(function () { 980 e 981 .css( 982 "backgroundImage", 983 "url(" + wsc.store.path.image + "box/wondershare.png)" 984 ) 985 .addClass("wsc-box-default"), 986 wsc.common.log( 987 "fail to load box: " + $(this).data("box"), 988 "warning" 989 ); 990 }) 991 .always(function () { 992 e.addClass("wsc-box-loaded"); 993 }); 994 }); 995 }, 996 }), 997 (wsc.is = { 998 init: function () { 999 return wsc.store.state.init; 1000 }, 1001 ready: function () { 1002 return wsc.store.state.ready; 1003 }, 1004 mac: "mac" === wsc.common.client.platform, 1005 win: "win" === wsc.common.client.platform, 1006 ios: "ios" === wsc.common.client.platform, 1007 android: "android" === wsc.common.client.platform, 1008 linux: "linux" === wsc.common.client.platform, 1009 desktop: !( 1010 "mac" !== wsc.common.client.platform && 1011 "win" !== wsc.common.client.platform && 1012 "linux" !== wsc.common.client.platform 1013 ), 1014 mobile: !( 1015 "ios" !== wsc.common.client.platform && 1016 "android" !== wsc.common.client.platform 1017 ), 1018 chrome: "chrome" === wsc.common.client.browser, 1019 firefox: "firefox" === wsc.common.client.browser, 1020 safari: "safari" === wsc.common.client.browser, 1021 ie: "ie" === wsc.common.client.browser, 1022 edge: "edge" === wsc.common.client.browser, 1023 }), 1024 wsc.common.log( 1025 "client: " +
1026 wsc.common.client.platform + 1027 " + " + 1028 wsc.common.client.browser, 1029 "coral", 1030 "smoke", 1031 !0 1032 ), 1033 ($('[data-dev="auto"]').length > 0 || 1034 $('[data-sys="auto"]').length > 0) && 1035 ($('[data-dev="auto"]').attr( 1036 "data-dev", 1037 wsc.is.mobile ? "mobile" : "desktop" 1038 ), 1039 $( 1040 '[data-sys="auto"] [data-platform="' + 1041 wsc.common.client.platform + 1042 '"]' 1043 ) 1044 .addClass("active") 1045 .prop("checked", !0), 1046 $('[data-sys="auto"]').attr("data-sys", wsc.common.client.platform), 1047 wsc.common.log("auto platform: " + wsc.common.client.platform, "info")), 1048 $("body").on("click", '[data-toggle="platform"]', function () { 1049 var e = $(this).data("platform"); 1050 wsc.store.setting.detect.indexOf(e) > -1 1051 ? ($("[data-sys]").attr("data-sys", e), 1052 $("[data-sys]").attr( 1053 "data-dev", 1054 "ios" === e || "android" === e ? "mobile" : "desktop" 1055 ), 1056 $('[data-toggle="platform"]') 1057 .removeClass("active") 1058 .prop("checked", !1), 1059 $('[data-toggle="platform"][data-platform="' + e + '"]') 1060 .addClass("active") 1061 .prop("checked", !0), 1062 wsc.common.log("switch platform: " + e, "info")) 1063 : wsc.common.log("fail to switch platform: " + e, "warning"); 1064 }), 1065 wsc.is.ie && 1066 ($("body").addClass("iefix"), 1067 $.getScript( 1068 wsc.store.path.vendor + "css-vars-ponyfill.min.js", 1069 function () { 1070 cssVars(); 1071 } 1072 )), 1073 (WebFont.webFontConfig = { 1074 timeout: 2e3, 1075 active: function () { 1076 $("body").trigger("wsc.event.font.ready"), 1077 wsc.common.log("all fonts loaded", "success"); 1078 }, 1079 inactive: function () { 1080 $("body").trigger("wsc.event.font.fail"), 1081 wsc.common.log("all fonts failed to load", "warning"); 1082 }, 1083 fontactive: function (e, t) { 1084 wsc.common.log("load font: " + e + " " + t, "info"); 1085 }, 1086 fontinactive: function (e, t) { 1087 wsc.common.log("fail to load font: " + e + " " + t, "warning"); 1088 }, 1089 }), 1090 wsc.store.setting.style.font.google.length > 0 && 1091 (WebFont.webFontConfig.google = { 1092 families: wsc.store.setting.style.font.google, 1093 }), 1094 wsc.store.setting.style.font.adobe && 1095 (WebFont.webFontConfig.typekit = { 1096 id: wsc.store.setting.style.font.adobe, 1097 }), 1098 wsc.store.setting.style.font.custom && 1099 (WebFont.webFontConfig.custom = wsc.store.setting.style.font.custom), 1100 WebFont.load(WebFont.webFontConfig), 1101 0 === $("#wsc-load").length && 1102 $("body").append('<aside class="parameter" id="wsc-load"></aside>'), 1103 (wsc.check = setInterval(function () { 1104 wsc.store.state.wait++, 1105 (wsc.store.state.init || 1106 wsc.store.state.wait === wsc.store.setting.wait) && 1107 (clearInterval(wsc.check), 1108 $("body").trigger("wsc.event.page.init"), 1109 wsc.common.need("plugin")); 1110 }, 1e3 * wsc.store.setting.response)), 1111 $("body").on("wsc.event.dependency.check", function () { 1112 wsc.store.plugin.need.sort().toString() === 1113 wsc.store.plugin.dependency.sort().toString() && 1114 $("body").trigger("wsc.event.dependency.ready"); 1115 }), 1116 $("body").on("wsc.event.dependency.ready", function () { 1117 wsc.common.need("vendor"); 1118 }), 1119 $.each(wsc.store.setting.load, function (e, t) { 1120 $("body").on("wsc.event." + t + ".need", function () { 1121 wsc.common.load(t); 1122 }), 1123 $("body").on( 1124 "wsc.event." + t + ".load wsc.event.vendor.none", 1125 function () { 1126 wsc.common.check(t) && 1127 ($("body").trigger("wsc.event." + t + ".ready"), 1128 "vendor" === t && 1129 (wsc.common.log("page ready", "coral", "smoke", !0), 1130 $("body").trigger("wsc.event.page.ready"))); 1131 } 1132 ); 1133 }), 1134 $("body").on("wsc.event.page.ready", function () { 1135 wsc.common.icon.init(), wsc.common.box.init(); 1136 }), 1137 $("body").on( 1138 "wsc.event.icon.load", 1139 Object(n.a)(1e3 * wsc.store.setting.response, function () { 1140 0 === $(".wsc-icon:not(.wsc-icon-loaded)").length && 1141 ($("body").trigger("wsc.event.icon.ready"), 1142 wsc.common.log("load icons", "success")); 1143 }) 1144 ), 1145 $("body").on("wsc.event.page.init", function () { 1146 $('[data-toggle="tooltip"]').tooltip({}), 1147 $('[data-toggle="popover"]').popover({}); 1148 }), 1149 document.addEventListener("lazybeforeunveil", function (e) { 1150 var t = e.target, 1151 o = e.target.getAttribute("data-src"); 1152 o && 1153 "IMG" !== e.target.tagName && 1154 setTimeout(function () { 1155 t.style.backgroundImage = "url(" + o + ")"; 1156 }, 1e3 * wsc.store.setting.response); 1157 }), 1158 $("body").on("click", "a", function (e) { 1159 var t = $(this).attr("href"); 1160 if (t && 0 === t.indexOf("#")) 1161 if ("#" === t) e.preventDefault(); 1162 else if ( 1163 t.length > 1 && 1164 !$(this).data("toggle") && 1165 "/" !== t.charAt(1) 1166 ) { 1167 var o = $(t); 1168 0 === $(t).length && (o = $('[name="' + t.substr(1) + '"]')), 1169 1 === o.length && 1170 "none" !== o.css("display") && 1171 (e.preventDefault(), 1172 e.stopPropagation(), 1173 $("html, body").animate({ scrollTop: o.offset().top })); 1174 } 1175 }), 1176 $("body").on("click", '[data-toggle="class"]', function () { 1177 $($(this).data("target")).toggleClass($(this).data("class")); 1178 }), 1179 $("body").on("submit", ".wsc-form-ajax", function (e) { 1180 var t = $(this); 1181 e.preventDefault(), 1182 $.ajax({ 1183 url: t.attr("action"), 1184 method: t.attr("method"), 1185 data: t.serialize(), 1186 success: function () { 1187 wsc.alert.add("success", t.find(".wsc-form-success").text()); 1188 }, 1189 error: function () { 1190 wsc.alert.add("danger", t.find(".wsc-form-error").text()); 1191 }, 1192 }); 1193 }), 1194 $("body").on("wsc.event.page.init", function () { 1195 wsc.is.ios && 1196 (function (e) { 1197 var t, 1198 o = { touchend: function () {} }; 1199 for (t in o) e.addEventListener(t, o); 1200 })(document); 1201 }), 1202 $("#wsc-header2 .navbar .navbar-toggler").click(function () { 1203 $("#wsc-header2 .shadow").is(":hidden") 1204 ? $("#wsc-header2 .shadow").fadeIn() 1205 : $("#wsc-header2 .shadow").fadeOut(); 1206 }), 1207 $("#wsc-header2 .navbar > .collapse").on( 1208 "shown.bs.collapse", 1209 function () { 1210 $("#wsc-header2 .shadow").show(); 1211 } 1212 ), 1213 $("#wsc-header2 .navbar > .collapse").on( 1214 "hidden.bs.collapse", 1215 function () { 1216 $("#wsc-header2 .shadow").hide(); 1217 } 1218 ), 1219 $("#wsc-header2 .shadow").click(function () { 1220 $("#wsc-header2 .navbar .collapse").collapse("hide"), $(this).fadeOut(); 1221 }), 1222 $("body").on("wsc.event.page.ready", function () { 1223 $(".wsc-footer-year span").html(new Date().getFullYear()); 1224 }), 1225 $("body").on("change", ".custom-file-input", function () { 1226 $(this) 1227 .closest(".custom-file") 1228 .find(".custom-file-label") 1229 .text($(this)[0].files[0].name); 1230 }); 1231 }, 1232 3: function (e, t, o) { 1233 o(12); 1234 var n = o(0); 1235 window.WscHeaderFooter2020 = n; 1236 var c = new n(); 1237 !window.wsc_header_footer_2020_init_done && c.init(); 1238 }, 1239});
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.