{"version":3,"file":"parallax.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap b588340e1bcb730fda00","webpack:///./src/consts.js","webpack:///./src/browser.js","webpack:///./src/Parallax.js","webpack:///./src/utils.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Parallax\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"Parallax\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \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 = 2);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b588340e1bcb730fda00","\"use strict\";\n\nexports.__esModule = true;\nexports.DEFENSE_BROWSER = exports.WEBKIT_VERSION = exports.PROCESSING = exports.LOADING_PREPEND = exports.LOADING_APPEND = exports.IDLE = exports.ALIGN = exports.isMobile = exports.agent = exports.DEFAULT_OPTIONS = exports.GROUPKEY_ATT = exports.DUMMY_POSITION = exports.SINGLE = exports.MULTI = exports.NO_TRUSTED = exports.TRUSTED = exports.NO_CACHE = exports.CACHE = exports.HORIZONTAL = exports.VERTICAL = exports.PREPEND = exports.APPEND = exports.IGNORE_CLASSNAME = exports.CONTAINER_CLASSNAME = exports.RETRY = exports.IS_ANDROID2 = exports.IS_IOS = exports.IS_IE = exports.SUPPORT_PASSIVE = exports.SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_COMPUTEDSTYLE = undefined;\n\nvar _browser = require(\"./browser\");\n\nvar ua = _browser.window.navigator.userAgent;\n\nvar SUPPORT_COMPUTEDSTYLE = exports.SUPPORT_COMPUTEDSTYLE = !!(\"getComputedStyle\" in _browser.window);\nvar SUPPORT_ADDEVENTLISTENER = exports.SUPPORT_ADDEVENTLISTENER = !!(\"addEventListener\" in document);\nvar SUPPORT_PASSIVE = exports.SUPPORT_PASSIVE = function () {\n\tvar supportsPassiveOption = false;\n\n\ttry {\n\t\tif (SUPPORT_ADDEVENTLISTENER && Object.defineProperty) {\n\t\t\tdocument.addEventListener(\"test\", null, Object.defineProperty({}, \"passive\", {\n\t\t\t\tget: function get() {\n\t\t\t\t\tsupportsPassiveOption = true;\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\t} catch (e) {}\n\treturn supportsPassiveOption;\n}();\n\nvar IS_IE = exports.IS_IE = /MSIE|Trident|Windows Phone|Edge/.test(ua);\nvar IS_IOS = exports.IS_IOS = /iPhone|iPad/.test(ua);\nvar IS_ANDROID2 = exports.IS_ANDROID2 = /Android 2\\./.test(ua);\nvar RETRY = exports.RETRY = 3;\nvar CONTAINER_CLASSNAME = exports.CONTAINER_CLASSNAME = \"_eg-infinitegrid-container_\";\nvar IGNORE_CLASSNAME = exports.IGNORE_CLASSNAME = \"_eg-infinitegrid-ignore_\";\n\nvar APPEND = exports.APPEND = true;\nvar PREPEND = exports.PREPEND = false;\nvar VERTICAL = exports.VERTICAL = \"vertical\";\nvar HORIZONTAL = exports.HORIZONTAL = \"horizontal\";\nvar CACHE = exports.CACHE = true;\nvar NO_CACHE = exports.NO_CACHE = false;\nvar TRUSTED = exports.TRUSTED = true;\nvar NO_TRUSTED = exports.NO_TRUSTED = false;\nvar MULTI = exports.MULTI = true;\nvar SINGLE = exports.SINGLE = false;\nvar DUMMY_POSITION = exports.DUMMY_POSITION = -100000;\nvar GROUPKEY_ATT = exports.GROUPKEY_ATT = \"data-groupkey\";\n\nvar DEFAULT_OPTIONS = exports.DEFAULT_OPTIONS = {\n\thorizontal: false,\n\tmargin: 0\n};\n\nvar agent = exports.agent = ua.toLowerCase();\nvar isMobile = exports.isMobile = /mobi|ios|android/.test(agent);\n\nvar ALIGN = exports.ALIGN = {\n\tSTART: \"start\",\n\tCENTER: \"center\",\n\tEND: \"end\",\n\tJUSTIFY: \"justify\"\n};\n\nvar IDLE = exports.IDLE = 0;\nvar LOADING_APPEND = exports.LOADING_APPEND = 1;\nvar LOADING_PREPEND = exports.LOADING_PREPEND = 2;\nvar PROCESSING = exports.PROCESSING = 4;\n\nvar webkit = /applewebkit\\/([\\d|.]*)/g.exec(agent);\n\nvar WEBKIT_VERSION = exports.WEBKIT_VERSION = webkit && parseInt(webkit[1], 10) || 0;\nvar DEFENSE_BROWSER = exports.DEFENSE_BROWSER = WEBKIT_VERSION && WEBKIT_VERSION < 537;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/consts.js\n// module id = 0\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win = window;\n/* eslint-enable no-new-func, no-nested-ternary */\n\nexports.window = win;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 1\n// module chunks = 0 1","\"use strict\";\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar style = {\n\t\"vertical\": { position: \"top\", size: \"height\", cammelSize: \"Height\", coordinate: \"Y\" },\n\t\"horizontal\": { position: \"left\", size: \"width\", cammelSize: \"Width\", coordinate: \"X\" }\n};\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER;\n\nvar TRANSFORM = function () {\n\tvar bodyStyle = (document.head || document.getElementsByTagName(\"head\")[0]).style;\n\tvar target = [\"transform\", \"webkitTransform\", \"msTransform\", \"mozTransform\"];\n\n\tfor (var i = 0, len = target.length; i < len; i++) {\n\t\tif (target[i] in bodyStyle) {\n\t\t\treturn target[i];\n\t\t}\n\t}\n\treturn \"\";\n}();\n\n/**\n * @classdesc Parallax is a displacement or difference in the apparent position of an object viewed along two different lines of sight. You can apply parallax by scrolling the image and speed of the item.\n * @ko Parallax는 서로 다른 두 개의 시선에서 바라본 물체의 외관상 위치의 변위 또는 차이입니다. 스크롤에 따라 이미지와 아이템의 속도를 차이를 줌으로써 parallax을 적용할 수 있습니다.\n * @class eg.Parallax\n * @param {Element|String} [root=window] Scrolling target. If you scroll in the body, set window. 스크롤하는 대상. 만약 body에서 스크롤하면 window로 설정한다.\n * @param {Object} [options] The option object of eg.Parallax module eg.Parallax 모듈의 옵션 객체\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Element|String} [options.container=null] Container wrapping items. If root and container have no gaps, do not set option. 아이템들을 감싸고 있는 컨테이너. 만약 root와 container간의 차이가 없으면, 옵션을 설정하지 않아도 된다.\n * @param {String} [options.selector=\"img\"] The selector of the image to apply the parallax in the item 아이템안에 있는 parallax를 적용할 이미지의 selector \n * @param {Boolean} [options.strength=1] Dimensions that indicate the sensitivity of parallax. The higher the strength, the faster.\n * @param {Boolean} [options.center=0] The middle point of parallax. The top is 1 and the bottom is -1. parallax가 가운데로 오는 점. 상단이 1이고 하단이 -1이다. \n * @param {Boolean} [options.range=[-1, 1]] Range to apply the parallax. The top is 1 and the bottom is -1. parallax가 적용되는 범위, 상단이 1이고 하단이 -1이다. \n * @param {Boolean} [options.align=\"start\"] The alignment of the image in the item. (\"start\" : top or left, \"center\": middle) 아이템안의 이미지의 정렬 \n * @example\n```\n\n```\n **/\n\nvar Parallax = function () {\n\tfunction Parallax() {\n\t\tvar root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;\n\t\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\t_classCallCheck(this, Parallax);\n\n\t\tthis.options = _extends({\n\t\t\tcontainer: null,\n\t\t\tselector: \"img\",\n\t\t\tstrength: 1,\n\t\t\tcenter: 0,\n\t\t\trange: [-1, 1],\n\t\t\talign: START,\n\t\t\thorizontal: false\n\t\t}, options);\n\t\tthis._root = (0, _utils.$)(root);\n\t\tthis._container = this.options.container && (0, _utils.$)(this.options.container);\n\t\tthis._rootSize = 0;\n\t\tthis._containerPosition = 0;\n\t\tthis._style = style[this.options.horizontal ? \"horizontal\" : \"vertical\"];\n\t\tthis.resize();\n\t}\n\n\tParallax.prototype._checkParallaxItem = function _checkParallaxItem(element) {\n\t\tif (!element) {\n\t\t\treturn;\n\t\t}\n\t\tvar selector = this.options.selector;\n\n\t\tif (!element.__IMAGE__) {\n\t\t\tvar img = element.querySelector(selector);\n\n\t\t\telement.__IMAGE__ = img || -1;\n\t\t\tif (element.__IMAGE__ === -1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telement.__BOX__ = img.parentNode;\n\t\t}\n\t\tif (element.__IMAGE__ === -1) {\n\t\t\treturn;\n\t\t}\n\t\tvar sizeName = this._style.cammelSize;\n\n\t\telement.__IMAGE__.__SIZE__ = element.__IMAGE__[\"offset\" + sizeName];\n\t\telement.__BOX__.__SIZE__ = element.__BOX__[\"offset\" + sizeName];\n\t};\n\t/**\n * As the browser is resized, the gaps between the root and the container and the size of the items are updated.\n * @ko 브라우저의 크기가 변경됨으로 써 root와 container의 간격과 아이템들의 크기를 갱신한다.\n * @method eg.Parallax#resize\n * @param {Array} [items = []] Items to apply parallax. It does not apply if it is not in visible range. parallax를 적용할 아이템들. 가시거리에 존재하지 않으면 적용이 안된다.\n * @return {eg.Parallax} An instance of a module itself모듈 자신의 인스턴스\n * @example\n ```js\n window.addEventListener(\"resize\", function (e) {\n parallax.resize(items);\n });\n ```\n */\n\n\n\tParallax.prototype.resize = function resize() {\n\t\tvar _this = this;\n\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n\t\tvar root = this._root;\n\t\tvar container = this._container;\n\t\tvar positionName = this._style.position;\n\t\tvar sizeName = this._style.cammelSize;\n\n\t\tif (!container || root === container) {\n\t\t\tthis._containerPosition = 0;\n\t\t} else {\n\t\t\tvar rootRect = ((0, _utils.isWindow)(root) ? document.body : root).getBoundingClientRect();\n\t\t\tvar containertRect = container.getBoundingClientRect();\n\n\t\t\tthis._containerPosition = containertRect[positionName] - rootRect[positionName];\n\t\t}\n\t\tthis._rootSize = (0, _utils.isWindow)(root) ? window[\"inner\" + sizeName] || document.documentElement[\"client\" + sizeName] : root[\"client\" + sizeName];\n\t\tif (_consts.isMobile & (0, _utils.isWindow)(root)) {\n\t\t\tvar bodyWidth = document.body.offsetWidth || document.documentElement.offsetWidth;\n\t\t\tvar windowWidth = window.innerWidth;\n\n\t\t\tthis._rootSize = this._rootSize / (bodyWidth / windowWidth);\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\t_this._checkParallaxItem(item.el);\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Scrolls the image in the item by a parallax.\n * @ko 스크롤하면 아이템안의 이미지를 시차적용시킨다.\n * @method eg.Parallax#refresh\n * @param {Array} [items = []] Items to apply parallax. It does not apply if it is not in visible range. parallax를 적용할 아이템들. 가시거리에 존재하지 않으면 적용이 안된다.\n * @param {Number} [scrollPositionStart = 0] The scroll position.\n * @return {eg.Parallax} An instance of a module itself모듈 자신의 인스턴스\n * @example\n ```js\n document.body.addEventListener(\"scroll\", function (e) {\n parallax.refresh(items, e.scrollTop);\n });\n ```\n */\n\n\n\tParallax.prototype.refresh = function refresh() {\n\t\tvar _this2 = this;\n\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar scrollPositionStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n\t\tvar styleNames = this._style;\n\t\tvar positionName = styleNames.position;\n\t\tvar coordinateName = styleNames.coordinate;\n\t\tvar sizeName = styleNames.size;\n\t\tvar options = this.options;\n\t\tvar strength = options.strength,\n\t\t center = options.center,\n\t\t range = options.range,\n\t\t align = options.align;\n\n\t\tvar rootSize = this._rootSize;\n\t\tvar scrollPositionEnd = scrollPositionStart + rootSize;\n\t\tvar containerPosition = this._containerPosition;\n\n\t\titems.forEach(function (item) {\n\t\t\tif (!item.rect || !item.size || !item.el) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar position = containerPosition + item.rect[positionName];\n\t\t\tvar itemSize = item.rect[sizeName] || item.size[sizeName];\n\n\t\t\t// check item is in container.\n\t\t\tif (scrollPositionStart > position + itemSize || scrollPositionEnd < position) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar el = item.el;\n\n\t\t\tif (!el.__IMAGE__) {\n\t\t\t\t_this2._checkParallaxItem(el);\n\t\t\t}\n\t\t\tif (el.__IMAGE__ === -1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar imageElement = el.__IMAGE__;\n\t\t\tvar boxElement = el.__BOX__;\n\t\t\tvar boxSize = boxElement.__SIZE__;\n\t\t\tvar imageSize = imageElement.__SIZE__;\n\n\t\t\t// no parallax\n\t\t\tif (boxSize >= imageSize) {\n\t\t\t\t// remove transform style\n\t\t\t\timageElement.style[TRANSFORM] = \"\";\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if area's position is center, ratio is 0.\n\t\t\t// if area is hidden at the top, ratio is 1.\n\t\t\t// if area is hidden at the bottom, ratio is -1.\n\t\t\tvar imagePosition = position + boxSize / 2;\n\t\t\tvar ratio = (scrollPositionStart + rootSize / 2 - (rootSize + boxSize) / 2 * center - imagePosition) / (rootSize + boxSize) * 2 * strength;\n\n\t\t\t// if ratio is out of the range of -1 and 1, show empty space.\n\t\t\tratio = Math.max(Math.min(ratio, range[1]), range[0]);\n\n\t\t\t// dist is the position when thumnail's image is centered.\n\t\t\tvar dist = (boxSize - imageSize) / 2;\n\t\t\tvar translate = dist * (1 - ratio);\n\n\t\t\tif (align === CENTER) {\n\t\t\t\ttranslate -= dist;\n\t\t\t}\n\n\t\t\timageElement.__TRANSLATE__ = translate;\n\t\t\timageElement.__RATIO__ = ratio;\n\t\t\timageElement.style[TRANSFORM] = \"translate\" + coordinateName + \"(\" + translate + \"px)\";\n\t\t});\n\t\treturn this;\n\t};\n\n\treturn Parallax;\n}();\n\nmodule.exports = Parallax;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Parallax.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\nexports.STYLE = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.toArray = toArray;\nexports.matchHTML = matchHTML;\nexports.$ = $;\nexports.addEvent = addEvent;\nexports.removeEvent = removeEvent;\nexports.scroll = scroll;\nexports.scrollTo = scrollTo;\nexports.scrollBy = scrollBy;\nexports.getStyles = getStyles;\nexports.innerWidth = innerWidth;\nexports.innerHeight = innerHeight;\nexports.getStyleNames = getStyleNames;\nexports.assignOptions = assignOptions;\nexports.toZeroArray = toZeroArray;\nexports.isWindow = isWindow;\nexports.fill = fill;\n\nvar _browser = require(\"./browser\");\n\nvar _consts = require(\"./consts\");\n\nfunction toArray(nodes) {\n\t// SCRIPT5014 in IE8\n\tvar array = [];\n\n\tif (nodes) {\n\t\tfor (var i = 0, len = nodes.length; i < len; i++) {\n\t\t\tarray.push(nodes[i]);\n\t\t}\n\t}\n\treturn array;\n}\nfunction matchHTML(html) {\n\treturn html.match(/^<([A-z]+)\\s*([^>]*)>/);\n}\n/**\n * Select or create element\n * @param {String|HTMLElement|jQuery} param\n * when string given is as HTML tag, then create element\n * otherwise it returns selected elements\n * @param {Boolean} multi\n * @returns {HTMLElement}\n */\nfunction $(param) {\n\tvar multi = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n\tvar el = void 0;\n\n\tif (typeof param === \"string\") {\n\t\t// String (HTML, Selector)\n\t\t// check if string is HTML tag format\n\t\tvar match = matchHTML(param);\n\n\t\t// creating element\n\t\tif (match) {\n\t\t\t// HTML\n\t\t\tvar dummy = _browser.document.createElement(\"div\");\n\n\t\t\tdummy.innerHTML = param;\n\t\t\tel = dummy.childNodes;\n\t\t} else {\n\t\t\t// Selector\n\t\t\tel = _browser.document.querySelectorAll(param);\n\t\t}\n\t\tif (multi) {\n\t\t\tel = toArray(el);\n\t\t} else {\n\t\t\tel = el && el.length > 0 && el[0] || undefined;\n\t\t}\n\t} else if (param === _browser.window) {\n\t\t// window\n\t\tel = param;\n\t} else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) {\n\t\t// HTMLElement, Document\n\t\tel = param;\n\t} else if (\"jQuery\" in _browser.window && param instanceof _browser.window.jQuery || param.constructor.prototype.jquery) {\n\t\t// jQuery\n\t\tel = multi ? param.toArray() : param.get(0);\n\t} else if (Array.isArray(param)) {\n\t\tel = param.map(function (v) {\n\t\t\treturn $(v);\n\t\t});\n\t\tif (!multi) {\n\t\t\tel = el.length >= 1 ? el[0] : undefined;\n\t\t}\n\t}\n\treturn el;\n}\nfunction addEvent(element, type, handler, eventListenerOptions) {\n\tif (_consts.SUPPORT_ADDEVENTLISTENER) {\n\t\tvar options = eventListenerOptions || false;\n\n\t\tif ((typeof eventListenerOptions === \"undefined\" ? \"undefined\" : _typeof(eventListenerOptions)) === \"object\") {\n\t\t\toptions = _consts.SUPPORT_PASSIVE ? eventListenerOptions : false;\n\t\t}\n\t\telement.addEventListener(type, handler, options);\n\t} else if (element.attachEvent) {\n\t\telement.attachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = handler;\n\t}\n}\nfunction removeEvent(element, type, handler) {\n\tif (element.removeEventListener) {\n\t\telement.removeEventListener(type, handler, false);\n\t} else if (element.detachEvent) {\n\t\telement.detachEvent(\"on\" + type, handler);\n\t} else {\n\t\telement[\"on\" + type] = null;\n\t}\n}\nfunction scroll(el, isVertical) {\n\tvar prop = \"scroll\" + (isVertical ? \"Top\" : \"Left\");\n\n\tif (el === _browser.window) {\n\t\treturn _browser.window[isVertical ? \"pageYOffset\" : \"pageXOffset\"] || _browser.document.body[prop] || _browser.document.documentElement[prop];\n\t} else {\n\t\treturn el[prop];\n\t}\n}\nfunction scrollTo(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scroll(x, y);\n\t} else {\n\t\tel.scrollLeft = x;\n\t\tel.scrollTop = y;\n\t}\n}\nfunction scrollBy(el, x, y) {\n\tif (el === _browser.window) {\n\t\tel.scrollBy(x, y);\n\t} else {\n\t\tel.scrollLeft += x;\n\t\tel.scrollTop += y;\n\t}\n}\nfunction getStyles(el) {\n\treturn _consts.SUPPORT_COMPUTEDSTYLE ? _browser.window.getComputedStyle(el) : el.currentStyle;\n}\nfunction _getSize(el, name) {\n\tif (el === _browser.window) {\n\t\t// WINDOW\n\t\treturn el.document.documentElement[\"client\" + name];\n\t} else if (el.nodeType === 9) {\n\t\t// DOCUMENT_NODE\n\t\tvar doc = el.documentElement;\n\n\t\treturn Math.max(el.body[\"scroll\" + name], doc[\"scroll\" + name], el.body[\"offset\" + name], doc[\"offset\" + name], doc[\"client\" + name]);\n\t} else {\n\t\t// NODE\n\t\tvar style = getStyles(el);\n\t\tvar value = style[name.toLowerCase()];\n\n\t\treturn parseFloat(/auto|%/.test(value) ? el[\"offset\" + name] : style[name.toLowerCase()]);\n\t}\n}\nfunction innerWidth(el) {\n\treturn _getSize(el, \"Width\");\n}\nfunction innerHeight(el) {\n\treturn _getSize(el, \"Height\");\n}\nvar STYLE = exports.STYLE = {\n\tvertical: {\n\t\tpos1: \"top\",\n\t\tendPos1: \"bottom\",\n\t\tsize1: \"height\",\n\t\tpos2: \"left\",\n\t\tendPos2: \"right\",\n\t\tsize2: \"width\"\n\t},\n\thorizontal: {\n\t\tpos1: \"left\",\n\t\tendPos1: \"right\",\n\t\tsize1: \"width\",\n\t\tpos2: \"top\",\n\t\tendPos2: \"bottom\",\n\t\tsize2: \"height\"\n\t}\n};\n\nfunction getStyleNames(isHorizontal) {\n\treturn STYLE[isHorizontal ? _consts.HORIZONTAL : _consts.VERTICAL];\n}\n\nfunction assignOptions(defaultOptions, options) {\n\treturn _extends({}, _consts.DEFAULT_OPTIONS, defaultOptions, options);\n}\n\nfunction toZeroArray(outline) {\n\tif (!outline || !outline.length) {\n\t\treturn [0];\n\t}\n\treturn outline;\n}\n\nfunction isWindow(el) {\n\treturn el === _browser.window;\n}\n\nfunction fill(arr, value) {\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tarr[i] = value;\n\t}\n\n\treturn arr;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 3\n// module chunks = 0 1"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}