{"version":3,"sources":["webpack:///webpack/bootstrap a399c8ff508c21b7af81","webpack:///./src/js/editor-navi.js","webpack:///./src/js/sticky.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","value","__WEBPACK_IMPORTED_MODULE_0__sticky_js__","folder","promo","url","location","href","checkActive","constructor","Array","forEach","item","indexOf","template","$","append","Sticky","el","offsetTop","openClose","sticky","opts","_classCallCheck","this","extend","$el","document","querySelector","$btn","_init","_settings","_controls","classList","add","window","addEventListener","bind","statusCheck","scTop","documentElement","scrollTop","body","remove","contains","closeClass","openClass"],"mappings":";;;;gBACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAhB,GACA,IAAAS,EAAAT,KAAAiB,WACA,WAA2B,OAAAjB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAQ,EAAAC,GAAsD,OAAAR,OAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,IAAA0B,EAAA,kCC7DAZ,OAAAC,eAAAY,EAAA,cAAAC,OAAA,QAAAC,EAAA7B,EAAA,G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a,gBAAgBC,WACtDd,SAASe,KAAKD,UAClBjB,KAAKF,KAAKH,WAAaoB,EACjBf,KAAKE,IAAIO,UAAUC,IAAI,cACvBV,KAAKE,IAAIO,UAAUU,OAAO,oDAI5BnB,KAAKE,IAAIO,UAAUW,SAAS,eAC5BpB,KAAKqB,aAELrB,KAAKsB,gDAKTtB,KAAKK,KAAKI,UAAUU,OAAO,qBAC3BnB,KAAKK,KAAKI,UAAUC,IAAI,oBACxBV,KAAKE,IAAIO,UAAUU,OAAO,gBAC1BnB,KAAKE,IAAIO,UAAUC,IAAI,oDAIvBV,KAAKK,KAAKI,UAAUU,OAAO,oBAC3BnB,KAAKK,KAAKI,UAAUC,IAAI,qBACxBV,KAAKE,IAAIO,UAAUU,OAAO,eAC1BnB,KAAKE,IAAIO,UAAUC,IAAI,yBAIhBb","file":"editor-navi.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap a399c8ff508c21b7af81","import Sticky from './sticky.js'\r\n\r\nconst folder = '/events/2021'\r\nconst promo = '/promo/lineage'\r\nconst url = location.href\r\n\r\nconst checkActive = (name) => {\r\n if (name.constructor === Array) {\r\n name.forEach((item) => {\r\n if (url.indexOf(item) > -1) name = item\r\n })\r\n }\r\n return url.indexOf(name) > -1 ? 'p-nav__list--on' : ''\r\n}\r\n\r\nconst template = ``\r\n\r\n$('body').append(template)\r\n\r\nnew Sticky({\r\n el: '#sticky',\r\n offsetTop: 56,\r\n openClose: [\r\n 'p-nav--open', // p-nav--close\r\n 'p-nav__btn--open', // p-nav__btn--close\r\n ],\r\n})\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/editor-navi.js","class sticky {\r\n constructor(opts) {\r\n this.opts = $.extend({\r\n el: '#element',\r\n offsetTop: 56,\r\n openClose: [\r\n 'p-nav--open', // p-nav--close\r\n 'p-nav__btn--open', // p-nav__btn--close\r\n ],\r\n }, opts)\r\n\r\n this.$el = document.querySelector(this.opts.el)\r\n this.$btn = document.querySelector('.p-nav__btn')\r\n\r\n this._init()\r\n }\r\n\r\n _init() {\r\n this._settings()\r\n this._controls()\r\n }\r\n\r\n _settings() {\r\n this.$el.classList.add(`${this.opts.openClose[0]}`)\r\n this.$btn.classList.add(`${this.opts.openClose[1]}`)\r\n this.sticky()\r\n }\r\n\r\n _controls() {\r\n window.addEventListener('scroll', this.sticky.bind(this))\r\n\r\n this.$btn.addEventListener('click', this.statusCheck.bind(this))\r\n }\r\n\r\n sticky() {\r\n let scTop =\r\n (document.documentElement && document.documentElement.scrollTop) ||\r\n document.body.scrollTop\r\n this.opts.offsetTop <= scTop\r\n ? this.$el.classList.add('p-nav--fix')\r\n : this.$el.classList.remove('p-nav--fix')\r\n }\r\n\r\n statusCheck() {\r\n if (this.$el.classList.contains('p-nav--open')) {\r\n this.closeClass()\r\n } else {\r\n this.openClass()\r\n }\r\n }\r\n\r\n openClass() {\r\n this.$btn.classList.remove('p-nav__btn--close')\r\n this.$btn.classList.add('p-nav__btn--open')\r\n this.$el.classList.remove('p-nav--close')\r\n this.$el.classList.add('p-nav--open')\r\n }\r\n\r\n closeClass() {\r\n this.$btn.classList.remove('p-nav__btn--open')\r\n this.$btn.classList.add('p-nav__btn--close')\r\n this.$el.classList.remove('p-nav--open')\r\n this.$el.classList.add('p-nav--close')\r\n }\r\n}\r\n\r\nexport default sticky\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/js/sticky.js"],"sourceRoot":""}