PageSourceSearch

https://www.sanrio.co.jp/wp-content/themes/sanrio2022/common/js/scripts.js?1790239573

js sanrio.co.jp collected 2026-09-24 08:46:22 UTC 563,734 bytes, 14,252 lines download raw bytes

vendor: 4,408 bytes, lines 1-11
1"use strict";
2
3function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
8function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; }
vendor: 7,632 bytes, line 11
11 function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEac
vendor: 6,212 bytes, lines 11-24
11h(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
12function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
13function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
14function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
15function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
16function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
19function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
20function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
21function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
23function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
24function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string");
24 return _typeof(key) === "symbol" ? key : String(key); }
25function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
26// config
27var APP = {
28  bp: {
29    mobile: 768,
30    tablet: 1023
31  }
32};
33var getMeta = function getMeta(name) {
34  var meta = document.querySelector("meta[name=\"".concat(name, "\"]"));
35  return (meta === null || meta === void 0 ? void 0 : meta.content) || null;
36};
37
38// 通常時はこちらを使用
39// window.API_BASE_URL = '/';
40// window.SANRIOPLUS_API_BASE_URL = '/system/api_sanrioplus';
41// 外部ヘッダーアップ時にこちらを使用
42// window.API_BASE_URL = 'https://www.test.sanrio.co.jp/';
43// window.SANRIOPLUS_API_BASE_URL = 'https://www.test.sanrio.co.jp/system/api_sanrioplus';
44
45// window.API_DOMAIN = getMeta('X-Api-Domain') || '/';
46window.API_DOMAIN = getMeta('X-Api-Base') || '/';
47window.API_BASE_URL = window.API_DOMAIN;
48// window.SANRIOPLUS_API_BASE_URL = window.API_DOMAIN + 'system/api_sanrioplus';
49window.JSON_DOMAIN = getMeta('X-Json-Domain') || '/';
50// window.SANRIOPLUS_API_BASE_URL = getMeta('X-SANRIOPLUS-Domain') || '/';
51window.JSON_BASE = getMeta('X-Json-Base') || '/';
52window.SANRIOPLUS_API_BASE_URL = getMeta('X-SanrioPlusApi-Base') + 'system/api_sanrioplus' || '/';
53var CFL = {
54  UA: {
55    raw: function raw() {
56      return navigator.userAgent;
57    },
58    is: function is(_is) {
59      var ua = CFL.UA.raw();
60      if (_is === 'issp') {
61        return CFL.UA.isSp();
62      }
63    },
64    isSp: function isSp() {
65      var ua = CFL.UA.raw();
66      return ua.indexOf('iPhone') > 0 || ua.indexOf('iPod') > 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0;
67    },
68    isTablet: function isTablet() {
69      var ua = CFL.UA.raw();
70      if (ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0) {} else if (ua.indexOf('iPad') > -1 || ua.indexOf('Macintosh') > -1 && CFL.Device.isTouch() || ua.indexOf('Android') > 0) {
71        return true;
72      }
73      return false;
74    },
75    isEdge: function isEdge() {
76      return this.raw().indexOf('Edge') != -1;
77    },
78    isIE: function isIE() {
79      var ua = CFL.UA.raw();
80      return this.raw().indexOf('Trident') != -1;
81    }
82  },
83  Device: {
84    isTouch: function isTouch() {
85      return 'ontouchend' in document;
86    }
87  }
88};
89var isMobile = function isMobile() {
90  return window.matchMedia('(max-width: ' + APP.bp.mobile + 'px)').matches;
91};
92var isTablet = function isTablet() {
93  return window.matchMedia('(max-width: ' + APP.bp.tablet + 'px)').matches;
94};
95var isPortrait = function isPortrait() {
96  var defaultOrientation = null;
97  if ('orientation' in window) {
98    var o1 = window.innerWidth < window.innerHeight;
99    var o2 = window.orientation % 180 == 0;
100    defaultOrientation = o1 && o2 || !(o1 || o2);
101  }
102  if ('orientation' in window) {
103    // defaultOrientationがtrueの場合、window.orientationが0か180の時は縦
104    // defaultOrientationがfalseの場合、window.orientationが-90か90の時は横
105    var o = window.orientation % 180 == 0;
106    if (o && defaultOrientation || !(o || defaultOrientation)) {
107      return true;
108    } else {
109      return false;
110    }
111  }
112};
113var Util = /*#__PURE__*/function () {
114  function Util() {
115    _classCallCheck(this, Util);
116  }
117  _createClass(Util, [{
118    key: "noScroll",
119    value: function noScroll(event) {
120      event.preventDefault();
121    }
122  }], [{
123    key: "stopScroll",
124    value: function stopScroll() {
125      $('body').addClass('u-scroll-fix');
126      document.addEventListener('touchmove', this.noScroll, {
127        passive: false
128      });
129      document.addEventListener('mousewheel', this.noScroll, {
130        passive: false
131      });
132    }
133  }, {
134    key: "startScroll",
135    value: function startScroll() {
136      $('body').removeClass('u-scroll-fix');
137      document.removeEventListener('touchmove', this.noScroll, {
138        passive: false
139      });
140      document.removeEventListener('mousewheel', this.noScroll, {
141        passive: false
142      });
143    }
144  }, {
145    key: "getURLParam",
146    value: function getURLParam(name, url) {
147      if (!url) url = window.location.href;
148      name = name.replace(/[\[\]]/g, "\\$&");
149      var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
150        results = regex.exec(url);
151      if (!results) return null;
152      if (!results[2]) return '';
153      return decodeURIComponent(results[2].replace(/\+/g, " "));
154    }
155  }, {
156    key: "getCurrentPage",
157    value: function getCurrentPage() {
158      var _el = document.querySelector("[data-page]");
159      if (_el && _el.dataset) {
160        return _el.dataset.page ? _el.dataset.page : 'other';
161      } else {
162        return null;
163      }
164    }
165  }, {
166    key: "getCurrentTheme",
167    value: function getCurrentTheme() {
168      var _el = document.querySelector("[data-theme]");
169      if (_el && _el.dataset) {
170        return _el.dataset.theme ? _el.dataset.theme : 'other';
171      } else {
172        return null;
173      }
174    }
175  }, {
176    key: "shuffleArray",
177    value: function shuffleArray(arr) {
178      var pickLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
179      if (!arr || !Array.isArray(arr)) return [];
180      var length = pickLength && pickLength < arr.length ? pickLength : arr.length;
181      var allList = _toConsumableArray(arr);
182      var returnList = [];
183      while (returnList.length < length) {
184        var i = Math.floor(Math.random() * allList.length);
185        var item = allList.splice(i, 1)[0];
186        returnList.push(item);
187      }
188      ;
189      return returnList;
190    }
191  }]);
192  return Util;
193}();
194var YoutubeControl = /*#__PURE__*/function () {
195  function YoutubeControl(el, opt) {
196    _classCallCheck(this, YoutubeControl);
197    this.el = el;
198    this.opt = opt;
199    this.fade = this.el + '-fade';
200    this.area = this.el + '-area';
201    this.slider = this.opt.slider;
202    this.opt = opt;
203    if ($(this.slider).length > 0) {
204      this.appendId();
205      this.sliderClick();
206    }
207    this.executeVideo();
208  }
209  _createClass(YoutubeControl, [{
210    key: "sliderClick",
211    value: function sliderClick() {
212      var _this2 = this;
213      $(this.slider).find(this.el).on('click', function (event) {
214        var $this = $(event.currentTarget);
215        _this2.flag = false;
216        _this2.item = $this.find(_this2.fade);
217        gsap.to(_this2.item, {
218          alpha: 0,
219          display: 'none',
220          duration: .5
221        });
222        var id = $this.find(_this2.area).attr('id');
223        _this2.controlPlayVideo(id);
224      });
225    }
226  }, {
227    key: "appendId",
228    value: function appendId() {
229      $(this.slider).find(this.el).each(function (i, el) {
230        var container = 'youtube' + i;
231        $(el).prepend('<div class="js-youtube-area" id="' + container + '">');
232      });
233    }
234  }, {
235    key: "executeVideo",
236    value: function executeVideo() {
237      var _this3 = this;
238      if (typeof YT == 'undefined' || typeof YT.Player == 'undefined') {
239        $.getScript('https://www.youtube.com/iframe_api');
240        window.onYouTubePlayerAPIReady = function () {
241          _this3.loadPlayer();
242        };
243      } else {
244        this.loadPlayer();
245      }
246    }
247  }, {
248    key: "loadPlayer",
249    value: function loadPlayer() {
250      var _this4 = this;
251      this.ytPlayer = {};
252      var ytWidth = 890;
253      var ytHeight = 500;
254      var _this = this;
255      $('.js-youtube').each(function (i, el) {
256        var videoId = $(el).data('id');
257        var container = $(el).find('.js-youtube-area').attr('id');
258        _this4.ytPlayer[container] = new YT.Player(container, {
259          videoId: videoId,
260          host: 'https://www.youtube.com',
261          width: ytWidth,
262          height: ytHeight,
263          playerVars: {
264            rel: 0,
265            // 関連動画の非表示
266            //color: 'white', // 進行バーの色
267            // showinfo: 0, // タイトル・シェア
268            controls: 1,
269            // プレイヤーコントロールの非表示
270            modestbranding: 1,
271            // YouTubeロゴの非表示
272            iv_load_policy: 3,
273            // アノテーションの非表示
274            loop: 0,
275            // playlist: url, // ループ時に設定
276            wmode: 'transparent',
277            origin: location.protocol + '//' + location.hostname + "/"
278          },
279          events: {
280            // 'onReady': onPlayerReady,
281            'onStateChange': onPlayerStateChange
282          }
283        });
284      });
285      function onPlayerStateChange(event) {
286        var ytStatus = event.data;
287        if (ytStatus == YT.PlayerState.ENDED || ytStatus == YT.PlayerState.PAUSED) {
288          gsap.to(_this.item, {
289            alpha: 1,
290            display: 'block',
291            duration: .5,
292            onComplete: function onComplete() {
293              $(_this.item).removeAttr('style');
294            }
295          });
296        }
297      }
298    }
299  }, {
300    key: "controlPlayVideo",
301    value: function controlPlayVideo(id) {
302      this.ytPlayer[id].playVideo();
303    }
304  }, {
305    key: "controlPauseVideo",
306    value: function controlPauseVideo(id) {
307      this.ytPlayer[id].pauseVideo();
308    }
309  }]);
310  return YoutubeControl;
311}();
312var SliderRotateCarousel = /*#__PURE__*/function () {
313  function SliderRotateCarousel(el, opt) {
314    _classCallCheck(this, SliderRotateCarousel);
315    this["class"] = el;
316    this.opt = opt;
317    this.el = '.' + this["class"];
318    this.slide = this.el + '-slide';
319    this.pic = this.el + '-pic';
320    this.icon = this.el + '-icon';
321    this.text = this.el + '-text';
322    this.next = this.el + '-next';
323    this.prev = this.el + '-prev';
324    this.link = this.el + '-link';
325    this.pagination = this.el + '-pagination';
326    this.slider = new Array();
327    if ($(this.el).length) {
328      this.init();
329    }
330  }
331  _createClass(SliderRotateCarousel, [{
332    key: "init",
333    value: function init() {
334      var _this5 = this;
335      $(this.el).each(function (i, el) {
336        $(el).addClass(_this5["class"] + i);
337        $(el).find(_this5.slide).addClass(_this5["class"] + '-slide' + i);
338        $(el).find(_this5.prev).addClass(_this5["class"] + '-prev' + i);
339        $(el).find(_this5.next).addClass(_this5["class"] + '-next' + i);
340        $(el).find(_this5.pagination).addClass(_this5["class"] + '-pagination' + i);
341        $(el).find(_this5.pic).addClass(_this5["class"] + '-pic' + i);
342        $(el).find(_this5.link).addClass(_this5["class"] + '-link' + i);
343        _this5.event(i, el);
344      });
345    }
346  }, {
347    key: "event",
348    value: function event(i, el) {
349      var _this6 = this;
350      $(this.link + i).on('click', function () {
351        var url = $(_this6.slide + i).find('.swiper-slide-active').data('url');
352        $(_this6.link + i).attr('href', url);
353      });
354      var slideOpt = {
355        autoplay: {
356          delay: 5000,
357          disableOnInteraction: false
358        },
359        loop: true,
360        speed: 2000,
361        spaceBetween: 20,
362        centeredSlides: true,
363        slidesPerView: "auto",
364        navigation: {
365          prevEl: this.prev + i,
366          nextEl: this.next + i
367        },
368        pagination: {
369          el: this.pagination + i,
370          type: 'bullets',
371          clickable: true
372        },
373        breakpoints: {
374          769: {
375            spaceBetween: 64
376          }
377        },
378        watchSlidesVisibility: true,
379        watchSlidesProgress: true,
380        on: {
381          init: function init() {
382            //console.log('omot');
383            _this6.setting(i, el);
384            $(_this6.el).find('.swiper-pagination-bullet').each(function (i, el) {
385              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
386            });
387          },
388          loopFix: function loopFix() {
389            _this6.setting(i, el);
390          },
391          slideChange: function slideChange() {
392            if ($('.swiper-slide-active').find(_this6.pic).find('figure').is(':hidden')) {
393              var id = $('.swiper-slide-active').find('.js-youtube-area').attr('id');
394              youtubeControl.controlPauseVideo(id);
395            }
396          },
397          beforeTransitionStart: function beforeTransitionStart() {
398            var icon = $(_this6.slide + i).find(_this6.icon);
399            var text = $(_this6.slide + i).find(_this6.text);
400            var link = $(_this6.el).find(_this6.link);
401            gsap.to(icon, {
402              scale: 0,
403              duration: .2
404            });
405            gsap.to(text, {
406              alpha: 0,
407              duration: .2
408            });
409            gsap.to(link, {
410              alpha: 0,
411              duration: .2
412            });
413          },
414          slideChangeTransitionStart: function slideChangeTransitionStart() {
415            var prev = $(_this6.slide + i).find('.swiper-slide-prev').find(_this6.pic);
416            var next = $(_this6.slide + i).find('.swiper-slide-next').find(_this6.pic);
417            var prev1 = $(_this6.slide + i).find('.swiper-slide-prev').prev().find(_this6.pic);
418            var next1 = $(_this6.slide + i).find('.swiper-slide-next').next().find(_this6.pic);
419            var prev2 = $(_this6.slide + i).find('.swiper-slide-prev').prev().prev().find(_this6.pic);
420            var next2 = $(_this6.slide + i).find('.swiper-slide-next').next().next().find(_this6.pic);
421            var active = $(_this6.slide + i).find('.swiper-slide-active').find(_this6.pic);
422            if (isMobile()) {
423              gsap.to(prev, {
424                rotate: -6,
425                y: 16,
426                duration: 2
427              });
428              gsap.to(next, {
429                rotate: 6,
430                y: 16,
431                duration: 2
432              });
433              gsap.to(prev1, {
434                rotate: -10,
435                y: 60,
436                duration: 2
437              });
438              gsap.to(next1, {
439                rotate: 10,
440                y: 60,
441                duration: 2
442              });
443              gsap.to(prev2, {
444                rotate: -14,
445                y: 126,
446                duration: 2
447              });
448              gsap.to(next2, {
449                rotate: 14,
450                y: 126,
451                duration: 2
452              });
453              gsap.to(active, {
454                rotate: 0,
455                y: 0,
456                duration: 2
457              });
458            } else {
459              gsap.to(prev, {
460                rotate: -6,
461                y: 35,
462                duration: 2
463              });
464              gsap.to(next, {
465                rotate: 6,
466                y: 35,
467                duration: 2
468              });
469              gsap.to(prev1, {
470                rotate: -12,
471                y: 148,
472                duration: 2
473              });
474              gsap.to(next1, {
475                rotate: 12,
476                y: 148,
477                duration: 2
478              });
479              gsap.to(prev2, {
480                rotate: -19,
481                y: 352,
482                duration: 2
483              });
484              gsap.to(next2, {
485                rotate: 19,
486                y: 352,
487                duration: 2
488              });
489              gsap.to(active, {
490                rotate: 0,
491                y: 0,
492                duration: 2
493              });
494            }
495          },
496          slideChangeTransitionEnd: function slideChangeTransitionEnd() {
497            var channelURL = $(_this6.slide).find('.swiper-slide-active').data('channel-url');
498            var icon = $(_this6.slide + i).find('.swiper-slide-active').find(_this6.icon);
499            var text = $(_this6.slide + i).find('.swiper-slide-active').find(_this6.text);
500            var link = $(_this6.el).find(_this6.link);
501            link.attr('href', channelURL);
502            gsap.set(text, {
503              y: 30
504            });
505            gsap.set(link, {
506              y: 30
507            });
508            gsap.to(icon, {
509              scale: 1,
510              duration: .3,
511              ease: Back.easeOut.config(1.7)
512            });
513            gsap.to(text, {
514              y: 0,
515              alpha: 1,
516              duration: .3
517            });
518            gsap.to(link, {
519              y: 0,
520              alpha: 1,
521              duration: .3
522            });
523          },
524          autoplayStop: function autoplayStop(el) {
525            $(_this6.prev + i).on('click', function () {
526              el.autoplay.start();
527            });
528            $(_this6.next + i).on('click', function () {
529              el.autoplay.start();
530            });
531          },
532          autoplayStart: function autoplayStart(el) {
533            $(_this6.pic + i).on('click', function () {
534              el.autoplay.stop();
535            });
536          }
537        }
538      };
539      this.slider[i] = new Swiper(this.slide + i, slideOpt);
540    }
541  }, {
542    key: "setting",
543    value: function setting(i, el) {
544      var prev = $(this.slide + i).find('.swiper-slide-prev').find(this.pic);
545      var next = $(this.slide + i).find('.swiper-slide-next').find(this.pic);
546      var prev1 = $(this.slide + i).find('.swiper-slide-prev').prev().find(this.pic);
547      var next1 = $(this.slide + i).find('.swiper-slide-next').next().find(this.pic);
548      var prev2 = $(this.slide + i).find('.swiper-slide-prev').prev().prev().find(this.pic);
549      var next2 = $(this.slide + i).find('.swiper-slide-next').next().next().find(this.pic);
550      var active = $(this.slide + i).find('.swiper-slide-active').find(this.pic);
551      if (isMobile()) {
552        gsap.set(prev, {
553          rotate: -6,
554          y: 16
555        });
556        gsap.set(next, {
557          rotate: 6,
558          y: 16
559        });
560        gsap.set(prev1, {
561          rotate: -10,
562          y: 60
563        });
564        gsap.set(next1, {
565          rotate: 10,
566          y: 60
567        });
568        gsap.set(prev2, {
569          rotate: -14,
570          y: 126
571        });
572        gsap.set(next2, {
573          rotate: 14,
574          y: 126
575        });
576        gsap.set(active, {
577          rotate: 0,
578          y: 0
579        });
580      } else {
581        gsap.set(prev, {
582          rotate: -6,
583          y: 35
584        });
585        gsap.set(next, {
586          rotate: 6,
587          y: 35
588        });
589        gsap.set(prev1, {
590          rotate: -12,
591          y: 148
592        });
593        gsap.set(next1, {
594          rotate: 12,
595          y: 148
596        });
597        gsap.set(prev2, {
598          rotate: -19,
599          y: 352
600        });
601        gsap.set(next2, {
602          rotate: 19,
603          y: 352
604        });
605        gsap.set(active, {
606          rotate: 0,
607          y: 0
608        });
609      }
610    }
611  }]);
612  return SliderRotateCarousel;
613}();
614var SliderSyncCarousel = /*#__PURE__*/function () {
615  function SliderSyncCarousel(el, opt) {
616    _classCallCheck(this, SliderSyncCarousel);
617    this["class"] = el;
618    this.opt = opt;
619    this.el = '.' + this["class"];
620    this.first = this.el + '-first';
621    this.second = this.el + '-second';
622    this.third = this.el + '-third';
623    this.text = this.el + '-text';
624    this.textItem = this.el + '-textItem';
625    this.next = this.el + '-next';
626    this.prev = this.el + '-prev';
627    this.pagination = this.el + '-pagination';
628    this.resourceLength = 0;
629    this.flag = true;
630    this.sliderSecond = new Array();
631    this.sliderThird = new Array();
632    this.sliderText = new Array();
633    this.slider = new Array();
634    if ($(this.el).length) {
635      this.slideNumb();
636    }
637  }
638  _createClass(SliderSyncCarousel, [{
639    key: "slideNumb",
640    value: function slideNumb() {
641      var _this7 = this;
642      $(this.el).each(function (i, el) {
643        $(el).addClass(_this7["class"] + i);
644        $(el).find(_this7.first).addClass(_this7["class"] + '-first' + i);
645        $(el).find(_this7.second).addClass(_this7["class"] + '-second' + i);
646        $(el).find(_this7.prev).addClass(_this7["class"] + '-prev' + i);
647        $(el).find(_this7.next).addClass(_this7["class"] + '-next' + i);
648        $(el).find(_this7.pagination).addClass(_this7["class"] + '-pagination' + i);
649        if ($(el).find(_this7.third).length) {
650          $(el).find(_this7.third).addClass(_this7["class"] + '-third' + i);
651        }
652        if ($(el).find(_this7.text).length) {
653          $(el).find(_this7.text).addClass(_this7["class"] + '-text' + i);
654        }
655        if ($(el).data('for') === 'large' && isMobile()) {
656          $(el).remove();
657          return;
658        }
659        if ($(el).data('for') === 'mobile' && !isMobile()) {
660          $(el).remove();
661          return;
662        }
663        _this7.event(i, el);
664      });
665    }
666  }, {
667    key: "event",
668    value: function event(i, el) {
669      var _this8 = this;
670      var length = $(this.first + i).find('.swiper-slide').length;
671      var slideOptSecond = {
672        loop: length > 1 ? true : false,
673        slidesPerView: 1,
674        watchSlidesVisibility: true,
675        watchSlidesProgress: true,
676        navigation: {
677          prevEl: isMobile() ? this.prev + i : '',
678          nextEl: isMobile() ? this.next + i : ''
679        },
680        pagination: {
681          el: isMobile() ? this.pagination + i : '',
682          type: 'bullets',
683          clickable: true
684        },
685        on: {
686          init: function init() {
687            if (!isMobile()) return;
688            $(_this8.el).find('.swiper-pagination-bullet').each(function (i, el) {
689              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
690            });
691          },
692          beforeTransitionStart: function beforeTransitionStart() {
693            if (!isMobile()) return;
694            if ($(_this8.text + i).length) {
695              var text = $(_this8.text + i).find(_this8.textItem);
696              gsap.to(text, {
697                alpha: 0,
698                duration: .2
699              });
700            }
701          },
702          slideChangeTransitionEnd: function slideChangeTransitionEnd() {
703            if (!isMobile()) return;
704            if ($(_this8.text + i).length) {
705              var text = $(_this8.text + i).find('.swiper-slide-active').find(_this8.textItem);
706              gsap.set(text, {
707                y: 30
708              });
709              gsap.to(text, {
710                y: 0,
711                alpha: 1,
712                duration: .3
713              });
714            }
715          }
716        }
717      };
718      if (isMobile()) {
719        slideOptSecond.speed = 700;
720        slideOptSecond.autoplay = {
721          delay: 5000,
722          disableOnInteraction: false
723        };
724      }
725      ;
726      var slideOptText = {
727        effect: 'fade',
728        loop: true,
729        slidesPerView: 1,
730        watchSlidesVisibility: true,
731        watchSlidesProgress: true
732      };
733      // pcの時は先にスライダーを生成
734      if (!isMobile()) {
735        this.slider[i] = new Swiper(this.first + i, slideOptSecond);
736      }
737      // console.log(this.text + i,'abbb')
738      var slidelist = [];
739      if ($(this.third + i).length && $(this.text + i).length) {
740        this.sliderThird[i] = new Swiper(this.third + i, slideOptSecond);
741        this.sliderText[i] = new Swiper(this.text + i, slideOptText);
742        slidelist = [this.slider[i], this.sliderThird[i], this.sliderText[i]];
743      } else if (isMobile() && $(this.text + i).length) {
744        this.sliderText[i] = new Swiper(this.text + i, slideOptText);
745        slidelist = [this.slider[i], this.sliderText[i]];
746      } else {
747        slidelist.push(this.slider[i]);
748      }
749
750      // スマホの時は後からスライダーを生成
751      if (isMobile()) {
752        slideOptSecond.controller = {
753          by: 'container',
754          control: slidelist
755        };
756        this.slider[i] = new Swiper(this.first + i, slideOptSecond);
757        if ($(this.text + i).length) {
758          var text = $(this.text + i).find(this.textItem);
759          gsap.to(text, {
760            alpha: 0,
761            duration: 0
762          });
763        }
764      }
765      var slideOptMain = {
766        autoplay: {
767          delay: 5000,
768          disableOnInteraction: false
769        },
770        loop: length > 1 ? true : false,
771        speed: 700,
772        spaceBetween: 0,
773        centeredSlides: true,
774        slidesPerView: 1,
775        navigation: {
776          prevEl: !isMobile() ? this.prev + i : '',
777          nextEl: !isMobile() ? this.next + i : ''
778        },
779        pagination: {
780          el: !isMobile() ? this.pagination + i : '',
781          type: 'bullets',
782          clickable: true
783        },
784        watchSlidesVisibility: true,
785        watchSlidesProgress: true,
786        controller: {
787          control: slidelist,
788          // ここに1つ目と2つ目のスライダーの変数名
789          by: 'container'
790        },
791        on: {
792          init: function init() {
793            if (isMobile()) return;
794            $(_this8.el).find('.swiper-pagination-bullet').each(function (i, el) {
795              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
796            });
797          },
798          beforeTransitionStart: function beforeTransitionStart() {
799            if (isMobile()) return;
800            if ($(_this8.text + i).length) {
801              var _text2 = $(_this8.text + i).find(_this8.textItem);
802              gsap.to(_text2, {
803                alpha: 0,
804                duration: .2
805              });
806            }
807          },
808          slideChangeTransitionEnd: function slideChangeTransitionEnd() {
809            if (isMobile()) return;
810            if ($(_this8.text + i).length) {
811              var _text3 = $(_this8.text + i).find('.swiper-slide-active').find(_this8.textItem);
812              gsap.set(_text3, {
813                y: 30
814              });
815              gsap.to(_text3, {
816                y: 0,
817                alpha: 1,
818                duration: .3
819              });
820            }
821          }
822        }
823      };
824      if (isMobile()) {
825        slideOptMain.controller = {};
826      }
827      this.sliderSecond[i] = new Swiper(this.second + i, slideOptMain);
828      var fixSlide = function fixSlide() {
829        $(_this8.prev + i).hide();
830        $(_this8.next + i).hide();
831        $(_this8.pagination + i).hide();
832        _this8.sliderSecond[i].autoplay.stop();
833        _this8.slider[i].autoplay.stop();
834      };
835      var _swiper = this.slider[i];
836      var len = _swiper.slides.length - (_swiper.loopedSlides || 0) * 2;
837      if ($(this.third + i).length == 0) {
838        if (len == 2 && !isMobile()) {
839          // PCかつ2枚のとき
840          fixSlide();
841        }
842        if (len >= 2 && isMobile()) {
843          $(this.second + i).removeClass('swiper-no-swiping');
844        } else if (len == 1 && !isMobile()) {
845          // PCかつ1枚のとき
846          fixSlide();
847          $(this.second + i).hide();
848          $(el).addClass('-center');
849        } else if (len == 1 && isMobile()) {
850          fixSlide();
851        }
852      }
853      if ($(this.third + i).length == 1 && isMobile()) {
854        $(this.second + i).removeClass('swiper-no-swiping');
855      }
856    }
857  }]);
858  return SliderSyncCarousel;
859}();
860var SliderWindowCarousel = /*#__PURE__*/function () {
861  function SliderWindowCarousel(el, opt) {
862    _classCallCheck(this, SliderWindowCarousel);
863    this["class"] = el;
864    this.opt = opt;
865    this.el = '.' + this["class"];
866    this.pic = this.el + '-pic';
867    this.next = this.el + '-next';
868    this.prev = this.el + '-prev';
869    this.pagination = this.el + '-pagination';
870    this.slider = new Array();
871    if ($(this.el).length) {
872      this.init();
873    }
874  }
875  _createClass(SliderWindowCarousel, [{
876    key: "init",
877    value: function init() {
878      var _this9 = this;
879      $(this.el).each(function (i, el) {
880        $(el).addClass(_this9["class"] + i);
881        $(el).siblings(_this9.prev).addClass(_this9["class"] + '-prev' + i);
882        $(el).siblings(_this9.next).addClass(_this9["class"] + '-next' + i);
883        $(el).siblings(_this9.pagination).addClass(_this9["class"] + '-pagination' + i);
884        _this9.event(i, el);
885      });
886    }
887  }, {
888    key: "event",
889    value: function event(i, el) {
890      var _this10 = this;
891      var slideOpt = {
892        autoplay: {
893          delay: 5000
894        },
895        loop: true,
896        speed: 700,
897        spaceBetween: 50,
898        slidesPerView: 4,
899        navigation: {
900          prevEl: this.prev + i,
901          nextEl: this.next + i
902        },
903        watchSlidesVisibility: true,
904        watchSlidesProgress: true,
905        on: {
906          init: function init() {
907            _this10.setting(i, el);
908          },
909          loopFix: function loopFix() {
910            _this10.setting(i, el);
911          },
912          slideChangeTransitionStart: function slideChangeTransitionStart() {
913            var active = $(_this10.el + i).find('.swiper-slide-active').find(_this10.pic);
914            var next = $(_this10.el + i).find('.swiper-slide-next').find(_this10.pic);
915            var visible1 = $(_this10.el + i).find('.swiper-slide-visible').eq(2).find(_this10.pic);
916            var visible2 = $(_this10.el + i).find('.swiper-slide-visible').eq(3).find(_this10.pic);
917            if (!isMobile()) {
918              gsap.to(active, {
919                y: 0,
920                duration: 2
921              });
922              gsap.to(next, {
923                y: -20,
924                duration: 2
925              });
926              gsap.to(visible1, {
927                y: -20,
928                duration: 2
929              });
930              gsap.to(visible2, {
931                y: 0,
932                duration: 2
933              });
934            }
935          }
936        }
937      };
938      this.slider[i] = new Swiper(this.el + i, slideOpt);
939      var _isMobile = isMobile();
940      if (_isMobile) {
941        this.slider[i].destroy(true, true);
942      }
943      ;
944      $(window).on('resize', function () {
945        if (isMobile() !== _isMobile) {
946          if (isMobile()) {
947            _this10.slider[i].destroy(true, true);
948            $(_this10.el).find(_this10.pic).each(function (i, el) {
949              $(el).removeAttr('style');
950            });
951          } else {
952            _this10.slider[i] = new Swiper(_this10.el + i, slideOpt);
953          }
954          _isMobile = isMobile();
955        }
956      });
957    }
958  }, {
959    key: "setting",
960    value: function setting(i, el) {
961      var active = $(this.el + i).find('.swiper-slide-active').find(this.pic);
962      var next = $(this.el + i).find('.swiper-slide-next').find(this.pic);
963      var visible1 = $(this.el + i).find('.swiper-slide-visible').eq(2).find(this.pic);
964      var visible2 = $(this.el + i).find('.swiper-slide-visible').eq(3).find(this.pic);
965      if (!isMobile()) {
966        gsap.set(active, {
967          y: 0
968        });
969        gsap.set(next, {
970          y: -20
971        });
972        gsap.set(visible1, {
973          y: -20
974        });
975        gsap.set(visible2, {
976          y: 0
977        });
978      }
979    }
980  }]);
981  return SliderWindowCarousel;
982}();
983var SliderFocusCarousel = /*#__PURE__*/function () {
984  function SliderFocusCarousel(el, opt) {
985    _classCallCheck(this, SliderFocusCarousel);
986    this["class"] = el;
987    this.opt = opt;
988    this.el = '.' + this["class"];
989    this.back = this.el + '-back';
990    this.front = this.el + '-front';
991    this.bg = this.el + '-bg';
992    this.pic = this.el + '-pic';
993    this.text = this.el + '-text';
994    this.sliderBack = new Array();
995    this.sliderFront = new Array();
996    if ($(this.el).length) {
997      this.setName();
998    }
999  }
1000  _createClass(SliderFocusCarousel, [{
1001    key: "setName",
1002    value: function setName() {
1003      var _this11 = this;
1004      $(this.el).each(function (i, el) {
1005        $(el).addClass(_this11["class"] + i);
1006        $(el).find(_this11.back).addClass(_this11["class"] + '-back' + i);
1007        $(el).find(_this11.front).addClass(_this11["class"] + '-front' + i);
1008        $(el).find(_this11.bg).addClass(_this11["class"] + '-bg' + i);
1009        _this11.event(i, el);
1010      });
1011    }
1012  }, {
1013    key: "event",
1014    value: function event(i, el) {
1015      var _this12 = this;
1016      var slideOptMain = {
1017        effect: 'fade',
1018        fadeEffect: {
1019          crossFade: false
1020        },
1021        loop: true,
1022        loopedSlides: 18,
1023        spaceBetween: 0,
1024        slidesPerView: 1,
1025        watchSlidesVisibility: true,
1026        watchSlidesProgress: true
1027      };
1028      this.sliderFront[i] = new Swiper(this.front + i, slideOptMain);
1029      var slideOptSecond = {
1030        autoplay: {
1031          delay: 6000
1032        },
1033        loop: true,
1034        loopedSlides: 18,
1035        speed: 700,
1036        spaceBetween: 100,
1037        centeredSlides: true,
1038        slidesPerView: 11,
1039        watchSlidesVisibility: true,
1040        watchSlidesProgress: true,
1041        controller: {
1042          control: this.sliderFront[i],
1043          by: 'container'
1044        },
1045        on: {
1046          init: function init() {
1047            _this12.setting(i, el);
1048          },
1049          loopFix: function loopFix() {
1050            _this12.setting(i, el);
1051          },
1052          beforeTransitionStart: function beforeTransitionStart() {},
1053          slideChangeTransitionStart: function slideChangeTransitionStart() {
1054            var visible = new Array();
1055            var item = $(_this12.back + i).find('.swiper-slide-visible');
1056            for (var numb = 0; numb < item.length; numb++) {
1057              visible[numb] = item.eq(numb).find(_this12.pic);
1058            }
1059            var active = $(_this12.back + i).find('.swiper-slide-active').find(_this12.pic);
1060            var pic = $(_this12.front + i).find('.swiper-slide-active').find(_this12.pic);
1061            var text = $(_this12.front + i).find('.swiper-slide-active').find(_this12.text);
1062            gsap.to(visible[0], {
1063              y: 300,
1064              duration: 1
1065            });
1066            gsap.to(visible[1], {
1067              y: 160,
1068              duration: 1
1069            });
1070            gsap.to(visible[2], {
1071              y: 70,
1072              duration: 1
1073            });
1074            gsap.to(visible[3], {
1075              y: 25,
1076              duration: 1
1077            });
1078            gsap.to(visible[4], {
1079              y: 0,
1080              duration: 1
1081            });
1082            gsap.to(active, {
1083              y: 0,
1084              duration: 1
1085            });
1086            gsap.to(visible[6], {
1087              y: 0,
1088              duration: 1
1089            });
1090            gsap.to(visible[7], {
1091              y: 25,
1092              duration: 1
1093            });
1094            gsap.to(visible[8], {
1095              y: 70,
1096              duration: 1
1097            });
1098            gsap.to(visible[9], {
1099              y: 160,
1100              duration: 1
1101            });
1102            gsap.to(visible[10], {
1103              y: 300,
1104              duration: 1
1105            });
1106            gsap.to(pic, {
1107              scale: 1,
1108              duration: .5,
1109              delay: 1,
1110              onComplete: function onComplete() {
1111                gsap.to(text, {
1112                  alpha: 1,
1113                  duration: .3
1114                });
1115              }
1116            });
1117          },
1118          slideChangeTransitionEnd: function slideChangeTransitionEnd(e) {
1119            var svg = $(_this12.front + i).find('.swiper-slide-active').find(_this12.bg + i);
1120            var pic = $(_this12.front + i).find('.swiper-slide-active').find(_this12.pic);
1121            var text = $(_this12.front + i).find(_this12.text);
1122            gsap.set(svg, {
1123              strokeDashoffset: 200 * 3.14
1124            });
1125            var tl = gsap.timeline();
1126            tl.to(svg, {
1127              strokeDashoffset: 0,
1128              duration: 4,
1129              delay: .5,
1130              onComplete: function onComplete() {
1131                gsap.to(text, {
1132                  alpha: 0,
1133                  duration: .5
1134                });
1135              }
1136            });
1137            tl.to(svg, {
1138              strokeDashoffset: 200 * 3.14 * -1,
1139              duration: 1
1140            });
1141            tl.to(pic, {
1142              scale: 0,
1143              duration: .5
1144            });
1145          }
1146        }
1147      };
1148      this.sliderBack[i] = new Swiper(this.back + i, slideOptSecond);
1149    }
1150  }, {
1151    key: "setting",
1152    value: function setting(i, el) {
1153      var visible = new Array();
1154      var item = $(this.back + i).find('.swiper-slide-visible');
1155      for (var numb = 0; numb < item.length; numb++) {
1156        visible[numb] = item.eq(numb).find(this.pic);
1157      }
1158      var active = $(this.back + i).find('.swiper-slide-active').find(this.pic);
1159      var pic = $(this.front + i).find('.swiper-slide-next').find(this.pic);
1160      var text = $(this.front + i).find(this.text);
1161      gsap.set(visible[0], {
1162        y: 300
1163      });
1164      gsap.set(visible[1], {
1165        y: 160
1166      });
1167      gsap.set(visible[2], {
1168        y: 70
1169      });
1170      gsap.set(visible[3], {
1171        y: 25
1172      });
1173      gsap.set(visible[4], {
1174        y: 0
1175      });
1176      gsap.set(active, {
1177        y: 0
1178      });
1179      gsap.set(visible[6], {
1180        y: 0
1181      });
1182      gsap.set(visible[7], {
1183        y: 25
1184      });
1185      gsap.set(visible[8], {
1186        y: 70
1187      });
1188      gsap.set(visible[9], {
1189        y: 160
1190      });
1191      gsap.set(visible[10], {
1192        y: 300
1193      });
1194      gsap.set(pic, {
1195        scale: 0
1196      });
1197      gsap.set(text, {
1198        alpha: 0
1199      });
1200    }
1201  }]);
1202  return SliderFocusCarousel;
1203}();
1204var SliderCharacterFrame = /*#__PURE__*/function () {
1205  function SliderCharacterFrame() {
1206    _classCallCheck(this, SliderCharacterFrame);
1207    this.el = document.getElementById('js-sliderCharacterFrame');
1208    if (this.el) this.init();
1209  }
1210  _createClass(SliderCharacterFrame, [{
1211    key: "init",
1212    value: function init() {
1213      var _this13 = this;
1214      this.$sliderEl = $(this.el).find('.swiper')[0];
1215      this.slider = new Swiper(this.$sliderEl, {
1216        slidesPerView: "auto",
1217        spaceBetween: 12,
1218        preloadImages: false,
1219        speed: 700,
1220        lazy: {
1221          loadPrevNext: true,
1222          loadPrevNextAmount: 3
1223        },
1224        watchSlidesProgress: true,
1225        on: {
1226          lazyImageReady: function lazyImageReady(swiper) {
1227            setTimeout(function () {
1228              swiper.update();
1229            }, 100);
1230          },
1231          afterInit: function afterInit(swiper) {
1232            var perDelay = 250;
1233            gsap.to(_this13.$sliderEl, {
1234              opacity: 1,
1235              duration: 1,
1236              ease: Power4.easeOut
1237            });
1238            var _loop = function _loop(i) {
1239              setTimeout(function () {
1240                swiper.lazy.loadInSlide(i);
1241              }, perDelay * i);
1242            };
1243            for (var i = 0; i < swiper.slides.length; i++) {
1244              _loop(i);
1245            }
1246          }
1247        },
1248        breakpoints: {
1249          769: {
1250            spaceBetween: 18
1251          }
1252        }
1253      });
1254    }
1255  }]);
1256  return SliderCharacterFrame;
1257}();
1258var SliderCharacterlist = /*#__PURE__*/function () {
1259  function SliderCharacterlist() {
1260    var _this14 = this;
1261    _classCallCheck(this, SliderCharacterlist);
1262    this.el = document.getElementById('js-sliderCharacterList');
1263    if (this.el) {
1264      var isCurrentMonthFromJson = $(this.el).data('type') === 'currentMonthFromJson';
1265      if (isCurrentMonthFromJson) {
1266        _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1267          var res, currentMonth, a;
1268          return _regeneratorRuntime().wrap(function _callee$(_context) {
1269            while (1) switch (_context.prev = _context.next) {
1270              case 0:
1271                _context.next = 2;
1272                return _this14.getBirthCharaList();
1273              case 2:
1274                res = _context.sent;
1275                currentMonth = new Date().getMonth() + 1;
1276                _context.next = 6;
1277                return _this14.featchBirthCharaList(res[currentMonth]);
1278              case 6:
1279                a = _context.sent;
1280                setTimeout(function () {
1281                  _this14.init();
1282                }, 10);
1283              case 8:
1284              case "end":
1285                return _context.stop();
1286            }
1287          }, _callee);
1288        }))();
1289      } else {
1290        this.init();
1291      }
1292    }
1293    ;
1294  }
1295  _createClass(SliderCharacterlist, [{
1296    key: "init",
1297    value: function init() {
1298      var _this15 = this;
1299      this.el = document.getElementById('js-sliderCharacterList');
1300      this.$sliderEl = $(this.el).find('.swiper')[0];
1301      this.$prevBtn = $(this.el).find('.swiper-button-prev')[0];
1302      this.$nextBtn = $(this.el).find('.swiper-button-next')[0];
1303      this.$pagination = $(this.el).find('.swiper-pagination')[0];
1304      var slides = $(this.el).find('.swiper-slide');
1305      var minLength = isMobile() ? 3 : 5;
1306      var loopSta = true;
1307      if (slides.length <= minLength) {
1308        $(this.el).find('.swiper-wrapper').addClass('-none-slide');
1309        loopSta = false;
1310      }
1311      this.slider = new Swiper(this.$sliderEl, {
1312        loop: loopSta,
1313        slidesPerView: 3,
1314        spaceBetween: 15,
1315        watchSlidesProgress: true,
1316        speed: 700,
1317        autoplay: {
1318          delay: 5000,
1319          disableOnInteraction: false
1320        },
1321        breakpoints: {
1322          769: {
1323            loop: loopSta,
1324            slidesPerView: 5,
1325            spaceBetween: 18
1326          }
1327        },
1328        navigation: {
1329          prevEl: this.$prevBtn,
1330          nextEl: this.$nextBtn
1331        },
1332        pagination: {
1333          el: this.$pagination,
1334          type: 'bullets',
1335          clickable: true
1336        },
1337        on: {
1338          init: function init() {
1339            $(_this15.el).find('.swiper-pagination-bullet').each(function (i, el) {
1340              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
1341            });
1342          }
1343        }
1344      });
1345    }
1346  }, {
1347    key: "getBirthCharaList",
1348    value: function () {
1349      var _getBirthCharaList2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1350        var birthdaylist;
1351        return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1352          while (1) switch (_context2.prev = _context2.next) {
1353            case 0:
1354              _context2.next = 2;
1355              return _getBirthCharaList();
1356            case 2:
1357              birthdaylist = _context2.sent;
1358              return _context2.abrupt("return", birthdaylist);
1359            case 4:
1360            case "end":
1361              return _context2.stop();
1362          }
1363        }, _callee2);
1364      }));
1365      function getBirthCharaList() {
1366        return _getBirthCharaList2.apply(this, arguments);
1367      }
1368      return getBirthCharaList;
1369    }()
1370  }, {
1371    key: "featchBirthCharaList",
1372    value: function featchBirthCharaList(_list) {
1373      var _this16 = this;
1374      return new Promise(function (resolve, reject) {
1375        var list = Util.shuffleArray(_list);
1376        var app = new Vue({
1377          el: _this16.el,
1378          data: {
1379            list: list
1380          },
1381          created: function created() {
1382            setTimeout(function () {
1383              resolve();
1384            }, 500);
1385          }
1386        });
1387      });
1388    }
1389  }, {
1390    key: "destroy",
1391    value: function destroy() {
1392      if (this.slider) this.slider.destroy();
1393    }
1394  }]);
1395  return SliderCharacterlist;
1396}();
1397var SliderCharacterlist2 = /*#__PURE__*/function () {
1398  function SliderCharacterlist2() {
1399    var _this17 = this;
1400    _classCallCheck(this, SliderCharacterlist2);
1401    this.el = document.getElementById('js-sliderCharacterList2');
1402    if (this.el) {
1403      var isCurrentMonthFromJson = $(this.el).data('type') === 'currentMonthFromJson';
1404      if (isCurrentMonthFromJson) {
1405        _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1406          var res, currentMonth, a;
1407          return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1408            while (1) switch (_context3.prev = _context3.next) {
1409              case 0:
1410                _context3.next = 2;
1411                return _this17.getBirthCharaList();
1412              case 2:
1413                res = _context3.sent;
1414                currentMonth = new Date().getMonth() + 1;
1415                _context3.next = 6;
1416                return _this17.featchBirthCharaList(res[currentMonth]);
1417              case 6:
1418                a = _context3.sent;
1419                setTimeout(function () {
1420                  _this17.init();
1421                }, 10);
1422              case 8:
1423              case "end":
1424                return _context3.stop();
1425            }
1426          }, _callee3);
1427        }))();
1428      } else {
1429        this.init();
1430      }
1431    }
1432    ;
1433  }
1434  _createClass(SliderCharacterlist2, [{
1435    key: "init",
1436    value: function init() {
1437      var _this18 = this;
1438      this.el = document.getElementById('js-sliderCharacterList2');
1439      this.$sliderEl = $(this.el).find('.swiper')[0];
1440      this.$prevBtn = $(this.el).find('.swiper-button-prev')[0];
1441      this.$nextBtn = $(this.el).find('.swiper-button-next')[0];
1442      this.$pagination = $(this.el).find('.swiper-pagination')[0];
1443      var slides = $(this.el).find('.swiper-slide');
1444      var minLength = isMobile() ? 3 : 5;
1445      var loopSta = true;
1446      if (slides.length <= minLength) {
1447        $(this.el).find('.swiper-wrapper').addClass('-none-slide');
1448        loopSta = false;
1449      } else {
1450        $(this.el).find('.swiper-wrapper').removeClass('-none-slide');
1451        $(this.$prevBtn).removeClass('swiper-button-lock');
1452        $(this.$nextBtn).removeClass('swiper-button-lock');
1453      }
1454      this.slider = new Swiper(this.$sliderEl, {
1455        loop: loopSta,
1456        slidesPerView: 3,
1457        spaceBetween: 15,
1458        watchSlidesProgress: true,
1459        speed: 700,
1460        autoplay: {
1461          delay: 5000,
1462          disableOnInteraction: false
1463        },
1464        breakpoints: {
1465          769: {
1466            loop: loopSta,
1467            slidesPerView: 5,
1468            spaceBetween: 18
1469          }
1470        },
1471        navigation: {
1472          prevEl: this.$prevBtn,
1473          nextEl: this.$nextBtn
1474        },
1475        pagination: {
1476          el: this.$pagination,
1477          type: 'bullets',
1478          clickable: true
1479        },
1480        on: {
1481          init: function init() {
1482            $(_this18.el).find('.swiper-pagination-bullet').each(function (i, el) {
1483              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
1484            });
1485          }
1486        }
1487      });
1488    }
1489  }, {
1490    key: "getBirthCharaList",
1491    value: function () {
1492      var _getBirthCharaList3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
1493        var birthdaylist;
1494        return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1495          while (1) switch (_context4.prev = _context4.next) {
1496            case 0:
1497              _context4.next = 2;
1498              return _getBirthCharaList();
1499            case 2:
1500              birthdaylist = _context4.sent;
1501              return _context4.abrupt("return", birthdaylist);
1502            case 4:
1503            case "end":
1504              return _context4.stop();
1505          }
1506        }, _callee4);
1507      }));
1508      function getBirthCharaList() {
1509        return _getBirthCharaList3.apply(this, arguments);
1510      }
1511      return getBirthCharaList;
1512    }()
1513  }, {
1514    key: "featchBirthCharaList",
1515    value: function featchBirthCharaList(_list) {
1516      var _this19 = this;
1517      return new Promise(function (resolve, reject) {
1518        // 誕生日順に並べる
1519        var list = _list.filter(function (item) {
1520          return item.birthday;
1521        }).sort(function (a, b) {
1522          var dayA = Number(a.birthday.split('-')[1]);
1523          var dayB = Number(b.birthday.split('-')[1]);
1524          return dayA - dayB;
1525        });
1526        var app = new Vue({
1527          el: _this19.el,
1528          data: {
1529            list: list
1530          },
1531          created: function created() {
1532            setTimeout(function () {
1533              resolve();
1534            }, 500);
1535          }
1536        });
1537      });
1538    }
1539  }, {
1540    key: "refresh",
1541    value: function refresh() {
1542      var _this20 = this;
1543      this.slider.destroy();
1544      this.slider = null;
1545      setTimeout(function () {
1546        _this20.init();
1547      }, 1000);
1548    }
1549  }, {
1550    key: "destroy",
1551    value: function destroy() {
1552      if (this.slider) this.slider.destroy();
1553    }
1554  }]);
1555  return SliderCharacterlist2;
1556}();
1557var SliderMovie = /*#__PURE__*/function () {
1558  function SliderMovie() {
1559    _classCallCheck(this, SliderMovie);
1560    this.target = 'js-slidermovie';
1561    this.$el = $('.js-slidermovie');
1562    this.sliders = [];
1563    if (this.$el.length > 0) {
1564      this.init();
1565    }
1566  }
1567  _createClass(SliderMovie, [{
1568    key: "init",
1569    value: function init() {
1570      var _this21 = this;
1571      this.$el.each(function (i, el) {
1572        _this21.activeSlider(el);
1573      });
1574    }
1575  }, {
1576    key: "activeSlider",
1577    value: function activeSlider(el) {
1578      var $el = $(el);
1579      var slideEl = $el.find('.swiper')[0];
1580      var prevBtn = $el.find(".".concat(this.target, "-prev"))[0];
1581      var nextBtn = $el.find(".".concat(this.target, "-next"))[0];
1582      var pagination = $el.find(".".concat(this.target, "-pagination"))[0];
1583      var slides = $el.find('.swiper-slide');
1584      var minLength = isMobile() ? 1 : 1;
1585      if (slides.length <= minLength) {
1586        $el.find('.swiper-wrapper').addClass('-none-slide');
1587      }
1588      var slide = new Swiper(slideEl, {
1589        speed: 700,
1590        loop: slides.length > minLength,
1591        spaceBetween: 100,
1592        slidesPerView: 2.6,
1593        centeredSlides: true,
1594        watchSlidesProgress: true,
1595        breakpoints: {
1596          200: {
1597            slidesPerView: 1.2,
1598            spaceBetween: 15
1599          },
1600          769: {
1601            slidesPerView: 'auto',
1602            spaceBetween: 100
1603          }
1604        },
1605        autoplay: {
1606          delay: 5000,
1607          disableOnInteraction: false
1608        },
1609        navigation: {
1610          nextEl: nextBtn,
1611          prevEl: prevBtn
1612        },
1613        pagination: {
1614          el: pagination,
1615          type: 'bullets',
1616          clickable: true
1617        },
1618        on: {
1619          init: function init() {
1620            $el.find('.swiper-pagination-bullet').each(function (i, el) {
1621              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
1622            });
1623          },
1624          beforeTransitionStart: function beforeTransitionStart() {
1625            var prev = gsap.utils.toArray($el.find('.swiper-slide-prev .js-slideRotateCarousel-text'));
1626            var next = gsap.utils.toArray($el.find('.swiper-slide-next .js-slideRotateCarousel-text'));
1627            gsap.to([].concat(_toConsumableArray(next), _toConsumableArray(prev)), {
1628              alpha: 0,
1629              duration: 0.1,
1630              y: 10
1631            });
1632          },
1633          slideChangeTransitionEnd: function slideChangeTransitionEnd() {
1634            var current = gsap.utils.toArray($el.find('.swiper-slide-active .js-slideRotateCarousel-text'));
1635            gsap.to(current, _defineProperty({
1636              y: 0,
1637              alpha: 1,
1638              duration: 0.2
1639            }, "y", 0));
1640          }
1641        }
1642      });
1643
1644      // this.sliders.push()
1645    }
1646  }]);
1647  return SliderMovie;
1648}(); // Move appSearchGift.js for Vue
1649// class SliderGift {
1650//   constructor() {
1651//     this.targets  = document.querySelectorAll('.js-sliderGift');
1652//     this.handler  = [];
1653//     if ( this.targets.length !== 0 ) this.init();
1654//   }
1655//   init() {
1656//     this.targets.forEach( (item, index) => {
1657//       let pnel = item.parentNode.nextElementSibling;
1658//       this.handler[index] = new Swiper(item, {
1659//         threshold: 20,
1660//         loop: true,
1661//         speed: 750,
1662//         pagination: {
1663//           el: pnel,
1664//           clickable: true
1665//         }
1666//       });
1667//     });
1668//   }
1669// }
1670var SliderGuide = /*#__PURE__*/function () {
1671  function SliderGuide() {
1672    _classCallCheck(this, SliderGuide);
1673    this.gTargets = document.querySelectorAll('.js-sliderGuideGallery');
1674    this.gHandler = [];
1675    if (this.gTargets.length !== 0) this.gallery();
1676    this.fTargets = document.querySelectorAll('.js-sliderGuideFlow');
1677    this.fHandler = [];
1678    if (this.fTargets.length !== 0) this.flow();
1679  }
1680  _createClass(SliderGuide, [{
1681    key: "gallery",
1682    value: function gallery() {
1683      var _this22 = this;
1684      this.gTargets.forEach(function (item, index) {
1685        var pnel = item.nextElementSibling,
1686          prev = pnel.nextElementSibling,
1687          next = prev.nextElementSibling,
1688          slide = item.querySelectorAll('.swiper-slide');
1689        if (slide.length > 1) {
1690          _this22.gHandler[index] = new Swiper(item, {
1691            loop: false,
1692            speed: 750,
1693            pagination: {
1694              el: pnel,
1695              clickable: true
1696            },
1697            navigation: {
1698              nextEl: next,
1699              prevEl: prev
1700            }
1701          });
1702        } else {
1703          item.parentNode.classList.add('-disabled');
1704        }
1705      });
1706    }
1707  }, {
1708    key: "flow",
1709    value: function flow() {
1710      var _this23 = this;
1711      this.fTargets.forEach(function (item, index) {
1712        var swiper = item.querySelector('.swiper');
1713        var slide = item.querySelectorAll('.swiper-slide');
1714        var nextBtn = item.querySelector('.js-sliderGuideFlow-next');
1715        var prevBtn = item.querySelector('.js-sliderGuideFlow-prev');
1716        var active = item.querySelector('.js-sliderGuideFlow-active');
1717        var total = item.querySelector('.js-sliderGuideFlow-total');
1718        _this23.fHandler[index] = new Swiper(swiper, {
1719          loop: false,
1720          speed: 750,
1721          navigation: {
1722            nextEl: nextBtn,
1723            prevEl: prevBtn
1724          },
1725          on: {
1726            init: function init() {
1727              total.textContent = slide.length;
1728            },
1729            slideChangeTransitionStart: function slideChangeTransitionStart(e) {
1730              active.textContent = e.realIndex + 1;
1731            }
1732          }
1733        });
1734      });
1735    }
1736  }]);
1737  return SliderGuide;
1738}();
1739var MoreSection = /*#__PURE__*/function () {
1740  function MoreSection() {
1741    _classCallCheck(this, MoreSection);
1742    this.target = 'js-moresection';
1743    this.$el = $(".".concat(this.target));
1744    if (this.$el.length > 0) this.init();
1745  }
1746  _createClass(MoreSection, [{
1747    key: "init",
1748    value: function init() {
1749      this.event();
1750    }
1751  }, {
1752    key: "event",
1753    value: function event() {
1754      var _this24 = this;
1755      $(".".concat(this.target, "-open")).on('click', function (e) {
1756        var target = $(e.currentTarget).data('target');
1757        if (!target) return;
1758        _this24.open(target);
1759      });
1760      $(".".concat(this.target, "-close")).on('click', function (e) {
1761        var target = $(e.currentTarget).data('target');
1762        if (!target) return;
1763        _this24.close(target);
1764      });
1765    }
1766  }, {
1767    key: "open",
1768    value: function open(target) {
1769      var _target = ".".concat(this.target, "[data-id=\"").concat(target, "\"]");
1770      gsap.set(_target, {
1771        opacity: 0
1772      });
1773      $(_target).slideDown(500, function () {
1774        gsap.to(_target, {
1775          opacity: 1,
1776          duration: .3
1777        });
1778      });
1779      $(_target).addClass('js-is-open');
1780      $(_target).prev().addClass('is-open');
1781      $(".".concat(this.target, "-close[data-target=\"").concat(target, "\"]")).show();
1782      $(".".concat(this.target, "-open[data-target=\"").concat(target, "\"]")).hide();
1783    }
1784  }, {
1785    key: "close",
1786    value: function close(target) {
1787      var _this25 = this;
1788      var _target = ".".concat(this.target, "[data-id=\"").concat(target, "\"]");
1789      gsap.to(_target, {
1790        opacity: 0,
1791        duration: .3,
1792        onComplete: function onComplete() {
1793          $(".".concat(_this25.target, "[data-id=\"").concat(target, "\"]")).slideUp();
1794          $(".".concat(_this25.target, "[data-id=\"").concat(target, "\"]")).removeClass('js-is-open');
1795          $(".".concat(_this25.target, "[data-id=\"").concat(target, "\"]")).prev().removeClass('is-open');
1796          $(".".concat(_this25.target, "-open[data-target=\"").concat(target, "\"]")).show();
1797          $(".".concat(_this25.target, "-close[data-target=\"").concat(target, "\"]")).hide();
1798        }
1799      });
1800    }
1801  }]);
1802  return MoreSection;
1803}();
1804var SliderMobile = /*#__PURE__*/function () {
1805  function SliderMobile() {
1806    _classCallCheck(this, SliderMobile);
1807    this.target = 'js-slidermobile';
1808    this.el = document.getElementsByClassName(this.target);
1809    this._isMobile = isMobile();
1810    this.slides = [];
1811    if (this.el.length > 0) this.init();
1812  }
1813  _createClass(SliderMobile, [{
1814    key: "init",
1815    value: function init() {
1816      this.activesSlides();
1817      this.resizeEvent();
1818    }
1819  }, {
1820    key: "resizeEvent",
1821    value: function resizeEvent() {
1822      var _this26 = this;
1823      if (!isMobile()) {
1824        this.destroySlides();
1825      }
1826      window.addEventListener('resize', function (e) {
1827        var _isMobile = isMobile();
1828        if (_isMobile && !_this26._isMobile) {
1829          _this26.activesSlides();
1830          _this26._isMobile = _isMobile;
1831        } else if (!_isMobile && _this26._isMobile) {
1832          _this26.destroySlides();
1833          _this26._isMobile = _isMobile;
1834        }
1835      });
1836    }
1837  }, {
1838    key: "activesSlides",
1839    value: function activesSlides() {
1840      var _this27 = this;
1841      _toConsumableArray(this.el).forEach(function (el) {
1842        _this27.activeSlide(el);
1843      });
1844    }
1845  }, {
1846    key: "activeSlide",
1847    value: function activeSlide(el) {
1848      var _el = $(el).find('.swiper')[0];
1849      if (!_el) return;
1850      var type = $(el).data('type');
1851      //console.log(type);
1852      var opt = {};
1853      switch (type) {
1854        case 'instagram':
1855          opt = {
1856            slidesPerView: 2,
1857            spaceBetween: 40,
1858            watchSlidesProgress: true,
1859            loop: true,
1860            navigation: {
1861              prevEl: '.swiper-button-prev.-instagram',
1862              nextEl: '.swiper-button-next.-instagram'
1863            },
1864            pagination: {
1865              el: '.swiper-pagination.-instagram',
1866              type: "bullets",
1867              clickable: true
1868            }
1869          };
1870          break;
1871        case 'twitter':
1872          opt = {
1873            slidesPerView: 1,
1874            spaceBetween: 36,
1875            watchSlidesProgress: true,
1876            loop: true,
1877            navigation: {
1878              prevEl: '.swiper-button-prev.-twitter',
1879              nextEl: '.swiper-button-next.-twitter'
1880            },
1881            pagination: {
1882              el: '.swiper-pagination.-twitter',
1883              type: "bullets",
1884              clickable: true
1885            }
1886          };
1887          break;
1888        case 'character-ranking':
1889          opt = {
1890            slidesPerView: 3,
1891            spaceBetween: 28,
1892            watchSlidesProgress: true,
1893            // loop: true,
1894            navigation: {
1895              prevEl: '.p-characterRanking__navigation.-prev',
1896              nextEl: '.p-characterRanking__navigation.-next'
1897            },
1898            pagination: {
1899              el: '.p-characterRanking__pagination',
1900              type: "bullets",
1901              clickable: true
1902            }
1903          };
1904          break;
1905        default:
1906          break;
1907      }
1908      //console.log(opt);
1909      var slider = new Swiper(_el, _objectSpread({}, opt));
1910      this.slides.push(slider);
1911    }
1912  }, {
1913    key: "destroySlides",
1914    value: function destroySlides() {
1915      this.slides.forEach(function (slide) {
1916        slide.destroy(true, true);
1917      });
1918      this.slides = [];
1919    }
1920  }]);
1921  return SliderMobile;
1922}();
1923/**
1924 * Slider.
1925 *
1926 * @export
1927 * @class Slider
1928 */
1929var Slider = /*#__PURE__*/function () {
1930  function Slider(opt) {
1931    _classCallCheck(this, Slider);
1932    this.slider = null;
1933    this.thumbSlider = null;
1934    this.slideContainer = document.getElementById(opt.el);
1935    this.thumbContainer = (opt === null || opt === void 0 ? void 0 : opt.thumb) && document.getElementById(opt === null || opt === void 0 ? void 0 : opt.thumb) || null;
1936    if (this.slider === null && this.slideContainer) {
1937      switch (opt.type) {
1938        case 'tab':
1939          this.slideTab(opt);
1940          break;
1941        case 'search':
1942          this.slideSearch();
1943          break;
1944        case 'column2':
1945          this.slideColumn2();
1946          break;
1947        case 'column3':
1948          this.slideColumn3(opt);
1949          break;
1950        case 'detailGallery':
1951          this.slideDetailGallery(opt);
1952          break;
1953        case 'charColumn5':
1954          this.slideCharColumn5();
1955          break;
1956        case 'onlySP':
1957          this.slideSP(opt);
1958          break;
1959        case 'media':
1960          this.slideMedia(opt);
1961          break;
1962        default:
1963          this.defaultSlide();
1964      }
1965    }
1966  }
1967  _createClass(Slider, [{
1968    key: "slideTab",
1969    value: function slideTab(opt) {
1970      var initialIndex = Number((opt === null || opt === void 0 ? void 0 : opt.index) || 0);
1971      var slideOpt = {
1972        loop: false,
1973        resizeReInit: true,
1974        speed: 700,
1975        watchSlidesVisibility: true,
1976        watchSlidesProgress: true,
1977        slidesPerView: 'auto',
1978        initialSlide: initialIndex,
1979        navigation: {
1980          prevEl: '.c-slide-tab-prev',
1981          nextEl: '.c-slide-tab-next'
1982        },
1983        breakpoints: {
1984          200: {
1985            freeMode: true,
1986            freeModeSticky: true
1987          },
1988          769: {
1989            freeMode: false,
1990            freeModeSticky: false
1991          }
1992        }
1993      };
1994      this.slider = new Swiper(this.slideContainer, slideOpt);
1995    }
1996  }, {
1997    key: "slideSearch",
1998    value: function slideSearch() {
1999      var _this28 = this;
2000      this.$scrollbar = $(this.slideContainer).siblings('.c-slide-search-scrollbar')[0];
2001      this.$prevBtn = $(this.slideContainer).siblings('.c-slide-search-prev')[0];
2002      this.$nextBtn = $(this.slideContainer).siblings('.c-slide-search-next')[0];
2003      var slideOpt = {
2004        loop: false,
2005        resizeReInit: true,
2006        speed: 700,
2007        watchSlidesVisibility: true,
2008        watchSlidesProgress: true,
2009        slidesPerView: 'auto',
2010        // freeMode: true,
2011        // freeModeSticky: true,
2012        navigation: {
2013          prevEl: this.$prevBtn,
2014          nextEl: this.$nextBtn
2015        },
2016        scrollbar: {
2017          el: this.$scrollbar,
2018          hide: false,
2019          draggable: true,
2020          snapOnRelease: true
2021        },
2022        breakpoints: {
2023          200: {
2024            freeMode: true
2025          },
2026          769: {
2027            freeMode: false
2028          }
2029        }
2030      };
2031      this.slider = new Swiper(this.slideContainer, slideOpt);
2032      if (!isMobile()) {
2033        this.slideContainer.classList.add('swiper-no-swiping');
2034      }
2035      var queue = null;
2036      var resizeTimer = 300;
2037      window.addEventListener('resize', function () {
2038        clearTimeout(queue);
2039        queue = setTimeout(function () {
2040          if (!isMobile()) {
2041            _this28.slideContainer.classList.add('swiper-no-swiping');
2042          } else {
2043            if (!_this28.slideContainer.classList.contains('swiper-no-swiping')) return;
2044            _this28.slideContainer.classList.remove('swiper-no-swiping');
2045            _this28.slider.init();
2046          }
2047        }, resizeTimer);
2048      }, false);
2049    }
2050  }, {
2051    key: "slideDetailGallery",
2052    value: function slideDetailGallery(opt) {
2053      this.$prevBtn = $(this.thumbContainer).siblings('.c-detail-gallery-thumb-prev')[0];
2054      this.$nextBtn = $(this.thumbContainer).siblings('.c-detail-gallery-thumb-next')[0];
2055      var minLength = isMobile() ? 4 : 6;
2056      var slides = $(this.thumbContainer).find('.swiper-slide');
2057      if (slides.length <= minLength) {
2058        $(this.thumbContainer).find('.swiper-wrapper').addClass('-none-slide');
2059      }
2060      var thumbOpt = {
2061        // freeMode: true,
2062        loop: false,
2063        resizeReInit: true,
2064        speed: 700,
2065        slidesPerView: 4,
2066        watchSlidesVisibility: true,
2067        watchSlidesProgress: true,
2068        navigation: {
2069          prevEl: this.$prevBtn,
2070          nextEl: this.$nextBtn
2071        },
2072        breakpoints: {
2073          769: {
2074            slidesPerView: 6
2075          }
2076        }
2077      };
2078      this.thumbSlider = new Swiper(this.thumbContainer, thumbOpt);
2079      var slideOpt = {
2080        loop: false,
2081        resizeReInit: true,
2082        speed: 700,
2083        slidesPerView: 1,
2084        watchSlidesProgress: true,
2085        thumbs: {
2086          swiper: this.thumbSlider
2087        }
2088      };
2089      this.slider = new Swiper(this.slideContainer, slideOpt);
2090    }
2091  }, {
2092    key: "slideCharColumn5",
2093    value: function slideCharColumn5() {
2094      var slides = $(this.slideContainer).find('.swiper-slide');
2095      var minLength = isMobile() ? 3 : 5;
2096      if (slides.length <= minLength) {
2097        this.slideContainer.classList.add('swiper-no-swiping');
2098      }
2099      var slideOpt = {
2100        loop: slides.length > minLength,
2101        resizeReInit: true,
2102        speed: 700,
2103        watchSlidesProgress: true,
2104        autoplay: {
2105          delay: 5000,
2106          disableOnInteraction: false
2107        },
2108        navigation: {
2109          prevEl: '.c-slide-char-column5-prev',
2110          nextEl: '.c-slide-char-column5-next'
2111        },
2112        pagination: {
2113          el: '.c-slide-char-column5-pagination',
2114          type: 'bullets',
2115          clickable: true
2116        },
2117        breakpoints: {
2118          200: {
2119            slidesPerView: 3,
2120            spaceBetween: 15
2121          },
2122          769: {
2123            slidesPerView: 5,
2124            spaceBetween: 60
2125          }
2126        },
2127        on: {
2128          init: function init() {
2129            $('.c-slide-char-column5-pagination').find('.swiper-pagination-bullet').each(function (i, el) {
2130              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
2131            });
2132          }
2133        }
2134      };
2135      this.slider = new Swiper(this.slideContainer, slideOpt);
2136    }
2137  }, {
2138    key: "slideMedia",
2139    value: function slideMedia(opt) {
2140      var _this29 = this;
2141      var initialIndex = Number((opt === null || opt === void 0 ? void 0 : opt.index) || 0);
2142      var that = this;
2143      var slideOpt = {
2144        loop: true,
2145        resizeReInit: true,
2146        speed: 700,
2147        centeredSlides: true,
2148        initialSlide: initialIndex,
2149        watchSlidesProgress: true,
2150        slideToClickedSlide: true,
2151        navigation: {
2152          prevEl: '.c-slide-media-prev',
2153          nextEl: '.c-slide-media-next'
2154        },
2155        breakpoints: {
2156          200: {
2157            slidesPerView: 4,
2158            spaceBetween: 15
2159          },
2160          769: {
2161            slidesPerView: 6,
2162            spaceBetween: 60
2163          }
2164        }
2165      };
2166      this.slider = new Swiper(this.slideContainer, slideOpt);
2167      this.slider.on('beforeTransitionStart', function () {
2168        _this29.slideContainer.parentNode.classList.add('-no-swipe');
2169      }).on('realIndexChange', function (swiper) {
2170        var index = that.slider.realIndex;
2171        that.slider.navigation.prevEl.dataset.slider = Number(index) - 1;
2172        that.slider.navigation.nextEl.dataset.slider = Number(index) + 1;
2173        $(window).trigger('onMediaSlideChange', swiper.realIndex);
2174      }).on('slideChangeTransitionEnd', function () {
2175        _this29.slideContainer.parentNode.classList.remove('-no-swipe');
2176      });
2177    }
2178  }, {
2179    key: "slideColumn2",
2180    value: function slideColumn2() {
2181      var slideOpt = {
2182        loop: true,
2183        resizeReInit: true,
2184        speed: 700,
2185        watchSlidesVisibility: true,
2186        watchSlidesProgress: true,
2187        autoplay: {
2188          delay: 5000,
2189          disableOnInteraction: false
2190        },
2191        navigation: {
2192          prevEl: '.c-slide-column2-prev',
2193          nextEl: '.c-slide-column2-next'
2194        },
2195        pagination: {
2196          el: '.c-slide-column2-pagination',
2197          type: 'bullets',
2198          clickable: true
2199        },
2200        breakpoints: {
2201          200: {
2202            slidesPerView: 1,
2203            spaceBetween: 0
2204          },
2205          769: {
2206            slidesPerView: 2,
2207            spaceBetween: 40
2208          }
2209        },
2210        on: {
2211          init: function init() {
2212            $('.c-slide-column2-pagination').find('.swiper-pagination-bullet').each(function (i, el) {
2213              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
2214            });
2215          }
2216        }
2217      };
2218      this.slider = new Swiper(this.slideContainer, slideOpt);
2219    }
2220  }, {
2221    key: "slideColumn3",
2222    value: function slideColumn3(opt) {
2223      var pcMargin = parseInt(opt === null || opt === void 0 ? void 0 : opt.pcMargin) || 30;
2224      var slides = $(this.slideContainer).find('.swiper-slide');
2225      var minLength = isMobile() ? 1 : 3;
2226      if (slides.length <= minLength) {
2227        this.slideContainer.classList.add('swiper-no-swiping');
2228        // if()
2229        if (!isMobile()) {
2230          pcMargin = 0;
2231          $(this.slideContainer).find('.swiper-wrapper').css('justify-content', 'center');
2232        }
2233      }
2234      var slideOpt = {
2235        loop: slides.length > minLength,
2236        centeredSlides: isMobile() || slides.length <= minLength,
2237        resizeReInit: true,
2238        speed: 700,
2239        watchSlidesVisibility: true,
2240        watchSlidesProgress: true,
2241        autoplay: {
2242          delay: 5000,
2243          disableOnInteraction: false
2244        },
2245        navigation: {
2246          prevEl: '.c-slide-column3-prev',
2247          nextEl: '.c-slide-column3-next'
2248        },
2249        pagination: {
2250          el: '.c-slide-column3-pagination',
2251          type: 'bullets',
2252          clickable: true
2253        },
2254        breakpoints: {
2255          200: {
2256            slidesPerView: 2,
2257            spaceBetween: 15,
2258            centeredSlides: false
2259          },
2260          769: {
2261            slidesPerView: 3,
2262            spaceBetween: pcMargin
2263          }
2264        },
2265        on: {
2266          init: function init() {
2267            $('.c-slide-column3-pagination').find('.swiper-pagination-bullet').each(function (i, el) {
2268              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
2269            });
2270          }
2271        }
2272      };
2273      // pc かつ みん
2274      if (!isMobile() && slides.length <= minLength) {
2275        slideOpt.centeredSlides = true;
2276        slideOpt.autoplay = false;
2277        $('.c-slide-column3-next').hide();
2278        $('.c-slide-column3-prev').hide();
2279      } else {
2280        this.slider = new Swiper(this.slideContainer, slideOpt);
2281        // this.spTextStyle();
2282      }
2283    }
2284  }, {
2285    key: "spTextStyle",
2286    value: function spTextStyle() {
2287      var _this30 = this;
2288      this.slider.on('beforeTransitionStart', function () {
2289        if (isMobile()) {
2290          var _this30$slideContaine, _this30$slideContaine2;
2291          var prev = (_this30$slideContaine = _this30.slideContainer) === null || _this30$slideContaine === void 0 ? void 0 : _this30$slideContaine.querySelector('.swiper-slide-prev .c-text');
2292          var next = (_this30$slideContaine2 = _this30.slideContainer) === null || _this30$slideContaine2 === void 0 ? void 0 : _this30$slideContaine2.querySelector('.swiper-slide-next .c-text');
2293          if (prev && next) {
2294            gsap.to([prev, next], {
2295              alpha: 0,
2296              duration: 0.1,
2297              y: 10
2298            });
2299          }
2300        }
2301      }).on('slideChangeTransitionEnd', function () {
2302        if (isMobile()) {
2303          var _this30$slideContaine3;
2304          var text = (_this30$slideContaine3 = _this30.slideContainer) === null || _this30$slideContaine3 === void 0 ? void 0 : _this30$slideContaine3.querySelector('.swiper-slide-active .c-text');
2305          if (text) {
2306            gsap.to(text, _defineProperty({
2307              y: 0,
2308              alpha: 1,
2309              duration: 0.2
2310            }, "y", 0));
2311          }
2312        }
2313      });
2314      var queue = null;
2315      var resizeTimer = 300;
2316      window.addEventListener('resize', function () {
2317        clearTimeout(queue);
2318        queue = setTimeout(function () {
2319          _this30.refreshTextStyle();
2320        }, resizeTimer);
2321      }, false);
2322    }
2323  }, {
2324    key: "refreshTextStyle",
2325    value: function refreshTextStyle() {
2326      if (!isMobile()) {
2327        var _this$slideContainer;
2328        var all = (_this$slideContainer = this.slideContainer) === null || _this$slideContainer === void 0 ? void 0 : _this$slideContainer.querySelectorAll('.swiper-slide .c-text');
2329        if ((all === null || all === void 0 ? void 0 : all.length) === 0) return;
2330        all.forEach(function (d) {
2331          return d.removeAttribute('style');
2332        });
2333      }
2334    }
2335  }, {
2336    key: "slideSP",
2337    value: function slideSP(opt) {
2338      var _this31 = this;
2339      var loopSta = true;
2340      if ($(".".concat(opt.el)).find('li').length <= 1) {
2341        loopSta = false;
2342      }
2343      var param = {
2344        loop: loopSta,
2345        resizeReInit: true,
2346        speed: 700,
2347        watchSlidesVisibility: true,
2348        watchSlidesProgress: true,
2349        autoplay: {
2350          delay: 5000,
2351          disableOnInteraction: false
2352        },
2353        navigation: {
2354          prevEl: ".".concat(opt.el, "-prev"),
2355          nextEl: ".".concat(opt.el, "-next")
2356        },
2357        pagination: {
2358          el: ".".concat(opt.el, "-pagination"),
2359          type: 'bullets',
2360          clickable: true
2361        },
2362        breakpoints: {
2363          200: {
2364            slidesPerView: 1.2,
2365            spaceBetween: 15,
2366            centeredSlides: true
2367          },
2368          769: {
2369            slidesPerView: 3,
2370            spaceBetween: 30
2371          }
2372        },
2373        on: {
2374          init: function init() {
2375            $(".".concat(opt.el, "-pagination")).find('.swiper-pagination-bullet').each(function (i, el) {
2376              $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
2377            });
2378          }
2379        }
2380      };
2381      this.onResizeOnlySP(param);
2382      window.addEventListener('resize', function () {
2383        _this31.onResizeOnlySP(param);
2384      }, false);
2385    }
2386  }, {
2387    key: "defaultSlide",
2388    value: function defaultSlide() {
2389      var speed = 700;
2390      // const delay = 5000;
2391      this.slider = new Swiper(this.slideContainer, {
2392        loop: false,
2393        resizeReInit: true,
2394        speed: speed,
2395        offsetPxAfter: true,
2396        slidesPerView: 3,
2397        watchSlidesProgress: true,
2398        navigation: {
2399          prevEl: '.swiper-button-prev',
2400          nextEl: '.swiper-button-next'
2401        },
2402        breakpoints: {
2403          896: {
2404            slidesPerView: 1,
2405            pagination: {
2406              el: '.swiper-pagination',
2407              type: 'bullets'
2408            }
2409          }
2410        }
2411        // autoplay: {
2412        //   delay: delay,
2413        // },
2414      });
2415    }
2416  }, {
2417    key: "onResizeOnlySP",
2418    value: function onResizeOnlySP(param) {
2419      if (isMobile()) {
2420        if (this.slider === null) {
2421          this.slider = new Swiper(this.slideContainer, param);
2422          this.spTextStyle();
2423        }
2424      } else {
2425        if (this.slider === null) return;
2426        this.slideDestroy();
2427      }
2428    }
2429  }, {
2430    key: "slideDestroy",
2431    value: function slideDestroy() {
2432      this.slider.destroy();
2433      this.slider = null;
2434    }
2435  }]);
2436  return Slider;
2437}();
2438/**
2439 * InitHandler.
2440 *
2441 * @export
2442 * @class InitHandler
2443 */
2444var InitHandler = /*#__PURE__*/_createClass(function InitHandler(opt) {
2445  var _opt$ignore;
2446  _classCallCheck(this, InitHandler);
2447  $(window).trigger('onInitHandlerInit');
2448  var sliderRotateCarousel = new SliderRotateCarousel('js-slideRotateCarousel');
2449  var sliderSyncCarousel = new SliderSyncCarousel('js-slideSyncCarousel');
2450  var sliderWindowCarousel = new SliderWindowCarousel('js-slideWindowCarousel');
2451  var sliderFocusCarousel = new SliderFocusCarousel('js-slideFocusCarousel');
2452  var sliderCharacterFrame = new SliderCharacterFrame('');
2453  // let sliderGift = new SliderGift();
2454  var sliderGuide = new SliderGuide();
2455  var sliderMovie = new SliderMovie();
2456  var sliderMobile = new SliderMobile();
2457  if (!(opt !== null && opt !== void 0 && (_opt$ignore = opt.ignore) !== null && _opt$ignore !== void 0 && _opt$ignore.includes('modal'))) {
2458    window.modal = new Modal();
2459  } else {
2460    window.modal = new Modal();
2461  }
2462  // new UIToggle({ el: 'c-info-q', on: '-on' });
2463  window.anchorLink = new AnchorLink();
2464  var scrollSP = document.getElementsByClassName('c-scrollbar-sp');
2465  if ((scrollSP === null || scrollSP === void 0 ? void 0 : scrollSP.length) > 0) {
2466    for (var i = 0; i < scrollSP.length; i++) {
2467      new SimpleBar(scrollSP[i], {
2468        autoHide: false
2469      });
2470    }
2471  }
2472  if (window.sliderCharacterlist) {
2473    window.sliderCharacterlist.destroy();
2474    window.sliderCharacterlist = null;
2475  }
2476  window.sliderCharacterlist = new SliderCharacterlist();
2477
2478  // const slideTab = document.getElementsByClassName('c-slide-tab-slider');
2479  // if (slideTab?.length > 0) {
2480  //   for (let i = 0; i < slideTab.length; i++) {
2481  //     new Slider({ el: slideTab[i].id, type: 'tab' });
2482  //   }
2483  // }
2484
2485  // const slideSearch = document.getElementsByClassName('c-slide-search-slider');
2486  // if (slideSearch?.length > 0) {
2487  //   for (let i = 0; i < slideSearch.length; i++) {
2488  //     new Slider({ el: slideSearch[i].id, type: 'search' });
2489  //   }
2490  // }
2491
2492  var slideColumn2 = document.getElementsByClassName('c-slide-column2-slider');
2493  if ((slideColumn2 === null || slideColumn2 === void 0 ? void 0 : slideColumn2.length) > 0) {
2494    for (var _i = 0; _i < slideColumn2.length; _i++) {
2495      new Slider({
2496        el: slideColumn2[_i].id,
2497        type: 'column2'
2498      });
2499    }
2500  }
2501  var slideColumn3 = document.getElementsByClassName('c-slide-column3-slider');
2502  if ((slideColumn3 === null || slideColumn3 === void 0 ? void 0 : slideColumn3.length) > 0) {
2503    for (var _i2 = 0; _i2 < slideColumn3.length; _i2++) {
2504      var _slideColumn3$_i, _slideColumn3$_i$data;
2505      var pcMargin = ((_slideColumn3$_i = slideColumn3[_i2]) === null || _slideColumn3$_i === void 0 ? void 0 : (_slideColumn3$_i$data = _slideColumn3$_i.dataset) === null || _slideColumn3$_i$data === void 0 ? void 0 : _slideColumn3$_i$data.pcMargin) || null;
2506      new Slider({
2507        el: slideColumn3[_i2].id,
2508        type: 'column3',
2509        pcMargin: pcMargin
2510      });
2511    }
2512  }
2513  var detailGallery = document.getElementsByClassName('c-detail-gallery-slider');
2514  if ((detailGallery === null || detailGallery === void 0 ? void 0 : detailGallery.length) > 0) {
2515    for (var _i3 = 0; _i3 < detailGallery.length; _i3++) {
2516      new Slider({
2517        el: detailGallery[_i3].id,
2518        type: 'detailGallery',
2519        thumb: "".concat(detailGallery[_i3].id, "-thumb")
2520      });
2521    }
2522  }
2523  var slideSP = document.getElementsByClassName('c-slide-sp-slider');
2524  if ((slideSP === null || slideSP === void 0 ? void 0 : slideSP.length) > 0) {
2525    for (var _i4 = 0; _i4 < slideSP.length; _i4++) {
2526      new Slider({
2527        el: slideSP[_i4].id,
2528        type: 'onlySP'
2529      });
2530    }
2531  }
2532  var charColumn5 = document.getElementsByClassName('c-slide-char-column5-slider');
2533  if ((charColumn5 === null || charColumn5 === void 0 ? void 0 : charColumn5.length) > 0) {
2534    for (var _i5 = 0; _i5 < charColumn5.length; _i5++) {
2535      new Slider({
2536        el: charColumn5[_i5].id,
2537        type: 'charColumn5'
2538      });
2539    }
2540  }
2541  var characterBg = new CharacterBg();
2542});
2543/**
2544 * UIToggle.
2545 *
2546 * @export
2547 * @class UIToggle
2548 */
2549var UIToggle = /*#__PURE__*/function () {
2550  function UIToggle(opt) {
2551    var _this32 = this;
2552    _classCallCheck(this, UIToggle);
2553    this.el = _toConsumableArray(document.getElementsByClassName(opt.el));
2554    this.toggleClass = opt.on;
2555    this.endClass = opt.off;
2556    this.once = opt.once;
2557    this.type = opt.type ? opt.type : null;
2558    if (this.el) {
2559      for (var i = 0; i < this.el.length; i++) {
2560        this.el[i].addEventListener("click", function (e) {
2561          _this32.btnToggle(e);
2562        }, false);
2563      }
2564    }
2565  }
2566  _createClass(UIToggle, [{
2567    key: "btnToggle",
2568    value: function btnToggle(e) {
2569      var el = this.type === "parent" ? e.currentTarget.parentNode : e.currentTarget;
2570      if (!el.classList.contains(this.toggleClass)) {
2571        this.btnOn(el);
2572      } else {
2573        if (this.once) return;
2574        this.btnOff(el);
2575      }
2576    }
2577  }, {
2578    key: "btnOn",
2579    value: function btnOn(el) {
2580      if (this.endClass) {
2581        if (el.classList.contains(this.endClass)) {
2582          el.classList.remove(this.endClass);
2583        }
2584      }
2585      if (!el.classList.contains(this.toggleClass)) {
2586        el.classList.add(this.toggleClass);
2587      }
2588    }
2589  }, {
2590    key: "btnOff",
2591    value: function btnOff(el) {
2592      if (el.classList.contains(this.toggleClass)) {
2593        el.classList.remove(this.toggleClass);
2594      }
2595      if (this.endClass) {
2596        if (!el.classList.contains(this.endClass)) {
2597          el.classList.add(this.endClass);
2598        }
2599      }
2600    }
2601  }]);
2602  return UIToggle;
2603}();
2604/**
2605 * Modal.
2606 *
2607 * @export
2608 * @class Modal
2609 */
2610var Modal = /*#__PURE__*/function () {
2611  function Modal() {
2612    var _this33 = this;
2613    _classCallCheck(this, Modal);
2614    this.doc = document.documentElement;
2615    this.modalAttr = 'data-modal';
2616    this.modalLink = document.querySelectorAll("[".concat(this.modalAttr, "]"));
2617    this.modalDoc = document.getElementById('app-searchGift');
2618    this.modal = {
2619      el: null,
2620      bg: null,
2621      close: null,
2622      flag: 0,
2623      openPosition: 0
2624    };
2625    this.modalFlag = 0;
2626    this.modalOpenPosition = 0;
2627    this.yt = null;
2628    this.swiper = null;
2629
2630    // for development
2631    // const _m = $('[data-modal="modal-slider"]')[0];
2632    // if(_m) {
2633    //   console.log(_m);
2634    //   const _e = {
2635    //     preventDefault: () => {},
2636    //     currentTarget: _m
2637    //   };
2638    //   this.modalToggle(_e);
2639    // }
2640    // for development
2641
2642    if (this.doc.classList.contains('-modal')) return;
2643    this.modalLink.forEach(function (modal) {
2644      if (modal.dataset.paging === 'true' && !_this33.pagingModal) {
2645        _this33.pagingModal = new PagingModal();
2646      }
2647    });
2648    $(document).on('click', "[".concat(this.modalAttr, "]"), function (e) {
2649      _this33.modalToggle(e);
2650    });
2651  }
2652  _createClass(Modal, [{
2653    key: "modalToggle",
2654    value: function modalToggle(e) {
2655      var _this34 = this;
2656      e.preventDefault();
2657      this.modal.el = document.getElementById(e.currentTarget.dataset.modal);
2658      if (!this.modal.el) return;
2659      this.modal.bg = this.modal.el.getElementsByClassName('c-modal__bg')[0];
2660      this.modal.close = this.modal.el.getElementsByClassName('c-modal-close');
2661      if (this.modal.bg) {
2662        this.modal.bg.addEventListener('click', function (e) {
2663          _this34.modalClose(e), false;
2664        });
2665      }
2666      if (this.modal.close) {
2667        for (var i = 0; i < this.modal.close.length; i++) {
2668          this.modal.close[i].addEventListener('click', function (e) {
2669            _this34.modalClose(e), false;
2670          });
2671        }
2672      }
2673      if (this.modal.flag === 0) {
2674        this.modalOpen(e);
2675      } else {
2676        this.modalClose();
2677      }
2678    }
2679  }, {
2680    key: "modalOpen",
2681    value: function modalOpen(e) {
2682      var _this35 = this;
2683      this.modal.openPosition = window.pageYOffset || this.doc.scrollTop || document.body.scrollTop;
2684      this.doc.style.position = "fixed";
2685      this.doc.style.top = "-".concat(this.modal.openPosition, "px");
2686      if (!this.doc.classList.contains('-modal')) {
2687        this.doc.classList.add('-modal', '-fix');
2688      }
2689      if ($(e.currentTarget).data('modal').startsWith('modal-slider')) {
2690        this.modalSliderOpen(e);
2691      }
2692      if ($(e.currentTarget).data('modal') === 'modal-youtube') {
2693        this.modalYoutubeOpen(e);
2694      }
2695      if ($(e.currentTarget).data('modal') === 'modal-vimeo') {
2696        this.modalVimeoOpen(e);
2697      }
2698      if ($(e.currentTarget).data('modal').indexOf('modal-birthday') >= 0) {
2699        this.modalBirthdayOpen(e);
2700      }
2701      if ($(e.currentTarget).data('modal') === 'modal-gift') {
2702        this.doc.classList.add('-fix-header');
2703        this.modalGiftOpen(e);
2704      }
2705      if ($(e.currentTarget).data('modal') === 'modal-img') {
2706        this.doc.classList.add('-fix-header');
2707        this.modalImgOpen(e);
2708      }
2709      if ($(e.currentTarget).data('paging')) {
2710        this.pagingModal.setTarget(e.currentTarget);
2711        this.pagingModal.render();
2712      }
2713      if (this.modal.el.classList.contains('-open')) return;
2714      this.modal.el.classList.add('-open');
2715      this.modal.flag = 1;
2716      e.preventDefault();
2717      $('.c-modal').on('click.bgclick', function (e) {
2718        if ($(e.target).hasClass('.c-modal__bg')) {
2719          _this35.modalClose();
2720        }
2721      });
2722    }
2723  }, {
2724    key: "modalSliderOpen",
2725    value: function modalSliderOpen(e) {
2726      var swiperEl = $(this.modal.el).find('.swiper')[0];
2727      var prevBtn = $(this.modal.el).find('.js-modal-slider-prev')[0];
2728      var nextBtn = $(this.modal.el).find('.js-modal-slider-next')[0];
2729      var captionEl = $(this.modal.el).find('.js-modal-slider-caption')[0];
2730      var notAutoPlay = swiperEl.dataset.autoplay === 'false';
2731      var loopSta = true;
2732      if ($(swiperEl).find('.swiper-slide').length <= 1) {
2733        loopSta = false;
2734        $(prevBtn).css({
2735          opacity: 0
2736        });
2737        $(nextBtn).css({
2738          opacity: 0
2739        });
2740      }
2741      this.swiper = new Swiper(swiperEl, {
2742        slidesPerView: 1,
2743        spaceBetween: 0,
2744        loop: loopSta,
2745        navigation: {
2746          nextEl: nextBtn,
2747          prevEl: prevBtn
2748        },
2749        autoplay: notAutoPlay ? '' : {
2750          delay: 6000
2751        },
2752        on: {
2753          init: function init(swiper) {
2754            var index = $(e.currentTarget).data('slide-index');
2755            swiper.slideToLoop(index, 0);
2756          },
2757          beforeTransitionStart: function beforeTransitionStart() {
2758            gsap.to(captionEl, {
2759              y: '20px',
2760              opacity: 0,
2761              duration: 0.2
2762            });
2763          },
2764          slideChangeTransitionEnd: function slideChangeTransitionEnd() {
2765            $('.js-modal-slider-caption').text(caption);
2766            // const currentSlide = swiper.slides[swiper.realIndex];
2767            var $currentSlide = $(swiperEl).find('.swiper-slide-active');
2768            var caption = $currentSlide.data('caption');
2769            $('.js-modal-slider-caption').text(caption);
2770            gsap.to(captionEl, {
2771              y: '0px',
2772              opacity: 1
2773            });
2774          }
2775        }
2776      });
2777    }
2778  }, {
2779    key: "modalYoutubeOpen",
2780    value: function modalYoutubeOpen(e) {
2781      var iframe = $(this.modal.el).find('.c-modal-youtube__iframe')[0];
2782      var wrapper = $(this.modal.el).find('.c-modal-youtube__iframeItem')[0];
2783      var content = $(this.modal.el).find('.c-modal__content')[0];
2784      var ytid = $(e.currentTarget).data('ytid');
2785      var ytTitle = $(e.currentTarget).data('title');
2786      var ytCaption = $(e.currentTarget).data('caption');
2787      var ytRatio = $(e.currentTarget).data('ratio');
2788      if (ytRatio === '9:16') {
2789        iframe.classList.add('-vertical');
2790      }
2791      this.yt = new YT.Player(wrapper, {
2792        videoId: ytid,
2793        host: 'https://www.youtube.com',
2794        width: 640,
2795        height: 360,
2796        playerVars: {
2797          rel: 0,
2798          // 関連動画の非表示
2799          controls: 1,
2800          // プレイヤーコントロールの非表示
2801          modestbranding: 1,
2802          // YouTubeロゴの非表示
2803          iv_load_policy: 3,
2804          // アノテーションの非表示
2805          loop: 0,
2806          // playlist: url, // ループ時に設定
2807          wmode: 'transparent',
2808          // origin: location.protocol + '//' + location.hostname + "/"
2809          playsinline: 1
2810        },
2811        events: {
2812          onReady: function onReady(e) {
2813            if (isMobile()) {
2814              e.target.mute();
2815            }
2816            e.target.playVideo();
2817          }
2818          // 'onStateChange': onPlayerStateChange
2819        }
2820      });
2821
2822      if (ytTitle) {
2823        var ytTitleEl = document.createElement('div');
2824        ytTitleEl.className = 'p-specialImgModal__title';
2825        ytTitleEl.innerHTML = ytTitle;
2826        content.insertAdjacentElement('afterbegin', ytTitleEl);
2827      }
2828      if (ytCaption) {
2829        var ytCaptionEl = document.createElement('div');
2830        ytCaptionEl.className = 'p-specialImgModal__text';
2831        ytCaptionEl.innerHTML = ytCaption;
2832        content.insertAdjacentElement('beforeend', ytCaptionEl);
2833      }
2834    }
2835  }, {
2836    key: "modalVimeoOpen",
2837    value: function modalVimeoOpen(e) {
2838      var iframe = $(this.modal.el).find('.c-modal-vimeo__iframe')[0];
2839      var wrapper = $(this.modal.el).find('.c-modal-vimeo__iframeItem')[0];
2840      var vimeoId = $(e.currentTarget).data('vimeoid') || '';
2841      var vimeoHash = $(e.currentTarget).data('vimeohash') || '';
2842      var vimeoRatio = $(e.currentTarget).data('ratio');
2843      if (vimeoRatio === '9:16') {
2844        iframe.classList.add('-vertical');
2845      }
2846
2847      // iframeの埋め込み
2848      wrapper.innerHTML = "\n      <iframe\n        src=\"https://player.vimeo.com/video/".concat(vimeoId, "?h=").concat(vimeoHash, "&autoplay=1\"\n        frameborder=\"0\"\n        allow=\"autoplay; fullscreen\"\n        allowfullscreen\n        style=\"width:100%; height:100%;\"\n      ></iframe>");
2849    }
2850  }, {
2851    key: "modalBirthdayOpen",
2852    value: function modalBirthdayOpen(e) {
2853      var $el = $(this.modal.el);
2854      $(window).trigger('birthdaymodal-open');
2855      var wrapper = $(this.modal.el).find('.c-modal-youtube__iframeItem')[0];
2856      var elHeading = gsap.utils.toArray($el.find('.js-modal-birthday-heading'));
2857      var elIllust = gsap.utils.toArray($el.find('.js-modal-birthday-illust'));
2858      var fadeItem = gsap.utils.toArray($el.find('.js-modal-birthday-item'));
2859      var elTrigger = gsap.utils.toArray($el.find('.js-modal-birthday-trigger'));
2860      var elNote = gsap.utils.toArray($el.find('.js-modal-birthday-note'));
2861      var tl = gsap.timeline();
2862      tl.set(elHeading, {
2863        opacity: 0,
2864        y: '30px'
2865      }).set(elIllust, {
2866        opacity: 0,
2867        y: '-300px'
2868      }).set([].concat(_toConsumableArray(fadeItem), _toConsumableArray(elNote)), {
2869        opacity: 0
2870      }).set(elTrigger, {
2871        scale: 1.2,
2872        opacity: 0
2873      }).to(elHeading, {
2874        opacity: 1,
2875        y: 0,
2876        duration: 0.6
2877      }).to(elIllust, {
2878        opacity: 1,
2879        duration: 0.2,
2880        delay: -0.2,
2881        ease: Sine.easeOut
2882      }).to(elIllust, {
2883        y: 0,
2884        duration: 0.2,
2885        delay: -0.2,
2886        ease: Elastic.easeOut.config(1, 1)
2887      }).to(fadeItem, {
2888        opacity: 1,
2889        duration: 1.2,
2890        delay: -1.2,
2891        ease: Expo.easeOut
2892      }).to(elTrigger, {
2893        scale: 1,
2894        opacity: 1,
2895        duration: 0.8
2896      }).to(elNote, {
2897        opacity: 1,
2898        duration: 1.2,
2899        delay: -0.5,
2900        ease: Expo.easeOut
2901      });
2902      var canvas = $el.find('.js-modal-birthday-canvas')[0];
2903      var canvasEl = document.createElement('canvas');
2904      var animDuration = 3000;
2905      canvas.appendChild(canvasEl);
2906      var myConfetti = confetti.create(canvasEl, {
2907        resize: true,
2908        useWorker: true
2909      });
2910      $(elTrigger).on('click', function (e) {
2911        var isAnim = true;
2912        setTimeout(function () {
2913          return isAnim = false;
2914        }, animDuration);
2915        var animeInterval = setInterval(function () {
2916          var x = Math.random() * 0.6 + 0.2;
2917          var y = Math.random() * 0.3 + 0.1;
2918          myConfetti({
2919            particleCount: 5,
2920            spread: 120,
2921            origin: {
2922              y: y,
2923              x: x
2924            },
2925            scalar: 1.8,
2926            shapes: ['square']
2927          });
2928          if (!isAnim) clearInterval(animeInterval);
2929        }, 90);
2930
2931        // $(elTrigger).attr('disabled',true);
2932        // setTimeout(() => {
2933        //   $(elTrigger).attr('disabled',false);
2934        // },3000)
2935      });
2936    }
2937  }, {
2938    key: "modalGiftOpen",
2939    value: function modalGiftOpen(e) {
2940      var $el = $(this.modal.el);
2941      var element = $(e.currentTarget).parents('.swiper').prop('outerHTML');
2942      var output = element.replace(/<div class="swiper-slide(.*?)<\/div><\/div>/g, '').replace(/<div data-modal="modal-gift" class="swiper-slide swiper-slide-duplicate (.*?)<\/div><\/div>/g, '');
2943      var $container = $el.find('.js-modal-gift-content');
2944      $container.html(output);
2945      var $swiperEl = $el.find('.swiper');
2946      var $wrapper = $el.find('.swiper-wrapper');
2947      var $slide = $el.find('.swiper-slide');
2948      var $pager = $el.find('.swiper-pagination');
2949      var $prev = $el.find('.js-modal-gift-prev');
2950      var $next = $el.find('.js-modal-gift-next');
2951      if ($slide.length > 1) {
2952        this.swiper = new Swiper($swiperEl[0], {
2953          loop: true,
2954          speed: 750,
2955          pagination: {
2956            el: $pager[0],
2957            clickable: true
2958          },
2959          navigation: {
2960            nextEl: $next[0],
2961            prevEl: $prev[0]
2962          }
2963        });
2964        this.doc.classList.remove('-slider-disable');
2965      } else {
2966        $wrapper.removeAttr('style');
2967        $slide.removeAttr('style');
2968        this.doc.classList.add('-slider-disable');
2969      }
2970    }
2971  }, {
2972    key: "modalImgOpen",
2973    value: function modalImgOpen(e) {
2974      var path = $(e.currentTarget).find('img').attr('src');
2975      var $img = $(this.modal.el).find('img');
2976      $img.attr('src', path);
2977    }
2978  }, {
2979    key: "modalClose",
2980    value: function modalClose() {
2981      var _this36 = this;
2982      // console.log(this.modal.openPosition);
2983
2984      $('.c-modal').on('click.bgclick');
2985      this.doc.style.removeProperty('position');
2986      this.doc.style.removeProperty('top');
2987      if (this.doc.classList.contains('-fix')) {
2988        this.doc.classList.remove('-fix');
2989      }
2990      gsap.to(window, {
2991        duration: 0.1,
2992        delay: 0,
2993        ease: 'Power1.easeInOut',
2994        onStart: function onStart() {
2995          gsap.set(window, {
2996            scrollTo: {
2997              y: _this36.modal.openPosition,
2998              autoKill: false
2999            }
3000          });
3001        },
3002        onComplete: function onComplete() {
3003          var _this36$modal, _this36$modal$el;
3004          if ((_this36$modal = _this36.modal) !== null && _this36$modal !== void 0 && (_this36$modal$el = _this36$modal.el) !== null && _this36$modal$el !== void 0 && _this36$modal$el.classList.contains('-open')) {
3005            _this36.modal.el.classList.remove('-open');
3006          }
3007          if (_this36.doc.classList.contains('-modal')) {
3008            _this36.doc.classList.remove('-modal');
3009          }
3010          if (_this36.swiper) {
3011            _this36.modalSliderClose();
3012          }
3013          if (_this36.yt) {
3014            _this36.modalYoutubeClose();
3015          }
3016          _this36.modal = {
3017            el: null,
3018            bg: null,
3019            close: null,
3020            flag: 0,
3021            openPosition: 0
3022          };
3023        }
3024      });
3025      for (var i = 0; i < this.modalLink.length; i++) {
3026        this.modalLink[i].removeEventListener('click', function (e) {
3027          _this36.modalToggle(e);
3028        }, false);
3029      }
3030      if (this.doc.classList.contains('-fix-header')) {
3031        setTimeout(function () {
3032          _this36.doc.classList.remove('-fix-header', '-slider-disable');
3033        }, 500);
3034      }
3035      // vimeoのモーダルが開いてるか
3036      if (this.modal.el.matches('.c-modal-vimeo.-open')) {
3037        $(this.modal.el).find('.c-modal-vimeo__iframeItem')[0].innerHTML = '';
3038        var isVimeoVertical = $(this.modal.el).find('.c-modal-vimeo__iframe')[0].classList.contains('-vertical');
3039        if (isVimeoVertical) {
3040          $(this.modal.el).find('.c-modal-vimeo__iframe')[0].classList.remove('-vertical');
3041        }
3042        ;
3043      }
3044      // console.log('close')
3045    }
3046  }, {
3047    key: "modalSliderClose",
3048    value: function modalSliderClose() {
3049      this.swiper.destroy(true, true);
3050      this.swiper = null;
3051    }
3052  }, {
3053    key: "modalYoutubeClose",
3054    value: function modalYoutubeClose() {
3055      //console.log('pause');
3056      //console.log(this.yt);
3057      $(this.modal.el).find('.c-modal-youtube__iframe')[0].innerHTML = '';
3058      var el = document.createElement('div');
3059      el.classList.add('c-modal-youtube__iframeItem');
3060      $(this.modal.el).find('.c-modal-youtube__iframe')[0].appendChild(el);
3061      var ytTitle = $(this.modal.el).find('.p-specialImgModal__title')[0];
3062      var ytCaption = $(this.modal.el).find('.p-specialImgModal__text')[0];
3063      if (ytTitle) {
3064        ytTitle.remove();
3065      }
3066      if (ytCaption) {
3067        ytCaption.remove();
3068      }
3069      if ($(this.modal.el).find('.c-modal-youtube__iframe')[0].classList.contains('-vertical')) {
3070        $(this.modal.el).find('.c-modal-youtube__iframe')[0].classList.remove('-vertical');
3071      }
3072      ;
3073      this.yt = null;
3074    }
3075  }]);
3076  return Modal;
3077}();
3078var PagingModal = /*#__PURE__*/function () {
3079  function PagingModal() {
3080    _classCallCheck(this, PagingModal);
3081    this.doc = document.documentElement;
3082    this.rendering = false;
3083    this.init();
3084  }
3085  _createClass(PagingModal, [{
3086    key: "init",
3087    value: function init() {
3088      this.dataList = JSON.parse(document.getElementById('source-modalPaging').innerHTML);
3089    }
3090  }, {
3091    key: "setTarget",
3092    value: function setTarget(target) {
3093      this.target = target;
3094      this.targetId = this.target.dataset.modal;
3095      this.loop = this.target.dataset.pagingLoop === 'true';
3096      this.targetNumber = Number(this.target.dataset.modalNumber);
3097      this.modal = document.getElementById(this.targetId);
3098    }
3099  }, {
3100    key: "render",
3101    value: function render() {
3102      var _this37 = this;
3103      if (this.rendering) return;
3104      this.rendering = true;
3105      this.content = this.modal.querySelector('.c-modal__content');
3106      var index = this.targetNumber;
3107      var item = this.dataList[this.targetId][index];
3108      this.title = item.title;
3109      this.image = item.image;
3110      this.caption = item.caption;
3111      var isYoutube = item.isYoutube;
3112      if (isYoutube) {
3113        this.openYoutube();
3114      } else {
3115        this.modal.classList.contains('c-modal-youtube') ? this.modal.classList.remove('c-modal-youtube') : '';
3116        this.content.innerHTML = "\n        <div class=\"p-specialImgModal\">\n          <div class=\"p-specialImgModal__body\">\n            <div class=\"p-specialImgModal__title\">".concat(this.title, "</div>\n            <div class=\"p-specialImgModal__img\">\n              <img class=\"u-fit-w\" src=\"").concat(this.image, "\" alt=\"\">\n            </div>\n            <div class=\"p-specialImgModal__text\">").concat(this.caption, "</div>\n            <div class=\"c-modal-slider__control pagingModal for-mobile\">\n              <button class=\"c-modal-slider__controlItem js-modal-slider-prev\" aria-label=\"Previous slide\"><svg><use xlink:href=\"#icon-slide-back\"></use></svg></button><button class=\"c-modal-slider__controlItem js-modal-slider-next\" aria-label=\"Next slide\"><svg><use xlink:href=\"#icon-slide-next\"></use></svg></button>\n            </div>\n          </div>\n        </div>\n      ");
3117      }
3118      this.clickEvent();
3119      this.disableCheck();
3120
3121      // 少し遅らせてロック解除(描画反映待ち)
3122      setTimeout(function () {
3123        _this37.rendering = false;
3124      }, 50);
3125    }
3126  }, {
3127    key: "openYoutube",
3128    value: function openYoutube() {
3129      var ytId = this.dataList[this.targetId][this.targetNumber].youtubeID;
3130      var ratio = this.dataList[this.targetId][this.targetNumber].ratio;
3131      var isVertical = ratio === '9:16' ? true : false;
3132      var muteParam = isMobile() ? '&mute=1' : '';
3133      this.modal.classList.add('c-modal-youtube');
3134      this.content.innerHTML = "\n      <div class=\"p-specialImgModal__title\">".concat(this.title, "</div>\n      <div class=\"c-modal-youtube__iframe ").concat(isVertical ? '-vertical' : '', "\">\n        <iframe class=\"c-modal-youtube__iframeItem\" frameborder=\"0\" allowfullscreen=\"\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" title=\"").concat(this.title, "\" width=\"640\" height=\"360\" src=\"https://www.youtube.com/embed/").concat(ytId, "?autoplay=1").concat(muteParam, "\"></iframe>\n      </div>\n      <div class=\"p-specialImgModal__text\">").concat(this.caption, "</div>\n      <div class=\"c-modal-slider__control pagingModal for-mobile\">\n        <button class=\"c-modal-slider__controlItem js-modal-slider-prev\" aria-label=\"Previous slide\"><svg><use xlink:href=\"#icon-slide-back\"></use></svg></button>\n        <button class=\"c-modal-slider__controlItem js-modal-slider-next\" aria-label=\"Next slide\"><svg><use xlink:href=\"#icon-slide-next\"></use></svg></button>\n      </div>\n    ");
3135    }
3136  }, {
3137    key: "disableCheck",
3138    value: function disableCheck() {
3139      var _this38 = this;
3140      var prevBtns = this.modal.querySelectorAll('.js-modal-slider-prev');
3141      var nextBtns = this.modal.querySelectorAll('.js-modal-slider-next');
3142      var lastIndex = this.dataList[this.targetId].length - 1;
3143      var isFirst = this.targetNumber === 0;
3144      var isLast = this.targetNumber === lastIndex;
3145      prevBtns.forEach(function (btn) {
3146        return _this38.toggleButtonState(btn, !_this38.loop && isFirst);
3147      });
3148      nextBtns.forEach(function (btn) {
3149        return _this38.toggleButtonState(btn, !_this38.loop && isLast);
3150      });
3151    }
3152  }, {
3153    key: "toggleButtonState",
3154    value: function toggleButtonState(button, isDisabled) {
3155      button.disabled = isDisabled;
3156      button.classList.toggle('is-disabled', isDisabled);
3157    }
3158  }, {
3159    key: "clickEvent",
3160    value: function clickEvent() {
3161      var _this39 = this,
3162        _this$onPrev,
3163        _this$onNext,
3164        _this$onClose;
3165      var prevBtns = this.modal.querySelectorAll('.js-modal-slider-prev');
3166      var nextBtns = this.modal.querySelectorAll('.js-modal-slider-next');
3167      var closeBtns = this.modal.querySelectorAll('.c-modal__close');
3168
3169      // 一度削除してから再登録(複数 render() 対策)
3170      prevBtns.forEach(function (btn) {
3171        return btn.removeEventListener('click', _this39.onPrev);
3172      });
3173      nextBtns.forEach(function (btn) {
3174        return btn.removeEventListener('click', _this39.onNext);
3175      });
3176      closeBtns.forEach(function (btn) {
3177        return btn.removeEventListener('click', _this39.onClose);
3178      });
3179      this.onPrev = ((_this$onPrev = this.onPrev) === null || _this$onPrev === void 0 ? void 0 : _this$onPrev.bind(this)) || this.prevHandler.bind(this);
3180      this.onNext = ((_this$onNext = this.onNext) === null || _this$onNext === void 0 ? void 0 : _this$onNext.bind(this)) || this.nextHandler.bind(this);
3181      this.onClose = ((_this$onClose = this.onClose) === null || _this$onClose === void 0 ? void 0 : _this$onClose.bind(this)) || this.closeHandler.bind(this);
3182      prevBtns.forEach(function (btn) {
3183        return btn.addEventListener('click', _this39.onPrev);
3184      });
3185      nextBtns.forEach(function (btn) {
3186        return btn.addEventListener('click', _this39.onNext);
3187      });
3188      closeBtns.forEach(function (btn) {
3189        return btn.addEventListener('click', _this39.onClose);
3190      });
3191    }
3192  }, {
3193    key: "prevHandler",
3194    value: function prevHandler() {
3195      if (this.targetNumber > 0) {
3196        this.targetNumber--;
3197      } else if (this.loop) {
3198        this.targetNumber = this.dataList[this.targetId].length - 1;
3199      } else {
3200        return;
3201      }
3202      this.render();
3203    }
3204  }, {
3205    key: "nextHandler",
3206    value: function nextHandler() {
3207      if (this.targetNumber < this.dataList[this.targetId].length - 1) {
3208        this.targetNumber++;
3209      } else if (this.loop) {
3210        this.targetNumber = 0;
3211      } else {
3212        return;
3213      }
3214      this.render();
3215    }
3216  }, {
3217    key: "closeHandler",
3218    value: function closeHandler() {
3219      this.destroy();
3220    }
3221  }, {
3222    key: "destroy",
3223    value: function destroy() {
3224      var _this40 = this;
3225      var prevBtns = this.modal.querySelectorAll('.js-modal-slider-prev');
3226      var nextBtns = this.modal.querySelectorAll('.js-modal-slider-next');
3227      var closeBtns = this.modal.querySelectorAll('.c-modal__close');
3228      prevBtns.forEach(function (btn) {
3229        return btn.removeEventListener('click', _this40.onPrev);
3230      });
3231      nextBtns.forEach(function (btn) {
3232        return btn.removeEventListener('click', _this40.onNext);
3233      });
3234      closeBtns.forEach(function (btn) {
3235        return btn.removeEventListener('click', _this40.onClose);
3236      });
3237      this.content.innerHTML = '';
3238      this.modal.classList.remove('is-active', 'c-modal-youtube');
3239      this.target = null;
3240      this.modal = null;
3241      this.content = null;
3242      this.targetId = null;
3243      this.targetNumber = null;
3244    }
3245  }]);
3246  return PagingModal;
3247}();
3248var Parallax = /*#__PURE__*/function () {
3249  function Parallax() {
3250    _classCallCheck(this, Parallax);
3251    this.target = '[data-parallax]';
3252    this.$els = $(this.target);
3253    if (this.$els.length) this.init();
3254    this.targetBg = '[data-parallax-bg]';
3255    this.$elsBg = $(this.targetBg);
3256    if (this.$elsBg.length) this.initBg();
3257  }
3258  _createClass(Parallax, [{
3259    key: "init",
3260    value: function init() {
3261      gsap.utils.toArray(this.$els).forEach(function (el) {
3262        var move = !isMobile() ? '200px' : '100px';
3263        gsap.to(el, {
3264          y: move,
3265          ease: Power0.easeNone,
3266          scrollTrigger: {
3267            trigger: el,
3268            start: "top bottom",
3269            end: "bottom+=".concat(move, " top"),
3270            scrub: true,
3271            // markers:\ true,
3272            onEnter: function onEnter() {
3273              gsap.set(el, {
3274                willChange: 'transform'
3275              });
3276            },
3277            onLeave: function onLeave() {
3278              gsap.set(el, {
3279                willChange: ''
3280              });
3281            },
3282            onEnterBack: function onEnterBack() {
3283              gsap.set(el, {
3284                willChange: ''
3285              });
3286            },
3287            onLeaveBack: function onLeaveBack() {
3288              gsap.set(el, {
3289                willChange: 'transform'
3290              });
3291            }
3292          }
3293        });
3294      });
3295    }
3296  }, {
3297    key: "initBg",
3298    value: function initBg() {
3299      gsap.utils.toArray(this.$elsBg).forEach(function (el) {
3300        var move = !isMobile() ? '50% 200px' : '0% 100px, 100% 100px';
3301        gsap.to(el, {
3302          backgroundPosition: move,
3303          ease: Power0.easeNone,
3304          scrollTrigger: {
3305            trigger: el,
3306            start: "top bottom",
3307            end: "bottom+=".concat(move, " top"),
3308            scrub: true,
3309            // markers:\ true,
3310            onEnter: function onEnter() {
3311              gsap.set(el, {
3312                willChange: 'background-position'
3313              });
3314            },
3315            onLeave: function onLeave() {
3316              gsap.set(el, {
3317                willChange: ''
3318              });
3319            },
3320            onEnterBack: function onEnterBack() {
3321              gsap.set(el, {
3322                willChange: ''
3323              });
3324            },
3325            onLeaveBack: function onLeaveBack() {
3326              gsap.set(el, {
3327                willChange: 'background-position'
3328              });
3329            }
3330          }
3331        });
3332      });
3333    }
3334  }]);
3335  return Parallax;
3336}();
3337var ProfPopup = /*#__PURE__*/function () {
3338  function ProfPopup() {
3339    _classCallCheck(this, ProfPopup);
3340    this.$triggers = $('[data-profpopup]');
3341    this.openEl = null;
3342    this.isAnimating = false;
3343    if (this.$triggers.length) {
3344      this.init();
3345    }
3346  }
3347  _createClass(ProfPopup, [{
3348    key: "init",
3349    value: function init() {
3350      var _this41 = this;
3351      this.$triggers.on('click', function (e) {
3352        e.preventDefault();
3353        if (_this41.isAnimating) return;
3354        _this41.open(e.currentTarget);
3355      });
3356      $('.js-profpopup-close').on('click', function (e) {
3357        e.preventDefault();
3358        if (_this41.isAnimating) return;
3359        _this41.close();
3360      });
3361
3362      //
3363      var initParam = Util.getURLParam('interview');
3364      if (initParam) {
3365        var $target = $("[data-profpopup-name=\"".concat(initParam, "\"]"));
3366        if ($target.length <= 0) return;
3367        if (this.isAnimating) return;
3368        this.open($target[0]);
3369      }
3370    }
3371  }, {
3372    key: "open",
3373    value: function open(el) {
3374      var _this42 = this;
3375      var id = null;
3376      if (this.openEl) {
3377        id = this.openEl.attr('id');
3378      }
3379      if (this.isAnimating) return;
3380      this.close();
3381      var target = $(el).data('profpopup');
3382      if (!target) return;
3383      var $target = $("#".concat(target));
3384      if (!$target.length) return;
3385      this.isAnimating = true;
3386      var tl = gsap.timeline();
3387      if (id && id === target) {
3388        return;
3389      }
3390      if (this.openEl) {
3391        this.close(this.openEl);
3392        this.openEl = null;
3393      }
3394      tl.set($target, {
3395        display: 'block',
3396        opacity: 0,
3397        y: '50px'
3398      }).to($target, {
3399        opacity: 1,
3400        duration: .4,
3401        ease: Power2.easeOut
3402      }).to($target, {
3403        y: 0,
3404        duration: .4,
3405        delay: -.4,
3406        ease: Power3.easeOut,
3407        onComplete: function onComplete() {
3408          _this42.isAnimating = false;
3409          _this42.openEl = $target;
3410        }
3411      });
3412    }
3413  }, {
3414    key: "close",
3415    value: function close() {
3416      var _this43 = this;
3417      var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
3418      if (el || this.openEl) {
3419        var $target = el || this.openEl;
3420        this.openEl = null;
3421        this.isAnimating = true;
3422        var tl = gsap.timeline();
3423        tl.set($target, {
3424          pointerEvents: 'none'
3425        }).to($target, {
3426          opacity: 0,
3427          duration: .6,
3428          ease: Power2.easeOut
3429        }).set($target, {
3430          display: 'none',
3431          pointerEvents: '',
3432          onComplete: function onComplete() {
3433            _this43.isAnimating = false;
3434          }
3435        });
3436      }
3437    }
3438  }]);
3439  return ProfPopup;
3440}();
3441var Sidebar = /*#__PURE__*/function () {
3442  function Sidebar() {
3443    _classCallCheck(this, Sidebar);
3444    this.target = 'js-sidebar';
3445    this.$el = $(".".concat(this.target));
3446    this.prevPos = 0;
3447    this.isDown = false;
3448    this.isOpen = true;
3449    this.LoginUtil = new Login();
3450    this.isABSpfix = this.$el.hasClass('ab-spfix') || false;
3451    this.isLogin = null;
3452    this.key = 'firstVisit';
3453    if (this.$el.length) {
3454      this.init();
3455    }
3456  }
3457  _createClass(Sidebar, [{
3458    key: "init",
3459    value: function init() {
3460      if (isMobile()) {
3461        this.scrollEvent();
3462        this.clickEvent();
3463
3464        // ABテスト対応 SP時にサイドバーを表示した状態で固定する
3465        if (this.isABSpfix) {
3466          this.showBar();
3467        }
3468        // ABテスト対応  ここまで(終了時に上記範囲を削除)
3469      } else {
3470        this.hideSection();
3471      }
3472      // this.getJsonData();
3473      this.checkLogin();
3474      this.fukidasiClose();
3475      this.bannerClose();
3476    }
3477  }, {
3478    key: "getBasicData",
3479    value: function () {
3480      var _getBasicData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
3481        return _regeneratorRuntime().wrap(function _callee5$(_context5) {
3482          while (1) switch (_context5.prev = _context5.next) {
3483            case 0:
3484              if (window.basicData) {
3485                _context5.next = 5;
3486                break;
3487              }
3488              _context5.next = 3;
3489              return new Promise(function (resolve) {
3490                return setTimeout(resolve, 1000);
3491              });
3492            case 3:
3493              _context5.next = 0;
3494              break;
3495            case 5:
3496              return _context5.abrupt("return", window.basicData);
3497            case 6:
3498            case "end":
3499              return _context5.stop();
3500          }
3501        }, _callee5);
3502      }));
3503      function getBasicData() {
3504        return _getBasicData.apply(this, arguments);
3505      }
3506      return getBasicData;
3507    }()
3508  }, {
3509    key: "checkLogin",
3510    value: function () {
3511      var _checkLogin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
3512        var _this44 = this;
3513        var now, hour, greeting;
3514        return _regeneratorRuntime().wrap(function _callee7$(_context7) {
3515          while (1) switch (_context7.prev = _context7.next) {
3516            case 0:
3517              _context7.next = 2;
3518              return this.LoginUtil.checkLogin();
3519            case 2:
3520              this.isLogin = _context7.sent;
3521              now = new Date();
3522              hour = now.getHours();
3523              greeting = hour >= 3 && hour < 11 ? 'おはようございます' : hour >= 11 && hour < 19 ? 'こんにちは' : 'こんばんは';
3524              setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
3525                var _userdata$main_charac, _getBannerImg$login, _getBannerImg$login2, _getBannerImg$login3, userdata, sideIcon, _username, getBannerImg, bannerImg, bannerLink, bannerTarget, parent, children, fukidasiElm, fukidasi, $icon, displayName, _getBannerImg$nologin, _getBannerImg$nologin2, _getBannerImg$nologin3, _getBannerImg, _bannerImg, _bannerLink, _bannerTarget, _parent, _children, _fukidasiElm, _fukidasi;
3526                return _regeneratorRuntime().wrap(function _callee6$(_context6) {
3527                  while (1) switch (_context6.prev = _context6.next) {
3528                    case 0:
3529                      if (!(_this44.isLogin === true)) {
3530                        _context6.next = 22;
3531                        break;
3532                      }
3533                      _this44.$el.find('[data-content="login"]').css('display', isMobile() ? 'flex' : 'block');
3534                      _this44.$el.fadeIn(400);
3535                      _context6.next = 5;
3536                      return _this44.getBasicData();
3537                    case 5:
3538                      userdata = _context6.sent;
3539                      sideIcon = userdata === null || userdata === void 0 ? void 0 : (_userdata$main_charac = userdata.main_character) === null || _userdata$main_charac === void 0 ? void 0 : _userdata$main_charac.img_icon;
3540                      _username = userdata === null || userdata === void 0 ? void 0 : userdata.nickname;
3541                      _context6.next = 10;
3542                      return _this44.getBannerJson();
3543                    case 10:
3544                      getBannerImg = _context6.sent;
3545                      bannerImg = getBannerImg === null || getBannerImg === void 0 ? void 0 : (_getBannerImg$login = getBannerImg.login) === null || _getBannerImg$login === void 0 ? void 0 : _getBannerImg$login.image;
3546                      bannerLink = getBannerImg === null || getBannerImg === void 0 ? void 0 : (_getBannerImg$login2 = getBannerImg.login) === null || _getBannerImg$login2 === void 0 ? void 0 : _getBannerImg$login2.link.url;
3547                      bannerTarget = getBannerImg === null || getBannerImg === void 0 ? void 0 : (_getBannerImg$login3 = getBannerImg.login) === null || _getBannerImg$login3 === void 0 ? void 0 : _getBannerImg$login3.link.target;
3548                      if (bannerImg) {
3549                        $('.l-sidebar__banner-content img').last().attr('src', bannerImg);
3550                      } else {
3551                        $('.l-sidebar__banner-content').remove();
3552                      }
3553                      if (bannerLink) {
3554                        $('.l-sidebar__banner-content').last().attr('href', bannerLink);
3555                        $('.l-sidebar__banner-content').last().attr('target', bannerTarget);
3556                      } else {
3557                        parent = $('.l-sidebar__banner-content');
3558                        children = $('.l-sidebar__banner-content').last().children().detach();
3559                        parent.remove();
3560                        _this44.$el.find('[data-content="login"]:last').append(children);
3561                      }
3562                      fukidasiElm = $('.js-side-fukidasi');
3563                      fukidasi = document.querySelectorAll('.js-side-fukidasi span'); // const sideIcon = null;
3564                      if (sideIcon) {
3565                        $icon = _this44.$el.find('.js-side-icon');
3566                        $icon.on('load', function (e) {
3567                          $('.js-side-defaulticon').fadeOut(600);
3568                          setTimeout(function () {
3569                            $('.js-side-myportal').removeClass('-mypage');
3570                            ;
3571                            $('.js-side-myportal').addClass('-mychara');
3572                            ;
3573                            $('.js-side-myicon').fadeIn();
3574                            $icon.fadeIn();
3575                          }, 601);
3576                        });
3577                        _this44.$el.find('.js-side-icon').attr('src', sideIcon);
3578                      }
3579                      if (!sessionStorage.getItem(_this44.key)) {
3580                        setTimeout(function () {
3581                          $('.js-side-fukidasi').fadeIn();
3582                        }, 601);
3583                        if (innerWidth < 786) {
3584                          setTimeout(function () {
3585                            $('.js-sidebar-banner').fadeIn();
3586                          }, 600);
3587                        }
3588                        if (_username) {
3589                          displayName = _username;
3590                          if (_username.length > 8) {
3591                            displayName = _username.slice(0, 8) + '...';
3592                          }
3593                          fukidasi[1].innerHTML = "".concat(displayName, "\u3055\u3093\u3001").concat(greeting, "\u3002<br>Sanrio+\u30DE\u30A4\u30DA\u30FC\u30B8\u306F\u30B3\u30C1\u30E9\uFF01<br><span class=\"sub\">\u203B\u5225\u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u958B\u304D\u307E\u3059</span>");
3594                          _this44.hideFukidasi(fukidasiElm[1]);
3595                        } else {
3596                          fukidasi[1].innerText = "\u30B2\u30B9\u30C8\u3055\u3093\u3001".concat(greeting, "\uFF01\n\u30ED\u30B0\u30A4\u30F3/\u65B0\u898F\u767B\u9332\u306F\u30B3\u30C1\u30E9");
3597                          _this44.hideFukidasi(fukidasiElm[1]);
3598                        }
3599                        sessionStorage.setItem(_this44.key, 'visited');
3600                      }
3601                      _context6.next = 34;
3602                      break;
3603                    case 22:
3604                      if (!(_this44.isLogin === false || !username)) {
3605                        _context6.next = 34;
3606                        break;
3607                      }
3608                      _this44.$el.find('[data-content="nologin"]').css('display', isMobile() ? 'flex' : 'block');
3609                      _this44.$el.fadeIn(400);
3610                      _context6.next = 27;
3611                      return _this44.getBannerJson();
3612                    case 27:
3613                      _getBannerImg = _context6.sent;
3614                      _bannerImg = _getBannerImg === null || _getBannerImg === void 0 ? void 0 : (_getBannerImg$nologin = _getBannerImg.nologin) === null || _getBannerImg$nologin === void 0 ? void 0 : _getBannerImg$nologin.image;
3615                      _bannerLink = _getBannerImg === null || _getBannerImg === void 0 ? void 0 : (_getBannerImg$nologin2 = _getBannerImg.nologin) === null || _getBannerImg$nologin2 === void 0 ? void 0 : _getBannerImg$nologin2.link.url;
3616                      _bannerTarget = _getBannerImg === null || _getBannerImg === void 0 ? void 0 : (_getBannerImg$nologin3 = _getBannerImg.nologin) === null || _getBannerImg$nologin3 === void 0 ? void 0 : _getBannerImg$nologin3.link.target;
3617                      if (_bannerImg) {
3618                        $('.l-sidebar__banner-content img').first().attr('src', _bannerImg);
3619                      } else {
3620                        $('.l-sidebar__banner-content').remove();
3621                      }
3622                      if (_bannerLink) {
3623                        $('.l-sidebar__banner-content').first().attr('href', _bannerLink);
3624                        $('.l-sidebar__banner-content').first().attr('target', _bannerTarget);
3625                      } else {
3626                        _parent = $('.l-sidebar__banner-content');
3627                        _children = $('.l-sidebar__banner-content').first().children().detach();
3628                        _parent.remove();
3629                        _this44.$el.find('[data-content="nologin"]:last').append(_children);
3630                      }
3631                      if (!sessionStorage.getItem(_this44.key)) {
3632                        $('.js-side-fukidasi').css('display', 'block');
3633                        _fukidasiElm = $('.js-side-fukidasi');
3634                        _fukidasi = document.querySelectorAll('.js-side-fukidasi span');
3635                        _fukidasi[0].innerText = "\u30B2\u30B9\u30C8\u3055\u3093\u3001".concat(greeting, "\uFF01\n\u30ED\u30B0\u30A4\u30F3/\u65B0\u898F\u767B\u9332\u306F\u30B3\u30C1\u30E9");
3636                        _this44.hideFukidasi(_fukidasiElm[0]);
3637                        if (innerWidth < 786) {
3638                          $('.js-sidebar-banner').css('display', 'block');
3639                        }
3640                        sessionStorage.setItem(_this44.key, 'visited');
3641                      }
3642                    case 34:
3643                    case "end":
3644                      return _context6.stop();
3645                  }
3646                }, _callee6);
3647              })), 100);
3648            case 7:
3649            case "end":
3650              return _context7.stop();
3651          }
3652        }, _callee7, this);
3653      }));
3654      function checkLogin() {
3655        return _checkLogin.apply(this, arguments);
3656      }
3657      return checkLogin;
3658    }()
3659  }, {
3660    key: "hideSection",
3661    value: function hideSection() {
3662      var _this45 = this;
3663      var isCheck = null;
3664      var anim = null;
3665      $(window).on('scroll', function () {
3666        if (!isCheck) {
3667          isCheck = setTimeout(function () {
3668            ScrollTrigger.update();
3669            isCheck = null;
3670          }, 4000);
3671        }
3672      });
3673      gsap.to(this.$el, {
3674        scrollTrigger: {
3675          trigger: '#js-footer',
3676          // markers: true,
3677          start: 'top 560px',
3678          onToggle: function onToggle(self) {
3679            var isActive = self.isActive;
3680            if (anim) {
3681              anim.pause();
3682              anim = null;
3683            }
3684            if (isActive) {
3685              anim = gsap.timeline();
3686              anim.to(_this45.$el, {
3687                opacity: 0
3688              }).set(_this45.$el, {
3689                display: 'none'
3690              });
3691            } else {
3692              anim = gsap.timeline();
3693              anim.set(_this45.$el, {
3694                display: 'block'
3695              }).to(_this45.$el, {
3696                opacity: 1
3697              });
3698            }
3699          }
3700        }
3701      });
3702    }
3703  }, {
3704    key: "clickEvent",
3705    value: function clickEvent() {
3706      var _this46 = this;
3707      var target = $(".".concat(this.target, "-trigger")).on('click', function (e) {
3708        e.preventDefault();
3709        if (!_this46.isOpen) _this46.openBar();
3710      });
3711    }
3712  }, {
3713    key: "scrollEvent",
3714    value: function scrollEvent() {
3715      var _this47 = this;
3716      $(window).on('scroll.sidebar', function (e) {
3717        var current = $(window).scrollTop();
3718        var _isDown = current > _this47.prevPos;
3719        var delay = _this47.isAnimating ? 0.85 : 0;
3720        if (_isDown && !_this47.isDown) {
3721          _this47.hideBar();
3722        } else if (!_isDown && _this47.isDown) {
3723          _this47.showBar();
3724        }
3725        _this47.isDown = _isDown;
3726        _this47.prevPos = current;
3727      });
3728    }
3729  }, {
3730    key: "hideBar",
3731    value: function hideBar() {
3732      var _this48 = this;
3733      this.$el.addClass('js-is-hide');
3734      setTimeout(function () {
3735        _this48.closeBar();
3736        _this48.isOpen = false;
3737      }, 300);
3738    }
3739  }, {
3740    key: "showBar",
3741    value: function showBar() {
3742      this.$el.removeClass('js-is-hide');
3743    }
3744  }, {
3745    key: "openBar",
3746    value: function openBar() {
3747      var tl = gsap.timeline();
3748      tl.set('.js-sidebar-content', {
3749        display: 'block',
3750        scaleX: 1
3751      }).set('.js-sidebar-list', _defineProperty({
3752        opacity: 0
3753      }, "opacity", 1));
3754
3755      // gsap.set('.js-sidebar-trigger', {
3756      //   display: 'none'
3757      // })
3758    }
3759  }, {
3760    key: "closeBar",
3761    value: function closeBar() {
3762      if (this.isABSpfix) {
3763        var tl = gsap.timeline();
3764        tl.set('.js-sidebar-list', {
3765          opacity: 0
3766        })
3767        // .set('.js-sidebar-trigger', {
3768        //   display: 'block'
3769        // })
3770        .set('.js-sidebar-content', {
3771          scaleX: 0,
3772          display: 'none'
3773        });
3774      } else {
3775        gsap.set('.js-sidebar-content', {
3776          display: 'none'
3777        });
3778        // gsap.set('.js-sidebar-trigger', {
3779        //   display: 'block'
3780        // })
3781      }
3782    }
3783  }, {
3784    key: "fukidasiClose",
3785    value: function fukidasiClose() {
3786      $('.js-side-close').each(function () {
3787        $(this).on('click', function (e) {
3788          e.preventDefault();
3789          $('.js-side-fukidasi').fadeOut();
3790        });
3791      });
3792    }
3793  }, {
3794    key: "bannerClose",
3795    value: function bannerClose() {
3796      $('.js-side-close').each(function () {
3797        $(this).on('click', function (e) {
3798          e.preventDefault();
3799          $('.js-sidebar-banner').fadeOut();
3800        });
3801      });
3802    }
3803  }, {
3804    key: "hideFukidasi",
3805    value: function hideFukidasi(_el) {
3806      var el = $(_el);
3807      $(window).scroll(function () {
3808        var elHeight = el.offset().top;
3809        if (elHeight > 800) {
3810          el.fadeOut();
3811        }
3812      });
3813    }
3814  }, {
3815    key: "getBannerJson",
3816    value: function () {
3817      var _getBannerJson = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
3818        var JSON_BASE, endpoint, response, result;
3819        return _regeneratorRuntime().wrap(function _callee8$(_context8) {
3820          while (1) switch (_context8.prev = _context8.next) {
3821            case 0:
3822              JSON_BASE = window.JSON_BASE;
3823              endpoint = "".concat(JSON_BASE, "system/json/sanrioplus.json");
3824              _context8.prev = 2;
3825              _context8.next = 5;
3826              return axios.get(endpoint);
3827            case 5:
3828              response = _context8.sent;
3829              result = response.data.sanrioplus.banners;
3830              return _context8.abrupt("return", result);
3831            case 10:
3832              _context8.prev = 10;
3833              _context8.t0 = _context8["catch"](2);
3834              console.error("Error fetching JSON:", _context8.t0);
3835              // throw error;
3836            case 13:
3837            case "end":
3838              return _context8.stop();
3839          }
3840        }, _callee8, null, [[2, 10]]);
3841      }));
3842      function getBannerJson() {
3843        return _getBannerJson.apply(this, arguments);
3844      }
3845      return getBannerJson;
3846    }()
3847  }]);
3848  return Sidebar;
3849}();
3850var PageTop = /*#__PURE__*/function () {
3851  function PageTop() {
3852    _classCallCheck(this, PageTop);
3853    this.init();
3854  }
3855  _createClass(PageTop, [{
3856    key: "init",
3857    value: function init() {
3858      $('.js-pagetop').on('click', function (e) {
3859        e.preventDefault();
3860        gsap.to(window, {
3861          scrollTo: 0,
3862          duration: .8,
3863          ease: Power3.easeOut
3864        });
3865      });
3866    }
3867  }]);
3868  return PageTop;
3869}();
3870var Bg = /*#__PURE__*/function () {
3871  function Bg() {
3872    _classCallCheck(this, Bg);
3873  }
3874  _createClass(Bg, [{
3875    key: "Generate",
3876    value: function Generate() {
3877      var _this49 = this;
3878      this.target = '#js-bg';
3879      this.wrapper = $(this.target);
3880      this.startPositionEl = $("".concat(this.target, "-start"));
3881      this.resizeEvent();
3882      return new Promise(function (resolve, reject) {
3883        if (_this49.wrapper.length) {
3884          _this49.generateBg().then(function () {
3885            resolve();
3886          });
3887        } else {
3888          resolve();
3889        }
3890      });
3891    }
3892  }, {
3893    key: "generateBg",
3894    value: function generateBg() {
3895      var _this50 = this;
3896      return new Promise(function (resolve, reject) {
3897        var startPos = 0; // 最初の位置
3898        var ballSize = !isMobile() ? 650 : 350; // ボールの大きさ
3899        var spaceBetween = !isMobile() ? 400 : 350; // ボールの間隔
3900        var pageHeight = _this50.wrapper.height();
3901        var bottomSpace = !isMobile() ? 500 : 1200;
3902        var ballNum = Math.floor((pageHeight - bottomSpace - _this50.startPositionEl.offset().top) / (ballSize + spaceBetween));
3903        if (_this50.startPositionEl.length) {
3904          startPos = _this50.startPositionEl.offset().top - (!isMobile() ? 100 : 30);
3905        }
3906        for (var i = 0; i < ballNum; i++) {
3907          var ball = _this50.generateBallHtml();
3908          var position = startPos + (ballSize + spaceBetween) * i;
3909          ball.style.top = "".concat(position, "px");
3910          ball.classList.add(i % 2 === 0 ? '-right' : '-left');
3911          $(ball).attr('data-parallax', 'y');
3912          _this50.wrapper.append(ball);
3913        }
3914        resolve();
3915      });
3916    }
3917  }, {
3918    key: "generateBallHtml",
3919    value: function generateBallHtml() {
3920      var ball = document.createElement('div');
3921      var ballItem = document.createElement('div');
3922      ball.classList.add('l-body__bgItem');
3923      ballItem.classList.add('c-deco-ball');
3924      ball.appendChild(ballItem);
3925      return ball;
3926    }
3927  }, {
3928    key: "resizeEvent",
3929    value: function resizeEvent() {
3930      var _this51 = this;
3931      var prevIsMobile = isMobile();
3932      $(window).on('resize', function () {
3933        var _currentIsMobile = isMobile();
3934        if (prevIsMobile !== _currentIsMobile) {
3935          _this51.wrapper.empty();
3936          _this51.generateBg();
3937          prevIsMobile = _currentIsMobile;
3938        }
3939      });
3940    }
3941  }]);
3942  return Bg;
3943}();
3944var Hover = /*#__PURE__*/function () {
3945  function Hover() {
3946    var _this52 = this;
3947    _classCallCheck(this, Hover);
3948    this.$els = $('[data-hover-trigger]');
3949    this.$els.each(function (i, el) {
3950      _this52.init(el);
3951    });
3952  }
3953  _createClass(Hover, [{
3954    key: "init",
3955    value: function init(el) {
3956      // hoverしたとき
3957      el.addEventListener('mouseenter', function (e) {
3958        var _el = e.currentTarget;
3959        if (isMobile()) return;
3960        // const target = _el.dataset.hoverTrigger;
3961        var target = $(el).data('hover-trigger');
3962        if (!target) return;
3963        $("[data-hover-target=\"".concat(target, "\"]")).addClass('js-is-hover');
3964      });
3965      el.addEventListener('mouseleave', function (e) {
3966        var _el = e.currentTarget;
3967        if (isMobile()) return;
3968        // const target = _el.dataset.hoverTrigger;
3969        var target = $(el).data('hover-trigger');
3970        if (!target) return;
3971        $("[data-hover-target=\"".concat(target, "\"]")).removeClass('js-is-hover');
3972      });
3973    }
3974  }]);
3975  return Hover;
3976}();
3977/**
3978 * Accordion.
3979 *
3980 * @export
3981 * @class Accordion
3982 */
3983var Accordion = /*#__PURE__*/function () {
3984  function Accordion(opt) {
3985    var _this53 = this;
3986    _classCallCheck(this, Accordion);
3987    this.opt = opt;
3988    this.el = _toConsumableArray(document.getElementsByClassName(opt.el));
3989    this.toggleClass = opt.on;
3990    if (this.el) {
3991      var body = document.getElementsByClassName("c-accordion-body");
3992      for (var i = 0; i < this.el.length; i++) {
3993        var isOpen = body[i].classList.contains('is-open');
3994        if (!isOpen) {
3995          gsap.set(body[i], {
3996            opacity: 0,
3997            display: 'none'
3998          });
3999        }
4000        this.el[i].addEventListener('click', function (e) {
4001          _this53.btnToggle(e);
4002        }, false);
4003      }
4004    }
4005  }
4006  _createClass(Accordion, [{
4007    key: "btnToggle",
4008    value: function btnToggle(e) {
4009      var el = e.currentTarget.parentNode;
4010      if (!el.classList.contains(this.toggleClass)) {
4011        this.btnOn(el);
4012      } else {
4013        if (this.once) return;
4014        this.btnOff(el);
4015      }
4016    }
4017  }, {
4018    key: "btnOn",
4019    value: function btnOn(el) {
4020      if (!el.classList.contains(this.toggleClass)) {
4021        this.body = el.getElementsByClassName("c-accordion-body")[0];
4022        gsap.to(this.body, {
4023          opacity: 1,
4024          display: 'block'
4025        });
4026        el.classList.add(this.toggleClass);
4027      }
4028    }
4029  }, {
4030    key: "btnOff",
4031    value: function btnOff(el) {
4032      if (el.classList.contains(this.toggleClass)) {
4033        this.body = el.getElementsByClassName("c-accordion-body")[0];
4034        gsap.to(this.body, {
4035          opacity: 0,
4036          display: 'none'
4037        });
4038        el.classList.remove(this.toggleClass);
4039      }
4040    }
4041  }]);
4042  return Accordion;
4043}(); // globals
4044var ReloadEvent = /*#__PURE__*/function () {
4045  function ReloadEvent(el, opt) {
4046    _classCallCheck(this, ReloadEvent);
4047    this.el = el;
4048    this.opt = opt;
4049    if (isMobile()) {
4050      this.flag = false;
4051    } else {
4052      this.flag = true;
4053    }
4054    this.resize();
4055  }
4056  _createClass(ReloadEvent, [{
4057    key: "resize",
4058    value: function resize() {
4059      var _this54 = this;
4060      $(window).on('resize', function () {
4061        if (isMobile() && _this54.flag) {
4062          _this54.flag = false;
4063          location.reload(true);
4064        } else if (!isMobile() && !_this54.flag) {
4065          _this54.flag = true;
4066          location.reload(true);
4067        }
4068      });
4069    }
4070  }]);
4071  return ReloadEvent;
4072}();
4073var CharacterHistory = /*#__PURE__*/function () {
4074  function CharacterHistory() {
4075    _classCallCheck(this, CharacterHistory);
4076    this.$jsonEl = $('#characters-summary');
4077    this.$listEl = $('#js-characters-summary-list');
4078    this.characterData = null;
4079    if (this.$jsonEl.length && this.$listEl.length) this.init();
4080  }
4081  _createClass(CharacterHistory, [{
4082    key: "init",
4083    value: function init() {
4084      var _this55 = this;
4085      // 記事のキャラデータを取得
4086      var character_json = JSON.parse(this.$jsonEl.html());
4087      this.characterData = character_json;
4088
4089      // コンテンツをセット 同じキャラは削除
4090      var historyData = this.getLocalStrageHistory();
4091      historyData = historyData.filter(function (item) {
4092        return !(item.id === _this55.characterData.id);
4093      });
4094      if (historyData.length > 0) {
4095        this.setList(historyData);
4096      } else {
4097        $('#js-characters-summary-sec').hide();
4098      }
4099
4100      // 履歴を更新
4101      setTimeout(function () {
4102        _this55.setLocalStrageHistory(_this55.characterData);
4103      }, 1);
4104    }
4105  }, {
4106    key: "setList",
4107    value: function setList(list) {
4108      var listData = _toConsumableArray(list);
4109      var app = new Vue({
4110        el: this.$listEl[0],
4111        data: {
4112          list: listData
4113        },
4114        computed: {
4115          showList: function showList() {
4116            return this.list.slice(0, 5);
4117          }
4118        }
4119      });
4120    }
4121  }, {
4122    key: "getLocalStrageHistory",
4123    value: function getLocalStrageHistory() {
4124      var historyRawData = window.localStorage.getItem('sch');
4125      if (!historyRawData) return [];
4126      var historyData = JSON.parse(historyRawData);
4127      if (historyData && Array.isArray(historyData) && historyData.length > 0) {
4128        return historyData;
4129      }
4130      return [];
4131    }
4132  }, {
4133    key: "setLocalStrageHistory",
4134    value: function setLocalStrageHistory(data) {
4135      var historyRawData = window.localStorage.getItem('sch');
4136      if (historyRawData) {
4137        var historyData = JSON.parse(historyRawData);
4138        historyData = historyData.filter(function (item) {
4139          return !(item.id === data.id);
4140        });
4141        historyData.unshift(data);
4142        var setData = historyData.slice(0, 6);
4143        window.localStorage.setItem('sch', JSON.stringify(setData));
4144      } else {
4145        var initList = [];
4146        initList.unshift(data);
4147        window.localStorage.setItem('sch', JSON.stringify(initList));
4148      }
4149    }
4150  }]);
4151  return CharacterHistory;
4152}();
4153var ClipArticle = /*#__PURE__*/function () {
4154  function ClipArticle() {
4155    _classCallCheck(this, ClipArticle);
4156    this.target = '.js-cliparticle';
4157    this.state = {
4158      isLogin: true,
4159      isClip: false,
4160      isShowPanel: false
4161    };
4162    this.$els = $(this.target);
4163    this.LoginUtil = new Login();
4164    if (this.$els.length > 0) this.init();
4165  }
4166  _createClass(ClipArticle, [{
4167    key: "init",
4168    value: function init() {
4169      var _this56 = this;
4170      this.setup();
4171      this.event();
4172      this.$els.each(function (_, el) {
4173        _this56.checkFav(el);
4174        _this56.event(el);
4175      });
4176    }
4177  }, {
4178    key: "setup",
4179    value: function () {
4180      var _setup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
4181        return _regeneratorRuntime().wrap(function _callee9$(_context9) {
4182          while (1) switch (_context9.prev = _context9.next) {
4183            case 0:
4184              _context9.next = 2;
4185              return this.LoginUtil.checkLogin();
4186            case 2:
4187              this.state.isLogin = _context9.sent;
4188            case 3:
4189            case "end":
4190              return _context9.stop();
4191          }
4192        }, _callee9, this);
4193      }));
4194      function setup() {
4195        return _setup.apply(this, arguments);
4196      }
4197      return setup;
4198    }()
4199  }, {
4200    key: "checkFav",
4201    value: function () {
4202      var _checkFav = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(el) {
4203        var $el, id, $btn, $label;
4204        return _regeneratorRuntime().wrap(function _callee10$(_context10) {
4205          while (1) switch (_context10.prev = _context10.next) {
4206            case 0:
4207              $el = $(el);
4208              id = $el.data('id');
4209              if (id) {
4210                _context10.next = 4;
4211                break;
4212              }
4213              return _context10.abrupt("return");
4214            case 4:
4215              if (this.LoginUtil.isLogin) {
4216                _context10.next = 6;
4217                break;
4218              }
4219              return _context10.abrupt("return");
4220            case 6:
4221              _context10.next = 8;
4222              return this.LoginUtil.checkIsClipFavorite(id);
4223            case 8:
4224              this.state.isClip = _context10.sent;
4225              $btn = $el.find("".concat(this.target, "-trigger"));
4226              $label = $el.find("".concat(this.target, "-label"));
4227              if (this.state.isClip) {
4228                $btn.addClass('-on');
4229                $label.text('クリップを外す');
4230              } else {
4231                $btn.removeClass('-on');
4232                $label.text('この記事をクリップ');
4233              }
4234              // this.updateFav($el,this.state.isClip);
4235            case 12:
4236            case "end":
4237              return _context10.stop();
4238          }
4239        }, _callee10, this);
4240      }));
4241      function checkFav(_x) {
4242        return _checkFav.apply(this, arguments);
4243      }
4244      return checkFav;
4245    }()
4246  }, {
4247    key: "event",
4248    value: function event(el) {
4249      var _this57 = this;
4250      var $el = $(el);
4251      var $btn = $el.find("".concat(this.target, "-trigger"));
4252      $btn.on('click', function (e) {
4253        e.preventDefault();
4254        if (_this57.state.isLogin) {
4255          _this57.toggleClip($el);
4256        } else {
4257          _this57.togglePanel($el);
4258        }
4259      });
4260    }
4261  }, {
4262    key: "toggleClip",
4263    value: function toggleClip($el) {
4264      this.state.isClip = !this.state.isClip;
4265      this.updateFav($el, this.state.isClip);
4266    }
4267  }, {
4268    key: "updateFav",
4269    value: function () {
4270      var _updateFav = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11($el, isClip) {
4271        var id, $btn, $label, res;
4272        return _regeneratorRuntime().wrap(function _callee11$(_context11) {
4273          while (1) switch (_context11.prev = _context11.next) {
4274            case 0:
4275              id = $el.data('id');
4276              $btn = $el.find("".concat(this.target, "-trigger"));
4277              $label = $el.find("".concat(this.target, "-label"));
4278              if (isClip) {
4279                $btn.addClass('-on');
4280                $label.text('クリップを外す');
4281              } else {
4282                $btn.removeClass('-on');
4283                $label.text('この記事をクリップ');
4284              }
4285              _context11.next = 6;
4286              return this.LoginUtil.uodateClipFavoriteState(id, isClip);
4287            case 6:
4288              res = _context11.sent;
4289              return _context11.abrupt("return", res);
4290            case 8:
4291            case "end":
4292              return _context11.stop();
4293          }
4294        }, _callee11, this);
4295      }));
4296      function updateFav(_x2, _x3) {
4297        return _updateFav.apply(this, arguments);
4298      }
4299      return updateFav;
4300    }()
4301  }, {
4302    key: "togglePanel",
4303    value: function togglePanel($el) {
4304      var $panel = $el.find("".concat(this.target, "-panel"));
4305      if (this.state.isShowPanel) {
4306        this.state.isShowPanel = false;
4307        $panel.removeClass('-on');
4308      } else {
4309        this.state.isShowPanel = true;
4310        $panel.addClass('-on');
4311      }
4312    }
4313  }]);
4314  return ClipArticle;
4315}();
4316var FavoriteBtn = /*#__PURE__*/function () {
4317  function FavoriteBtn() {
4318    _classCallCheck(this, FavoriteBtn);
4319    this.target = '.js-FavoriteBtn';
4320    this.state = {
4321      isLogin: false,
4322      isClip: false,
4323      isShowPanel: false,
4324      isFav: false,
4325      isMain: false
4326    };
4327    this.$els = $(this.target);
4328    this.LoginUtil = new Login();
4329    if (this.$els.length > 0) this.init();
4330  }
4331  _createClass(FavoriteBtn, [{
4332    key: "init",
4333    value: function init() {
4334      var _this58 = this;
4335      this.setup();
4336      this.event();
4337      this.$els.each(function (_, el) {
4338        _this58.checkFav(el);
4339        _this58.event(el);
4340      });
4341    }
4342  }, {
4343    key: "setup",
4344    value: function () {
4345      var _setup2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
4346        return _regeneratorRuntime().wrap(function _callee12$(_context12) {
4347          while (1) switch (_context12.prev = _context12.next) {
4348            case 0:
4349              _context12.next = 2;
4350              return this.LoginUtil.checkLogin();
4351            case 2:
4352              this.state.isLogin = _context12.sent;
4353            case 3:
4354            case "end":
4355              return _context12.stop();
4356          }
4357        }, _callee12, this);
4358      }));
4359      function setup() {
4360        return _setup2.apply(this, arguments);
4361      }
4362      return setup;
4363    }()
4364  }, {
4365    key: "checkFav",
4366    value: function () {
4367      var _checkFav2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(el) {
4368        var $el, id, _isFav, $btn;
4369        return _regeneratorRuntime().wrap(function _callee13$(_context13) {
4370          while (1) switch (_context13.prev = _context13.next) {
4371            case 0:
4372              $el = $(el);
4373              id = $el.data('id');
4374              console.log(this.LoginUtil.isLogin);
4375              if (id) {
4376                _context13.next = 5;
4377                break;
4378              }
4379              return _context13.abrupt("return");
4380            case 5:
4381              if (this.LoginUtil.isLogin) {
4382                _context13.next = 7;
4383                break;
4384              }
4385              return _context13.abrupt("return");
4386            case 7:
4387              _context13.next = 9;
4388              return this.LoginUtil.checkIsCharaFavorite(id);
4389            case 9:
4390              _isFav = _context13.sent;
4391              $btn = $el.find("".concat(this.target, "-trigger"));
4392              if (_isFav == 1 || _isFav == 0) {
4393                this.state.isFav = _isFav == 1;
4394                if (this.state.isFav) {
4395                  $btn.addClass('-on');
4396                } else {
4397                  $btn.removeClass('-on');
4398                }
4399                // this.updateFav($el,this.state.isFav);
4400                console.log('updateFav 1111');
4401              } else if (_isFav == 2) {
4402                this.state.isFav = true;
4403                this.state.isMain = true;
4404                $el.find('.js-FavoriteBtn-fav').hide();
4405                $el.find('.js-FavoriteBtn-main').show();
4406              }
4407            case 12:
4408            case "end":
4409              return _context13.stop();
4410          }
4411        }, _callee13, this);
4412      }));
4413      function checkFav(_x4) {
4414        return _checkFav2.apply(this, arguments);
4415      }
4416      return checkFav;
4417    }()
4418  }, {
4419    key: "event",
4420    value: function event(el) {
4421      var _this59 = this;
4422      var $el = $(el);
4423      var $btn = $el.find("".concat(this.target, "-trigger"));
4424      $btn.on('click', function (e) {
4425        e.preventDefault();
4426        if (_this59.state.isMain) {
4427          _this59.togglePanel($el);
4428        } else {
4429          if (_this59.state.isLogin) {
4430            _this59.toggleFav($el);
4431          } else {
4432            _this59.togglePanel($el);
4433          }
4434        }
4435      });
4436    }
4437  }, {
4438    key: "toggleFav",
4439    value: function toggleFav($el) {
4440      this.state.isFav = !this.state.isFav;
4441      this.updateFav($el, this.state.isFav);
4442    }
4443  }, {
4444    key: "updateFav",
4445    value: function () {
4446      var _updateFav2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14($el, isFav) {
4447        var id, $btn, res;
4448        return _regeneratorRuntime().wrap(function _callee14$(_context14) {
4449          while (1) switch (_context14.prev = _context14.next) {
4450            case 0:
4451              console.log('updateFav');
4452              id = $el.data('id');
4453              $btn = $el.find("".concat(this.target, "-trigger"));
4454              if (isFav) {
4455                $btn.addClass('-on');
4456              } else {
4457                $btn.removeClass('-on');
4458              }
4459              _context14.next = 6;
4460              return this.LoginUtil.uodateCharaFavoritState(id, isFav);
4461            case 6:
4462              res = _context14.sent;
4463              return _context14.abrupt("return", res);
4464            case 8:
4465            case "end":
4466              return _context14.stop();
4467          }
4468        }, _callee14, this);
4469      }));
4470      function updateFav(_x5, _x6) {
4471        return _updateFav2.apply(this, arguments);
4472      }
4473      return updateFav;
4474    }()
4475  }, {
4476    key: "togglePanel",
4477    value: function togglePanel($el) {
4478      var $panel = $el.find("".concat(this.target, "-panel"));
4479      if (this.state.isShowPanel) {
4480        this.state.isShowPanel = false;
4481        $panel.removeClass('-on');
4482      } else {
4483        this.state.isShowPanel = true;
4484        $panel.addClass('-on');
4485      }
4486    }
4487  }]);
4488  return FavoriteBtn;
4489}();
4490var DialSlider = /*#__PURE__*/function () {
4491  function DialSlider() {
4492    _classCallCheck(this, DialSlider);
4493    this.target = 'js-dialSlider';
4494    this.$el = $('#' + this.target);
4495    if (!this.$el.length) return false;
4496    this.init();
4497  }
4498  _createClass(DialSlider, [{
4499    key: "init",
4500    value: function init() {
4501      this.currentDeg = 0;
4502      this.bgEl = this.$el.find('#' + this.target + '-bg');
4503      this.bgItems = this.$el.find('.' + this.target + '-bgItem');
4504      this.front();
4505      this.bg();
4506    }
4507  }, {
4508    key: "front",
4509    value: function front() {
4510      var _this60 = this;
4511      this.frontEl = this.$el.find('.swiper');
4512      this.frontSlider = new Swiper(this.frontEl[0], {
4513        effect: 'fade',
4514        fadeEffect: {
4515          crossFade: false
4516        },
4517        loop: true,
4518        loopedSlides: 18,
4519        slidesPerView: 1,
4520        spaceabetween: 0,
4521        allowTouchMove: false,
4522        speed: 800,
4523        autoplay: {
4524          delay: 3000,
4525          disableOnInteraction: false
4526        },
4527        on: {
4528          init: function init(swiper) {
4529            setTimeout(function () {
4530              _this60.onChangeEndEvent(swiper);
4531              _this60.$el.addClass('is-active');
4532            }, 5);
4533          },
4534          slideChangeTransitionStart: function slideChangeTransitionStart(swiper) {
4535            var pic = $(_this60.frontEl).find('.swiper-slide-prev').find('.js-dialSlider-front-img');
4536            gsap.to('#js-dialSlider-name', {
4537              opacity: 0,
4538              duration: 0.6
4539            });
4540            gsap.to(pic, {
4541              scale: 0,
4542              duration: 0.6
4543            });
4544            _this60.onChange();
4545          },
4546          slideChangeTransitionEnd: function slideChangeTransitionEnd(swiper) {
4547            _this60.onChangeEndEvent(swiper);
4548            var pic = $(_this60.frontEl).find('.swiper-slide-active').find('.js-dialSlider-front-img');
4549            var currentSlide = swiper.slides[swiper.activeIndex];
4550            var color = currentSlide === null || currentSlide === void 0 ? void 0 : currentSlide.dataset.characterColor;
4551            if (color) _this60.$el.attr('data-theme-dial', color);
4552            gsap.to(pic, {
4553              scale: 1,
4554              duration: 0.6
4555            });
4556          }
4557        }
4558      });
4559    }
4560  }, {
4561    key: "bg",
4562    value: function bg() {
4563      this.bgAnim(false);
4564    }
4565  }, {
4566    key: "onChange",
4567    value: function onChange() {
4568      this.currentDeg += 360 / this.bgItems.length;
4569      this.bgAnim();
4570      this.bgEl.addClass('is-active');
4571    }
4572  }, {
4573    key: "onChangeEndEvent",
4574    value: function onChangeEndEvent(swiper) {
4575      // 背景のアイテムのフェッチ
4576
4577      var nextSlides = [];
4578      var prevSlides = [];
4579      var activeIndex = swiper.activeIndex;
4580      var slides = swiper.slides;
4581      var length = slides.length;
4582      var currentSlide = swiper.slides[swiper.activeIndex];
4583
4584      // const color = currentSlide.dataset.characterColor;
4585      // if(color) this.$el.attr('data-theme', color);
4586
4587      for (var i = 0; i < 5; i++) {
4588        var nextIndex = (activeIndex + i) % length;
4589        nextSlides.push(slides[nextIndex]);
4590        var prevIndex = (activeIndex - i) % length;
4591        prevSlides.push(slides[prevIndex]);
4592      }
4593      var prevRatateList = [0, 40, 80, 120, 160];
4594      prevSlides.forEach(function (el, i) {
4595        var deg = prevRatateList[i];
4596        // front
4597        var $frontItem = $(el);
4598        var frontImgSrc = $frontItem.find('.js-dialSlider-front-img').attr('src');
4599        var frontHref = $frontItem.attr('href');
4600        // bg
4601        var $bgItem = $(".js-dialSlider-bgItem[data-degree=\"".concat(deg, "\"]"));
4602        var bgImgSrc = $bgItem.find('.js-dialSlider-bg-img').attr('src');
4603        var $bgLink = $bgItem.find('a');
4604        if (frontImgSrc !== bgImgSrc) {
4605          $bgItem.find('.js-dialSlider-bg-img').attr('src', frontImgSrc);
4606        }
4607        if (frontHref !== $bgLink.attr('href')) {
4608          $bgLink.attr('href', frontHref);
4609        }
4610      });
4611      var nextRatateList = [360, 320, 280, 240, 200];
4612      nextSlides.forEach(function (el, i) {
4613        var deg = nextRatateList[i];
4614        // front
4615        var $frontItem = $(el);
4616        var frontImgSrc = $frontItem.find('.js-dialSlider-front-img').attr('src');
4617        var frontHref = $frontItem.attr('href');
4618        // bg
4619        var $bgItem = $(".js-dialSlider-bgItem[data-degree=\"".concat(deg, "\"]"));
4620        var bgImgSrc = $bgItem.find('.js-dialSlider-bg-img').attr('src');
4621        var $bgLink = $bgItem.find('a');
4622        if (frontImgSrc !== bgImgSrc) {
4623          $bgItem.find('.js-dialSlider-bg-img').attr('src', frontImgSrc);
4624        }
4625        if (frontHref !== $bgLink.attr('href')) {
4626          $bgLink.attr('href', frontHref);
4627        }
4628      });
4629      var name = $(currentSlide).data('name');
4630      var nameEn = $(currentSlide).data('name-en');
4631      $('#js-dialSlider-name-ja').text(name);
4632      $('#js-dialSlider-name-en').text(nameEn);
4633      gsap.to('#js-dialSlider-name', {
4634        opacity: 1,
4635        duration: 0.6,
4636        delay: 0.6
4637      });
4638    }
4639  }, {
4640    key: "bgAnim",
4641    value: function bgAnim() {
4642      var _this61 = this;
4643      var isAnim = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
4644      var length = this.bgItems.length;
4645      var bgSize = this.$el.find('#' + this.target + '-bg').width();
4646      this.bgItems.each(function (i, el) {
4647        // 均等に円形に配
4648        var deg = (360 / length * i + _this61.currentDeg) % 360;
4649        var _deg = deg;
4650        switch (_deg) {
4651          case 40:
4652            _deg = 50;
4653            break;
4654          case 80:
4655            _deg = 80;
4656            break;
4657          case 120:
4658            _deg = 115;
4659            break;
4660          case 320:
4661            _deg = 310;
4662            break;
4663          case 280:
4664            _deg = 280;
4665            break;
4666          case 240:
4667            _deg = 245;
4668            break;
4669        }
4670        ;
4671        var rad = _deg * Math.PI / 180;
4672        var x = Math.cos(rad) * bgSize / 2;
4673        var y = Math.sin(rad) * bgSize / 2;
4674
4675        // 0 - 360で今の角度を取得
4676        var posDeg = deg % 360;
4677        el.dataset.degree = posDeg;
4678        $(el).removeClass('is-active');
4679        if (posDeg === 0) $(el).addClass('is-active');
4680        gsap.to(el, {
4681          duration: isAnim ? 1 : 0,
4682          ease: 'power4.out',
4683          transform: "translate(".concat(x, "px, ").concat(y, "px)")
4684        });
4685      });
4686    }
4687  }, {
4688    key: "startAnim",
4689    value: function startAnim() {
4690      var _this62 = this;
4691      var duration = 1000;
4692      var prevChangeTime = 0;
4693      var check = function check() {
4694        var now = Date.now();
4695        if (now - prevChangeTime > duration) {
4696          prevChangeTime = now;
4697          _this62.frontSlider.slideNext();
4698        }
4699        requestAnimationFrame(check);
4700      };
4701    }
4702  }]);
4703  return DialSlider;
4704}();
4705var StoresCount = /*#__PURE__*/function () {
4706  function StoresCount() {
4707    _classCallCheck(this, StoresCount);
4708    this.target = '#p-store';
4709    // this.url = "/system/api/get_shop_region.php";
4710    this.json = {};
4711    this.els = document.querySelector(this.target);
4712    if (this.els) this.init();
4713  }
4714  _createClass(StoresCount, [{
4715    key: "init",
4716    value: function init() {
4717      this.fetchJson();
4718    }
4719  }, {
4720    key: "fetchJson",
4721    value: function () {
4722      var _fetchJson = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
4723        var response;
4724        return _regeneratorRuntime().wrap(function _callee15$(_context15) {
4725          while (1) switch (_context15.prev = _context15.next) {
4726            case 0:
4727              _context15.prev = 0;
4728              _context15.next = 3;
4729              return axios.get("".concat(window.API_BASE_URL, "system/api/get_shop_region.php"), {
4730                headers: {
4731                  'Content-Type': 'application/json'
4732                }
4733              });
4734            case 3:
4735              response = _context15.sent;
4736              this.json = response.data;
4737              this.processData();
4738              _context15.next = 11;
4739              break;
4740            case 8:
4741              _context15.prev = 8;
4742              _context15.t0 = _context15["catch"](0);
4743              console.error("データの取得中にエラーが発生しました:", _c
4743ontext15.t0);
4744            case 11:
4745            case "end":
4746              return _context15.stop();
4747          }
4748        }, _callee15, this, [[0, 8]]);
4749      }));
4750      function fetchJson() {
4751        return _fetchJson.apply(this, arguments);
4752      }
4753      return fetchJson;
4754    }()
4755  }, {
4756    key: "processData",
4757    value: function processData() {
4758      var zeroCountIds = this.json.result.shop_list.filter(function (item) {
4759        return item.count === 0;
4760      }).map(function (item) {
4761        return item.id;
4762      });
4763      var _iterator = _createForOfIteratorHelper(zeroCountIds),
4764        _step;
4765      try {
4766        for (_iterator.s(); !(_step = _iterator.n()).done;) {
4767          var id = _step.value;
4768          var pref = document.querySelector("#pref".concat(id));
4769          // console.log(pref);
4770          if (pref) {
4771            pref.removeAttribute("xlink:href");
4772            var children = pref.children;
4773            for (var i = 0; i < children.length; i++) {
4774              children[i].classList.add("style10");
4775            }
4776          }
4777        }
4778      } catch (err) {
4779        _iterator.e(err);
4780      } finally {
4781        _iterator.f();
4782      }
4783    }
4784  }]);
4785  return StoresCount;
4786}();
4787var Inview = /*#__PURE__*/function () {
4788  function Inview() {
4789    _classCallCheck(this, Inview);
4790    this.els = document.querySelectorAll('[data-inview]');
4791    if (!this.els) return;
4792    this.init();
4793  }
4794  _createClass(Inview, [{
4795    key: "init",
4796    value: function init() {
4797      var _this63 = this;
4798      this.els.forEach(function (el) {
4799        var type = el.dataset.inview;
4800        switch (type) {
4801          case 'fade':
4802            _this63.fade(el);
4803            break;
4804          case 'mark-line-target':
4805            _this63.markLine(el);
4806            break;
4807        }
4808      });
4809    }
4810  }, {
4811    key: "fade",
4812    value: function fade(el) {
4813      gsap.to(el, {
4814        scrollTrigger: {
4815          trigger: el,
4816          start: "top 90%",
4817          onEnter: function onEnter() {
4818            gsap.to(el, {
4819              opacity: 1,
4820              y: 0,
4821              duration: 1,
4822              ease: Power1.easeOut
4823            });
4824          }
4825        }
4826      });
4827    }
4828  }, {
4829    key: "markLine",
4830    value: function markLine(el) {
4831      gsap.to(el, {
4832        scrollTrigger: {
4833          trigger: el,
4834          start: "top 90%",
4835          onEnter: function onEnter() {
4836            var marks = _toConsumableArray(el.querySelectorAll('[data-inview="mark-line"]'));
4837            gsap.to(marks, {
4838              backgroundSize: '100% 100%',
4839              stagger: 0.5,
4840              duration: 1,
4841              ease: Power1.easeOut
4842            });
4843          }
4844        }
4845      });
4846    }
4847  }]);
4848  return Inview;
4849}(); // utils
4850var urlDecoder = function urlDecoder(paramValue) {
4851  // 配列で返す
4852  var res = null;
4853  if (paramValue !== null && paramValue !== void 0 && paramValue.includes(',')) {
4854    // console.log(paramValue.split(','));
4855    res = paramValue.split(',');
4856    // console.log('a', res);
4857  } else if (paramValue !== null && paramValue !== void 0 && paramValue.includes('%2C')) {
4858    var decode = decodeURIComponent(paramValue);
4859    res = JSON.parse("[".concat(decode, "]"));
4860    // console.log('b', res);
4861  } else if (paramValue !== null && paramValue !== void 0 && paramValue.includes('%252C')) {
4862    var _decode = decodeURIComponent(paramValue);
4863    res = JSON.parse("[".concat(_decode, "]"));
4864    // console.log('c', res);
4865  } else {
4866    res = JSON.parse("[".concat(paramValue, "]"));
4867    // console.log('d', res);
4868  }
4869
4870  return res;
4871};
4872var initialParams = function initialParams(_ref4) {
4873  var params = _ref4.params,
4874    key = _ref4.key,
4875    value = _ref4.value,
4876    filterData = _ref4.filterData;
4877  var res = '';
4878
4879  // console.log(params.get(key), decodeURIComponent(params.get(key)));
4880  if (key === 'page' || key === 'pager' || key === 'pg') {
4881    res = params.get(key) != null ? JSON.parse(params.get(key)) : 1;
4882  } else if (key === 'pages') {
4883    var encode = params.get(key) ? decodeURIComponent(params.get(key)) : null;
4884    res = encode ? encode.split(',') : value;
4885    // console.log(res);
4886  } else if (key === 'categories') {
4887    res = params.get(key) != null ? JSON.parse(params.get(key)) : value;
4888    // console.log(key, res);
4889  } else if (key === 'category') {
4890    var _filterData$filter;
4891    // category = slug から obj を抜き出す
4892    var tabId = params.get(key) ? params.get(key) : null;
4893    res = tabId ? (_filterData$filter = filterData.filter(function (d) {
4894      return (d === null || d === void 0 ? void 0 : d.slug) === tabId;
4895    })) === null || _filterData$filter === void 0 ? void 0 : _filterData$filter[0] : value;
4896    // console.log(key, res);
4897  } else if (key === 'tab') {
4898    var _filterData$filter2;
4899    // categories = id から obj を抜き出す
4900    var _tabId = params.get('categories') ? JSON.parse(params.get('categories')) : null;
4901    res = _tabId ? (_filterData$filter2 = filterData.filter(function (d) {
4902      return (d === null || d === void 0 ? void 0 : d.term_id) === _tabId || (d === null || d === void 0 ? void 0 : d.id) === _tabId;
4903    })) === null || _filterData$filter2 === void 0 ? void 0 : _filterData$filter2[0] : value;
4904    // console.log(key, res);
4905  } else if (key === 'chara') {
4906    var characterParam = params.get(key) !== null ? urlDecoder(params.get(key)) : value;
4907    res = (characterParam === null || characterParam === void 0 ? void 0 : characterParam.length) > 0 ? characterParam.map(function (d) {
4908      var _filterData$filter3;
4909      if (d == null) return;
4910      var res = (_filterData$filter3 = filterData.filter(function (f) {
4911        return parseInt(f === null || f === void 0 ? void 0 : f.post_id) === parseInt(d);
4912      })) === null || _filterData$filter3 === void 0 ? void 0 : _filterData$filter3[0];
4913      return res;
4914    }
4914).filter(Boolean) : characterParam;
4915  } else if (key === 'tags') {
4916    var tagParam = params.get(key) !== null ? urlDecoder(params.get(key)) : value;
4917    res = (tagParam === null || tagParam === void 0 ? void 0 : tagParam.length) > 0 ? tagParam.map(function (d) {
4918      var _filterData$filter4;
4919      if (d == null) return;
4920      var res = (_filterData$filter4 = filterData.filter(function (f) {
4921        return parseInt(f === null || f === void 0 ? void 0 : f.id) === parseInt(d) || parseInt(f === null || f === void 0 ? void 0 : f.term_id) === parseInt(d);
4922      })) === null || _filterData$filter4 === void 0 ? void 0 : _filterData$filter4[0];
4923      return res;
4924    }).filter(Boolean) : tagParam;
4925  } else if (key === 'pref' || key === 'w' || key === 'id') {
4926    res = params.get(key) != null ? params.get(key) : '';
4927    // console.log(key, res);
4928  } else if (key === 'key' || key === 'channel') {
4929    res = params.get(key) != null ? params.get(key) : value;
4930    // console.log(key, res);
4931  } else if (key === 'sale_type') {
4932    res = params.get(key) != null ? parseInt(params.get(key)) : value;
4933  }
4934  // console.log(`initialParams____`, res);
4935  return res;
4936};
4937var convertStateParams = function convertStateParams(params) {
4938  var param = '';
4939  var paramArray = [];
4940  for (var _i6 = 0, _Object$entries = Object.entries(params); _i6 < _Object$entries.length; _i6++) {
4941    var _Object$entries$_i = _slicedToArray(_Object$entries[_i6], 2),
4942      key = _Object$entries$_i[0],
4943      value = _Object$entries$_i[1];
4944    if (value === '' || !value) {
4945      // empty
4946    } else if (Array.isArray(value)) {
4947      // console.log(`c  ${key}`);
4948      if ((value === null || value === void 0 ? void 0 : value.length) < 1) {
4949        // empty
4950      } else if (key === 'characters') {
4951        // console.log(`a  ${key}`);
4952        var val = value.map(function (d) {
4953          return d === null || d === void 0 ? void 0 : d.post_id;
4954        });
4955        if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
4956          paramArray.push("chara=".concat(val));
4957        }
4958      } else if (key === 'tags') {
4959        // console.log(`b  ${key}`);
4960        var _val = value.map(function (d) {
4961          var _d$id;
4962          return (_d$id = d === null || d === void 0 ? void 0 : d.id) !== null && _d$id !== void 0 ? _d$id : d === null || d === void 0 ? void 0 : d.term_id;
4963        });
4964        if ((_val === null || _val === void 0 ? void 0 : _val.length) > 0) {
4965          paramArray.push("".concat(key, "=").concat(_val));
4966        }
4967      } else if (key === 'pages') {
4968        // console.log(value);
4969        paramArray.push("".concat(key, "=").concat(value));
4970      } else {
4971        // console.log(`d  ${key}`);
4972        if (value != null) {
4973          paramArray.push("".concat(key, "=").concat(JSON.stringify(value)));
4974        }
4975      }
4976    } else {
4977      // console.log(`d  ${key}`);
4978      if (key === 'pref') {
4979        paramArray.push("".concat(key, "=").concat(JSON.stringify(Number(value))));
4980      } else if (key === 'key' || key === 'category' || key === 'id' || key === 'w') {
4981        paramArray.push("".concat(key, "=").concat(value));
4982      } else if (key === 'channel') {
4983        if (value !== -1) {
4984          paramArray.push("".concat(key, "=").concat(value));
4985        }
4986      } else {
4987        paramArray.push("".concat(key, "=").concat(JSON.stringify(value)));
4988      }
4989    }
4990  }
4991  paramArray = paramArray.join('&');
4992  param = paramArray ? "?".concat(paramArray) : param;
4993  // console.log(`convertStateParams___`, param);
4994  return param;
4995};
4996var convertPostParams = function convertPostParams(params) {
4997  // console.log('convert post params',params)
4998  var res = _objectSpread({}, params);
4999  for (var _i7 = 0, _Object$entries2 = Object.entries(res); _i7 < _Object$entries2.length; _i7++) {
5000    var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i7], 2),
5001      key = _Object$entries2$_i[0],
5002      value = _Object$entries2$_i[1];
5003    if (value === '' || !value) {
5004      // console.log(`a  ${key}`);
5005      delete res[key];
5006    } else if (key === 'id') {
5007      delete res[key];
5008    } else if (Array.isArray(value)) {
5009      // console.log(`d  ${key}`);
5010      if ((value === null || value === void 0 ? void 0 : value.length) < 1) {
5011        delete res[key];
5012      } else if (key === 'characters') {
5013        // console.log(`b  ${key}`);
5014        var val = (value === null || value === void 0 ? void 0 : value.length) > 0 ? value.map(function (d) {
5015          return d === null || d === void 0 ? void 0 : d.post_id;
5016        }) : null;
5017        if (val) {
5018          res['chara'] = val.join(',');
5019          delete res[key];
5020        } else {
5021          delete res[key];
5022        }
5023      } else if (key === 'tags') {
5024        // console.log(`c  ${key}`);
5025        var _val2 = (value === null || value === void 0 ? void 0 : value.length) > 0 ? value.map(function (d) {
5026          var _d$id2;
5027          return (_d$id2 = d === null || d === void 0 ? void 0 : d.id) !== null && _d$id2 !== void 0 ? _d$id2 : d === null || d === void 0 ? void 0 : d.term_id;
5028        }) : null;
5029        if (_val2) {
5030          res['newstag'] = _val2.join(',');
5031          delete res[key];
5032        } else {
5033          delete res[key];
5034        }
5035      } else if (key === 'sale_type') {
5036        res[key] = value === null || value === void 0 ? void 0 : value.join(',');
5037      }
5038    } else {
5039      // console.log(`e  ${key}`);
5040      if (key === 'pref') {
5041        res[key] = value;
5042      } else if (key === 'channel') {
5043        if (value !== -1) {
5044          res[key] = value;
5045        } else {
5046          delete res[key];
5047        }
5048      } else if (key === 'section_id') {
5049        delete res[key];
5050      }
5051    }
5052  }
5053  // console.log(`convertPostParams_____`, res);
5054  return res;
5055};
5056var shuffleCharacters = function shuffleCharacters(array) {
5057  if ((array === null || array === void 0 ? void 0 : array.length) > 0) {
5058    for (var i = array.length - 1; i >= 0; i--) {
5059      var j = Math.floor(Math.random() * (i + 1));
5060      var _ref5 = [array[j], array[i]];
5061      array[i] = _ref5[0];
5062      array[j] = _ref5[1];
5063    }
5064    return array;
5065  } else {
5066    return array;
5067  }
5068};
5069var orderCharacters = function orderCharacters(currentArray, sortArray) {
5070  var currentIds = (currentArray === null || currentArray === void 0 ? void 0 : currentArray.length) > 0 ? currentArray === null || currentArray === void 0 ? void 0 : currentArray.map(function (d) {
5071    return d === null || d === void 0 ? void 0 : d.post_id;
5072  }) : [];
5073  if ((currentIds === null || currentIds === void 0 ? void 0 : currentIds.length) === 0) return sortArray;
5074  sortArray.sort(function (a, b) {
5075    if (currentIds.includes(a.post_id)) return -1;
5076    if (currentIds.includes(b.post_id)) return 0;
5077  });
5078  return sortArray;
5079};
5080var orderChannel = function orderChannel(currentId, sortArray) {
5081  if ((currentId === null || currentId === void 0 ? void 0 : currentId.length) === 0) return sortArray;
5082  sortArray.sort(function (a, b) {
5083    if (currentId === a.channel) return -1;
5084    if (currentId === b.channel) return 0;
5085  });
5086  return sortArray;
5087};
5088var arraySplit = function arraySplit(array, n) {
5089  var res = array.reduce(function (a, c, i) {
5090    return i % n == 0 ? [].concat(_toConsumableArray(a), [[c]]) : [].concat(_toConsumableArray(a.slice(0, -1)), [[].concat(_toConsumableArray(a[a.length - 1]), [c])]);
5091  }, []);
5092  return res;
5093};
5094var judgeShowMore = function judgeShowMore(items, page, per_page) {
5095  if (!(items !== null && items !== void 0 && items.length)) false;
5096  var showNumber = page * per_page;
5097  return showNumber < (items === null || items === void 0 ? void 0 : items.length);
5098};
5099var API_BASE_URL = window.API_BASE_URL;
5100var JSON_BASE_URL = window.JSON_DOMAIN;
5101
5102// ビッグメニュー
5103function getMenu() {
5104  return _getMenu.apply(this, arguments);
5105} // 商品ランキング情報取得API
5106function _getMenu() {
5107  _getMenu = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76() {
5108    var config, res;
5109    return _regeneratorRuntime().wrap(function _callee76$(_context76) {
5110      while (1) switch (_context76.prev = _context76.next) {
5111        case 0:
5112          config = {
5113            method: 'get',
5114            url: API_BASE_URL + "system/api/bigmenu.php" + '?' + new Date().getTime()
5115          };
5116          _context76.prev = 1;
5117          _context76.next = 4;
5118          return axios(config);
5119        case 4:
5120          res = _context76.sent;
5121          if (!(res !== null && res !== void 0 && res.data)) {
5122            _context76.next = 7;
5123            break;
5124          }
5125          return _context76.abrupt("return", res.data.result);
5126        case 7:
5127          _context76.next = 13;
5128          break;
5129        case 9:
5130          _context76.prev = 9;
5131          _context76.t0 = _context76["catch"](1);
5132          console.error(_context76.t0);
5133          throw _context76.t0;
5134        case 13:
5135        case "end":
5136          return _context76.stop();
5137      }
5138    }, _callee76, null, [[1, 9]]);
5139  }));
5140  return _getMenu.apply(this, arguments);
5141}
5142function getGoodsRanking() {
5143  return _getGoodsRanking.apply(this, arguments);
5144} // キャラクター商品取得API
5145function _getGoodsRanking() {
5146  _getGoodsRanking = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77() {
5147    var config, res;
5148    return _regeneratorRuntime().wrap(function _callee77$(_context77) {
5149      while (1) switch (_context77.prev = _context77.next) {
5150        case 0:
5151          config = {
5152            method: 'get',
5153            url: JSON_BASE_URL + "system/json/chara_ec/ranking.json"
5154          };
5155          _context77.prev = 1;
5156          _context77.next = 4;
5157          return axios(config);
5158        case 4:
5159          res = _context77.sent;
5160          return _context77.abrupt("return", res.data);
5161        case 8:
5162          _context77.prev = 8;
5163          _context77.t0 = _context77["catch"](1);
5164          console.error(_context77.t0);
5165          // throw err;
5166        case 11:
5167        case "end":
5168          return _context77.stop();
5169      }
5170    }, _callee77, null, [[1, 8]]);
5171  }));
5172  return _getGoodsRanking.apply(this, arguments);
5173}
5174function getGoodsCharacter(_x7) {
5175  return _getGoodsCharacter.apply(this, arguments);
5176} // デジタル用フィルタ
5177function _getGoodsCharacter() {
5178  _getGoodsCharacter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee78(post_id) {
5179    var config, res;
5180    return _regeneratorRuntime().wrap(function _callee78$(_context78) {
5181      while (1) switch (_context78.prev = _context78.next) {
5182        case 0:
5183          if (post_id) {
5184            _context78.next = 2;
5185            break;
5186          }
5187          return _context78.abrupt("return");
5188        case 2:
5189          config = {
5190            method: 'get',
5191            url: JSON_BASE_URL + "system/json/chara_ec/".concat(post_id, ".json")
5192          };
5193          _context78.prev = 3;
5194          _context78.next = 6;
5195          return axios(config);
5196        case 6:
5197          res = _context78.sent;
5198          if (!(res !== null && res !== void 0 && res.data)) {
5199            _context78.next = 9;
5200            break;
5201          }
5202          return _context78.abrupt("return", res.data);
5203        case 9:
5204          _context78.next = 15;
5205          break;
5206        case 11:
5207          _context78.prev = 11;
5208          _context78.t0 = _context78["catch"](3);
5209          console.error(_context78.t0);
5210          throw _context78.t0;
5211        case 15:
5212        case "end":
5213          return _context78.stop();
5214      }
5215    }, _callee78, null, [[3, 11]]);
5216  }));
5217  return _getGoodsCharacter.apply(this, arguments);
5218}
5219function getFilterDigital() {
5220  return _getFilterDigital.apply(this, arguments);
5221} // スポット用フィルタ
5222function _getFilterDigital() {
5223  _getFilterDigital = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee79() {
5224    var config, res;
5225    return _regeneratorRuntime().wrap(function _callee79$(_context79) {
5226      while (1) switch (_context79.prev = _context79.next) {
5227        case 0:
5228          config = {
5229            method: 'get',
5230            url: JSON_BASE_URL + "system/json/filter_digital.json"
5231          };
5232          _context79.prev = 1;
5233          _context79.next = 4;
5234          return axios(config);
5235        case 4:
5236          res = _context79.sent;
5237          if (!(res !== null && res !== void 0 && res.data)) {
5238            _context79.next = 7;
5239            break;
5240          }
5241          return _context79.abrupt("return", res.data.result);
5242        case 7:
5243          _context79.next = 12;
5244          break;
5245        case 9:
5246          _context79.prev = 9;
5247          _context79.t0 = _context79["catch"](1);
5248          console.error(_context79.t0);
5249          // throw err;
5250        case 12:
5251        case "end":
5252          return _context79.stop();
5253      }
5254    }, _callee79, null, [[1, 9]]);
5255  }));
5256  return _getFilterDigital.apply(this, arguments);
5257}
5258function getFilterSpot() {
5259  return _getFilterSpot.apply(this, arguments);
5260} // グッズ用フィルタ
5261function _getFilterSpot() {
5262  _getFilterSpot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80() {
5263    var config, res;
5264    return _regeneratorRuntime().wrap(function _callee80$(_context80) {
5265      while (1) switch (_context80.prev = _context80.next) {
5266        case 0:
5267          config = {
5268            method: 'get',
5269            url: JSON_BASE_URL + "system/json/filter_spot.json"
5270          };
5271          _context80.prev = 1;
5272          _context80.next = 4;
5273          return axios(config);
5274        case 4:
5275          res = _context80.sent;
5276          if (!(res !== null && res !== void 0 && res.data)) {
5277            _context80.next = 7;
5278            break;
5279          }
5280          return _context80.abrupt("return", res.data.result);
5281        case 7:
5282          _context80.next = 12;
5283          break;
5284        case 9:
5285          _context80.prev = 9;
5286          _context80.t0 = _context80["catch"](1);
5287          console.error(_context80.t0);
5288          // throw err;
5289        case 12:
5290        case "end":
5291          return _context80.stop();
5292      }
5293    }, _callee80, null, [[1, 9]]);
5294  }));
5295  return _getFilterSpot.apply(this, arguments);
5296}
5297function getFilterGoods() {
5298  return _getFilterGoods.apply(this, arguments);
5299}
5299 // ニュース用フィルタ
5300function _getFilterGoods() {
5301  _getFilterGoods = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee81() {
5302    var config, res;
5303    return _regeneratorRuntime().wrap(function _callee81$(_context81) {
5304      while (1) switch (_context81.prev = _context81.next) {
5305        case 0:
5306          config = {
5307            method: 'get',
5308            url: JSON_BASE_URL + "system/json/filter_goods.json"
5309          };
5310          _context81.prev = 1;
5311          _context81.next = 4;
5312          return axios(config);
5313        case 4:
5314          res = _context81.sent;
5315          if (!(res !== null && res !== void 0 && res.data)) {
5316            _context81.next = 7;
5317            break;
5318          }
5319          return _context81.abrupt("return", res.data.result);
5320        case 7:
5321          _context81.next = 12;
5322          break;
5323        case 9:
5324          _context81.prev = 9;
5325          _context81.t0 = _context81["catch"](1);
5326          console.error(_context81.t0);
5327          // throw err;
5328        case 12:
5329        case "end":
5330          return _context81.stop();
5331      }
5332    }, _callee81, null, [[1, 9]]);
5333  }));
5334  return _getFilterGoods.apply(this, arguments);
5335}
5336function getFilterNews() {
5337  return _getFilterNews.apply(this, arguments);
5338} // ムービーTOPの下一覧
5339function _getFilterNews() {
5340  _getFilterNews = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee82() {
5341    var config, res;
5342    return _regeneratorRuntime().wrap(function _callee82$(_context82) {
5343      while (1) switch (_context82.prev = _context82.next) {
5344        case 0:
5345          config = {
5346            method: 'get',
5347            url: JSON_BASE_URL + "system/json/filter_news.json"
5348          };
5349          _context82.prev = 1;
5350          _context82.next = 4;
5351          return axios(config);
5352        case 4:
5353          res = _context82.sent;
5354          if (!res.data.result) {
5355            _context82.next = 7;
5356            break;
5357          }
5358          return _context82.abrupt("return", res.data.result);
5359        case 7:
5360          _context82.next = 12;
5361          break;
5362        case 9:
5363          _context82.prev = 9;
5364          _context82.t0 = _context82["catch"](1);
5365          console.error(_context82.t0);
5366          // throw err;
5367        case 12:
5368        case "end":
5369          return _context82.stop();
5370      }
5371    }, _callee82, null, [[1, 9]]);
5372  }));
5373  return _getFilterNews.apply(this, arguments);
5374}
5375function getMovieList(_x8) {
5376  return _getMovieList.apply(this, arguments);
5377} // ムービー詳細
5378function _getMovieList() {
5379  _getMovieList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee83(params) {
5380    var _Object$keys;
5381    var config, res, _res$data$result, _res$data$result2;
5382    return _regeneratorRuntime().wrap(function _callee83$(_context83) {
5383      while (1) switch (_context83.prev = _context83.next) {
5384        case 0:
5385          if ((_Object$keys = Object.keys(params)) !== null && _Object$keys !== void 0 && _Object$keys.length) {
5386            _context83.next = 2;
5387            break;
5388          }
5389          return _context83.abrupt("return");
5390        case 2:
5391          config = {
5392            method: 'get',
5393            url: API_BASE_URL + "system/api/get_movie_list.php" + '?' + new Date().getTime(),
5394            params: params,
5395            headers: {
5396              'Content-Type': 'application/json'
5397            }
5398          };
5399          _context83.prev = 3;
5400          _context83.next = 6;
5401          return axios(config);
5402        case 6:
5403          res = _context83.sent;
5404          if (!res.data.result) {
5405            _context83.next = 9;
5406            break;
5407          }
5408          return _context83.abrupt("return", {
5409            data: (_res$data$result = res.data.result) === null || _res$data$result === void 0 ? void 0 : _res$data$result.movie_list,
5410            totalPages: (_res$data$result2 = res.data.result) === null || _res$data$result2 === void 0 ? void 0 : _res$data$result2.pages
5411          });
5412        case 9:
5413          _context83.next = 15;
5414          break;
5415        case 11:
5416          _context83.prev = 11;
5417          _context83.t0 = _context83["catch"](3);
5418          console.error(_context83.t0);
5419          throw _context83.t0;
5420        case 15:
5421        case "end":
5422          return _context83.stop();
5423      }
5424    }, _callee83, null, [[3, 11]]);
5425  }));
5426  return _getMovieList.apply(this, arguments);
5427}
5428function getMovieDetail(_x9) {
5429  return _getMovieDetail.apply(this, arguments);
5430} // - WP ________________________________________________________
5431// news category
5432function _getMovieDetail() {
5433  _getMovieDetail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee84(params) {
5434    var _Object$keys2;
5435    var config, res, _res$data$result3, _res$data$result4;
5436    return _regeneratorRuntime().wrap(function _callee84$(_context84) {
5437      while (1) switch (_context84.prev = _context84.next) {
5438        case 0:
5439          if ((_Object$keys2 = Object.keys(params)) !== null && _Object$keys2 !== void 0 && _Object$keys2.length) {
5440            _context84.next = 2;
5441            break;
5442          }
5443          return _context84.abrupt("return");
5444        case 2:
5445          config = {
5446            method: 'get',
5447            url: API_BASE_URL + "system/api/get_sns_movie.php" + '?' + new Date().getTime(),
5448            params: params
5449          };
5450          _context84.prev = 3;
5451          _context84.next = 6;
5452          return axios(config);
5453        case 6:
5454          res = _context84.sent;
5455          if (!res.data.result) {
5456            _context84.next = 9;
5457            break;
5458          }
5459          return _context84.abrupt("return", {
5460            data: (_res$data$result3 = res.data.result) === null || _res$data$result3 === void 0 ? void 0 : _res$data$result3.movie,
5461            totalPages: (_res$data$result4 = res.data.result) === null || _res$data$result4 === void 0 ? void 0 : _res$data$result4.pages
5462          });
5463        case 9:
5464          _context84.next = 15;
5465          break;
5466        case 11:
5467          _context84.prev = 11;
5468          _context84.t0 = _context84["catch"](3);
5469          console.error(_context84.t0);
5470          throw _context84.t0;
5471        case 15:
5472        case "end":
5473          return _context84.stop();
5474      }
5475    }, _callee84, null, [[3, 11]]);
5476  }));
5477  return _getMovieDetail.apply(this, arguments);
5478}
5479function getWPNewsCategories(_x10) {
5480  return _getWPNewsCategories.apply(this, arguments);
5481} // news hash tag
5482function _getWPNewsCategories() {
5483  _getWPNewsCategories = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee85(params) {
5484    var config, res;
5485    return _regeneratorRuntime().wrap(function _callee85$(_context85) {
5486      while (1) switch (_context85.prev = _context85.next) {
5487        case 0:
5488          config = {
5489            method: 'get',
5490            url: JSON_BASE_URL + "wp-json/wp/v2/categories",
5491            params: params
5492          };
5493          _context85.prev = 1;
5494          _context85.next = 4;
5495          return axios(config);
5496        case 4:
5497          res = _context85.sent;
5498          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5499            _context85.next = 7;
5500            break;
5501          }
5502          return _context85.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5503        case 7:
5504          _context85.next = 12;
5505          break;
5506        case 9:
5507          _context85.prev = 9;
5508          _context85.t0 = _context85["catch"](1);
5509          console.error(_context85.t0);
5510          // throw err;
5511        case 12:
5512        case "end":
5513          return _context85.stop();
5514      }
5515    }, _callee85, null, [[1, 9]]);
5516  }));
5517  return _getWPNewsCategories.apply(this, arguments);
5518}
5519function getWPNewsTags(_x11) {
5520  return _getWPNewsTags.apply(this, arguments);
5521} // news
5522function _getWPNewsTags() {
5523  _getWPNewsTags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee86(params) {
5524    var config, res;
5525    return _regeneratorRuntime().wrap(function _callee86$(_context86) {
5526      while (1) switch (_context86.prev = _context86.next) {
5527        case 0:
5528          config = {
5529            method: 'get',
5530            url: JSON_BASE_URL + "wp-json/wp/v2/tags",
5531            params: params
5532          };
5533          _context86.prev = 1;
5534          _context86.next = 4;
5535          return axios(config);
5536        case 4:
5537          res = _context86.sent;
5538          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5539            _context86.next = 7;
5540            break;
5541          }
5542          return _context86.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5543        case 7:
5544          _context86.next = 13;
5545          break;
5546        case 9:
5547          _context86.prev = 9;
5548          _context86.t0 = _context86["catch"](1);
5549          console.error(_context86.t0);
5550          throw _context86.t0;
5551        case 13:
5552        case "end":
5553          return _context86.stop();
5554      }
5555    }, _callee86, null, [[1, 9]]);
5556  }));
5557  return _getWPNewsTags.apply(this, arguments);
5558}
5559function getWPNews(_x12) {
5560  return _getWPNews.apply(this, arguments);
5561} // digital
5562function _getWPNews() {
5563  _getWPNews = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee87(params) {
5564    var config, res, _res$headers, _res$headers2;
5565    return _regeneratorRuntime().wrap(function _callee87$(_context87) {
5566      while (1) switch (_context87.prev = _context87.next) {
5567        case 0:
5568          config = {
5569            method: 'get',
5570            url: JSON_BASE_URL + "wp-json/wp/v2/news",
5571            params: params
5572          };
5573          _context87.prev = 1;
5574          _context87.next = 4;
5575          return axios(config);
5576        case 4:
5577          res = _context87.sent;
5578          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5579            _context87.next = 7;
5580            break;
5581          }
5582          return _context87.abrupt("return", {
5583            data: res === null || res === void 0 ? void 0 : res.data,
5584            totalPages: res === null || res === void 0 ? void 0 : (_res$headers = res.headers) === null || _res$headers === void 0 ? void 0 : _res$headers['x-wp-totalpages'],
5585            total: res === null || res === void 0 ? void 0 : (_res$headers2 = res.headers) === null || _res$headers2 === void 0 ? void 0 : _res$headers2['x-wp-total']
5586          });
5587        case 7:
5588          _context87.next = 13;
5589          break;
5590        case 9:
5591          _context87.prev = 9;
5592          _context87.t0 = _context87["catch"](1);
5593          console.error(_context87.t0);
5594          throw _context87.t0;
5595        case 13:
5596        case "end":
5597          return _context87.stop();
5598      }
5599    }, _callee87, null, [[1, 9]]);
5600  }));
5601  return _getWPNews.apply(this, arguments);
5602}
5603function getWPDigital() {
5604  return _getWPDigital.apply(this, arguments);
5605} // movie (tiktok, others)
5606function _getWPDigital() {
5607  _getWPDigital = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee88() {
5608    var config, res;
5609    return _regeneratorRuntime().wrap(function _callee88$(_context88) {
5610      while (1) switch (_context88.prev = _context88.next) {
5611        case 0:
5612          config = {
5613            method: 'get',
5614            url: JSON_BASE_URL + "wp-json/sanrio/v1/digital"
5615          };
5616          _context88.prev = 1;
5617          _context88.next = 4;
5618          return axios(config);
5619        case 4:
5620          res = _context88.sent;
5621          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5622            _context88.next = 7;
5623            break;
5624          }
5625          return _context88.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5626        case 7:
5627          _context88.next = 12;
5628          break;
5629        case 9:
5630          _context88.prev = 9;
5631          _context88.t0 = _context88["catch"](1);
5632          console.error(_context88.t0);
5633          // throw err;
5634        case 12:
5635        case "end":
5636          return _context88.stop();
5637      }
5638    }, _callee88, null, [[1, 9]]);
5639  }));
5640  return _getWPDigital.apply(this, arguments);
5641}
5642function getWPMovie() {
5643  return _getWPMovie.apply(this, arguments);
5644} // social media
5645function _getWPMovie() {
5646  _getWPMovie = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee89() {
5647    var config, res;
5648    return _regeneratorRuntime().wrap(function _callee89$(_context89) {
5649      while (1) switch (_context89.prev = _context89.next) {
5650        case 0:
5651          config = {
5652            method: 'get',
5653            url: JSON_BASE_URL + "wp-json/sanrio/v1/movies"
5654          };
5655          _context89.prev = 1;
5656          _context89.next = 4;
5657          return axios(config);
5658        case 4:
5659          res = _context89.sent;
5660          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5661            _context89.next = 7;
5662            break;
5663          }
5664          return _context89.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5665        case 7:
5666          _context89.next = 12;
5667          break;
5668        case 9:
5669          _context89.prev = 9;
5670          _context89.t0 = _context89["catch"](1);
5671          console.error(_context89.t0);
5672          // throw err;
5673        case 12:
5674        case "end":
5675          return _context89.stop();
5676      }
5677    }, _callee89, null, [[1, 9]]);
5678  }));
5679  return _getWPMovie.apply(this, arguments);
5680}
5681function getWPSocialMedia() {
5682  return _getWPSocialMedia.apply(this, arguments);
5683} // site list
5684function _getWPSocialMedia() {
5685  _getWPSocialMedia = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee90() {
5686    var config, res;
5687    return _regeneratorRuntime().wrap(function _callee90$(_context90) {
5688      while (1) switch (_context90.prev = _context90.next) {
5689        case 0:
5690          config = {
5691            method: 'get',
5692            url: JSON_BASE_URL + "wp-json/sanrio/v1/socialmedia" + '?' + new Date().getTime()
5693          };
5694          _context90.prev = 1;
5695          _context90.next = 4;
5696          return axios(config);
5697        case 4:
5698          res = _context90.sent;
5699          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5700            _context90.next = 7;
5701            break;
5702          }
5703          return _context90.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5704        case 7:
5705          _context90.next = 12;
5706          break;
5707        case 9:
5708          _context90.prev = 9;
5709          _context90.t0 = _context90["catch"](1);
5710          console.error(_context90.t0);
5711          // throw err;
5712        case 12:
5713        case "end":
5714          return _context90.stop();
5715      }
5716    }, _callee90, null, [[1, 9]]);
5717  }));
5718  return _getWPSocialMedia.apply(this, arguments);
5719}
5720function getWPSiteList() {
5721  return _getWPSiteList.apply(this, arguments);
5722}
5723function _getWPSiteList() {
5724  _getWPSiteList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee91() {
5725    var config, res;
5726    return _regeneratorRuntime().wrap(function _callee91$(_context91) {
5727      while (1) switch (_context91.prev = _context91.next) {
5728        case 0:
5729          config = {
5730            method: 'get',
5731            url: JSON_BASE_URL + "wp-json/sanrio/v1/sitelist"
5732          };
5733          _context91.prev = 1;
5734          _context91.next = 4;
5735          return axios(config);
5736        case 4:
5737          res = _context91.sent;
5738          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5739            _context91.next = 7;
5740            break;
5741          }
5742          return _context91.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5743        case 7:
5744          _context91.next = 13;
5745          break;
5746        case 9:
5747          _context91.prev = 9;
5748          _context91.t0 = _context91["catch"](1);
5749          console.error(_context91.t0);
5750          throw _context91.t0;
5751        case 13:
5752        case "end":
5753          return _context91.stop();
5754      }
5755    }, _callee91, null, [[1, 9]]);
5756  }));
5757  return _getWPSiteList.apply(this, arguments);
5758}
5759function getWPCalendarEventData() {
5760  return _getWPCalendarEventData.apply(this, arguments);
5761}
5762function _getWPCalendarEventData() {
5763  _getWPCalendarEventData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee92() {
5764    var config, res;
5765    return _regeneratorRuntime().wrap(function _callee92$(_context92) {
5766      while (1) switch (_context92.prev = _context92.next) {
5767        case 0:
5768          config = {
5769            method: 'get',
5770            url: JSON_BASE_URL + "system/json/myportal_calendar.json"
5771          };
5772          _context92.prev = 1;
5773          _context92.next = 4;
5774          return axios(config);
5775        case 4:
5776          res = _context92.sent;
5777          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5778            _context92.next = 7;
5779            break;
5780          }
5781          return _context92.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5782        case 7:
5783          _context92.next = 13;
5784          break;
5785        case 9:
5786          _context92.prev = 9;
5787          _context92.t0 = _context92["catch"](1);
5788          console.error(_context92.t0);
5789          throw _context92.t0;
5790        case 13:
5791        case "end":
5792          return _context92.stop();
5793      }
5794    }, _callee92, null, [[1, 9]]);
5795  }));
5796  return _getWPCalendarEventData.apply(this, arguments);
5797}
5798function _getBirthCharaList() {
5799  return _getBirthCharaList4.apply(this, arguments);
5800}
5801function _getBirthCharaList4() {
5802  _getBirthCharaList4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee93() {
5803    var config, res;
5804    return _regeneratorRuntime().wrap(function _callee93$(_context93) {
5805      while (1) switch (_context93.prev = _context93.next) {
5806        case 0:
5807          config = {
5808            method: 'get',
5809            url: JSON_BASE_URL + "system/json/birth_month_all.json"
5810          };
5811          _context93.prev = 1;
5812          _context93.next = 4;
5813          return axios(config);
5814        case 4:
5815          res = _context93.sent;
5816          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5817            _context93.next = 7;
5818            break;
5819          }
5820          return _context93.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5821        case 7:
5822          _context93.next = 13;
5823          break;
5824        case 9:
5825          _context93.prev = 9;
5826          _context93.t0 = _context93["catch"](1);
5827          console.error(_context93.t0);
5828          throw _context93.t0;
5829        case 13:
5830        case "end":
5831          return _context93.stop();
5832      }
5833    }, _callee93, null, [[1, 9]]);
5834  }));
5835  return _getBirthCharaList4.apply(this, arguments);
5836}
5837function getInstagramData(_x13) {
5838  return _getInstagramData.apply(this, arguments);
5839}
5840function _getInstagramData() {
5841  _getInstagramData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee94(params) {
5842    var timestamp, config, res;
5843    return _regeneratorRuntime().wrap(function _callee94$(_context94) {
5844      while (1) switch (_context94.prev = _context94.next) {
5845        case 0:
5846          // set timestamp
5847          timestamp = new Date().getTime();
5848          params.time = timestamp;
5849          config = {
5850            method: 'get',
5851            url: API_BASE_URL + "system/api/get_instagram4splp.php",
5852            params: params
5853          };
5854          _context94.prev = 3;
5855          _context94.next = 6;
5856          return axios(config);
5857        case 6:
5858          res = _context94.sent;
5859          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5860            _context94.next = 9;
5861            break;
5862          }
5863          return _context94.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5864        case 9:
5865          _context94.next = 15;
5866          break;
5867        case 11:
5868          _context94.prev = 11;
5869          _context94.t0 = _context94["catch"](3);
5870          console.error(_context94.t0);
5871          throw _context94.t0;
5872        case 15:
5873        case "end":
5874          return _context94.stop();
5875      }
5876    }, _callee94, null, [[3, 11]]);
5877  }));
5878  return _getInstagramData.apply(this, arguments);
5879}
5880function getTikTokData(_x14) {
5881  return _getTikTokData.apply(this, arguments);
5882}
5883function _getTikTokData() {
5884  _getTikTokData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee95(params) {
5885    var timestamp, config, res;
5886    return _regeneratorRuntime().wrap(function _callee95$(_context95) {
5887      while (1) switch (_context95.prev = _context95.next) {
5888        case 0:
5889          // set timestamp
5890          timestamp = new Date().getTime();
5891          params.time = timestamp;
5892          config = {
5893            method: 'get',
5894            url: API_BASE_URL + "system/api/get_tiktok4splp.php",
5895            params: params
5896          };
5897          _context95.prev = 3;
5898          _context95.next = 6;
5899          return axios(config);
5900        case 6:
5901          res = _context95.sent;
5902          if (!((res === null || res === void 0 ? void 0 : res.status) === 200)) {
5903            _context95.next = 9;
5904            break;
5905          }
5906          return _context95.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
5907        case 9:
5908          _context95.next = 15;
5909          break;
5910        case 11:
5911          _context95.prev = 11;
5912          _context95.t0 = _context95["catch"](3);
5913          console.error(_context95.t0);
5914          throw _context95.t0;
5915        case 15:
5916        case "end":
5917          return _context95.stop();
5918      }
5919    }, _callee95, null, [[3, 11]]);
5920  }));
5921  return _getTikTokData.apply(this, arguments);
5922}
5923var Sanrioplus_Login_Utility = null;
5924var Login = /*#__PURE__*/function () {
5925  function Login() {
5926    _classCallCheck(this, Login);
5927    if (Sanrioplus_Login_Utility) {
5928      return this;
5929    }
5930    Sanrioplus_Login_Utility = this;
5931    this.isLogin = false;
5932    this.basicData = null;
5933    this.favoriteChara = null;
5934    this.init();
5935  }
5936  _createClass(Login, [{
5937    key: "init",
5938    value: function init() {
5939      this.checkLogin();
5940      if (this.isLogin) {
5941        this.getUserBasicData();
5942      }
5943    }
5944    // ログインをチェック
5945  }, {
5946    key: "checkLogin",
5947    value: function () {
5948      var _checkLogin2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
5949        var cookies, cb, i, _item, key, id;
5950        return _regeneratorRuntime().wrap(function _callee16$(_context16) {
5951          while (1) switch (_context16.prev = _context16.next) {
5952            case 0:
5953              cookies = document.cookie.split('; ');
5954              cb = {};
5955              for (i = 0; i < cookies.length; i++) {
5956                _item = cookies[i].split('=');
5957                key = _item[0];
5958                cb[key] = _item[1];
5959              }
5960              id = cb['sanrio_plus_id'];
5961              this.isLogin = id ? true : false;
5962              return _context16.abrupt("return", this.isLogin);
5963            case 6:
5964            case "end":
5965              return _context16.stop();
5966          }
5967        }, _callee16, this);
5968      }));
5969      function checkLogin() {
5970        return _checkLogin2.apply(this, arguments);
5971      }
5972      return checkLogin;
5973    }() // ユーザーデータを取得
5974  }, {
5975    key: "getUserBasicData",
5976    value: function () {
5977      var _getUserBasicData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
5978        var forceUpdate,
5979          data,
5980          res,
5981          _args17 = arguments;
5982        return _regeneratorRuntime().wrap(function _callee17$(_context17) {
5983          while (1) switch (_context17.prev = _context17.next) {
5984            case 0:
5985              forceUpdate = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : false;
5986              if (!(!forceUpdate && this.userData)) {
5987                _context17.next = 5;
5988                break;
5989              }
5990              return _context17.abrupt("return", this.userData);
5991            case 5:
5992              _context17.next = 7;
5993              return this.updateUserBasicData();
5994            case 7:
5995              data = _context17.sent;
5996              res = data.result;
5997              window.basicData = res;
5998              this.basicData = window.basicData;
5999              return _context17.abrupt("return", this.basicData);
6000            case 12:
6001            case "end":
6002              return _context17.stop();
6003          }
6004        }, _callee17, this);
6005      }));
6006      function getUserBasicData() {
6007        return _getUserBasicData.apply(this, arguments);
6008      }
6009      return getUserBasicData;
6010    }() // ユーザーデータを更新
6011  }, {
6012    key: "updateUserBasicData",
6013    value: function () {
6014      var _updateUserBasicData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
6015        var timestamp, data;
6016        return _regeneratorRuntime().wrap(function _callee18$(_context18) {
6017          while (1) switch (_context18.prev = _context18.next) {
6018            case 0:
6019              timestamp = new Date().getTime();
6020              _context18.next = 3;
6021              return $.ajax("".concat(window.SANRIOPLUS_API_BASE_URL, "/get_basic.php"), {
6022                type: 'GET',
6023                headers: {
6024                  'Content-Type': 'application/json'
6025                }
6026              });
6027            case 3:
6028              data = _context18.sent;
6029              this.basicData = data;
6030              return _context18.abrupt("return", data);
6031            case 6:
6032            case "end":
6033              return _context18.stop();
6034          }
6035        }, _callee18, this);
6036      }));
6037      function updateUserBasicData() {
6038        return _updateUserBasicData.apply(this, arguments);
6039      }
6040      return updateUserBasicData;
6041    }() // お気に入りキャラクターを取得
6042  }, {
6043    key: "getFavoriteChara",
6044    value: function () {
6045      var _getFavoriteChara = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
6046        var forceUpdate,
6047          data,
6048          _args19 = arguments;
6049        return _regeneratorRuntime().wrap(function _callee19$(_context19) {
6050          while (1) switch (_context19.prev = _context19.next) {
6051            case 0:
6052              forceUpdate = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : false;
6053              if (!(!forceUpdate && this.favoriteChara)) {
6054                _context19.next = 5;
6055                break;
6056              }
6057              return _context19.abrupt("return", this.favoriteChara);
6058            case 5:
6059              _context19.next = 7;
6060              return this.updateFavoriteChara();
6061            case 7:
6062              data = _context19.sent;
6063              return _context19.abrupt("return", data);
6064            case 9:
6065            case "end":
6066              return _context19.stop();
6067          }
6068        }, _callee19, this);
6069      }));
6070      function getFavoriteChara() {
6071        return _getFavoriteChara.apply(this, arguments);
6072      }
6073      return getFavoriteChara;
6074    }()
6075  }, {
6076    key: "updateFavoriteChara",
6077    value: function () {
6078      var _updateFavoriteChara = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
6079        var timestamp, data, res;
6080        return _regeneratorRuntime().wrap(function _callee20$(_context20) {
6081          while (1) switch (_context20.prev = _context20.next) {
6082            case 0:
6083              timestamp = new Date().getTime();
6084              _context20.next = 3;
6085              return $.ajax("".concat(window.SANRIOPLUS_API_BASE_URL, "/get_favorite_chara.php"), {
6086                type: 'POST',
6087                headers: {
6088                  'Content-Type': 'application/json'
6089                },
6090                dataType: 'json',
6091                data: {
6092                  'time': timestamp
6093                }
6094              });
6095            case 3:
6096              data = _context20.sent;
6097              res = data.result || null;
6098              this.favoriteChara = res;
6099              return _context20.abrupt("return", res);
6100            case 7:
6101            case "end":
6102              return _context20.stop();
6103          }
6104        }, _callee20, this);
6105      }));
6106      function updateFavoriteChara() {
6107        return _updateFavoriteChara.apply(this, arguments);
6108      }
6109      return updateFavoriteChara;
6110    }()
6111  }, {
6112    key: "uodateCharaFavoritState",
6113    value: function () {
6114      var _uodateCharaFavoritState = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(id, isFavorite) {
6115        var res;
6116        return _regeneratorRuntime().wrap(function _callee21$(_context21) {
6117          while (1) switch (_context21.prev = _context21.next) {
6118            case 0:
6119              _context21.next = 2;
6120              return $.ajax("".concat(window.SANRIOPLUS_API_BASE_URL, "/update_favorite_chara.php"), {
6121                type: 'POST',
6122                data: {
6123                  'post_id': id,
6124                  'favorite': isFavorite ? 1 : 0
6125                }
6126              });
6127            case 2:
6128              res = _context21.sent;
6129              return _context21.abrupt("return", res);
6130            case 4:
6131            case "end":
6132              return _context21.stop();
6133          }
6134        }, _callee21);
6135      }));
6136      function uodateCharaFavoritState(_x15, _x16) {
6137        return _uodateCharaFavoritState.apply(this, arguments);
6138      }
6139      return uodateCharaFavoritState;
6140    }()
6141  }, {
6142    key: "checkIsCharaFavorite",
6143    value: function () {
6144      var _checkIsCharaFavorite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(id) {
6145        var data, res;
6146        return _regeneratorRuntime().wrap(function _callee22$(_context22) {
6147          while (1) switch (_context22.prev = _context22.next) {
6148            case 0:
6149              _context22.next = 2;
6150              return $.ajax("".concat(window.SANRIOPLUS_API_BASE_URL, "/is_favorite_chara.php"), {
6151                type: 'POST',
6152                data: {
6153                  'post_id': id
6154                }
6155              });
6156            case 2:
6157              data = _context22.sent;
6158              res = data.result;
6159              return _context22.abrupt("return", res);
6160            case 5:
6161            case "end":
6162              return _context22.stop();
6163          }
6164        }, _callee22);
6165      }));
6166      function checkIsCharaFavorite(_x17) {
6167        return _checkIsCharaFavorite.apply(this, arguments);
6168      }
6169      return checkIsCharaFavorite;
6170    }()
6171  }, {
6172    key: "getClipArticle",
6173    value: function () {
6174      var _getClipArticle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
6175        var category,
6176          cpp,
6177          page,
6178          data,
6179          res,
6180          _args23 = arguments;
6181        return _regeneratorRuntime().wrap(function _callee23$(_context23) {
6182          while (1) switch (_context23.prev = _context23.next) {
6183            case 0:
6184              category = _args23.length > 0 && _args23[0] !== undefined ? _args23[0] : 'goods';
6185              cpp = _args23.length > 1 && _args23[1] !== undefined ? _args23[1] : 6;
6186              page = _args23.length > 2 && _args23[2] !== undefined ? _args23[2] : 1;
6187              _context23.next = 5;
6188              return $.ajax("".concat(window.SANRIOPLUS_API_BASE_URL, "/get_clip_post.php"), {
6189                type: 'GET',
6190                headers: {
6191                  'Content-Type': 'application/json'
6192                },
6193                dataType: 'json',
6194                data: {
6195                  'category': category,
6196                  'cpp': cpp,
6197                  'page': page
6198                }
6199              });
6200            case 5:
6201              data = _context23.sent;
6202              res = data.result;
6203              return _context23.abrupt("return", res);
6204            case 8:
6205            case "end":
6206              return _context23.stop();
6207          }
6208        }, _callee23);
6209      }));
6210      function getClipArticle() {
6211        return _getClipArticle.apply(this, arguments);
6212      }
6213      return getClipArticle;
6214    }()
6215  }, {
6216    key: "uodateClipFavoriteState",
6217    value: function () {
6218      var _uodateClipFavoriteState = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(id, isFavorite) {
6219        var data, res;
6220        return _regeneratorRuntime().wrap(function _callee24$(_context24) {
6221          while (1) switch (_context24.prev = _context24.next) {
6222            case 0:
6223              _context24.next = 2;
6224              return $.ajax("".concat(window.SANRIOPLUS_API_BASE_URL, "/update_clip_post.php"), {
6225                type: 'POST',
6226                data: {
6227                  'post_id': id,
6228                  'clip': isFavorite ? 1 : 0
6229                }
6230              });
6231            case 2:
6232              data = _context24.sent;
6233              res = data;
6234              return _context24.abrupt("return", res);
6235            case 5:
6236            case "end":
6237              return _context24.stop();
6238          }
6239        }, _callee24);
6240      }));
6241      function uodateClipFavoriteState(_x18, _x19) {
6242        return _uodateClipFavoriteState.apply(this, arguments);
6243      }
6244      return uodateClipFavoriteState;
6245    }()
6246  }, {
6247    key: "checkIsClipFavorite",
6248    value: function () {
6249      var _checkIsClipFavorite = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(id) {
6250        var data, res;
6251        return _regeneratorRuntime().wrap(function _callee25$(_context25) {
6252          while (1) switch (_context25.prev = _context25.next) {
6253            case 0:
6254              _context25.next = 2;
6255              return $.ajax("".concat(window.SANRIOPLUS_API_BASE_URL, "/is_clip_post.php"), {
6256                type: 'POST',
6257                data: {
6258                  'post_id': id
6259                }
6260              });
6261            case 2:
6262              data = _context25.sent;
6263              res = data.result === 1 ? true : false;
6264              return _context25.abrupt("return", res);
6265            case 5:
6266            case "end":
6267              return _context25.stop();
6268          }
6269        }, _callee25);
6270      }));
6271      function checkIsClipFavorite(_x20) {
6272        return _checkIsClipFavorite.apply(this, arguments);
6273      }
6274      return checkIsClipFavorite;
6275    }()
6276  }], [{
6277    key: "getInstance",
6278    value: function getInstance() {
6279      if (!Sanrioplus_Login_Utility) {
6280        Sanrioplus_Login_Utility = new Login();
6281      }
6282      return Sanrioplus_Login_Utility;
6283    }
6284  }]);
6285  return Login;
6286}(); // global
6287var Header = /*#__PURE__*/function () {
6288  function Header(el) {
6289    _classCallCheck(this, Header);
6290    this.el = el;
6291    this.$el = $(el);
6292    this.state = {
6293      currentTheme: '',
6294      currentCate: '',
6295      menuOpen: false,
6296      searchOpen: false
6297    };
6298    this.mobileMenuApp = null;
6299    this.isMenuOpen = false;
6300    this.sitesearchKeywords = [];
6301    this.searchForm = [];
6302    this.key = 'firstVisit';
6303    this.LoginUtil = new Login();
6304    this.isLogin = null;
6305    this.setup();
6306  }
6307  _createClass(Header, [{
6308    key: "setup",
6309    value: function setup() {
6310      var menuEl = $('.js-header-content');
6311      if (menuEl.length > 0) {
6312        this.setContent();
6313      } else if (this.$el.hasClass('is-short')) {
6314        this.setContent();
6315      } else {
6316        this.setContent();
6317        // this.menu();
6318        this.$el.addClass('js-is-static');
6319      }
6320      // this.menu(); // mouteした後に
6321
6322      this.mobileMenu();
6323      this.scrollEvent();
6324      this.checkLogin();
6325      this.fukidasiClose();
6326    }
6327  }, {
6328    key: "getBasicData",
6329    value: function () {
6330      var _getBasicData2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
6331        return _regeneratorRuntime().wrap(function _callee26$(_context26) {
6332          while (1) switch (_context26.prev = _context26.next) {
6333            case 0:
6334              if (window.basicData) {
6335                _context26.next = 5;
6336                break;
6337              }
6338              _context26.next = 3;
6339              return new Promise(function (resolve) {
6340                return setTimeout(resolve, 1000);
6341              });
6342            case 3:
6343              _context26.next = 0;
6344              break;
6345            case 5:
6346              return _context26.abrupt("return", window.basicData);
6347            case 6:
6348            case "end":
6349              return _context26.stop();
6350          }
6351        }, _callee26);
6352      }));
6353      function getBasicData() {
6354        return _getBasicData2.apply(this, arguments);
6355      }
6356      return getBasicData;
6357    }()
6358  }, {
6359    key: "checkLogin",
6360    value: function () {
6361      var _checkLogin3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
6362        var _this64 = this;
6363        var now, hour, greeting;
6364        return _regeneratorRuntime().wrap(function _callee28$(_context28) {
6365          while (1) switch (_context28.prev = _context28.next) {
6366            case 0:
6367              _context28.next = 2;
6368              return this.LoginUtil.checkLogin();
6369            case 2:
6370              this.isLogin = _context28.sent;
6371              now = new Date();
6372              hour = now.getHours();
6373              greeting = hour >= 3 && hour < 11 ? 'おはようございます' : hour >= 11 && hour < 19 ? 'こんにちは' : 'こんばんは';
6374              setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
6375                var _userdata$main_charac2, userdata, headerIcon, _username2, fukidasiElm, fukidasi, $icon, displayName, _fukidasi2, _fukidasiElm2;
6376                return _regeneratorRuntime().wrap(function _callee27$(_context27) {
6377                  while (1) switch (_context27.prev = _context27.next) {
6378                    case 0:
6379                      if (!(_this64.isLogin === true)) {
6380                        _context27.next = 13;
6381                        break;
6382                      }
6383                      _this64.$el.find('[data-content="login"]').css('display', 'block');
6384                      // this.$el.fadeIn(400);
6385                      _context27.next = 4;
6386                      return _this64.getBasicData();
6387                    case 4:
6388                      userdata = _context27.sent;
6389                      headerIcon = userdata === null || userdata === void 0 ? void 0 : (_userdata$main_charac2 = userdata.main_character) === null || _userdata$main_charac2 === void 0 ? void 0 : _userdata$main_charac2.img_header_icon;
6390                      _username2 = userdata === null || userdata === void 0 ? void 0 : userdata.nickname;
6391                      fukidasiElm = $('.l-header__fukidasi');
6392                      fukidasi = document.querySelectorAll('.js-header-fukidasi span');
6393                      if (headerIcon) {
6394                        $icon = _this64.$el.find('.js-header-icon');
6395                        $icon.on('load', function (e) {
6396                          $('.js-header-defaulticon').fadeOut(600);
6397                          setTimeout(function () {
6398                            $('.js-header-myportal').removeClass('-mypage');
6399                            ;
6400                            $('.js-header-myportal').addClass('-mychara');
6401                            ;
6402                            $('.js-header-myicon').fadeIn();
6403                            $icon.fadeIn();
6404                          }, 601);
6405                        });
6406                        _this64.$el.find('.js-header-icon').attr('src', headerIcon);
6407                      }
6408                      if (!sessionStorage.getItem(_this64.key)) {
6409                        if (innerWidth < 768) {
6410                          setTimeout(function () {
6411                            $('.js-header-fukidasi').fadeIn(400);
6412                          }, 700);
6413                        }
6414                        if (_username2) {
6415                          displayName = _username2;
6416                          if (_username2.length > 8) {
6417                            displayName = _username2.slice(0, 8) + '...';
6418                          }
6419                          fukidasi[1].innerHTML = "".concat(displayName, "\u3055\u3093\u3001").concat(greeting, "\u3002Sanrio+\u30DE\u30A4\u30DA\u30FC\u30B8\u306F\u30B3\u30C1\u30E9\uFF01<br><span class=\"sub\">\u203B\u5225\u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u958B\u304D\u307E\u3059</span>");
6420                          _this64.hideFukidasi(fukidasiElm[1]);
6421                        } else {
6422                          fukidasi[1].innerText = "\u30B2\u30B9\u30C8\u3055\u3093\u3001".concat(greeting, "\u3002\u30DE\u30A4\u30DA\u30FC\u30B8\u306F\u30B3\u30C1\u30E9\uFF01");
6423                          _this64.hideFukidasi(fukidasiElm[1]);
6424                        }
6425                      }
6426                      _context27.next = 14;
6427                      break;
6428                    case 13:
6429                      if (_this64.isLogin === false) {
6430                        _this64.$el.find('[data-content="nologin"]').css('display', 'block');
6431                        // this.$el.fadeIn(400);
6432                        if (!sessionStorage.getItem(_this64.key)) {
6433                          _fukidasi2 = document.querySelectorAll('.js-header-fukidasi span');
6434                          _fukidasi2[0].innerText = "\u30B2\u30B9\u30C8\u3055\u3093\u3001".concat(greeting, "\uFF01\u30ED\u30B0\u30A4\u30F3/\u65B0\u898F\u767B\u9332\u306F\u30B3\u30C1\u30E9");
6435                          _fukidasiElm2 = $('.l-header__fukidasi');
6436                          _this64.hideFukidasi(_fukidasiElm2[0]);
6437                          if (innerWidth < 768) {
6438                            $('.js-header-fukidasi').fadeIn(400);
6439                          }
6440                        }
6441                      }
6442                    case 14:
6443                    case "end":
6444                      return _context27.stop();
6445                  }
6446                }, _callee27);
6447              })), 100);
6448            case 7:
6449            case "end":
6450              return _context28.stop();
6451          }
6452        }, _callee28, this);
6453      }));
6454      function checkLogin() {
6455        return _checkLogin3.apply(this, arguments);
6456      }
6457      return checkLogin;
6458    }()
6459  }, {
6460    key: "scrollEvent",
6461    value: function scrollEvent() {
6462      var _this65 = this;
6463      var navEl = this.$el.find('#js-header-nav')[0];
6464      if (!navEl) return;
6465      var navElContent = this.$el.find('#js-header-navContent')[0];
6466      var navElTop = this.$el.find('#js-header-navTop')[0];
6467      var navElFix = this.$el.find('#js-header-navFix')[0];
6468      var changeDuration = 0.6;
6469
6470      // ナビゲーションを固定する処理
6471      var navAnim = gsap.to(navEl, {
6472        scrollTrigger: {
6473          trigger: navEl,
6474          start: 'top top',
6475          // markers: true,
6476          onEnter: function onEnter() {
6477            //console.log('enter');
6478            var height = $(navEl).height();
6479            _this65.fixed = true;
6480            _this65.$el.addClass('js-is-fixed');
6481            gsap.set(navEl, {
6482              height: height
6483            });
6484            gsap.set(navElContent, {
6485              position: 'fixed',
6486              top: 0,
6487              left: 0
6488            });
6489            var tl = gsap.timeline();
6490            tl.to(navElTop, {
6491              opacity: 0,
6492              duration: changeDuration / 2
6493            }).set(navElTop, {
6494              display: 'none'
6495            }).set(navElFix, {
6496              display: 'flex',
6497              opacity: 0
6498            }).to(navElFix, {
6499              opacity: 1,
6500              duration: changeDuration / 2
6501            });
6502          },
6503          onLeaveBack: function onLeaveBack() {
6504            //console.log('enter back');
6505            _this65.fixed = false;
6506            _this65.$el.removeClass('js-is-fixed');
6507            gsap.set(navElContent, {
6508              position: '',
6509              top: '',
6510              left: ''
6511            });
6512            gsap.set(navEl, {
6513              height: ''
6514            });
6515            var tl = gsap.timeline();
6516            tl.to(navElFix, {
6517              duration: changeDuration / 2,
6518              opacity: 0
6519            }).set(navElFix, {
6520              display: 'none'
6521            }).set(navElTop, {
6522              display: 'flex',
6523              opacity: 0
6524            }).to(navElTop, {
6525              opacity: 1,
6526              duration: changeDuration / 2
6527            });
6528          }
6529          // onLeave: () => {
6530          //   console.log('leave');
6531          // },
6532          // onLeaveBack: () => {
6533          //   console.log('leave back');
6534          // }
6535        }
6536      });
6537    }
6538  }, {
6539    key: "mobileMenu",
6540    value: function mobileMenu() {
6541      var _this66 = this;
6542      this.menuBtn = $('#js-mobielmenu-trigger');
6543      this.menuBtn.on('click', function (e) {
6544        e.preventDefault();
6545        _this66.mobileMenuTrigger(e);
6546      });
6547      $('.js-mobielmenu-trigger').on('click', function (e) {
6548        e.preventDefault();
6549        _this66.mobileMenuTrigger(e);
6550      });
6551      $('[data-mobilemenu-trigger]').on('click', function (e) {
6552        e.preventDefault();
6553        var $el = $(e.currentTarget);
6554        var target = $el.data('mobilemenu-trigger');
6555        $("[data-mobilemenu-btn]").hide();
6556        $("[data-mobilemenu-btn=\"".concat(target, "\"]")).show();
6557        $("[data-mobilemenu-trigger]").removeClass('js-is-active');
6558        $("[data-mobilemenu-trigger=\"".concat(target, "\"]")).addClass('js-is-active');
6559        $("[data-mobilemenu-list]").hide();
6560        $("[data-mobilemenu-list=\"".concat(target, "\"]")).show();
6561        var theme = $("[ data-mobilemenu-trigger=\"".concat(target, "\"]")).data('theme');
6562        $('#js-header').attr('data-theme', theme);
6563      });
6564      var currentPageCate = $('body').data('initmenu');
6565      if (currentPageCate) {
6566        // console.log(currentPageCate)
6567        // $(`[data-mobilemenu-btn="${currentPageCate}"]`).addClass('js-is-active');
6568      }
6569    }
6570  }, {
6571    key: "mobileMenuTrigger",
6572    value: function mobileMenuTrigger(e) {
6573      var _this67 = this;
6574      var isOpen = this.menuBtn.hasClass('js-is-open');
6575      if (isOpen) {
6576        this.menuBtn.removeClass('js-is-open');
6577        this.state.menuOpen = false;
6578        $('#js-header-mobileMenu').slideUp(500, function () {
6579          _this67.menuBtn.removeClass('js-is-open');
6580        });
6581        $('#js-header').removeAttr('data-theme');
6582        $('#js-header-mobileMenu').removeClass('js-is-open');
6583
6584        // $('.js-header-mobilemenubg,.js-header-mobilemenu-pull').off('click.bg');
6585        Util.startScroll();
6586      } else {
6587        var _this$mobileMenuApp;
6588        Util.stopScroll();
6589        this.menuBtn.addClass('js-is-open');
6590        this.isMenuOpen = true;
6591        this.state.menuOpen = true;
6592        $('#js-header-mobileMenu').slideDown(500);
6593        $('#js-header-mobileMenu').addClass('js-is-open');
6594        $('.js-header-mobilemenubg,.js-header-mobilemenu-pull').on('click.bg', function (e) {
6595          _this67.mobileMenuTrigger(e);
6596        });
6597        gsap.set('.js-header-mobilemenu-pull', {
6598          rotate: '90deg',
6599          opacity: 0,
6600          translateY: '50%'
6601        });
6602        gsap.to('.js-header-mobilemenu-pull', {
6603          duration: 1.2,
6604          rotate: 0,
6605          delay: 0.5,
6606          opacity: 1,
6607          translateY: '100%',
6608          ease: Elastic.easeOut.config(1, 0.3)
6609        });
6610        if ((_this$mobileMenuApp = this.mobileMenuApp) !== null && _this$mobileMenuApp !== void 0 && _this$mobileMenuApp.menuOpen) {
6611          this.mobileMenuApp.menuOpen();
6612        }
6613        if (this.state.searchOpen && isMobile()) {
6614          gsap.to('.js-header-mobilemenu-pull', {
6615            translateY: '100%',
6616            ease: Back.easeIn.config(1.7),
6617            duration: 0.4
6618          });
6619          $("#js-header-search-".concat(isMobile() ? 'sp' : 'pc')).slideUp();
6620          this.state.searchOpen = false;
6621          $('#js-menu-layer').fadeOut();
6622        }
6623      }
6624    }
6625  }, {
6626    key: "menu",
6627    value: function menu() {
6628      var _this68 = this;
6629      this.menuEl = $('#js-header-menu');
6630      this.menuTrigger = $('[data-menu-trigger]');
6631      this.menuTrigger.on('click', function (e) {
6632        var isShort = $(document.body).data('optimize') === 'short' || false;
6633        if (isShort) {
6634          return;
6635        }
6636        e.preventDefault();
6637        var target = $(e.currentTarget).data('menu-trigger');
6638        if (target != _this68.state.currentCate) {
6639          _this68.menuOpen(target);
6640        } else {
6641          _this68.menuClose();
6642        }
6643      });
6644      $('#js-header-menu-bg-layer').on('click', function (e) {
6645        e.preventDefault();
6646        if (_this68.state.menuOpen) {
6647          _this68.menuClose();
6648        }
6649      });
6650      $('#js-menu-layer').on('click', function (e) {
6651        e.preventDefault();
6652        if (_this68.state.searchOpen) {
6653          $("#js-header-search-".concat(isMobile() ? 'sp' : 'pc')).slideUp();
6654          _this68.state.searchOpen = false;
6655          $('#js-menu-layer').fadeOut();
6656        }
6657      });
6658      $('.js-header-menu-close').on('click', function (e) {
6659        e.preventDefault();
6660        if (_this68.state.searchOpen) {
6661          $("#js-header-search-".concat(isMobile() ? 'sp' : 'pc')).slideUp();
6662          _this68.state.searchOpen = false;
6663          // $('#js-menu-layer').fadeOut();
6664        }
6665
6666        if (_this68.state.menuOpen) {
6667          _this68.menuClose();
6668        }
6669      });
6670      $('.js-header-search-trigger').on('click', function (e) {
6671        e.preventDefault();
6672        if (!_this68.state.searchOpen) {
6673          _this68.state.searchOpen = true;
6674          $('#js-header').removeAttr('data-theme');
6675          if (_this68.state.menuOpen) {
6676            if (isMobile()) {
6677              _this68.menuBtn.removeClass('js-is-open');
6678              _this68.state.menuOpen = false;
6679              $('#js-header-mobileMenu').slideUp(500, function () {
6680                _this68.menuBtn.removeClass('js-is-open');
6681              });
6682              $('#js-header').attr('data-theme');
6683            } else {
6684              _this68.menuClose();
6685            }
6686          }
6687          _this68.searchForm.forEach(function (app) {
6688            app.open();
6689          });
6690          var tl = gsap.timeline();
6691          tl.set('.js-header-search-pull', {
6692            rotate: '90deg',
6693            opacity: 0,
6694            translateY: 0
6695          }).to('.js-header-search-pull', {
6696            duration: 0.8,
6697            rotate: 0,
6698            delay: 0.5,
6699            opacity: 1,
6700            translateY: '100%',
6701            ease: Elastic.easeOut.config(1, 0.3)
6702          });
6703          $("#js-header-search-".concat(isMobile() ? 'sp' : 'pc')).slideDown();
6704          $('#js-menu-layer').fadeIn();
6705
6706          // setTimeout(() => {
6707          //   console.log('iiiii');
6708          //   this.moreSearchForm();
6709          // }, 2000)
6710        } else {
6711          gsap.to('.js-header-search-pull', {
6712            translateY: '-100%',
6713            ease: Back.easeIn.config(1.7),
6714            duration: 0.4
6715          });
6716          $("#js-header-search-".concat(isMobile() ? 'sp' : 'pc')).slideUp();
6717          _this68.state.searchOpen = false;
6718          $('#js-header').removeAttr('data-theme');
6719          $('#js-header').removeClass('js-open-searchform');
6720          $('#js-menu-layer').fadeOut();
6721        }
6722      });
6723      this.moreSearchForm();
6724    }
6725  }, {
6726    key: "menuOpen",
6727    value: function menuOpen(target) {
6728      var _this69 = this;
6729      var $el = $("[data-menu=\"".concat(target, "\"]"));
6730      $('.l-body').addClass('js-menu-open');
6731      gsap.set('#js-header-menu', {
6732        display: 'block',
6733        pointerEvents: 'all'
6734      });
6735      $("#js-header-search-".concat(isMobile() ? 'sp' : 'pc')).slideUp();
6736
6737      // 高さを取得
6738      gsap.set($el[0], {
6739        opacity: 0,
6740        display: 'block',
6741        zIndex: -1
6742      });
6743      var bgHeight = $el.find('.c-menu__contentInner').outerHeight();
6744      gsap.set($el[0], {
6745        opacity: '',
6746        display: 'none',
6747        zIndex: ''
6748      });
6749      if ($el.length <= 0) return;
6750      var theme = $el.data('theme');
6751      this.setupOpenAnim(target);
6752      // $el.css({maxHeight})
6753      if (!this.state.menuOpen) {
6754        // メニューが開いていない時
6755        if (this.state.searchOpen) {
6756          $("#js-header-search-".concat(isMobile() ? 'sp' : 'pc')).slideUp();
6757          this.state.searchOpen = false;
6758        }
6759        gsap.set('#js-header-menu-bg', {
6760          height: bgHeight
6761        });
6762        $('#js-header-menu-bg-wrapper').slideDown();
6763        gsap.set('.js-header-menu-pull', {
6764          rotate: '90deg',
6765          opacity: 0,
6766          translateY: 0
6767        });
6768        $el.slideDown(300, function () {
6769          return _this69.openAnim(target);
6770        });
6771        gsap.to('.js-header-menu-pull', {
6772          duration: 0.8,
6773          rotate: 0,
6774          delay: 0.5,
6775          opacity: 1,
6776          translateY: '100%',
6777          ease: Elastic.easeOut.config(1, 0.3)
6778        });
6779        // $('#js-menu-layer').fadeIn();
6780        this.state.menuOpen = true;
6781        Util.stopScroll();
6782      } else {
6783        // メニューの切り替え
6784
6785        gsap.to('#js-header-menu-bg', {
6786          height: bgHeight,
6787          duration: .4
6788        });
6789        var $prev = $("[data-menu=\"".concat(this.state.currentCate, "\"]"));
6790        var tl = gsap.timeline();
6791        tl.set("[data-menu=\"".concat(this.state.currentCate, "\"]"), {
6792          zIndex: 0
6793        }).set("[data-menu=\"".concat(target, "\"]"), {
6794          zIndex: 10
6795        }).to("[data-menu=\"".concat(this.state.currentCate, "\"] .c-menu__item"), {
6796          opacity: 0,
6797          duration: .2,
6798          // y: '-30px',
6799          ease: Expo.easeOut,
6800          onComplete: function onComplete() {
6801            $prev.fadeOut(300);
6802          }
6803        });
6804        setTimeout(function () {
6805          $el.fadeIn(600);
6806          _this69.openAnim(target);
6807        }, 400);
6808      }
6809      $('#js-header').attr('data-theme', theme);
6810      $('#js-header').attr('data-currentCate', target);
6811      $("[data-menu-trigger]").removeClass('js-is-active');
6812      $("[data-menu-trigger=\"".concat(target, "\"]")).addClass('js-is-active');
6813      this.state.currentTheme = theme;
6814      this.state.currentCate = target;
6815    }
6816  }, {
6817    key: "menuClose",
6818    value: function menuClose() {
6819      var _this70 = this;
6820      var $el = $("[data-menu]");
6821      this.state.currentTheme = '';
6822      this.state.currentCate = '';
6823      $('#js-header').attr('data-theme', '');
6824      $('#js-header').attr('data-currentCate', '');
6825      $('#js-header').removeAttr('data-theme');
6826      $('#js-header').removeAttr('data-currentCate');
6827      $('.l-body').removeClass('js-menu-open');
6828      Util.startScroll();
6829      gsap.set('#js-header-menu', {
6830        pointerEvents: 'none'
6831      });
6832      var tl = gsap.timeline();
6833      tl.to('.c-menu__item', {
6834        opacity: 0,
6835        duration: .2,
6836        ease: Expo.easeOut,
6837        onComplete: function onComplete() {
6838          $el.slideUp(300);
6839          $('#js-header-menu-bg-wrapper').slideUp(600, function () {
6840            $("[data-menu-trigger]").removeClass('js-is-active');
6841            _this70.state.menuOpen = false;
6842            gsap.set('#js-header-menu', {
6843              display: 'none'
6844            });
6845          });
6846          if (!_this70.state.searchOpen) $('#js-menu-layer').fadeOut();
6847        }
6848      }).to('.js-header-menu-pull', {
6849        translateY: '-100%',
6850        ease: Back.easeIn.config(1.7),
6851        duration: 0.4
6852      });
6853    }
6854  }, {
6855    key: "setupOpenAnim",
6856    value: function setupOpenAnim(target) {
6857      gsap.set("[data-menu=\"".concat(target, "\"] .js-header-menu-heading"), {
6858        opacity: 0
6859      });
6860      gsap.set("[data-menu=\"".concat(target, "\"] .c-menu__item"), {
6861        opacity: 1,
6862        y: 0
6863      });
6864      gsap.set("[data-menu=\"".concat(target, "\"] .js-header-menu-upitem"), {
6865        opacity: 0,
6866        y: '-30px'
6867      });
6868      if (target === 'character') {
6869        gsap.set('.js-header-menu-charList', {
6870          opacity: 0,
6871          y: '-5px'
6872        });
6873      }
6874    }
6875  }, {
6876    key: "openAnim",
6877    value: function openAnim(target) {
6878      var tl = gsap.timeline();
6879      tl.to("[data-menu=\"".concat(target, "\"] .c-menu__item"), {
6880        opacity: 1,
6881        y: 0,
6882        duration: .6,
6883        ease: Power2.easeOut
6884      }).to("[data-menu=\"".concat(target, "\"] .js-header-menu-heading"), {
6885        opacity: 1,
6886        duration: .4,
6887        delay: -6,
6888        ease: Power2.easeOut
6889      }).to("[data-menu=\"".concat(target, "\"] .js-header-menu-upitem"), {
6890        opacity: 1,
6891        y: 0,
6892        duration: .3,
6893        ease: Power2.easeOut,
6894        stagger: 0.05
6895      });
6896      if (target === 'character') {
6897        gsap.to('.js-header-menu-charList', {
6898          opacity: 1,
6899          y: 0,
6900          duration: .3,
6901          ease: Power2.easeOut
6902        });
6903        gsap.to('.js-header-menu-charIllust', {
6904          opacity: 1,
6905          y: 0,
6906          duration: .3,
6907          ease: Power2.easeOut
6908        });
6909      }
6910    }
6911  }, {
6912    key: "setContent",
6913    value: function setContent() {
6914      var _this71 = this;
6915      var _this = this;
6916      var characterList = null;
6917      var goodsList = null;
6918      var movieList = null;
6919      var digitalList = null;
6920      var spotList = null;
6921      var newsList = null;
6922      var API_BASE_URL = window.API_BASE_URL;
6923      var JSON_BASE_URL = window.JSON_DOMAIN;
6924      var endpoint = '';
6925      var customEndpoint = this.$el.data('endpoint');
6926      if (customEndpoint) {
6927        endpoint = "".concat(customEndpoint, "?").concat(new Date().getTime());
6928      } else {
6929        endpoint = "".concat(JSON_BASE_URL, "system/json/bigmenu.json");
6930      }
6931      axios.get(endpoint).then(function (_ref7) {
6932        var _result$menu_characte, _result$menu_characte2;
6933        var data = _ref7.data;
6934        var result = data;
6935
6936        // sticky pickupの順にランダムに5件取得
6937        var pickLength = 5;
6938        var _characterSticky = ((_result$menu_characte = result.menu_character) === null || _result$menu_characte === void 0 ? void 0 : _result$menu_characte.sticky) || [];
6939        var _characterPickup = ((_result$menu_characte2 = result.menu_character) === null || _result$menu_characte2 === void 0 ? void 0 : _result$menu_characte2.pickup) || [];
6940        var _pickCharacters = Util.shuffleArray(_characterSticky, pickLength).concat(Util.shuffleArray(_characterPickup, pickLength)).slice(0, 5);
6941        characterList = {
6942          pickup: Util.shuffleArray(_pickCharacters)
6943        };
6944        goodsList = (result === null || result === void 0 ? void 0 : result.menu_goods) || {
6945          pickup: [],
6946          category: []
6947        };
6948        movieList = (result === null || result === void 0 ? void 0 : result.menu_movie) || {
6949          pickup: [],
6950          category: []
6951        };
6952        digitalList = (result === null || result === void 0 ? void 0 : result.menu_digital) || {
6953          pickup: [],
6954          category: []
6955        };
6956        spotList = (result === null || result === void 0 ? void 0 : result.menu_spot) || {
6957          pickup: [],
6958          category: []
6959        };
6960        newsList = (result === null || result === void 0 ? void 0 : result.menu_news) || {
6961          pickup: [],
6962          category: []
6963        };
6964        //console.log(digitalList);
6965
6966        _this71.sitesearchKeywords = result.menu_sitesearch.keywords;
6967        var app = new Vue({
6968          el: '.js-header-content',
6969          data: {
6970            characterList: characterList,
6971            goodsList: goodsList,
6972            movieList: movieList,
6973            digitalList: digitalList,
6974            spotList: spotList,
6975            newsList: newsList
6976          },
6977          mounted: function mounted() {
6978            _this.menu();
6979          }
6980        });
6981        _this.mobileMenuApp = new Vue({
6982          el: '.js-header-mobilecontent',
6983          data: {
6984            activeTab: 'character',
6985            characterList: characterList,
6986            goodsList: goodsList,
6987            movieList: movieList,
6988            digitalList: digitalList,
6989            spotList: spotList,
6990            newsList: newsList
6991          },
6992          created: function created() {},
6993          methods: {
6994            changeTab: function changeTab(target, event) {
6995              var isShort = $(document.body).data('optimize') === 'short' || false;
6996              if (isShort) {
6997                return;
6998              }
6999              event.preventDefault();
7000              var theme = $(event.currentTarget).data('theme');
7001              $('#js-header').attr('data-theme', theme);
7002              this.activeTab = target;
7003            },
7004            menuOpen: function menuOpen() {
7005              var initCate = $('body').data('initmenu');
7006              var initColor = $('body').data('theme');
7007              if (initCate === 'spots') initCate = 'spot';
7008              if (initCate && !(initCate === 'character' || initCate === 'movie' || initCate === 'digital' || initCate === 'spot' || initCate === 'goods' || initCate === 'news')) {
7009                initCate = 'news';
7010              }
7011              if (initCate && initColor) {
7012                $('#js-header').attr('data-theme', initColor);
7013                this.activeTab = initCate;
7014              } else {
7015                $('#js-header').attr('data-theme', 'sky');
7016                this.activeTab = 'character';
7017              }
7018              // console.log(this.initCate,this.activeTab);
7019            },
7020            menuTrigger: function menuTrigger() {
7021              _this.mobileMenuTrigger();
7022            }
7023          }
7024        });
7025      })["catch"](function (error) {
7026        // handle error
7027        // json取得できない時、↓いらない?
7028        // _this.mobileMenuApp = new Vue({
7029        //   el: '.js-header-mobilecontent',
7030        //   data: {
7031        //     activeTab: 'character',
7032        //     characterList: {},
7033        //     goodsList: {},
7034        //     movieList: {},
7035        //     digitalList: {},
7036        //     spotList: {},
7037        //     newsList: {},
7038        //   },
7039        //   created() {
7040        //   },
7041        //   methods: {
7042        //     changeTab(target,event) {
7043        //       const theme = $(event.currentTarget).data('theme');
7044        //       $('#js-header').attr('data-theme',theme);
7045        //       this.activeTab = target;
7046        //     },
7047        //     menuOpen() {
7048        //       let initCate = $('body').data('initmenu');
7049        //       const initColor = $('body').data('theme');
7050        //       if(initCate === 'spots') initCate = 'spot';
7051        //       if(initCate && !(
7052        //         initCate === 'character'
7053        //         || initCate === 'movie'
7054        //         || initCate === 'digital'
7055        //         || initCate === 'spot'
7056        //         || initCate === 'goods'
7057        //         || initCate === 'news')) {
7058        //         initCate = 'news';
7059        //       }
7060        //       // console.log('open',initCate);
7061        //       if(initCate && initColor) {
7062        //         $('#js-header').attr('data-theme',initColor);
7063        //         this.activeTab = initCate;
7064        //       } else {
7065        //         $('#js-header').attr('data-theme','sky');
7066        //         this.activeTab = 'character';
7067        //       }
7068
7069        //     }
7070        //   }
7071        // })
7072        _this.menu();
7073      });
7074    }
7075  }, {
7076    key: "moreSearchForm",
7077    value: function moreSearchForm() {
7078      var _this72 = this;
7079      var $els = $('.js-header-search');
7080      var _this = this;
7081      $els.each(function (i, el) {
7082        _this72.searchForm[i] = new Vue({
7083          el: el,
7084          data: {
7085            formEl: null,
7086            btnEl: null,
7087            keywords: _toConsumableArray(_this.sitesearchKeywords),
7088            formValue: {
7089              s_type: 'and',
7090              kw_input: null,
7091              kw_tag: []
7092            },
7093            typeLabel: {
7094              and: 'すべて',
7095              or: 'いずれかを含む',
7096              natural: '自然文検索'
7097            },
7098            selectOpen: false
7099          },
7100          methods: {
7101            submitForm: function submitForm() {
7102              var kw = '';
7103              if (this.formValue.kw_input) kw = this.formValue.kw_input;
7104              this.formValue.kw_tag.forEach(function (tag) {
7105                if (tag) kw += " ".concat(tag);
7106              });
7107              var values = {
7108                s_type: this.formValue.s_type || '',
7109                kw: kw || '',
7110                ie: 'u',
7111                temp: 'site',
7112                env: 'sanrio3'
7113              };
7114              var actionUrl = $(this.$refs.form).data('action');
7115              var theURL = new URL(actionUrl);
7116              Object.keys(values).forEach(function (_key) {
7117                var key = _key;
7118                var value = values[key];
7119                theURL.searchParams.set(key, value);
7120              });
7121              // console.log(theURL.href);
7122              $(this.$refs.form).attr('action', theURL.href);
7123              this.$refs.form.submit();
7124            },
7125            formClear: function formClear() {
7126              this.formValue = {
7127                s_type: 'and',
7128                kw_input: null,
7129                kw_tag: []
7130              };
7131            },
7132            toggleSelect: function toggleSelect() {
7133              if (this.selectOpen) {
7134                this.closeSelect();
7135              } else {
7136                this.openSelect();
7137              }
7138            },
7139            openSelect: function openSelect(e) {
7140              var _this73 = this;
7141              var el = this.$refs.selectList;
7142              var trigger = this.$refs.selectTrigger;
7143              this.selectOpen = true;
7144              $(trigger).on('blur.searchBlur', function (e) {
7145                _this73.closeSelect();
7146                $(el).off('blur.searchBlur');
7147              });
7148              $(el).slideDown();
7149            },
7150            closeSelect: function closeSelect() {
7151              var el = this.$refs.selectList;
7152              var trigger = this.$refs.selectTrigger;
7153              this.selectOpen = false;
7154              $(trigger).off('blur.searchBlur');
7155              $(el).slideUp();
7156            },
7157            open: function open() {
7158              var _this74 = this;
7159              $('.js-search-btn').off('click.searchForm');
7160              $('.js-search-clear').off('click.clearForm');
7161              // $('#js-header').attr('data-theme','sky');
7162              $('#js-header').addClass('js-open-searchform');
7163              $('.js-search-btn').on('click.searchForm', function (e) {
7164                e.preventDefault();
7165              });
7166              $('.js-search-clear').on('click.clearForm', function (e) {
7167                e.preventDefault();
7168                _this74.formClear();
7169              });
7170            },
7171            close: function close() {
7172              if (_this.state.searchOpen) {
7173                $("#js-header-search-".concat(isMobile() ? 'sp' : 'pc')).slideUp();
7174                _this.state.searchOpen = false;
7175                $('#js-menu-layer').fadeOut();
7176                // $('#js-header').removeAttr('data-theme');
7177              }
7178
7179              _this.searchForm = [];
7180              if (_this.state.menuOpen) {
7181                _this.menuClose();
7182              }
7183            },
7184            sugCheck: function sugCheck(el) {
7185              var _this75 = this;
7186              //サジェスト対応
7187              setTimeout(function () {
7188                // Vueなどの処理が終わるのを待つため1秒バッファ
7189                _this75.formValue.kw_input = el.target.value;
7190              }, 1000);
7191            }
7192          }
7193        });
7194      });
7195    }
7196  }, {
7197    key: "fukidasiClose",
7198    value: function fukidasiClose() {
7199      $('.js-header-fukidasi-close').each(function () {
7200        $(this).on('click', function (e) {
7201          e.preventDefault();
7202          $('.js-header-fukidasi').fadeOut();
7203        });
7204      });
7205    }
7206  }, {
7207    key: "hideFukidasi",
7208    value: function hideFukidasi(_el) {
7209      var el = $(_el);
7210      $(window).scroll(function () {
7211        var elHeight = el.offset().top;
7212        if (elHeight > 600) {
7213          el.fadeOut();
7214        }
7215      });
7216    }
7217  }]);
7218  return Header;
7219}(); //=include _modules/footer.js
7220// globals
7221var GlobalElements = /*#__PURE__*/function () {
7222  function GlobalElements() {
7223    _classCallCheck(this, GlobalElements);
7224    this.$headerEl = $('#js-header');
7225    this.$footerEl = $('#js-footer');
7226    if (this.$headerEl.length && this.$footerEl.length) {
7227      this.header = new Header(this.$headerEl[0]);
7228      this.init();
7229    }
7230  }
7231  _createClass(GlobalElements, [{
7232    key: "init",
7233    value: function init() {}
7234  }]);
7235  return GlobalElements;
7236}(); // global  end
7237var AnchorLink = /*#__PURE__*/function () {
7238  function AnchorLink(el, opt) {
7239    _classCallCheck(this, AnchorLink);
7240    this.header = !isMobile() ? '.l-header__navContent' : '.l-header__content';
7241    this.anchorScroll();
7242    this.same();
7243  }
7244  _createClass(AnchorLink, [{
7245    key: "anchorScroll",
7246    value: function anchorScroll() {
7247      var q = location.search;
7248      var m = q.match(/id=([a-zA-Z0-9_-]+)/);
7249      if (m && 0 < m.length) {
7250        var id = m[1];
7251        var $target = $('#' + id);
7252        if (0 < $target.length) {
7253          var headerH = $(this.header).outerHeight();
7254          var pos = $target.offset().top;
7255          gsap.to(window, {
7256            scrollTo: {
7257              y: pos,
7258              autoKill: false,
7259              offsetY: headerH
7260            },
7261            duration: 1
7262          });
7263        }
7264      }
7265    }
7266  }, {
7267    key: "same",
7268    value: function same() {
7269      var _this76 = this;
7270      $('[href*="id="]').each(function (i, e) {
7271        var delay = 0;
7272        var $e = $(e);
7273        $e.on('click.anchorlink', function (event) {
7274          var $this = $(event.currentTarget);
7275          var isNoScroll = $this.hasClass('noscroll');
7276          if (!isNoScroll) {
7277            var href = $this.prop('href');
7278            var url = new URL(href);
7279            var currentUrl = new URL(window.location.href);
7280            if (url.pathname === currentUrl.pathname) {
7281              var s = url.search.match(/id=([a-zA-Z0-9_-]+)/);
7282              if (s && s.length == 2) {
7283                var id = s[1];
7284                var $target = $('#' + id);
7285                if (0 < $target.length) {
7286                  if ($target) {
7287                    var headerH = $(_this76.header).outerHeight() + 10;
7288                    var pos = $target.offset().top;
7289                    gsap.to(window, {
7290                      scrollTo: {
7291                        y: pos,
7292                        autoKill: false,
7293                        offsetY: headerH
7294                      },
7295                      duration: 1,
7296                      delay: delay
7297                    });
7298                    event.preventDefault();
7299                  }
7300                }
7301              }
7302            }
7303          }
7304        });
7305      });
7306    }
7307  }, {
7308    key: "updateEvent",
7309    value: function updateEvent() {
7310      $('[href*="id="]').each(function (i, e) {
7311        var $e = $(e);
7312        $e.off('click.anchorlink');
7313      });
7314      this.same();
7315    }
7316  }]);
7317  return AnchorLink;
7318}();
7319var AppSearchCharacter = /*#__PURE__*/function () {
7320  function AppSearchCharacter() {
7321    _classCallCheck(this, AppSearchCharacter);
7322    this.startTime = Date.now();
7323    this.target = 'app-searchCharacter';
7324    var API_BASE_URL = window.API_BASE_URL;
7325    var JSON_BASE_URL = window.JSON_DOMAIN;
7326    this.apiList = {
7327      pickup: JSON_BASE_URL + 'system/json/characters_pickup.json',
7328      yomi: JSON_BASE_URL + 'system/json/characters_yomi.json',
7329      debut: JSON_BASE_URL + 'system/json/characters_debut.json',
7330      birthday: JSON_BASE_URL + 'system/json/characters_birthday.json',
7331      random: JSON_BASE_URL + 'system/json/characters_random.json',
7332      search: JSON_BASE_URL + 'wp-json/sanrio/v1/characters'
7333    };
7334    //
7335    this.dataList = {
7336      pickup: null,
7337      yomi: null,
7338      debut: null,
7339      birthday: null,
7340      random: null
7341    }, this.LoginUtil = new Login();
7342    this.el = document.getElementById(this.target);
7343    if (this.el) this.init();
7344  }
7345  _createClass(AppSearchCharacter, [{
7346    key: "init",
7347    value: function init() {
7348      var _this77 = this;
7349      // this.get
7350      this.getCharaList().then(function (data) {
7351        _this77.app();
7352      });
7353    }
7354  }, {
7355    key: "app",
7356    value: function app() {
7357      var _this = this;
7358      var dataList = this.dataList;
7359      Vue.component('v-select', vSelect);
7360      var appSearchBox = new Vue({
7361        el: this.el,
7362        // components: {
7363        //   vSelect,
7364        // },
7365        data: function data() {
7366          return {
7367            mode: 0,
7368            activeInterview: 'hobby',
7369            currentSearchCategory: 'cate1',
7370            currentSearchCategoryValue: 'cate1',
7371            currentMemori: null,
7372            moreSearchKey: null,
7373            dataList: null,
7374            formatedList: null,
7375            detailListData: null,
7376            selectOpen: false,
7377            memoriList: [],
7378            dummyIndex: 0,
7379            isSearchScroll: false,
7380            interviewLimitLength: !isMobile() ? 18 : 10,
7381            simplebar: null,
7382            scrollbar: null,
7383            isScrollbarX: false,
7384            isShowSwipeIcon: false,
7385            isFilterFavChara: false,
7386            favoriteListTemp: {},
7387            favoriteList: {},
7388            mainChara: null,
7389            isLogin: false,
7390            isFavPanel: null,
7391            isFilterPanel: false,
7392            searchCategoryList: [{
7393              text: 'PICK UP',
7394              value: 'cate1',
7395              clickEvent: "dataLayer.push({event:'measures_check',ev_action:'click',ev_label:'PICK UP',measures_id :'M1'});"
7396            }, {
7397              text: '五十音',
7398              value: 'cate2',
7399              clickEvent: ""
7400            }, {
7401              text: 'デビュー年',
7402              value: 'cate3',
7403              clickEvent: ""
7404            }, {
7405              text: '誕生日',
7406              value: 'cate4',
7407              clickEvent: ""
7408            }, {
7409              text: 'ランダム',
7410              value: 'cate5',
7411              clickEvent: "dataLayer.push({event:'measures_check',ev_action:'click',ev_label:'ランダム',measures_id :'M5'});"
7412            }],
7413            parameterList: {
7414              cate1: 'pickup',
7415              cate2: 'gojuon',
7416              cate3: 'debut',
7417              cate4: 'birthday',
7418              cate5: 'random',
7419              interview: 'interview'
7420            },
7421            unitData: {
7422              debut: '年代',
7423              birthday: '月'
7424            },
7425            searchForm: {
7426              w: "",
7427              debut: "",
7428              birthday: "",
7429              tags: [],
7430              color: []
7431            },
7432            searchOpt: {
7433              debutList: [
7434                // {label: '1970年代',code:'1970'},
7435                // {label: '1980年代',code:'1980'},
7436                // {label: '1990年代',code:'1990'},
7437                // {label: '2000年代',code:'2000'},
7438                // {label: '2010年代',code:'2010'},
7439                // {label: '2020年代',code:'2020'},
7440              ],
7441              birthdayList: [{
7442                label: '1月',
7443                code: '1'
7444              }, {
7445                label: '2月',
7446                code: '2'
7447              }, {
7448                label: '3月',
7449                code: '3'
7450              }, {
7451                label: '4月',
7452                code: '4'
7453              }, {
7454                label: '5月',
7455                code: '5'
7456              }, {
7457                label: '6月',
7458                code: '6'
7459              }, {
7460                label: '7月',
7461                code: '7'
7462              }, {
7463                label: '8月',
7464                code: '8'
7465              }, {
7466                label: '9月',
7467                code: '9'
7468              }, {
7469                label: '10月',
7470                code: '10'
7471              }, {
7472                label: '11月',
7473                code: '11'
7474              }, {
7475                label: '12月',
7476                code: '12'
7477              }]
7478            },
7479            modalSelectState: {
7480              modalSelectDebut: false,
7481              modalSelectBirth: false
7482            },
7483            filterBaseList: null,
7484            filterWords: '',
7485            activeListHook: 0
7486          };
7487        },
7488        methods: {
7489          toggleSelect: function toggleSelect() {
7490            if (this.selectOpen) {
7491              this.closeSelect();
7492            } else {
7493              this.openSelect();
7494            }
7495          },
7496          toggleFilterFavChara: function toggleFilterFavChara() {
7497            if (this.isLogin) {
7498              this.updateFavoriteList();
7499              this.isFilterFavChara = !this.isFilterFavChara;
7500            } else {
7501              this.isFilterPanel = !this.isFilterPanel;
7502            }
7503          },
7504          toggleFavPanel: function toggleFavPanel(id) {
7505            if (this.isLogin) return;
7506            if (this.isFavPanel == id) {
7507              this.isFavPanel = null;
7508            } else {
7509              this.isFavPanel = id;
7510            }
7511          },
7512          toggleModalSelect: function toggleModalSelect(target, event) {
7513            var _this78 = this;
7514            var _target = target;
7515            var currentTarget = event === null || event === void 0 ? void 0 : event.currentTarget;
7516            if (isMobile()) _target += 'Sp';
7517            var el = this.$refs[_target];
7518            var state = this.modalSelectState[target];
7519            // el.foc
7520            if (state) {
7521              this.modalSelectState[target] = false;
7522              $(el).slideUp();
7523              if (currentTarget) {
7524                $(currentTarget).off('blur.customSelect');
7525              }
7526            } else {
7527              this.modalSelectState[target] = true;
7528              $(el).slideDown();
7529              if (currentTarget) {
7530                $(currentTarget).on('blur.customSelect', function () {
7531                  setTimeout(function () {
7532                    _this78.modalSelectState[target] = false;
7533                    $(el).slideUp();
7534                    $(currentTarget).off('blur.customSelect');
7535                  }, 100);
7536                });
7537                currentTarget.focus();
7538              }
7539            }
7540          },
7541          searchScrollLeft: function searchScrollLeft() {
7542            gsap.to(this.$refs.searchLists, {
7543              duration: 1.4,
7544              ease: Power1.easeOut,
7545              scrollTo: {
7546                x: '-=300'
7547              }
7548            });
7549          },
7550          searchScrollRight: function searchScrollRight() {
7551            gsap.to(this.$refs.searchLists, {
7552              duration: 1.4,
7553              ease: Power1.easeOut,
7554              scrollTo: {
7555                x: '+=300'
7556              }
7557            });
7558          },
7559          onResizeScroll: function onResizeScroll() {
7560            var _this79 = this;
7561            this.$nextTick(function () {
7562              var wrapper = _this79.$refs.searchBody;
7563              var list = _this79.$refs.searchList;
7564              if (wrapper && list) {
7565                _this79.isSearchScroll = true;
7566                var wrapperLWidth = $(wrapper).width();
7567                var listWidth = $(list).width();
7568                _this79.isSearchScroll = listWidth + 40 > wrapperLWidth;
7569              } else {
7570                _this79.isSearchScroll = false;
7571              }
7572            });
7573          },
7574          openSelect: function openSelect() {
7575            var el = this.$refs.selectList;
7576            this.selectOpen = true;
7577            $(el).slideDown();
7578          },
7579          closeSelect: function closeSelect() {
7580            var el = this.$refs.selectList;
7581            this.selectOpen = false;
7582            $(el).slideUp();
7583          },
7584          changeMode: function changeMode(prop) {
7585            this.mode = prop;
7586            var url = new URL(window.location.href);
7587            var v = this.parameterList[this.currentSearchCategoryValue];
7588            if (prop == 1) {
7589              v = this.parameterList['interview'];
7590            }
7591            if (v) {
7592              url.searchParams.set('search-category', v);
7593              history.replaceState(null, null, url.href);
7594            }
7595            this.resetScrollResultBox();
7596          },
7597          changeSearchCategory: function changeSearchCategory(value) {
7598            this.onResizeScroll();
7599            this.updateFavoriteList();
7600            this.moreSearchKey = null;
7601            this.currentSearchCategoryValue = value;
7602            var url = new URL(window.location.href);
7603            var v = this.parameterList[value] || false;
7604            if (v) {
7605              url.searchParams.set('search-category', v);
7606              history.replaceState(null, null, url.href);
7607            }
7608          },
7609          toggleFav: function toggleFav(post_id) {
7610            var _this80 = this;
7611            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
7612              var isCurrentFav, isNextFav, res;
7613              return _regeneratorRuntime().wrap(function _callee29$(_context29) {
7614                while (1) switch (_context29.prev = _context29.next) {
7615                  case 0:
7616                    isCurrentFav = _this80.favoriteListTemp[post_id];
7617                    isNextFav = !isCurrentFav;
7618                    _this80.$set(_this80.favoriteListTemp, post_id, isNextFav);
7619                    _context29.next = 5;
7620                    return _this.LoginUtil.uodateCharaFavoritState(post_id, isNextFav);
7621                  case 5:
7622                    res = _context29.sent;
7623                  case 6:
7624                  case "end":
7625                    return _context29.stop();
7626                }
7627              }, _callee29);
7628            }))();
7629          },
7630          /**
7631           * キャラ配列を表示用オブジェクトに整形する関数
7632           */
7633          formatData: function formatData(rawList) {
7634            var _this81 = this;
7635            if (!rawList) return;
7636            var nullNum = rawList.length <= 3 ? 3 - rawList.length : 3 - rawList.length % 3; // 余りの数
7637            if (nullNum === 3) nullNum = 0;
7638            var _list = [].concat(_toConsumableArray(rawList), _toConsumableArray(Array(nullNum)));
7639            return _list.map(function (item) {
7640              if (!item) {
7641                return null;
7642              }
7643              ;
7644              var rawInterview = _objectSpread({}, item.interview);
7645              var _interview = {};
7646              Object.keys(rawInterview).forEach(function (key) {
7647                var value = rawInterview[key];
7648                if (!value) {
7649                  _interview[key] = null;
7650                } else {
7651                  _interview[key] = value.length <= _this81.interviewLimitLength ? value : value.slice(0, _this81.interviewLimitLength) + '…';
7652                }
7653              });
7654              var chara = _defineProperty({
7655                name: item.name,
7656                thumbnail: item.thumbnail,
7657                background: item.background,
7658                "new": item["new"],
7659                id: item.ID,
7660                isBirthday: item.isBirthday,
7661                birthday_day: item.birthday_day || null,
7662                birthday_month: item.birthday_month || null,
7663                nameFirstChara: item.nameFirstChara,
7664                interview: _interview,
7665                url: item.url,
7666                color: item.color,
7667                isFov: Math.random() < 0.3 ? true : false,
7668                sp_character_id: item.sp_character_id || 0,
7669                isPopup: false,
7670                debut: item.debut,
7671                generation: item.generation
7672              }, "birthday_month", item.birthday_month || null);
7673              if (item.ID && typeof _this81.favoriteList[item.ID] === 'undefined') {
7674                _this81.$set(_this81.favoriteList, item.ID, false);
7675                _this81.$set(_this81.favoriteListTemp, item.ID, false);
7676              }
7677              return chara;
7678            });
7679          },
7680          /**
7681           * メモリの項目ごとに格納されたキャラデータから、メモリ用の配列と整形されたキャラ配列に変換
7682           */
7683          formatDataWithMemoriData: function formatDataWithMemoriData(dataObj) {
7684            var _this82 = this;
7685            var _obj = _objectSpread({}, dataObj);
7686            var charaList = [];
7687            var memoriList = [];
7688            Object.keys(_obj).forEach(function (headItem) {
7689              var _list = _obj[headItem];
7690              if (_list.length > 0) {
7691                var columnList = Math.ceil(_list.length / 3); // 行の数
7692                var nullNum = _list.length <= 3 ? 3 - _list.length : 3 - _list.length % 3; // 余りの数
7693                if (nullNum === 3) nullNum = 0;
7694                memoriList.push(headItem);
7695                if (columnList >= 2) memoriList.push.apply(memoriList, _toConsumableArray(Array(columnList - 1)));
7696                charaList.push.apply(charaList, _toConsumableArray(_this82.formatData([].concat(_toConsumableArray(_list), _toConsumableArray(Array(nullNum))))));
7697              }
7698              ;
7699            });
7700            return {
7701              charaList: charaList,
7702              memoriList: memoriList
7703            };
7704          },
7705          clearForm: function clearForm() {
7706            var _this83 = this;
7707            this.searchForm = {
7708              w: null,
7709              debut: null,
7710              birthday: null,
7711              tags: [],
7712              color: []
7713            };
7714            this.changeSearchCategory('cate1');
7715            this.$nextTick(function () {
7716              setTimeout(function () {
7717                _this83.resetScrollResultBox();
7718                if (_this83.scrollbar) {
7719                  _this83.scrollbar.destroy();
7720                  _this83.scrollbar = null;
7721                  _this83.scrollbar = new PerfectScrollbar(_this83.$refs.wrapper);
7722                  _this83.isScrollbarX = _this83.scrollbar.scrollbarXActive;
7723                }
7724              }, 100);
7725            });
7726          },
7727          submitForm: function submitForm() {
7728            var _this84 = this;
7729            this.filterWords = '';
7730            var values = _objectSpread({}, this.searchForm);
7731            var list = _objectSpread({}, this.filterBaseList);
7732
7733            // filter debut
7734            var debutWords = '';
7735            var queryDebut = values.debut;
7736            if (queryDebut) {
7737              Object.keys(list).forEach(function (key) {
7738                var _list = list[key];
7739                var _filterList = _list.filter(function (character) {
7740                  var debut = character.debut;
7741                  if (!debut) return false;
7742                  var qDebut = Number(queryDebut);
7743                  var ydebut = Number(debut);
7744                  return qDebut <= ydebut && ydebut <= qDebut + 9;
7745                });
7746                list[key] = _filterList;
7747              });
7748              //
7749              debutWords += "".concat(queryDebut, "\u5E74\u4EE3\u3001");
7750            }
7751
7752            // filter birth
7753            var queryBirth = values.birthday;
7754            var birthWords = '';
7755            if (queryBirth) {
7756              Object.keys(list).forEach(function (key) {
7757                var _list = list[key];
7758                var _filterList = _list.filter(function (character) {
7759                  var _character$search;
7760                  var birthList = (_character$search = character.search) === null || _character$search === void 0 ? void 0 : _character$search.birth;
7761                  if (!birthList || birthList.length === 0) return false;
7762                  return birthList.includes(queryBirth);
7763                });
7764                list[key] = _filterList;
7765              });
7766              //
7767              birthWords += "".concat(queryBirth, "\u6708\u3001");
7768            }
7769
7770            // filter color
7771            var queryColorList = values.color;
7772            var colorWords = '';
7773            var colorList = {
7774              red: '赤',
7775              pink: 'ピンク',
7776              blue: '青',
7777              green: '緑',
7778              purple: 'ç´«',
7779              yellow: '黄',
7780              orange: 'オレンジ',
7781              brown: 'ブラウン',
7782              white: '白',
7783              black: '黒'
7784            };
7785            if (queryColorList && queryColorList.length > 0) {
7786              Object.keys(list).forEach(function (key) {
7787                var _list = list[key];
7788                var _filterList = _list.filter(function (character) {
7789                  var _character$search2;
7790                  var colorList = (_character$search2 = character.search) === null || _character$search2 === void 0 ? void 0 : _character$search2.color;
7791                  if (!colorList || colorList.length === 0) return false;
7792                  return colorList.some(function (color) {
7793                    return queryColorList.includes(color);
7794                  });
7795                });
7796                list[key] = _filterList;
7797              });
7798              queryColorList.forEach(function (color) {
7799                var label = colorList[color];
7800                if (label) colorWords += "".concat(colorList[color], "\u3001");
7801              });
7802            }
7803
7804            // filter word
7805            var queryWord = values.w;
7806            var wordWords = '';
7807            if (queryWord) {
7808              Object.keys(list).forEach(function (key) {
7809                var _list = list[key];
7810                var _filterList = _list.filter(function (character) {
7811                  var _character$search3;
7812                  // const name = character.name;
7813                  var word = (_character$search3 = character.search) === null || _character$search3 === void 0 ? void 0 : _character$search3.word;
7814                  if (!word || word.length === 0) return false;
7815                  return word.indexOf(queryWord) !== -1;
7816                  ;
7817                });
7818                list[key] = _filterList;
7819              });
7820              wordWords += "".concat(queryWord, "\u3001");
7821            }
7822
7823            // filter tags
7824            var queryTags = values.tags;
7825            var tagWords = '';
7826            if (queryTags && queryTags.length > 0) {
7827              Object.keys(list).forEach(function (key) {
7828                var _list = list[key];
7829                var _filterList = _list.filter(function (character) {
7830                  var _character$search4;
7831                  var tagtext = (_character$search4 = character.search) === null || _character$search4 === void 0 ? void 0 : _character$search4.word;
7832                  if (!tagtext || tagtext.length === 0) return false;
7833                  return queryTags.some(function (tag) {
7834                    return tagtext.indexOf(tag) !== -1;
7835                  });
7836                });
7837                list[key] = _filterList;
7838              });
7839              queryTags.forEach(function (tag) {
7840                tagWords += "".concat(tag, "\u3001");
7841              });
7842            }
7843            ;
7844            this.filterWords = "".concat(wordWords).concat(debutWords).concat(birthWords).concat(tagWords).concat(colorWords);
7845            this.filterWords = this.filterWords.slice(0, -1);
7846            this.formatedList.search = this.formatDataWithMemoriData(list);
7847            if (this.currentSearchCategoryValue !== 'cate6') {
7848              this.changeSearchCategory('cate6');
7849            } else {
7850              this.activeListHook++;
7851            }
7852            this.closeModal();
7853            this.pushDataLayer(wordWords.slice(0, -1), debutWords.slice(0, -1), birthWords.slice(0, -1), tagWords.slice(0, -1), colorWords.slice(0, -1));
7854            this.$nextTick(function () {
7855              setTimeout(function () {
7856                _this84.resetScrollResultBox();
7857                if (_this84.scrollbar) {
7858                  _this84.scrollbar.update();
7859                  _this84.isScrollbarX = _this84.scrollbar.scrollbarXActive;
7860                }
7861              }, 1000);
7862            });
7863          },
7864          pushDataLayer: function pushDataLayer(word, debut, birth, tag, color) {
7865            dataLayer.push({
7866              event: 'measures_check',
7867              ev_action: 'search_freeword',
7868              ev_label: word,
7869              measures_id: 'U1'
7870            });
7871            dataLayer.push({
7872              event: 'measures_check',
7873              ev_action: 'search_year',
7874              ev_label: debut,
7875              measures_id: 'U2'
7876            });
7877            dataLayer.push({
7878              event: 'measures_check',
7879              ev_action: 'search_month',
7880              ev_label: birth,
7881              measures_id: 'U3'
7882            });
7883            dataLayer.push({
7884              event: 'measures_check',
7885              ev_action: 'search_keyword',
7886              ev_label: tag,
7887              measures_id: 'U4'
7888            });
7889            dataLayer.push({
7890              event: 'measures_check',
7891              ev_action: 'search_color',
7892              ev_label: color,
7893              measures_id: 'U5'
7894            });
7895            dataLayer.push({
7896              event: 'measures_check',
7897              ev_action: 'click',
7898              ev_label: 'character_detail_search',
7899              measures_id: 'U6'
7900            });
7901          },
7902          closeModal: function closeModal() {
7903            var el = !isMobile() ? this.$refs.modal : this.$refs.modalSp;
7904            var bg = !isMobile() ? this.$refs.modalBg : this.$refs.modalBgSp;
7905            var content = !isMobile() ? this.$refs.modalContent : this.$refs.modalContentSp;
7906            if (el.showModal) el.close();
7907            var tl = gsap.timeline();
7908            tl.set(el, {
7909              pointerEvents: 'none'
7910            }).to(content, {
7911              opacity: 0,
7912              duration: .1,
7913              ease: Expo.easeOut,
7914              onStart: function onStart() {
7915                if (!isMobile()) {
7916                  $('.js-sidebar').fadeIn(400);
7917                }
7918              }
7919            }).to(bg, {
7920              opacity: 0,
7921              scale: 0,
7922              duration: .3,
7923              ease: Expo.easeOut,
7924              onComplete: function onComplete() {
7925                if (isMobile()) {
7926                  Util.startScroll();
7927                }
7928              }
7929            }).set(el, {
7930              display: "none",
7931              pointerEvents: ''
7932            });
7933          },
7934          openModal: function openModal() {
7935            var el = !isMobile() ? this.$refs.modal : this.$refs.modalSp;
7936            var bg = !isMobile() ? this.$refs.modalBg : this.$refs.modalBgSp;
7937            var content = !isMobile() ? this.$refs.modalContent : this.$refs.modalContentSp;
7938            var tl = gsap.timeline();
7939            if (el.showModal) el.showModal();
7940            tl.set(bg, {
7941              scale: 0,
7942              opacity: 0
7943            }).set(content, {
7944              opacity: 0
7945            }).set(el, {
7946              display: 'block'
7947            }).to(bg, {
7948              opacity: 1,
7949              scale: 1,
7950              duration: .3,
7951              ease: Power2.easeOut,
7952              onStart: function onStart() {
7953                if (!isMobile()) {
7954                  $('.js-sidebar').fadeOut(400);
7955                }
7956              }
7957            }).to(content, {
7958              opacity: 1,
7959              duration: .2,
7960              ease: Sine.easeOut,
7961              onComplete: function onComplete() {
7962                if (isMobile()) {
7963                  Util.stopScroll();
7964                }
7965              }
7966            });
7967          },
7968          scrollResultBox: function scrollResultBox(target) {
7969            var wrapperEl = $(this.$refs.wrapper)[0];
7970            this.currentMemori = target;
7971            gsap.to(wrapperEl, {
7972              scrollTo: "#memori-".concat(target),
7973              duration: .5,
7974              ease: Sine.easeOut
7975            });
7976          },
7977          resetScrollResultBox: function resetScrollResultBox() {
7978            var wrapperEl = $(this.$refs.wrapper)[0];
7979            gsap.set(wrapperEl, {
7980              scrollTo: {
7981                x: 0
7982              }
7983            });
7984            gsap.set(this.$refs.searchLists, {
7985              scrollTo: {
7986                x: 0
7987              }
7988            });
7989          },
7990          shuffleCard: function shuffleCard(list) {
7991            var allLength = list.length;
7992            var _list = _toConsumableArray(list).filter(function (card) {
7993              return card;
7994            });
7995            var cardLength = _list.length;
7996            var shuffleAList = Util.shuffleArray(_list);
7997            return [].concat(_toConsumableArray(shuffleAList), _toConsumableArray(Array(allLength - cardLength)));
7998          },
7999          shuffleRandom: function shuffleRandom() {
8000            var _this$formatedList;
8001            if (!this.formatedList.random) return;
8002            this.formatedList.random = this.shuffleCard(_toConsumableArray((_this$formatedList = this.formatedList) === null || _this$formatedList === void 0 ? void 0 : _this$formatedList.random));
8003          },
8004          shuffleInterview: function shuffleInterview() {
8005            this.formatedList.interview = this.shuffleCard(this.formatedList.interview);
8006          },
8007          updateFavoriteList: function updateFavoriteList() {
8008            var _this85 = this;
8009            Object.keys(this.favoriteListTemp).forEach(function (key) {
8010              _this85.favoriteList[key] = _this85.favoriteListTemp[key];
8011            });
8012          },
8013          updateActiveList: function updateActiveList() {},
8014          isFirstVisit: function isFirstVisit() {
8015            var keyName = 'CharaVisited';
8016            var visited = sessionStorage.getItem(keyName);
8017            if (!visited) {
8018              sessionStorage.setItem(keyName, true);
8019              return true;
8020            }
8021            return false;
8022          },
8023          wrapperScroll: function wrapperScroll() {
8024            var wrapperEl = $(this.$refs.wrapper)[0];
8025            wrapperEl.addEventListener('scroll', function () {
8026              wrapperEl.classList.add('is-scrolling');
8027            });
8028          }
8029        },
8030        computed: {
8031          // アクティブな表示項目の配列
8032          activeList: function activeList() {
8033            var _this86 = this;
8034            this.currentMemori = null;
8035            this.memoriList = [];
8036            var list = [];
8037            var watchHook = this.activeListHook;
8038            if (this.mode === 0) {
8039              switch (this.currentSearchCategoryValue) {
8040                case 'cate1':
8041                  if (this.formatedList.pickup) {
8042                    list = _toConsumableArray(this.formatedList.pickup);
8043                  }
8044                  break;
8045                case 'cate2':
8046                  list = _toConsumableArray(this.formatedList.yomi.charaList);
8047                  this.memoriList = _toConsumableArray(this.formatedList.yomi.memoriList);
8048                  break;
8049                case 'cate3':
8050                  list = _toConsumableArray(this.formatedList.debut.charaList);
8051                  this.memoriList = _toConsumableArray(this.formatedList.debut.memoriList);
8052                  break;
8053                case 'cate4':
8054                  list = _toConsumableArray(this.formatedList.birthday.charaList);
8055                  this.memoriList = _toConsumableArray(this.formatedList.birthday.memoriList);
8056                  break;
8057                case 'cate5':
8058                  if (this.formatedList.random) {
8059                    this.shuffleRandom();
8060                    list = _toConsumableArray(this.formatedList.random);
8061                  }
8062                  break;
8063                case 'cate6':
8064                  list = _toConsumableArray(this.formatedList.search.charaList) || [];
8065                  this.memoriList = _toConsumableArray(this.formatedList.search.memoriList);
8066                  break;
8067                default:
8068                  list = _toConsumableArray(this.allList);
8069                  break;
8070              }
8071            } else if (this.mode === 1) {
8072              var _list = this.formatedList.interview.filter(function (item) {
8073                if (!item) return false;
8074                return item.interview[_this86.activeInterview] ? true : false;
8075              });
8076              var nullNum = _list.length <= 3 ? 3 - _list.length : 3 - _list.length % 3; // 余りの数
8077              if (nullNum === 3) nullNum = 0;
8078              list = [].concat(_toConsumableArray(_list), _toConsumableArray(Array(nullNum)));
8079            }
8080
8081            // お気にりで絞り込まれた時の処理
8082            if (this.isFilterFavChara && list.length > 0) {
8083              var filterd_list = list.filter(function (item) {
8084                var _this86$favoriteList;
8085                if (!item) return;
8086                return ((_this86$favoriteList = _this86.favoriteList) === null || _this86$favoriteList === void 0 ? void 0 : _this86$favoriteList[item.id]) || false;
8087              });
8088              if (this.memoriList.length > 0) {
8089                var _memoris = this.memoriList.filter(function (item) {
8090                  return item ? true : false;
8091                });
8092                this.memoriList = [];
8093                // 五十音
8094                if (this.mode === 0 && this.currentSearchCategoryValue === 'cate2') {
8095                  var obj = {};
8096                  _memoris.forEach(function (memori) {
8097                    var sectionItems = filterd_list.filter(function (item) {
8098                      return item.nameFirstChara === memori;
8099                    });
8100                    if (sectionItems.length > 0) {
8101                      obj[memori] = sectionItems;
8102                    }
8103                  });
8104                  list = [];
8105                  Object.keys(obj).forEach(function (headItem) {
8106                    var _list = obj[headItem];
8107                    if (_list.length > 0) {
8108                      var _this86$memoriList, _list2;
8109                      var columnList = Math.ceil(_list.length / 3); // 行の数
8110                      var _nullNum = _list.length <= 3 ? 3 - _list.length : 3 - _list.length % 3; // 余りの数
8111                      if (_nullNum === 3) _nullNum = 0;
8112                      _this86.memoriList.push(headItem);
8113                      if (columnList >= 2) (_this86$memoriList = _this86.memoriList).push.apply(_this86$memoriList, _toConsumableArray(Array(columnList - 1)));
8114                      (_list2 = list).push.apply(_list2, _toConsumableArray(_list).concat(_toConsumableArray(Array(_nullNum))));
8115                    }
8116                    ;
8117                  });
8118                }
8119                // デビュー年
8120                else if (this.mode === 0 && this.currentSearchCategoryValue === 'cate3') {
8121                  var _obj2 = {};
8122                  _memoris.forEach(function (memori) {
8123                    var sectionItems = filterd_list.filter(function (item) {
8124                      return item.generation === memori;
8125                    });
8126                    if (sectionItems.length > 0) {
8127                      _obj2[memori] = sectionItems;
8128                    }
8129                  });
8130                  list = [];
8131                  Object.keys(_obj2).forEach(function (headItem) {
8132                    var _list = _obj2[headItem];
8133                    if (_list.length > 0) {
8134                      var _this86$memoriList2, _list3;
8135                      var columnList = Math.ceil(_list.length / 3); // 行の数
8136                      var _nullNum2 = _list.length <= 3 ? 3 - _list.length : 3 - _list.length % 3; // 余りの数
8137                      if (_nullNum2 === 3) _nullNum2 = 0;
8138                      _this86.memoriList.push(headItem);
8139                      if (columnList >= 2) (_this86$memoriList2 = _this86.memoriList).push.apply(_this86$memoriList2, _toConsumableArray(Array(columnList - 1)));
8140                      (_list3 = list).push.apply(_list3, _toConsumableArray(_list).concat(_toConsumableArray(Array(_nullNum2))));
8141                    }
8142                    ;
8143                  });
8144                }
8145                // 誕生日月
8146                else if (this.mode === 0 && this.currentSearchCategoryValue === 'cate4') {
8147                  var _obj3 = {};
8148                  _memoris.forEach(function (memori) {
8149                    var sectionItems = filterd_list.filter(function (item) {
8150                      return item.birthday_month == memori;
8151                    });
8152                    if (sectionItems.length > 0) {
8153                      _obj3[memori] = sectionItems;
8154                    }
8155                  });
8156                  list = [];
8157                  Object.keys(_obj3).forEach(function (headItem) {
8158                    var _list = _obj3[headItem];
8159                    if (_list.length > 0) {
8160                      var _this86$memoriList3, _list4;
8161                      var columnList = Math.ceil(_list.length / 3); // 行の数
8162                      var _nullNum3 = _list.length <= 3 ? 3 - _list.length : 3 - _list.length % 3; // 余りの数
8163                      if (_nullNum3 === 3) _nullNum3 = 0;
8164                      _this86.memoriList.push(headItem);
8165                      if (columnList >= 2) (_this86$memoriList3 = _this86.memoriList).push.apply(_this86$memoriList3, _toConsumableArray(Array(columnList - 1)));
8166                      (_list4 = list).push.apply(_list4, _toConsumableArray(_list).concat(_toConsumableArray(Array(_nullNum3))));
8167                    }
8168                    ;
8169                  });
8170                } else {
8171                  var _nullNum4 = filterd_list.length <= 3 ? 3 - filterd_list.length : 3 - filterd_list.length % 3; // 余りの数
8172                  if (_nullNum4 === 3) _nullNum4 = 0;
8173                  list = [].concat(_toConsumableArray(filterd_list), _toConsumableArray(Array(_nullNum4)));
8174                }
8175              } else {
8176                // 目盛りがない場合
8177                var _nullNum5 = filterd_list.length <= 3 ? 3 - filterd_list.length : 3 - filterd_list.length % 3; // 余りの数
8178                if (_nullNum5 === 3) _nullNum5 = 0;
8179                list = [].concat(_toConsumableArray(filterd_list), _toConsumableArray(Array(_nullNum5)));
8180              }
8181            }
8182            // お気にりで絞り込まれた時の処理 end
8183
8184            this.$nextTick(function () {
8185              _this86.resetScrollResultBox();
8186              if (_this86.scrollbar) {
8187                _this86.scrollbar.update();
8188                _this86.isScrollbarX = _this86.scrollbar.scrollbarXActive;
8189              }
8190            });
8191            return list;
8192          },
8193          currentLabel: function currentLabel() {
8194            var _this87 = this;
8195            var current = this.searchCategoryList.filter(function (item) {
8196              return item.value == _this87.currentSearchCategory;
8197            });
8198            return current[0].text;
8199          },
8200          currentUnit: function currentUnit() {
8201            if (this.currentSearchCategoryValue === 'cate3') {
8202              return this.unitData.debut;
8203            } else if (this.currentSearchCategoryValue === 'cate4') {
8204              return this.unitData.birthday;
8205            }
8206          },
8207          detailConditions: function detailConditions() {
8208            var _conditionsObj = _objectSpread({}, this.searchForm);
8209            var _text = '';
8210            Object.keys(_conditionsObj).forEach(function (key) {
8211              var _condition = _conditionsObj[key];
8212              if (_condition && _text.length > 0) {
8213                _text += ',';
8214              }
8215              if (typeof _condition === 'string') {
8216                _text += _condition;
8217              } else if (_typeof(_condition) === 'object') {
8218                _text += _toConsumableArray(_condition).join(',');
8219              }
8220            });
8221            return _text;
8222          }
8223        },
8224        created: function created() {
8225          var _this88 = this;
8226          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
8227            var _this88$formatedList, _this88$formatedList$, _this88$formatedList$2;
8228            return _regeneratorRuntime().wrap(function _callee31$(_context31) {
8229              while (1) switch (_context31.prev = _context31.next) {
8230                case 0:
8231                  _this88.dataList = dataList;
8232                  _this88.formatedList = {};
8233                  _this88.formatedList.interview = [];
8234
8235                  // 表示用データを整形して格納する
8236                  Object.keys(_this88.dataList).forEach(function (key) {
8237                    var _this88$dataList$key, _this88$dataList$key2;
8238                    switch (key) {
8239                      case 'pickup':
8240                        _this88.formatedList.pickup = _this88.formatData((_this88$dataList$key = _this88.dataList[key]) === null || _this88$dataList$key === void 0 ? void 0 : _this88$dataList$key.pickup);
8241                        break;
8242                      case 'yomi':
8243                        _this88.formatedList.yomi = _this88.formatDataWithMemoriData(_this88.dataList[key]);
8244                        break;
8245                      case 'debut':
8246                        _this88.formatedList.debut = _this88.formatDataWithMemoriData(_this88.dataList[key]);
8247                        break;
8248                      case 'birthday':
8249                        _this88.formatedList.birthday = _this88.formatDataWithMemoriData(_this88.dataList[key]);
8250                        break;
8251                      case 'random':
8252                        _this88.formatedList.random = _this88.formatData((_this88$dataList$key2 = _this88.dataList[key]) === null || _this88$dataList$key2 === void 0 ? void 0 : _this88$dataList$key2.random);
8253                        break;
8254                    }
8255                  });
8256                  _this88.formatedList.interview = _toConsumableArray(_this88.formatedList.random);
8257                  _this88.formatedList.search = null;
8258                  _this88.filterBaseList = _objectSpread({}, _this88.dataList['yomi']);
8259                  (_this88$formatedList = _this88.formatedList) === null || _this88$formatedList === void 0 ? void 0 : (_this88$formatedList$ = _this88$formatedList.debut) === null || _this88$formatedList$ === void 0 ? void 0 : (_this88$formatedList$2 = _this88$formatedList$.memoriList) === null || _this88$formatedList$2 === void 0 ? void 0 : _this88$formatedList$2.forEach(function (year) {
8260                    if (year) _this88.searchOpt.debutList.push({
8261                      label: "".concat(year, "\u5E74\u4EE3"),
8262                      code: "".concat(year)
8263                    });
8264                  });
8265                  console.log(_this.LoginUtil.isLogin);
8266                  setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
8267                    var res;
8268                    return _regeneratorRuntime().wrap(function _callee30$(_context30) {
8269                      while (1) switch (_context30.prev = _context30.next) {
8270                        case 0:
8271                          if (!_this.LoginUtil.isLogin) {
8272                            _context30.next = 6;
8273                            break;
8274                          }
8275                          _context30.next = 3;
8276                          return _this.LoginUtil.getFavoriteChara();
8277                        case 3:
8278                          res = _context30.sent;
8279                          if (res.list.length > 0) {
8280                            res.list.forEach(function (item) {
8281                              _this88.$set(_this88.favoriteList, item.post_id, true);
8282                              _this88.$set(_this88.favoriteListTemp, item.post_id, true);
8283                            });
8284                          }
8285                          if (res.main) {
8286                            res.main.isPanelShow = false;
8287                            _this88.mainChara = res.main;
8288                          }
8289                        case 6:
8290                        case "end":
8291                          return _context30.stop();
8292                      }
8293                    }, _callee30);
8294                  })), 100);
8295                case 10:
8296                case "end":
8297                  return _context31.stop();
8298              }
8299            }, _callee31);
8300          }))();
8301        },
8302        mounted: function mounted() {
8303          var _this89 = this;
8304          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
8305            var url, initSearchCategory, initValue;
8306            return _regeneratorRuntime().wrap(function _callee32$(_context32) {
8307              while (1) switch (_context32.prev = _context32.next) {
8308                case 0:
8309                  setTimeout(function () {
8310                    if (_this89.$refs.wrapper) _this89.scrollbar = new PerfectScrollbar(_this89.$refs.wrapper);
8311                    _this89.isScrollbarX = _this89.scrollbar.scrollbarXActive;
8312                    _this89.isShowSwipeIcon = _this89.isFirstVisit();
8313                    _this89.wrapperScroll();
8314                    var wrapper = _this89.$refs.wrapper;
8315                    if (wrapper) {
8316                      setTimeout(function () {
8317                        wrapper.classList.add('is-loaded');
8318                      }, 10000);
8319                    }
8320                  }, 10);
8321                  _context32.next = 3;
8322                  return _this.LoginUtil.checkLogin();
8323                case 3:
8324                  _this89.isLogin = _context32.sent;
8325                  url = new URL(window.location.href);
8326                  initSearchCategory = url.searchParams.get('search-category');
8327                  if (initSearchCategory && initSearchCategory !== 'interview') {
8328                    initValue = null;
8329                    Object.keys(_this89.parameterList).forEach(function (key) {
8330                      var v = _this89.parameterList[key];
8331                      if (v === initSearchCategory) {
8332                        initValue = key;
8333                      }
8334                    });
8335                    if (initValue) {
8336                      _this89.currentSearchCategory = initValue;
8337                      _this89.changeSearchCategory(initValue);
8338                    }
8339                  } else if (initSearchCategory && initSearchCategory === 'interview') {
8340                    _this89.shuffleInterview();
8341                    _this89.changeMode(1);
8342                  }
8343                case 7:
8344                case "end":
8345                  return _context32.stop();
8346              }
8347            }, _callee32);
8348          }))();
8349        }
8350      });
8351      $('.js-searchCharacter-modal-trigger').on('click', function (e) {
8352        e.preventDefault();
8353        appSearchBox.openModal();
8354      });
8355    }
8356  }, {
8357    key: "getCharaList",
8358    value: function getCharaList() {
8359      var _this90 = this;
8360      var _this = this;
8361      return new Promise(function (resolve, reject) {
8362        Promise.allSettled([_this90.getData('pickup', _this.apiList.pickup), _this90.getData('yomi', _this.apiList.yomi), _this90.getData('debut', _this.apiList.debut), _this90.getData('birthday', _this.apiList.birthday), _this90.getData('random', _this.apiList.random)]).then(function (data) {
8363          data.forEach(function (item) {
8364            if (item.status === 'fulfilled') {
8365              _this90.dataList[item.value.key] = item.value.data;
8366            }
8367          });
8368          resolve();
8369        });
8370      });
8371    }
8372  }, {
8373    key: "getData",
8374    value: function getData(key, src) {
8375      return new Promise(function (resolve, reject) {
8376        axios.get(src).then(function (_ref9) {
8377          var data = _ref9.data;
8378          resolve({
8379            key: key,
8380            data: data
8381          });
8382        })["catch"](function (error) {
8383          reject(error);
8384        });
8385      });
8386    }
8387  }]);
8388  return AppSearchCharacter;
8389}();
8390var MoreArticles = /*#__PURE__*/function () {
8391  function MoreArticles() {
8392    _classCallCheck(this, MoreArticles);
8393    this.target = 'js-moreArticles';
8394    this.$el = $("#".concat(this.target));
8395    this.$trigger = $("#".concat(this.target, "-trigger"));
8396    this.item = ".".concat(this.target, "-item");
8397    this.prevPos = 0;
8398    this.nextUrl = '';
8399    if (this.$el.length > 0 && this.$trigger.length > 0) {
8400      this.init();
8401    }
8402  }
8403  _createClass(MoreArticles, [{
8404    key: "init",
8405    value: function init() {
8406      var _this91 = this;
8407      this.nextUrl = this.$trigger.data('href');
8408      this.$trigger.on('click', function (e) {
8409        e.preventDefault();
8410        _this91.prevPos = $(window).scrollTop();
8411        _this91.getNextList(_this91.nextUrl);
8412      });
8413    }
8414  }, {
8415    key: "getNextList",
8416    value: function getNextList(nextUrl) {
8417      var _this = this;
8418      $.ajax({
8419        url: nextUrl,
8420        type: 'GET',
8421        timeout: 5000
8422      }).done(function (data) {
8423        _this.setNextList(data);
8424      }).fail(function (e) {
8425        //console.log(e);
8426      });
8427    }
8428  }, {
8429    key: "setNextList",
8430    value: function setNextList(data) {
8431      var _this = this;
8432      var data_HTML = $.parseHTML(data);
8433      var list = $(data_HTML).find(this.item);
8434      //console.log(list);
8435      for (var i = 0; i < list.length; i++) {
8436        this.$el.append(list[i]);
8437      }
8438      var target = $(data_HTML).find("#".concat(_this.target, "-trigger"));
8439      this.scrollToPos(this.prevPos);
8440      if (target.length > 0) {
8441        this.nextUrl = $(target[0]).data('href');
8442      } else {
8443        this.$trigger.hide();
8444      }
8445    }
8446  }, {
8447    key: "scrollToPos",
8448    value: function scrollToPos(pos) {
8449      gsap.to(window, {
8450        scrollTo: pos,
8451        duration: 0
8452      });
8453    }
8454  }]);
8455  return MoreArticles;
8456}();
8457var AppSearchDigital = /*#__PURE__*/function () {
8458  function AppSearchDigital() {
8459    _classCallCheck(this, AppSearchDigital);
8460    this.target = 'app-searchDigital';
8461    this.el = document.getElementById(this.target);
8462    this.application = null;
8463    this.parentCategoryId = 4;
8464    if (this.el) this.init();
8465  }
8466  _createClass(AppSearchDigital, [{
8467    key: "init",
8468    value: function () {
8469      var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() {
8470        var characters, data, array, categories, calcData;
8471        return _regeneratorRuntime().wrap(function _callee33$(_context33) {
8472          while (1) switch (_context33.prev = _context33.next) {
8473            case 0:
8474              _context33.next = 2;
8475              return getFilterDigital();
8476            case 2:
8477              _context33.t0 = _context33.sent;
8478              if (_context33.t0) {
8479                _context33.next = 5;
8480                break;
8481              }
8482              _context33.t0 = [];
8483            case 5:
8484              characters = _context33.t0;
8485              _context33.next = 8;
8486              return getWPDigital();
8487            case 8:
8488              _context33.t1 = _context33.sent;
8489              if (_context33.t1) {
8490                _context33.next = 11;
8491                break;
8492              }
8493              _context33.t1 = [];
8494            case 11:
8495              data = _context33.t1;
8496              array = Object.values(data) || [];
8497              categories = array.map(function (d, i) {
8498                return _objectSpread(_objectSpread({}, d === null || d === void 0 ? void 0 : d.category), {}, {
8499                  index: i
8500                });
8501              }) || [];
8502              calcData = array.map(function (d) {
8503                var _d$children, _d$children2, _d$category;
8504                var subCategory = d === null || d === void 0 ? void 0 : (_d$children = d.children) === null || _d$children === void 0 ? void 0 : _d$children.map(function (c) {
8505                  var _c$contents;
8506                  if ((c === null || c === void 0 ? void 0 : (_c$contents = c.contents) === null || _c$contents === void 0 ? void 0 : _c$contents.length) === 0) return;
8507                  return c === null || c === void 0 ? void 0 : c.category;
8508                }).filter(Boolean);
8509                var content = d === null || d === void 0 ? void 0 : (_d$children2 = d.children) === null || _d$children2 === void 0 ? void 0 : _d$children2.map(function (c) {
8510                  var _c$contents2;
8511                  if ((c === null || c === void 0 ? void 0 : (_c$contents2 = c.contents) === null || _c$contents2 === void 0 ? void 0 : _c$contents2.length) === 0) return;
8512                  return c === null || c === void 0 ? void 0 : c.c
8512ontents;
8513                }).filter(Boolean);
8514                return {
8515                  key: d === null || d === void 0 ? void 0 : (_d$category = d.category) === null || _d$category === void 0 ? void 0 : _d$category.slug,
8516                  child_category: subCategory,
8517                  content: content
8518                };
8519              });
8520              this.app({
8521                characters: characters,
8522                categories: categories,
8523                initialData: calcData
8524              });
8525            case 16:
8526            case "end":
8527              return _context33.stop();
8528          }
8529        }, _callee33, this);
8530      }));
8531      function init() {
8532        return _init.apply(this, arguments);
8533      }
8534      return init;
8535    }()
8536  }, {
8537    key: "app",
8538    value: function app(_data) {
8539      var digitalCommunication = {
8540        props: ['section', 'anchor', 'index', 'pages', 'type', 'characters'],
8541        data: function data() {
8542          return {
8543            per_page: 8
8544          };
8545        },
8546        mounted: function mounted() {
8547          // console.log(`communication_____`, this.characters);
8548        },
8549        methods: {
8550          changeChar: function changeChar(props) {
8551            //console.log(props);
8552          },
8553          clickMore: function clickMore() {
8554            var _this92 = this;
8555            var pages = this.pages.map(function (d, i) {
8556              if (i === Number(_this92.index)) {
8557                return d + 1;
8558              } else {
8559                return d;
8560              }
8561            });
8562            this.$emit('parent-method', {
8563              pages: pages
8564            });
8565          },
8566          updateChildParam: function updateChildParam(props) {
8567            this.$emit('parent-method', {
8568              detail: props
8569            });
8570          }
8571        },
8572        computed: {
8573          page: function page() {
8574            var _this$pages;
8575            return (_this$pages = this.pages) === null || _this$pages === void 0 ? void 0 : _this$pages[this.index];
8576          },
8577          sortItems: function sortItems() {
8578            var _this$characters,
8579              _this93 = this;
8580            var items = ((_this$characters = this.characters) === null || _this$characters === void 0 ? void 0 : _this$characters.length) > 0 ? this.characters.map(function (d, i) {
8581              var res = _toConsumableArray(_this93.section).filter(function (f) {
8582                var charIds = f === null || f === void 0 ? void 0 : f.chara_post_id;
8583                return charIds.includes(parseInt(d === null || d === void 0 ? void 0 : d.post_id));
8584              }).flat();
8585              return res;
8586            }).flat() : _toConsumableArray(this.section);
8587            var newItems = Array.from(new Set(items));
8588            return newItems;
8589          },
8590          showItems: function showItems() {
8591            return this.sortItems.slice(0, this.page * this.per_page);
8592          },
8593          showMore: function showMore() {
8594            var _this$characters2;
8595            var items = ((_this$characters2 = this.characters) === null || _this$characters2 === void 0 ? void 0 : _this$characters2.length) > 0 ? this.sortItems : this.section;
8596            return judgeShowMore(items, this.page, this.per_page);
8597          }
8598        },
8599        template: "\n        <section class=\"p-digitalSection\">\n          <div class=\"p-digitalSection__inner\">\n            <div class=\"p-digitalSection__content\">\n              <div class=\"p-digitalSection__head\">\n                    <h2 class=\"c-textRoundLine\" :id='anchor?.[index]?.slug'><span class=\"c-line\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1200\" height=\"64\" viewBox=\"0 0 1200 64\">\n<path id=\"\u30D1\u30B9_29550\" data-name=\"\u30D1\u30B9 29550\" d=\"M1015.158,62.89H597.7C556.975,26.951,493.079,1,414.852,1c-79.9,0-150.143,24.65-190.5,61.89h-409.2\" transform=\"translate(185.842)\" fill=\"none\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" stroke-width=\"2\" stroke-dasharray=\"0 5\"/>\n</svg>\n</span><span>{{anchor?.[index]?.name}}</span></h2>\n              </div>\n              <div class=\"p-digitalSection__body\">\n                <div class=\"c-block-more\" v-if='showItems?.length > 0'>\n                  <ul class=\"c-list-digital-communication\">\n                    <li class=\"c-list-digital-communication__item\" v-for='
8599(item, index) in showItems' :key='\"detail-\" + item.ID'>\n                    <a :href=\"item?.permalink?.url\" :target=\"item?.permalink?.target === '_blank' ? '_blank' : false\" @click='updateChildParam(\"detail-\" + item?.ID)'>\n                    <div class=\"c-img\"><img :src=\"item?.thumbnail?.url || ''\" alt=\"\" loading=\"lazy\"></div>\n                    <div class=\"c-title\">\n                      <div class=\"c-link-text\">{{item?.title?.rendered}}\n                      <span class=\"c-icon -icon-blank\" v-if=\"item?.permalink?.target === '_blank'\">\n                      <svg>\n                      <use xlink:href=\"#icon-blank\"></use>\n                      </svg></span>\n                    </div>\n                    </div></a>\n                    </li>\n                  </ul>\n                  <div class=\"c-link-icon -hover -l c-btn-more\" @click=\"clickMore()\" v-if='showMore'>\n                    <a href=\"javascript:void(0);\"><span class=\"c-icon -icon-more\"><svg>\n                    <use xlink:href=\"#icon-more\"></use></svg>\n</span><span class=\"c-link-icon-label\">\u3082\u3063\u3068\u898B\u308B</span></a></div>\n                  <div class=\"c-link-icon -hover -gray -to-top\"><a href=\"?id=digital-search\"><span class=\"c-icon -icon-top\"><svg>\n                  <use xlink:href=\"#icon-top\"></use>\n</svg>\n</span><span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n                  </div>\n\n                  <div class=\"c-block-more-empty\" v-else>\n                    <div class=\"c-block-more-empty__inner\">\n                      <p class=\"c-block-more-empty__text\">\u691C\u7D22\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F</p>\n                      <div class=\"c-block-more-empty__img\">\n                        <svg class=\"icon-news-empty\">\n                          <use class=\"deco-outline-pale\" xlink:href=\"#deco-outline-pale\"></use>\n                          <use class=\"deco-outline\" xlink:href=\"#deco-outline\"></use>\n                        </svg>\n                      </div>\n                    </div>\n                    <div class=\"c-link-icon -hover -gray -to-top\">\n                      <a href=\"id=js-header\"><span class=\"c-icon -icon-top\">\n                        <svg>\n                          <use xlink:href=\"#icon-top\"></use>\n                        </svg>\n</span><span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n                </div>\n              </div>\n            </div>\n          </div>\n        </section>\n      "
8600      };
8601      var digitalApp = {
8602        props: ['section', 'anchor', 'index', 'pages', 'type', 'characters'],
8603        data: function data() {
8604          var _document$querySelect;
8605          return {
8606            per_page: 6,
8607            imgPath: ((_document$querySelect = document.querySelector('meta[name="X-Asset-Base"]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.content) || "/wp-content/themes/sanrio2022/common/"
8608          };
8609        },
8610        mounted: function mounted() {
8611          // console.log(this.showItems);
8612        },
8613        methods: {
8614          clickMore: function clickMore() {
8615            var _this94 = this;
8616            var pages = this.pages.map(function (d, i) {
8617              if (i === Number(_this94.index)) {
8618                return d + 1;
8619              } else {
8620                return d;
8621              }
8622            });
8623            this.$emit('parent-method', {
8624              pages: pages
8625            });
8626          },
8627          updateChildParam: function updateChildParam(props) {
8628            this.$emit('parent-method', {
8629              detail: props
8630            });
8631          }
8632        },
8633        computed: {
8634          page: function page() {
8635            var _this$pages2;
8636            return (_this$pages2 = this.pages) === null || _this$pages2 === void 0 ? void 0 : _this$pages2[this.index];
8637          },
8638          sortItems: function sortItems() {
8639            var _this$characters3,
8640              _this95 = this;
8641            var items = ((_this$characters3 = this.characters) === null || _this$characters3 === void 0 ? void 0 : _this$characters3.length) > 0 ? this.characters.map(function (d, i) {
8642              var res = _toConsumableArray(_this95.section).filter(function (f) {
8643                var charIds = f === null || f === void 0 ? void 0 : f.chara_post_id;
8644                return charIds.includes(parseInt(d === null || d === void 0 ? void 0 : d.post_id));
8645              }).flat();
8646              return res;
8647            }).flat() : _toConsumableArray(this.section);
8648            var newItems = Array.from(new Set(items));
8649            return newItems;
8650          },
8651          showItems: function showItems() {
8652            return this.sortItems.slice(0, this.page * this.per_page);
8653          },
8654          showMore: function showMore() {
8655            var _this$characters4;
8656            var items = ((_this$characters4 = this.characters) === null || _this$characters4 === void 0 ? void 0 : _this$characters4.length) > 0 ? this.sortItems : this.section;
8657            return judgeShowMore(items, this.page, this.per_page);
8658          }
8659        },
8660        template: "\n        <section class=\"p-digitalSection\">\n          <div class=\"p-digitalSection__inner\">\n            <div class=\"p-digitalSection__content\">\n              <div class=\"p-digitalSection__head\">\n                    <h2 class=\"c-textRoundLine\" :id='anchor?.[index]?.slug'><span class=\"c-line\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1200\" height=\"64\" viewBox=\"0 0 1200 64\"><path id=\"\u30D1\u30B9_29550\" data-name=\"\u30D1\u30B9 29550\" d=\"M1015.158,62.89H597.7C556.975,26.951,493.079,1,414.852,1c-79.9,0-150.143,24.65-190.5,61.89h-409.2\" transform=\"translate(185.842)\" fill=\"none\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" stroke-width=\"2\" stroke-dasharray=\"0 5\"/></svg></span>
8660\n                    <span>{{anchor?.[index]?.name}}</span></h2>\n              </div>\n              <div class=\"p-digitalSection__body\">\n                  <div class=\"c-block-more\" v-if='showItems?.length > 0'>\n                    <ul class=\"c-list-digital-app\">\n                      <li class=\"c-list-digital-app__item\" v-for=\"item in showItems\" :key='\"detail-\" + item?.ID' :id=\"'detail-' + item?.ID\">\n                        <div class=\"c-title\">\n                          <div class=\"c-link-text\">{{item?.title?.rendered}}\n                          </div>\n                        </div>\n                        <div class=\"c-list-digital-app__inner\">\n                            <div class=\"c-text\">\n                              <div class=\"c-img\"><img :src=\"item?.thumbnail?.url || ''\" alt=\"\" loading=\"lazy\" width=\"140\" height=\"140\">\n                              </div>\n                              <p class=\"u-br\">{{item?.description}}</p>\n                            </div>\n                              <div class=\"c-btn-app\">\n                              <a v-if='item?.permalink?.ios' :href=\"item?.permalink?.ios\" target=\"_blank\"><img :src=\"imgPath + 'images/common/btn_appstore.svg'\" alt=\"App Store\u304B\u3089\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\" loading=\"lazy\" width=\"150\" height=\"55\"></a>\n                              <a v-if='item?.permalink?.android' :href=\"item?.permalink?.android\" target=\"_blank\"><img :src=\"imgPath + 'images/common/btn_googleplay.svg'\" alt=\"Google Play\u3067\u624B\u306B\u5165\u308C\u3088\u3046\" loading=\"lazy\" width=\"186\" height=\"55\"></a></div>\n                          <div class=\"c-note\">{{item?.saler}}</div>\n                        </div>\n                      </li>\n                    </ul>\n                    <div class=\"c-link-icon -hover -l c-btn-more\" @click=\"clickMore()\" v-if='showMore'>\n                      <a href=\"javascript:void(0);\"><span class=\"c-icon -icon-more\"><svg>\n                      <use xlink:href=\"#icon-more\"></use></svg></span><span class=\"c-link-icon-label\">\u3082\u3063\u3068\u898B\u308B</span></a></div>\n                    <div class=\"c-link-icon -hover -gray -to-top\"><a href=\"?id=digital-search\"><span class=\"c-icon -icon-top\"><svg><use xlink:href=\"#icon-top\"></use></svg></span>\n                    <span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n                  </div>\n                    <div class=\"c-block-more-empty\" v-else>\n                      <div class=\"c-block-more-empty__inner\">\n                        <p class=\"c-block-more-empty__text\">\u691C\u7D22\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F</p>\n                        <div class=\"c-block-more-empty__img\">\n                          <svg class=\"icon-news-empty\">\n                            <use class=\"deco-outline-pale\" xlink:href=\"#deco-outline-pale\"></use>\n                            <use class=\"deco-outline\" xlink:href=\"#deco-outline\"></use>\n                          </svg>\n                        </div>\n                      </div>\n                      <div class=\"c-link-icon -hover -gray -to-top\">\n                        <a href=\"id=js-header\"><span class=\"c-icon -icon-top\">\n                        <svg>\n                          <use xlink:href=\"#icon-top\"></use>\n                        </svg>\n</span><span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n                    </div>\n              </div>\n            </div>\n          </div>\n        </section>\n      "
8661      };
8662      var digitalBrowser = {
8663        props: ['section', 'anchor', 'index', 'pages', 'type', 'characters'],
8664        data: function data() {
8665          return {
8666            per_page: 6
8667          };
8668        },
8669        mounted: function mounted() {
8670          // console.log(this.items);
8671        },
8672        methods: {
8673          clickMore: function clickMore() {
8674            var _this96 = this;
8675            var pages = this.pages.map(function (d, i) {
8676              if (i === Number(_this96.index)) {
8677                return d + 1;
8678              } else {
8679                return d;
8680              }
8681            });
8682            this.$emit('parent-method', {
8683              pages: pages
8684            });
8685          },
8686          updateChildParam: function updateChildParam(props) {
8687            this.$emit('parent-method', {
8688              detail: props
8689            });
8690          }
8691        },
8692        computed: {
8693          page: function page() {
8694            var _this$pages3;
8695            return (_this$pages3 = this.pages) === null || _this$pages3 === void 0 ? void 0 : _this$pages3[this.index];
8696          },
8697          sortItems: function sortItems() {
8698            var _this$characters5,
8699              _this97 = this;
8700            var items = ((_this$characters5 = this.characters) === null || _this$characters5 === void 0 ? void 0 : _this$characters5.length) > 0 ? this.characters.map(function (d, i) {
8701              var res = _toConsumableArray(_this97.section).filter(function (f) {
8702                var charIds = f === null || f === void 0 ? void 0 : f.chara_post_id;
8703                return charIds.includes(parseInt(d === null || d === void 0 ? void 0 : d.post_id));
8704              }).flat();
8705              return res;
8706            }).flat() : _toConsumableArray(this.section);
8707            var newItems = Array.from(new Set(items));
8708            return newItems;
8709          },
8710          showItems: function showItems() {
8711            return this.sortItems.slice(0, this.page * this.per_page);
8712          },
8713          showMore: function showMore() {
8714            var _this$characters6;
8715            var items = ((_this$characters6 = this.characters) === null || _this$characters6 === void 0 ? void 0 : _this$characters6.length) > 0 ? this.sortItems : this.section;
8716            return judgeShowMore(items, this.page, this.per_page);
8717          }
8718        },
8719        template: "\n        <section class=\"p-digitalSection\">\n          <div class=\"p-digitalSection__inner\">\n            <div class=\"p-digitalSection__content\">\n              <div class=\"p-digitalSection__head\">\n                    <h2 class=\"c-textRoundLine\" :id='anchor?.[index]?.slug'><span class=\"c-line\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1200\" height=\"64\" viewBox=\"0 0 1200 64\">\n<path id=\"\u30D1\u30B9_29550\" data-name=\"\u30D1\u30B9 29550\" d=\"M1015.158,62.89H597.7C556.975,26.951,493.079,1,414.852,1c-79.9,0-150.143,24.65-190.5,61.89h-409.2\" transform=\"translate(185.842)\" fill=\"none\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" stroke-width=\"2\" stroke-dasharray=\"0 5\"/>\n</svg>\n</span><span>{{anchor?.[index]?.name}}</span></h2>\n              </div>\n              <div class=\"p-digitalSection__body\">\n                <div class=\"c-block-more\" v-if='showItems?.length > 0'>\n                  <ul class=\"c-list-digital-web\">\n                    <li class=\"c-list-digital-web__item\" v-for=\"item in showItems\" :key='\"detail-\" + item.ID' :id='\"detail-\" + item.ID'>\n                    <a :href=\"item?.permalink?.url\" :target=\"item?.permalink?.target === '_blank' ? '_blank' : false\" @click='updateChildParam(\"detail-\" + item?.ID)'>\n                      <div class=\"c-img\"><img :src=\"item?.thumbnail?.url || ''\" alt=\"\" loading=\"lazy\" width=\"340\" height=\"191\">\n                      </div>\n                      <div class=\"c-title\">\n                        <div class=\"c-link-text\">{{item?.title?.rendered}}
8719\n                        <span class=\"c-icon -icon-blank\" v-if=\"item?.permalink?.target === '_blank'\">\n                        <svg>\n                        <use xlink:href=\"#icon-blank\"></use>\n                        </svg></span>\n                      </div>\n                      </a></li>\n                    </ul>\n                  <div class=\"c-link-icon -hover -l c-btn-more\" @click=\"clickMore()\" v-if='showMore'>\n                    <a href=\"javascript:void(0);\"><span class=\"c-icon -icon-more\"><svg>\n                    <use xlink:href=\"#icon-more\"></use></svg>\n</span><span class=\"c-link-icon-label\">\u3082\u3063\u3068\u898B\u308B</span></a></div>\n                  <div class=\"c-link-icon -hover -gray -to-top\"><a href=\"?id=digital-search\"><span class=\"c-icon -icon-top\"><svg>\n                  <use xlink:href=\"#icon-top\"></use>\n</svg>\n</span><span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n                </div>\n\n                    <div class=\"c-block-more-empty\" v-else>\n                      <div class=\"c-block-more-empty__inner\">\n                        <p class=\"c-block-more-empty__text\">\u691C\u7D22\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F</p>\n                        <div class=\"c-block-more-empty__img\">\n                          <svg class=\"icon-news-empty\">\n                            <use class=\"deco-outline-pale\" xlink:href=\"#deco-outline-pale\"></use>\n                            <use class=\"deco-outline\" xlink:href=\"#deco-outline\"></use>\n                          </svg>\n                        </div>\n                      </div>\n                      <div class=\"c-link-icon -hover -gray -to-top\">\n                        <a href=\"id=js-header\"><span class=\"c-icon -icon-top\">\n                        <svg>\n                          <use xlink:href=\"#icon-top\"></use>\n                        </svg>\n</span><span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n                  </div>\n              </div>\n            </div>\n          </div>\n        </section>\n      "
8720      };
8721      var digitalDownload = {
8722        props: ['section', 'anchor', 'index', 'pages', 'type', 'characters'],
8723        data: function data() {
8724          return {
8725            per_page: 8
8726          };
8727        },
8728        mounted: function mounted() {
8729          // console.log(this.items);
8730        },
8731        methods: {
8732          clickMore: function clickMore() {
8733            var _this98 = this;
8734            var pages = this.pages.map(function (d, i) {
8735              if (i === Number(_this98.index)) {
8736                return d + 1;
8737              } else {
8738                return d;
8739              }
8740            });
8741            this.$emit('parent-method', {
8742              pages: pages
8743            });
8744          },
8745          updateChildParam: function updateChildParam(props) {
8746            this.$emit('parent-method', {
8747              detail: props
8748            });
8749          }
8750        },
8751        computed: {
8752          page: function page() {
8753            var _this$pages4;
8754            return (_this$pages4 = this.pages) === null || _this$pages4 === void 0 ? void 0 : _this$pages4[this.index];
8755          },
8756          sortItems: function sortItems() {
8757            var _this$characters7,
8758              _this99 = this;
8759            var items = ((_this$characters7 = this.characters) === null || _this$characters7 === void 0 ? void 0 : _this$characters7.length) > 0 ? this.characters.map(function (d, i) {
8760              var res = _toConsumableArray(_this99.section).filter(function (f) {
8761                var charIds = f === null || f === void 0 ? void 0 : f.chara_post_id;
8762                return charIds.includes(parseInt(d === null || d === void 0 ? void 0 : d.post_id));
8763              }).flat();
8764              return res;
8765            }).flat() : _toConsumableArray(this.section);
8766            var newItems = Array.from(new Set(items));
8767            return newItems;
8768          },
8769          showItems: function showItems() {
8770            return this.sortItems.slice(0, this.page * this.per_page);
8771          },
8772          showMore: function showMore() {
8773            var _this$characters8;
8774            var items = ((_this$characters8 = this.characters) === null || _this$characters8 === void 0 ? void 0 : _this$characters8.length) > 0 ? this.sortItems : this.section;
8775            return judgeShowMore(items, this.page, this.per_page);
8776          }
8777        },
8778        template: "\n        <section class=\"p-digitalSection\">\n          <div class=\"p-digitalSection__inner\">\n            <div class=\"p-digitalSection__content\">\n              <div class=\"p-digitalSection__head\">\n                    <h2 class=\"c-textRoundLine\" :id='anchor?.[index]?.slug'><span class=\"c-line\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1200\" height=\"64\" viewBox=\"0 0 1200 64\">\n<path id=\"\u30D1\u30B9_29550\" data-name=\"\u30D1\u30B9 29550\" d=\"M1015.158,62.89H597.7C556.975,26.951,493.079,1,414.852,1c-79.9,0-150.143,24.65-190.5,61.89h-409.2\" transform=\"translate(185.842)\" fill=\"none\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" stroke-width=\"2\" stroke-dasharray=\"0 5\"/>\n</svg>\n</span><span>{{anchor?.[index]?.name}}</span></h2>\n              </div>\n              <div class=\"p-digitalSection__body\">\n                <div class=\"c-block-more\" v-if='showItems?.length > 0'>\n                  <ul class=\"c-list-digital-download\">\n                    <li class=\"c-list-digital-download__item\" v-for=\"item in showItems\" :key='\"detail-\" + item.ID' :id='\"detail-\" + item.ID'>\n                    <a :href=\"item?.permalink.url\" :target=\"item?.permalink?.target === '_blank' ? '_blank' : false\" @click='updateChildParam(\"detail-\" + item?.ID)'>\n                      <div class=\"c-img\"><img :src=\"item?.thumbnail?.url || ''\" alt=\"\" loading=\"lazy\" width=\"240\" height=\"240\">\n                      </div>\n                      <div class=\"c-title\">\n                        <div class=\"c-link-text\">{{item?.title?.rendered}}
8778\n                        <span class=\"c-icon -icon-blank\" v-if=\"item?.permalink?.target === '_blank'\">\n                        <svg>\n                        <use xlink:href=\"#icon-blank\"></use>\n                        </svg></span>\n                      </div>\n                      </a></li>\n                    </ul>\n                  <div class=\"c-link-icon -hover -l c-btn-more\" @click=\"clickMore()\" v-if='showMore'>\n                    <a href=\"javascript:void(0);\"><span class=\"c-icon -icon-more\"><svg>\n                    <use xlink:href=\"#icon-more\"></use></svg>\n</span><span class=\"c-link-icon-label\">\u3082\u3063\u3068\u898B\u308B</span></a></div>\n                  <div class=\"c-link-icon -hover -gray -to-top\"><a href=\"?id=digital-search\"><span class=\"c-icon -icon-top\"><svg>\n                  <use xlink:href=\"#icon-top\"></use>\n</svg>\n</span><span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n                </div>\n\n                    <div class=\"c-block-more-empty\" v-else>\n                      <div class=\"c-block-more-empty__inner\">\n                        <p class=\"c-block-more-empty__text\">\u691C\u7D22\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F</p>\n                        <div class=\"c-block-more-empty__img\">\n                          <svg class=\"icon-news-empty\">\n                            <use class=\"deco-outline-pale\" xlink:href=\"#deco-outline-pale\"></use>\n                            <use class=\"deco-outline\" xlink:href=\"#deco-outline\"></use>\n                          </svg>\n                        </div>\n                      </div>\n                      <div class=\"c-link-icon -hover -gray -to-top\">\n                        <a href=\"id=js-header\"><span class=\"c-icon -icon-top\">\n                        <svg>\n                          <use xlink:href=\"#icon-top\"></use>\n                        </svg>\n</span><span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n                    </div>\n                </div>\n              </div>\n            </div>\n          </div>\n        </section>\n      "
8779      };
8780      var params = new URLSearchParams(location.search);
8781      this.application = new Vue({
8782        el: this.el,
8783        data: function data() {
8784          var _data$initialData, _data$initialData$;
8785          return {
8786            categories: _data === null || _data === void 0 ? void 0 : _data.categories,
8787            characters: (_data === null || _data === void 0 ? void 0 : _data.characters) && shuffleCharacters(_data === null || _data === void 0 ? void 0 : _data.characters),
8788            initialData: _data === null || _data === void 0 ? void 0 : _data.initialData,
8789            currentTab: {},
8790            currentCharacters: [],
8791            pages: _data === null || _data === void 0 ? void 0 : (_data$initialData = _data.initialData) === null || _data$initialData === void 0 ? void 0 : (_data$initialData$ = _data$initialData[0]) === null || _data$initialData$ === void 0 ? void 0 : _data$initialData$.content.map(function (i) {
8792              return 1;
8793            }),
8794            section_id: null
8795          };
8796        },
8797        components: {
8798          'digital-communication': digitalCommunication,
8799          'digital-app': digitalApp,
8800          'digital-browser': digitalBrowser,
8801          'digital-download': digitalDownload
8802        },
8803        watch: {},
8804        mounted: function mounted() {
8805          var _this$categories, _this$initialData, _this$initialData$thi;
8806          this.currentTab = initialParams({
8807            params: params,
8808            key: 'category',
8809            value: (_this$categories = this.categories) === null || _this$categories === void 0 ? void 0 : _this$categories[0],
8810            filterData: this.categories
8811          });
8812          this.currentCharacters = initialParams({
8813            params: params,
8814            key: 'chara',
8815            value: [],
8816            filterData: this.characters
8817          });
8818          this.pages = initialParams({
8819            params: params,
8820            key: 'pages',
8821            value: this === null || this === void 0 ? void 0 : (_this$initialData = this.initialData) === null || _this$initialData === void 0 ? void 0 : (_this$initialData$thi = _this$initialData[this.currentId]) === null || _this$initialData$thi === void 0 ? void 0 : _this$initialData$thi.content.map(function (i) {
8822              return 1;
8823            })
8824          });
8825          this.section_id = initialParams({
8826            params: params,
8827            key: 'id',
8828            value: ''
8829          });
8830          this.characters = orderCharacters(this.currentCharacters, this.characters);
8831          this.init();
8832          this.pageSet();
8833        },
8834        updated: function updated() {
8835          // タブ用
8836          new AnchorLink();
8837          this.$nextTick(function () {
8838            $(window).trigger('onVueContentUpdate');
8839          });
8840        },
8841        methods: {
8842          init: function init() {
8843            var _document$getElements, _this$currentTab, _document$getElements2;
8844            var slideTab = (_document$getElements = document.getElementsByClassName('c-slide-tab-slider')) === null || _document$getElements === void 0 ? void 0 : _document$getElements[0];
8845            // console.log(this.currentTab,'ddd');
8846            new Slider({
8847              el: slideTab.id,
8848              type: 'tab',
8849              index: (_this$currentTab = this.currentTab) === null || _this$currentTab === void 0 ? void 0 : _this$currentTab.index
8850            });
8851            var slideSearch = (_document$getElements2 = document.getElementsByClassName('c-slide-search-slider')) === null || _document$getElements2 === void 0 ? void 0 : _document$getElements2[0];
8852            new Slider({
8853              el: slideSearch.id,
8854              type: 'search'
8855            });
8856            new InitHandler();
8857          },
8858          pageSet: function pageSet() {
8859            var _this$currentTab2;
8860            var params = {
8861              category: (_this$currentTab2 = this.currentTab) === null || _this$currentTab2 === void 0 ? void 0 : _this$currentTab2.slug,
8862              characters: this.currentCharacters,
8863              id: this.section_id,
8864              pages: this.pages
8865            };
8866            var convertParams = convertStateParams(params);
8867            history.replaceState(null, null, convertParams);
8868          },
8869          changeCategory: function changeCategory(props) {
8870            var _this$initialData2, _this$initialData2$pr, _this$initialData2$pr2;
8871            // console.log(props);
8872            this.currentTab = props;
8873            this.pages = (_this$initialData2 = this.initialData) === null || _this$initialData2 === void 0 ? void 0 : (_this$initialData2$pr = _this$initialData2[props.index]) === null || _this$initialData2$pr === void 0 ? void 0 : (_this$initialData2$pr2 = _this$initialData2$pr.content) === null || _this$initialData2$pr2 === void 0 ? void 0 : _this$initialData2$pr2.map(function (i) {
8874              return 1;
8875            });
8876            this.section_id = null;
8877            this.pageSet();
8878          },
8879          changeChar: function changeChar(props) {
8880            var _this$initialData3, _this$initialData3$th, _this$initialData3$th2;
8881            if (props === -1) {
8882              this.currentCharacters = [];
8883            } else {
8884              if (this.currentCharacters.includes(props)) {
8885                this.currentCharacters = this.currentCharacters.filter(function (d) {
8886                  return d !== props;
8887                });
8888              } else {
8889                this.currentCharacters = [].concat(_toConsumableArray(this.currentCharacters), [props]);
8890              }
8891            }
8892            this.pages = (_this$initialData3 = this.initialData) === null || _this$initialData3 === void 0 ? void 0 : (_this$initialData3$th = _this$initialData3[this.currentId]) === null || _this$initialData3$th === void 0 ? void 0 : (_this$initialData3$th2 = _this$initialData3$th.content) === null || _this$initialData3$th2 === void 0 ? void 0 : _this$initialData3$th2.map(function (i) {
8893              return 1;
8894            });
8895            this.pageSet();
8896          },
8897          updateChildParam: function updateChildParam(props) {
8898            for (var _i8 = 0, _Object$entries3 = Object.entries(props); _i8 < _Object$entries3.length; _i8++) {
8899              var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i8], 2),
8900                key = _Object$entries3$_i[0],
8901                value = _Object$entries3$_i[1];
8902              if (key === 'detail') {
8903                var _this$currentCharacte, _this$currentCharacte2;
8904                this.id = value;
8905                var url = new URL(location);
8906                url.searchParams.set('id', value);
8907                url.searchParams.set('pages', encodeURIComponent(this.pages));
8908                ((_this$currentCharacte = this.currentCharacters) === null || _this$currentCharacte === void 0 ? void 0 : _this$currentCharacte.length) > 0 && url.searchParams.set('chara', encodeURIComponent((_this$currentCharacte2 = this.currentCharacters) === null || _this$currentCharacte2 === void 0 ? void 0 : _this$currentCharacte2.map(function (d) {
8909                  return d === null || d === void 0 ? void 0 : d.post_id;
8910                })));
8911                history.pushState(null, null, url);
8912              } else if (key === 'pages') {
8913                this.pages = value;
8914                this.pageSet();
8915              }
8916            }
8917          }
8918        },
8919        computed: {
8920          currentId: function currentId() {
8921            var _this$currentTab3;
8922            return (_this$currentTab3 = this.currentTab) === null || _this$currentTab3 === void 0 ? void 0 : _this$currentTab3.index;
8923          },
8924          anchor: function anchor() {
8925            var _this$initialData4, _this$initialData4$th;
8926            return (_this$initialData4 = this.initialData) === null || _this$initialData4 === void 0 ? void 0 : (_this$initialData4$th = _this$initialData4[this.currentId]) === null || _this$initialData4$th === void 0 ? void 0 : _this$initialData4$th.child_category;
8927          },
8928          items: function items() {
8929            var _this$initialData5, _this$initialData5$th;
8930            return _toConsumableArray((_this$initialData5 = this.initialData) === null || _this$initialData5 === void 0 ? void 0 : (_this$initialData5$th = _this$initialData5[this.currentId]) === null || _this$initialData5$th === void 0 ? void 0 : _this$initialData5$th.content);
8931          }
8932        }
8933      });
8934    }
8935  }]);
8936  return AppSearchDigital;
8937}();
8938var AppSearchSpot = /*#__PURE__*/function () {
8939  function AppSearchSpot() {
8940    _classCallCheck(this, AppSearchSpot);
8941    this.target = 'app-searchSpot';
8942    this.el = document.getElementById(this.target);
8943    this.application = null;
8944    this.parentCategoryId = 3;
8945    if (this.el) this.init();
8946  }
8947  _createClass(AppSearchSpot, [{
8948    key: "init",
8949    value: function () {
8950      var _init2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() {
8951        var data, categories, tags;
8952        return _regeneratorRuntime().wrap(function _callee34$(_context34) {
8953          while (1) switch (_context34.prev = _context34.next) {
8954            case 0:
8955              _context34.next = 2;
8956              return getFilterSpot();
8957            case 2:
8958              _context34.t0 = _context34.sent;
8959              if (_context34.t0) {
8960                _context34.next = 5;
8961                break;
8962              }
8963              _context34.t0 = [];
8964            case 5:
8965              data = _context34.t0;
8966              _context34.next = 8;
8967              return getWPNewsCategories({
8968                parent: this.parentCategoryId,
8969                page: 1,
8970                per_page: 20
8971              });
8972            case 8:
8973              _context34.t1 = _context34.sent;
8974              if (_context34.t1) {
8975                _context34.next = 11;
8976                break;
8977              }
8978              _context34.t1 = [];
8979            case 11:
8980              categories = _context34.t1;
8981              _context34.next = 14;
8982              return getWPNewsTags({
8983                per_page: 100
8984              });
8985            case 14:
8986              _context34.t2 = _context34.sent;
8987              if (_context34.t2) {
8988                _context34.next = 17;
8989                break;
8990              }
8991              _context34.t2 = [];
8992            case 17:
8993              tags = _context34.t2;
8994              this.app(_objectSpread(_objectSpread({}, data), {}, {
8995                categories: [{
8996                  id: this.parentCategoryId,
8997                  name: 'すべて'
8998                }].concat(_toConsumableArray(categories)).map(function (item, index) {
8999                  item['isShow'] = false;
9000                  item.index = index;
9001                  return item;
9002                }),
9003                parentCategoryId: this.parentCategoryId,
9004                tags: tags
9005              }));
9006            case 19:
9007            case "end":
9008              return _context34.stop();
9009          }
9010        }, _callee34, this);
9011      }));
9012      function init() {
9013        return _init2.apply(this, arguments);
9014      }
9015      return init;
9016    }()
9017  }, {
9018    key: "app",
9019    value: function app(_data2) {
9020      var params = new URLSearchParams(location.search);
9021
9022      // get  previd from url
9023      var previd = params.get('previd');
9024
9025      // params
9026      this.application = new Vue({
9027        el: this.el,
9028        data: function data() {
9029          return {
9030            parentCategoryId: _data2 === null || _data2 === void 0 ? void 0 : _data2.parentCategoryId,
9031            currentCategory: _data2 === null || _data2 === void 0 ? void 0 : _data2.parentCategoryId,
9032            modalCurrentCategory: _data2 === null || _data2 === void 0 ? void 0 : _data2.parentCategoryId,
9033            categories: _data2 === null || _data2 === void 0 ? void 0 : _data2.categories,
9034            currentRegion: null,
9035            // region_id
9036            modalCurrentRegion: null,
9037            // region_id
9038            currentRegionName: '都道府県を選択',
9039            // region_name
9040            region: _data2 === null || _data2 === void 0 ? void 0 : _data2.regi
9040on,
9041            currentCharacters: [],
9042            modalCurrentCharacters: [],
9043            characters: (_data2 === null || _data2 === void 0 ? void 0 : _data2.character) && shuffleCharacters(_data2 === null || _data2 === void 0 ? void 0 : _data2.character),
9044            searchCategory: '',
9045            section_id: null,
9046            items: [],
9047            page: 1,
9048            per_page: 12,
9049            totalPages: 1,
9050            total: null,
9051            tags: (_data2 === null || _data2 === void 0 ? void 0 : _data2.tags) || [],
9052            currentTags: [],
9053            currentTab: {},
9054            modalCurrentTags: [],
9055            selectOpen: false,
9056            isInitLoad: false
9057          };
9058        },
9059        mounted: function mounted() {
9060          var _this100 = this;
9061          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() {
9062            var _this100$categories;
9063            var page, i;
9064            return _regeneratorRuntime().wrap(function _callee35$(_context35) {
9065              while (1) switch (_context35.prev = _context35.next) {
9066                case 0:
9067                  _this100.currentTab = initialParams({
9068                    params: params,
9069                    key: 'tab',
9070                    value: _this100 === null || _this100 === void 0 ? void 0 : (_this100$categories = _this100.categories) === null || _this100$categories === void 0 ? void 0 : _this100$categories[0],
9071                    filterData: _this100.categories
9072                  });
9073                  _this100.currentCategory = initialParams({
9074                    params: params,
9075                    key: 'categories',
9076                    value: _this100.parentCategoryId
9077                  });
9078                  _this100.currentCharacters = initialParams({
9079                    params: params,
9080                    key: 'chara',
9081                    value: [],
9082                    filterData: _this100.characters
9083                  });
9084                  _this100.currentRegion = initialParams({
9085                    params: params,
9086                    key: 'pref'
9087                  });
9088                  page = initialParams({
9089                    params: params,
9090                    key: 'pg'
9091                  });
9092                  _this100.section_id = initialParams({
9093                    params: params,
9094                    key: 'id',
9095                    value: ''
9096                  });
9097                  _this100.currentTags = initialParams({
9098                    params: params,
9099                    key: 'tags',
9100                    value: [],
9101                    filterData: _this100.tags
9102                  });
9103                  _this100.modalCurrentTags = _this100.currentTags;
9104                  _this100.characters = orderCharacters(_this100.currentCharacters, _this100.characters);
9105                  _this100.modalCurrentCategory = _this100.currentCategory;
9106                  _this100.modalCurrentCharacters = _this100.currentCharacters;
9107                  _this100.modalCurrentRegion = _this100.currentRegion;
9108                  i = 0;
9109                case 13:
9110                  if (!(i < page)) {
9111                    _context35.next = 20;
9112                    break;
9113                  }
9114                  _this100.page = i + 1;
9115                  _context35.next = 17;
9116                  return _this100.pageSet();
9117                case 17:
9118                  i++;
9119                  _context35.next = 13;
9120                  break;
9121                case 20:
9122                  _this100.init();
9123                  if (previd) {
9124                    gsap.to(window, {
9125                      duration: 0,
9126                      scrollTo: {
9127                        y: "#".concat(previd),
9128                        offsetY: 100
9129                      }
9130                    });
9131                  }
9132                case 22:
9133                case "end":
9134                  return _context35.stop();
9135              }
9136            }, _callee35);
9137          }))();
9138        },
9139        updated: function updated() {
9140          this.$nextTick(function () {
9141            $(window).trigger('onVueContentUpdate');
9142          });
9143          // new AnchorLink();
9144        },
9145
9146        methods: {
9147          init: function init() {
9148            var _document$getElements3, _this$currentTab4, _document$getElements4;
9149            var slideTab = (_document$getElements3 = document.getElementsByClassName('c-slide-tab-slider')) === null || _document$getElements3 === void 0 ? void 0 : _document$getElements3[0];
9150            new Slider({
9151              el: slideTab.id,
9152              type: 'tab',
9153              index: (_this$currentTab4 = this.currentTab) === null || _this$currentTab4 === void 0 ? void 0 : _this$currentTab4.index
9154            });
9155            var slideSearch = (_document$getElements4 = document.getElementsByClassName('c-slide-search-slider')) === null || _document$getElements4 === void 0 ? void 0 : _document$getElements4[0];
9156            new Slider({
9157              el: slideSearch.id,
9158              type: 'search'
9159            });
9160            new InitHandler();
9161          },
9162          pageSet: function pageSet() {
9163            var _this101 = this;
9164            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36() {
9165              var params, postParams, res, convertParamsArg, convertParams;
9166              return _regeneratorRuntime().wrap(function _callee36$(_context36) {
9167                while (1) switch (_context36.prev = _context36.next) {
9168                  case 0:
9169                    params = {
9170                      categories: _this101.currentCategory,
9171                      characters: _this101.currentCharacters,
9172                      tags: _this101.currentTags,
9173                      pref: _this101.currentRegion,
9174                      id: _this101.section_id,
9175                      page: _this101.page
9176                    };
9177                    postParams = convertPostParams(params);
9178                    _context36.next = 4;
9179                    return getWPNews(_objectSpread(_objectSpread({}, postParams), {}, {
9180                      per_page: _this101.per_page,
9181                      boss_category: 'spots'
9182                    }));
9183                  case 4:
9184                    res = _context36.sent;
9185                    if (!_this101.isInitLoad) _this101.isInitLoad = true;
9186                    convertParamsArg = _objectSpread({}, params); // pageがWPでリダイレクトしてしまうので、pageをpgに変換する処理
9187                    if (convertParamsArg !== null && convertParamsArg !== void 0 && convertParamsArg.page) {
9188                      convertParamsArg.pg = convertParamsArg.page;
9189                      delete convertParamsArg.page;
9190                    }
9191                    //
9192
9193                    _this101.currentRegionName = _this101.regionText().length !== 0 ? "".concat(_this101.regionText().join('')) : '都道府県を選択';
9194                    _this101.selectShow();
9195                    convertParams = convertStateParams(convertParamsArg);
9196                    history.replaceState(null, null, convertParams);
9197                    if (res) {
9198                      if (_this101.page === 1) {
9199                        _this101.items = res.data;
9200                      } else {
9201                        _this101.items = [].concat(_toConsumableArray(_this101.items), _toConsumableArray(res.data));
9202                      }
9203                      _this101.totalPages = Number(res.totalPages);
9204                      _this101.total = Number(res.total);
9205                    }
9206                  case 13:
9207                  case "end":
9208                    return _context36.stop();
9209                }
9210              }, _callee36);
9211            }))();
9212          },
9213          changeCategory: function changeCategory(props) {
9214            // console.log('change')
9215            this.currentTab = props;
9216            this.section_id = null;
9217            this.page = 1;
9218            // console.log(props);
9219            this.currentCategory = props === null || props === void 0 ? void 0 : props.id;
9220            this.pageSet();
9221          },
9222          changeChar: function changeChar(props) {
9223            if (props === -1) {
9224              this.modalCurrentCharacters = [];
9225              this.currentCharacters = [];
9226            } else {
9227              if (this.modalCurrentCharacters.includes(props)) {
9228                this.modalCurrentCharacters = this.modalCurrentCharacters.filter(function (d) {
9229                  return d !== props;
9230                });
9231                this.currentCharacters = this.currentCharacters.filter(function (d) {
9232                  return d !== props;
9233                });
9234              } else {
9235                this.modalCurrentCharacters = [].concat(_toConsumableArray(this.modalCurrentCharacters), [props]);
9236                this.currentCharacters = [].concat(_toConsumableArray(this.currentCharacters), [props]);
9237              }
9238            }
9239            this.section_id = null;
9240            this.pageSet();
9241          },
9242          clickMore: function clickMore() {
9243            this.page++;
9244            this.pageSet();
9245          },
9246          clickDetail: function clickDetail(props, event) {
9247            var _this$currentCharacte3, _this$currentCharacte4;
9248            // 一度遷移を止める
9249            event.preventDefault();
9250            var url = new URL(location);
9251            // url.searchParams.set('id', props);
9252            ((_this$currentCharacte3 = this.currentCharacters) === null || _this$currentCharacte3 === void 0 ? void 0 : _this$currentCharacte3.length) > 0 && url.searchParams.set('chara', encodeURIComponent((_this$currentCharacte4 = this.currentCharacters) === null || _this$currentCharacte4 === void 0 ? void 0 : _this$currentCharacte4.map(function (d) {
9253              return d === null || d === void 0 ? void 0 : d.post_id;
9254            })));
9255            url.searchParams.set('previd', props);
9256            history.pushState(null, null, url);
9257
9258            // 遷移を再開
9259            var nexturl = event.currentTarget.href;
9260            var isExternal = event.currentTarget.target === '_blank';
9261            if (isExternal) {
9262              window.open(nexturl, '_blank');
9263            } else {
9264              window.location.href = nexturl;
9265            }
9266          },
9267          searchInit: function searchInit() {
9268            //使わない?
9269            this.currentCategory = this.modalCurrentCategory;
9270            this.currentRegion = this.modalCurrentRegion;
9271            this.currentCharacters = this.modalCurrentCharacters;
9272            this.page = 1;
9273            this.section_id = null;
9274            this.pageSet();
9275          },
9276          searchClear: function searchClear() {
9277            //使わない?
9278            this.modalCurrentCategory = this.parentCategoryId;
9279            this.modalCurrentRegion = '';
9280            this.modalCurrentCharacters = [];
9281            this.currentCategory = this.parentCategoryId;
9282            this.currentCharacters = [];
9283            this.currentTags = [];
9284            this.currentText = '';
9285          },
9286          searchJudgement: function searchJudgement() {
9287            //使わない?
9288            this.modalCurrentCategory = this.currentCategory;
9289            this.modalCurrentCharacters = this.currentCharacters;
9290            this.modalCurrentRegion = this.currentRegion;
9291          },
9292          openModal: function openModal(e) {
9293            // new Modal().modalToggle(e);
9294          },
9295          openAcc: function openAcc() {
9296            var el = this.$refs.acc;
9297            $('#js-search-acc').slideDown();
9298          },
9299          closeAcc: function closeAcc() {
9300            var el = this.$refs.acc;
9301            $('#js-search-acc').slideUp();
9302          },
9303          toggleSelect: function toggleSelect() {
9304            if (this.selectOpen) {
9305              this.closeSelect();
9306            } else {
9307              this.openSelect();
9308            }
9309          },
9310          openSelect: function openSelect(e) {
9311            var _this102 = this;
9312            var el = this.$refs.selectList;
9313            var trigger = this.$refs.selectTrigger;
9314            this.selectOpen = true;
9315            $(el).slideDown();
9316            var clickHandler = function clickHandler(event) {
9317              if (!el.contains(event.target) && !trigger.contains(event.target)) {
9318                _this102.closeSelect();
9319                document.removeEventListener('click', clickHandler);
9320              }
9321            };
9322            document.addEventListener('click', clickHandler);
9323          },
9324          closeSelect: function closeSelect() {
9325            var el = this.$refs.selectList;
9326            var trigger = this.$refs.selectTrigger;
9327            this.selectOpen = false;
9328            $(el).slideUp();
9329          },
9330          changeCurrentRegion: function changeCurrentRegion(current) {
9331            if (!current) {
9332              this.currentRegion = '';
9333              this.currentRegionName = '都道府県を選択';
9334            } else {
9335              this.currentRegion = current.region_id;
9336              this.currentRegionName = current.region_name;
9337            }
9338            this.pageSet();
9339            this.toggleSelect();
9340          },
9341          selectShow: function selectShow() {
9342            var _this$categories$filt,
9343              _this$categories$filt2,
9344              _this103 = this;
9345            //選択したカテゴリーとキャラとタグをサイトタイトルに表示
9346            this.currentCategoryName = (_this$categories$filt = this.categories.filter(function (d) {
9347              return d.id === _this103.currentCategory;
9348            })) === null || _this$categories$filt === void 0 ? void 0 : (_this$categories$filt2 = _this$categories$filt[0]) === null || _this$categories$filt2 === void 0 ? void 0 : _this$categories$filt2.name;
9349            var charaText = this.charaText().length !== 0 ? "(".concat(this.charaText().join('、'), ")") : '';
9350            var regionText = this.regionText().length !== 0 ? "[".concat(this.regionText().join(''), "]") : '';
9351            var siteName = 'スポット | サンリオ';
9352            document.title = "".concat(this.currentCategoryName, " ").concat(charaText, " ").concat(regionText, " | ").concat(siteName);
9353
9354            //選択したカテゴリーとキャラをパンくずに表示
9355            var categoryURL = "?categories=".concat(this.currentCategory);
9356            var categoryLink = $('.c-bread__item.categoryName a');
9357            if (categoryLink.length === 0) {
9358              $('.c-bread__item.categoryName').append($('<a>').attr('href', categoryURL).addClass('-text-gray'));
9359            }
9360            $('.c-bread__item.categoryName a').attr('href', categoryURL);
9361            $('.c-bread__item.categoryName a').text(this.currentCategoryName);
9362            var charaItem = $('.c-bread__item.charaName');
9363            if (charaText.length !== 0) {
9364              if (charaItem.length === 0) {
9365                $('.c-bread-list').append($('<li>').addClass('c-bread__item charaName'));
9366              }
9367              $('.c-bread__item.charaName a').remove();
9368              this.currentCharacters.map(function (item, index) {
9369                var charaName = item.chara_name;
9370                var charaId = "&chara=".concat(item.post_id);
9371                $('.c-bread__item.charaName').append($('<a>').attr('href', categoryURL + charaId).addClass('-text-gray').text(charaName));
9372              });
9373            } else {
9374              $('.c-bread__item.charaName').remove();
9375            }
9376          },
9377          charaText: function charaText() {
9378            var _this$currentCharacte5;
9379            var charaText = ((_this$currentCharacte5 = this.currentCharacters) === null || _this$currentCharacte5 === void 0 ? void 0 : _this$currentCharacte5.length) > 0 ? this.currentCharacters.map(function (d) {
9380              return d.chara_name;
9381            }) : [];
9382            return charaText;
9383          },
9384          regionText: function regionText() {
9385            var _this$region,
9386              _this$region$filter,
9387              _this$region$filter$,
9388              _this104 = this;
9389            var regionText = this.currentRegion ? [(_this$region = this.region) === null || _this$region === void 0 ? void 0 : (_this$region$filter = _this$region.filter(function (d) {
9390              return Number(d.region_id) === Number(_this104.currentRegion);
9391            })) === null || _this$region$filter === void 0 ? void 0 : (_this$region$filter$ = _this$region$filter[0]) === null || _this$region$filter$ === void 0 ? void 0 : _this$region$filter$.region_name] : '';
9392            return regionText;
9393          },
9394          tagsText: function tagsText() {
9395            var _this105 = this;
9396            var tagsText = Array.isArray(this.currentTags) && this.currentTags.length > 0 ? this.currentTags.map(function (tag) {
9397              var _this105$tags, _this105$tags$find;
9398              return (_this105$tags = _this105.tags) === null || _this105$tags === void 0 ? void 0 : (_this105$tags$find = _this105$tags.find(function (d) {
9399                return Number(d.id) === Number(tag.id);
9400              })) === null || _this105$tags$find === void 0 ? void 0 : _this105$tags$find.name;
9401            }
9401).filter(Boolean) : [];
9402            return tagsText;
9403          }
9404        },
9405        computed: {
9406          modalSearchCharStyles: function modalSearchCharStyles() {
9407            if (isMobile()) {
9408              var _this$characters9;
9409              var COLUMN_MAX = 6;
9410              if (((_this$characters9 = this.characters) === null || _this$characters9 === void 0 ? void 0 : _this$characters9.length) > COLUMN_MAX) {
9411                var _this$characters10;
9412                return "grid-template: auto / repeat(".concat(Math.ceil((((_this$characters10 = this.characters) === null || _this$characters10 === void 0 ? void 0 : _this$characters10.length) + 1) / 2), ", 1fr)");
9413              } else {
9414                return "grid-template: auto / repeat(".concat(COLUMN_MAX + 1, ", 1fr)");
9415              }
9416            } else {
9417              var _this$characters11;
9418              var _COLUMN_MAX = 14;
9419              if (((_this$characters11 = this.characters) === null || _this$characters11 === void 0 ? void 0 : _this$characters11.length) > _COLUMN_MAX * 2 - 1) {
9420                var _this$characters12;
9421                return "grid-template: auto / repeat(".concat(Math.ceil((((_this$characters12 = this.characters) === null || _this$characters12 === void 0 ? void 0 : _this$characters12.length) + 1) / 2), ", 1fr)");
9422              } else {
9423                return "grid-template: auto / repeat(".concat(_COLUMN_MAX, ", 1fr)");
9424              }
9425            }
9426          },
9427          showMore: function showMore() {
9428            var _this$items;
9429            return ((_this$items = this.items) === null || _this$items === void 0 ? void 0 : _this$items.length) > 0 && this.totalPages > this.page;
9430          }
9431        }
9432      });
9433    }
9434  }]);
9435  return AppSearchSpot;
9436}();
9437var AppSearchNews = /*#__PURE__*/function () {
9438  function AppSearchNews() {
9439    _classCallCheck(this, AppSearchNews);
9440    this.target = 'app-searchNews';
9441    this.el = document.getElementById(this.target);
9442    this.application = null;
9443    this.parentCategoryId = 0;
9444    if (this.el) this.init();
9445  }
9446  _createClass(AppSearchNews, [{
9447    key: "init",
9448    value: function () {
9449      var _init3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37() {
9450        var characters, categories, newsCategories, tags;
9451        return _regeneratorRuntime().wrap(function _callee37$(_context37) {
9452          while (1) switch (_context37.prev = _context37.next) {
9453            case 0:
9454              _context37.next = 2;
9455              return getFilterNews();
9456            case 2:
9457              _context37.t0 = _context37.sent;
9458              if (_context37.t0) {
9459                _context37.next = 5;
9460                break;
9461              }
9462              _context37.t0 = [];
9463            case 5:
9464              characters = _context37.t0;
9465              _context37.next = 8;
9466              return getWPNewsCategories({
9467                parent: this.parentCategoryId,
9468                page: 1,
9469                per_page: 20
9470              });
9471            case 8:
9472              _context37.t1 = _context37.sent;
9473              if (_context37.t1) {
9474                _context37.next = 11;
9475                break;
9476              }
9477              _context37.t1 = [];
9478            case 11:
9479              categories = _context37.t1;
9480              newsCategories = (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? categories === null || categories === void 0 ? void 0 : categories.filter(function (d) {
9481                return parseInt(d === null || d === void 0 ? void 0 : d.id) !== 34;
9482              }).map(function (d, i) {
9483                return _objectSpread(_objectSpread({}, d), {}, {
9484                  index: i + 1
9485                });
9486              }) : [];
9487              _context37.next = 15;
9488              return getWPNewsTags({
9489                per_page: 100
9490              });
9491            case 15:
9492              _context37.t2 = _context37.sent;
9493              if (_context37.t2) {
9494                _context37.next = 18;
9495                break;
9496              }
9497              _context37.t2 = [];
9498            case 18:
9499              tags = _context37.t2;
9500              this.app({
9501                characters: characters,
9502                categories: [{
9503                  id: -1,
9504                  name: 'すべて'
9505                }].concat(_toConsumableArray(newsCategories)).map(function (item, index) {
9506                  item.index = index;
9507                  return item;
9508                }),
9509                tags: tags
9510              });
9511            case 20:
9512            case "end":
9513              return _context37.stop();
9514          }
9515        }, _callee37, this);
9516      }));
9517      function init() {
9518        return _init3.apply(this, arguments);
9519      }
9520      return init;
9521    }()
9522  }, {
9523    key: "app",
9524    value: function app(_data3) {
9525      var params = new URLSearchParams(location.search);
9526      // get  previd from url
9527      var previd = params.get('previd');
9528      this.application = new Vue({
9529        el: this.el,
9530        data: function data() {
9531          var _data3$categories, _data3$categories$;
9532          return {
9533            currentCategory: _data3 === null || _data3 === void 0 ? void 0 : (_data3$categories = _data3.categories) === null || _data3$categories === void 0 ? void 0 : (_data3$categories$ = _data3$categories[0]) === null || _data3$categories$ === void 0 ? void 0 : _data3$categories$.id,
9534            categories: _data3 === null || _data3 === void 0 ? void 0 : _data3.categories,
9535            characters: (_data3 === null || _data3 === void 0 ? void 0 : _data3.characters) && shuffleCharacters(_data3 === null || _data3 === void 0 ? void 0 : _data3.characters),
9536            currentTab: {},
9537            currentCharacters: [],
9538            tags: (_data3 === null || _data3 === void 0 ? void 0 : _data3.tags) || [],
9539            currentTags: [],
9540            items: [],
9541            per_page: 12,
9542            page: 1,
9543            section_id: null,
9544            totalPages: 1,
9545            total: null,
9546            isInitLoad: false
9547          };
9548        },
9549        mounted: function mounted() {
9550          var _this106 = this;
9551          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38() {
9552            var _this106$categories;
9553            var page, i;
9554            return _regeneratorRuntime().wrap(function _callee38$(_context38) {
9555              while (1) switch (_context38.prev = _context38.next) {
9556                case 0:
9557                  _this106.currentTab = initialParams({
9558                    params: params,
9559                    key: 'tab',
9560                    value: _this106 === null || _this106 === void 0 ? void 0 : (_this106$categories = _this106.categories) === null || _this106$categories === void 0 ? void 0 : _this106$categories[0],
9561                    filterData: _this106.categories
9562                  });
9563                  _this106.currentCategory = initialParams({
9564                    params: params,
9565                    key: 'categories',
9566                    value: _this106.parentCategoryId
9567                  });
9568                  _this106.currentTags = initialParams({
9569                    params: params,
9570                    key: 'tags',
9571                    value: [],
9572                    filterData: _this106.tags
9573                  });
9574                  if (!_this106.currentCategory) _this106.currentCategory = -1;
9575                  _this106.currentCharacters = initialParams({
9576                    params: params,
9577                    key: 'chara',
9578                    value: [],
9579                    filterData: _this106.characters
9580                  });
9581                  page = initialParams({
9582                    params: params,
9583                    key: 'pg'
9584                  });
9585                  _this106.section_id = initialParams({
9586                    params: params,
9587                    key: 'id',
9588                    value: ''
9589                  });
9590                  _this106.characters = orderCharacters(_this106.currentCharacters, _this106.characters);
9591                  i = 0;
9592                case 9:
9593                  if (!(i < page)) {
9594                    _context38.next = 16;
9595                    break;
9596                  }
9597                  _this106.page = i + 1;
9598                  _context38.next = 13;
9599                  return _this106.pageSet();
9600                case 13:
9601                  i++;
9602                  _context38.next = 9;
9603                  break;
9604                case 16:
9605                  _this106.init();
9606                  if (previd) {
9607                    gsap.to(window, {
9608                      duration: 0,
9609                      scrollTo: {
9610                        y: "#".concat(previd),
9611                        offsetY: 100
9612                      }
9613                    });
9614                  }
9615                case 18:
9616                case "end":
9617                  return _context38.stop();
9618              }
9619            }, _callee38);
9620          }))();
9621        },
9622        updated: function updated() {
9623          // タブ用
9624          new AnchorLink();
9625          this.$nextTick(function () {
9626            $(window).trigger('onVueContentUpdate');
9627          });
9628        },
9629        methods: {
9630          init: function init() {
9631            var _document$getElements5, _this$currentTab5, _document$getElements6;
9632            var slideTab = (_document$getElements5 = document.getElementsByClassName('c-slide-tab-slider')) === null || _document$getElements5 === void 0 ? void 0 : _document$getElements5[0];
9633            new Slider({
9634              el: slideTab.id,
9635              type: 'tab',
9636              index: (_this$currentTab5 = this.currentTab) === null || _this$currentTab5 === void 0 ? void 0 : _this$currentTab5.index
9637            });
9638            var slideSearch = (_document$getElements6 = document.getElementsByClassName('c-slide-search-slider')) === null || _document$getElements6 === void 0 ? void 0 : _document$getElements6[0];
9639            new Slider({
9640              el: slideSearch.id,
9641              type: 'search'
9642            });
9643            new InitHandler();
9644          },
9645          pageSet: function pageSet() {
9646            var _this107 = this;
9647            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39() {
9648              var _this107$currentTab, _this107$currentTab2;
9649              var params, postParams, res, convertParamsArg, convertParams;
9650              return _regeneratorRuntime().wrap(function _callee39$(_context39) {
9651                while (1) switch (_context39.prev = _context39.next) {
9652                  case 0:
9653                    params = {
9654                      categories: (_this107$currentTab = _this107.currentTab) === null || _this107$currentTab === void 0 ? void 0 : _this107$currentTab.id,
9655                      characters: _this107.currentCharacters,
9656                      tags: _this107.currentTags,
9657                      id: _this107.section_id,
9658                      page: _this107.page
9659                    };
9660                    if (((_this107$currentTab2 = _this107.currentTab) === null || _this107$currentTab2 === void 0 ? void 0 : _this107$currentTab2.id) === -1) {
9661                      delete params.categories;
9662                    }
9663                    postParams = convertPostParams(params);
9664                    _context39.next = 5;
9665                    return getWPNews(_objectSpread(_objectSpread({}, postParams), {}, {
9666                      per_page: _this107.per_page,
9667                      boss_category: 'news'
9668                    }));
9669                  case 5:
9670                    res = _context39.sent;
9671                    if (!_this107.isInitLoad) _this107.isInitLoad = true;
9672                    convertParamsArg = _objectSpread({}, params); // pageがWPでリダイレクトしてしまうので、pageをpgに変換する処理
9673                    if (convertParamsArg !== null && convertParamsArg !== void 0 && convertParamsArg.page) {
9674                      convertParamsArg.pg = convertParamsArg.page;
9675                      delete convertParamsArg.page;
9676                    }
9677                    //
9678                    convertParams = convertStateParams(convertParamsArg);
9679                    _this107.selectShow();
9680                    history.replaceState(null, null, convertParams);
9681                    if (res) {
9682                      if (_this107.page === 1) {
9683                        _this107.items = res.data;
9684                      } else {
9685                        _this107.items = [].concat(_toConsumableArray(_this107.items), _toConsumableArray(res.data));
9686                      }
9687                      _this107.totalPages = Number(res.totalPages);
9688                      _this107.total = Number(res.total);
9689                    }
9690                  case 13:
9691                  case "end":
9692                    return _context39.stop();
9693                }
9694              }, _callee39);
9695            }))();
9696          },
9697          changeCategory: function changeCategory(props) {
9698            this.currentTab = props;
9699            this.currentCategory = props === null || props === void 0 ? void 0 : props.id;
9700            this.section_id = null;
9701            this.page = 1;
9702            this.pageSet();
9703          },
9704          changeChar: function changeChar(props) {
9705            if (props === -1) {
9706              this.currentCharacters = [];
9707            } else {
9708              if (this.currentCharacters.includes(props)) {
9709                this.currentCharacters = this.currentCharacters.filter(function (d) {
9710                  return d !== props;
9711                });
9712              } else {
9713                this.currentCharacters = [].concat(_toConsumableArray(this.currentCharacters), [props]);
9714              }
9715            }
9716            this.section_id = null;
9717            this.page = 1;
9718            this.pageSet();
9719          },
9720          clickMore: function clickMore() {
9721            this.page++;
9722            this.pageSet();
9723          },
9724          clickDetail: function clickDetail(props, event) {
9725            var _this$currentCharacte6, _this$currentCharacte7;
9726            // 一度遷移を止める
9727            event.preventDefault();
9728            var url = new URL(location);
9729            // url.searchParams.set('id', props);
9730            ((_this$currentCharacte6 = this.currentCharacters) === null || _this$currentCharacte6 === void 0 ? void 0 : _this$currentCharacte6.length) > 0 && url.searchParams.set('chara', encodeURIComponent((_this$currentCharacte7 = this.currentCharacters) === null || _this$currentCharacte7 === void 0 ? void 0 : _this$currentCharacte7.map(function (d) {
9731              return d === null || d === void 0 ? void 0 : d.post_id;
9732            })));
9733            url.searchParams.set('previd', props);
9734            history.pushState(null, null, url);
9735
9736            // 遷移を再開
9737            var nexturl = event.currentTarget.href;
9738            var isExternal = event.currentTarget.target === '_blank';
9739            if (isExternal) {
9740              window.open(nexturl, '_blank');
9741            } else {
9742              window.location.href = nexturl;
9743            }
9744          },
9745          selectShow: function selectShow() {
9746            var _this$categories$filt3,
9747              _this$categories$filt4,
9748              _this108 = this;
9749            //選択したカテゴリーとキャラとタグをサイトタイトルに表示
9750            this.currentCategoryName = (_this$categories$filt3 = this.categories.filter(function (d) {
9751              return d.id === _this108.currentCategory;
9752            })) === null || _this$categories$filt3 === void 0 ? void 0 : (_this$categories$filt4 = _this$categories$filt3[0]) === null || _this$categories$filt4 === void 0 ? void 0 : _this$categories$filt4.name;
9753            var charaText = this.searchText().length !== 0 ? "(".concat(this.searchText().join('、'), ")") : '';
9754            var siteName = 'ニュース | サンリオ';
9755            document.title = "".concat(this.currentCategoryName, " ").concat(charaText, " | ").concat(siteName);
9756
9757            //選択したカテゴリーとキャラをパンくずに表示
9758            var categoryURL = "?categories=".concat(this.currentCategory);
9759            var categoryLink = $('.c-bread__item.categoryName a');
9760            if (categoryLink.length === 0) {
9761              $('.c-bread__item.categoryName').append($('<a>').attr('href', categoryURL).addClass('-text-gray'));
9762            }
9763            $('.c-bread__item.categoryName a').attr('href', categoryURL);
9764            $('.c-bread__item.categoryName a').text(this.currentCategoryName);
9765            var charaItem = $('.c-bread__item.charaName');
9766            if (charaText.length !== 0) {
9767              if (charaItem.length === 0) {
9768                $('.c-bread-list').append($('<li>').addClass('c-bread__item charaName'));
9769              }
9770              $('.c-bread__item.charaName a').remove();
9771              this.currentCharacters.map(function (item, index) {
9772                var charaName = item.chara_name;
9773                var charaId = "&chara=".concat(item.post_id);
9774                $('.c-bread__item.charaName').append($('<a>').attr('href', categoryURL + charaId).addClass('-text-gray').text(charaName));
9775              });
9776            } else {
9777              $('.c-bread__item.charaName').remove();
9778            }
9779          },
9780          searchText: function searchText() {
9781            var _this$currentCharacte8;
9782            var searchChar = ((_this$currentCharacte8 = this.currentCharacters) === null || _this$currentCharacte8 === void 0 ? void 0 : _this$currentCharacte8.length) > 0 ? this.currentCharacters.map(function (d) {
9783              return d === null || d === void 0 ? void 0 : d.chara_name;
9784            }) : [];
9785            return _toConsumableArray(searchChar);
9786          },
9787          tagsText: function tagsText() {
9788            var _this109 = this;
9789            var tagsText = Array.isArray(this.currentTags) && this.currentTags.length > 0 ? this.currentTags.map(function (tag) {
9790              var _this109$tags, _this109$tags$find;
9791              return (_this109$tags = _this109.tags) === null || _this109$tags === void 0 ? void 0 : (_this109$tags$find = _this109$tags.find(function (d) {
9792                return Number(d.id) === Number(tag.id);
9793              })) === null || _this109$tags$find === void 0 ? void 0 : _this109$tags$find.name;
9794            }).filter(Boolean) : [];
9795            return tagsText;
9796          }
9797        },
9798        computed: {
9799          showMore: function showMore() {
9800            var _this$items2;
9801            return ((_this$items2 = this.items) === null || _this$items2 === void 0 ? void 0 : _this$items2.length) > 0 && this.totalPages > this.page;
9802          }
9803        }
9804      });
9805    }
9806  }]);
9807  return AppSearchNews;
9808}();
9809var CharacterBg = /*#__PURE__*/function () {
9810  function CharacterBg() {
9811    _classCallCheck(this, CharacterBg);
9812    this.init();
9813  }
9814  _createClass(CharacterBg, [{
9815    key: "init",
9816    value: function init() {
9817      if (window.characterBgTimer) {
9818        clearTimeout(window.characterBgTimer);
9819        window.characterBgTimer = null;
9820      }
9821      var $el = $('#js-characterbg');
9822      if ($el.length <= 0) return;
9823      var canvasEl = document.createElement('canvas');
9824      $el.empty();
9825      $el[0].appendChild(canvasEl);
9826      var duration = 15 * 1000;
9827      var animationEnd = Date.now() + duration;
9828      var skew = 1;
9829      function randomInRange(min, max) {
9830        return Math.random() * (max - min) + min;
9831      }
9832      var myConfetti = confetti.create(canvasEl, {
9833        resize: true,
9834        useWorker: true
9835      });
9836      var isVisible = true;
9837      document.addEventListener("visibilitychange", function () {
9838        if (document.visibilityState === "visible") {
9839          isVisible = true;
9840        }
9841        if (document.visibilityState === "hidden") {
9842          isVisible = false;
9843        }
9844      });
9845      (function frame() {
9846        var timeLeft = animationEnd - Date.now();
9847        var ticks = Math.max(200, 500 * (timeLeft / duration));
9848        var colors = ['#9E8DDC', '#F7976A', '#CEC069', '#6CD5B1', '#E383A8', '#8BD0DD'];
9849        skew = Math.max(0.8, skew - 0.001);
9850        if (isVisible) {
9851          myConfetti({
9852            particleCount: 1,
9853            startVelocity: 0,
9854            ticks: ticks,
9855            origin: {
9856              x: Math.random(),
9857              y: Math.random() * skew - 0.2
9858            },
9859            colors: [colors[Math.floor(Math.random() * colors.length)]],
9860            gravity: randomInRange(0.4, 0.6),
9861            scalar: randomInRange(0.4, 1),
9862            drift: randomInRange(-0.4, 0.4)
9863          });
9864        }
9865        if (timeLeft > 0) {
9866          var delay = isMobile() ? 60 : 30;
9867          window.characterBgTimer = setTimeout(function () {
9868            frame();
9869          }, delay);
9870        } else {
9871          animationEnd = Date.now() + duration;
9872          frame();
9873        }
9874      })();
9875    }
9876  }]);
9877  return CharacterBg;
9878}();
9879var AppSearchGoods = /*#__PURE__*/function () {
9880  function AppSearchGoods() {
9881    _classCallCheck(this, AppSearchGoods);
9882    this.target = 'app-searchGoods';
9883    this.el = document.getElementById(this.target);
9884    this.application = null;
9885    this.parentCategoryId = 34;
9886    if (this.el) this.init();
9887  }
9888  _createClass(AppSearchGoods, [{
9889    key: "init",
9890    value: function () {
9891      var _init4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
9892        var characters, categories, tagsScript, tags, allTagsScript, allTags;
9893        return _regeneratorRuntime().wrap(function _callee40$(_context40) {
9894          while (1) switch (_context40.prev = _context40.next) {
9895            case 0:
9896              _context40.next = 2;
9897              return getFilterGoods();
9898            case 2:
9899              characters = _context40.sent;
9900              _context40.next = 5;
9901              return getWPNewsCategories({
9902                parent: this.parentCategoryId,
9903                page: 1,
9904                per_page: 20
9905              });
9906            case 5:
9907              _context40.t0 = _context40.sent;
9908              if (_context40.t0) {
9909                _context40.next = 8;
9910                break;
9911              }
9912              _context40.t0 = [];
9913            case 8:
9914              categories = _context40.t0;
9915              tagsScript = document.getElementById('search-tags');
9916              tags = tagsScript ? JSON.parse(tagsScript === null || tagsScript === void 0 ? void 0 : tagsScript.innerText) : [];
9917              allTagsScript = document.getElementById('search-alltags');
9918              allTags = allTagsScript ? JSON.parse(allTagsScript === null || allTagsScript === void 0 ? void 0 : allTagsScript.innerText) : [];
9919              this.app({
9920                characters: characters,
9921                categories: [{
9922                  id: this.parentCategoryId,
9923                  name: 'すべて'
9924                }].concat(_toConsumableArray(categories)).map(function (item, index) {
9925                  item['isShow'] = false;
9926                  item.index = index;
9927                  return item;
9928                }),
9929                tags: tags,
9930                allTags: allTags
9931              });
9932            case 14:
9933            case "end":
9934              return _context40.stop();
9935          }
9936        }, _callee40, this);
9937      }));
9938      function init() {
9939        return _init4.apply(this, arguments);
9940      }
9941      return init;
9942    }()
9943  }, {
9944    key: "app",
9945    value: function app(_data4) {
9946      var params = new URLSearchParams(location.search);
9947
9948      // get  previd from url
9949      var previd = params.get('previd');
9950      this.application = new Vue({
9951        el: this.el,
9952        data: function data() {
9953          var _data4$categories, _data4$categories$, _data4$categories2, _data4$categories2$, _data4$categories3, _data4$categories3$, _data4$categories4, _data4$categories4$;
9954          return {
9955            parentCategoryId: _data4 === null || _data4 === void 0 ? void 0 : (_data4$categories = _data4.categories) === null || _data4$categories === void 0 ? void 0 : (_data4$categories$ = _data4$categories[0]) === null || _data4$categories$ === void 0 ? void 0 : _data4$categories$.id,
9956            currentCategory: _data4 === null || _data4 === void 0 ? void 0 : (_data4$categories2 = _data4.categories) === null || _data4$categories2 === void 0 ? void 0 : (_data4$categories2$ = _data4$categories2[0]) === null || _data4$categories2$ === void 0 ? void 0 : _data4$categories2$.id,
9957            currentCategoryName: _data4 === null || _data4 === void 0 ? void 0 : (_data4$categories3 = _data4.categories) === null || _data4$categories3 === void 0 ? void 0 : (_data4$categories3$ = _data4$categories3[0]) === null || _data4$categories3$ === void 0 ? void 0 : _data4$categories3$.name,
9958            modalCurrentCategory: _data4 === null || _data4 === void 0 ? void 0 : (_data4$categories4 = _data4.categories) === null || _data4$categories4 === void 0 ? void 0 : (_data4$categories4$ = _data4$categories4[0]) === null || _data4$categories4$ === void 0 ? void 0 : _data4$categories4$.id,
9959            categories: _data4 === null || _data4 === void 0 ? void 0 : _data4.categories,
9960            currentTags: [],
9961            modalCurrentTags: [],
9962            tags: _data4 === null || _data4 === void 0 ? void 0 : _data4.tags,
9963            allTags: _data4 === null || _data4 === void 0 ? void 0 : _data4.allTags,
9964            saleTypes: _data4 === null || _data4 === void 0 ? void 0 : _data4.allTags.filter(function (item) {
9965              return item.taxonomy === 'sale_type';
9966            }),
9967            currentText: '',
9968            modalCurrentText: '',
9969            currentCharacters: [],
9970            currentCharactersName: [],
9971            modalCurrentCharacters: [],
9972            characters: (_data4 === null || _data4 === void 0 ? void 0 : _data4.characters) && shuffleCharacters(_data4 === null || _data4 === void 0 ? void 0 : _data4.characters),
9973            searchCategory: '',
9974            items: [],
9975            section_id: null,
9976            page: 1,
9977            per_page: 12,
9978            totalPages: 1,
9979            total: null,
9980            currentTab: {},
9981            isAccOpen: false,
9982            isInitLoad: false
9983          };
9984        },
9985        mounted: function mounted() {
9986          var _this110 = this;
9987          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41() {
9988            var _this110$categories;
9989            var page, i;
9990            return _regeneratorRuntime().wrap(function _callee41$(_context41) {
9991              while (1) switch (_context41.prev = _context41.next) {
9992                case 0:
9993                  _this110.currentTab = initialParams({
9994                    params: params,
9995                    key: 'tab',
9996                    value: _this110 === null || _this110 === void 0 ? void 0 : (_this110$categories = _this110.categories) === null || _this110$categories === void 0 ? void 0 : _this110$categories[0],
9997                    filterData: _this110.categories
9998                  });
9999                  _this110.currentCategory = initialParams({
10000                    params: params,
10001                    key: 'categories',
10002                    value: _this110.parentCategoryId
10003                  });
10004                  _this110.currentCharacters = initialParams({
10005                    params: params,
10006                    key: 'chara',
10007                    value: [],
10008                    filterData: _this110.characters
10009                  });
10010                  _this110.currentTags = initialParams({
10011                    params: params,
10012                    key: 'tags',
10013                    value: [],
10014                    filterData: [].concat(_toConsumableArray(_this110.tags), _toConsumableArray(_this110.allTags))
10015                  });
10016                  _this110.currentText = initialParams({
10017                    params: params,
10018                    key: 'w'
10019                  });
10020                  page = initialParams({
10021                    params: params,
10022                    key: 'pg'
10023                  });
10024                  _this110.section_id = initialParams({
10025                    params: params,
10026                    key: 'id',
10027                    value: ''
10028                  });
10029                  _this110.currentSaleType = initialParams({
10030                    params: params,
10031                    key: 'sale_type',
10032                    value: ''
10033                  });
10034                  _this110.characters = orderCharacters(_this110.currentCharacters, _this110.characters);
10035                  _this110.modalCurrentCategory = _this110.currentCategory;
10036                  _this110.modalCurrentCharacters = _this110.currentCharacters;
10037                  _this110.modalCurrentTags = _this110.currentTags;
10038                  _this110.modalCurrentText = _this110.currentText;
10039                  i = 0;
10040                case 14:
10041                  if (!(i < page)) {
10042                    _context41.next = 21;
10043                    break;
10044                  }
10045                  _this110.page = i + 1;
10046                  _context41.next = 18;
10047                  return _this110.pageSet();
10048                case 18:
10049                  i++;
10050                  _context41.next = 14;
10051                  break;
10052                case 21:
10053                  _this110.init();
10054                  if (previd) {
10055                    gsap.to(window, {
10056                      duration: 0,
10057                      scrollTo: {
10058                        y: "#".concat(previd),
10059                        offsetY: 100
10060                      }
10061                    });
10062                  }
10063                case 23:
10064                case "end":
10065                  return _context41.stop();
10066              }
10067            }, _callee41);
10068          }))();
10069        },
10070        updated: function updated() {
10071          // new AnchorLink();
10072          this.$nextTick(function () {
10073            $(window).trigger('onVueContentUpdate');
10074          });
10075        },
10076        methods: {
10077          init: function init() {
10078            var _document$getElements7, _this$currentTab6, _document$getElements8;
10079            var slideTab = (_document$getElements7 = document.getElementsByClassName('c-slide-tab-slider')) === null || _document$getElements7 === void 0 ? void 0 : _document$getElements7[0];
10080            new Slider({
10081              el: slideTab.id,
10082              type: 'tab',
10083              index: (_this$currentTab6 = this.currentTab) === null || _this$currentTab6 === void 0 ? void 0 : _this$currentTab6.index
10084            });
10085            var slideSearch = (_document$getElements8 = document.getElementsByClassName('c-slide-search-slider')) === null || _document$getElements8 === void 0 ? void 0 : _document$getElements8[0];
10086            new Slider({
10087              el: slideSearch.id,
10088              type: 'search'
10089            });
10090            new InitHandler();
10091          },
10092          pageSet: function pageSet() {
10093            var _this111 = this;
10094            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42() {
10095              var params, postParams, res, convertParamsArg, convertParams;
10096              return _regeneratorRuntime().wrap(function _callee42$(_context42) {
10097                while (1) switch (_context42.prev = _context42.next) {
10098                  case 0:
10099                    params = {
10100                      categories: _this111.currentCategory,
10101                      characters: _this111.currentCharacters,
10102                      tags: _this111.currentTags,
10103                      w: _this111.currentText,
10104                      id: _this111.section_id,
10105                      page: _this111.page,
10106                      sale_type: _this111.currentSaleType
10107                    };
10108                    postParams = convertPostParams(params);
10109                    _context42.next = 4;
10110                    return getWPNews(_objectSpread(_objectSpread({}, postParams), {}, {
10111                      per_page: _this111.per_page,
10112                      boss_category: 'goods'
10113                    }));
10114                  case 4:
10115                    res = _context42.sent;
10116                    if (!_this111.isInitLoad) _this111.isInitLoad = true;
10117                    convertParamsArg = _objectSpread({}, params); // pageがWPでリダイレクトしてしまうので、pageをpgに変換する処理
10118                    if (convertParamsArg !== null && convertParamsArg !== void 0 && convertParamsArg.page) {
10119                      convertParamsArg.pg = convertParamsArg.page;
10120                      delete convertParamsArg.page;
10121                    }
10122                    _this111.selectShow();
10123                    convertParams = convertStateParams(convertParamsArg);
10124                    history.replaceState(null, null, convertParams);
10125                    if (res) {
10126                      if (_this111.page === 1) {
10127                        _this111.items = res.data;
10128                      } else {
10129                        _this111.items = [].concat(_toConsumableArray(_this111.items), _toConsumableArray(res.data));
10130                      }
10131                      _this111.totalPages = Number(res.totalPages);
10132                      _this111.total = Number(res.total);
10133                    }
10134                  case 12:
10135                  case "end":
10136                    return _context42.stop();
10137                }
10138              }, _callee42);
10139            }))();
10140          },
10141          changeCategory: function changeCategory(props) {
10142            this.currentTab = props;
10143            this.section_id = null;
10144            this.page = 1;
10145            this.modalCurrentCategory = props === null || props === void 0 ? void 0 : props.id;
10146            this.currentCategoryName = props === null || props === void 0 ? void 0 : props.name;
10147            this.searchInit();
10148          },
10149          changeChar: function changeChar(props) {
10150            if (props === -1) {
10151              this.modalCurrentCharacters = [];
10152              this.currentCharacters = [];
10153            } else {
10154              if (this.modalCurrentCharacters.includes(props)) {
10155                this.modalCurrentCharacters = this.modalCurrentCharacters.filter(function (d) {
10156                  return d !== props;
10157                });
10158                this.currentCharacters = this.currentCharacters.filter(function (d) {
10159                  return d !== props;
10160                });
10161              } else {
10162                this.modalCurrentCharacters = [].concat(_toConsumableArray(this.modalCurrentCharacters), [props]);
10163                this.currentCharacters = [].concat(_toConsumableArray(this.currentCharacters), [props]);
10164              }
10165            }
10166            this.section_id = null;
10167            this.searchInit();
10168          },
10169          changeTag: function changeTag(props) {
10170            if (this.modalCurrentTags.includes(props)) {
10171              this.modalCurrentTags = this.modalCurrentTags.filter(function (d) {
10172                return d !== props;
10173              });
10174            } else {
10175              this.modalCurrentTags = [].concat(_toConsumableArray(this.modalCurrentTags), [props]);
10176            }
10177            this.section_id = null;
10178          },
10179          clickMore: function clickMore() {
10180            this.page++;
10181            this.pageSet();
10182          },
10183          clickDetail: function clickDetail(props, event) {
10184            var _this$currentCharacte9, _this$currentCharacte10, _this$currentTags, _this$currentTags2;
10185            // 一度遷移を止める
10186            event.preventDefault();
10187            var url = new URL(location);
10188            // url.searchParams.set('id', props);
10189            ((_this$currentCharacte9 = this.currentCharacters) === null || _this$currentCharacte9 === void 0 ? void 0 : _this$currentCharacte9.length) > 0 && url.searchParams.set('chara', encodeURIComponent((_this$currentCharacte10 = this.currentCharacters) === null || _this$currentCharacte10 === void 0 ? void 0 : _this$currentCharacte10.map(function (d) {
10190              return d === null || d === void 0 ? void 0 : d.post_id;
10191            })));
10192            ((_this$currentTags = this.currentTags) === null || _this$currentTags === void 0 ? void 0 : _this$currentTags.length) > 0 && url.searchParams.set('tags', encodeURIComponent((_this$currentTags2 = this.currentTags) === null || _this$currentTags2 === void 0 ? void 0 : _this$currentTags2.map(function (d) {
10193              return d === null || d === void 0 ? void 0 : d.term_id;
10194            })));
10195            url.searchParams.set('previd', props);
10196            history.pushState(null, null, url);
10197
10198            // 遷移を再開
10199            var nexturl = event.currentTarget.href;
10200            var isExternal = event.currentTarget.target === '_blank';
10201            if (isExternal) {
10202              window.open(nexturl, '_blank');
10203            } else {
10204              window.location.href = nexturl;
10205            }
10206          },
10207          searchInit: function searchInit() {
10208            this.currentCategory = this.modalCurrentCategory;
10209            this.currentCharacters = this.modalCurrentCharacters;
10210            this.currentTags = this.modalCurrentTags;
10211            this.currentText = this.modalCurrentText;
10212            this.page = 1;
10213            this.section_id = null;
10214            this.pageSet();
10215          },
10216          searchClear: function searchClear() {
10217            this.modalCurrentCategory = this.parentCategoryId;
10218            this.modalCurrentCharacters = [];
10219            this.currentTags = [];
10220            this.modalCurrentTags = [];
10221            this.modalCurrentText = '';
10222            this.currentCategory = this.parentCategoryId;
10223            this.currentCharacters = [];
10224            this.currentText = '';
10225
10226            // console.log(this.currentCategory);
10227            // console.log(this.modalCurrentCategory);;
10228          },
10229          searchJudgement: function searchJudgement() {
10230            this.modalCurrentCategory = this.currentCategory;
10231            this.modalCurrentCharacters = this.currentCharacters;
10232            this.modalCurrentTags = this.currentTags;
10233            this.modalCurrentText = this.currentText;
10234          },
10235          openModal: function openModal(e) {},
10236          toggleAcc: function toggleAcc() {
10237            if (this.isAccOpen) {
10238              this.closeAcc();
10239            } else {
10240              this.openAcc();
10241            }
10242          },
10243          openAcc: function openAcc() {
10244            this.isAccOpen = true;
10245            $('#js-search-acc-trigger').addClass('is-active');
10246            $('#js-search-acc').slideDown();
10247          },
10248          closeAcc: function closeAcc() {
10249            this.isAccOpen = false;
10250            $('#js-search-acc-trigger').removeClass('is-active');
10251            $('#js-search-acc').slideUp();
10252          },
10253          selectShow: function selectShow() {
10254            var _this$categories$filt5,
10255              _this$categories$filt6,
10256              _this112 = this;
10257            //選択したカテゴリーとキャラとタグをサイトタイトルに表示
10258            this.currentCategoryName = (_this$categories$filt5 = this.categories.filter(function (d) {
10259              return d.id === _this112.currentCategory;
10260            })) === null || _this$categories$filt5 === void 0 ? void 0 : (_this$categories$filt6 = _this$categories$filt5[0]) === null || _this$categories$filt6 === void 0 ? void 0 : _this$categories$filt6.name;
10261            var charaText = this.charaText().length !== 0 ? "(".concat(this.charaText().join('、'), ")") : '';
10262            var searchText = this.searchText().length !== 0 ? "[".concat(this.searchText().join('、'), "]") : '';
10263            var siteName = 'グッズ | サンリオ';
10264            document.title = "".concat(this.currentCategoryName, " ").concat(charaText, " ").concat(searchText, " | ").concat(siteName);
10265
10266            //選択したカテゴリーとキャラをパンくずに表示
10267            var categoryURL = "?categories=".concat(this.currentCategory);
10268            var categoryLink = $('.c-bread__item.categoryName a');
10269            if (categoryLink.length === 0) {
10270              $('.c-bread__item.categoryName').append($('<a>').attr('href', categoryURL).addClass('-text-gray'));
10271            }
10272            $('.c-bread__item.categoryName a').attr('href', categoryURL);
10273            $('.c-bread__item.categoryName a').text(this.currentCategoryName);
10274            var charaItem = $('.c-bread__item.charaName');
10275            if (charaText.length !== 0) {
10276              if (charaItem.length === 0) {
10277                $('.c-bread-list').append($('<li>').addClass('c-bread__item charaName'));
10278              }
10279              $('.c-bread__item.charaName a').remove();
10280              this.currentCharacters.map(function (item, index) {
10281                var charaName = item.chara_name;
10282                var charaId = "&chara=".concat(item.post_id);
10283                $('.c-bread__item.charaName').append($('<a>').attr('href', categoryURL + charaId).addClass('-text-gray').text(charaName));
10284              });
10285            } else {
10286              $('.c-bread__item.charaName').remove();
10287            }
10288          },
10289          charaText: function charaText() {
10290            var _this$currentCharacte11;
10291            var charaText = ((_this$currentCharacte11 = this.currentCharacters) === null || _this$currentCharacte11 === void 0 ? void 0 : _this$currentCharacte11.length) > 0 ? this.currentCharacters.map(function (chara) {
10292              return chara.chara_name;
10293            }) : [];
10294            return charaText;
10295          },
10296          searchText: function searchText() {
10297            var _this$currentTags3, _this$currentText;
10298            // const searchChar =
10299            //   this.currentCharacters?.length > 0
10300            //     ? this.currentCharacters.map(d => d?.chara_name)
10301            //     : [];
10302            var searchTags = ((_this$currentTags3 = this.currentTags) === null || _this$currentTags3 === void 0 ? void 0 : _this$currentTags3.length) > 0 ? this.currentTags.map(function (d) {
10303              return d === null || d === void 0 ? void 0 : d.name;
10304            }) : [];
10305            var searchText = (_this$currentText = this.currentText) !== null && _this$currentText !== void 0 && _this$currentText.length ? [this.currentText].concat(_toConsumableArray(searchTags)) : _toConsumableArray(searchTags);
10306            return searchText;
10307          },
10308          saleTypeText: function saleTypeText() {
10309            return this.currentSaleType;
10310          }
10311        },
10312        computed: {
10313          modalSearchCharStyles: function modalSearchCharStyles() {
10314            if (isMobile()) {
10315              var _this$characters13;
10316              var COLUMN_MAX = 6;
10317              if (((_this$characters13 = this.characters) === null || _this$characters13 === void 0 ? void 0 : _this$characters13.length) > COLUMN_MAX) {
10318                var _this$characters14;
10319                return "grid-template: auto / repeat(".concat(Math.ceil((((_this$characters14 = this.characters) === null || _this$characters14 === void 0 ? void 0 : _this$characters14.length) + 1) / 2), ", 1fr)");
10320              } else {
10321                return "grid-template: auto / repeat(".concat(COLUMN_MAX + 1, ", 1fr)");
10322              }
10323            } else {
10324              var _this$characters15;
10325              var _COLUMN_MAX2 = 14;
10326              if (((_this$characters15 = this.characters) === null || _this$characters15 === void 0 ? void 0 : _this$characters15.length) > _COLUMN_MAX2 * 2 - 1) {
10327                var _this$characters16;
10328                return "grid-template: auto / repeat(".concat(Math.ceil((((_this$characters16 = this.characters) === null || _this$characters16 === void 0 ? void 0 : _this$characters16.length) + 1) / 2), ", 1fr)");
10329              } else {
10330                return "grid-template: auto / repeat(".concat(_COLUMN_MAX2, ", 1fr)");
10331              }
10332            }
10333          },
10334          showMore: function showMore() {
10335            var _this$items3;
10336            return ((_this$items3 = this.items) === null || _this$items3 === void 0 ? void 0 : _this$items3.length) > 0 && this.totalPages > this.page;
10337          } // searchText() {
10338          //   // const searchChar =
10339          //   //   this.currentCharacters?.length > 0
10340          //   //     ? this.currentCharacters.map(d => d?.chara_name)
10341          //   //     : [];
10342          //   const searchTags = this.currentTags?.length > 0 ? this.currentTags.map(d => d?.name) : [];
10343          //   const searchText = this.currentText?.length
10344          //     ? [this.currentText,, ...searchTags]
10345          //     : [...searchTags];
10346          //   return searchText;
10347          // }
10348        }
10349      });
10350    }
10351  }]);
10352  return AppSearchGoods;
10353}();
10354var AppSearchMovie = /*#__PURE__*/function () {
10355  function AppSearchMovie() {
10356    _classCallCheck(this, AppSearchMovie);
10357    this.target = 'app-searchMovie';
10358    this.el = document.getElementById(this.target);
10359    this.application = null;
10360    // this.parentCategoryId = 4;
10361    if (this.el) this.init();
10362  }
10363  _createClass(AppSearchMovie, [{
10364    key: "init",
10365    value: function () {
10366      var _init5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43() {
10367        var data, array, categories, calcData, channelsScript, channels;
10368        return _regeneratorRuntime().wrap(function _callee43$(_context43) {
10369          while (1) switch (_context43.prev = _context43.next) {
10370            case 0:
10371              _context43.next = 2;
10372              return getWPMovie({});
10373            case 2:
10374              data = _context43.sent;
10375              array = data ? Object.values(data) : [];
10376              categories = array.map(function (d, i) {
10377                return _objectSpread(_objectSpread({}
10377, d === null || d === void 0 ? void 0 : d.category), {}, {
10378                  index: i
10379                });
10380              }) || [];
10381              calcData = array.map(function (d) {
10382                var _d$category2;
10383                return {
10384                  key: d === null || d === void 0 ? void 0 : (_d$category2 = d.category) === null || _d$category2 === void 0 ? void 0 : _d$category2.slug,
10385                  content: d === null || d === void 0 ? void 0 : d.contents
10386                };
10387              });
10388              channelsScript = document.getElementById('search-channels');
10389              channels = channelsScript ? JSON.parse(channelsScript === null || channelsScript === void 0 ? void 0 : channelsScript.innerText) : [];
10390              this.app({
10391                categories: [{
10392                  term_id: -1,
10393                  name: 'YouTube',
10394                  slug: 'youtube'
10395                }].concat(_toConsumableArray(categories)),
10396                initialData: calcData,
10397                channels: channels
10398              });
10399            case 9:
10400            case "end":
10401              return _context43.stop();
10402          }
10403        }, _callee43, this);
10404      }));
10405      function init() {
10406        return _init5.apply(this, arguments);
10407      }
10408      return init;
10409    }()
10410  }, {
10411    key: "app",
10412    value: function app(_data5) {
10413      var movieSection = {
10414        props: ['section', 'anchor', 'index', 'type'],
10415        data: function data() {
10416          var _this$section;
10417          return {
10418            page: 1,
10419            per_page: 10,
10420            items: ((_this$section = this.section) === null || _this$section === void 0 ? void 0 : _this$section.content) || []
10421          };
10422        },
10423        mounted: function mounted() {},
10424        watch: {},
10425        methods: {
10426          clickMore: function clickMore() {
10427            this.page++;
10428          }
10429        },
10430        computed: {
10431          showItems: function showItems() {
10432            return _toConsumableArray(this.items).slice(0, this.page * this.per_page);
10433          },
10434          showMore: function showMore() {
10435            return judgeShowMore(this.items, this.page, this.per_page);
10436          }
10437        },
10438        template: "\n        <section class='p-movieSection' :class='\"-\" + type'>\n          <div class=\"p-movieSection__inner\">\n            <div class=\"p-movieSection__content\">\n              <div class=\"p-movieSection__head\">\n                    <h2 class=\"c-textRoundLine\" :id='type'><span class=\"c-line\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1200\" height=\"64\" viewBox=\"0 0 1200 64\"><path id=\"\u30D1\u30B9_29550\" data-name=\"\u30D1\u30B9 29550\" d=\"M1015.158,62.89H597.7C556.975,26.951,493.079,1,414.852,1c-79.9,0-150.143,24.65-190.5,61.89h-409.2\" transform=\"translate(185.842)\" fill=\"none\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" stroke-width=\"2\" stroke-dasharray=\"0 5\"/></svg></span>\n                    <span>{{anchor?.[index + 1]?.name}}</span></h2>\n              </div>\n              <div class=\"p-movieSection__body\">\n                <div class=\"c-block-more\">\n                  <ul class=\"c-list-movie-channel\">\n                    <li class=\"c-list-movie-channel__item\" v-for='(item, index) in showItems' :key='item.ID'>\n                    <a :href=\"item?.acf?.link?.url\" :target=\"item?.acf?.link?.blank && Number(item.acf.link.blank) === 0 ? '_blank' : false\">\n                      <div class=\"c-img\"><img :src=\"item?.acf?.image?.url || ''\" alt=\"\" loading=\"lazy\" width=\"150\" height=\"150\">\n                        </div>\n                      <p class=\"c-name\">{{item?.acf?.name || item?.post_title}}</p>\n                      <div class=\"c-tag\" v-if='type === \"others\" && item?.category?.name?.length > 0'>{{item?.category?.name}}</div>\n                    </a>\n                    </li>\n                  </ul>\n                  <div class=\"c-link-icon -hover -l c-btn-more\" @click=\"clickMore()\" v-if='showMore'>\n                    <a href=\"javascript:void(0);\"><span class=\"c-icon -icon-more\"><svg>\n                    <use xlink:href=\"#icon-more\"></use></svg></span><span class=\"c-link-icon-label\">\u3082\u3063\u3068\u898B\u308B</span></a></div>\n                  <div class=\"c-link-icon -hover -gray -to-top\"><a href=\"?id=movie-search\"><span class=\"c-icon -icon-top\"><svg>\n                  <use xlink:href=\"#icon-top\"></use></svg></span><span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n                </div>\n              </div>\n            </div>\n          </div>\n        </section>\n\n      "
10439      };
10440      var params = new URLSearchParams(location.search);
10441      this.application = new Vue({
10442        el: this.el,
10443        data: function data() {
10444          return {
10445            anchor: _data5 === null || _data5 === void 0 ? void 0 : _data5.categories,
10446            sections: _data5 === null || _data5 === void 0 ? void 0 : _data5.initialData,
10447            currentChannel: '',
10448            channels: _data5 === null || _data5 === void 0 ? void 0 : _data5.channels,
10449            section_id: null,
10450            items: [],
10451            per_page: 6,
10452            page: 1,
10453            totalPages: 1
10454          };
10455        },
10456        components: {
10457          'movie-section': movieSection
10458        },
10459        mounted: function mounted() {
10460          var _this113 = this;
10461          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44() {
10462            var page, i;
10463            return _regeneratorRuntime().wrap(function _callee44$(_context44) {
10464              while (1) switch (_context44.prev = _context44.next) {
10465                case 0:
10466                  _this113.currentChannel = initialParams({
10467                    params: params,
10468                    key: 'channel',
10469                    value: -1
10470                  });
10471                  _this113.section_id = initialParams({
10472                    params: params,
10473                    key: 'id',
10474                    value: ''
10475                  });
10476                  page = initialParams({
10477                    params: params,
10478                    key: 'page'
10479                  });
10480                  _this113.channels = orderChannel(_this113.currentChannel, _this113.channels);
10481                  i = 0;
10482                case 5:
10483                  if (!(i < page)) {
10484                    _context44.next = 12;
10485                    break;
10486                  }
10487                  _this113.page = i + 1;
10488                  _context44.next = 9;
10489                  return _this113.pageSet();
10490                case 9:
10491                  i++;
10492                  _context44.next = 5;
10493                  break;
10494                case 12:
10495                  _this113.init();
10496                case 13:
10497                case "end":
10498                  return _context44.stop();
10499              }
10500            }, _callee44);
10501          }))();
10502        },
10503        updated: function updated() {
10504          window.modal = new Modal();
10505          this.$nextTick(function () {
10506            $(window).trigger('onVueContentUpdate');
10507          });
10508        },
10509        methods: {
10510          init: function init() {
10511            var _document$getElements9;
10512            var slideSearch = (_document$getElements9 = document.getElementsByClassName('c-slide-search-slider')) === null || _document$getElements9 === void 0 ? void 0 : _document$getElements9[0];
10513            new Slider({
10514              el: slideSearch.id,
10515              type: 'search'
10516            });
10517            new InitHandler({
10518              ignore: ['modal']
10519            });
10520          },
10521          pageSet: function pageSet() {
10522            var _this114 = this;
10523            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45() {
10524              var params, postParams, res, convertParams;
10525              return _regeneratorRuntime().wrap(function _callee45$(_context45) {
10526                while (1) switch (_context45.prev = _context45.next) {
10527                  case 0:
10528                    params = {
10529                      channel: _this114.currentChannel,
10530                      id: _this114.section_id,
10531                      page: _this114.page
10532                    };
10533                    postParams = convertPostParams(params);
10534                    _context45.next = 4;
10535                    return getMovieList(_objectSpread(_objectSpread({}, postParams), {}, {
10536                      num: _this114.per_page
10537                    }));
10538                  case 4:
10539                    res = _context45.sent;
10540                    convertParams = convertStateParams(params);
10541                    history.replaceState(null, null, convertParams);
10542                    if (res) {
10543                      if (_this114.page === 1) {
10544                        _this114.items = res.data;
10545                      } else {
10546                        _this114.items = [].concat(_toConsumableArray(_this114.items), _toConsumableArray(res.data));
10547                      }
10548                      _this114.totalPages = Number(res.totalPages);
10549                    }
10550                  case 8:
10551                  case "end":
10552                    return _context45.stop();
10553                }
10554              }, _callee45);
10555            }))();
10556          },
10557          changeChannel: function changeChannel(props) {
10558            if (props === -1) {
10559              this.currentChannel = '';
10560            } else {
10561              if (this.currentChannel === props) {
10562                this.currentChannel = '';
10563              } else {
10564                this.currentChannel = props;
10565              }
10566            }
10567            this.page = 1;
10568            this.pageSet();
10569            this.$nextTick(function () {
10570              $(window).trigger('onVueContentUpdate');
10571            });
10572          },
10573          clickMore: function clickMore() {
10574            this.page++;
10575            this.pageSet();
10576          },
10577          modalOpen: function modalOpen(e) {}
10578        },
10579        computed: {
10580          showMore: function showMore() {
10581            var _this$items4;
10582            return ((_this$items4 = this.items) === null || _this$items4 === void 0 ? void 0 : _this$items4.length) > 0 && this.totalPages > this.page;
10583          }
10584        }
10585      });
10586    }
10587  }]);
10588  return AppSearchMovie;
10589}();
10590var AppSearchMovieDetail = /*#__PURE__*/function () {
10591  function AppSearchMovieDetail() {
10592    _classCallCheck(this, AppSearchMovieDetail);
10593    this.target = 'app-searchMovieDetail';
10594    this.el = document.getElementById(this.target);
10595    this.application = null;
10596    // this.parentCategoryId = 4;
10597    if (this.el) this.init();
10598  }
10599  _createClass(AppSearchMovieDetail, [{
10600    key: "init",
10601    value: function () {
10602      var _init6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46() {
10603        var _this$el, _this$el$dataset;
10604        return _regeneratorRuntime().wrap(function _callee46$(_context46) {
10605          while (1) switch (_context46.prev = _context46.next) {
10606            case 0:
10607              this.channel = (_this$el = this.el) === null || _this$el === void 0 ? void 0 : (_this$el$dataset = _this$el.dataset) === null || _this$el$dataset === void 0 ? void 0 : _this$el$dataset.account;
10608              this.app({
10609                channel: this.channel
10610              });
10611            case 2:
10612            case "end":
10613              return _context46.stop();
10614          }
10615        }, _callee46, this);
10616      }));
10617      function init() {
10618        return _init6.apply(this, arguments);
10619      }
10620      return init;
10621    }()
10622  }, {
10623    key: "app",
10624    value: function app(_data6) {
10625      var params = new URLSearchParams(location.search);
10626      this.application = new Vue({
10627        el: this.el,
10628        data: function data() {
10629          return {
10630            currentChannel: _data6 === null || _data6 === void 0 ? void 0 : _data6.channel,
10631            items: [],
10632            per_page: isMobile() ? 6 : 10,
10633            page: 1,
10634            totalPages: 1
10635          };
10636        },
10637        mounted: function mounted() {
10638          var _this115 = this;
10639          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47() {
10640            var page, i;
10641            return _regeneratorRuntime().wrap(function _callee47$(_context47) {
10642              while (1) switch (_context47.prev = _context47.next) {
10643                case 0:
10644                  page = initialParams({
10645                    params: params,
10646                    key: 'page'
10647                  });
10648                  i = 0;
10649                case 2:
10650                  if (!(i < page)) {
10651                    _context47.next = 9;
10652                    break;
10653                  }
10654                  _this115.page = i + 1;
10655                  _context47.next = 6;
10656                  return _this115.pageSet();
10657                case 6:
10658                  i++;
10659                  _context47.next = 2;
10660                  break;
10661                case 9:
10662                  _this115.init();
10663                case 10:
10664                case "end":
10665                  return _context47.stop();
10666              }
10667            }, _callee47);
10668          }))();
10669        },
10670        updated: function updated() {
10671          // new AnchorLink();
10672          if (this.page !== 1) {
10673            window.modal = new Modal();
10674          }
10675          this.$nextTick(function () {
10676            $(window).trigger('onVueContentUpdate');
10677          });
10678        },
10679        methods: {
10680          init: function init() {
10681            new InitHandler({
10682              ignore: ['modal']
10683            });
10684          },
10685          pageSet: function pageSet() {
10686            var _this116 = this;
10687            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48() {
10688              var params, postParams, res, convertParams;
10689              return _regeneratorRuntime().wrap(function _callee48$(_context48) {
10690                while (1) switch (_context48.prev = _context48.next) {
10691                  case 0:
10692                    params = {
10693                      channel: _this116.currentChannel,
10694                      page: _this116.page
10695                    };
10696                    postParams = convertPostParams(params);
10697                    _context48.next = 4;
10698                    return getMovieDetail(_objectSpread(_objectSpread({}, postParams), {}, {
10699                      num: _this116.per_page
10700                    }));
10701                  case 4:
10702                    res = _context48.sent;
10703                    convertParams = convertStateParams({
10704                      pager: params === null || params === void 0 ? void 0 : params.page
10705                    });
10706                    history.replaceState(null, null, convertParams);
10707                    if (res) {
10708                      if (_this116.page === 1) {
10709                        _this116.items = res.data;
10710                      } else {
10711                        _this116.items = [].concat(_toConsumableArray(_this116.items), _toConsumableArray(res.data));
10712                      }
10713                      _this116.totalPages = Number(res.totalPages);
10714                    }
10715                  case 8:
10716                  case "end":
10717                    return _context48.stop();
10718                }
10719              }, _callee48);
10720            }))();
10721          },
10722          clickMore: function clickMore() {
10723            this.page++;
10724            this.pageSet();
10725          },
10726          modalOpen: function modalOpen(e) {}
10727        },
10728        computed: {
10729          showMore: function showMore() {
10730            var _this$items5;
10731            return ((_this$items5 = this.items) === null || _this$items5 === void 0 ? void 0 : _this$items5.length) > 0 && this.totalPages > this.page;
10732          }
10733        }
10734      });
10735    }
10736  }]);
10737  return AppSearchMovieDetail;
10738}();
10739var AppSearchSocialMedia = /*#__PURE__*/function () {
10740  function AppSearchSocialMedia() {
10741    _classCallCheck(this, AppSearchSocialMedia);
10742    this.target = 'app-searchSocialMedia';
10743    this.el = document.getElementById(this.target);
10744    this.application = null;
10745    // this.parentCategoryId = 4;
10746    if (this.el) this.init();
10747  }
10748  _createClass(AppSearchSocialMedia, [{
10749    key: "init",
10750    value: function () {
10751      var _init7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49() {
10752        var data, array, categories;
10753        return _regeneratorRuntime().wrap(function _callee49$(_context49) {
10754          while (1) switch (_context49.prev = _context49.next) {
10755            case 0:
10756              _context49.next = 2;
10757              return getWPSocialMedia({});
10758            case 2:
10759              data = _context49.sent;
10760              array = data ? Object.keys(data) : [];
10761              categories = array.map(function (d, i) {
10762                var _data$d, _data$d$category;
10763                var label = ((_data$d = data[d]) === null || _data$d === void 0 ? void 0 : (_data$d$category = _data$d.category) === null || _data$d$category === void 0 ? void 0 : _data$d$category.name) || d;
10764                return {
10765                  id: i,
10766                  key: d,
10767                  name: label
10768                };
10769              }) || [];
10770              this.app({
10771                categories: categories,
10772                initialData: data
10773              });
10774            case 6:
10775            case "end":
10776              return _context49.stop();
10777          }
10778        }, _callee49, this);
10779      }));
10780      function init() {
10781        return _init7.apply(this, arguments);
10782      }
10783      return init;
10784    }()
10785  }, {
10786    key: "app",
10787    value: function app(_data7) {
10788      var _this118 = this;
10789      var params = new URLSearchParams(location.search);
10790      this.application = new Vue({
10791        el: this.el,
10792        data: function data() {
10793          var _data7$categories, _data7$categories$, _data7$categories2, _data7$categories2$;
10794          return {
10795            currentId: 0,
10796            currentCategory: _data7 === null || _data7 === void 0 ? void 0 : (_data7$categories = _data7.categories) === null || _data7$categories === void 0 ? void 0 : (_data7$categories$ = _data7$categories[0]) === null || _data7$categories$ === void 0 ? void 0 : _data7$categories$.id,
10797            categories: _data7 === null || _data7 === void 0 ? void 0 : _data7.categories,
10798            initialData: _data7 === null || _data7 === void 0 ? void 0 : _data7.initialData,
10799            currentKey: _data7 === null || _data7 === void 0 ? void 0 : (_data7$categories2 = _data7.categories) === null || _data7$categories2 === void 0 ? void 0 : (_data7$categories2$ = _data7$categories2[0]) === null || _data7$categories2$ === void 0 ? void 0 : _data7$categories2$.key,
10800            currentTab: {},
10801            per_page: 6,
10802            page: 1
10803          };
10804        },
10805        mounted: function mounted() {
10806          var _this$categories2,
10807            _this$categories2$fil,
10808            _this117 = this,
10809            _this$currentCategory;
10810          this.currentKey = initialParams({
10811            params: params,
10812            key: 'key',
10813            value: this.currentKey
10814          });
10815          this.currentCategory = (_this$categories2 = this.categories) === null || _this$categories2 === void 0 ? void 0 : (_this$categories2$fil = _this$categories2.filter(function (d, i) {
10816            return (d === null || d === void 0 ? void 0 : d.key) === (_this117 === null || _this117 === void 0 ? void 0 : _this117.currentKey);
10817          })) === null || _this$categories2$fil === void 0 ? void 0 : _this$categories2$fil[0];
10818          this.currentId = ((_this$currentCategory = this.currentCategory) === null || _this$currentCategory === void 0 ? void 0 : _this$currentCategory.id) || 0;
10819          this.page = initialParams({
10820            params: params,
10821            key: 'page'
10822          });
10823          // this.currentTab = initialParams({
10824          //   params,
10825          //   key: 'tab',
10826          //   value: this?.categories?.[0],
10827          //   filterData: this.categories
10828          // });
10829          // this.currentCategory = initialParams({
10830          //   params,
10831          //   key: 'categories',
10832          //   value: this.parentCategoryId
10833          // });
10834          // console.log(this.currentTab);
10835          this.slide();
10836          this.pageSet();
10837        },
10838        updated: function updated() {
10839          this.$nextTick(function () {
10840            $(window).trigger('onVueContentUpdate');
10841          });
10842        },
10843        methods: {
10844          slide: function slide() {
10845            var _document$getElements10;
10846            var slideMedia = (_document$getElements10 = document.getElementsByClassName('c-slide-tab-slider')) === null || _document$getElements10 === void 0 ? void 0 : _document$getElements10[0];
10847            new Slider({
10848              el: slideMedia.id,
10849              type: 'tab',
10850              index: this.currentId
10851            });
10852          },
10853          pageSet: function pageSet() {
10854            var params = {
10855              key: this.currentKey,
10856              page: this.page
10857            };
10858            var convertParams = convertStateParams(params);
10859            history.replaceState(null, null, convertParams);
10860          },
10861          // changeCategory(props) {
10862          //   const isNext = props?.currentTarget?.dataset?.btn === 'next' || false;
10863          //   const id = Number(props?.currentTarget?.dataset?.slider);
10864          //   const index =
10865          //     isNext && id >= this.categories?.length
10866          //       ? 0
10867          //       : !isNext && id < 0
10868          //       ? this.categories?.length - 1
10869          //       : id;
10870          //   this.currentId = index;
10871          //   this.currentCategory = this.categories?.[index];
10872          //   this.currentKey = this.categories?.[index]?.key;
10873          //   this.page = 1;
10874          //   this.pageSet();
10875          // },
10876          changeCategory: function changeCategory(props) {
10877            var _this$categories3;
10878            this.currentKey = props === null || props === void 0 ? void 0 : props.key;
10879            this.currentCategory = (_this$categories3 = this.categories) === null || _this$categories3 === void 0 ? void 0 : _this$categories3[props === null || props === void 0 ? void 0 : props.id];
10880            this.section_id = null;
10881            this.page = 1;
10882            this.pageSet();
10883          },
10884          onSlideChange: function onSlideChange(_index) {
10885            var _this$categories4, _this$categories5, _this$categories5$ind;
10886            var index = _index;
10887            this.currentId = index;
10888            this.currentCategory = (_this$categories4 = this.categories) === null || _this$categories4 === void 0 ? void 0 : _this$categories4[index];
10889            this.currentKey = (_this$categories5 = this.categories) === null || _this$categories5 === void 0 ? void 0 : (_this$categories5$ind = _this$categories5[index]) === null || _this$categories5$ind === void 0 ? void 0 : _this$categories5$ind.key;
10890            this.page = 1;
10891            this.pageSet();
10892          },
10893          clickMore: function clickMore() {
10894            this.page++;
10895            this.pageSet();
10896          }
10897        },
10898        computed: {
10899          items: function items() {
10900            var _this$initialData6;
10901            return (_this$initialData6 = this.initialData) === null || _this$initialData6 === void 0 ? void 0 : _this$initialData6[this.currentKey];
10902          },
10903          showItems: function showItems() {
10904            var _this$items6;
10905            return _toConsumableArray((_this$items6 = this.items) === null || _this$items6 === void 0 ? void 0 : _this$items6.contents).slice(0);
10906          },
10907          showMore: function showMore() {
10908            var _this$items7;
10909            return judgeShowMore((_this$items7 = this.items) === null || _this$items7 === void 0 ? void 0 : _this$items7.contents);
10910          }
10911        }
10912      });
10913      $(window).on('onMediaSlideChange', function (e, index) {
10914        var _this118$application;
10915        (_this118$application = _this118.application) === null || _this118$application === void 0 ? void 0 : _this118$application.onSlideChange(index);
10916      });
10917    }
10918  }]);
10919  return AppSearchSocialMedia;
10920}();
10921var AppSearchSitelist = /*#__PURE__*/function () {
10922  function AppSearchSitelist() {
10923    _classCallCheck(this, AppSearchSitelist);
10924    this.target = 'app-searchSitelist';
10925    this.el = document.getElementById(this.target);
10926    this.application = null;
10927    // this.parentCategoryId = 4;
10928    if (this.el) this.init();
10929  }
10930  _createClass(AppSearchSitelist, [{
10931    key: "init",
10932    value: function () {
10933      var _init8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50() {
10934        var data, array, categories, calcData;
10935        return _regeneratorRuntime().wrap(function _callee50$(_context50) {
10936          while (1) switch (_context50.prev = _context50.next) {
10937            case 0:
10938              _context50.next = 2;
10939              return getWPSiteList();
10940            case 2:
10941              _context50.t0 = _context50.sent;
10942              if (_context50.t0) {
10943                _context50.next = 5;
10944                break;
10945              }
10946              _context50.t0 = [];
10947            case 5:
10948              data = _context50.t0;
10949              array = Object.values(data) || [];
10950              categories = array.map(function (d, i) {
10951                return _objectSpread(_objectSpread({}, d === null || d === void 0 ? void 0 : d.category), {}, {
10952                  index: i
10953                });
10954              }) || [];
10955              calcData = array.map(function (d) {
10956                var _d$category3;
10957                return {
10958                  key: d === null || d === void 0 ? void 0 : (_d$category3 = d.category) === null || _d$category3 === void 0 ? void 0 : _d$category3.slug,
10959                  content: d === null || d === void 0 ? void 0 : d.contents
10960                };
10961              });
10962              this.app({
10963                categories: categories,
10964                initialData: calcData
10965              });
10966            case 10:
10967            case "end":
10968              return _context50.stop();
10969          }
10970        }, _callee50, this);
10971      }));
10972      function init() {
10973        return _init8.apply(this, arguments);
10974      }
10975      return init;
10976    }()
10977  }, {
10978    key: "app",
10979    value: function app(_data8) {
10980      var siteListSection = {
10981        props: ['section', 'anchor', 'index', 'pages'],
10982        data: function data() {
10983          var _this$section2;
10984          return {
10985            per_page: 6,
10986            items: (_this$section2 = this.section) === null || _this$section2 === void 0 ? void 0 : _this$section2.content
10987          };
10988        },
10989        watch: {},
10990        methods: {
10991          clickMore: function clickMore() {
10992            var _this119 = this;
10993            var pages = this.pages.map(function (d, i) {
10994              if (i === Number(_this119.index)) {
10995                return d + 1;
10996              } else {
10997                return d;
10998              }
10999            });
11000            this.$emit('parent-method', {
11001              pages: pages
11002            });
11003          }
11004        },
11005        computed: {
11006          page: function page() {
11007            var _this$pages5;
11008            return (_this$pages5 = this.pages) === null || _this$pages5 === void 0 ? void 0 : _this$pages5[this.index];
11009          },
11010          showItems: function showItems() {
11011            return _toConsumableArray(this.items).slice(0, this.page * this.per_page);
11012          },
11013          showMore: function showMore() {
11014            return judgeShowMore(this.items, this.page, this.per_page);
11015          }
11016        },
11017        template: "\n      <section class=\"p-siteListSection c-vueCloak\" v-cloak>\n        <div class=\"p-siteListSection__inner\">\n          <div class=\"p-siteListSection__content\">\n            <div class=\"p-siteListSection__head\">\n                  <h2 class=\"c-textRoundLine\" :id='anchor?.[index]?.slug'><span class=\"c-line\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1200\" height=\"64\" viewBox=\"0 0 1200 64\">\n<path id=\"\u30D1\u30B9_29550\" data-name=\"\u30D1\u30B9 29550\" d=\"M1015.158,62.89H597.7C556.975,26.951,493.079,1,414.852,1c-79.9,0-150.143,24.65-190.5,61.89h-409.2\" transform=\"translate(185.842)\" fill=\"none\" stroke-linecap=\"round\" stroke-miterlimit=\"10\" stroke-width=\"2\" stroke-dasharray=\"0 5\"/>\n</svg></span><span>{{anchor?.[index]?.name}}</span></h2>\n            </div>\n            <div class=\"p-siteListSection__body\">\n            <ul class=\"c-list-siteList\">
11017\n            <li class=\"c-list-siteList__item\" v-for='(item, index) in showItems' :key='\"detail-\" + item.ID'>\n            <a :href=\"item?.acf?.link?.url\" :target=\"item?.acf?.link?.blank && Number(item.acf.link.blank) === 0 ? '_blank' : false\" >\n                  <div class=\"c-img\"><img :src=\"item?.acf?.image?.url || ''\" alt=\"\" loading=\"lazy\" width=\"340\" height=\"191\"/>\n                  </div>\n                    <div class=\"c-title\">\n                      <div class=\"c-link-text\">{{item?.acf?.title || item?.post_title}}<span class=\"c-icon -icon-blank\" v-if='item?.acf?.link?.blank && Number(item.acf.link.blank) === 0'>\n                      <svg>\n                      <use xlink:href=\"#icon-blank\"></use>\n                      </svg></span>\n                    </div>\n                    </div>\n                  </a></li>\n            </ul>\n              <div class=\"c-block-more\">\n                <div class=\"c-link-icon -hover -l c-btn-more\" @click=\"clickMore()\" v-if='showMore'>\n                  <a href=\"javascript:void(0);\"><span class=\"c-icon -icon-more\"><svg>\n                  <use xlink:href=\"#icon-more\"></use></svg></span><span class=\"c-link-icon-label\">\u3082\u3063\u3068\u898B\u308B</span></a></div>\n                <div class=\"c-link-icon -hover -gray -to-top\"><a href=\"?id=navlink\"><span class=\"c-icon -icon-top\"><svg>\n                <use xlink:href=\"#icon-top\"></use></svg></span><span class=\"c-link-icon-label\">\u4E0A\u306B\u623B\u308B</span></a></div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </section>\n    "
11018      };
11019      var params = new URLSearchParams(location.search);
11020      this.application = new Vue({
11021        el: this.el,
11022        data: function data() {
11023          var _data8$initialData;
11024          return {
11025            initialData: _data8 === null || _data8 === void 0 ? void 0 : _data8.initialData,
11026            anchor: _data8 === null || _data8 === void 0 ? void 0 : _data8.categories,
11027            pages: (_data8 === null || _data8 === void 0 ? void 0 : (_data8$initialData = _data8.initialData) === null || _data8$initialData === void 0 ? void 0 : _data8$initialData.map(function (i) {
11028              return 1;
11029            })) || []
11030          };
11031        },
11032        components: {
11033          'sitelist-section': siteListSection
11034        },
11035        mounted: function mounted() {
11036          var _this$initialData7;
11037          this.pages = initialParams({
11038            params: params,
11039            key: 'pages',
11040            value: this === null || this === void 0 ? void 0 : (_this$initialData7 = this.initialData) === null || _this$initialData7 === void 0 ? void 0 : _this$initialData7.map(function (i) {
11041              return 1;
11042            })
11043          });
11044          this.pageSet();
11045          this.init();
11046        },
11047        updated: function updated() {
11048          this.$nextTick(function () {
11049            $(window).trigger('onVueContentUpdate');
11050          });
11051        },
11052        methods: {
11053          init: function init() {
11054            new InitHandler();
11055          },
11056          pageSet: function pageSet() {
11057            var _this120 = this;
11058            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51() {
11059              var params, convertParams;
11060              return _regeneratorRuntime().wrap(function _callee51$(_context51) {
11061                while (1) switch (_context51.prev = _context51.next) {
11062                  case 0:
11063                    params = {
11064                      pages: _this120.pages
11065                    };
11066                    convertParams = convertStateParams(params);
11067                    history.replaceState(null, null, convertParams);
11068                  case 3:
11069                  case "end":
11070                    return _context51.stop();
11071                }
11072              }, _callee51);
11073            }))();
11074          },
11075          updateChildParam: function updateChildParam(props) {
11076            // alert('Parent!' + props);
11077            for (var _i9 = 0, _Object$entries4 = Object.entries(props); _i9 < _Object$entries4.length; _i9++) {
11078              var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i9], 2),
11079                key = _Object$entries4$_i[0],
11080                value = _Object$entries4$_i[1];
11081              if (key === 'pages') {
11082                this.pages = value;
11083                this.pageSet();
11084              }
11085            }
11086          }
11087        }
11088      });
11089    }
11090  }]);
11091  return AppSearchSitelist;
11092}();
11093var AppBirthdayModal = /*#__PURE__*/function () {
11094  function AppBirthdayModal() {
11095    _classCallCheck(this, AppBirthdayModal);
11096    this.target = '.c-modal-birthday';
11097    this.list = [];
11098    this.$el = $(this.target);
11099    if (this.$el.length > 0) this.init();
11100  }
11101  _createClass(AppBirthdayModal, [{
11102    key: "init",
11103    value: function init() {
11104      var _this121 = this;
11105      this.scroll();
11106      axios.get("".concat(window.JSON_DOMAIN, "system/json/birth_day.json")).then(function (_ref10) {
11107        var data = _ref10.data;
11108        //console.log('birthdaymodal api return value',data);
11109        if (data.birthday && data.birthday.length > 0) {
11110          _this121.list = data.birthday;
11111          _this121.app();
11112        }
11113      });
11114    }
11115  }, {
11116    key: "app",
11117    value: function app() {
11118      var list = Util.shuffleArray(this.list, 2);
11119      var _this = this;
11120      // const list = this.list;
11121      var birthdayItemNum = isMobile() ? 1 : 2;
11122      var _loop2 = function _loop2(i) {
11123        var index = i;
11124        var item = list[i];
11125        if (!item) return {
11126          v: void 0
11127        };
11128        var app = new Vue({
11129          el: "#modal-birthday-content-".concat(i + 1),
11130          data: {
11131            chara: item,
11132            clickedNum: 0,
11133            dispalyClickNum: 0,
11134            isPushed: false
11135          },
11136          methods: {
11137            pushCount: function pushCount() {
11138              var _this122 = this;
11139              var today = new Date();
11140              var year = today.getFullYear();
11141              var month = ('0' + (today.getMonth() + 1)).slice(-2);
11142              var day = ('0' + today.getDate()).slice(-2);
11143              this.isPushed = true;
11144              var msgEl = $("#modal-birthday-content-".concat(i + 1, " .js-modal-birthday-msg span"));
11145              var tl = gsap.timeline();
11146              tl.set(msgEl, {
11147                opacity: 0,
11148                y: '20px'
11149              }).to(msgEl, {
11150                opacity: 1,
11151                y: 0,
11152                stagger: 0.05
11153              }).to(msgEl, {
11154                delay: 2,
11155                opacity: 0,
11156                stagger: 0.05,
11157                y: '-20px'
11158              });
11159              axios.get("".concat(window.API_BASE_URL, "system/api/bdaycounter.php"), {
11160                params: {
11161                  chara_id: this.chara.chara_id,
11162                  detail_chara_id: this.chara.detail_chara_id,
11163                  num: "".concat(day).concat(month).concat(year)
11164                }
11165              }).then(function (data) {
11166                _this122.clickedNum++;
11167                _this122.dispalyClickNum = _this122.clickedNum;
11168
11169                // ローカルストレージにキャッシュ
11170                var pushedList = window.localStorage.getItem('birthdayPushed');
11171                var charaID = "".concat(_this122.chara.chara_id, "-").concat(_this122.chara.detail_chara_id);
11172                var _obj = pushedList ? JSON.parse(pushedList) : {};
11173                var currentYear = new Date().getFullYear();
11174                if (!_obj["".concat(currentYear)]) _obj["".concat(currentYear)] = {};
11175                _obj["".concat(currentYear)][charaID] = Date.now();
11176                window.localStorage.setItem('birthdayPushed', JSON.stringify(_obj));
11177                $(_this122.$refs.btm).attr('disabled', true);
11178              });
11179            },
11180            counterAnim: function counterAnim() {
11181              var _this123 = this;
11182              var target = this.clickedNum;
11183              var duration = target < 1000 ? 300 : 800;
11184              var isAnim = true;
11185              var current = 0;
11186              setTimeout(function () {
11187                isAnim = false;
11188              }, duration);
11189              var interval = setInterval(function () {
11190                current += target / duration;
11191                _this123.dispalyClickNum = Math.ceil(current);
11192                if (!isAnim) {
11193                  clearInterval(interval);
11194                  _this123.dispalyClickNum = target;
11195                }
11196              }, 1);
11197            }
11198          },
11199          created: function created() {
11200            var _this124 = this;
11201            var topImgSrc = this.chara.img_party_top || this.chara.img_thismonth;
11202            $("#modal-birthday-float-".concat(index + 1, " img")).attr('src', topImgSrc);
11203            $(".js-sidecharacter.-is-".concat(index + 1)).attr('onClick', "dataLayer.push({event:'measures_check',ev_action:'click',ev_label:'".concat(this.chara.detail_chara_name, "',measures_id :'D1'});"));
11204            $("#modal-birthday-float-".concat(index + 1)).show();
11205            this.chara.birthday_arr = this.chara.birthday.split('-');
11206            ;
11207            this.chara.birthday_text = "".concat(this.chara.birthday_arr[0], "\u6708").concat(this.chara.birthday_arr[1], "\u65E5");
11208            var pushedList = window.localStorage.getItem('birthdayPushed');
11209            if (pushedList) {
11210              var obj = JSON.parse(pushedList);
11211              var currentYear = new Date().getFullYear();
11212              window.obj = obj;
11213              this.isPushed = obj["".concat(currentYear)] && obj["".concat(currentYear)]["".concat(this.chara.chara_id, "-").concat(this.chara.detail_chara_id)] ? true : false;
11214            }
11215            // if(pushedCash) {
11216            //   const obj = JSON.parse(pushedCash);
11217            //   this.isPushed = obj[`${this.chara.chara_id}-${this.chara.detail_chara_id}`] ? true : false;
11218            //   console.log(this.isPushed);
11219            // }
11220            axios.get("".concat(window.API_BASE_URL, "system/api/bdaycountfetcher.php"), {
11221              params: {
11222                chara_id: this.chara.chara_id,
11223                detail_chara_id: this.chara.detail_chara_id
11224              }
11225            }).then(function (res) {
11226              var data = res.data;
11227              _this124.clickedNum = data.result.character.pushed_count;
11228            });
11229          }
11230        });
11231        $(window).on('birthdaymodal-open', function (e) {
11232          app.counterAnim();
11233        });
11234      };
11235      for (var i = 0; i < birthdayItemNum; i++) {
11236        var _ret = _loop2(i);
11237        if (_typeof(_ret) === "object") return _ret.v;
11238      }
11239    }
11240  }, {
11241    key: "scroll",
11242    value: function scroll() {
11243      gsap.to('.js-sidecharacter', {
11244        scrollTrigger: {
11245          trigger: '.js-sidecharacter-trigger',
11246          onEnter: function onEnter() {
11247            $('.js-sidecharacter').addClass('js-hide');
11248          },
11249          onLeaveBack: function onLeaveBack() {
11250            $('.js-sidecharacter').removeClass('js-hide');
11251          }
11252        }
11253      });
11254    }
11255  }]);
11256  return AppBirthdayModal;
11257}();
11258var AppSearchGift = /*#__PURE__*/function () {
11259  function AppSearchGift() {
11260    _classCallCheck(this, AppSearchGift);
11261    this.target = 'app-searchGift';
11262    this.el = document.getElementById(this.target);
11263    if (this.el === null) return;
11264    this.application = null;
11265    this.step = 6;
11266    this.normal = this.el.querySelector('.js-gift-normal');
11267    this["new"] = this.el.querySelector('.js-gift-new');
11268    this.special = this.el.querySelector('.js-gift-special');
11269    this.init();
11270  }
11271  _createClass(AppSearchGift, [{
11272    key: "init",
11273    value: function () {
11274      var _init9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52() {
11275        var arrNormal, arrNew, arrSpecial;
11276        return _regeneratorRuntime().wrap(function _callee52$(_context52) {
11277          while (1) switch (_context52.prev = _context52.next) {
11278            case 0:
11279              arrNormal = JSON.parse($('#json-gift-normal').html());
11280              arrNew = JSON.parse($('#json-gift-new').html());
11281              arrSpecial = JSON.parse($('#json-gift-special').html());
11282              if (arrNormal.length === 0) this.normal.style.display = 'none';
11283              if (arrNew.length === 0) this["new"].style.display = 'none';
11284              if (arrSpecial.length === 0) this.special.style.display = 'none';
11285              this.app(arrNormal, arrNew, arrSpecial, this.target, this.step);
11286            case 7:
11287            case "end":
11288              return _context52.stop();
11289          }
11290        }, _callee52, this);
11291      }));
11292      function init() {
11293        return _init9.apply(this, arguments);
11294      }
11295      return init;
11296    }()
11297  }, {
11298    key: "app",
11299    value: function app(normal, newnew, special, container, step) {
11300      this.application = new Vue({
11301        el: this.el,
11302        data: function data() {
11303          return {
11304            dataNormal: normal,
11305            stepNormal: step,
11306            dataNew: newnew,
11307            stepNew: step,
11308            dataSpecial: special,
11309            stepSpecial: step,
11310            container: container,
11311            sliderClass: '.js-sliderGift:not(.swiper-initialized)',
11312            sliderHandle: [],
11313            sliderHandleIdx: 0
11314          };
11315        },
11316        computed: {
11317          showItemsNormal: function showItemsNormal() {
11318            return this.dataNormal.slice(0, this.stepNormal);
11319          },
11320          showItemsNew: function showItemsNew() {
11321            return this.dataNew.slice(0, this.stepNew);
11322          },
11323          showItemsSpecial: function showItemsSpecial() {
11324            return this.dataSpecial.slice(0, this.stepSpecial);
11325          },
11326          showMoreNormal: function showMoreNormal() {
11327            return this.dataNormal.length - this.stepNormal > 0;
11328          },
11329          showMoreNew: function showMoreNew() {
11330            return this.dataNew.length - this.stepNew > 0;
11331          },
11332          showMoreSpecial: function showMoreSpecial() {
11333            return this.dataSpecial.length - this.stepSpecial > 0;
11334          }
11335        },
11336        methods: {
11337          clickMoreNormal: function clickMoreNormal() {
11338            this.stepNormal += step;
11339          },
11340          clickMoreNew: function clickMoreNew() {
11341            this.stepNew += step;
11342          },
11343          clickMoreSpecial: function clickMoreSpecial() {
11344            this.stepSpecial += step;
11345          },
11346          slider: function slider() {
11347            var _this125 = this;
11348            var container = document.getElementById(this.container),
11349              targets = container.querySelectorAll(this.sliderClass);
11350            if (targets.length !== 0) {
11351              targets.forEach(function (item, index) {
11352                var slides = item.querySelectorAll('.swiper-slide');
11353                if (slides.length > 1) {
11354                  var pnel = item.parentNode.nextElementSibling;
11355                  _this125.sliderHandle[_this125.sliderHandleIdx] = new Swiper(item, {
11356                    threshold: 20,
11357                    loop: true,
11358                    speed: 750,
11359                    pagination: {
11360                      el: pnel,
11361                      clickable: true
11362                    },
11363                    on: {
11364                      activeIndexChange: function activeIndexChange(swiper) {
11365                        if (swiper.slides[swiper.activeIndex].hasAttribute('data-modal')) {
11366                          swiper.el.parentNode.parentNode.classList.add('-modal');
11367                        } else {
11368                          swiper.el.parentNode.parentNode.classList.remove('-modal');
11369                        }
11370                      }
11371                    }
11372                  });
11373                  _this125.sliderHandleIdx++;
11374                } else {
11375                  if (slides[0].hasAttribute('data-modal')) {
11376                    item.parentNode.parentNode.classList.add('-modal');
11377                  } else {
11378                    item.parentNode.parentNode.classList.remove('-modal');
11379                  }
11380                }
11381              });
11382              //console.log(this.sliderHandleIdx);
11383            }
11384          }
11385        },
11386        mounted: function mounted() {
11387          this.slider();
11388        },
11389        updated: function updated() {
11390          this.slider();
11391          this.$nextTick(function () {
11392            $(window).trigger('onVueContentUpdate');
11393          });
11394        }
11395      });
11396    }
11397  }]);
11398  return AppSearchGift;
11399}();
11400/**
11401 * Stores.
11402 *
11403 * @export
11404 * @class Stores
11405 */
11406var Stores = /*#__PURE__*/function () {
11407  function Stores() {
11408    var _this126 = this;
11409    _classCallCheck(this, Stores);
11410    this.yextParamNames = ['c_storeTypeV2', 'c_tickets', 'c_sanrioPlusServices', 'c_otherServices', 'c_paymentCreditCards', 'c_paymentTransportationIC', 'c_paymentEMoney', 'c_paymentQRCode'];
11411    this.el = document.getElementById('p-store');
11412    if (!this.el) return;
11413    // this.radios = document.getElementsByName('yloc');
11414    this.qp = document.getElementById('qp');
11415    this.staticFilters = document.getElementById('staticFilters');
11416    this.localRadio = document.getElementById('c-search-radio0');
11417    this.searchWordRadio = document.getElementById('c-search-radio1');
11418    this.searchWordInput = document.getElementById('c-search-word');
11419    this.sendBtn = document.getElementById('c-search-send');
11420    this.clearBtn = document.getElementById('c-search-clear');
11421    this.form = document.getElementById('c-search-form');
11422    this.errorBlock = document.getElementsByClassName('c-error')[0];
11423    this.checkboxes = this.form.querySelectorAll('input[type=checkbox]');
11424    window.addEventListener('pageshow', function () {
11425      // 結果から戻ると、disabledが残るので初期化で削除する
11426      _this126.searchWordInput.disabled = false;
11427      _this126.localRadio.disabled = false;
11428      _this126.searchWordRadio.disabled = false;
11429      _this126.checkboxes.forEach(function (checkbox) {
11430        checkbox.disabled = false;
11431      });
11432    });
11433    this.searchWordInput.addEventListener('focus', function () {
11434      _this126.focusIn();
11435    }, false);
11436
11437    // テキスト入力でEnterを押した場合の暗黙的送信もここを通す
11438    this.form.addEventListener('submit', function (e) {
11439      e.preventDefault();
11440      _this126.formSend(e);
11441    }, false);
11442    this.sendBtn.addEventListener('click', function (e) {
11443      // submitイベント経由に寄せて、Enterと同じ経路にする
11444      if (typeof _this126.form.requestSubmit === 'function') {
11445        _this126.form.requestSubmit();
11446      } else {
11447        _this126.formSend(e);
11448      }
11449    }, false);
11450    this.clearBtn.addEventListener('click', function (e) {
11451      _this126.formClear();
11452    }, false);
11453  }
11454  _createClass(Stores, [{
11455    key: "focusIn",
11456    value: function focusIn() {
11457      if (this.searchWordRadio.checked) {
11458        this.localRadio.checked = false;
11459      }
11460      this.searchWordRadio.checked = true;
11461    }
11462  }, {
11463    key: "formSend",
11464    value: function formSend(e) {
11465      var _this127 = this;
11466      if (this.searchWordRadio.checked && this.searchWordInput.value === '') {
11467        this.errorBlock.classList.add('-error');
11468        gsap.to(window, {
11469          scrollTo: {
11470            y: this.searchWordInput,
11471            autoKill: false,
11472            offsetY: 200
11473          },
11474          duration: 0.5
11475        });
11476        return;
11477      }
11478      if (this.localRadio.checked) {
11479        this.qp.value = '現在地';
11480      } else {
11481        this.qp.value = this.searchWordInput.value.trim();
11482      }
11483      var filters = {};
11484      this.yextParamNames.forEach(function (name) {
11485        var values = _toConsumableArray(_this127.form.querySelectorAll("input[name=\"".concat(name, "\"]:checked"))).map(function (input) {
11486          return input.value;
11487        });
11488        if (values.length) {
11489          filters[name] = values;
11490        }
11491      });
11492      this.staticFilters.value = JSON.stringify(filters);
11493
11494      // searchTypeとcheckboxは送信しない
11495      this.localRadio.disabled = true;
11496      this.searchWordRadio.disabled = true;
11497      this.checkboxes.forEach(function (checkbox) {
11498        checkbox.disabled = true;
11499      });
11500
11501      // submit()はsubmitイベントを発火しないので、上のリスナーとはループしない
11502      this.form.submit();
11503    }
11504  }, {
11505    key: "formClear",
11506    value: function formClear(e) {
11507      var _this$searchWordInput;
11508      var checkbox = this.form.querySelectorAll('input[type=checkbox]');
11509      for (var i = 0; i < checkbox.length; i++) {
11510        checkbox[i].checked = false;
11511      }
11512      if (((_this$searchWordInput = this.searchWordInput.value) === null || _this$searchWordInput === void 0 ? void 0 : _this$searchWordInput.length) > 0) {
11513        this.searchWordInput.value = '';
11514      }
11515      if (this.errorBlock.classList.contains('-error')) {
11516        this.errorBlock.classList.remove('-error');
11517      }
11518    }
11519  }]);
11520  return Stores;
11521}();
11522var AppMypageLogin = /*#__PURE__*/function () {
11523  function AppMypageLogin() {
11524    _classCallCheck(this, AppMypageLogin);
11525    this.target = 'app-mypage-login';
11526    this.el = document.getElementById(this.target);
11527    if (this.el) this.init();
11528  }
11529  _createClass(AppMypageLogin, [{
11530    key: "init",
11531    value: function init() {
11532      this.initApp();
11533    }
11534  }, {
11535    key: "initApp",
11536    value: function initApp() {
11537      var loginApiUrl = "".concat(window.SANRIOPLUS_API_BASE_URL, "/login.php");
11538      this.app = new Vue({
11539        el: this.el,
11540        data: function data() {
11541          return {
11542            userId: '',
11543            idError: null,
11544            userPass: '',
11545            passError: null
11546          };
11547        },
11548        computed: {},
11549        methods: {
11550          loginChallenge: function loginChallenge(e) {
11551            var _this128 = this;
11552            e.preventDefault();
11553            var isOK = this.validateInput();
11554            if (!isOK) {
11555              return false;
11556            }
11557            $.ajax(loginApiUrl, {
11558              type: 'POST',
11559              data: {
11560                'id': this.userId,
11561                'pass': this.userPass
11562              },
11563              dataType: 'json'
11564            }).done(function (data) {
11565              if (data.result.login == 1) {
11566                var ref = Util.getURLParam('ref');
11567                var currentHostName = window.location.hostname;
11568                var refHostName = ref ? new URL(ref).hostname : null;
11569                if (ref && currentHostName === refHostName) {
11570                  window.location.href = data.result.redirect_url + '?ref=' + ref;
11571                } else {
11572                  window.location.href = data.result.redirect_url;
11573                }
11574              } else {
11575                var _data$result$retData;
11576                if ((_data$result$retData = data.result.retData) !== null && _data$result$retData !== void 0 && _data$result$retData.resultMessage) {
11577                  var _data$result$retData2;
11578                  $('.js-loginmodal-text').text((_data$result$retData2 = data.result.retData) === null || _data$result$retData2 === void 0 ? void 0 : _data$result$retData2.resultMessage);
11579                }
11580                _this128.showErrorModal();
11581              }
11582            })["catch"](function (res) {
11583              _this128.showErrorModal();
11584            });
11585          },
11586          showErrorModal: function showErrorModal() {
11587            $('#errorModal').fadeIn();
11588            var close = function close() {
11589              $('#errorModal').fadeOut();
11590              $('.js-loginmodal-close').off('click');
11591              $('#errorModal').off('click');
11592            };
11593            $('.js-logoutmodal-close').on('click', function (e) {
11594              close();
11595            });
11596            $('#errorModal').on('click', function (e) {
11597              var boxs = $(e.target).children('.p-portalModal__box');
11598              if (boxs.length > 0) {
11599                close();
11600              }
11601            });
11602          },
11603          validateInput: function validateInput() {
11604            var isOK = true;
11605            if (!this.userId) {
11606              isOK = false;
11607              this.idError = '入力必須です';
11608            } else {
11609              this.idError = null;
11610            }
11611            if (!this.userPass) {
11612              isOK = false;
11613              this.passError = '入力必須です';
11614            } else {
11615              this.passError = null;
11616            }
11617            return isOK;
11618          }
11619        }
11620      });
11621    }
11622  }]);
11623  return AppMypageLogin;
11624}();
11625var appMypageFavorit = /*#__PURE__*/function () {
11626  function appMypageFavorit() {
11627    _classCallCheck(this, appMypageFavorit);
11628    this.target = 'app-mypage-favorite';
11629    this.el = document.getElementById(this.target);
11630    this.LoginUtil = new Login();
11631    if (this.el) this.init();
11632  }
11633  _createClass(appMypageFavorit, [{
11634    key: "init",
11635    value: function init() {
11636      this.initApp();
11637    }
11638  }, {
11639    key: "initApp",
11640    value: function initApp() {
11641      var _this = this;
11642      this.app = new Vue({
11643        el: this.el,
11644        data: {
11645          allList: [],
11646          isOpenSlect: false,
11647          currentSort: null,
11648          isPopupShow: false,
11649          // API到着後にカード情報内に組み込む
11650          favoriteChara: {
11651            main: null,
11652            list: null
11653          },
11654          sortOptions: [{
11655            "id": 'register',
11656            // 内部処理用 unique must
11657            "label": '登録順' // must
11658          }, {
11659            "id": 'syllabary',
11660            "label": '五十音順'
11661          }]
11662        },
11663        created: function created() {
11664          var _this129 = this;
11665          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53() {
11666            var isLogin, _favoritChara$main, favoritChara, mainPostId;
11667            return _regeneratorRuntime().wrap(function _callee53$(_context53) {
11668              while (1) switch (_context53.prev = _context53.next) {
11669                case 0:
11670                  _context53.next = 2;
11671                  return _this.LoginUtil.checkLogin();
11672                case 2:
11673                  isLogin = _context53.sent;
11674                  if (!(isLogin === true)) {
11675                    _context53.next = 11;
11676                    break;
11677                  }
11678                  _context53.next = 6;
11679                  return _this.LoginUtil.getFavoriteChara();
11680                case 6:
11681                  favoritChara = _context53.sent;
11682                  mainPostId = ((_favoritChara$main = favoritChara.main) === null || _favoritChara$main === void 0 ? void 0 : _favoritChara$main.post_id) || false;
11683                  favoritChara.list = favoritChara.list.filter(function (item) {
11684                    item.isFav = true;
11685                    return !(item.post_id === mainPostId);
11686                  });
11687                  _this129.favoriteChara.main = favoritChara.main;
11688                  _this129.favoriteChara.list = _toConsumableArray(favoritChara.list);
11689                case 11:
11690                case "end":
11691                  return _context53.stop();
11692              }
11693            }, _callee53);
11694          }))();
11695        },
11696        mounted: function mounted() {
11697          var _this130 = this;
11698          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54() {
11699            return _regeneratorRuntime().wrap(function _callee54$(_context54) {
11700              while (1) switch (_context54.prev = _context54.next) {
11701                case 0:
11702                  _this130.currentSort = _objectSpread({}, _this130.sortOptions[0]);
11703                case 1:
11704                case "end":
11705                  return _context54.stop();
11706              }
11707            }, _callee54);
11708          }))();
11709        },
11710        computed: {
11711          activeList: function activeList() {
11712            var _this$favoriteChara;
11713            var list = ((_this$favoriteChara = this.favoriteChara) === null || _this$favoriteChara === void 0 ? void 0 : _this$favoriteChara.list) || [];
11714            return list;
11715          }
11716        },
11717        methods: {
11718          // selectbox
11719          changeSort: function changeSort(target) {
11720            var _current = null;
11721            _toConsumableArray(this.sortOptions).forEach(function (item) {
11722              if (item.id === target) _current = _objectSpread({}, item);
11723            });
11724            if (!_current) return;
11725            this.currentSort = _current;
11726            this.closeSelect();
11727          },
11728          toggleSelect: function toggleSelect() {
11729            if (this.isOpenSlect) {
11730              this.closeSelect();
11731            } else {
11732              this.openSelect();
11733            }
11734          },
11735          openSelect: function openSelect() {
11736            var el = this.$refs.selectList;
11737            this.isOpenSlect = true;
11738            $(el).slideDown();
11739          },
11740          closeSelect: function closeSelect() {
11741            var el = this.$refs.selectList;
11742            this.isOpenSlect = false;
11743            $(el).slideUp();
11744          },
11745          updateCharaFavoriteState: function updateCharaFavoriteState(item, isFavorite) {
11746            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55() {
11747              var id, res;
11748              return _regeneratorRuntime().wrap(function _callee55$(_context55) {
11749                while (1) switch (_context55.prev = _context55.next) {
11750                  case 0:
11751                    id = item.post_id;
11752                    item.isFav = isFavorite;
11753                    _context55.next = 4;
11754                    return _this.LoginUtil.uodateCharaFavoritState(id, isFavorite);
11755                  case 4:
11756                    res = _context55.sent;
11757                  case 5:
11758                  case "end":
11759                    return _context55.stop();
11760                }
11761              }, _callee55);
11762            }))();
11763          } // selectbox end
11764        }
11765      });
11766    }
11767  }]);
11768  return appMypageFavorit;
11769}();
11770var appMypagePortal = /*#__PURE__*/function () {
11771  function appMypagePortal() {
11772    _classCallCheck(this, appMypagePortal);
11773    this.target = 'app-mypage-portal';
11774    this.el = document.getElementById(this.target);
11775    this.LoginUtil = new Login();
11776    if (this.el) this.init();
11777  }
11778  _createClass(appMypagePortal, [{
11779    key: "init",
11780    value: function () {
11781      var _init10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56() {
11782        return _regeneratorRuntime().wrap(function _callee56$(_context56) {
11783          while (1) switch (_context56.prev = _context56.next) {
11784            case 0:
11785              _context56.next = 2;
11786              return this.LoginUtil.getUserBasicData();
11787            case 2:
11788              this.userBasicData = _context56.sent;
11789              this.initApp();
11790            case 4:
11791            case "end":
11792              return _context56.stop();
11793          }
11794        }, _callee56, this);
11795      }));
11796      function init() {
11797        return _init10.apply(this, arguments);
11798      }
11799      return init;
11800    }()
11801  }, {
11802    key: "initApp",
11803    value: function initApp() {
11804      var clipPerPage = 6; // 6
11805      var _this = this;
11806      this.app = new Vue({
11807        el: this.el,
11808        data: {
11809          title: 'pagename',
11810          userBasicData: null,
11811          currentClipCategory: 'goods',
11812          clipPostsData: {
11813            goods: {
11814              currentPage: 0,
11815              isNext: false,
11816              list: []
11817            },
11818            news: {
11819              currentPage: 0,
11820              isNext: false,
11821              list: []
11822            }
11823          },
11824          charaInfoTab: {
11825            activeTab: 'goods',
11826            page: 1,
11827            isNext: false,
11828            charaList: [],
11829            articleList: []
11830          },
11831          customChara: {
11832            mv: null,
11833            clip: null,
11834            chara: null,
11835            news: null
11836          }
11837        },
11838        watch: {
11839          "charaInfoTab.charaList": function charaInfoTabCharaList() {
11840            setTimeout(function () {
11841              var _document$getElements11;
11842              var slideSearch = (_document$getElements11 = document.getElementsByClassName('c-slide-search-slider')) === null || _document$getElements11 === void 0 ? void 0 : _document$getElements11[0];
11843              new Slider({
11844                el: slideSearch.id,
11845                type: 'search'
11846              });
11847              new InitHandler();
11848            }, 200);
11849          }
11850        },
11851        computed: {
11852          activeClipList: function activeClipList() {
11853            var list = null;
11854            list = this.clipPostsData[this.currentClipCategory].list;
11855            return list;
11856          },
11857          isShowMoreBtm: function isShowMoreBtm() {
11858            return this.clipPostsData[this.currentClipCategory].isNext;
11859          },
11860          activeCharaInfoList: function activeCharaInfoList() {
11861            var list = this.charaInfoTab.charaList.filter(function (item) {
11862              return item.isActive;
11863            }).map(function (item) {
11864              return item.post_id;
11865            });
11866            return list;
11867          },
11868          modalCharaSlideTheme: function modalCharaSlideTheme() {
11869            if (this.charaInfoTab.activeTab === 'goods') {
11870              return 'sky';
11871            } else if (this.charaInfoTab.activeTab === 'news') {
11872              return 'red';
11873            } else {
11874              return 'sky';
11875            }
11876          }
11877        },
11878        updated: function updated() {
11879          // タブ用
11880          new AnchorLink();
11881          this.$nextTick(function () {
11882            // $(window).trigger('onVueContentUpdate');
11883          });
11884        },
11885        methods: {
11886          logout: function logout(e) {
11887            $('#logoutModal').fadeIn();
11888            $('.js-logoutmodal-close').on('click', function (e) {
11889              e.preventDefault();
11890              $('#logoutModal').fadeOut();
11891              $('.js-logoutmodal-close').off();
11892            });
11893          },
11894          // clip tab
11895          initClipTab: function initClipTab() {
11896            this.loadClipList('goods');
11897            this.loadClipList('news');
11898          },
11899          updateClipFavoriteState: function updateClipFavoriteState(item, isFavorite) {
11900            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee57() {
11901              var res;
11902              return _regeneratorRuntime().wrap(function _callee57$(_context57) {
11903                while (1) switch (_context57.prev = _context57.next) {
11904                  case 0:
11905                    item.isFav = isFavorite;
11906                    _context57.next = 3;
11907                    return _this.LoginUtil.uodateClipFavoriteState(item.id, isFavorite);
11908                  case 3:
11909                    res = _context57.sent;
11910                  case 4:
11911                  case "end":
11912                    return _context57.stop();
11913                }
11914              }, _callee57);
11915            }))();
11916          },
11917          loadMore: function loadMore() {
11918            this.loadClipList(this.currentClipCategory);
11919          },
11920          loadClipList: function loadClipList(category) {
11921            var _this131 = this;
11922            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee58() {
11923              var _listData$list;
11924              var listData, cpp, loadPage, res, list, pager;
11925              return _regeneratorRuntime().wrap(function _callee58$(_context58) {
11926                while (1) switch (_context58.prev = _context58.next) {
11927                  case 0:
11928                    listData = _this131.clipPostsData[category];
11929                    if (listData) {
11930                      _context58.next = 3;
11931                      break;
11932                    }
11933                    return _context58.abrupt("return", null);
11934                  case 3:
11935                    listData.currentPage++;
11936                    cpp = clipPerPage;
11937                    loadPage = listData.currentPage;
11938                    _context58.next = 8;
11939                    return _this.LoginUtil.getClipArticle(category, cpp, loadPage);
11940                  case 8:
11941                    res = _context58.sent;
11942                    list = res.list.map(function (item) {
11943                      item.isFav = true;
11944                      return item;
11945                    });
11946                    (_listData$list = listData.list).push.apply(_listData$list, _toConsumableArray(list));
11947                    pager = res.pager;
11948                    listData.isNext = listData.currentPage < pager.page_count;
11949                    return _context58.abrupt("return", listData);
11950                  case 14:
11951                  case "end":
11952                    return _context58.stop();
11953                }
11954              }, _callee58);
11955            }))();
11956          },
11957          // article Tab
11958          initCharaInfoTab: function initCharaInfoTab() {
11959            var _this132 = this;
11960            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee59() {
11961              var charaList, _list;
11962              return _regeneratorRuntime().wrap(function _callee59$(_context59) {
11963                while (1) switch (_context59.prev = _context59.next) {
11964                  case 0:
11965                    _context59.next = 2;
11966                    return _this.LoginUtil.getFavoriteChara();
11967                  case 2:
11968                    charaList = _context59.sent;
11969                    _list = charaList.list.map(function (item) {
11970                      item.isActive = false;
11971                      return item;
11972                    });
11973                    _this132.charaInfoTab.charaList = _toConsumableArray(_list);
11974                    _this132.updateCharaInfoArtile();
11975                  case 6:
11976                  case "end":
11977                    return _context59.stop();
11978                }
11979              }, _callee59);
11980            }))();
11981          },
11982          changeCharaInfoTab: function changeCharaInfoTab(category) {
11983            var _this133 = this;
11984            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee60() {
11985              return _regeneratorRuntime().wrap(function _callee60$(_context60) {
11986                while (1) switch (_context60.prev = _context60.next) {
11987                  case 0:
11988                    _this133.charaInfoTab.page = 1;
11989                    _this133.charaInfoTab.activeTab = category;
11990                    _this133.updateCharaInfoArtile();
11991                  case 3:
11992                  case "end":
11993                    return _context60.stop();
11994                }
11995              }, _callee60);
11996            }))();
11997          },
11998          updateCharaInfoActiveChara: function updateCharaInfoActiveChara(chara) {
11999            var _this134 = this;
12000            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee61() {
12001              return _regeneratorRuntime().wrap(function _callee61$(_context61) {
12002                while (1) switch (_context61.prev = _context61.next) {
12003                  case 0:
12004                    if (chara === false) {
12005                      _this134.charaInfoTab.charaList.forEach(function (item) {
12006                        item.isActive = false;
12007                      });
12008                    } else {
12009                      chara.isActive = !chara.isActive;
12010                    }
12011                    _this134.charaInfoTab.page = 1;
12012                    _this134.updateCharaInfoArtile();
12013                  case 3:
12014                  case "end":
12015                    return _context61.stop();
12016                }
12017              }, _callee61);
12018            }))();
12019          },
12020          updateCharaInfoArtile: function updateCharaInfoArtile() {
12021            var _this135 = this;
12022            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee62() {
12023              var res;
12024              return _regeneratorRuntime().wrap(function _callee62$(_context62) {
12025                while (1) switch (_context62.prev = _context62.next) {
12026                  case 0:
12027                    _context62.next = 2;
12028                    return _this135.getCharaInfoList(_this135.charaInfoTab.activeTab, _this135.activeCharaInfoList);
12029                  case 2:
12030                    res = _context62.sent;
12031                    _this135.charaInfoTab.isNext = res.totalPages > 1;
12032                    _this135.charaInfoTab.articleList = res.data;
12033                  case 5:
12034                  case "end":
12035                    return _context62.stop();
12036                }
12037              }, _callee62);
12038            }))();
12039          },
12040          getCharaInfoList: function getCharaInfoList() {
12041            var _arguments = arguments,
12042              _this136 = this;
12043            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee63() {
12044              var category, charaIdList, page, opt, goodsTermID, res;
12045              return _regeneratorRuntime().wrap(function _callee63$(_context63) {
12046                while (1) switch (_context63.prev = _context63.next) {
12047                  case 0:
12048                    category = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : 'news';
12049                    charaIdList = _arguments.length > 1 ? _arguments[1] : undefined;
12050                    page = _arguments.length > 2 && _arguments[2] !== undefined ? _arguments[2] : 1;
12051                    opt = {
12052                      per_page: 6,
12053                      page: page,
12054                      boss_category: category,
12055                      show_invisible: 1
12056                    };
12057                    if (charaIdList.length > 0) {
12058                      opt.chara = charaIdList.join(',');
12059                    } else {
12060                      opt.chara = _this136.charaInfoTab.charaList.map(function (chara) {
12061                        return chara.post_id;
12062                      }).join(',');
12063                    }
12064                    if (category === 'goods') {
12065                      goodsTermID = $('[data-goods-term-id').data('goods-term-id');
12066                      if (goodsTermID) opt.categories = goodsTermID;
12067                    }
12068                    _context63.next = 8;
12069                    return getWPNews(_objectSpread({}, opt));
12070                  case 8:
12071                    res = _context63.sent;
12072                    return _context63.abrupt("return", res);
12073                  case 10:
12074                  case "end":
12075                    return _context63.stop();
12076                }
12077              }, _callee63);
12078            }))();
12079          },
12080          clickStaticClip: function clickStaticClip(event) {
12081            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee64() {
12082              var $el, isClip, id, res, _res;
12083              return _regeneratorRuntime().wrap(function _callee64$(_context64) {
12084                while (1) switch (_context64.prev = _context64.next) {
12085                  case 0:
12086                    $el = $(event.currentTarget);
12087                    isClip = $el.hasClass('is-clipped');
12088                    id = $el.data('id');
12089                    if (!isClip) {
12090                      _context64.next = 10;
12091                      break;
12092                    }
12093                    $el.removeClass('is-clipped');
12094                    _context64.next = 7;
12095                    return _this.LoginUtil.uodateClipFavoriteState(id, false);
12096                  case 7:
12097                    res = _context64.sent;
12098                    _context64.next = 14;
12099                    break;
12100                  case 10:
12101                    $el.addClass('is-clipped');
12102                    _context64.next = 13;
12103                    return _this.LoginUtil.uodateClipFavoriteState(id, true);
12104                  case 13:
12105                    _res = _context64.sent;
12106                  case 14:
12107                  case "end":
12108                    return _context64.stop();
12109                }
12110              }, _callee64);
12111            }))();
12112          },
12113          loadMoreArticleList: function loadMoreArticleList() {
12114            var _this137 = this;
12115            return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee65() {
12116              var _this137$charaInfoTab;
12117              var res;
12118              return _regeneratorRuntime().wrap(function _callee65$(_context65) {
12119                while (1) switch (_context65.prev = _context65.next) {
12120                  case 0:
12121                    _this137.charaInfoTab.page += 1;
12122                    _context65.next = 3;
12123                    return _this137.getCharaInfoList(_this137.charaInfoTab.activeTab, _this137.activeCharaInfoList, _this137.charaInfoTab.page);
12124                  case 3:
12125                    res = _context65.sent;
12126                    if ((res === null || res === void 0 ? void 0 : res.totalPages) <= _this137.charaInfoTab.page) {
12127                      _this137.charaInfoTab.isNext = false;
12128                    }
12129                    (_this137$charaInfoTab = _this137.charaInfoTab.articleList).push.apply(_this137$charaInfoTab, _toConsumableArray(res.data));
12130                  case 6:
12131                  case "end":
12132                    return _context65.stop();
12133                }
12134              }, _callee65);
12135            }))();
12136          }
12137        },
12138        created: function created() {
12139          var _this138 = this;
12140          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee66() {
12141            var _this138$userBasicDat, _this138$userBasicDat2;
12142            var mycharacter;
12143            return _regeneratorRuntime().wrap(function _callee66$(_context66) {
12144              while (1) switch (_context66.prev = _context66.next) {
12145                case 0:
12146                  // ユーザーデータの取得
12147                  // this.userBasicData  = await _this.LoginUtil.getUserBasicData();
12148                  _this138.userBasicData = _this.userBasicData;
12149                  _this138.initClipTab();
12150                  _this138.initCharaInfoTab();
12151                  mycharacter = ((_this138$userBasicDat = _this138.userBasicData) === null || _this138$userBasicDat === void 0 ? void 0 : (_this138$userBasicDat2 = _this138$userBasicDat.main_character) === null || _this138$userBasicDat2 === void 0 ? void 0 : _this138$userBasicDat2.chara_id) || Util.getURLParam('mycharacter') || null;
12152                  ;
12153                  if (mycharacter) {
12154                    _this138.customChara.mv = "/common/vendors/mycharacters/".concat(mycharacter, "/mpp-mv-").concat(mycharacter, ".png");
12155                    _this138.customChara.clip = "/common/vendors/mycharacters/".concat(mycharacter, "/myclip-").concat(mycharacter, ".png");
12156                    _this138.customChara.chara = "/common/vendors/mycharacters/".concat(mycharacter, "/favorite-").concat(mycharacter, ".png");
12157                    _this138.customChara.news = "/common/vendors/mycharacters/".concat(mycharacter, "/news-").concat(mycharacter, ".png");
12158                  }
12159                case 6:
12160                case "end":
12161                  return _context66.stop();
12162              }
12163            }, _callee66);
12164          }))();
12165        }
12166      });
12167    }
12168  }]);
12169  return appMypagePortal;
12170}();
12171var AppMypageCalendar = /*#__PURE__*/function () {
12172  function AppMypageCalendar() {
12173    _classCallCheck(this, AppMypageCalendar);
12174    this.target = 'app-mypage-calendar';
12175    this.$el = $("#".concat(this.target));
12176    if (this.$el.length > 0) this.init();
12177  }
12178  _createClass(AppMypageCalendar, [{
12179    key: "init",
12180    value: function init() {
12181      var todayDate = new Date();
12182      this.app = new Vue({
12183        el: this.$el[0],
12184        data: function data() {
12185          return {
12186            calendarInfo: null,
12187            absMonth: 0,
12188            eventData: null,
12189            birthCharaList: null,
12190            isSelectOpen: false,
12191            postFilter: 'original',
12192            monthTextList: [{
12193              full: "January",
12194              abbreviation: 'Jan.'
12195            }, {
12196              full: "February",
12197              abbreviation: 'Feb.'
12198            }, {
12199              full: "March",
12200              abbreviation: 'Mar.'
12201            }, {
12202              full: "April",
12203              abbreviation: 'Apr.'
12204            }, {
12205              full: "May",
12206              abbreviation: 'May'
12207            }, {
12208              full: "June",
12209              abbreviation: 'Jun.'
12210            }, {
12211              full: "July",
12212              abbreviation: 'Jul.'
12213            }, {
12214              full: "August",
12215              abbreviation: 'Aug.'
12216            }, {
12217              full: "September",
12218              abbreviation: 'Sep.'
12219            }, {
12220              full: "October",
12221              abbreviation: 'Oct.'
12222            }, {
12223              full: "November",
12224              abbreviation: 'Nov.'
12225            }, {
12226              full: "December",
12227              abbreviation: 'Dec.'
12228            }]
12229          };
12230        },
12231        created: function created() {
12232          var _this139 = this;
12233          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee67() {
12234            var initYear, initMonth;
12235            return _regeneratorRuntime().wrap(function _callee67$(_context67) {
12236              while (1) switch (_context67.prev = _context67.next) {
12237                case 0:
12238                  _context67.next = 2;
12239                  return getWPCalendarEventData();
12240                case 2:
12241                  _this139.eventData = _context67.sent;
12242                  _context67.next = 5;
12243                  return _getBirthCharaList();
12244                case 5:
12245                  _this139.birthCharaList = _context67.sent;
12246                  Object.keys(_this139.birthCharaList).forEach(function (key) {
12247                    // 誕生日順に並べる
12248                    if (_this139.birthCharaList[key]) {
12249                      var sorted = _this139.birthCharaList[key].sort(function (a, b) {
12250                        var dayA = Number(a.birthday.split('-')[1]);
12251                        var dayB = Number(b.birthday.split('-')[1]);
12252                        return dayA - dayB;
12253                      });
12254                      _this139.birthCharaList[key] = sorted;
12255                    }
12256                  });
12257                  initYear = todayDate.getFullYear();
12258                  initMonth = todayDate.getMonth() + 1;
12259                  _this139.calendarInfo = _this139.updateCalendar(initYear, initMonth);
12260                case 10:
12261                case "end":
12262                  return _context67.stop();
12263              }
12264            }, _callee67);
12265          }))();
12266        },
12267        methods: {
12268          prevMonth: function prevMonth() {
12269            var year = this.calendarInfo.year;
12270            var month = this.calendarInfo.month;
12271            if (this.calendarInfo.month <= 1) {
12272              year -= 1;
12273              month = 12;
12274            } else {
12275              month -= 1;
12276            }
12277            if (this.absMonth > -1) {
12278              this.absMonth -= 1;
12279              this.calendarInfo = _objectSpread({}, this.updateCalendar(year, month));
12280            }
12281          },
12282          nextMonth: function nextMonth() {
12283            var year = this.calendarInfo.year;
12284            var month = this.calendarInfo.month;
12285            if (this.calendarInfo.month >= 12) {
12286              year += 1;
12287              month = 1;
12288            } else {
12289              month += 1;
12290            }
12291            if (this.absMonth < 1) {
12292              this.absMonth += 1;
12293              this.calendarInfo = _objectSpread({}, this.updateCalendar(year, month));
12294            }
12295          },
12296          updateCalendar: function updateCalendar(year, month) {
12297            var _this$calendarInfo,
12298              _this140 = this,
12299              _this$eventData$calen;
12300            if ((_this$calendarInfo = this.calendarInfo) !== null && _this$calendarInfo !== void 0 && _this$calendarInfo.birthdayCharas) this.calendarInfo.birthdayCharas = null;
12301            var _month = "0".concat(month).slice(-2); // 2桁;
12302            var dayLength = new Date(year, month, 0).getDate(); // 1ヶ月の日数
12303            var startDay = new Date(year, month - 1, 1).getDay(); // 月初の曜日
12304            var list = this.generateCalendarDateList(year, month, dayLength, startDay);
12305            list = this.featchEventData(year, month, list);
12306            if (this.birthdaySlider) {
12307              this.birthdaySlider.destroy();
12308              this.birthdaySlider = null;
12309            }
12310            this.$nextTick(function () {
12311              setTimeout(function () {
12312                new InitHandler();
12313                _this140.birthdaySlider = new SliderCharacterlist2();
12314              }, 1500);
12315            });
12316            return {
12317              year: year,
12318              month: month,
12319              dayLength: dayLength,
12320              startDay: startDay,
12321              list: list,
12322              eventList: (_this$eventData$calen = this.eventData.calendars["".concat(year).concat(_month)]) === null || _this$eventData$calen === void 0 ? void 0 : _this$eventData$calen.schedules,
12323              birthdayCharas: this.birthCharaList[month] || null
12324            };
12325          },
12326          featchEventData: function featchEventData(year, month, list) {
12327            var _this$eventData$calen2, _this$birthCharaList;
12328            var _month = "0".concat(month).slice(-2);
12329            var key = "".concat(year).concat(_month);
12330            var eventList = (_this$eventData$calen2 = _objectSpread({}, this.eventData).calendars[key]) === null || _this$eventData$calen2 === void 0 ? void 0 : _this$eventData$calen2.schedules;
12331            var birthList = (_this$birthCharaList = this.birthCharaList) === null || _this$birthCharaList === void 0 ? void 0 : _this$birthCharaList[month];
12332
12333            // event
12334            list.forEach(function (dayInfo) {
12335              var _day = dayInfo === null || dayInfo === void 0 ? void 0 : dayInfo.day;
12336              if (_day) {
12337                var event = (eventList === null || eventList === void 0 ? void 0 : eventList[_day]) || null;
12338                if (event) dayInfo.event = event;
12339                // if(!event) return;
12340                if (event !== null && event !== void 0 && event.weekly_mailmag) {
12341                  dayInfo.isMail = true;
12342                }
12343                if (event !== null && event !== void 0 && event.ichigo_paper) {
12344                  dayInfo.isBerry = true;
12345                }
12346                if (event !== null && event !== void 0 && event.monthly_mailmag) {
12347                  dayInfo.isFillMail = true;
12348                }
12349                if ((event === null || event === void 0 ? void 0 : event.holiday) === true || (event === null || event === void 0 ? void 0 : event.holiday) === 'true') {
12350                  dayInfo.isHoliday = true;
12351                } else {
12352                  dayInfo.isHoliday = false;
12353                }
12354              }
12355            });
12356
12357            // birthday chara
12358            if (birthList && birthList.length > 0) {
12359              birthList.forEach(function (chara) {
12360                var birthday = chara.birthday.split('-')[1];
12361                list.forEach(function (dayInfo) {
12362                  var _day = dayInfo === null || dayInfo === void 0 ? void 0 : dayInfo.day;
12363                  if (_day && _day == birthday) {
12364                    dayInfo.isBirthday = true;
12365                  }
12366                });
12367              });
12368            }
12369            return list;
12370          },
12371          generateCalendarDateList: function generateCalendarDateList(year, month, dayLength, startDay) {
12372            var _dayObj = {
12373              year: year,
12374              month: month,
12375              day: null,
12376              info: null,
12377              isToday: false,
12378              isBirthday: false,
12379              isFillMail: false,
12380              isBerry: false,
12381              isMail: false,
12382              event: null
12383            };
12384            var _list = [];
12385            _list.push.apply(_list, _toConsumableArray(Array(startDay)));
12386            for (var i = 0; i < dayLength; i++) {
12387              var dayObj = _objectSpread({}, _dayObj); // 日付
12388              var day = i + 1;
12389              dayObj.day = day;
12390              if (month === todayDate.getMonth() + 1 && day === todayDate.getDate() && year === todayDate.getFullYear()) {
12391                dayObj.isToday = true;
12392              }
12393              _list.push(dayObj);
12394            }
12395            var lastBlank = 7 - _list.length % 7;
12396            if (_list.length % 7 > 0) {
12397              _list.push.apply(_list, _toConsumableArray(Array(lastBlank)));
12398            }
12399            return _list;
12400          },
12401          getDay: function getDay() {
12402            var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '2022-12-01';
12403            var _date = new Date(date);
12404            var labelList = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
12405            var day = _date.getDay();
12406            return labelList[day];
12407          },
12408          toggleSelect: function toggleSelect() {
12409            var el = this.$refs.selectList;
12410            if (this.isSelectOpen) {
12411              this.isSelectOpen = false;
12412              $(el).slideUp();
12413            } else {
12414              this.isSelectOpen = true;
12415              $(el).slideDown();
12416            }
12417          },
12418          reloadCurrentCalendar: function reloadCurrentCalendar() {
12419            var year = this.calendarInfo.year;
12420            var month = this.calendarInfo.month;
12421            // this.updateCalendar(year,month);
12422            this.calendarInfo = _objectSpread({}, this.updateCalendar(year, month));
12423          }
12424        },
12425        computed: {
12426          activeList: function activeList() {
12427            var trLength = this.calendarInfo.list.length / 7;
12428            var trList = [];
12429            var d = 0;
12430            for (var i = 1; i <= trLength; i++) {
12431              var _row = [];
12432              for (var j = 1; j <= 7; j++) {
12433                _row.push(this.calendarInfo.list[d]);
12434                d++;
12435              }
12436              trList.push(_row);
12437            }
12438            return trList || [];
12439          },
12440          nextMonthNum: function nextMonthNum() {
12441            return this.calendarInfo.month >= 12 ? 1 : this.calendarInfo.month + 1;
12442          },
12443          prevMonthNum: function prevMonthNum() {
12444            return this.calendarInfo.month <= 1 ? 12 : this.calendarInfo.month - 1;
12445          },
12446          isNextMonth: function isNextMonth() {
12447            return !(this.absMonth >= 1);
12448          },
12449          isPrevMonth: function isPrevMonth() {
12450            return !(this.absMonth <= -1);
12451          },
12452          activeFilterLabel: function activeFilterLabel() {
12453            var labelList = {
12454              original: 'サンリオオリジナルグッズ',
12455              lottery: '当りくじ',
12456              spots: 'スポット',
12457              campaign: 'キャンペーン'
12458            };
12459            return labelList[this.postFilter] || 'すべて';
12460          }
12461        },
12462        updated: function updated() {
12463          // タブ用
12464          this.$nextTick(function () {
12465            new AnchorLink();
12466            $(window).trigger('onVueContentUpdate');
12467          });
12468        }
12469      });
12470    }
12471  }]);
12472  return AppMypageCalendar;
12473}();
12474var InstagramModule = /*#__PURE__*/function () {
12475  function InstagramModule(el) {
12476    _classCallCheck(this, InstagramModule);
12477    this.target = 'js-instagrammodule';
12478    this.$els = $(".".concat(this.target));
12479    if (this.$els.length > 0) this.init();
12480  }
12481  _createClass(InstagramModule, [{
12482    key: "init",
12483    value: function init() {
12484      var _this141 = this;
12485      this.$els.each(function (i, el) {
12486        _this141.app(el);
12487      });
12488    }
12489  }, {
12490    key: "app",
12491    value: function app(el) {
12492      var accoundId = $(el).data('account');
12493      if (!accoundId) return;
12494      var app = new Vue({
12495        el: el,
12496        data: function data() {
12497          return {
12498            account: accoundId,
12499            list: [],
12500            rawData: null
12501          };
12502        },
12503        created: function created() {
12504          var _this142 = this;
12505          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee68() {
12506            var _this142$rawData, _this142$rawData$resu, _this142$rawData$resu2;
12507            return _regeneratorRuntime().wrap(function _callee68$(_context68) {
12508              while (1) switch (_context68.prev = _context68.next) {
12509                case 0:
12510                  _context68.next = 2;
12511                  return getInstagramData({
12512                    instagram_id: _this142.account
12513                  });
12514                case 2:
12515                  _this142.rawData = _context68.sent;
12516                  _this142.list = ((_this142$rawData = _this142.rawData) === null || _this142$rawData === void 0 ? void 0 : (_this142$rawData$resu = _this142$rawData.result) === null || _this142$rawData$resu === void 0 ? void 0 : (_this142$rawData$resu2 = _this142$rawData$resu.content) === null || _this142$rawData$resu2 === void 0 ? void 0 : _this142$rawData$resu2.instagram) || [];
12517                case 4:
12518                case "end":
12519                  return _context68.stop();
12520              }
12521            }, _callee68);
12522          }))();
12523        }
12524      });
12525    }
12526  }]);
12527  return InstagramModule;
12528}();
12529var TikTokModule = /*#__PURE__*/function () {
12530  function TikTokModule(el) {
12531    _classCallCheck(this, TikTokModule);
12532    this.target = 'js-tiktokmmodule';
12533    this.$els = $(".".concat(this.target));
12534    if (this.$els.length > 0) this.init();
12535  }
12536  _createClass(TikTokModule, [{
12537    key: "init",
12538    value: function init() {
12539      var _this143 = this;
12540      this.$els.each(function (i, el) {
12541        _this143.app(el);
12542      });
12543    }
12544  }, {
12545    key: "app",
12546    value: function app(el) {
12547      var accoundId = $(el).data('account');
12548      if (!accoundId) return;
12549      var app = new Vue({
12550        el: el,
12551        data: function data() {
12552          return {
12553            account: accoundId,
12554            list: [],
12555            rawData: null
12556          };
12557        },
12558        created: function created() {
12559          var _this144 = this;
12560          return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee69() {
12561            var _this144$rawData, _this144$rawData$resu, _this144$rawData$resu2;
12562            return _regeneratorRuntime().wrap(function _callee69$(_context69) {
12563              while (1) switch (_context69.prev = _context69.next) {
12564                case 0:
12565                  _context69.next = 2;
12566                  return getTikTokData({
12567                    tiktok_id: _this144.account
12568                  });
12569                case 2:
12570                  _this144.rawData = _context69.sent;
12571                  _this144.list = ((_this144$rawData = _this144.rawData) === null || _this144$rawData === void 0 ? void 0 : (_this144$rawData$resu = _this144$rawData.result) === null || _this144$rawData$resu === void 0 ? void 0 : (_this144$rawData$resu2 = _this144$rawData$resu.content) === null || _this144$rawData$resu2 === void 0 ? void 0 : _this144$rawData$resu2.tiktok) || [];
12572                case 4:
12573                case "end":
12574                  return _context69.stop();
12575              }
12576            }, _callee69);
12577          }))();
12578        }
12579      });
12580    }
12581  }]);
12582  return TikTokModule;
12583}();
12584var Langpanel = /*#__PURE__*/function () {
12585  function Langpanel() {
12586    _classCallCheck(this, Langpanel);
12587    this.target = '.js-lang-panel';
12588    this.$el = $(this.target);
12589    if (this.$el.length > 0) this.init();
12590  }
12591  _createClass(Langpanel, [{
12592    key: "init",
12593    value: function init() {
12594      var _this145 = this;
12595      $('.js-lang-trigger').on('click', function (e) {
12596        e.preventDefault();
12597        var isOpen = _this145.$el.hasClass('is-open');
12598        if (isOpen) {
12599          _this145.$el.removeClass('is-open');
12600          _this145.$el.slideUp();
12601        } else {
12602          _this145.$el.addClass('is-open');
12603          _this145.$el.slideDown();
12604        }
12605      });
12606    }
12607  }]);
12608  return Langpanel;
12609}();
12610var MobileMenuSearch = /*#__PURE__*/function () {
12611  function MobileMenuSearch() {
12612    _classCallCheck(this, MobileMenuSearch);
12613    this.trigger = document.querySelector('.js-mobileMenu-search-trigger');
12614    this.searchBtn = document.querySelector('.c-mobileMenu__searchIcon');
12615    this.mobileMenu = $('.js-header-mobilecontent');
12616    this.mobileMenuForm = this.mobileMenu.find('.js-header-search');
12617    this.isSearchOpen = false;
12618    this.selectOpen = false;
12619    this.setup();
12620  }
12621  _createClass(MobileMenuSearch, [{
12622    key: "setup",
12623    value: function setup() {
12624      if (this.trigger) {
12625        this.clickEvent();
12626        this.enterEvent();
12627        this.detailSearchForm();
12628      }
12629    }
12630  }, {
12631    key: "clickEvent",
12632    value: function clickEvent() {
12633      var _this146 = this;
12634      this.trigger.addEventListener('click', function (e) {
12635        e.preventDefault();
12636        _this146.isSearchOpen ? _this146.searchClose() : _this146.searchOpen();
12637      });
12638      this.searchBtn.addEventListener('click', function (e) {
12639        e.preventDefault();
12640        _this146.search();
12641      });
12642    }
12643  }, {
12644    key: "enterEvent",
12645    value: function enterEvent() {
12646      var _this147 = this;
12647      var form = document.querySelector('.js-search-form-top');
12648      form.addEventListener('submit', function (e) {
12649        e.preventDefault();
12650        _this147.search();
12651      });
12652    }
12653  }, {
12654    key: "searchOpen",
12655    value: function searchOpen() {
12656      this.isSearchOpen = true;
12657      $('#js-mobileMenu-search-sp').slideDown(500);
12658      $('.c-mobileMenu__searchDetail .c-icon').css('transform', 'rotate(0)');
12659    }
12660  }, {
12661    key: "searchClose",
12662    value: function searchClose() {
12663      this.isSearchOpen = false;
12664      $('#js-mobileMenu-search-sp').slideUp(500);
12665      $('.c-mobileMenu__searchDetail .c-icon').css('transform', 'rotate(62deg)');
12666    }
12667  }, {
12668    key: "search",
12669    value: function search() {
12670      var input = document.querySelector('.js-search-input');
12671      var kw_input = input.value;
12672      var values = {
12673        s_type: 'and',
12674        kw: kw_input || '',
12675        ie: 'u',
12676        temp: 'site',
12677        env: 'sanrio3'
12678      };
12679      var actionUrl = $('.js-search-form-top').data('action');
12680      var theURL = new URL(actionUrl);
12681      Object.keys(values).forEach(function (_key) {
12682        var key = _key;
12683        var value = values[key];
12684        theURL.searchParams.set(key, value);
12685      });
12686      $('.js-search-form').attr('action', theURL.href);
12687      $('.js-search-form').submit();
12688    }
12689  }, {
12690    key: "detailSearchForm",
12691    value: function detailSearchForm() {
12692      var _this148 = this;
12693      var toggle = this.mobileMenuForm.find('.c-searchForm__select');
12694      var searchBtn = this.mobileMenuForm.find('.js-search-btn');
12695      var clearBtn = this.mobileMenuForm.find('.js-search-clear');
12696      toggle.on('click', function (e) {
12697        e.preventDefault();
12698        _this148.toggleSelect();
12699      });
12700      searchBtn.on('click', function (e) {
12701        e.preventDefault();
12702        _this148.detailSearch();
12703      });
12704      clearBtn.on('click', function (e) {
12705        e.preventDefault();
12706        _this148.formClear();
12707      });
12708    }
12709  }, {
12710    key: "detailSearch",
12711    value: function detailSearch() {
12712      var input = this.mobileMenuForm.find('.c-searchForm__input input');
12713      var kw_input = input[0].value;
12714      var tags = this.mobileMenuForm.find('.c-searchForm__tag input');
12715      tags.each(function (index, tag) {
12716        if (tag.checked) kw_input += " ".concat(tag.value);
12717      });
12718      var actionUrl = this.mobileMenuForm.find('.js-search-form').data('action');
12719      var url = new URL(actionUrl);
12720      var selectValue = this.mobileMenuForm.find('.c-searchForm__select').text();
12721      var typeLabel = {
12722        and: 'すべて',
12723        or: 'いずれかを含む',
12724        natural: '自然文検索'
12725      };
12726      var s_type = 'and';
12727      for (var _i10 = 0, _Object$entries5 = Object.entries(typeLabel); _i10 < _Object$entries5.length; _i10++) {
12728        var _Object$entries5$_i = _slicedToArray(_Object$entries5[_i10], 2),
12729          key = _Object$entries5$_i[0],
12730          label = _Object$entries5$_i[1];
12731        if (selectValue.includes(label)) {
12732          s_type = key;
12733          break;
12734        }
12735      }
12736      url.searchParams.set('kw', kw_input);
12737      url.searchParams.set('s_type', s_type || '');
12738      url.searchParams.set('ie', 'u');
12739      url.searchParams.set('temp', 'site');
12740      url.searchParams.set('env', 'sanrio3');
12741      window.location.href = url.href;
12742    }
12743  }, {
12744    key: "formClear",
12745    value: function formClear() {
12746      this.mobileMenuForm.find('.c-searchForm__select').text('すべて');
12747      var input = this.mobileMenuForm.find('.c-searchForm__input input');
12748      input[0].value = '';
12749      var tags = this.mobileMenuForm.find('.c-searchForm__tag input');
12750      tags.each(function (index, tag) {
12751        tag.checked = false;
12752      });
12753    }
12754  }, {
12755    key: "toggleSelect",
12756    value: function toggleSelect() {
12757      this.selectOpen ? this.detailCloseSelect() : this.detailOpenSelect();
12758    }
12759  }, {
12760    key: "detailOpenSelect",
12761    value: function detailOpenSelect() {
12762      var _this149 = this;
12763      var el = this.mobileMenuForm.find('.c-customSelect');
12764      var trigger = this.mobileMenuForm.find('.c-searchForm__select');
12765      var items = this.mobileMenuForm.find('.c-customSelect__item');
12766      this.selectOpen = true;
12767      $(trigger).on('blur.searchBlur', function (e) {
12768        _this149.detailCloseSelect();
12769        $(el).off('blur.searchBlur');
12770      });
12771      items.each(function (index, item) {
12772        $(item).on('click', function (e) {
12773          e.preventDefault();
12774          trigger.text($(item).text());
12775        });
12776      });
12777      $(el).slideDown();
12778    }
12779  }, {
12780    key: "detailCloseSelect",
12781    value: function detailCloseSelect() {
12782      var el = this.mobileMenuForm.find('.c-customSelect');
12783      var trigger = this.mobileMenuForm.find('.c-searchForm__select');
12784      this.selectOpen = false;
12785      $(trigger).off('blur.searchBlur');
12786      $(el).slideUp();
12787    }
12788  }]);
12789  return MobileMenuSearch;
12790}();
12791var LoginTab = /*#__PURE__*/function () {
12792  function LoginTab() {
12793    _classCallCheck(this, LoginTab);
12794    this.el = document.getElementById('app-mypage-login');
12795    if (this.el) this.init();
12796  }
12797  _createClass(LoginTab, [{
12798    key: "init",
12799    value: function init() {
12800      var _this150 = this;
12801      this.tabs = document.querySelectorAll('[data-tab="trigger"]');
12802      this.contents = document.querySelectorAll('[data-tab="content"]');
12803      this.tabs.forEach(function (tab, index) {
12804        tab.addEventListener('click', function (e) {
12805          _this150.clickEvent(e.target, index);
12806        });
12807      });
12808      var params = new URLSearchParams(window.location.search);
12809      var tabQuery = params.get('tab');
12810      if (tabQuery === 'feature') {
12811        this.activateTab(1);
12812      }
12813    }
12814  }, {
12815    key: "clickEvent",
12816    value: function clickEvent(_el, index) {
12817      this.activateTab(index);
12818      var params = new URLSearchParams(window.location.search);
12819      var queryName = '';
12820      if (index === 1) {
12821        queryName = 'feature';
12822      }
12823      params.set('tab', queryName);
12824      window.history.replaceState({}, '', "".concat(window.location.pathname, "?").concat(params));
12825    }
12826  }, {
12827    key: "activateTab",
12828    value: function activateTab(index) {
12829      this.tabs.forEach(function (tab) {
12830        tab.classList.remove('is-active');
12831      });
12832      this.contents.forEach(function (content) {
12833        content.classList.remove('is-active');
12834      });
12835      this.tabs[index].classList.add('is-active');
12836      this.contents[index].classList.add('is-active');
12837      if (index === 1) {
12838        this.contents[2].classList.add('is-active');
12839      } else {
12840        this.contents[2].classList.remove('is-active');
12841      }
12842    }
12843  }]);
12844  return LoginTab;
12845}();
12846var WPULike = /*#__PURE__*/function () {
12847  function WPULike() {
12848    var _this$el2, _this$el2$dataset;
12849    _classCallCheck(this, WPULike);
12850    this.target = 'js-wp-ulike';
12851    this.el = document.getElementById(this.target);
12852    this.apiUrl = JSON_BASE_URL + 'system/api/wpulike/';
12853    if (!this.el) return;
12854    this.postId = ((_this$el2 = this.el) === null || _this$el2 === void 0 ? void 0 : (_this$el2$dataset = _this$el2.dataset) === null || _this$el2$dataset === void 0 ? void 0 : _this$el2$dataset.postId) || null;
12855    if (this.postId) this.init();
12856  }
12857  _createClass(WPULike, [{
12858    key: "init",
12859    value: function () {
12860      var _init11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee70() {
12861        var _this151 = this;
12862        return _regeneratorRuntime().wrap(function _callee70$(_context70) {
12863          while (1) switch (_context70.prev = _context70.next) {
12864            case 0:
12865              this.heartBtn = this.el.querySelector('.js-heart-btn');
12866              this.bikkuriBtn = this.el.querySelector('.js-bikkuri-btn');
12867              this.heartCount = this.el.querySelector('.js-heart-count');
12868              this.bikkuriCount = this.el.querySelector('.js-bikkuri-count');
12869
12870              // 先にリスナーを付けてからステータスを取得する。
12871              // 逆順だと初回取得の失敗(500等)でボタンが一切反応しなくなる。
12872              this.heartBtn.addEventListener('click', function () {
12873                _this151.vote('like');
12874              });
12875              this.bikkuriBtn.addEventListener('click', function () {
12876                _this151.vote('dislike');
12877              });
12878              _context70.next = 8;
12879              return this.syncStatus();
12880            case 8:
12881            case "end":
12882              return _context70.stop();
12883          }
12884        }, _callee70, this);
12885      }));
12886      function init() {
12887        return _init11.apply(this, arguments);
12888      }
12889      return init;
12890    }()
12891  }, {
12892    key: "syncStatus",
12893    value: function () {
12894      var _syncStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71() {
12895        var _fetch;
12896        return _regeneratorRuntime().wrap(function _callee71$(_context71) {
12897          while (1) switch (_context71.prev = _context71.next) {
12898            case 0:
12899              _context71.prev = 0;
12900              _context71.next = 3;
12901              return this.fetchApi({
12902                type: 'status',
12903                post_id: this.postId
12904              });
12905            case 3:
12906              _fetch = _context71.sent;
12907              this.displayResult(_fetch);
12908              _context71.next = 10;
12909              break;
12910            case 7:
12911              _context71.prev = 7;
12912              _context71.t0 = _context71["catch"](0);
12913              console.error("Error during status fetch: ".concat(_context71.t0.message));
12914            case 10:
12915            case "end":
12916              return _context71.stop();
12917          }
12918        }, _callee71, this, [[0, 7]]);
12919      }));
12920      function syncStatus() {
12921        return _syncStatus.apply(this, arguments);
12922      }
12923      return syncStatus;
12924    }()
12925  }, {
12926    key: "fetchApi",
12927    value: function () {
12928      var _fetchApi = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee72(params) {
12929        var method,
12930          query,
12931          response,
12932          _args72 = arguments;
12933        return _regeneratorRuntime().wrap(function _callee72$(_context72) {
12934          while (1) switch (_context72.prev = _context72.next) {
12935            case 0:
12936              method = _args72.length > 1 && _args72[1] !== undefined ? _args72[1] : 'GET';
12937              query = new URLSearchParams(params); // 投票は POST。ブラウザは同一オリジンでも POST には必ず Origin を付けるので、
12938              // サーバー側の許可オリジン判定が CSRF 対策として機能する。
12939              if (!(method === 'POST')) {
12940                _context72.next = 8;
12941                break;
12942              }
12943              _context72.next = 5;
12944              return fetch(this.apiUrl, {
12945                method: 'POST',
12946                body: query
12947              });
12948            case 5:
12949              _context72.t0 = _context72.sent;
12950              _context72.next = 11;
12951              break;
12952            case 8:
12953              _context72.next = 10;
12954              return fetch("".concat(this.apiUrl, "?").concat(query.toString()));
12955            case 10:
12956              _context72.t0 = _context72.sent;
12957            case 11:
12958              response = _context72.t0;
12959              if (response.ok) {
12960                _context72.next = 14;
12961                break;
12962              }
12963              throw new Error("HTTP Error: ".concat(response.status));
12964            case 14:
12965              return _context72.abrupt("return", response.json());
12966            case 15:
12967            case "end":
12968              return _context72.stop();
12969          }
12970        }, _callee72, this);
12971      }));
12972      function fetchApi(_x21) {
12973        return _fetchApi.apply(this, arguments);
12974      }
12975      return fetchApi;
12976    }()
12977  }, {
12978    key: "setUpState",
12979    value: function setUpState(state) {
12980      this.heartBtn.classList.remove('wp_ulike_btn_is_active');
12981      this.bikkuriBtn.classList.remove('wp_ulike_btn_is_active');
12982      switch (state) {
12983        case 'like':
12984          this.heartBtn.classList.add('wp_ulike_btn_is_active');
12985          break;
12986        case 'dislike':
12987          this.bikkuriBtn.classList.add('wp_ulike_btn_is_active');
12988          break;
12989        default:
12990          break;
12991      }
12992    }
12993  }, {
12994    key: "setUpCount",
12995    value: function setUpCount(voteInfo) {
12996      if (!voteInfo) return;
12997      this.heartCount.textContent = voteInfo.like_amount || 0;
12998      this.bikkuriCount.textContent = voteInfo.dislike_amount || 0;
12999    }
13000  }, {
13001    key: "vote",
13002    value: function () {
13003      var _vote = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee73(status) {
13004        var _fetch2;
13005        return _regeneratorRuntime().wrap(function _callee73$(_context73) {
13006          while (1) switch (_context73.prev = _context73.next) {
13007            case 0:
13008              _context73.prev = 0;
13009              _context73.next = 3;
13010              return this.fetchApi({
13011                type: 'post',
13012                post_id: this.postId,
13013                status: status
13014              }, 'POST');
13015            case 3:
13016              _fetch2 = _context73.sent;
13017              this.displayResult(_fetch2);
13018              this.dataLayerPush(_fetch2, status);
13019              _context73.next = 13;
13020              break;
13021            case 8:
13022              _context73.prev = 8;
13023              _context73.t0 = _context73["catch"](0);
13024              // 429(連打制限)等で投票が受け付けられなかった場合は、
13025              // 表示をサーバー側の状態に合わせ直す。
13026              console.error("Error during vote: ".concat(_context73.t0.message));
13027              _context73.next = 13;
13028              return this.syncStatus();
13029            case 13:
13030            case "end":
13031              return _context73.stop();
13032          }
13033        }, _callee73, this, [[0, 8]]);
13034      }));
13035      function vote(_x22) {
13036        return _vote.apply(this, arguments);
13037      }
13038      return vote;
13039    }()
13040  }, {
13041    key: "displayResult",
13042    value: function displayResult(fetch) {
13043      var data = fetch.data || {};
13044      this.setUpState(data.user_status);
13045      this.setUpCount(data.vote_info);
13046    }
13047  }, {
13048    key: "dataLayerPush",
13049    value: function dataLayerPush(fetch, target) {
13050      var _fetch$data;
13051      var status = ((_fetch$data = fetch.data) === null || _fetch$data === void 0 ? void 0 : _fetch$data.user_status) || '';
13052      var isHeart = status === 'like';
13053      var isBikkuri = status === 'dislike';
13054      var heartId = isHeart ? 'J5' : 'J6';
13055      var bikkuriId = isBikkuri ? 'J7' : 'J8';
13056      var heartLabel = isHeart ? 'ハートON' : 'ハートOFF';
13057      var bikkuriLabel = isBikkuri ? 'びっくりON' : 'びっくりOFF';
13058      if (target === 'like') {
13059        console.log(heartId, heartLabel);
13060        dataLayer.push({
13061          event: 'measures_check',
13062          ev_action: 'click',
13063          ev_label: heartLabel,
13064          measures_id: heartId
13065        });
13066      } else if (target === 'dislike') {
13067        console.log(bikkuriId, bikkuriLabel);
13068        dataLayer.push({
13069          event: 'measures_check',
13070          ev_action: 'click',
13071          ev_label: bikkuriLabel,
13072          measures_id: bikkuriId
13073        });
13074      }
13075    }
13076  }]);
13077  return WPULike;
13078}();
13079var ListGoodsRanking = /*#__PURE__*/function () {
13080  function ListGoodsRanking() {
13081    _classCallCheck(this, ListGoodsRanking);
13082    this.target = 'c-shopRankingBox';
13083    this.el = document.getElementById(this.target);
13084    this.$el = $(this.el);
13085    this.charaID = $(this.el).data('charaid');
13086    this.application = null;
13087    if (this.el) this.init();
13088  }
13089  _createClass(ListGoodsRanking, [{
13090    key: "init",
13091    value: function () {
13092      var _init12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee74() {
13093        var res, list;
13094        return _regeneratorRuntime().wrap(function _callee74$(_context74) {
13095          while (1) switch (_context74.prev = _context74.next) {
13096            case 0:
13097              res = null;
13098              _context74.prev = 1;
13099              if (!this.charaID) {
13100                _context74.next = 8;
13101                break;
13102              }
13103              _context74.next = 5;
13104              return getGoodsCharacter(this.charaID);
13105            case 5:
13106              _context74.t0 = _context74.sent;
13107              _context74.next = 11;
13108              break;
13109            case 8:
13110              _context74.next = 10;
13111              return getGoodsRanking();
13112            case 10:
13113              _context74.t0 = _context74.sent;
13114            case 11:
13115              res = _context74.t0;
13116              _context74.next = 19;
13117              break;
13118            case 14:
13119              _context74.prev = 14;
13120              _context74.t1 = _context74["catch"](1);
13121              console.error('goods json error', _context74.t1);
13122              this.removeSection();
13123              return _context74.abrupt("return");
13124            case 19:
13125              list = res ? _toConsumableArray(res) : [];
13126              this.removeSection();
13127              this.app(list);
13128            case 22:
13129            case "end":
13130              return _context74.stop();
13131          }
13132        }, _callee74, this, [[1, 14]]);
13133      }));
13134      function init() {
13135        return _init12.apply(this, arguments);
13136      }
13137      return init;
13138    }()
13139  }, {
13140    key: "removeSection",
13141    value: function removeSection() {
13142      // data-check-wrapper があるときは記事があるかを判定してない場合はセクションごと消す
13143      var hideCheckTarget = this.$el.data('check-wrapper');
13144      if (hideCheckTarget) {
13145        var $checkEl = $("[data-check-trigger=\"".concat(hideCheckTarget, "\"]"));
13146        var $sectionEl = $("[data-wrapper-el=\"".concat(hideCheckTarget, "\"]"));
13147        if ($checkEl.length === 0 && $sectionEl.length >= 0) {
13148          $sectionEl.remove();
13149        }
13150      }
13151    }
13152  }, {
13153    key: "app",
13154    value: function app(_data9) {
13155      if (!_data9) {
13156        return {
13157          ranking: ''
13158        };
13159      }
13160      var _this = this;
13161      if (this.charaID) {
13162        _data9 = Util.shuffleArray(_data9, 5);
13163      }
13164      this.application = new Vue({
13165        el: this.el,
13166        data: function data() {
13167          var _data10;
13168          var LIST_MAX = Math.min(_data9.length, 5);
13169          var listData = ((_data10 = _data9) === null || _data10 === void 0 ? void 0 : _data10.length) > 0 && _data9.filter(function (d, i) {
13170            return i < LIST_MAX;
13171          }) || _data9;
13172          var TITLE_MAX_PC = 30;
13173          var TITLE_MAX_SP = 40;
13174          listData.forEach(function (item) {
13175            var rawTitle = "".concat(item.chara_name, " ").concat(item.item_name);
13176            var price = item.price ? Number(item.price) : 0;
13177            var tax = item.tax ? Number(item.tax) : 0;
13178            var priceWithTax = price + tax;
13179            // comma per 3 digits
13180            item.priceWithTax = priceWithTax.toLocaleString();
13181
13182            // キャラネームが未設定の時はアイテムの名前だけ
13183            if (!item.chara_name || item.chara_name === '-') {
13184              rawTitle = "".concat(item.item_name);
13185            }
13186            item.title_pc = rawTitle.substring(0, TITLE_MAX_PC);
13187            if (rawTitle.length > TITLE_MAX_PC) {
13188              item.title_pc += '...';
13189            }
13190            item.title_sp = rawTitle.substring(0, TITLE_MAX_SP);
13191            if (rawTitle.length > TITLE_MAX_SP) {
13192              item.title_sp += '...';
13193            }
13194          });
13195          return {
13196            ranking: listData
13197          };
13198        },
13199        methods: {},
13200        mounted: function mounted() {
13201          this.$nextTick(function () {
13202            gsap.set(_toConsumableArray($(".".concat(_this.target))), {
13203              opacity: 1
13204              // duration: 0.3,
13205            });
13206          });
13207        }
13208      });
13209    }
13210  }]);
13211  return ListGoodsRanking;
13212}();
13213var ListCharacterGoods = /*#__PURE__*/function () {
13214  function ListCharacterGoods() {
13215    var _this$el3, _this$el3$dataset;
13216    _classCallCheck(this, ListCharacterGoods);
13217    this.target = 'c-characterGoodsBox';
13218    this.el = document.getElementById(this.target);
13219    this.application = null;
13220    if (!this.el) return;
13221    this.charaId = ((_this$el3 = this.el) === null || _this$el3 === void 0 ? void 0 : (_this$el3$dataset = _this$el3.dataset) === null || _this$el3$dataset === void 0 ? void 0 : _this$el3$dataset.charaId) || null;
13222    if (this.charaId) this.init();
13223  }
13224  _createClass(ListCharacterGoods, [{
13225    key: "init",
13226    value: function () {
13227      var _init13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee75() {
13228        var fetch, data;
13229        return _regeneratorRuntime().wrap(function _callee75$(_context75) {
13230          while (1) switch (_context75.prev = _context75.next) {
13231            case 0:
13232              _context75.next = 2;
13233              return getGoodsCharacter({
13234                chara_id: this.charaId
13235              });
13236            case 2:
13237              fetch = _context75.sent;
13238              data = fetch.goods || [];
13239              this.app(data);
13240            case 5:
13241            case "end":
13242              return _context75.stop();
13243          }
13244        }, _callee75, this);
13245      }));
13246      function init() {
13247        return _init13.apply(this, arguments);
13248      }
13249      return init;
13250    }()
13251  }, {
13252    key: "app",
13253    value: function app(_data11) {
13254      this.application = new Vue({
13255        el: this.el,
13256        data: function data() {
13257          var LIST_MAX = Math.min(_data11.length, 5);
13258          var listData = (_data11 === null || _data11 === void 0 ? void 0 : _data11.length) > 0 && _data11.filter(function (d, i) {
13259            return i <= LIST_MAX;
13260          }) || _data11;
13261          return {
13262            items: listData
13263          };
13264        },
13265        methods: {}
13266      });
13267    }
13268  }]);
13269  return ListCharacterGoods;
13270}();
13271var StoresListPage = /*#__PURE__*/function () {
13272  function StoresListPage() {
13273    _classCallCheck(this, StoresListPage);
13274    var shopListData = [];
13275    if (window.shopList) {
13276      shopListData = window.shopList;
13277    }
13278    var $el = $('#app-storeList');
13279    if ($el.length) {
13280      this.app($el[0], shopListData);
13281    }
13282  }
13283  _createClass(StoresListPage, [{
13284    key: "app",
13285    value: function app(el, shopList) {
13286      var app = new Vue({
13287        el: el,
13288        data: {
13289          shopList: _toConsumableArray(shopList),
13290          currentPrefect: "",
13291          currentCity: "",
13292          activeList: [],
13293          modalSelectState: {
13294            selectPrefect: false
13295          }
13296        },
13297        methods: {
13298          changeList: function changeList() {
13299            var _this152 = this;
13300            var isSearchCity = this.currentCity ? true : false;
13301            var list = this.shopList.filter(function (item) {
13302              var _city = item.city;
13303              var _prefect = item.prefect;
13304              if (isSearchCity) {
13305                return _this152.currentPrefect === _prefect && _this152.currentCity === _city;
13306              } else {
13307                return _this152.currentPrefect === _prefect;
13308              }
13309            });
13310            this.activeList = [];
13311            this.activeList = _toConsumableArray(list);
13312          },
13313          toggleModalSelect: function toggleModalSelect(target, event) {
13314            var _this153 = this;
13315            var _target = target;
13316            var currentTarget = event === null || event === void 0 ? void 0 : event.currentTarget;
13317            // console.log(currentTarget);
13318            // if(isMobile()) _target += 'Sp';
13319            // console.log(this.$refs,_target)
13320            var el = this.$refs[_target];
13321            var state = this.modalSelectState[target];
13322            // console.log(_target,el);
13323            if (state) {
13324              this.modalSelectState[target] = false;
13325              $(el).slideUp();
13326              if (currentTarget) {
13327                $(currentTarget).off('blur.customSelect');
13328              }
13329            } else {
13330              this.modalSelectState[target] = true;
13331              $(el).slideDown();
13332              if (currentTarget) {
13333                $(currentTarget).on('blur.customSelect', function () {
13334                  setTimeout(function () {
13335                    _this153.modalSelectState[target] = false;
13336                    $(el).slideUp();
13337                    $(currentTarget).off('blur.customSelect');
13338                  }, 100);
13339                });
13340                currentTarget.focus();
13341              }
13342            }
13343          },
13344          onChangePrefect: function onChangePrefect() {
13345            this.currentCity = "";
13346          }
13347        }
13348      });
13349    }
13350  }]);
13351  return StoresListPage;
13352}();
13353var RemoveHoverStyle = /*#__PURE__*/function () {
13354  function RemoveHoverStyle() {
13355    _classCallCheck(this, RemoveHoverStyle);
13356    if (CFL.UA.isTablet()) {
13357      this.init();
13358    }
13359  }
13360  _createClass(RemoveHoverStyle, [{
13361    key: "init",
13362    value: function init() {
13363      var touch = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
13364      if (touch) {
13365        try {
13366          for (var si in document.styleSheets) {
13367            var styleSheet = document.styleSheets[si];
13368            if (!styleSheet.rules) continue;
13369            this.checkAndRemove(styleSheet.rules, styleSheet);
13370          }
13371        } catch (ex) {}
13372      }
13373    }
13374  }, {
13375    key: "checkAndRemove",
13376    value: function checkAndRemove(rules, styleSheet) {
13377      for (var ri = rules.length - 1; ri >= 0; ri--) {
13378        var _rule = rules[ri];
13379        switch (_rule.type) {
13380          case 1:
13381            if (_rule.selectorText.match(':hover')) {
13382              styleSheet.deleteRule(ri);
13383            }
13384            break;
13385          case 4:
13386            this.checkAndRemove(_rule.cssRules, _rule);
13387            break;
13388          default:
13389            break;
13390        }
13391      }
13392    }
13393  }]);
13394  return RemoveHoverStyle;
13395}();
13396var SpecialMenu = /*#__PURE__*/function () {
13397  function SpecialMenu() {
13398    _classCallCheck(this, SpecialMenu);
13399    this.el = document.getElementById('js-specialMenu');
13400    if (this.el) this.init();
13401  }
13402  _createClass(SpecialMenu, [{
13403    key: "init",
13404    value: function init() {
13405      var _this154 = this;
13406      var mql = window.matchMedia('(min-width: 769px)');
13407      var scrollLock = false;
13408      var menuOpenBtn = document.querySelector('.p-specialMenu__open');
13409      var menuCloseBtn = document.querySelector('.p-specialMenu__close');
13410      var menuBody = document.querySelector('.p-specialMenu__body');
13411      menuOpenBtn.addEventListener('click', function () {
13412        _this154.el.setAttribute('aria-expanded', 'true');
13413        menuBody.removeAttribute('aria-hidden');
13414        if (!mql.matches) {
13415          Util.stopScroll();
13416          scrollLock = true;
13417        }
13418      });
13419      menuCloseBtn.addEventListener('click', function () {
13420        _this154.el.setAttribute('aria-expanded', 'false');
13421        menuBody.setAttribute('aria-hidden', 'true');
13422        if (scrollLock === true) {
13423          Util.startScroll();
13424          scrollLock = false;
13425        }
13426      });
13427      var menuLinks = document.querySelectorAll('.p-specialMenu__body a');
13428      menuLinks.forEach(function (el) {
13429        el.addEventListener('click', function () {
13430          _this154.el.setAttribute('aria-expanded', 'false');
13431          menuBody.setAttribute('aria-hidden', 'true');
13432          if (scrollLock === true) {
13433            Util.startScroll();
13434            scrollLock = false;
13435          }
13436        });
13437      });
13438      if (mql.matches) {
13439        var target = document.getElementById('js-specialMenu');
13440        var option = {
13441          root: null,
13442          rootMargin: "-94px 0px 0px",
13443          threshold: 0
13444        };
13445        var observer = new IntersectionObserver(function (entries) {
13446          entries.forEach(function (entry) {
13447            if (entry.isIntersecting) {
13448              target.classList.remove('is-active');
13449            } else {
13450              target.classList.add('is-active');
13451            }
13452          });
13453        }, option);
13454        observer.observe(target);
13455      }
13456    }
13457  }]);
13458  return SpecialMenu;
13459}();
13460var SpecialAutoSlider = /*#__PURE__*/function () {
13461  function SpecialAutoSlider() {
13462    _classCallCheck(this, SpecialAutoSlider);
13463    this.els = document.querySelectorAll('.p-specialAutoSlider');
13464    // this.isPlaing = true;
13465    if (this.els.length) this.init();
13466  }
13467  _createClass(SpecialAutoSlider, [{
13468    key: "init",
13469    value: function init() {
13470      var _this155 = this;
13471      this.els.forEach(function (el) {
13472        var wrapper = el.querySelector('.p-specialAutoSlider__wrapper');
13473        var content = el.querySelector('.p-specialAutoSlider__content');
13474        var slides = el.querySelectorAll('.p-specialAutoSlider__slide');
13475        var slideCount = slides.length;
13476        var stopButton = el.querySelector('.p-specialAutoSlider__playBtn');
13477        _this155.speedType = el.dataset.speed;
13478        _this155.isSameImageSize = el.dataset.sameIamgeSize === 'true';
13479        _this155.setupSlides(slides);
13480        if (slideCount > 2) {
13481          _this155.updateWrapperWidth(content, wrapper);
13482          _this155.ensureLoopContent(content, wrapper);
13483          wrapper.style.animationPlayState = 'running';
13484        } else {
13485          wrapper.style.justifyContent = 'center';
13486          stopButton.style.display = 'none';
13487        }
13488        window.addEventListener('resize', function () {
13489          _this155.updateWrapperWidth(content, wrapper);
13490          _this155.removeClones(wrapper);
13491          _this155.ensureLoopContent(content, wrapper);
13492        });
13493        stopButton.addEventListener('click', function (e) {
13494          e.preventDefault();
13495          _this155.toggleAnimation(stopButton, wrapper);
13496        });
13497        _this155.hoverEvent(slides, wrapper, stopButton);
13498      });
13499    }
13500  }, {
13501    key: "setupSlides",
13502    value: function setupSlides(slides) {
13503      var _this156 = this;
13504      var maxImageHeight = null;
13505      slides.forEach(function (slide) {
13506        var image = slide.querySelector('img');
13507        var imageHeight = image.naturalHeight / 2;
13508        if (imageHeight > maxImageHeight) {
13509          maxImageHeight = imageHeight;
13510        }
13511      });
13512
13513      // 画像の高さのMAXは600px
13514      if (maxImageHeight > 600) {
13515        maxImageHeight = 600;
13516      }
13517      slides.forEach(function (slide) {
13518        _this156.setupSlide(slide, maxImageHeight);
13519      });
13520    }
13521  }, {
13522    key: "setupSlide",
13523    value: function setupSlide(slide, maxHeight) {
13524      var image = slide.querySelector('img');
13525      var showSlide = function showSlide() {
13526        var imageWidth = image.naturalWidth;
13527        var imageHeight = image.naturalHeight;
13528        // Mobileの場合PCの半分の高さにする
13529        maxHeight = isMobile() ? maxHeight / 2 : maxHeight;
13530        if (imageWidth > 0 && imageHeight > 0) {
13531          slide.style.width = "".concat(maxHeight / (imageHeight / imageWidth), "px");
13532          slide.style.height = "".concat(maxHeight, "px");
13533          slide.style.visibility = 'visible';
13534        }
13535      };
13536      if (image.complete) {
13537        showSlide();
13538      }
13539      image.onload = showSlide;
13540    }
13541  }, {
13542    key: "updateWrapperWidth",
13543    value: function updateWrapperWidth(content, wrap) {
13544      var contentWidth = content.getBoundingClientRect().width;
13545      var gap = 30;
13546      var wrapWidth = isMobile() && !this.isSameImageSize ? (contentWidth + gap) * 4 : contentWidth + gap;
13547      wrap.style.width = "".concat(wrapWidth, "px");
13548      var animDuration = this.calculateSpeed(wrapWidth);
13549      wrap.style.animationDuration = "".concat(animDuration, "s");
13550    }
13551  }, {
13552    key: "ensureLoopContent",
13553    value: function ensureLoopContent(content, wrap) {
13554      var innerWidth = window.innerWidth;
13555      var contentWidth = content.getBoundingClientRect().width;
13556      var clone = content.cloneNode(true);
13557      wrap.appendChild(clone);
13558      if (contentWidth < innerWidth) {
13559        var numClones = Math.ceil(innerWidth / contentWidth) - 1;
13560        for (var i = 0; i < numClones; i++) {
13561          var _clone = content.cloneNode(true);
13562          wrap.appendChild(_clone);
13563        }
13564      }
13565    }
13566  }, {
13567    key: "removeClones",
13568    value: function removeClones(wrap) {
13569      var clones = wrap.querySelectorAll('.p-specialAutoSlider__content');
13570      clones.forEach(function (clone, index) {
13571        index > 0 ? wrap.removeChild(clone) : '';
13572      });
13573    }
13574  }, {
13575    key: "calculateSpeed",
13576    value: function calculateSpeed(wrapWidth) {
13577      var speed = isMobile() ? 30 : 60;
13578      var calcuSpeed = wrapWidth / speed;
13579      switch (this.speedType) {
13580        case 'slow':
13581          return calcuSpeed + calcuSpeed * 0.3;
13582        case 'normal':
13583          return calcuSpeed;
13584        case 'fast':
13585          return calcuSpeed - calcuSpeed * 0.2;
13586        default:
13587          return calcuSpeed;
13588      }
13589    }
13590  }, {
13591    key: "toggleAnimation",
13592    value: function toggleAnimation(button, wrap) {
13593      var hasActiveClass = button.classList.contains('js-active');
13594      if (hasActiveClass) {
13595        wrap.style.animationPlayState = 'running';
13596        button.classList.remove('js-active');
13597      } else {
13598        wrap.style.animationPlayState = 'paused';
13599        button.classList.add('js-active');
13600      }
13601    }
13602  }, {
13603    key: "hoverEvent",
13604    value: function hoverEvent(slides, wrap, button) {
13605      if (!isMobile()) return;
13606      slides.forEach(function (slide) {
13607        slide.addEventListener('mouseenter', function () {
13608          if (!slide.querySelector('[data-modal]')) return;
13609          var hasActiveClass = button.classList.contains('js-active');
13610          !hasActiveClass ? wrap.style.animationPlayState = 'paused' : '';
13611        });
13612        slide.addEventListener('mouseleave', function () {
13613          var hasActiveClass = button.classList.contains('js-active');
13614          !hasActiveClass ? wrap.style.animationPlayState = 'running' : '';
13615        });
13616      });
13617    }
13618  }]);
13619  return SpecialAutoSlider;
13620}();
13621var SliderSpecialModal = /*#__PURE__*/function () {
13622  function SliderSpecialModal() {
13623    _classCallCheck(this, SliderSpecialModal);
13624    this.el = document.querySelectorAll('.p-specialAutoSlider');
13625    if (this.el !== 0) this.init();
13626  }
13627  _createClass(SliderSpecialModal, [{
13628    key: "init",
13629    value: function init() {
13630      this.el.forEach(function (element) {
13631        var modalLinks = element.querySelectorAll('[data-modal]');
13632        if (modalLinks.length !== 0) {
13633          var dataModal = modalLinks[0].dataset.modal;
13634          var modalWrapper = document.getElementById(dataModal);
13635          var sliderEl = $(modalWrapper).find('.swiper')[0];
13636          var prevBtn = $(modalWrapper).find('.js-modal-slider-prev')[0];
13637          var nextBtn = $(modalWrapper).find('.js-modal-slider-next')[0];
13638          var slider = new Swiper(sliderEl, {
13639            slidesPerView: 1,
13640            navigation: {
13641              prevEl: prevBtn,
13642              nextEl: nextBtn
13643            }
13644          });
13645          $('.p-specialAutoSlider__wrapper').on('mousedown', '[data-modal]', function (e) {
13646            e.preventDefault();
13647            var _element = e.currentTarget;
13648            var elementList = document.querySelectorAll("[data-modal=\"".concat(dataModal, "\"]"));
13649            var contentCount = element.querySelectorAll('.p-specialAutoSlider__content').length;
13650            var index = Array.prototype.indexOf.call(elementList, _element);
13651            index %= elementList.length / contentCount;
13652            slider.slideTo(index, 0);
13653          });
13654        }
13655      });
13656    }
13657  }]);
13658  return SliderSpecialModal;
13659}();
13660var SliderSpecialGallery = /*#__PURE__*/function () {
13661  function SliderSpecialGallery() {
13662    _classCallCheck(this, SliderSpecialGallery);
13663    this.el = document.querySelectorAll('.p-specialGallery__slider');
13664    if (this.el !== 0) this.init();
13665  }
13666  _createClass(SliderSpecialGallery, [{
13667    key: "init",
13668    value: function init() {
13669      var _this157 = this;
13670      this.el.forEach(function (element) {
13671        // サムネイルスライダー
13672        _this157.Thumbel = element.nextElementSibling;
13673        _this157.$sliderThumbEl = $(_this157.Thumbel).find('.swiper')[0];
13674        var thumbSlides = $(_this157.Thumbel).find('.swiper-slide');
13675        var thumbMinLength = isMobile() ? 4 : 6;
13676        if (thumbSlides.length <= thumbMinLength) {
13677          $(_this157.Thumbel).find('.swiper-wrapper').addClass('-none-slide');
13678        }
13679        _this157.sliderThumb = new Swiper(_this157.$sliderThumbEl, {
13680          slidesPerView: 'auto',
13681          watchSlidesVisibility: true,
13682          watchSlidesProgress: true
13683        });
13684
13685        // ギャラリースライダー
13686        _this157.$sliderEl = $(element).find('.swiper')[0];
13687        _this157.$prevBtn = $(element).find('.swiper-button-prev')[0];
13688        _this157.$nextBtn = $(element).find('.swiper-button-next')[0];
13689        var isLoop = $(element).data('loop');
13690        _this157.slider = new Swiper(_this157.$sliderEl, {
13691          slidesPerView: 1,
13692          spaceBetween: 15,
13693          loop: isLoop,
13694          navigation: {
13695            prevEl: _this157.$prevBtn,
13696            nextEl: _this157.$nextBtn
13697          },
13698          thumbs: {
13699            swiper: _this157.sliderThumb
13700          }
13701        });
13702        _this157.$sliderImg = $(element).find('.p-specialGallery__img')[0];
13703        var sliderImgAspectRatio = Math.round(_this157.$sliderImg.clientHeight / _this157.$sliderImg.clientWidth * 1000) / 1000 / 2 * 100;
13704        element.style.setProperty('--img-aspect-ratio', "".concat(sliderImgAspectRatio, "%"));
13705      });
13706    }
13707  }]);
13708  return SliderSpecialGallery;
13709}();
13710var SliderSpecialIntroModal = /*#__PURE__*/function () {
13711  function SliderSpecialIntroModal() {
13712    _classCallCheck(this, SliderSpecialIntroModal);
13713    this.el = document.querySelectorAll('.p-specialIntro');
13714    if (this.el !== 0) this.init();
13715  }
13716  _createClass(SliderSpecialIntroModal, [{
13717    key: "init",
13718    value: function init() {
13719      this.el.forEach(function (element) {
13720        var introBtns = element.querySelectorAll('.p-specialIntro__btn[data-modal]');
13721        if (introBtns.length !== 0) {
13722          var dataModal = introBtns[0].dataset.modal;
13723          var modalWrapper = document.getElementById(dataModal);
13724          var sliderEl = $(modalWrapper).find('.swiper')[0];
13725          var prevBtn = $(modalWrapper).find('.js-modal-slider-prev')[0];
13726          var nextBtn = $(modalWrapper).find('.js-modal-slider-next')[0];
13727          var slider = new Swiper(sliderEl, {
13728            slidesPerView: 1,
13729            navigation: {
13730              prevEl: prevBtn,
13731              nextEl: nextBtn
13732            }
13733          });
13734          introBtns.forEach(function (btn) {
13735            btn.addEventListener('click', function (e) {
13736              var _element = e.currentTarget;
13737              var elementList = document.querySelectorAll(".p-specialIntro__btn[data-modal=\"".concat(dataModal, "\"]"));
13738              var index = Array.prototype.indexOf.call(elementList, _element);
13739              slider.slideTo(index, 0);
13740            });
13741          });
13742        }
13743      });
13744    }
13745  }]);
13746  return SliderSpecialIntroModal;
13747}();
13748var SliderSpecialMovie = /*#__PURE__*/function () {
13749  function SliderSpecialMovie() {
13750    _classCallCheck(this, SliderSpecialMovie);
13751    this.el = document.querySelectorAll('.js-sliderSpecialMovie');
13752    if (this.el.length !== 0) this.init();
13753  }
13754  _createClass(SliderSpecialMovie, [{
13755    key: "init",
13756    value: function init() {
13757      var _this158 = this;
13758      this.el.forEach(function (element) {
13759        var slides = $(element).find('.swiper-slide');
13760        var minLength = 1;
13761        if (slides.length <= minLength) {
13762          $(element).addClass('-none-slide');
13763        }
13764        _this158.$sliderEl = $(element).find('.swiper')[0];
13765        _this158.$prevBtn = $(element).find('.swiper-button-prev')[0];
13766        _this158.$nextBtn = $(element).find('.swiper-button-next')[0];
13767        _this158.$pagination = $(element).find('.swiper-pagination')[0];
13768        _this158.slider = new Swiper(_this158.$sliderEl, {
13769          slidesPerView: 1,
13770          spaceBetween: slides.length !== 1 ? 30 : 0,
13771          loop: true,
13772          navigation: {
13773            prevEl: _this158.$prevBtn,
13774            nextEl: _this158.$nextBtn
13775          },
13776          pagination: {
13777            el: _this158.$pagination,
13778            type: 'bullets',
13779            clickable: true
13780          },
13781          on: {
13782            slideChangeTransitionEnd: function slideChangeTransitionEnd() {
13783              return _this158.resetAndPlayVideo(element);
13784            }
13785          }
13786        });
13787
13788        // 初回ロード時に最初の動画を再生
13789        _this158.resetAndPlayVideo(element);
13790      });
13791    }
13792  }, {
13793    key: "resetAndPlayVideo",
13794    value: function resetAndPlayVideo(el) {
13795      // すべての iframe の src をリセット(動画を停止)
13796      el.querySelectorAll('.swiper-slide iframe').forEach(function (iframe) {
13797        iframe.src = ''; // 一旦空にする
13798      });
13799
13800      // アクティブなスライドの iframe を取得
13801      var activeSlide = el.querySelector('.swiper-slide-active iframe');
13802      if (activeSlide) {
13803        activeSlide.src = activeSlide.dataset.src; // 元のURLを再セット(最初から再生)
13804      }
13805    }
13806  }]);
13807  return SliderSpecialMovie;
13808}();
13809var SliderSpecialBanner = /*#__PURE__*/function () {
13810  function SliderSpecialBanner() {
13811    _classCallCheck(this, SliderSpecialBanner);
13812    this.el = document.querySelectorAll('.p-specialBanner__slider');
13813    if (this.el !== 0) this.init();
13814  }
13815  _createClass(SliderSpecialBanner, [{
13816    key: "init",
13817    value: function init() {
13818      var _this159 = this;
13819      this.el.forEach(function (element) {
13820        var slides = $(element).find('.swiper-slide');
13821        var minLength = isMobile() ? 1 : 3;
13822        if (slides.length <= minLength) {
13823          $(element).addClass('-none-slide');
13824        }
13825        _this159.$sliderEl = $(element).find('.swiper')[0];
13826        _this159.$prevBtn = $(element).find('.swiper-button-prev')[0];
13827        _this159.$nextBtn = $(element).find('.swiper-button-next')[0];
13828        _this159.$pagination = $(element).find('.swiper-pagination')[0];
13829        _this159.slider = new Swiper(_this159.$sliderEl, {
13830          slidesPerView: 1.3,
13831          spaceBetween: slides.length !== 1 ? 15 : 0,
13832          centeredSlides: true,
13833          watchSlidesProgress: true,
13834          autoplay: {
13835            delay: 5000,
13836            disableOnInteraction: false
13837          },
13838          breakpoints: {
13839            769: {
13840              slidesPerView: 3,
13841              spaceBetween: slides.length !== 1 ? 10 : 0,
13842              centeredSlides: false
13843            }
13844          },
13845          navigation: {
13846            prevEl: _this159.$prevBtn,
13847            nextEl: _this159.$nextBtn
13848          },
13849          pagination: {
13850            el: _this159.$pagination,
13851            type: 'bullets',
13852            clickable: true
13853          },
13854          on: {
13855            init: function init() {
13856              $(element).find('.swiper-pagination-bullet').each(function (i, el) {
13857                $(el).append('<svg width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="20"></svg>');
13858              });
13859            }
13860          }
13861        });
13862      });
13863    }
13864  }]);
13865  return SliderSpecialBanner;
13866}();
13867var SpecialMusic = /*#__PURE__*/function () {
13868  function SpecialMusic() {
13869    _classCallCheck(this, SpecialMusic);
13870    this.el = document.querySelectorAll('.p-specialMusic');
13871    if (this.el !== 0) this.init();
13872  }
13873  _createClass(SpecialMusic, [{
13874    key: "init",
13875    value: function init() {
13876      var musicPlayBtns = document.querySelectorAll('.p-specialMusic__btn');
13877      var playMusicFunc = function playMusicFunc(el) {
13878        el.play();
13879      };
13880      var stopMusicFunc = function stopMusicFunc(el) {
13881        el.currentTime = 0;
13882        el.pause();
13883      };
13884      musicPlayBtns.forEach(function (el) {
13885        el.addEventListener('click', function () {
13886          var parent = el.closest('.p-specialMusic__item');
13887          if (parent.classList.contains('-playing') === true) {
13888            parent.classList.remove('-playing');
13889          } else {
13890            var playingItem = document.querySelector('.p-specialMusic__item.-playing');
13891            if (playingItem != null) {
13892              var playingAudio = playingItem.querySelector('audio');
13893              playingItem.classList.remove('-playing');
13894              stopMusicFunc(playingAudio);
13895            }
13896            parent.classList.add('-playing');
13897          }
13898          var audio = el.nextElementSibling;
13899          if (audio.paused) {
13900            playMusicFunc(audio);
13901          } else {
13902            stopMusicFunc(audio);
13903          }
13904          audio.addEventListener('ended', function () {
13905            parent.classList.remove('-playing');
13906          });
13907        });
13908      });
13909    }
13910  }]);
13911  return SpecialMusic;
13912}();
13913var SpecialRandomImage = /*#__PURE__*/function () {
13914  function SpecialRandomImage() {
13915    _classCallCheck(this, SpecialRandomImage);
13916    this.els = document.querySelectorAll('.p-specialRandomImage');
13917    if (this.els !== 0) this.init();
13918  }
13919  _createClass(SpecialRandomImage, [{
13920    key: "init",
13921    value: function init() {
13922      var _this160 = this;
13923      this.els.forEach(function (el) {
13924        var items = el.querySelectorAll('.p-specialFigure__item');
13925        _this160.randomShow(items);
13926      });
13927    }
13928  }, {
13929    key: "randomShow",
13930    value: function randomShow(items) {
13931      var randomIndex = Math.floor(Math.random() * items.length);
13932      // ランダムに1つ表示し、残りは削除
13933      items.forEach(function (item, index) {
13934        if (index == randomIndex) {
13935          item.style.display = 'block';
13936        } else {
13937          item.remove();
13938        }
13939      });
13940    }
13941  }]);
13942  return SpecialRandomImage;
13943}();
13944var SpecialRandomModal = /*#__PURE__*/function () {
13945  function SpecialRandomModal() {
13946    _classCallCheck(this, SpecialRandomModal);
13947    this.els = document.querySelectorAll('.p-specialRandomModal');
13948    if (this.els !== 0) this.init();
13949  }
13950  _createClass(SpecialRandomModal, [{
13951    key: "init",
13952    value: function init() {
13953      var _this161 = this;
13954      this.els.forEach(function (el) {
13955        var item = el.querySelector('.p-specialFigure__item');
13956        var itemId = item.dataset.modal;
13957        _this161.randomShow(item, itemId);
13958        _this161.closeEvent(item, itemId);
13959      });
13960    }
13961  }, {
13962    key: "randomShow",
13963    value: function randomShow(item, itemId) {
13964      var modalItemCount = document.querySelectorAll(".c-modal.".concat(itemId)).length;
13965      var randomIndex = Math.floor(Math.random() * modalItemCount);
13966      item.dataset.modal = "".concat(itemId).concat(randomIndex);
13967    }
13968  }, {
13969    key: "closeEvent",
13970    value: function closeEvent(item, itemId) {
13971      var _this162 = this;
13972      var modals = document.querySelectorAll(".c-modal.".concat(itemId));
13973      modals.forEach(function (modal) {
13974        var closeBtn = modal.querySelector('.c-modal__close');
13975        closeBtn.addEventListener('click', function () {
13976          _this162.randomShow(item, itemId);
13977        });
13978      });
13979    }
13980  }]);
13981  return SpecialRandomModal;
13982}();
13983var SingleDigital = /*#__PURE__*/function () {
13984  function SingleDigital() {
13985    _classCallCheck(this, SingleDigital);
13986    this.el = document.querySelector('[data-page="digitalDetail"]');
13987    this.STORAGE_KEY = 'digital_post_id';
13988    this.EXPIRE_TIME = 24 * 60 * 60 * 1000; // 24時間
13989
13990    if (this.el !== null) this.init();
13991  }
13992  _createClass(SingleDigital, [{
13993    key: "init",
13994    value: function init() {
13995      this.cleanupExpiredPosts();
13996      // this.downloadEvent()
13997    }
13998  }, {
13999    key: "getPostId",
14000    value: function getPostId() {
14001      return JSON.parse(localStorage.getItem(this.STORAGE_KEY)) || {};
14002    }
14003  }, {
14004    key: "setPostId",
14005    value: function setPostId(postId) {
14006      var posts = this.getPostId();
14007      posts[postId] = Date.now();
14008      localStorage.setItem(this.STORAGE_KEY, JSON.stringify(posts));
14009    }
14010
14011    // 24時間以内か判定
14012  }, {
14013    key: "isWithin24Hours",
14014    value: function isWithin24Hours(postId) {
14015      var posts = this.getPostId();
14016      var savedTime = posts[postId];
14017      if (!savedTime) return false;
14018      return Date.now() - savedTime < this.EXPIRE_TIME;
14019    }
14020  }, {
14021    key: "cleanupExpiredPosts",
14022    value: function cleanupExpiredPosts() {
14023      var _this163 = this;
14024      var posts = this.getPostId();
14025      var now = Date.now();
14026      var isUpdated = false;
14027      Object.keys(posts).forEach(function (postId) {
14028        if (now - posts[postId] > _this163.EXPIRE_TIME) {
14029          delete posts[postId];
14030          isUpdated = true;
14031        }
14032      });
14033      if (isUpdated) {
14034        localStorage.setItem(this.STORAGE_KEY, JSON.stringify(posts));
14035      }
14036    }
14037  }, {
14038    key: "downloadEvent",
14039    value: function downloadEvent() {
14040      var downloadBtns = this.el.querySelectorAll('.js-singleDigital-download');
14041      downloadBtns.forEach(function (btn) {
14042        // const postId = btn.dataset.postId;
14043
14044        // btn.addEventListener('click', () => {
14045        //   if (this.isWithin24Hours(postId)) {
14046        //     console.log('24時間以内にPOST済み', postId);
14047        //     return;
14048        //   }
14049
14050        //   this.digital_dl_count({ post_id: postId });
14051        //   this.setPostId(postId);
14052        // })
14053      });
14054    }
14055  }, {
14056    key: "digital_dl_count",
14057    value: function digital_dl_count(data) {
14058      var _this164 = this;
14059      var btn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
14060      var postId = data.post_id;
14061      if (this.isWithin24Hours(postId)) {
14062        console.log('24時間以内にPOST済み', postId);
14063        return;
14064      }
14065      // 二重送信防止のため先にマークする(失敗が確定したら catch で解除)
14066      this.setPostId(postId);
14067      fetch('/system/api/set_wallpaper_dl.php', {
14068        method: 'POST',
14069        headers: {
14070          'Content-Type': 'application/x-www-form-urlencoded'
14071          // 'Content-Type': 'application/json',
14072          // 'X-WP-Nonce': '<?php echo wp_create_nonce("wp_rest"); ?>'
14073        },
14074
14075        body: new URLSearchParams(data),
14076        // ボタンは <a target="_blank"> で画像タブを開くため、遷移でページが
14077        // バックグラウンド化しても送信を完了させる(fetchキャンセルによる空振り対策)
14078        keepalive: true
14079      }).then(function (response) {
14080        if (!response.ok) throw new Error("HTTP ".concat(response.status));
14081        return response.json();
14082      }).then(function (data) {
14083        console.log('Success:', data);
14084        // 成功時の処理
14085      })["catch"](function (error) {
14086        console.error('Error:', error);
14087        // エラー時の処理
14088        _this164.removePostId(postId); // マーク解除して24時間ブロックせず再送可能に
14089        _this164.showError(btn);
14090      });
14091    }
14092
14093    // 送信済みマークの解除(失敗時の再送を可能にする)
14094  }, {
14095    key: "removePostId",
14096    value: function removePostId(postId) {
14097      var posts = this.getPostId();
14098      delete posts[postId];
14099      localStorage.setItem(this.STORAGE_KEY, JSON.stringify(posts));
14100    }
14101
14102    // エラー文言をボタン直下に表示
14103  }, {
14104    key: "showError",
14105    value: function showError(btn) {
14106      if (!btn) return;
14107      var wrap = btn.closest('.c-btn-arrow') || btn;
14108      // 既に表示済みなら二重挿入しない
14109      if (wrap.nextElementSibling && wrap.nextElementSibling.classList.contains('js-singleDigital-dlError')) return;
14110      var p = document.createElement('p');
14111      p.className = 'js-singleDigital-dlError';
14112      p.textContent = 'エラーが発生しました。しばらく時間をおいてからお試しください。';
14113      p.style.cssText = 'font-size:12px;font-weight:500;margin-top:10px;color:#E383A8;';
14114      wrap.insertAdjacentElement('afterend', p);
14115    }
14116  }]);
14117  return SingleDigital;
14118}();
14119(function () {})();
14120
14121//DOMContentLoaded
14122$(function () {
14123  var globalEls = new GlobalElements();
14124  var appSearchCharacter = new AppSearchCharacter();
14125  var appBirthdayModal = new AppBirthdayModal();
14126  new AppSearchDigital();
14127  new AppSearchSpot();
14128  new AppSearchNews();
14129  new AppSearchGoods();
14130  new AppSearchMovie();
14131  new AppSearchMovieDetail();
14132  new AppSearchSocialMedia();
14133  new AppSearchSitelist();
14134  new AppSearchGift();
14135  new MoreArticles();
14136  new Langpanel();
14137
14138  // mypage
14139  new AppMypageLogin();
14140  new appMypageFavorit();
14141  new appMypagePortal();
14142  new AppMypageCalendar();
14143  //
14144
14145  new LoginTab();
14146  new ListGoodsRanking();
14147  new ListCharacterGoods();
14148  new ClipArticle();
14149  new FavoriteBtn();
14150  new Inview();
14151  new InstagramModule();
14152  new TikTokModule();
14153  new WPULike();
14154  new Stores();
14155  var storesCount = new StoresCount();
14156  var root = document.documentElement;
14157  var body = document.body;
14158  var theme = $(body).data('theme');
14159  if (theme) root.style.setProperty('--c-selection', "var(--".concat(theme, ")"));
14160  var ViewPortChange = /*#__PURE__*/function () {
14161    function ViewPortChange() {
14162      _classCallCheck(this, ViewPortChange);
14163      this.event();
14164    }
14165    _createClass(ViewPortChange, [{
14166      key: "event",
14167      value: function event() {
14168        if (CFL.UA.isTablet()) {
14169          $('head').prepend('<meta name="viewport" content="width=1024">');
14170          $('body').addClass('is-tablet');
14171        }
14172      }
14173    }]);
14174    return ViewPortChange;
14175  }();
14176  new ViewPortChange();
14177});
14178
14179//images resources loaded
14180$(window).on('load', function () {
14181  // let characterBg = new CharacterBg();
14182
14183  var reloadEvent = new ReloadEvent();
14184  window.anchorLink = new AnchorLink();
14185  new InitHandler();
14186  new UIToggle({
14187    el: 'c-clip__btn',
14188    on: '-on'
14189  });
14190  new Accordion({
14191    el: 'c-accordion-head',
14192    on: '-on'
14193  });
14194  // new Modal();
14195  new MoreSection();
14196  new ProfPopup();
14197  var bg = new Bg();
14198  bg.Generate().then(function () {
14199    new Parallax();
14200  });
14201  new PageTop();
14202  new CharacterHistory();
14203  if (0 < $('[data-page="storeDetail"]').length) {
14204    new StoresListPage();
14205  }
14206  new SpecialMenu();
14207  new SpecialAutoSlider();
14208  new SliderSpecialModal();
14209  new SliderSpecialGallery();
14210  new SliderSpecialIntroModal();
14211  new SliderSpecialMovie();
14212  new SliderSpecialBanner();
14213  new SpecialMusic();
14214  new SpecialRandomImage();
14215  new SpecialRandomModal();
14216  // new SingleDigital();
14217  new Sidebar();
14218  new DialSlider();
14219  if (Util.getCurrentPage() === 'character') {
14220    new SliderCharacterlist2();
14221  }
14222  setTimeout(function () {
14223    var hover = new Hover('js-hover');
14224    new MobileMenuSearch();
14225  }, 1000);
14226  $(window).trigger('loading');
14227});
14228
14229//after loading animation
14230$(window).on('loading', function () {
14231  window.youtubeControl = new YoutubeControl('.js-youtube', {
14232    slider: '.js-slideRotateCarousel'
14233  });
14234});
14235$(window).on('onVueContentUpdate', function (e) {
14236  var _window$anchorLink;
14237  if ((_window$anchorLink = window.anchorLink) !== null && _window$anchorLink !== void 0 && _window$anchorLink.updateEvent) {
14238    window.anchorLink.updateEvent();
14239  }
14240});
14241$('img').on('load', function (e) {
14242  setTimeout(function () {
14243    ScrollTrigger.update();
14244    var removeHoverStyle = new RemoveHoverStyle();
14245  }, 100);
14246});
14247$(window).on('resize', function (e) {
14248  setTimeout(function () {
14249    ScrollTrigger.update();
14250  }, 100);
14251});
14252//# sourceMappingURL=../../_cache/_maps/scripts.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.