aboutsummaryrefslogtreecommitdiff
path: root/static/dist/even.9c524851.min.js.map
blob: 785fb043d55d78db7dd7771f8a1dec9037f2721a (plain)
1
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/even.js","webpack:///./src/js/main.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Even","$backToTop","$","window","scroll","scrollTop","fadeIn","fadeOut","click","animate","$mobileNav","$mobileNavIcon","slideout","Slideout","panel","document","getElementById","menu","padding","tolerance","disableTouch","toggle","on","addClass","removeClass","isOpen","$toc","$footer","length","minScrollTop","offset","top","maxScrollTop","height","tocState","start","position","process","end","css","$toclink","$headerlink","$tocLinkLis","headerlinkTop","map","link","headerLinksOffsetForSearch","activeTocIndex","array","target","searchActiveTocIndex","ancestor","parentNode","tagName","fancybox","each","this","find","wrap","src","title","selector","protect","blocks","querySelectorAll","block","rootElement","parentElement","lineCodes","innerHTML","split","pop","lineLength","codeLineHtml","codeHtml","className","figure","createElement","replaceChild","afterHighLight","querySelector","lang","tocContainer","toc","removeChild","_refactorToc","_linkToc","_initToc","oldTocList","children","newTocList","temp","links","num","headers","header","id","flowchart","hljs","container","parse","childNodes","nodeValue","drawSVG","flowchartDiagramsOptions","Diagram","sequenceDiagramsOptions","theme","_even","ready","backToTop","mobileNavbar","sequence","initHighlighting","highlight","chroma"],"mappings":"aACA,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,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524851.min.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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","'use strict';\r\n\r\nconst Even = {};\r\n\r\nEven.backToTop = function() {\r\n  const $backToTop = $('#back-to-top');\r\n\r\n  $(window).scroll(function() {\r\n    if ($(window).scrollTop() > 100) {\r\n      $backToTop.fadeIn(1000);\r\n    } else {\r\n      $backToTop.fadeOut(1000);\r\n    }\r\n  });\r\n\r\n  $backToTop.click(function() {\r\n    $('body,html').animate({scrollTop: 0});\r\n  });\r\n};\r\n\r\nEven.mobileNavbar = function() {\r\n  const $mobileNav = $('#mobile-navbar');\r\n  const $mobileNavIcon = $('.mobile-navbar-icon');\r\n  const slideout = new Slideout({\r\n    'panel': document.getElementById('mobile-panel'),\r\n    'menu': document.getElementById('mobile-menu'),\r\n    'padding': 180,\r\n    'tolerance': 70,\r\n  });\r\n  slideout.disableTouch();\r\n\r\n  $mobileNavIcon.click(function() {\r\n    slideout.toggle();\r\n  });\r\n\r\n  slideout.on('beforeopen', function() {\r\n    $mobileNav.addClass('fixed-open');\r\n    $mobileNavIcon.addClass('icon-click').removeClass('icon-out');\r\n  });\r\n\r\n  slideout.on('beforeclose', function() {\r\n    $mobileNav.removeClass('fixed-open');\r\n    $mobileNavIcon.addClass('icon-out').removeClass('icon-click');\r\n  });\r\n\r\n  $('#mobile-panel').on('touchend', function() {\r\n    slideout.isOpen() && $mobileNavIcon.click();\r\n  });\r\n};\r\n\r\nEven._initToc = function() {\r\n  const SPACING = 20;\r\n  const $toc = $('.post-toc');\r\n  const $footer = $('.post-footer');\r\n\r\n  if ($toc.length) {\r\n    const minScrollTop = $toc.offset().top - SPACING;\r\n    const maxScrollTop = $footer.offset().top - $toc.height() - SPACING;\r\n\r\n    const tocState = {\r\n      start: {\r\n        'position': 'absolute',\r\n        'top': minScrollTop,\r\n      },\r\n      process: {\r\n        'position': 'fixed',\r\n        'top': SPACING,\r\n      },\r\n      end: {\r\n        'position': 'absolute',\r\n        'top': maxScrollTop,\r\n      },\r\n    };\r\n\r\n    $(window).scroll(function() {\r\n      const scrollTop = $(window).scrollTop();\r\n\r\n      if (scrollTop < minScrollTop) {\r\n        $toc.css(tocState.start);\r\n      } else if (scrollTop > maxScrollTop) {\r\n        $toc.css(tocState.end);\r\n      } else {\r\n        $toc.css(tocState.process);\r\n      }\r\n    });\r\n  }\r\n\r\n  const HEADERFIX = 30;\r\n  const $toclink = $('.toc-link');\r\n  const $headerlink = $('.headerlink');\r\n  const $tocLinkLis = $('.post-toc-content li');\r\n\r\n  const headerlinkTop = $.map($headerlink, function(link) {\r\n    return $(link).offset().top;\r\n  });\r\n\r\n  const headerLinksOffsetForSearch = $.map(headerlinkTop, function(offset) {\r\n    return offset - HEADERFIX;\r\n  });\r\n\r\n  const searchActiveTocIndex = function(array, target) {\r\n    for (let i = 0; i < array.length - 1; i++) {\r\n      if (target > array[i] && target <= array[i + 1]) return i;\r\n    }\r\n    if (target > array[array.length - 1]) return array.length - 1;\r\n    return -1;\r\n  };\r\n\r\n  $(window).scroll(function() {\r\n    const scrollTop = $(window).scrollTop();\r\n    const activeTocIndex = searchActiveTocIndex(headerLinksOffsetForSearch, scrollTop);\r\n\r\n    $($toclink).removeClass('active');\r\n    $($tocLinkLis).removeClass('has-active');\r\n\r\n    if (activeTocIndex !== -1) {\r\n      $($toclink[activeTocIndex]).addClass('active');\r\n      let ancestor = $toclink[activeTocIndex].parentNode;\r\n      while (ancestor.tagName !== 'NAV') {\r\n        $(ancestor).addClass('has-active');\r\n        ancestor = ancestor.parentNode.parentNode;\r\n      }\r\n    }\r\n  });\r\n};\r\n\r\nEven.fancybox = function() {\r\n  if ($.fancybox) {\r\n    $('.post-content').each(function() {\r\n      $(this).find('img').each(function() {\r\n        $(this).wrap(`<a class=\"fancybox\" href=\"${this.src}\" data-fancybox=\"gallery\" data-caption=\"${this.title}\"></a>`);\r\n      });\r\n    });\r\n\r\n    $('.fancybox').fancybox({\r\n      selector: '.fancybox',\r\n      protect: true,\r\n    });\r\n  }\r\n};\r\n\r\nEven.highlight = function() {\r\n  const blocks = document.querySelectorAll('pre code');\r\n  for (let i = 0; i < blocks.length; i++) {\r\n    const block = blocks[i];\r\n    const rootElement = block.parentElement;\r\n    const lineCodes = block.innerHTML.split(/\\n/);\r\n    if (lineCodes[lineCodes.length - 1] === '') lineCodes.pop();\r\n    const lineLength = lineCodes.length;\r\n\r\n    let codeLineHtml = '';\r\n    for (let i = 0; i < lineLength; i++) {\r\n      codeLineHtml += `<div class=\"line\">${i + 1}</div>`;\r\n    }\r\n\r\n    let codeHtml = '';\r\n    for (let i = 0; i < lineLength; i++) {\r\n      codeHtml += `<div class=\"line\">${lineCodes[i]}</div>`;\r\n    }\r\n\r\n    block.className += ' highlight';\r\n    const figure = document.createElement('figure');\r\n    figure.className = block.className;\r\n    figure.innerHTML = `<table><tbody><tr><td class=\"gutter\"><pre>${codeLineHtml}</pre></td><td class=\"code\"><pre>${codeHtml}</pre></td></tr></tbody></table>`;\r\n\r\n    rootElement.parentElement.replaceChild(figure, rootElement);\r\n  }\r\n};\r\n\r\nEven.chroma = function() {\r\n  const blocks = document.querySelectorAll('.highlight > .chroma');\r\n  for (let i = 0; i < blocks.length; i++) {\r\n    const block = blocks[i];\r\n    const afterHighLight = block.querySelector('pre.chroma > code');\r\n    const lang = afterHighLight ? afterHighLight.className : '';\r\n    block.className += ' ' + lang;\r\n  }\r\n};\r\n\r\nEven.toc = function() {\r\n  const tocContainer = document.getElementById('post-toc');\r\n  if (tocContainer !== null) {\r\n    const toc = document.getElementById('TableOfContents');\r\n    if (toc === null) {\r\n      // toc = true, but there are no headings\r\n      tocContainer.parentNode.removeChild(tocContainer);\r\n    } else {\r\n      this._refactorToc(toc);\r\n      this._linkToc();\r\n      this._initToc();\r\n    }\r\n  }\r\n};\r\n\r\nEven._refactorToc = function(toc) {\r\n  // when headings do not start with `h1`\r\n  const oldTocList = toc.children[0];\r\n  let newTocList = oldTocList;\r\n  let temp;\r\n  while (newTocList.children.length === 1\r\n      && (temp = newTocList.children[0].children[0]).tagName === 'UL') {\r\n    newTocList = temp;\r\n  }\r\n\r\n  if (newTocList !== oldTocList) toc.replaceChild(newTocList, oldTocList);\r\n};\r\n\r\nEven._linkToc = function() {\r\n  const links = document.querySelectorAll('#TableOfContents a:first-child');\r\n  for (let i = 0; i < links.length; i++) links[i].className += ' toc-link';\r\n\r\n  for (let num = 1; num <= 6; num++) {\r\n    const headers = document.querySelectorAll('.post-content>h' + num);\r\n    for (let i = 0; i < headers.length; i++) {\r\n      const header = headers[i];\r\n      header.innerHTML = `<a href=\"#${header.id}\" class=\"headerlink\"></a>${header.innerHTML}`;\r\n    }\r\n  }\r\n};\r\n\r\nEven.flowchart = function() {\r\n  if (!window.flowchart) return;\r\n\r\n  const blocks = document.querySelectorAll('pre code.language-flowchart');\r\n  for (let i = 0; i < blocks.length; i++) {\r\n    if (!window.hljs && i % 2 === 0) continue;\r\n\r\n    const block = blocks[i];\r\n    const rootElement = window.hljs\r\n        ? block.parentElement\r\n        : block.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;\r\n\r\n    const container = document.createElement('div');\r\n    const id = `js-flowchart-diagrams-${i}`;\r\n    container.id = id;\r\n    container.className = 'align-center';\r\n    rootElement.parentElement.replaceChild(container, rootElement);\r\n\r\n    const diagram = flowchart.parse(block.childNodes[0].nodeValue);\r\n    diagram.drawSVG(id, window.flowchartDiagramsOptions ? window.flowchartDiagramsOptions : {});\r\n  }\r\n};\r\n\r\nEven.sequence = function() {\r\n  if (!window.Diagram) return;\r\n\r\n  const blocks = document.querySelectorAll('pre code.language-sequence');\r\n  for (let i = 0; i < blocks.length; i++) {\r\n    if (!window.hljs && i % 2 === 0) continue;\r\n\r\n    const block = blocks[i];\r\n    const rootElement = window.hljs\r\n        ? block.parentElement\r\n        : block.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;\r\n\r\n    const container = document.createElement('div');\r\n    const id = `js-sequence-diagrams-${i}`;\r\n    container.id = id;\r\n    container.className = 'align-center';\r\n    rootElement.parentElement.replaceChild(container, rootElement);\r\n\r\n    const diagram = Diagram.parse(block.childNodes[0].nodeValue);\r\n    diagram.drawSVG(id, window.sequenceDiagramsOptions\r\n        ? window.sequenceDiagramsOptions\r\n        : {theme: 'simple'});\r\n  }\r\n};\r\n\r\nexport {Even}\r\n","import {Even} from './even.js'\r\n\r\nimport '../css/style.scss'\r\n\r\n$(document).ready(function () {\r\n  Even.backToTop();\r\n  Even.mobileNavbar();\r\n  Even.toc();\r\n  Even.fancybox();\r\n});\r\n\r\nEven.flowchart();\r\nEven.sequence();\r\n\r\nif (window.hljs) {\r\n  hljs.initHighlighting();\r\n  Even.highlight();\r\n} else {\r\n  Even.chroma();\r\n}\r\n\r\n"],"sourceRoot":""}