diff --git a/dist/infinitegrid.js b/dist/infinitegrid.js index 1475d974e..c232276f2 100644 --- a/dist/infinitegrid.js +++ b/dist/infinitegrid.js @@ -7,5 +7,5 @@ * * @version 3.0.0-rc */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@egjs/component")):"function"==typeof define&&define.amd?define(["@egjs/component"],e):"object"==typeof exports?exports.InfiniteGrid=e(require("@egjs/component")):(t.eg=t.eg||{},t.eg.InfiniteGrid=e(t.eg.Component))}(this,function(t){return function(t){function __webpack_require__(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}var e={};return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,i){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=5)}([function(t,e,i){"use strict";e.__esModule=!0,e.DEFENSE_BROWSER=e.PROCESSING=e.LOADING_PREPEND=e.LOADING_APPEND=e.ALIGN=e.isMobile=e.agent=e.DEFAULT_OPTIONS=e.GROUPKEY_ATT=e.DUMMY_POSITION=e.SINGLE=e.MULTI=e.NO_TRUSTED=e.TRUSTED=e.NO_CACHE=e.CACHE=e.HORIZONTAL=e.VERTICAL=e.PREPEND=e.APPEND=e.CONTAINER_CLASSNAME=e.RETRY=e.IS_ANDROID2=e.IS_IOS=e.IS_IE=e.SUPPORT_PASSIVE=e.SUPPORT_ADDEVENTLISTENER=e.SUPPORT_COMPUTEDSTYLE=undefined;var n=i(2),r=n.window.navigator.userAgent,o=(e.SUPPORT_COMPUTEDSTYLE=!!("getComputedStyle"in n.window),e.SUPPORT_ADDEVENTLISTENER=!!("addEventListener"in document)),s=(e.SUPPORT_PASSIVE=function(){var t=!1;try{o&&Object.defineProperty&&document.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t=!0}}))}catch(e){}return t}(),e.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),e.IS_IOS=/iPhone|iPad/.test(r),e.IS_ANDROID2=/Android 2\./.test(r),e.RETRY=3,e.CONTAINER_CLASSNAME="_eg-infinitegrid-container_",e.APPEND=!0,e.PREPEND=!1,e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.CACHE=!0,e.NO_CACHE=!1,e.TRUSTED=!0,e.NO_TRUSTED=!1,e.MULTI=!0,e.SINGLE=!1,e.DUMMY_POSITION=-1e5,e.GROUPKEY_ATT="data-groupkey",e.DEFAULT_OPTIONS={horizontal:!1,margin:0},e.agent=navigator.userAgent.toLowerCase());e.isMobile=/mobi|ios|android/.test(s),e.ALIGN={START:"start",CENTER:"center",END:"end",JUSTIFY:"justify"},e.LOADING_APPEND=1,e.LOADING_PREPEND=2,e.PROCESSING=4,e.DEFENSE_BROWSER=/android/.test(s);alert(s)},function(t,e,i){"use strict";function toArray(t){var e=[];if(t)for(var i=0,n=t.length;i1&&arguments[1]!==undefined&&arguments[1],i=void 0;if("string"==typeof t){if(t.match(/^<([A-z]+)\s*([^>]*)>/)){var n=o.document.createElement("div");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement["client"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t["offset"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;"object"===(void 0===n?"undefined":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null},e.scroll=function(t,e){var i="scroll"+(e?"Top":"Left");return t===o.window?o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,"Width")},e.innerHeight=function(t){return _getSize(t,"Height")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:"top",endPos1:"bottom",size1:"height",pos2:"left",endPos2:"right",size2:"width"},horizontal:{pos1:"left",endPos1:"right",size1:"width",pos2:"top",endPos2:"bottom",size2:"height"}}},function(t,e,i){"use strict";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=getShapes(this.options.frame.map(function(t){return t.slice()}));this._itemSize=this.options.itemSize||0,this._shapes=e,this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return FrameLayout.prototype._getItemSize=function(){return this._checkItemSize(),this._itemSize},FrameLayout.prototype._checkItemSize=function(){if(this.options.itemSize)this._itemSize=this.options.itemSize;else{var t=this._style.size2,e=this.options.margin;this._itemSize=(this._size+e)/this._shapes[t]-e}},FrameLayout.prototype._layout=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,o=this._style,a=this.options,u=a.margin,h=a.frameFill,c=o.size1,l=o.size2,p=o.pos1,f=o.pos2,d=this._getItemSize(),_="object"===(void 0===d?"undefined":r(d)),g=_?d[l]:d,y=_?d[c]:d,m=this._shapes[l],v=this._shapes.shapes,S=v.length,E=(0,s.fill)(m,-99999),I=(0,s.fill)(m,-99999),w=0,O=0,P=-1,C=-1,z=-1,M=-1;if(!S)return{start:e,end:e,startIndex:P,endIndex:C};for(var L=0;LG&&(z=G,P=L+b),M0&&arguments[0]!==undefined&&arguments[0]?"_getItems":"_getVisibleItems"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck("items",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck("items",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge("start",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge("end",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,"start"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"after";if(!this.options.useRecycle)return this._fit=function(){return 0},0;if(this._layout){var e=this._getEdgeValue("start"),i=this._status.loadingSize;return(0!==e||i)&&(this._isLoading()||this._process(c.PROCESSING),"before"===t&&(this._renderer.scrollBy(-Math.abs(e)+i),this._watcher.setScrollPos()),this._items.fit(e-i,this._isVertical),a["default"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue("end")||i),"after"===t&&(this._renderer.scrollBy(Math.abs(e)+i),this._watcher.setScrollPos()),this._isLoading()||this._process(c.PROCESSING,!1)),e}return 0},InfiniteGrid.prototype._getEdgeValue=function(t){return this._items.getEdgeValue(t,this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype.layout=function(){var t=this,e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,"start")),i.length?(this._layout.layout(i,n),e?(this._items.set(i),this._status.startCursor=0,this._status.endCursor=i.length-1):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED),a["default"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a["default"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck("items",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck("items",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype._initLoadingBar=function(){var t=this.options.loadingBar,e="object"===(void 0===t?"undefined":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=e;for(var i in e)e[i]=(0,l.$)(e[i]);return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.procesingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.procesingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.procesingStatus|=t:this._status.procesingStatus-=this._status.procesingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){this._process(c.PROCESSING);var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s["default"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==n&&-1!==r&&(r=(n=this._status.startCursor+n)+r,a["default"].removeItems(this._items.pluck("items",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?"append":"prepend"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:"block"};if(this._isLoading())return this;var i=t?"append":"prepend";if(this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),!this._loadingBar[i])return this;var n=t?this._getEdgeValue("end"):0;return this._renderLoading(t,n,e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue("end")+this._status.loadingSize):this._fit("before"),this},InfiniteGrid.prototype._renderLoading=function(t,e){var i,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this._status.loadingStyle,o=this._loadingBar[t?"append":"prepend"];if(o){var s=n((i={position:"absolute"},i[this._isVertical?"top":"left"]=e+"px",i),r);for(var a in s)o.style[a]=s[a];this._status.loadingSize=this._isVertical?(0,l.innerHeight)(o):(0,l.innerWidth)(o)}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:"none"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?"append":"prepend",o=this._loadingBar[r],s=this._loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var a=n((t={},t[this._isVertical?"top":"left"]=-s+"px",t),e);for(var u in a)o.style[u]=a[u];return i||this._fit("before"),this._renderer.setContainerSize(this._getEdgeValue("end")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this;if(t)this._renderer.createAndInsert(e,i),this._updateCursor(i),this.options.useRecycle&&this._recycle(i),this._onLayoutComplete(e,i,n);else{var o=i?"append":"prepend";this._renderer[o](e),u["default"].check(e.map(function(t){return t.el}),function(){var t=r._layout[o](r._renderer.updateSize(e),r._items.getOutline(i?r._status.endCursor:r._status.startCursor,i?"end":"start"));r._insertItems(t,i),r._updateCursor(i),r.options.useRecycle&&r._recycle(i),a["default"].renderItems(t.items),r._onLayoutComplete(t.items,i,n)})}},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,"start")),i=Math.max.apply(Math,this._items.getOutline(t,"end")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?"append":"prepend"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger("append",{isTrusted:!0,groupKey:this.getGroupKeys().pop()})},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger("prepend",{isTrusted:!0,groupKey:this.getGroupKeys().shift()})},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;if(this.trigger("change",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r}),!this.isProcessing()){var o=this._getEdgeOffset(e?"end":"start");if(o){var s=e?o[n?"left":"top"]-this._renderer.getViewSize():o[n?"right":"bottom"];e?i>=s&&this._requestAppend():i<=s&&(this._fit("before"),this._requestPrepend())}}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2];this._updateEdge();var n=this._getEdgeValue("end");this._renderer.setContainerSize(n+this._status.loadingSize),e?this._isLoading()&&this._renderLoading(!0,n):this._fit("after"),this._process(c.PROCESSING,!1),this.trigger("layoutComplete",{target:t.concat(),isAppend:e,isTrusted:i,scrollPos:this._watcher.getScrollPos(),orgScrollPos:this._watcher.getOrgScrollPos(),size:n}),this._watcher.reset()},InfiniteGrid.prototype._reset=function(){this._status={procesingStatus:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o["default"]);p.VERSION="3.0.0-rc",e["default"]=p,t.exports=e["default"]},function(e,i){e.exports=t},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=i(0),r=function(t){return t&&t.__esModule?t:{"default":t}}(i(3)),o=i(1),s=function(){function ItemManager(){_classCallCheck(this,ItemManager),this.clear()}return ItemManager.from=function(t,e,i){var r=i.groupKey,s=(i.isAppend,ItemManager.selectItems((0,o.$)(t,n.MULTI),e));return(0,o.toArray)(s).map(function(t){return{el:t,groupKey:r,content:t.outerHTML}})},ItemManager.selectItems=function(t,e){return t.filter(function(t){return"*"===e?t:t.className.split(" ").some(function(t){return t===e})})},ItemManager.pluck=function(t,e){return t.reduce(function(t,i){return t.concat(i[e])},[])},ItemManager.prototype.getStatus=function(){return{_data:this._data.map(function(t){return t.items=t.items.map(function(t){return delete t.el,t}),t})}},ItemManager.prototype.setStatus=function(t,e,i){for(var n=t._data,o=e;o<=i;o++)n[o].items=r["default"].createElements(n[o].items);this.set(n)},ItemManager.prototype.size=function(){return this._data.length},ItemManager.prototype.fit=function(t,e){if(this._data.length){var i=e?"top":"left";0!==t&&(this._data=this._data.map(function(e){return e.items=e.items.map(function(e){return e.rect[i]-=t,e}),e.outlines.start=e.outlines.start.map(function(e){return e-t}),e.outlines.end=e.outlines.end.map(function(e){return e-t}),e}))}},ItemManager.prototype.pluck=function(t,e,i){return void 0!==e?void 0!==i?ItemManager.pluck(this._data.slice(e,i+1),t):ItemManager.pluck(this._data.slice(e,e+1),t):ItemManager.pluck(this._data,t)},ItemManager.prototype.getOutline=function(t,e){return this._data.length?this._data[t].outlines[e]:[]},ItemManager.prototype.getEdgeIndex=function(t,e,i){for(var n="start"===t?"min":"max",r=-1,o="start"===t?Infinity:-Infinity,s=e;s<=i;s++){var a=Math[n].apply(Math,this.getOutline(s,t));("start"===t&&o>a||"end"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck("outlines",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math["start"===t?"min":"max"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var r=null,o=t.getAttribute(n.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return r;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e["default"]=o,t.exports=e["default"]},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,"scroll",this._onCheck),(0,o.addEvent)(window,"resize",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getOrgScrollPos(),e=this.getScrollPos();this.setScrollPos(t);var i=this.getScrollPos();r.IS_IOS&&(0===t||null===e)||e===i||this._callback.check&&this._callback.check({isForward:e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?"left":"top";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?"height":"width",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,p=s.pos1,f=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?"min":"max",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;return this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?"min":"max"].apply(Math,e)||0)),{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e["default"]=c,t.exports=e["default"]},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function makeShapeOutline(t,e,i,n){var o=Math[n?"min":"max"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute("column")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{"default":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return _classCallCheck(this,SquareLayout),_possibleConstructorReturn(this,t.apply(this,arguments))}return _inherits(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=makeShapeOutline(n,s,u,o),l=o?"min":"max",p=[],f=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+f*P]<=v||!o&&c[S+f*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],p.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var C=0;C0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,p=0;p<2;++p){var f=void 0,d=void 0,_=void 0,g=void 0;0===p?(f=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),f=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-f);var y=f*d,m=f/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===p,o.width=f,o.height=d,s.width=_,s.height=g)}}),fitArea(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,p=this._size*(a?u:1),f=this._size/(a?1:u),d=a?p:f,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r["default"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r["default"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(p+h,f+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r["default"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,""),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i["node"+h]=Math.pow(c,2))}return i},"node0","node"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,p=l,f=0,d=0;dc)&&(r[p]=c,o.push({value:p,cost:c}),n[p]=a)}if("undefined"==typeof r[i]){var f=["Could not find a path from ",e," to ",i,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)1&&arguments[1]!==undefined&&arguments[1],i=void 0;if("string"==typeof t){if(t.match(/^<([A-z]+)\s*([^>]*)>/)){var n=o.document.createElement("div");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement["client"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t["offset"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;"object"===(void 0===n?"undefined":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null},e.scroll=function(t,e){var i="scroll"+(e?"Top":"Left");return t===o.window?o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,"Width")},e.innerHeight=function(t){return _getSize(t,"Height")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:"top",endPos1:"bottom",size1:"height",pos2:"left",endPos2:"right",size2:"width"},horizontal:{pos1:"left",endPos1:"right",size1:"width",pos2:"top",endPos2:"bottom",size2:"height"}}},function(t,e,i){"use strict";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defense(t){var e=document.createElement("div");e.className=r.CONTAINER_CLASSNAME,e.style.height="100%";for(var i=t.children,n=i.length,o=0;o0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=getShapes(this.options.frame.map(function(t){return t.slice()}));this._itemSize=this.options.itemSize||0,this._shapes=e,this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return FrameLayout.prototype._getItemSize=function(){return this._checkItemSize(),this._itemSize},FrameLayout.prototype._checkItemSize=function(){if(this.options.itemSize)this._itemSize=this.options.itemSize;else{var t=this._style.size2,e=this.options.margin;this._itemSize=(this._size+e)/this._shapes[t]-e}},FrameLayout.prototype._layout=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,o=this._style,a=this.options,u=a.margin,h=a.frameFill,c=o.size1,l=o.size2,p=o.pos1,f=o.pos2,d=this._getItemSize(),_="object"===(void 0===d?"undefined":r(d)),g=_?d[l]:d,y=_?d[c]:d,m=this._shapes[l],v=this._shapes.shapes,S=v.length,E=(0,s.fill)(m,-99999),I=(0,s.fill)(m,-99999),w=0,O=0,P=-1,C=-1,z=-1,M=-1;if(!S)return{start:e,end:e,startIndex:P,endIndex:C};for(var L=0;LG&&(z=G,P=L+R),M0&&arguments[0]!==undefined&&arguments[0]?"_getItems":"_getVisibleItems"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck("items",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck("items",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge("start",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge("end",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,"start"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"after";if(!this.options.useRecycle)return this._fit=function(){return 0},0;if(this._layout){var e=this._getEdgeValue("start"),i=this._status.loadingSize;return(0!==e||i)&&(this._isLoading()||this._process(c.PROCESSING),"before"===t&&(this._renderer.scrollBy(-Math.abs(e)+i),this._watcher.setScrollPos()),this._items.fit(e-i,this._isVertical),a["default"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue("end")||i),"after"===t&&(this._renderer.scrollBy(Math.abs(e)+i),this._watcher.setScrollPos()),this._isLoading()||this._process(c.PROCESSING,!1)),e}return 0},InfiniteGrid.prototype._getEdgeValue=function(t){return this._items.getEdgeValue(t,this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype.layout=function(){var t=this,e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,"start")),i.length?(this._layout.layout(i,n),e?(this._items.set(i),this._status.startCursor=0,this._status.endCursor=i.length-1):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED),a["default"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a["default"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck("items",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck("items",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype._initLoadingBar=function(){var t=this.options.loadingBar,e="object"===(void 0===t?"undefined":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=e;for(var i in e)e[i]=(0,l.$)(e[i]);return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.procesingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.procesingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.procesingStatus|=t:this._status.procesingStatus-=this._status.procesingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){this._process(c.PROCESSING);var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s["default"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==n&&-1!==r&&(r=(n=this._status.startCursor+n)+r,a["default"].removeItems(this._items.pluck("items",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?"append":"prepend"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:"block"};if(this._isLoading())return this;var i=t?"append":"prepend";if(this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),!this._loadingBar[i])return this;var n=t?this._getEdgeValue("end"):0;return this._renderLoading(t,n,e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue("end")+this._status.loadingSize):this._fit("before"),this},InfiniteGrid.prototype._renderLoading=function(t,e){var i,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this._status.loadingStyle,o=this._loadingBar[t?"append":"prepend"];if(o){var s=n((i={position:"absolute"},i[this._isVertical?"top":"left"]=e+"px",i),r);for(var a in s)o.style[a]=s[a];this._status.loadingSize=this._isVertical?(0,l.innerHeight)(o):(0,l.innerWidth)(o)}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:"none"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?"append":"prepend",o=this._loadingBar[r],s=this._loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var a=n((t={},t[this._isVertical?"top":"left"]=-s+"px",t),e);for(var u in a)o.style[u]=a[u];return i||this._fit("before"),this._renderer.setContainerSize(this._getEdgeValue("end")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this;if(t)this._renderer.createAndInsert(e,i),this._updateCursor(i),this.options.useRecycle&&this._recycle(i),this._onLayoutComplete(e,i,n);else{var o=i?"append":"prepend";this._renderer[o](e),u["default"].check(e.map(function(t){return t.el}),function(){var t=r._layout[o](r._renderer.updateSize(e),r._items.getOutline(i?r._status.endCursor:r._status.startCursor,i?"end":"start"));r._insertItems(t,i),r._updateCursor(i),r.options.useRecycle&&r._recycle(i),a["default"].renderItems(t.items),r._onLayoutComplete(t.items,i,n)})}},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,"start")),i=Math.max.apply(Math,this._items.getOutline(t,"end")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?"append":"prepend"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger("append",{isTrusted:!0,groupKey:this.getGroupKeys().pop()})},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger("prepend",{isTrusted:!0,groupKey:this.getGroupKeys().shift()})},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;if(this.trigger("change",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r}),!this.isProcessing()){var o=this._getEdgeOffset(e?"end":"start");if(o){var s=e?o[n?"left":"top"]-this._renderer.getViewSize():o[n?"right":"bottom"];e?i>=s&&this._requestAppend():i<=s&&(this._fit("before"),this._requestPrepend())}}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2];this._updateEdge();var n=this._getEdgeValue("end");this._renderer.setContainerSize(n+this._status.loadingSize),e?this._isLoading()&&this._renderLoading(!0,n):this._fit("after"),this._process(c.PROCESSING,!1),this.trigger("layoutComplete",{target:t.concat(),isAppend:e,isTrusted:i,scrollPos:this._watcher.getScrollPos(),orgScrollPos:this._watcher.getOrgScrollPos(),size:n}),this._watcher.reset()},InfiniteGrid.prototype._reset=function(){this._status={procesingStatus:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o["default"]);p.VERSION="3.0.0-rc",e["default"]=p,t.exports=e["default"]},function(e,i){e.exports=t},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=i(0),r=function(t){return t&&t.__esModule?t:{"default":t}}(i(3)),o=i(1),s=function(){function ItemManager(){_classCallCheck(this,ItemManager),this.clear()}return ItemManager.from=function(t,e,i){var r=i.groupKey,s=(i.isAppend,ItemManager.selectItems((0,o.$)(t,n.MULTI),e));return(0,o.toArray)(s).map(function(t){return{el:t,groupKey:r,content:t.outerHTML}})},ItemManager.selectItems=function(t,e){return t.filter(function(t){return"*"===e?t:t.className.split(" ").some(function(t){return t===e})})},ItemManager.pluck=function(t,e){return t.reduce(function(t,i){return t.concat(i[e])},[])},ItemManager.prototype.getStatus=function(){return{_data:this._data.map(function(t){return t.items=t.items.map(function(t){return delete t.el,t}),t})}},ItemManager.prototype.setStatus=function(t,e,i){for(var n=t._data,o=e;o<=i;o++)n[o].items=r["default"].createElements(n[o].items);this.set(n)},ItemManager.prototype.size=function(){return this._data.length},ItemManager.prototype.fit=function(t,e){if(this._data.length){var i=e?"top":"left";0!==t&&(this._data=this._data.map(function(e){return e.items=e.items.map(function(e){return e.rect[i]-=t,e}),e.outlines.start=e.outlines.start.map(function(e){return e-t}),e.outlines.end=e.outlines.end.map(function(e){return e-t}),e}))}},ItemManager.prototype.pluck=function(t,e,i){return void 0!==e?void 0!==i?ItemManager.pluck(this._data.slice(e,i+1),t):ItemManager.pluck(this._data.slice(e,e+1),t):ItemManager.pluck(this._data,t)},ItemManager.prototype.getOutline=function(t,e){return this._data.length?this._data[t].outlines[e]:[]},ItemManager.prototype.getEdgeIndex=function(t,e,i){for(var n="start"===t?"min":"max",r=-1,o="start"===t?Infinity:-Infinity,s=e;s<=i;s++){var a=Math[n].apply(Math,this.getOutline(s,t));("start"===t&&o>a||"end"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck("outlines",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math["start"===t?"min":"max"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var r=null,o=t.getAttribute(n.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return r;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e["default"]=o,t.exports=e["default"]},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,"scroll",this._onCheck),(0,o.addEvent)(window,"resize",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getOrgScrollPos(),e=this.getScrollPos();this.setScrollPos(t);var i=this.getScrollPos();r.IS_IOS&&(0===t||null===e)||e===i||this._callback.check&&this._callback.check({isForward:e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?"left":"top";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?"height":"width",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,p=s.pos1,f=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?"min":"max",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;return this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?"min":"max"].apply(Math,e)||0)),{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e["default"]=c,t.exports=e["default"]},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function makeShapeOutline(t,e,i,n){var o=Math[n?"min":"max"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute("column")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{"default":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return _classCallCheck(this,SquareLayout),_possibleConstructorReturn(this,t.apply(this,arguments))}return _inherits(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=makeShapeOutline(n,s,u,o),l=o?"min":"max",p=[],f=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+f*P]<=v||!o&&c[S+f*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],p.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var C=0;C0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,p=0;p<2;++p){var f=void 0,d=void 0,_=void 0,g=void 0;0===p?(f=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),f=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-f);var y=f*d,m=f/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===p,o.width=f,o.height=d,s.width=_,s.height=g)}}),fitArea(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,p=this._size*(a?u:1),f=this._size/(a?1:u),d=a?p:f,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r["default"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r["default"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(p+h,f+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r["default"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,""),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i["node"+h]=Math.pow(c,2))}return i},"node0","node"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,p=l,f=0,d=0;dc)&&(r[p]=c,o.push({value:p,cost:c}),n[p]=a)}if("undefined"==typeof r[i]){var f=["Could not find a path from ",e," to ",i,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)1&&arguments[1]!==undefined&&arguments[1],i=void 0;if(\"string\"==typeof t){if(t.match(/^<([A-z]+)\\s*([^>]*)>/)){var n=o.document.createElement(\"div\");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?\"jQuery\"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement[\"client\"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body[\"scroll\"+e],i[\"scroll\"+e],t.body[\"offset\"+e],i[\"offset\"+e],i[\"client\"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t[\"offset\"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;\"object\"===(void 0===n?\"undefined\":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent(\"on\"+e,i):t[\"on\"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent(\"on\"+e,i):t[\"on\"+e]=null},e.scroll=function(t,e){var i=\"scroll\"+(e?\"Top\":\"Left\");return t===o.window?o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,\"Width\")},e.innerHeight=function(t){return _getSize(t,\"Height\")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:\"top\",endPos1:\"bottom\",size1:\"height\",pos2:\"left\",endPos2:\"right\",size2:\"width\"},horizontal:{pos1:\"left\",endPos1:\"right\",size1:\"width\",pos2:\"top\",endPos2:\"bottom\",size2:\"height\"}}},function(t,e,i){\"use strict\";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=getShapes(this.options.frame.map(function(t){return t.slice()}));this._itemSize=this.options.itemSize||0,this._shapes=e,this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return FrameLayout.prototype._getItemSize=function(){return this._checkItemSize(),this._itemSize},FrameLayout.prototype._checkItemSize=function(){if(this.options.itemSize)this._itemSize=this.options.itemSize;else{var t=this._style.size2,e=this.options.margin;this._itemSize=(this._size+e)/this._shapes[t]-e}},FrameLayout.prototype._layout=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,o=this._style,a=this.options,u=a.margin,h=a.frameFill,c=o.size1,l=o.size2,p=o.pos1,f=o.pos2,d=this._getItemSize(),_=\"object\"===(void 0===d?\"undefined\":r(d)),g=_?d[l]:d,y=_?d[c]:d,m=this._shapes[l],v=this._shapes.shapes,S=v.length,E=(0,s.fill)(m,-99999),I=(0,s.fill)(m,-99999),w=0,O=0,P=-1,C=-1,z=-1,M=-1;if(!S)return{start:e,end:e,startIndex:P,endIndex:C};for(var L=0;LG&&(z=G,P=L+b),M0&&arguments[0]!==undefined&&arguments[0]?\"_getItems\":\"_getVisibleItems\"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck(\"items\",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck(\"items\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge(\"start\",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge(\"end\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,\"start\"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:\"after\";if(!this.options.useRecycle)return this._fit=function(){return 0},0;if(this._layout){var e=this._getEdgeValue(\"start\"),i=this._status.loadingSize;return(0!==e||i)&&(this._isLoading()||this._process(c.PROCESSING),\"before\"===t&&(this._renderer.scrollBy(-Math.abs(e)+i),this._watcher.setScrollPos()),this._items.fit(e-i,this._isVertical),a[\"default\"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue(\"end\")||i),\"after\"===t&&(this._renderer.scrollBy(Math.abs(e)+i),this._watcher.setScrollPos()),this._isLoading()||this._process(c.PROCESSING,!1)),e}return 0},InfiniteGrid.prototype._getEdgeValue=function(t){return this._items.getEdgeValue(t,this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype.layout=function(){var t=this,e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,\"start\")),i.length?(this._layout.layout(i,n),e?(this._items.set(i),this._status.startCursor=0,this._status.endCursor=i.length-1):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED),a[\"default\"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a[\"default\"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck(\"items\",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck(\"items\",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype._initLoadingBar=function(){var t=this.options.loadingBar,e=\"object\"===(void 0===t?\"undefined\":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=e;for(var i in e)e[i]=(0,l.$)(e[i]);return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.procesingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.procesingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.procesingStatus|=t:this._status.procesingStatus-=this._status.procesingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){this._process(c.PROCESSING);var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s[\"default\"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==n&&-1!==r&&(r=(n=this._status.startCursor+n)+r,a[\"default\"].removeItems(this._items.pluck(\"items\",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?\"append\":\"prepend\"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:\"block\"};if(this._isLoading())return this;var i=t?\"append\":\"prepend\";if(this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),!this._loadingBar[i])return this;var n=t?this._getEdgeValue(\"end\"):0;return this._renderLoading(t,n,e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue(\"end\")+this._status.loadingSize):this._fit(\"before\"),this},InfiniteGrid.prototype._renderLoading=function(t,e){var i,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this._status.loadingStyle,o=this._loadingBar[t?\"append\":\"prepend\"];if(o){var s=n((i={position:\"absolute\"},i[this._isVertical?\"top\":\"left\"]=e+\"px\",i),r);for(var a in s)o.style[a]=s[a];this._status.loadingSize=this._isVertical?(0,l.innerHeight)(o):(0,l.innerWidth)(o)}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:\"none\"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?\"append\":\"prepend\",o=this._loadingBar[r],s=this._loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var a=n((t={},t[this._isVertical?\"top\":\"left\"]=-s+\"px\",t),e);for(var u in a)o.style[u]=a[u];return i||this._fit(\"before\"),this._renderer.setContainerSize(this._getEdgeValue(\"end\")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this;if(t)this._renderer.createAndInsert(e,i),this._updateCursor(i),this.options.useRecycle&&this._recycle(i),this._onLayoutComplete(e,i,n);else{var o=i?\"append\":\"prepend\";this._renderer[o](e),u[\"default\"].check(e.map(function(t){return t.el}),function(){var t=r._layout[o](r._renderer.updateSize(e),r._items.getOutline(i?r._status.endCursor:r._status.startCursor,i?\"end\":\"start\"));r._insertItems(t,i),r._updateCursor(i),r.options.useRecycle&&r._recycle(i),a[\"default\"].renderItems(t.items),r._onLayoutComplete(t.items,i,n)})}},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,\"start\")),i=Math.max.apply(Math,this._items.getOutline(t,\"end\")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?\"append\":\"prepend\"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger(\"append\",{isTrusted:!0,groupKey:this.getGroupKeys().pop()})},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger(\"prepend\",{isTrusted:!0,groupKey:this.getGroupKeys().shift()})},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;if(this.trigger(\"change\",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r}),!this.isProcessing()){var o=this._getEdgeOffset(e?\"end\":\"start\");if(o){var s=e?o[n?\"left\":\"top\"]-this._renderer.getViewSize():o[n?\"right\":\"bottom\"];e?i>=s&&this._requestAppend():i<=s&&(this._fit(\"before\"),this._requestPrepend())}}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2];this._updateEdge();var n=this._getEdgeValue(\"end\");this._renderer.setContainerSize(n+this._status.loadingSize),e?this._isLoading()&&this._renderLoading(!0,n):this._fit(\"after\"),this._process(c.PROCESSING,!1),this.trigger(\"layoutComplete\",{target:t.concat(),isAppend:e,isTrusted:i,scrollPos:this._watcher.getScrollPos(),orgScrollPos:this._watcher.getOrgScrollPos(),size:n}),this._watcher.reset()},InfiniteGrid.prototype._reset=function(){this._status={procesingStatus:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o[\"default\"]);p.VERSION=\"3.0.0-rc\",e[\"default\"]=p,t.exports=e[\"default\"]},function(e,i){e.exports=t},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=i(0),r=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(3)),o=i(1),s=function(){function ItemManager(){_classCallCheck(this,ItemManager),this.clear()}return ItemManager.from=function(t,e,i){var r=i.groupKey,s=(i.isAppend,ItemManager.selectItems((0,o.$)(t,n.MULTI),e));return(0,o.toArray)(s).map(function(t){return{el:t,groupKey:r,content:t.outerHTML}})},ItemManager.selectItems=function(t,e){return t.filter(function(t){return\"*\"===e?t:t.className.split(\" \").some(function(t){return t===e})})},ItemManager.pluck=function(t,e){return t.reduce(function(t,i){return t.concat(i[e])},[])},ItemManager.prototype.getStatus=function(){return{_data:this._data.map(function(t){return t.items=t.items.map(function(t){return delete t.el,t}),t})}},ItemManager.prototype.setStatus=function(t,e,i){for(var n=t._data,o=e;o<=i;o++)n[o].items=r[\"default\"].createElements(n[o].items);this.set(n)},ItemManager.prototype.size=function(){return this._data.length},ItemManager.prototype.fit=function(t,e){if(this._data.length){var i=e?\"top\":\"left\";0!==t&&(this._data=this._data.map(function(e){return e.items=e.items.map(function(e){return e.rect[i]-=t,e}),e.outlines.start=e.outlines.start.map(function(e){return e-t}),e.outlines.end=e.outlines.end.map(function(e){return e-t}),e}))}},ItemManager.prototype.pluck=function(t,e,i){return void 0!==e?void 0!==i?ItemManager.pluck(this._data.slice(e,i+1),t):ItemManager.pluck(this._data.slice(e,e+1),t):ItemManager.pluck(this._data,t)},ItemManager.prototype.getOutline=function(t,e){return this._data.length?this._data[t].outlines[e]:[]},ItemManager.prototype.getEdgeIndex=function(t,e,i){for(var n=\"start\"===t?\"min\":\"max\",r=-1,o=\"start\"===t?Infinity:-Infinity,s=e;s<=i;s++){var a=Math[n].apply(Math,this.getOutline(s,t));(\"start\"===t&&o>a||\"end\"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck(\"outlines\",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math[\"start\"===t?\"min\":\"max\"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var r=null,o=t.getAttribute(n.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return r;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e[\"default\"]=o,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,\"scroll\",this._onCheck),(0,o.addEvent)(window,\"resize\",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getOrgScrollPos(),e=this.getScrollPos();this.setScrollPos(t);var i=this.getScrollPos();r.IS_IOS&&(0===t||null===e)||e===i||this._callback.check&&this._callback.check({isForward:e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?\"left\":\"top\";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?\"height\":\"width\",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,p=s.pos1,f=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?\"min\":\"max\",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;return this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?\"min\":\"max\"].apply(Math,e)||0)),{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e[\"default\"]=c,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}function _inherits(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function makeShapeOutline(t,e,i,n){var o=Math[n?\"min\":\"max\"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute(\"column\")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return _classCallCheck(this,SquareLayout),_possibleConstructorReturn(this,t.apply(this,arguments))}return _inherits(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=makeShapeOutline(n,s,u,o),l=o?\"min\":\"max\",p=[],f=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+f*P]<=v||!o&&c[S+f*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],p.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var C=0;C0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,p=0;p<2;++p){var f=void 0,d=void 0,_=void 0,g=void 0;0===p?(f=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),f=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-f);var y=f*d,m=f/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===p,o.width=f,o.height=d,s.width=_,s.height=g)}}),fitArea(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,p=this._size*(a?u:1),f=this._size/(a?1:u),d=a?p:f,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r[\"default\"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r[\"default\"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(p+h,f+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r[\"default\"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,\"\"),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i[\"node\"+h]=Math.pow(c,2))}return i},\"node0\",\"node\"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,p=l,f=0,d=0;dc)&&(r[p]=c,o.push({value:p,cost:c}),n[p]=a)}if(\"undefined\"==typeof r[i]){var f=[\"Could not find a path from \",e,\" to \",i,\".\"].join(\"\");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)1&&arguments[1]!==undefined&&arguments[1],i=void 0;if(\"string\"==typeof t){if(t.match(/^<([A-z]+)\\s*([^>]*)>/)){var n=o.document.createElement(\"div\");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?\"jQuery\"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement[\"client\"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body[\"scroll\"+e],i[\"scroll\"+e],t.body[\"offset\"+e],i[\"offset\"+e],i[\"client\"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t[\"offset\"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;\"object\"===(void 0===n?\"undefined\":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent(\"on\"+e,i):t[\"on\"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent(\"on\"+e,i):t[\"on\"+e]=null},e.scroll=function(t,e){var i=\"scroll\"+(e?\"Top\":\"Left\");return t===o.window?o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,\"Width\")},e.innerHeight=function(t){return _getSize(t,\"Height\")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:\"top\",endPos1:\"bottom\",size1:\"height\",pos2:\"left\",endPos2:\"right\",size2:\"width\"},horizontal:{pos1:\"left\",endPos1:\"right\",size1:\"width\",pos2:\"top\",endPos2:\"bottom\",size2:\"height\"}}},function(t,e,i){\"use strict\";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function _defense(t){var e=document.createElement(\"div\");e.className=r.CONTAINER_CLASSNAME,e.style.height=\"100%\";for(var i=t.children,n=i.length,o=0;o0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=getShapes(this.options.frame.map(function(t){return t.slice()}));this._itemSize=this.options.itemSize||0,this._shapes=e,this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return FrameLayout.prototype._getItemSize=function(){return this._checkItemSize(),this._itemSize},FrameLayout.prototype._checkItemSize=function(){if(this.options.itemSize)this._itemSize=this.options.itemSize;else{var t=this._style.size2,e=this.options.margin;this._itemSize=(this._size+e)/this._shapes[t]-e}},FrameLayout.prototype._layout=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,o=this._style,a=this.options,u=a.margin,h=a.frameFill,c=o.size1,l=o.size2,p=o.pos1,f=o.pos2,d=this._getItemSize(),_=\"object\"===(void 0===d?\"undefined\":r(d)),g=_?d[l]:d,y=_?d[c]:d,m=this._shapes[l],v=this._shapes.shapes,S=v.length,E=(0,s.fill)(m,-99999),I=(0,s.fill)(m,-99999),w=0,O=0,P=-1,C=-1,z=-1,M=-1;if(!S)return{start:e,end:e,startIndex:P,endIndex:C};for(var L=0;LG&&(z=G,P=L+R),M0&&arguments[0]!==undefined&&arguments[0]?\"_getItems\":\"_getVisibleItems\"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck(\"items\",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck(\"items\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge(\"start\",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge(\"end\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,\"start\"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:\"after\";if(!this.options.useRecycle)return this._fit=function(){return 0},0;if(this._layout){var e=this._getEdgeValue(\"start\"),i=this._status.loadingSize;return(0!==e||i)&&(this._isLoading()||this._process(c.PROCESSING),\"before\"===t&&(this._renderer.scrollBy(-Math.abs(e)+i),this._watcher.setScrollPos()),this._items.fit(e-i,this._isVertical),a[\"default\"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue(\"end\")||i),\"after\"===t&&(this._renderer.scrollBy(Math.abs(e)+i),this._watcher.setScrollPos()),this._isLoading()||this._process(c.PROCESSING,!1)),e}return 0},InfiniteGrid.prototype._getEdgeValue=function(t){return this._items.getEdgeValue(t,this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype.layout=function(){var t=this,e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,\"start\")),i.length?(this._layout.layout(i,n),e?(this._items.set(i),this._status.startCursor=0,this._status.endCursor=i.length-1):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED),a[\"default\"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a[\"default\"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck(\"items\",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck(\"items\",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype._initLoadingBar=function(){var t=this.options.loadingBar,e=\"object\"===(void 0===t?\"undefined\":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=e;for(var i in e)e[i]=(0,l.$)(e[i]);return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.procesingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.procesingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.procesingStatus|=t:this._status.procesingStatus-=this._status.procesingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){this._process(c.PROCESSING);var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s[\"default\"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==n&&-1!==r&&(r=(n=this._status.startCursor+n)+r,a[\"default\"].removeItems(this._items.pluck(\"items\",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?\"append\":\"prepend\"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:\"block\"};if(this._isLoading())return this;var i=t?\"append\":\"prepend\";if(this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),!this._loadingBar[i])return this;var n=t?this._getEdgeValue(\"end\"):0;return this._renderLoading(t,n,e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue(\"end\")+this._status.loadingSize):this._fit(\"before\"),this},InfiniteGrid.prototype._renderLoading=function(t,e){var i,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this._status.loadingStyle,o=this._loadingBar[t?\"append\":\"prepend\"];if(o){var s=n((i={position:\"absolute\"},i[this._isVertical?\"top\":\"left\"]=e+\"px\",i),r);for(var a in s)o.style[a]=s[a];this._status.loadingSize=this._isVertical?(0,l.innerHeight)(o):(0,l.innerWidth)(o)}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:\"none\"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?\"append\":\"prepend\",o=this._loadingBar[r],s=this._loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var a=n((t={},t[this._isVertical?\"top\":\"left\"]=-s+\"px\",t),e);for(var u in a)o.style[u]=a[u];return i||this._fit(\"before\"),this._renderer.setContainerSize(this._getEdgeValue(\"end\")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this;if(t)this._renderer.createAndInsert(e,i),this._updateCursor(i),this.options.useRecycle&&this._recycle(i),this._onLayoutComplete(e,i,n);else{var o=i?\"append\":\"prepend\";this._renderer[o](e),u[\"default\"].check(e.map(function(t){return t.el}),function(){var t=r._layout[o](r._renderer.updateSize(e),r._items.getOutline(i?r._status.endCursor:r._status.startCursor,i?\"end\":\"start\"));r._insertItems(t,i),r._updateCursor(i),r.options.useRecycle&&r._recycle(i),a[\"default\"].renderItems(t.items),r._onLayoutComplete(t.items,i,n)})}},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,\"start\")),i=Math.max.apply(Math,this._items.getOutline(t,\"end\")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?\"append\":\"prepend\"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger(\"append\",{isTrusted:!0,groupKey:this.getGroupKeys().pop()})},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger(\"prepend\",{isTrusted:!0,groupKey:this.getGroupKeys().shift()})},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;if(this.trigger(\"change\",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r}),!this.isProcessing()){var o=this._getEdgeOffset(e?\"end\":\"start\");if(o){var s=e?o[n?\"left\":\"top\"]-this._renderer.getViewSize():o[n?\"right\":\"bottom\"];e?i>=s&&this._requestAppend():i<=s&&(this._fit(\"before\"),this._requestPrepend())}}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2];this._updateEdge();var n=this._getEdgeValue(\"end\");this._renderer.setContainerSize(n+this._status.loadingSize),e?this._isLoading()&&this._renderLoading(!0,n):this._fit(\"after\"),this._process(c.PROCESSING,!1),this.trigger(\"layoutComplete\",{target:t.concat(),isAppend:e,isTrusted:i,scrollPos:this._watcher.getScrollPos(),orgScrollPos:this._watcher.getOrgScrollPos(),size:n}),this._watcher.reset()},InfiniteGrid.prototype._reset=function(){this._status={procesingStatus:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o[\"default\"]);p.VERSION=\"3.0.0-rc\",e[\"default\"]=p,t.exports=e[\"default\"]},function(e,i){e.exports=t},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=i(0),r=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(3)),o=i(1),s=function(){function ItemManager(){_classCallCheck(this,ItemManager),this.clear()}return ItemManager.from=function(t,e,i){var r=i.groupKey,s=(i.isAppend,ItemManager.selectItems((0,o.$)(t,n.MULTI),e));return(0,o.toArray)(s).map(function(t){return{el:t,groupKey:r,content:t.outerHTML}})},ItemManager.selectItems=function(t,e){return t.filter(function(t){return\"*\"===e?t:t.className.split(\" \").some(function(t){return t===e})})},ItemManager.pluck=function(t,e){return t.reduce(function(t,i){return t.concat(i[e])},[])},ItemManager.prototype.getStatus=function(){return{_data:this._data.map(function(t){return t.items=t.items.map(function(t){return delete t.el,t}),t})}},ItemManager.prototype.setStatus=function(t,e,i){for(var n=t._data,o=e;o<=i;o++)n[o].items=r[\"default\"].createElements(n[o].items);this.set(n)},ItemManager.prototype.size=function(){return this._data.length},ItemManager.prototype.fit=function(t,e){if(this._data.length){var i=e?\"top\":\"left\";0!==t&&(this._data=this._data.map(function(e){return e.items=e.items.map(function(e){return e.rect[i]-=t,e}),e.outlines.start=e.outlines.start.map(function(e){return e-t}),e.outlines.end=e.outlines.end.map(function(e){return e-t}),e}))}},ItemManager.prototype.pluck=function(t,e,i){return void 0!==e?void 0!==i?ItemManager.pluck(this._data.slice(e,i+1),t):ItemManager.pluck(this._data.slice(e,e+1),t):ItemManager.pluck(this._data,t)},ItemManager.prototype.getOutline=function(t,e){return this._data.length?this._data[t].outlines[e]:[]},ItemManager.prototype.getEdgeIndex=function(t,e,i){for(var n=\"start\"===t?\"min\":\"max\",r=-1,o=\"start\"===t?Infinity:-Infinity,s=e;s<=i;s++){var a=Math[n].apply(Math,this.getOutline(s,t));(\"start\"===t&&o>a||\"end\"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck(\"outlines\",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math[\"start\"===t?\"min\":\"max\"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var r=null,o=t.getAttribute(n.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return r;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e[\"default\"]=o,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,\"scroll\",this._onCheck),(0,o.addEvent)(window,\"resize\",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getOrgScrollPos(),e=this.getScrollPos();this.setScrollPos(t);var i=this.getScrollPos();r.IS_IOS&&(0===t||null===e)||e===i||this._callback.check&&this._callback.check({isForward:e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?\"left\":\"top\";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?\"height\":\"width\",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,p=s.pos1,f=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?\"min\":\"max\",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;return this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?\"min\":\"max\"].apply(Math,e)||0)),{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e[\"default\"]=c,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}function _inherits(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function makeShapeOutline(t,e,i,n){var o=Math[n?\"min\":\"max\"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute(\"column\")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return _classCallCheck(this,SquareLayout),_possibleConstructorReturn(this,t.apply(this,arguments))}return _inherits(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=makeShapeOutline(n,s,u,o),l=o?\"min\":\"max\",p=[],f=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+f*P]<=v||!o&&c[S+f*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],p.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var C=0;C0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,p=0;p<2;++p){var f=void 0,d=void 0,_=void 0,g=void 0;0===p?(f=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),f=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-f);var y=f*d,m=f/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===p,o.width=f,o.height=d,s.width=_,s.height=g)}}),fitArea(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,p=this._size*(a?u:1),f=this._size/(a?1:u),d=a?p:f,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r[\"default\"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r[\"default\"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(p+h,f+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r[\"default\"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,\"\"),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i[\"node\"+h]=Math.pow(c,2))}return i},\"node0\",\"node\"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,p=l,f=0,d=0;dc)&&(r[p]=c,o.push({value:p,cost:c}),n[p]=a)}if(\"undefined\"==typeof r[i]){var f=[\"Could not find a path from \",e,\" to \",i,\".\"].join(\"\");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)1&&arguments[1]!==undefined&&arguments[1],i=void 0;if("string"==typeof t){if(t.match(/^<([A-z]+)\s*([^>]*)>/)){var n=o.document.createElement("div");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement["client"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t["offset"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;"object"===(void 0===n?"undefined":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null},e.scroll=function(t,e){var i="scroll"+(e?"Top":"Left");return t===o.window?o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,"Width")},e.innerHeight=function(t){return _getSize(t,"Height")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:"top",endPos1:"bottom",size1:"height",pos2:"left",endPos2:"right",size2:"width"},horizontal:{pos1:"left",endPos1:"right",size1:"width",pos2:"top",endPos2:"bottom",size2:"height"}}},function(t,e,i){"use strict";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=getShapes(this.options.frame.map(function(t){return t.slice()}));this._itemSize=this.options.itemSize||0,this._shapes=e,this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return FrameLayout.prototype._getItemSize=function(){return this._checkItemSize(),this._itemSize},FrameLayout.prototype._checkItemSize=function(){if(this.options.itemSize)this._itemSize=this.options.itemSize;else{var t=this._style.size2,e=this.options.margin;this._itemSize=(this._size+e)/this._shapes[t]-e}},FrameLayout.prototype._layout=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,o=this._style,a=this.options,u=a.margin,h=a.frameFill,c=o.size1,l=o.size2,p=o.pos1,f=o.pos2,d=this._getItemSize(),_="object"===(void 0===d?"undefined":r(d)),g=_?d[l]:d,y=_?d[c]:d,m=this._shapes[l],v=this._shapes.shapes,S=v.length,E=(0,s.fill)(m,-99999),I=(0,s.fill)(m,-99999),w=0,O=0,P=-1,C=-1,z=-1,M=-1;if(!S)return{start:e,end:e,startIndex:P,endIndex:C};for(var L=0;LG&&(z=G,P=L+b),M0&&arguments[0]!==undefined&&arguments[0]?"_getItems":"_getVisibleItems"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck("items",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck("items",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge("start",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge("end",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,"start"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"after";if(!this.options.useRecycle)return this._fit=function(){return 0},0;if(this._layout){var e=this._getEdgeValue("start"),i=this._status.loadingSize;return(0!==e||i)&&(this._isLoading()||this._process(c.PROCESSING),"before"===t&&(this._renderer.scrollBy(-Math.abs(e)+i),this._watcher.setScrollPos()),this._items.fit(e-i,this._isVertical),a["default"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue("end")||i),"after"===t&&(this._renderer.scrollBy(Math.abs(e)+i),this._watcher.setScrollPos()),this._isLoading()||this._process(c.PROCESSING,!1)),e}return 0},InfiniteGrid.prototype._getEdgeValue=function(t){return this._items.getEdgeValue(t,this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype.layout=function(){var t=this,e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,"start")),i.length?(this._layout.layout(i,n),e?(this._items.set(i),this._status.startCursor=0,this._status.endCursor=i.length-1):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED),a["default"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a["default"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck("items",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck("items",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype._initLoadingBar=function(){var t=this.options.loadingBar,e="object"===(void 0===t?"undefined":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=e;for(var i in e)e[i]=(0,l.$)(e[i]);return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.procesingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.procesingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.procesingStatus|=t:this._status.procesingStatus-=this._status.procesingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){this._process(c.PROCESSING);var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s["default"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==n&&-1!==r&&(r=(n=this._status.startCursor+n)+r,a["default"].removeItems(this._items.pluck("items",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?"append":"prepend"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:"block"};if(this._isLoading())return this;var i=t?"append":"prepend";if(this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),!this._loadingBar[i])return this;var n=t?this._getEdgeValue("end"):0;return this._renderLoading(t,n,e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue("end")+this._status.loadingSize):this._fit("before"),this},InfiniteGrid.prototype._renderLoading=function(t,e){var i,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this._status.loadingStyle,o=this._loadingBar[t?"append":"prepend"];if(o){var s=n((i={position:"absolute"},i[this._isVertical?"top":"left"]=e+"px",i),r);for(var a in s)o.style[a]=s[a];this._status.loadingSize=this._isVertical?(0,l.innerHeight)(o):(0,l.innerWidth)(o)}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:"none"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?"append":"prepend",o=this._loadingBar[r],s=this._loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var a=n((t={},t[this._isVertical?"top":"left"]=-s+"px",t),e);for(var u in a)o.style[u]=a[u];return i||this._fit("before"),this._renderer.setContainerSize(this._getEdgeValue("end")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this;if(t)this._renderer.createAndInsert(e,i),this._updateCursor(i),this.options.useRecycle&&this._recycle(i),this._onLayoutComplete(e,i,n);else{var o=i?"append":"prepend";this._renderer[o](e),u["default"].check(e.map(function(t){return t.el}),function(){var t=r._layout[o](r._renderer.updateSize(e),r._items.getOutline(i?r._status.endCursor:r._status.startCursor,i?"end":"start"));r._insertItems(t,i),r._updateCursor(i),r.options.useRecycle&&r._recycle(i),a["default"].renderItems(t.items),r._onLayoutComplete(t.items,i,n)})}},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,"start")),i=Math.max.apply(Math,this._items.getOutline(t,"end")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?"append":"prepend"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger("append",{isTrusted:!0,groupKey:this.getGroupKeys().pop()})},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger("prepend",{isTrusted:!0,groupKey:this.getGroupKeys().shift()})},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;if(this.trigger("change",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r}),!this.isProcessing()){var o=this._getEdgeOffset(e?"end":"start");if(o){var s=e?o[n?"left":"top"]-this._renderer.getViewSize():o[n?"right":"bottom"];e?i>=s&&this._requestAppend():i<=s&&(this._fit("before"),this._requestPrepend())}}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2];this._updateEdge();var n=this._getEdgeValue("end");this._renderer.setContainerSize(n+this._status.loadingSize),e?this._isLoading()&&this._renderLoading(!0,n):this._fit("after"),this._process(c.PROCESSING,!1),this.trigger("layoutComplete",{target:t.concat(),isAppend:e,isTrusted:i,scrollPos:this._watcher.getScrollPos(),orgScrollPos:this._watcher.getOrgScrollPos(),size:n}),this._watcher.reset()},InfiniteGrid.prototype._reset=function(){this._status={procesingStatus:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o["default"]);p.VERSION="3.0.0-rc",e["default"]=p,t.exports=e["default"]},function(e,i){e.exports=t},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=i(0),r=function(t){return t&&t.__esModule?t:{"default":t}}(i(3)),o=i(1),s=function(){function ItemManager(){_classCallCheck(this,ItemManager),this.clear()}return ItemManager.from=function(t,e,i){var r=i.groupKey,s=(i.isAppend,ItemManager.selectItems((0,o.$)(t,n.MULTI),e));return(0,o.toArray)(s).map(function(t){return{el:t,groupKey:r,content:t.outerHTML}})},ItemManager.selectItems=function(t,e){return t.filter(function(t){return"*"===e?t:t.className.split(" ").some(function(t){return t===e})})},ItemManager.pluck=function(t,e){return t.reduce(function(t,i){return t.concat(i[e])},[])},ItemManager.prototype.getStatus=function(){return{_data:this._data.map(function(t){return t.items=t.items.map(function(t){return delete t.el,t}),t})}},ItemManager.prototype.setStatus=function(t,e,i){for(var n=t._data,o=e;o<=i;o++)n[o].items=r["default"].createElements(n[o].items);this.set(n)},ItemManager.prototype.size=function(){return this._data.length},ItemManager.prototype.fit=function(t,e){if(this._data.length){var i=e?"top":"left";0!==t&&(this._data=this._data.map(function(e){return e.items=e.items.map(function(e){return e.rect[i]-=t,e}),e.outlines.start=e.outlines.start.map(function(e){return e-t}),e.outlines.end=e.outlines.end.map(function(e){return e-t}),e}))}},ItemManager.prototype.pluck=function(t,e,i){return void 0!==e?void 0!==i?ItemManager.pluck(this._data.slice(e,i+1),t):ItemManager.pluck(this._data.slice(e,e+1),t):ItemManager.pluck(this._data,t)},ItemManager.prototype.getOutline=function(t,e){return this._data.length?this._data[t].outlines[e]:[]},ItemManager.prototype.getEdgeIndex=function(t,e,i){for(var n="start"===t?"min":"max",r=-1,o="start"===t?Infinity:-Infinity,s=e;s<=i;s++){var a=Math[n].apply(Math,this.getOutline(s,t));("start"===t&&o>a||"end"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck("outlines",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math["start"===t?"min":"max"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var r=null,o=t.getAttribute(n.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return r;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e["default"]=o,t.exports=e["default"]},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,"scroll",this._onCheck),(0,o.addEvent)(window,"resize",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getOrgScrollPos(),e=this.getScrollPos();this.setScrollPos(t);var i=this.getScrollPos();r.IS_IOS&&(0===t||null===e)||e===i||this._callback.check&&this._callback.check({isForward:e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?"left":"top";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?"height":"width",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,p=s.pos1,f=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?"min":"max",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;return this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?"min":"max"].apply(Math,e)||0)),{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e["default"]=c,t.exports=e["default"]},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function makeShapeOutline(t,e,i,n){var o=Math[n?"min":"max"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute("column")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{"default":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return _classCallCheck(this,SquareLayout),_possibleConstructorReturn(this,t.apply(this,arguments))}return _inherits(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=makeShapeOutline(n,s,u,o),l=o?"min":"max",p=[],f=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+f*P]<=v||!o&&c[S+f*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],p.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var C=0;C0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,p=0;p<2;++p){var f=void 0,d=void 0,_=void 0,g=void 0;0===p?(f=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),f=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-f);var y=f*d,m=f/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===p,o.width=f,o.height=d,s.width=_,s.height=g)}}),fitArea(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,p=this._size*(a?u:1),f=this._size/(a?1:u),d=a?p:f,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r["default"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r["default"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(p+h,f+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r["default"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,""),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i["node"+h]=Math.pow(c,2))}return i},"node0","node"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,p=l,f=0,d=0;dc)&&(r[p]=c,o.push({value:p,cost:c}),n[p]=a)}if("undefined"==typeof r[i]){var f=["Could not find a path from ",e," to ",i,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)1&&arguments[1]!==undefined&&arguments[1],i=void 0;if("string"==typeof t){if(t.match(/^<([A-z]+)\s*([^>]*)>/)){var n=o.document.createElement("div");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement["client"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t["offset"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;"object"===(void 0===n?"undefined":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null},e.scroll=function(t,e){var i="scroll"+(e?"Top":"Left");return t===o.window?o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,"Width")},e.innerHeight=function(t){return _getSize(t,"Height")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:"top",endPos1:"bottom",size1:"height",pos2:"left",endPos2:"right",size2:"width"},horizontal:{pos1:"left",endPos1:"right",size1:"width",pos2:"top",endPos2:"bottom",size2:"height"}}},function(t,e,i){"use strict";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defense(t){var e=document.createElement("div");e.className=r.CONTAINER_CLASSNAME,e.style.height="100%";for(var i=t.children,n=i.length,o=0;o0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=getShapes(this.options.frame.map(function(t){return t.slice()}));this._itemSize=this.options.itemSize||0,this._shapes=e,this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return FrameLayout.prototype._getItemSize=function(){return this._checkItemSize(),this._itemSize},FrameLayout.prototype._checkItemSize=function(){if(this.options.itemSize)this._itemSize=this.options.itemSize;else{var t=this._style.size2,e=this.options.margin;this._itemSize=(this._size+e)/this._shapes[t]-e}},FrameLayout.prototype._layout=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,o=this._style,a=this.options,u=a.margin,h=a.frameFill,c=o.size1,l=o.size2,p=o.pos1,f=o.pos2,d=this._getItemSize(),_="object"===(void 0===d?"undefined":r(d)),g=_?d[l]:d,y=_?d[c]:d,m=this._shapes[l],v=this._shapes.shapes,S=v.length,E=(0,s.fill)(m,-99999),I=(0,s.fill)(m,-99999),w=0,O=0,P=-1,C=-1,z=-1,M=-1;if(!S)return{start:e,end:e,startIndex:P,endIndex:C};for(var L=0;LG&&(z=G,P=L+R),M0&&arguments[0]!==undefined&&arguments[0]?"_getItems":"_getVisibleItems"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck("items",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck("items",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge("start",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge("end",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,"start"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"after";if(!this.options.useRecycle)return this._fit=function(){return 0},0;if(this._layout){var e=this._getEdgeValue("start"),i=this._status.loadingSize;return(0!==e||i)&&(this._isLoading()||this._process(c.PROCESSING),"before"===t&&(this._renderer.scrollBy(-Math.abs(e)+i),this._watcher.setScrollPos()),this._items.fit(e-i,this._isVertical),a["default"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue("end")||i),"after"===t&&(this._renderer.scrollBy(Math.abs(e)+i),this._watcher.setScrollPos()),this._isLoading()||this._process(c.PROCESSING,!1)),e}return 0},InfiniteGrid.prototype._getEdgeValue=function(t){return this._items.getEdgeValue(t,this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype.layout=function(){var t=this,e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,"start")),i.length?(this._layout.layout(i,n),e?(this._items.set(i),this._status.startCursor=0,this._status.endCursor=i.length-1):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED),a["default"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a["default"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck("items",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck("items",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype._initLoadingBar=function(){var t=this.options.loadingBar,e="object"===(void 0===t?"undefined":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=e;for(var i in e)e[i]=(0,l.$)(e[i]);return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.procesingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.procesingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.procesingStatus|=t:this._status.procesingStatus-=this._status.procesingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){this._process(c.PROCESSING);var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s["default"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==n&&-1!==r&&(r=(n=this._status.startCursor+n)+r,a["default"].removeItems(this._items.pluck("items",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?"append":"prepend"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:"block"};if(this._isLoading())return this;var i=t?"append":"prepend";if(this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),!this._loadingBar[i])return this;var n=t?this._getEdgeValue("end"):0;return this._renderLoading(t,n,e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue("end")+this._status.loadingSize):this._fit("before"),this},InfiniteGrid.prototype._renderLoading=function(t,e){var i,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this._status.loadingStyle,o=this._loadingBar[t?"append":"prepend"];if(o){var s=n((i={position:"absolute"},i[this._isVertical?"top":"left"]=e+"px",i),r);for(var a in s)o.style[a]=s[a];this._status.loadingSize=this._isVertical?(0,l.innerHeight)(o):(0,l.innerWidth)(o)}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:"none"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?"append":"prepend",o=this._loadingBar[r],s=this._loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var a=n((t={},t[this._isVertical?"top":"left"]=-s+"px",t),e);for(var u in a)o.style[u]=a[u];return i||this._fit("before"),this._renderer.setContainerSize(this._getEdgeValue("end")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this;if(t)this._renderer.createAndInsert(e,i),this._updateCursor(i),this.options.useRecycle&&this._recycle(i),this._onLayoutComplete(e,i,n);else{var o=i?"append":"prepend";this._renderer[o](e),u["default"].check(e.map(function(t){return t.el}),function(){var t=r._layout[o](r._renderer.updateSize(e),r._items.getOutline(i?r._status.endCursor:r._status.startCursor,i?"end":"start"));r._insertItems(t,i),r._updateCursor(i),r.options.useRecycle&&r._recycle(i),a["default"].renderItems(t.items),r._onLayoutComplete(t.items,i,n)})}},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,"start")),i=Math.max.apply(Math,this._items.getOutline(t,"end")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?"append":"prepend"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger("append",{isTrusted:!0,groupKey:this.getGroupKeys().pop()})},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger("prepend",{isTrusted:!0,groupKey:this.getGroupKeys().shift()})},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;if(this.trigger("change",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r}),!this.isProcessing()){var o=this._getEdgeOffset(e?"end":"start");if(o){var s=e?o[n?"left":"top"]-this._renderer.getViewSize():o[n?"right":"bottom"];e?i>=s&&this._requestAppend():i<=s&&(this._fit("before"),this._requestPrepend())}}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2];this._updateEdge();var n=this._getEdgeValue("end");this._renderer.setContainerSize(n+this._status.loadingSize),e?this._isLoading()&&this._renderLoading(!0,n):this._fit("after"),this._process(c.PROCESSING,!1),this.trigger("layoutComplete",{target:t.concat(),isAppend:e,isTrusted:i,scrollPos:this._watcher.getScrollPos(),orgScrollPos:this._watcher.getOrgScrollPos(),size:n}),this._watcher.reset()},InfiniteGrid.prototype._reset=function(){this._status={procesingStatus:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o["default"]);p.VERSION="3.0.0-rc",e["default"]=p,t.exports=e["default"]},function(e,i){e.exports=t},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=i(0),r=function(t){return t&&t.__esModule?t:{"default":t}}(i(3)),o=i(1),s=function(){function ItemManager(){_classCallCheck(this,ItemManager),this.clear()}return ItemManager.from=function(t,e,i){var r=i.groupKey,s=(i.isAppend,ItemManager.selectItems((0,o.$)(t,n.MULTI),e));return(0,o.toArray)(s).map(function(t){return{el:t,groupKey:r,content:t.outerHTML}})},ItemManager.selectItems=function(t,e){return t.filter(function(t){return"*"===e?t:t.className.split(" ").some(function(t){return t===e})})},ItemManager.pluck=function(t,e){return t.reduce(function(t,i){return t.concat(i[e])},[])},ItemManager.prototype.getStatus=function(){return{_data:this._data.map(function(t){return t.items=t.items.map(function(t){return delete t.el,t}),t})}},ItemManager.prototype.setStatus=function(t,e,i){for(var n=t._data,o=e;o<=i;o++)n[o].items=r["default"].createElements(n[o].items);this.set(n)},ItemManager.prototype.size=function(){return this._data.length},ItemManager.prototype.fit=function(t,e){if(this._data.length){var i=e?"top":"left";0!==t&&(this._data=this._data.map(function(e){return e.items=e.items.map(function(e){return e.rect[i]-=t,e}),e.outlines.start=e.outlines.start.map(function(e){return e-t}),e.outlines.end=e.outlines.end.map(function(e){return e-t}),e}))}},ItemManager.prototype.pluck=function(t,e,i){return void 0!==e?void 0!==i?ItemManager.pluck(this._data.slice(e,i+1),t):ItemManager.pluck(this._data.slice(e,e+1),t):ItemManager.pluck(this._data,t)},ItemManager.prototype.getOutline=function(t,e){return this._data.length?this._data[t].outlines[e]:[]},ItemManager.prototype.getEdgeIndex=function(t,e,i){for(var n="start"===t?"min":"max",r=-1,o="start"===t?Infinity:-Infinity,s=e;s<=i;s++){var a=Math[n].apply(Math,this.getOutline(s,t));("start"===t&&o>a||"end"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck("outlines",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math["start"===t?"min":"max"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var r=null,o=t.getAttribute(n.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return r;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e["default"]=o,t.exports=e["default"]},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,"scroll",this._onCheck),(0,o.addEvent)(window,"resize",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getOrgScrollPos(),e=this.getScrollPos();this.setScrollPos(t);var i=this.getScrollPos();r.IS_IOS&&(0===t||null===e)||e===i||this._callback.check&&this._callback.check({isForward:e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?"left":"top";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?"height":"width",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,p=s.pos1,f=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?"min":"max",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;return this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?"min":"max"].apply(Math,e)||0)),{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e["default"]=c,t.exports=e["default"]},function(t,e,i){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function makeShapeOutline(t,e,i,n){var o=Math[n?"min":"max"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute("column")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{"default":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return _classCallCheck(this,SquareLayout),_possibleConstructorReturn(this,t.apply(this,arguments))}return _inherits(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=makeShapeOutline(n,s,u,o),l=o?"min":"max",p=[],f=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+f*P]<=v||!o&&c[S+f*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],p.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var C=0;C0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,p=0;p<2;++p){var f=void 0,d=void 0,_=void 0,g=void 0;0===p?(f=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),f=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-f);var y=f*d,m=f/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===p,o.width=f,o.height=d,s.width=_,s.height=g)}}),fitArea(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,p=this._size*(a?u:1),f=this._size/(a?1:u),d=a?p:f,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r["default"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r["default"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(p+h,f+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r["default"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,""),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i["node"+h]=Math.pow(c,2))}return i},"node0","node"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,p=l,f=0,d=0;dc)&&(r[p]=c,o.push({value:p,cost:c}),n[p]=a)}if("undefined"==typeof r[i]){var f=["Could not find a path from ",e," to ",i,"."].join("");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)1&&arguments[1]!==undefined&&arguments[1],i=void 0;if(\"string\"==typeof t){if(t.match(/^<([A-z]+)\\s*([^>]*)>/)){var n=o.document.createElement(\"div\");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?\"jQuery\"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement[\"client\"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body[\"scroll\"+e],i[\"scroll\"+e],t.body[\"offset\"+e],i[\"offset\"+e],i[\"client\"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t[\"offset\"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;\"object\"===(void 0===n?\"undefined\":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent(\"on\"+e,i):t[\"on\"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent(\"on\"+e,i):t[\"on\"+e]=null},e.scroll=function(t,e){var i=\"scroll\"+(e?\"Top\":\"Left\");return t===o.window?o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,\"Width\")},e.innerHeight=function(t){return _getSize(t,\"Height\")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:\"top\",endPos1:\"bottom\",size1:\"height\",pos2:\"left\",endPos2:\"right\",size2:\"width\"},horizontal:{pos1:\"left\",endPos1:\"right\",size1:\"width\",pos2:\"top\",endPos2:\"bottom\",size2:\"height\"}}},function(t,e,i){\"use strict\";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=getShapes(this.options.frame.map(function(t){return t.slice()}));this._itemSize=this.options.itemSize||0,this._shapes=e,this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return FrameLayout.prototype._getItemSize=function(){return this._checkItemSize(),this._itemSize},FrameLayout.prototype._checkItemSize=function(){if(this.options.itemSize)this._itemSize=this.options.itemSize;else{var t=this._style.size2,e=this.options.margin;this._itemSize=(this._size+e)/this._shapes[t]-e}},FrameLayout.prototype._layout=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,o=this._style,a=this.options,u=a.margin,h=a.frameFill,c=o.size1,l=o.size2,p=o.pos1,f=o.pos2,d=this._getItemSize(),_=\"object\"===(void 0===d?\"undefined\":r(d)),g=_?d[l]:d,y=_?d[c]:d,m=this._shapes[l],v=this._shapes.shapes,S=v.length,E=(0,s.fill)(m,-99999),I=(0,s.fill)(m,-99999),w=0,O=0,P=-1,C=-1,z=-1,M=-1;if(!S)return{start:e,end:e,startIndex:P,endIndex:C};for(var L=0;LG&&(z=G,P=L+b),M0&&arguments[0]!==undefined&&arguments[0]?\"_getItems\":\"_getVisibleItems\"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck(\"items\",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck(\"items\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge(\"start\",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge(\"end\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,\"start\"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:\"after\";if(!this.options.useRecycle)return this._fit=function(){return 0},0;if(this._layout){var e=this._getEdgeValue(\"start\"),i=this._status.loadingSize;return(0!==e||i)&&(this._isLoading()||this._process(c.PROCESSING),\"before\"===t&&(this._renderer.scrollBy(-Math.abs(e)+i),this._watcher.setScrollPos()),this._items.fit(e-i,this._isVertical),a[\"default\"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue(\"end\")||i),\"after\"===t&&(this._renderer.scrollBy(Math.abs(e)+i),this._watcher.setScrollPos()),this._isLoading()||this._process(c.PROCESSING,!1)),e}return 0},InfiniteGrid.prototype._getEdgeValue=function(t){return this._items.getEdgeValue(t,this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype.layout=function(){var t=this,e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,\"start\")),i.length?(this._layout.layout(i,n),e?(this._items.set(i),this._status.startCursor=0,this._status.endCursor=i.length-1):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED),a[\"default\"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a[\"default\"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck(\"items\",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck(\"items\",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype._initLoadingBar=function(){var t=this.options.loadingBar,e=\"object\"===(void 0===t?\"undefined\":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=e;for(var i in e)e[i]=(0,l.$)(e[i]);return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.procesingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.procesingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.procesingStatus|=t:this._status.procesingStatus-=this._status.procesingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){this._process(c.PROCESSING);var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s[\"default\"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==n&&-1!==r&&(r=(n=this._status.startCursor+n)+r,a[\"default\"].removeItems(this._items.pluck(\"items\",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?\"append\":\"prepend\"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:\"block\"};if(this._isLoading())return this;var i=t?\"append\":\"prepend\";if(this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),!this._loadingBar[i])return this;var n=t?this._getEdgeValue(\"end\"):0;return this._renderLoading(t,n,e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue(\"end\")+this._status.loadingSize):this._fit(\"before\"),this},InfiniteGrid.prototype._renderLoading=function(t,e){var i,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this._status.loadingStyle,o=this._loadingBar[t?\"append\":\"prepend\"];if(o){var s=n((i={position:\"absolute\"},i[this._isVertical?\"top\":\"left\"]=e+\"px\",i),r);for(var a in s)o.style[a]=s[a];this._status.loadingSize=this._isVertical?(0,l.innerHeight)(o):(0,l.innerWidth)(o)}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:\"none\"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?\"append\":\"prepend\",o=this._loadingBar[r],s=this._loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var a=n((t={},t[this._isVertical?\"top\":\"left\"]=-s+\"px\",t),e);for(var u in a)o.style[u]=a[u];return i||this._fit(\"before\"),this._renderer.setContainerSize(this._getEdgeValue(\"end\")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this;if(t)this._renderer.createAndInsert(e,i),this._updateCursor(i),this.options.useRecycle&&this._recycle(i),this._onLayoutComplete(e,i,n);else{var o=i?\"append\":\"prepend\";this._renderer[o](e),u[\"default\"].check(e.map(function(t){return t.el}),function(){var t=r._layout[o](r._renderer.updateSize(e),r._items.getOutline(i?r._status.endCursor:r._status.startCursor,i?\"end\":\"start\"));r._insertItems(t,i),r._updateCursor(i),r.options.useRecycle&&r._recycle(i),a[\"default\"].renderItems(t.items),r._onLayoutComplete(t.items,i,n)})}},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,\"start\")),i=Math.max.apply(Math,this._items.getOutline(t,\"end\")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?\"append\":\"prepend\"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger(\"append\",{isTrusted:!0,groupKey:this.getGroupKeys().pop()})},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger(\"prepend\",{isTrusted:!0,groupKey:this.getGroupKeys().shift()})},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;if(this.trigger(\"change\",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r}),!this.isProcessing()){var o=this._getEdgeOffset(e?\"end\":\"start\");if(o){var s=e?o[n?\"left\":\"top\"]-this._renderer.getViewSize():o[n?\"right\":\"bottom\"];e?i>=s&&this._requestAppend():i<=s&&(this._fit(\"before\"),this._requestPrepend())}}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2];this._updateEdge();var n=this._getEdgeValue(\"end\");this._renderer.setContainerSize(n+this._status.loadingSize),e?this._isLoading()&&this._renderLoading(!0,n):this._fit(\"after\"),this._process(c.PROCESSING,!1),this.trigger(\"layoutComplete\",{target:t.concat(),isAppend:e,isTrusted:i,scrollPos:this._watcher.getScrollPos(),orgScrollPos:this._watcher.getOrgScrollPos(),size:n}),this._watcher.reset()},InfiniteGrid.prototype._reset=function(){this._status={procesingStatus:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o[\"default\"]);p.VERSION=\"3.0.0-rc\",e[\"default\"]=p,t.exports=e[\"default\"]},function(e,i){e.exports=t},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=i(0),r=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(3)),o=i(1),s=function(){function ItemManager(){_classCallCheck(this,ItemManager),this.clear()}return ItemManager.from=function(t,e,i){var r=i.groupKey,s=(i.isAppend,ItemManager.selectItems((0,o.$)(t,n.MULTI),e));return(0,o.toArray)(s).map(function(t){return{el:t,groupKey:r,content:t.outerHTML}})},ItemManager.selectItems=function(t,e){return t.filter(function(t){return\"*\"===e?t:t.className.split(\" \").some(function(t){return t===e})})},ItemManager.pluck=function(t,e){return t.reduce(function(t,i){return t.concat(i[e])},[])},ItemManager.prototype.getStatus=function(){return{_data:this._data.map(function(t){return t.items=t.items.map(function(t){return delete t.el,t}),t})}},ItemManager.prototype.setStatus=function(t,e,i){for(var n=t._data,o=e;o<=i;o++)n[o].items=r[\"default\"].createElements(n[o].items);this.set(n)},ItemManager.prototype.size=function(){return this._data.length},ItemManager.prototype.fit=function(t,e){if(this._data.length){var i=e?\"top\":\"left\";0!==t&&(this._data=this._data.map(function(e){return e.items=e.items.map(function(e){return e.rect[i]-=t,e}),e.outlines.start=e.outlines.start.map(function(e){return e-t}),e.outlines.end=e.outlines.end.map(function(e){return e-t}),e}))}},ItemManager.prototype.pluck=function(t,e,i){return void 0!==e?void 0!==i?ItemManager.pluck(this._data.slice(e,i+1),t):ItemManager.pluck(this._data.slice(e,e+1),t):ItemManager.pluck(this._data,t)},ItemManager.prototype.getOutline=function(t,e){return this._data.length?this._data[t].outlines[e]:[]},ItemManager.prototype.getEdgeIndex=function(t,e,i){for(var n=\"start\"===t?\"min\":\"max\",r=-1,o=\"start\"===t?Infinity:-Infinity,s=e;s<=i;s++){var a=Math[n].apply(Math,this.getOutline(s,t));(\"start\"===t&&o>a||\"end\"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck(\"outlines\",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math[\"start\"===t?\"min\":\"max\"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var r=null,o=t.getAttribute(n.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return r;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e[\"default\"]=o,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,\"scroll\",this._onCheck),(0,o.addEvent)(window,\"resize\",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getOrgScrollPos(),e=this.getScrollPos();this.setScrollPos(t);var i=this.getScrollPos();r.IS_IOS&&(0===t||null===e)||e===i||this._callback.check&&this._callback.check({isForward:e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?\"left\":\"top\";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?\"height\":\"width\",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,p=s.pos1,f=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?\"min\":\"max\",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;return this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?\"min\":\"max\"].apply(Math,e)||0)),{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e[\"default\"]=c,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}function _inherits(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function makeShapeOutline(t,e,i,n){var o=Math[n?\"min\":\"max\"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute(\"column\")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return _classCallCheck(this,SquareLayout),_possibleConstructorReturn(this,t.apply(this,arguments))}return _inherits(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=makeShapeOutline(n,s,u,o),l=o?\"min\":\"max\",p=[],f=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+f*P]<=v||!o&&c[S+f*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],p.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var C=0;C0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,p=0;p<2;++p){var f=void 0,d=void 0,_=void 0,g=void 0;0===p?(f=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),f=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-f);var y=f*d,m=f/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===p,o.width=f,o.height=d,s.width=_,s.height=g)}}),fitArea(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,p=this._size*(a?u:1),f=this._size/(a?1:u),d=a?p:f,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r[\"default\"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r[\"default\"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(p+h,f+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r[\"default\"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,\"\"),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i[\"node\"+h]=Math.pow(c,2))}return i},\"node0\",\"node\"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,p=l,f=0,d=0;dc)&&(r[p]=c,o.push({value:p,cost:c}),n[p]=a)}if(\"undefined\"==typeof r[i]){var f=[\"Could not find a path from \",e,\" to \",i,\".\"].join(\"\");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)1&&arguments[1]!==undefined&&arguments[1],i=void 0;if(\"string\"==typeof t){if(t.match(/^<([A-z]+)\\s*([^>]*)>/)){var n=o.document.createElement(\"div\");n.innerHTML=t,i=n.childNodes}else i=o.document.querySelectorAll(t);i=e?toArray(i):i&&i.length>0&&i[0]||undefined}else t===o.window?i=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?\"jQuery\"in o.window&&t instanceof o.window.jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return $(t)}),e||(i=i.length>=1?i[0]:undefined)):i=t;return i}function getStyles(t){return s.SUPPORT_COMPUTEDSTYLE?o.window.getComputedStyle(t):t.currentStyle}function _getSize(t,e){if(t===o.window)return t.document.documentElement[\"client\"+e];if(9===t.nodeType){var i=t.documentElement;return Math.max(t.body[\"scroll\"+e],i[\"scroll\"+e],t.body[\"offset\"+e],i[\"offset\"+e],i[\"client\"+e])}var n=getStyles(t),r=n[e.toLowerCase()];return parseFloat(/auto|%/.test(r)?t[\"offset\"+e]:n[e.toLowerCase()])}e.__esModule=!0,e.STYLE=undefined;var n=Object.assign||function(t){for(var e=1;e=0;--n)i[n]=e;return i},e.$=$,e.addEvent=function(t,e,i,n){if(s.SUPPORT_ADDEVENTLISTENER){var o=n||!1;\"object\"===(void 0===n?\"undefined\":r(n))&&(o=!!s.SUPPORT_PASSIVE&&n),t.addEventListener(e,i,o)}else t.attachEvent?t.attachEvent(\"on\"+e,i):t[\"on\"+e]=i},e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent(\"on\"+e,i):t[\"on\"+e]=null},e.scroll=function(t,e){var i=\"scroll\"+(e?\"Top\":\"Left\");return t===o.window?o.document.body[i]||o.document.documentElement[i]:t[i]},e.scrollTo=function(t,e,i){t===o.window?t.scroll(e,i):(t.scrollLeft=e,t.scrollTop=i)},e.scrollBy=function(t,e,i){t===o.window?t.scrollBy(e,i):(t.scrollLeft+=e,t.scrollTop+=i)},e.getStyles=getStyles,e.innerWidth=function(t){return _getSize(t,\"Width\")},e.innerHeight=function(t){return _getSize(t,\"Height\")},e.getStyleNames=function(t){return a[t?s.HORIZONTAL:s.VERTICAL]},e.assignOptions=function(t,e){return n({},s.DEFAULT_OPTIONS,t,e)},e.toZeroArray=function(t){return t&&t.length?t:[0]},e.isWindow=function(t){return t===o.window},e.indexOf=function(t,e){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return t.indexOf(e);for(var i=t.length-1;i>=0;--i)if(t[i]===e)return i;return-1};var o=i(2),s=i(0),a=e.STYLE={vertical:{pos1:\"top\",endPos1:\"bottom\",size1:\"height\",pos2:\"left\",endPos2:\"right\",size2:\"width\"},horizontal:{pos1:\"left\",endPos1:\"right\",size1:\"width\",pos2:\"top\",endPos2:\"bottom\",size2:\"height\"}}},function(t,e,i){\"use strict\";e.__esModule=!0;var n=window;e.window=window;e.document=n.document},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function _defense(t){var e=document.createElement(\"div\");e.className=r.CONTAINER_CLASSNAME,e.style.height=\"100%\";for(var i=t.children,n=i.length,o=0;o0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,FrameLayout),this.options=(0,s.assignOptions)({itemSize:0,frame:[],frameFill:!0},t);var e=getShapes(this.options.frame.map(function(t){return t.slice()}));this._itemSize=this.options.itemSize||0,this._shapes=e,this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return FrameLayout.prototype._getItemSize=function(){return this._checkItemSize(),this._itemSize},FrameLayout.prototype._checkItemSize=function(){if(this.options.itemSize)this._itemSize=this.options.itemSize;else{var t=this._style.size2,e=this.options.margin;this._itemSize=(this._size+e)/this._shapes[t]-e}},FrameLayout.prototype._layout=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],n=t.length,o=this._style,a=this.options,u=a.margin,h=a.frameFill,c=o.size1,l=o.size2,p=o.pos1,f=o.pos2,d=this._getItemSize(),_=\"object\"===(void 0===d?\"undefined\":r(d)),g=_?d[l]:d,y=_?d[c]:d,m=this._shapes[l],v=this._shapes.shapes,S=v.length,E=(0,s.fill)(m,-99999),I=(0,s.fill)(m,-99999),w=0,O=0,P=-1,C=-1,z=-1,M=-1;if(!S)return{start:e,end:e,startIndex:P,endIndex:C};for(var L=0;LG&&(z=G,P=L+R),M0&&arguments[0]!==undefined&&arguments[0]?\"_getItems\":\"_getVisibleItems\"]()},InfiniteGrid.prototype._getItems=function(){return this._items.pluck(\"items\",0,this._items.size())},InfiniteGrid.prototype._getVisibleItems=function(){return this._items.pluck(\"items\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._updateEdge=function(){this._status.start=this._items.getEdge(\"start\",this._status.startCursor,this._status.endCursor),this._status.end=this._items.getEdge(\"end\",this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype._getEdgeOffset=function(t){var e=null;if(!this._status[t]){var i=this._items.getEdge(t);this._status[t]=i}return this._status[t]&&(e=this._status[t].rect,\"start\"===t&&(e.bottom=e.top+this._status[t].size.height,e.right=e.left+this._status[t].size.width)),e},InfiniteGrid.prototype._fit=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:\"after\";if(!this.options.useRecycle)return this._fit=function(){return 0},0;if(this._layout){var e=this._getEdgeValue(\"start\"),i=this._status.loadingSize;return(0!==e||i)&&(this._isLoading()||this._process(c.PROCESSING),\"before\"===t&&(this._renderer.scrollBy(-Math.abs(e)+i),this._watcher.setScrollPos()),this._items.fit(e-i,this._isVertical),a[\"default\"].renderItems(this._getVisibleItems()),this._renderer.setContainerSize(this._getEdgeValue(\"end\")||i),\"after\"===t&&(this._renderer.scrollBy(Math.abs(e)+i),this._watcher.setScrollPos()),this._isLoading()||this._process(c.PROCESSING,!1)),e}return 0},InfiniteGrid.prototype._getEdgeValue=function(t){return this._items.getEdgeValue(t,this._status.startCursor,this._status.endCursor)},InfiniteGrid.prototype.layout=function(){var t=this,e=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0];if(!this._layout||this._isProcessing())return this;if(!this._items.size())return this._insert((0,l.toArray)(this._renderer.container.children),!0),this;this._process(c.PROCESSING);var i=void 0,n=void 0;return e?(i=this._items.get(this._status.startCursor,this._status.endCursor),this._renderer.resize()&&(this._layout.setSize(this._renderer.getViewportSize()),i.forEach(function(e){i.items=t._renderer.updateSize(e.items)}))):(i=this._items.get(this._status.startCursor,this._items.size()),n=this._items.getOutline(this._status.startCursor,\"start\")),i.length?(this._layout.layout(i,n),e?(this._items.set(i),this._status.startCursor=0,this._status.endCursor=i.length-1):i.forEach(function(e){return t._items.set(e,e.groupKey)}),this._onLayoutComplete(i,c.APPEND,c.NO_TRUSTED),a[\"default\"].renderItems(this._getVisibleItems()),e&&this._watcher.setScrollPos(),this):this},InfiniteGrid.prototype.remove=function(t){if(t){var e=this._items.remove(t,this._status.startCursor,this._status.endCursor);if(e)return a[\"default\"].removeElement(t),e}return null},InfiniteGrid.prototype._getNextItems=function(t){var e=[],i=this._items.size();return i>0&&-1!==this._status.startCursor&&-1!==this._status.endCursor&&(t&&i>this._status.endCursor+1?e=this._items.pluck(\"items\",this._status.endCursor+1):!t&&this._status.startCursor>0&&(e=this._items.pluck(\"items\",this._status.startCursor-1))),e},InfiniteGrid.prototype.getGroupKeys=function(t){return(t?this._items.get():this._items.get(this._status.startCursor,this._status.endCursor)).map(function(t){return t.groupKey})},InfiniteGrid.prototype.getStatus=function(){return{options:n({},this.options),_status:n({},this._status),_items:this._items.getStatus(),_renderer:this._renderer.getStatus(),_watcher:this._watcher.getStatus()}},InfiniteGrid.prototype.setStatus=function(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1];return t&&t.options&&t._status&&t._renderer&&t._items&&t._watcher?(this._watcher.detachEvent(),n(this.options,t.options),n(this._status,t._status),this._items.setStatus(t._items,this._status.startCursor,this._status.endCursor),this._renderer.setStatus(t._renderer,this._getVisibleItems()),this._watcher.setStatus(t._watcher,e),this._updateEdge(),this._watcher.attachEvent(),this):this},InfiniteGrid.prototype.clear=function(){return this._items.clear(),this._renderer.clear(),this._reset(),this._appendLoadingBar(),this},InfiniteGrid.prototype._initLoadingBar=function(){var t=this.options.loadingBar,e=\"object\"===(void 0===t?\"undefined\":r(t))?t:{append:t,prepend:t};this._status.loadingSize=0,this._status.loadingStyle={},this._loadingBar=e;for(var i in e)e[i]=(0,l.$)(e[i]);return this._appendLoadingBar(),this},InfiniteGrid.prototype._appendLoadingBar=function(){var t=this._loadingBar,e=this._renderer.container;for(var i in t)e.appendChild(t[i])},InfiniteGrid.prototype.isProcessing=function(){return this._isProcessing()||this._isLoading()},InfiniteGrid.prototype._isProcessing=function(){return(this._status.procesingStatus&c.PROCESSING)>0},InfiniteGrid.prototype._isLoading=function(){return this._getLoadingStatus()>0},InfiniteGrid.prototype._getLoadingStatus=function(){return this._status.procesingStatus&(c.LOADING_APPEND|c.LOADING_PREPEND)},InfiniteGrid.prototype._process=function(t){!(arguments.length>1&&arguments[1]!==undefined)||arguments[1]?this._status.procesingStatus|=t:this._status.procesingStatus-=this._status.procesingStatus&t},InfiniteGrid.prototype._insert=function(t,e,i){if(!this._isProcessing()&&0!==t.length){this._process(c.PROCESSING);var n=void 0===i?(new Date).getTime()+Math.floor(1e3*Math.random()):i,r=s[\"default\"].from((0,l.$)(t,!0),this.options.itemSelector,{isAppend:e,groupKey:n});r.length&&this._postLayout(c.NO_CACHE,r,e,c.NO_TRUSTED)}},InfiniteGrid.prototype._recycle=function(t){var e=[];if(this._status.startCursor!==this._status.endCursor)for(var i=this._status.startCursor;i<=this._status.endCursor;i++)e.push(this._isVisible(i));var n=e.indexOf(t?1:-1),r=e.lastIndexOf(t?1:-1);-1!==n&&-1!==r&&(r=(n=this._status.startCursor+n)+r,a[\"default\"].removeItems(this._items.pluck(\"items\",n,r)),t?this._status.startCursor=r+1:this._status.endCursor=n-1)},InfiniteGrid.prototype.getLoadingBar=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._getLoadingStatus()!==c.LOADING_PREPEND;return this._loadingBar[t?\"append\":\"prepend\"]},InfiniteGrid.prototype.startLoading=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{display:\"block\"};if(this._isLoading())return this;var i=t?\"append\":\"prepend\";if(this._process(t?c.LOADING_APPEND:c.LOADING_PREPEND),!this._loadingBar[i])return this;var n=t?this._getEdgeValue(\"end\"):0;return this._renderLoading(t,n,e),this._status.loadingStyle=e,t?this._renderer.setContainerSize(this._getEdgeValue(\"end\")+this._status.loadingSize):this._fit(\"before\"),this},InfiniteGrid.prototype._renderLoading=function(t,e){var i,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this._status.loadingStyle,o=this._loadingBar[t?\"append\":\"prepend\"];if(o){var s=n((i={position:\"absolute\"},i[this._isVertical?\"top\":\"left\"]=e+\"px\",i),r);for(var a in s)o.style[a]=s[a];this._status.loadingSize=this._isVertical?(0,l.innerHeight)(o):(0,l.innerWidth)(o)}},InfiniteGrid.prototype.endLoading=function(){var t,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{display:\"none\"};if(!this._isLoading())return this;var i=this._getLoadingStatus()===c.LOADING_APPEND,r=i?\"append\":\"prepend\",o=this._loadingBar[r],s=this._loadingSize;if(this._process(c.LOADING_APPEND|c.LOADING_PREPEND,!1),this._status.loadingSize=0,this._status.loadingStyle={},!o)return this;var a=n((t={},t[this._isVertical?\"top\":\"left\"]=-s+\"px\",t),e);for(var u in a)o.style[u]=a[u];return i||this._fit(\"before\"),this._renderer.setContainerSize(this._getEdgeValue(\"end\")),this},InfiniteGrid.prototype._postLayout=function(t,e,i,n){var r=this;if(t)this._renderer.createAndInsert(e,i),this._updateCursor(i),this.options.useRecycle&&this._recycle(i),this._onLayoutComplete(e,i,n);else{var o=i?\"append\":\"prepend\";this._renderer[o](e),u[\"default\"].check(e.map(function(t){return t.el}),function(){var t=r._layout[o](r._renderer.updateSize(e),r._items.getOutline(i?r._status.endCursor:r._status.startCursor,i?\"end\":\"start\"));r._insertItems(t,i),r._updateCursor(i),r.options.useRecycle&&r._recycle(i),a[\"default\"].renderItems(t.items),r._onLayoutComplete(t.items,i,n)})}},InfiniteGrid.prototype._isVisible=function(t){var e=Math.min.apply(Math,this._items.getOutline(t,\"start\")),i=Math.max.apply(Math,this._items.getOutline(t,\"end\")),n=this._watcher.getScrollPos();return n+this._renderer.getViewSize()+this.options.thresholdi?1:0},InfiniteGrid.prototype._updateCursor=function(t){this.options.useRecycle?(t?this._status.endCursor++:this._status.startCursor>0?this._status.startCursor--:this._status.endCursor++,this._status.startCursor<0&&(this._status.startCursor=0)):(this._status.startCursor=0,this._status.endCursor=this._items.size()-1)},InfiniteGrid.prototype._insertItems=function(t,e){t.groupKey=t.items[0].groupKey,this._items[e?\"append\":\"prepend\"](t)},InfiniteGrid.prototype._requestAppend=function(){var t=this._getNextItems(c.APPEND);t.length?this._postLayout(c.CACHE,t,c.APPEND,c.TRUSTED):this.trigger(\"append\",{isTrusted:!0,groupKey:this.getGroupKeys().pop()})},InfiniteGrid.prototype._requestPrepend=function(){var t=this._getNextItems(c.PREPEND);t.length?this._postLayout(c.CACHE,t,c.PREPEND,c.TRUSTED):this.trigger(\"prepend\",{isTrusted:!0,groupKey:this.getGroupKeys().shift()})},InfiniteGrid.prototype._onCheck=function(t){var e=t.isForward,i=t.scrollPos,n=t.horizontal,r=t.orgScrollPos;if(this.trigger(\"change\",{isForward:e,horizontal:n,scrollPos:i,orgScrollPos:r}),!this.isProcessing()){var o=this._getEdgeOffset(e?\"end\":\"start\");if(o){var s=e?o[n?\"left\":\"top\"]-this._renderer.getViewSize():o[n?\"right\":\"bottom\"];e?i>=s&&this._requestAppend():i<=s&&(this._fit(\"before\"),this._requestPrepend())}}},InfiniteGrid.prototype._onLayoutComplete=function(t,e){var i=arguments.length>2&&arguments[2]!==undefined&&arguments[2];this._updateEdge();var n=this._getEdgeValue(\"end\");this._renderer.setContainerSize(n+this._status.loadingSize),e?this._isLoading()&&this._renderLoading(!0,n):this._fit(\"after\"),this._process(c.PROCESSING,!1),this.trigger(\"layoutComplete\",{target:t.concat(),isAppend:e,isTrusted:i,scrollPos:this._watcher.getScrollPos(),orgScrollPos:this._watcher.getOrgScrollPos(),size:n}),this._watcher.reset()},InfiniteGrid.prototype._reset=function(){this._status={procesingStatus:0,startCursor:-1,endCursor:-1,start:null,end:null}},InfiniteGrid.prototype.destroy=function(){this.off(),this._watcher.destroy(),this._reset(),this._items.clear(),this._renderer.destroy()},InfiniteGrid}(o[\"default\"]);p.VERSION=\"3.0.0-rc\",e[\"default\"]=p,t.exports=e[\"default\"]},function(e,i){e.exports=t},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=i(0),r=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(3)),o=i(1),s=function(){function ItemManager(){_classCallCheck(this,ItemManager),this.clear()}return ItemManager.from=function(t,e,i){var r=i.groupKey,s=(i.isAppend,ItemManager.selectItems((0,o.$)(t,n.MULTI),e));return(0,o.toArray)(s).map(function(t){return{el:t,groupKey:r,content:t.outerHTML}})},ItemManager.selectItems=function(t,e){return t.filter(function(t){return\"*\"===e?t:t.className.split(\" \").some(function(t){return t===e})})},ItemManager.pluck=function(t,e){return t.reduce(function(t,i){return t.concat(i[e])},[])},ItemManager.prototype.getStatus=function(){return{_data:this._data.map(function(t){return t.items=t.items.map(function(t){return delete t.el,t}),t})}},ItemManager.prototype.setStatus=function(t,e,i){for(var n=t._data,o=e;o<=i;o++)n[o].items=r[\"default\"].createElements(n[o].items);this.set(n)},ItemManager.prototype.size=function(){return this._data.length},ItemManager.prototype.fit=function(t,e){if(this._data.length){var i=e?\"top\":\"left\";0!==t&&(this._data=this._data.map(function(e){return e.items=e.items.map(function(e){return e.rect[i]-=t,e}),e.outlines.start=e.outlines.start.map(function(e){return e-t}),e.outlines.end=e.outlines.end.map(function(e){return e-t}),e}))}},ItemManager.prototype.pluck=function(t,e,i){return void 0!==e?void 0!==i?ItemManager.pluck(this._data.slice(e,i+1),t):ItemManager.pluck(this._data.slice(e,e+1),t):ItemManager.pluck(this._data,t)},ItemManager.prototype.getOutline=function(t,e){return this._data.length?this._data[t].outlines[e]:[]},ItemManager.prototype.getEdgeIndex=function(t,e,i){for(var n=\"start\"===t?\"min\":\"max\",r=-1,o=\"start\"===t?Infinity:-Infinity,s=e;s<=i;s++){var a=Math[n].apply(Math,this.getOutline(s,t));(\"start\"===t&&o>a||\"end\"===t&&oo?r[o]:null}return null},ItemManager.prototype.getEdgeValue=function(t,e,i){var n=this.pluck(\"outlines\",this.getEdgeIndex(t,e,i)).reduce(function(e,i){return e.concat(i[t])},[]);return n.length?Math[\"start\"===t?\"min\":\"max\"].apply(Math,n):0},ItemManager.prototype.append=function(t){return this._data.push(t),t.items},ItemManager.prototype.prepend=function(t){return this._data.unshift(t),t.items},ItemManager.prototype.clear=function(){this._data=[]},ItemManager.prototype.remove=function(t,e,i){var r=null,o=t.getAttribute(n.GROUPKEY_ATT),s=this.get(e,i).filter(function(t){return String(t.groupKey)===o});if(!s.length)return r;for(var a=(s=s[0]).items.length,u=-1,h=0;h0?ImageLoaded.waitImageLoaded(n,e):setTimeout(function(){e&&e()},0)},ImageLoaded}();e[\"default\"]=o,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e1&&arguments[1]!==undefined)||arguments[1];this._prevPos=t._prevPos,e&&this.scrollTo(t.scrollPos)},Watcher.prototype.scrollTo=function(t){var e=this._renderer.options.isVertical?[0,t]:[t,0];o.scrollTo.apply(undefined,[this._renderer.view].concat(e))},Watcher.prototype.getScrollPos=function(){return this._prevPos},Watcher.prototype.setScrollPos=function(t){var e=t;void 0===t&&(e=this.getOrgScrollPos()),this._prevPos=e-this._renderer.getContainerOffset()},Watcher.prototype.attachEvent=function(){(0,o.addEvent)(this._renderer.view,\"scroll\",this._onCheck),(0,o.addEvent)(window,\"resize\",this._onResize)},Watcher.prototype.getOrgScrollPos=function(){return(0,o.scroll)(this._renderer.view,this._renderer.options.isVertical)},Watcher.prototype.reset=function(){this._prevPos=null},Watcher.prototype._onCheck=function(){var t=this.getOrgScrollPos(),e=this.getScrollPos();this.setScrollPos(t);var i=this.getScrollPos();r.IS_IOS&&(0===t||null===e)||e===i||this._callback.check&&this._callback.check({isForward:e0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GridLayout),this.options=(0,o.assignOptions)({align:s,itemSize:0},t),this._size=0,this._columnSize=0,this._columnLength=0,this._style=(0,o.getStyleNames)(this.options.horizontal)}return GridLayout.prototype.getPoints=function(t){var e=this.options.horizontal?\"left\":\"top\";return t.map(function(t){return t[e]})},GridLayout.prototype.checkColumn=function(t){var e=this.options.margin,i=this.options.horizontal?\"height\":\"width\",n=this.options.itemSize||t&&t.size[i]||0;this._columnSize=n,this._columnLength=n?Math.max(parseInt((this._size+e)/(n+e),10),1):1},GridLayout.prototype._layout=function(t,e,i){for(var n=t.length,r=this.options.margin,o=this.options.align,s=this._style,c=s.size1,l=s.size2,p=s.pos1,f=s.pos2,d=this._columnSize,_=this._columnLength,g=this._size,y=g-(d+r)*_+r,m=i?\"min\":\"max\",v=e.slice(),S=e.slice(),E=-1,I=-1,w=0;w0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],s=t.map(function(t){return n({},t)}),a=e;return this._columnLength||this.checkColumn(t[0]),e.length!==this._columnLength&&(a=(0,o.fill)(this._columnLength,0===e.length?0:Math[i===r.APPEND?\"min\":\"max\"].apply(Math,e)||0)),{items:s,outlines:this._layout(s,a,i)}},GridLayout.prototype.append=function(t,e){return this._insert(t,e,r.APPEND)},GridLayout.prototype.prepend=function(t,e){return this._insert(t,e,r.PREPEND)},GridLayout.prototype.layout=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=e.length&&e[0].items.length&&e[0].items[0]||0;this.checkColumn(n);var s=void 0;if(i.length!==this._columnLength){var a=0===i.length?0:Math.min.apply(Math,i);s=(0,o.fill)(this._columnLength,a)}else s=i.slice();return e.forEach(function(e){var i=e.items,n=t._layout(i,s,r.APPEND);e.outlines=n,s=n.end}),this},GridLayout.prototype.setSize=function(t){return this._size=t,this},GridLayout}();e[\"default\"]=c,t.exports=e[\"default\"]},function(t,e,i){\"use strict\";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}function _inherits(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function makeShapeOutline(t,e,i,n){var o=Math[n?\"min\":\"max\"].apply(Math,t)||0;return t.length!==i?(0,r.fill)(i,0):t.map(function(t){return parseInt((t-o)/e,10)})}function getColumn(t){if(t.column)return t.column;var e=0;if(t.el){var i=t.el.dataset;e=i?i.column||1:t.el.getAttribute(\"column\")||1}else e=1;return t.column=e,e}e.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{\"default\":t}}(i(4)),r=i(1),o=function(t){function SquareLayout(){return _classCallCheck(this,SquareLayout),_possibleConstructorReturn(this,t.apply(this,arguments))}return _inherits(SquareLayout,t),SquareLayout.prototype._checkItemSize=function(){var e=this.options.column;if(e){var i=this.options.margin;this._itemSize=(this._size+i)/e-i}else t.prototype._checkItemSize.call(this)},SquareLayout.prototype._layout=function(e){for(var i,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],o=arguments[2],s=this._getItemSize(),a=this.options.margin,u=this.options.column||parseInt((this._size+a)/(s+a),10)||1,h=e.length,c=makeShapeOutline(n,s,u,o),l=o?\"min\":\"max\",p=[],f=o?1:-1,d=this._style,_=d.pos1,g=d.pos2,y=0;y1){for(var P=1;P=0)&&(o&&c[S+f*P]<=v||!o&&c[S+f*P]>=v);++P)++O;o||(S-=O-1)}E.columnWidth=[u,O],p.push((m={width:O,height:O},m[_]=v-(o?0:O),m[g]=S,m.index=y,m));for(var C=0;C0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,PackingLayout),this.options=(0,s.assignOptions)({aspectRatio:1,sizeWeight:1,ratioWeight:1},t),this._size=0,this._style=(0,s.getStyleNames)(this.options.horizontal)}return PackingLayout.prototype._findBestFitArea=function(t,e){if(0===t.getRatio())return t.setOriginWidth(e.getWidth()),t.setOriginHeight(e.getHeight()),t.setWidth(e.getWidth()),void t.setHeight(e.getHeight());var i=null,n=1e7,r=!1,o={width:0,height:0},s={width:0,height:0},a=this.options,u=a.sizeWeight,h=a.ratioWeight;t.innerItem().forEach(function(t){for(var a=getCost(t.getOriginSize(),t.getSize())*u,c=getCost(t.getOriginRatio(),t.getRatio())*h,l=void 0,p=0;p<2;++p){var f=void 0,d=void 0,_=void 0,g=void 0;0===p?(f=t.getWidth(),d=t.getHeight()*(e.getHeight()/(t.getOriginHeight()+e.getHeight())),_=t.getWidth(),g=t.getHeight()-d):(d=t.getHeight(),f=t.getWidth()*(e.getWidth()/(t.getOriginWidth()+e.getWidth())),g=t.getHeight(),_=t.getWidth()-f);var y=f*d,m=f/d,v=_*g,S=g/g;l=getCost(e.getSize(),y)*u,l+=getCost(e.getRatio(),m)*h,l+=getCost(t.getOriginSize(),v)*u-a,(l+=getCost(t.getOriginRatio(),S)*h-c)===Math.min(l,n)&&(n=l,i=t,r=0===p,o.width=f,o.height=d,s.width=_,s.height=g)}}),fitArea(e,i,o,s,r)},PackingLayout.prototype._layout=function(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],o=this._style,a=this.options.horizontal,u=this.options.aspectRatio,h=this.options.margin,c=o.pos1,l=o.size1,p=this._size*(a?u:1),f=this._size/(a?1:u),d=a?p:f,_=(0,s.toZeroArray)(i),g=n?Math.max.apply(Math,_):Math.min.apply(Math,_)-d-h,y=g+d+h,m=new r[\"default\"]({}),v=-1,S=-1,E=-1,I=-1;return t.forEach(function(t){var i=new r[\"default\"]({originWidth:t.orgSize.width,originHeight:t.orgSize.height,width:t.orgSize.width,height:t.orgSize.height});e._findBestFitArea(m,i),m.pushItem(i),m.scaleTo(p+h,f+h)}),t.forEach(function(t,e){var i=m.innerItem()[e],n=i.getWidth(),r=i.getHeight(),o=i.getTop(),s=i.getLeft();t.rect={top:o,left:s,width:n-h,height:r-h},t.rect[c]+=g,-1===v&&(v=e,S=e,E=t.rect[c],I=E),E>t.rect[c]&&(E=t.rect[c],v=e),I0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=arguments[2],r=t.map(function(t){return n({},t)});return{items:r,outlines:this._layout(r,e,i)}},PackingLayout.prototype.append=function(t,e){return this._insert(t,e,o.APPEND)},PackingLayout.prototype.prepend=function(t,e){return this._insert(t,e,o.PREPEND)},PackingLayout.prototype.layout=function(){for(var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],i=t.length,n=e,r=0;r0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,JustifiedLayout),this.options=(0,s.assignOptions)({minSize:0,maxSize:0},t),this._style=(0,s.getStyleNames)(this.options.horizontal),this._size=0}return JustifiedLayout.prototype._layout=function(t,e,i){var n=this,o=this._style,s=o.size1,a=o.size2,u=t.length,h=r[\"default\"].find_path(function(e){for(var i={},r=+e.replace(/[^0-9]/g,\"\"),o=u+1,h=r+1;h8);++h){var c=n._getCost(t,r,h,s,a);c<0&&h===o-1&&(c=0),null!==c&&(i[\"node\"+h]=Math.pow(c,2))}return i},\"node0\",\"node\"+u);return this._setStyle(t,h,e,i)},JustifiedLayout.prototype._getSize=function(t,e,i){var n=this.options.margin,r=t.reduce(function(t,n){return t+n.size[i]/n.size[e]},0);return(this._size-n*(t.length-1))/r},JustifiedLayout.prototype._getCost=function(t,e,i,n,r){var o=this._getSize(t.slice(e,i),n,r),s=this.options.minSize||0,a=this.options.maxSize||Infinity;return isFinite(a)?oa?Math.pow(o-a,2)+Math.pow(a,2):Math.min(o-a,s-o):o2&&arguments[2]!==undefined?arguments[2]:[],n=arguments[3],r=this._style,o=r.pos1,s=r.size1,a=r.pos2,u=r.size2,h=e.length,c=this.options.margin,l=i[0]||0,p=l,f=0,d=0;dc)&&(r[p]=c,o.push({value:p,cost:c}),n[p]=a)}if(\"undefined\"==typeof r[i]){var f=[\"Could not find a path from \",e,\" to \",i,\".\"].join(\"\");throw new Error(f)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var i=[],n=e;n;)i.push(n),t[n],n=t[n];return i.reverse(),i},find_path:function(t,i,n){var r=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(r,n)}};BinaryHeap.prototype={push:function(t){this.content.push(t),this.bubbleUp(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.sinkDown(0)),t},remove:function(t){for(var e=this.content.length,i=0;i0;){var i=Math.floor((t+1)/2)-1,n=this.content[i];if(!(this.scoreFunction(e)= 0; --i) {\n\t\tarray[i] = value;\n\t}\n\treturn array;\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 = param.match(/^<([A-z]+)\\s*([^>]*)>/);\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.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}\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 indexOf(arr, target) {\n\tvar isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\tif (!isRight) {\n\t\treturn arr.indexOf(target);\n\t}\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tif (arr[i] !== target) {\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 1\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 = window;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 DOMRenderer = function () {\n\tDOMRenderer.renderItem = function renderItem(item, styles) {\n\t\tif (item.el) {\n\t\t\tvar elStyle = item.el.style;\n\n\t\t\t// for debugging\n\t\t\titem.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);\n\t\t\telStyle.position = \"absolute\";\n\t\t\t[\"left\", \"top\", \"width\", \"height\"].forEach(function (p) {\n\t\t\t\tp in styles && (elStyle[p] = styles[p] + \"px\");\n\t\t\t});\n\t\t}\n\t};\n\n\tDOMRenderer.renderItems = function renderItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tDOMRenderer.renderItem(item, item.rect);\n\t\t});\n\t};\n\n\tDOMRenderer.removeItems = function removeItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tDOMRenderer.removeElement(item.el);\n\t\t\t\titem.el = null;\n\t\t\t}\n\t\t});\n\t};\n\n\tDOMRenderer.removeElement = function removeElement(element) {\n\t\telement.parentNode.removeChild(element);\n\t};\n\n\tDOMRenderer.createElements = function createElements(items) {\n\t\tvar elements = (0, _utils.$)(items.reduce(function (acc, v, i) {\n\t\t\tacc.push(v.content.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, \"\"));\n\t\t\treturn acc;\n\t\t}, []).join(\"\"), _consts.MULTI);\n\n\t\treturn items.map(function (item, index) {\n\t\t\titem.el = elements[index];\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tfunction DOMRenderer(element, options) {\n\t\t_classCallCheck(this, DOMRenderer);\n\n\t\t_extends(this.options = {\n\t\t\tisOverflowScroll: false,\n\t\t\tisEqualSize: false,\n\t\t\tisVertical: true\n\t\t}, options);\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis._init(element);\n\t\tthis.resize();\n\t}\n\n\tDOMRenderer.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\tcssText: this.container.style.cssText,\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_size: _extends({}, this._size)\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.setStatus = function setStatus(status, items) {\n\t\tthis.container.style.cssText = status.cssText;\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._size, status._size);\n\n\t\tDOMRenderer.renderItems(items);\n\t\tthis._insert(items, _consts.APPEND);\n\t};\n\n\tDOMRenderer.prototype.updateSize = function updateSize(items) {\n\t\tvar _this = this;\n\n\t\treturn items.map(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tif (_this.options.isEqualSize) {\n\t\t\t\t\t_this._size.item = _this._size.item || {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t\titem.size = _extends({}, _this._size.item);\n\t\t\t\t} else {\n\t\t\t\t\titem.size = {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (!item.orgSize) {\n\t\t\t\t\titem.orgSize = _extends({}, item.size);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tDOMRenderer.prototype._init = function _init(el) {\n\t\tvar element = (0, _utils.$)(el);\n\t\tvar style = (0, _utils.getStyles)(element);\n\n\t\tthis._orgStyle = {};\n\n\t\tif (style.position === \"static\") {\n\t\t\tthis._orgStyle.position = element.style.position;\n\t\t\telement.style.position = \"relative\";\n\t\t}\n\t\tif (this.options.isOverflowScroll) {\n\t\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\t\tthis._orgStyle.overflowX = element.style.overflowX;\n\t\t\tthis._orgStyle.overflowY = element.style.overflowY;\n\t\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\t\tthis.view = element;\n\t\t\tthis.container = element; // DEFENSE_BROWSER ? this._defense(element) : element;\n\t\t} else {\n\t\t\tthis.view = window;\n\t\t\tthis.container = element;\n\t\t}\n\t};\n\n\tDOMRenderer.prototype._defense = function _defense(element) {\n\t\tvar container = document.createElement(\"div\");\n\n\t\tcontainer.className = _consts.CONTAINER_CLASSNAME;\n\n\t\tvar children = element.children;\n\t\tvar length = children.length; // for IE8\n\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tcontainer.appendChild(children[0]);\n\t\t}\n\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\telement.appendChild(container);\n\t\treturn container;\n\t};\n\n\tDOMRenderer.prototype.append = function append(items) {\n\t\tthis._insert(items, _consts.APPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.prepend = function prepend(items) {\n\t\tthis._insert(items, _consts.PREPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.clear = function clear() {\n\t\tthis.container.innerHTML = \"\";\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\t}\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {\n\t\tvar itemsWithElement = DOMRenderer.createElements(items);\n\n\t\tDOMRenderer.renderItems(itemsWithElement);\n\t\tthis._insert(itemsWithElement, isAppend);\n\t};\n\n\tDOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {\n\t\tvar df = document.createDocumentFragment();\n\n\t\titems.forEach(function (item) {\n\t\t\tstyles && DOMRenderer.renderItem(item, styles);\n\t\t\tisAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);\n\t\t});\n\t\tisAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);\n\t};\n\n\tDOMRenderer.prototype._calcSize = function _calcSize() {\n\t\treturn this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);\n\t};\n\n\tDOMRenderer.prototype.getViewSize = function getViewSize() {\n\t\treturn this._size.view;\n\t};\n\n\tDOMRenderer.prototype.scrollBy = function scrollBy(point) {\n\t\tvar pos = this.options.isVertical ? [0, point] : [point, 0];\n\n\t\t_utils.scrollBy.apply(undefined, [this.view].concat(pos));\n\t};\n\n\tDOMRenderer.prototype.getContainerOffset = function getContainerOffset() {\n\t\treturn this._size.containerOffset;\n\t};\n\n\tDOMRenderer.prototype.getViewportSize = function getViewportSize() {\n\t\tthis.resize();\n\t\treturn this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.setContainerSize = function setContainerSize(size) {\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = size + \"px\";\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.resize = function resize() {\n\t\tif (this.isNeededResize()) {\n\t\t\tvar isVertical = this.options.isVertical;\n\n\t\t\tthis._size = {\n\t\t\t\tcontainerOffset: this.container[\"offset\" + (isVertical ? \"Top\" : \"Left\")],\n\t\t\t\tviewport: this._calcSize(),\n\t\t\t\tview: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),\n\t\t\t\titem: null\n\t\t\t};\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tDOMRenderer.prototype.isNeededResize = function isNeededResize() {\n\t\treturn this._calcSize() !== this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.destroy = function destroy() {\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\tfor (var p in this._orgStyle) {\n\t\t\tthis[this.options.isOverflowScroll ? \"view\" : \"container\"].style[p] = this._orgStyle[p];\n\t\t}\n\t};\n\n\treturn DOMRenderer;\n}();\n\nexports[\"default\"] = DOMRenderer;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DOMRenderer.js\n// module id = 3\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\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\n/*\nFrame\n[\n[1, 1, 1, 1, 1],\n[0, 0, 2, 2, 2],\n[0, 0, 2, 2, 2],\n[3, 4, 5, 5, 5],\n]\n*/\nfunction disableFrame(frame, type, x, y, width, height) {\n\tfor (var i = y; i < y + height; ++i) {\n\t\tfor (var j = x; j < x + width; ++j) {\n\t\t\tif (type !== frame[i][j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tframe[i][j] = 0;\n\t\t}\n\t}\n}\nfunction searchShapeInFrame(frame, type, top, left, width, height) {\n\tvar size = {\n\t\tleft: left,\n\t\ttop: top,\n\t\ttype: type,\n\t\twidth: 1,\n\t\theight: 1\n\t};\n\n\tfor (var i = left; i < width; ++i) {\n\t\tif (frame[top][i] === type) {\n\t\t\tsize.width = i - left + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (var _i = top; _i < height; ++_i) {\n\t\tif (frame[_i][left] === type) {\n\t\t\tsize.height = _i - top + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\t// After finding the shape, it will not find again.\n\tdisableFrame(frame, type, left, top, size.width, size.height);\n\treturn size;\n}\nfunction getShapes(frame) {\n\tvar height = frame.length;\n\tvar width = height ? frame[0].length : 0;\n\tvar shapes = [];\n\n\tfor (var i = 0; i < height; ++i) {\n\t\tfor (var j = 0; j < width; ++j) {\n\t\t\tvar type = frame[i][j];\n\n\t\t\tif (!type) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Separate shapes with other numbers.\n\t\t\tshapes.push(searchShapeInFrame(frame, type, i, j, width, height));\n\t\t}\n\t}\n\tshapes.sort(function (a, b) {\n\t\treturn a.type < b.type ? -1 : 1;\n\t});\n\treturn {\n\t\tshapes: shapes,\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n/**\n * FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다. \n * @example\n```\n\n```\n **/\n\nvar FrameLayout = function () {\n\tfunction FrameLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, FrameLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\titemSize: 0,\n\t\t\tframe: [],\n\t\t\tframeFill: true\n\t\t}, options);\n\t\tvar frame = this.options.frame.map(function (row) {\n\t\t\treturn row.slice();\n\t\t});\n\t\t// divide frame into shapes.\n\t\tvar shapes = getShapes(frame);\n\n\t\tthis._itemSize = this.options.itemSize || 0;\n\t\tthis._shapes = shapes;\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tFrameLayout.prototype._getItemSize = function _getItemSize() {\n\t\tthis._checkItemSize();\n\n\t\treturn this._itemSize;\n\t};\n\n\tFrameLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tif (this.options.itemSize) {\n\t\t\tthis._itemSize = this.options.itemSize;\n\t\t\treturn;\n\t\t}\n\t\tvar style = this._style;\n\t\tvar size = style.size2;\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / this._shapes[size] - margin;\n\t};\n\n\tFrameLayout.prototype._layout = function _layout(items) {\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar length = items.length;\n\t\tvar style = this._style;\n\t\tvar _options = this.options,\n\t\t margin = _options.margin,\n\t\t frameFill = _options.frameFill;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar itemSize = this._getItemSize();\n\t\tvar isItemObject = (typeof itemSize === \"undefined\" ? \"undefined\" : _typeof(itemSize)) === \"object\";\n\t\tvar itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;\n\t\tvar itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;\n\t\tvar shapesSize = this._shapes[size2Name];\n\t\tvar shapes = this._shapes.shapes;\n\t\tvar shapesLength = shapes.length;\n\t\tvar startOutline = (0, _utils.fill)(shapesSize, -99999);\n\t\tvar endOutline = (0, _utils.fill)(shapesSize, -99999);\n\t\tvar dist = 0;\n\t\tvar end = 0;\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar minPos = -1;\n\t\tvar maxPos = -1;\n\n\t\tif (!shapesLength) {\n\t\t\treturn { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };\n\t\t}\n\t\tfor (var i = 0; i < length; i += shapesLength) {\n\t\t\tfor (var j = 0; j < shapesLength && i + j < length; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = items[i + j];\n\t\t\t\tvar shape = shapes[j];\n\t\t\t\tvar shapePos1 = shape[pos1Name];\n\t\t\t\tvar shapePos2 = shape[pos2Name];\n\t\t\t\tvar shapeSize1 = shape[size1Name];\n\t\t\t\tvar shapeSize2 = shape[size2Name];\n\t\t\t\tvar pos1 = end - dist + shapePos1 * (itemSize1 + margin);\n\t\t\t\tvar pos2 = shapePos2 * (itemSize2 + margin);\n\t\t\t\tvar size1 = shapeSize1 * (itemSize1 + margin) - margin;\n\t\t\t\tvar size2 = shapeSize2 * (itemSize2 + margin) - margin;\n\n\t\t\t\tfor (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {\n\t\t\t\t\tif (startOutline[k] === -99999) {\n\t\t\t\t\t\tstartOutline[k] = pos1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startIndex === -1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (minPos > pos1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxPos < pos1 + size1 + margin) {\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tstartOutline[k] = Math.min(startOutline[k], pos1);\n\t\t\t\t\tendOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);\n\t\t\t\t}\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\tend = Math.max.apply(Math, endOutline);\n\t\t\t// check dist once\n\t\t\tif (i !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// find & fill empty block\n\t\t\tif (!frameFill) {\n\t\t\t\tdist = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdist = end;\n\n\t\t\tfor (var _j = 0; _j < shapesSize; ++_j) {\n\t\t\t\tif (startOutline[_j] === -99999) {\n\t\t\t\t\tstartOutline[_j] = Math.max.apply(Math, startOutline);\n\t\t\t\t\tendOutline[_j] = startOutline[_j];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// the dist between frame's end outline and next frame's start outline\n\t\t\t\t// expect that next frame's start outline is startOutline[j] + end\n\t\t\t\tdist = Math.min(startOutline[_j] + end - endOutline[_j], dist);\n\t\t\t}\n\t\t}\n\t\t// The target outline is start outline when type is APPENDING\n\t\tvar targetOutline = isAppend ? startOutline : endOutline;\n\t\tvar prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? \"max\" : \"min\"].apply(Math, outline);\n\t\tvar prevOutlineDist = isAppend ? 0 : end;\n\n\t\tif (frameFill && outline.length === shapesSize) {\n\t\t\tprevOutlineDist = 99999999;\n\t\t\tfor (var _i2 = 0; _i2 < shapesSize; ++_i2) {\n\t\t\t\tif (startOutline[_i2] === endOutline[_i2]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// if appending type is PREPEND, subtract dist from appending group's height.\n\n\t\t\t\tprevOutlineDist = Math.min(targetOutline[_i2] + prevOutlineEnd - outline[_i2], prevOutlineDist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i3 = 0; _i3 < shapesSize; ++_i3) {\n\t\t\tstartOutline[_i3] += prevOutlineEnd - prevOutlineDist;\n\t\t\tendOutline[_i3] += prevOutlineEnd - prevOutlineDist;\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\titem.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;\n\t\t});\n\t\treturn {\n\t\t\tstart: startOutline,\n\t\t\tend: endOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tFrameLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tFrameLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.FrameLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tFrameLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\n\treturn FrameLayout;\n}();\n\nexports[\"default\"] = FrameLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/FrameLayout.js\n// module id = 4\n// module chunks = 0 1","\"use strict\";\n\nvar _InfiniteGrid = require(\"./InfiniteGrid\");\n\nvar _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);\n\nvar _GridLayout = require(\"./layouts/GridLayout\");\n\nvar _GridLayout2 = _interopRequireDefault(_GridLayout);\n\nvar _FrameLayout = require(\"./layouts/FrameLayout\");\n\nvar _FrameLayout2 = _interopRequireDefault(_FrameLayout);\n\nvar _SquareLayout = require(\"./layouts/SquareLayout\");\n\nvar _SquareLayout2 = _interopRequireDefault(_SquareLayout);\n\nvar _PackingLayout = require(\"./layouts/PackingLayout\");\n\nvar _PackingLayout2 = _interopRequireDefault(_PackingLayout);\n\nvar _JustifiedLayout = require(\"./layouts/JustifiedLayout\");\n\nvar _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Copyright (c) NAVER Corp.\n * egjs-infinitegrid projects are licensed under the MIT license\n */\n_InfiniteGrid2[\"default\"].GridLayout = _GridLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].FrameLayout = _FrameLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].SquareLayout = _SquareLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].PackingLayout = _PackingLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].JustifiedLayout = _JustifiedLayout2[\"default\"];\n\nmodule.exports = _InfiniteGrid2[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 5\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 * Copyright (c) 2017 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n\nvar _component = require(\"@egjs/component\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _ItemManager = require(\"./ItemManager\");\n\nvar _ItemManager2 = _interopRequireDefault(_ItemManager);\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _ImageLoaded = require(\"./ImageLoaded\");\n\nvar _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);\n\nvar _Watcher = require(\"./Watcher\");\n\nvar _Watcher2 = _interopRequireDefault(_Watcher);\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// IE8\n// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create\n/* eslint-disable */\nif (typeof Object.create !== \"function\") {\n\tObject.create = function (o, properties) {\n\t\tif ((typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) !== \"object\" && typeof o !== \"function\") {\n\t\t\tthrow new TypeError(\"Object prototype may only be an Object: \" + o);\n\t\t} else if (o === null) {\n\t\t\tthrow new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n\t\t}\n\t\tfunction F() {}\n\t\tF.prototype = o;\n\t\treturn new F();\n\t};\n}\n/* eslint-enable */\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다\n * @alias eg.InfiniteGrid\n * @extends eg.Component\n *\n * @example\n```\n
    \n\t
  • \n\t\t
    test1
    \n\t
  • \n\t
  • \n\t\t
    test2
    \n\t
  • \n\t
  • \n\t\t
    test3
    \n\t
  • \n\t
  • \n\t\t
    test4
    \n\t
  • \n\t
  • \n\t\t
    test5
    \n\t
  • \n\t
  • \n\t\t
    test6
    \n\t
  • \n
\n\n```\n *\n * @support {\"ie\": \"8+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n **/\n\nvar InfiniteGrid = function (_Component) {\n\t_inherits(InfiniteGrid, _Component);\n\n\t/**\n * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트\n * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체\n * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)\n * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.\n * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to \"true\", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다\n * @param {Number} [options.threshold=300] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.\n * @param {String|Object} [options.loadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector \n *\n */\n\tfunction InfiniteGrid(element, options) {\n\t\t_classCallCheck(this, InfiniteGrid);\n\n\t\tvar _this = _possibleConstructorReturn(this, _Component.call(this));\n\n\t\t_extends(_this.options = {\n\t\t\titemSelector: \"*\",\n\t\t\tisOverflowScroll: false,\n\t\t\tthreshold: 300,\n\t\t\tisEqualSize: false,\n\t\t\tuseRecycle: true,\n\t\t\thorizontal: false,\n\t\t\tloadingBar: {}\n\t\t}, options);\n\t\t_consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);\n\t\t_this._isVertical = !_this.options.horizontal;\n\t\t_this._reset();\n\t\t_this._items = new _ItemManager2[\"default\"]();\n\t\t_this._renderer = new _DOMRenderer2[\"default\"](element, {\n\t\t\tisOverflowScroll: _this.options.isOverflowScroll,\n\t\t\tisEqualSize: _this.options.isEqualSize,\n\t\t\tisVertical: _this._isVertical\n\t\t});\n\t\t_this._watcher = new _Watcher2[\"default\"](_this._renderer, {\n\t\t\tlayout: function layout() {\n\t\t\t\treturn _this.layout();\n\t\t\t},\n\t\t\tcheck: function check(param) {\n\t\t\t\treturn _this._onCheck(param);\n\t\t\t}\n\t\t});\n\t\t_this._initLoadingBar();\n\t\treturn _this;\n\t}\n\t/**\n * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.append(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.append([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.append([HTMLElement1, HTMLElement2]);\n * infinitegrid.append(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.append = function append(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.APPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.prepend(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.prepend([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.prepend([HTMLElement1, HTMLElement2]);\n * infinitegrid.prepend(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.PREPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Layout class to use.\n * @ko 사용할 Layout 클래스를 지정한다.\n * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스\n * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {\n * margin: 10,\n * align: \"start\"\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {\n * margin: 10,\n * minSize: 100,\n * maxSize: 200\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {\n * margin: 10,\n * column: 2\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {\n * margin: 10,\n * frame: [\n * [1, 2],\n * [4, 3],\n * ]\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {\n * margin: 10,\n * aspectRatio: 1.5\n * });\n */\n\n\n\tInfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {\n\t\tthis._layout = new LayoutKlass(_extends(options || {}, {\n\t\t\thorizontal: !this._isVertical\n\t\t}));\n\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\treturn this;\n\t};\n\t/**\n * Returns the layouted items.\n * @ko 레이아웃된 아이템들을 반환한다.\n * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.\n * @returns {Array} List of items 아이템의 목록\n */\n\n\n\tInfiniteGrid.prototype.getItems = function getItems() {\n\t\tvar includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\treturn this[includeCached ? \"_getItems\" : \"_getVisibleItems\"]();\n\t};\n\n\tInfiniteGrid.prototype._getItems = function _getItems() {\n\t\treturn this._items.pluck(\"items\", 0, this._items.size());\n\t};\n\n\tInfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {\n\t\treturn this._items.pluck(\"items\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._updateEdge = function _updateEdge() {\n\t\tthis._status.start = this._items.getEdge(\"start\", this._status.startCursor, this._status.endCursor);\n\t\tthis._status.end = this._items.getEdge(\"end\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {\n\t\tvar rect = null;\n\n\t\tif (!this._status[cursor]) {\n\t\t\tvar item = this._items.getEdge(cursor);\n\n\t\t\tthis._status[cursor] = item;\n\t\t}\n\n\t\tif (this._status[cursor]) {\n\t\t\trect = this._status[cursor].rect;\n\t\t\tif (cursor === \"start\") {\n\t\t\t\trect.bottom = rect.top + this._status[cursor].size.height;\n\t\t\t\trect.right = rect.left + this._status[cursor].size.width;\n\t\t\t}\n\t\t}\n\t\treturn rect;\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._fit = function _fit() {\n\t\tvar scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"after\";\n\n\t\t// for caching\n\t\tif (!this.options.useRecycle) {\n\t\t\tthis._fit = function () {\n\t\t\t\treturn 0;\n\t\t\t};\n\t\t\treturn 0;\n\t\t}\n\t\tif (this._layout) {\n\t\t\tvar base = this._getEdgeValue(\"start\");\n\t\t\tvar margin = this._status.loadingSize;\n\n\t\t\tif (base !== 0 || margin) {\n\t\t\t\tif (!this._isLoading()) {\n\t\t\t\t\tthis._process(_consts.PROCESSING);\n\t\t\t\t}\n\t\t\t\tif (scrollCycle === \"before\") {\n\t\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\t}\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t\tif (scrollCycle === \"after\") {\n\t\t\t\t\tthis._renderer.scrollBy(Math.abs(base) + margin);\n\t\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\t}\n\t\t\t\tif (!this._isLoading()) {\n\t\t\t\t\tthis._process(_consts.PROCESSING, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn base;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {\n\t\treturn this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);\n\t};\n\t/**\n * Rearranges a layout.\n * @ko 레이아웃을 다시 배치한다.\n * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.layout = function layout() {\n\t\tvar _this2 = this;\n\n\t\tvar isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n\t\tif (!this._layout || this._isProcessing()) {\n\t\t\treturn this;\n\t\t}\n\t\t// check childElement\n\t\tif (!this._items.size()) {\n\t\t\tthis._insert((0, _utils.toArray)(this._renderer.container.children), true);\n\t\t\treturn this;\n\t\t} else {\n\t\t\tthis._process(_consts.PROCESSING);\n\n\t\t\tvar data = void 0;\n\t\t\tvar outline = void 0;\n\n\t\t\tif (isRelayout) {\n\t\t\t\t// remove cache\n\t\t\t\tdata = this._items.get(this._status.startCursor, this._status.endCursor);\n\t\t\t\tif (this._renderer.resize()) {\n\t\t\t\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\t\tdata.items = _this2._renderer.updateSize(v.items);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdata = this._items.get(this._status.startCursor, this._items.size());\n\t\t\t\toutline = this._items.getOutline(this._status.startCursor, \"start\");\n\t\t\t}\n\t\t\tif (!data.length) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthis._layout.layout(data, outline);\n\n\t\t\tif (isRelayout) {\n\t\t\t\tthis._items.set(data);\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t\tthis._status.endCursor = data.length - 1;\n\t\t\t} else {\n\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\treturn _this2._items.set(v, v.groupKey);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tisRelayout && this._watcher.setScrollPos();\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Removes a item element on a grid layout.\n * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.\n * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트\n * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보\n */\n\n\n\tInfiniteGrid.prototype.remove = function remove(element) {\n\t\tif (element) {\n\t\t\tvar items = this._items.remove(element, this._status.startCursor, this._status.endCursor);\n\n\t\t\tif (items) {\n\t\t\t\t_DOMRenderer2[\"default\"].removeElement(element);\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tInfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {\n\t\tvar items = [];\n\t\tvar size = this._items.size();\n\n\t\t// from cache\n\t\tif (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {\n\t\t\tif (isAppend && size > this._status.endCursor + 1) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.endCursor + 1);\n\t\t\t} else if (!isAppend && this._status.startCursor > 0) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.startCursor - 1);\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t};\n\t/**\n * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.\n * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.\n * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.\n * @return {Array} List of group keys 그룹 키의 목록\n */\n\n\n\tInfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {\n\t\tvar data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);\n\n\t\treturn data.map(function (v) {\n\t\t\treturn v.groupKey;\n\t\t});\n\t};\n\t/**\n * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.\n * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다\n * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체\n */\n\n\n\tInfiniteGrid.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_status: _extends({}, this._status),\n\t\t\t_items: this._items.getStatus(),\n\t\t\t_renderer: this._renderer.getStatus(),\n\t\t\t_watcher: this._watcher.getStatus()\n\t\t};\n\t};\n\t/**\n * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.\n * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.\n * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체\n * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._watcher.detachEvent();\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._status, status._status);\n\t\tthis._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);\n\t\tthis._renderer.setStatus(status._renderer, this._getVisibleItems());\n\t\tthis._watcher.setStatus(status._watcher, applyScrollPos);\n\t\tthis._updateEdge();\n\t\tthis._watcher.attachEvent();\n\t\treturn this;\n\t};\n\t/**\n * Clears added card elements and data.\n * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.clear = function clear() {\n\t\tthis._items.clear();\n\t\tthis._renderer.clear();\n\t\tthis._reset();\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._initLoadingBar = function _initLoadingBar() {\n\t\tvar loadingBar = this.options.loadingBar;\n\t\tvar loadingBarObj = (typeof loadingBar === \"undefined\" ? \"undefined\" : _typeof(loadingBar)) === \"object\" ? loadingBar : {\n\t\t\t\"append\": loadingBar,\n\t\t\t\"prepend\": loadingBar\n\t\t};\n\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tthis._loadingBar = loadingBarObj;\n\t\tfor (var type in loadingBarObj) {\n\t\t\tloadingBarObj[type] = (0, _utils.$)(loadingBarObj[type]);\n\t\t}\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {\n\t\tvar loadingBar = this._loadingBar;\n\t\tvar container = this._renderer.container;\n\n\t\tfor (var type in loadingBar) {\n\t\t\tcontainer.appendChild(loadingBar[type]);\n\t\t}\n\t};\n\t/**\n * Checks whether a card element or data is being added.\n * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다\n * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부\n */\n\n\n\tInfiniteGrid.prototype.isProcessing = function isProcessing() {\n\t\treturn this._isProcessing() || this._isLoading();\n\t};\n\n\tInfiniteGrid.prototype._isProcessing = function _isProcessing() {\n\t\treturn (this._status.procesingStatus & _consts.PROCESSING) > 0;\n\t};\n\n\tInfiniteGrid.prototype._isLoading = function _isLoading() {\n\t\treturn this._getLoadingStatus() > 0;\n\t};\n\n\tInfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {\n\t\treturn this._status.procesingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);\n\t};\n\n\tInfiniteGrid.prototype._process = function _process(status) {\n\t\tvar isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (isAdd) {\n\t\t\tthis._status.procesingStatus |= status;\n\t\t} else {\n\t\t\tthis._status.procesingStatus -= this._status.procesingStatus & status;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {\n\t\tif (this._isProcessing() || elements.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\t\tvar key = typeof groupKey === \"undefined\" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;\n\t\tvar items = _ItemManager2[\"default\"].from((0, _utils.$)(elements, true), this.options.itemSelector, {\n\t\t\tisAppend: isAppend,\n\t\t\tgroupKey: key\n\t\t});\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);\n\t};\n\t// add items, and remove items for recycling\n\n\n\tInfiniteGrid.prototype._recycle = function _recycle(isAppend) {\n\t\tvar remove = [];\n\n\t\tif (this._status.startCursor !== this._status.endCursor) {\n\t\t\tfor (var i = this._status.startCursor; i <= this._status.endCursor; i++) {\n\t\t\t\tremove.push(this._isVisible(i));\n\t\t\t}\n\t\t}\n\t\tvar start = remove.indexOf(isAppend ? 1 : -1);\n\t\tvar end = remove.lastIndexOf(isAppend ? 1 : -1);\n\n\t\tif (start !== -1 && end !== -1) {\n\t\t\tstart = this._status.startCursor + start;\n\t\t\tend = start + end;\n\t\t\t_DOMRenderer2[\"default\"].removeItems(this._items.pluck(\"items\", start, end));\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.startCursor = end + 1;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor = start - 1;\n\t\t\t}\n\t\t}\n\t};\n\t/**\n * Returns the element of loading bar.\n * @ko 로딩 바의 element를 반환한다.\n * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @return {Element} The element of loading bar. 로딩 바의 element\n */\n\n\n\tInfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {\n\t\tvar isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;\n\n\t\treturn this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\t};\n\t/**\n * Start loading for append/prepend during loading data.\n * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.\n * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @param {Object} [userStyle = {display: \"block\"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.startLoading = function startLoading(isAppend) {\n\t\tvar userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: \"block\" };\n\n\t\tif (this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\n\t\tthis._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);\n\t\tif (!this._loadingBar[type]) {\n\t\t\treturn this;\n\t\t}\n\t\tvar pos = isAppend ? this._getEdgeValue(\"end\") : 0;\n\n\t\tthis._renderLoading(isAppend, pos, userStyle);\n\t\tthis._status.loadingStyle = userStyle;\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t} else {\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") + this._status.loadingSize);\n\t\t}\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._renderLoading = function _renderLoading(isAppend, pos) {\n\t\tvar _extends2;\n\n\t\tvar userStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._status.loadingStyle;\n\n\t\tvar el = this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\t\tvar style = _extends((_extends2 = {\n\t\t\tposition: \"absolute\"\n\t\t}, _extends2[this._isVertical ? \"top\" : \"left\"] = pos + \"px\", _extends2), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tthis._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);\n\t};\n\t/**\n * End loading after startLoading() for append/prepend\n * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.\n * @param {Object} [userStyle = {display: \"none\"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.endLoading = function endLoading() {\n\t\tvar _extends3;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: \"none\" };\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\t\tvar el = this._loadingBar[type];\n\t\tvar size = this._loadingSize;\n\n\t\tthis._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tif (!el) {\n\t\t\treturn this;\n\t\t}\n\t\tvar style = _extends((_extends3 = {}, _extends3[this._isVertical ? \"top\" : \"left\"] = -size + \"px\", _extends3), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t}\n\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {\n\t\tvar _this3 = this;\n\n\t\tif (fromCache) {\n\t\t\tthis._renderer.createAndInsert(items, isAppend);\n\t\t\tthis._updateCursor(isAppend);\n\t\t\tthis.options.useRecycle && this._recycle(isAppend);\n\t\t\tthis._onLayoutComplete(items, isAppend, isTrusted);\n\t\t} else {\n\t\t\tvar method = isAppend ? \"append\" : \"prepend\";\n\n\t\t\tthis._renderer[method](items);\n\t\t\t// check image sizes after elements are attated on DOM\n\t\t\t_ImageLoaded2[\"default\"].check(items.map(function (item) {\n\t\t\t\treturn item.el;\n\t\t\t}), function () {\n\t\t\t\tvar layouted = _this3._layout[method](_this3._renderer.updateSize(items), _this3._items.getOutline(isAppend ? _this3._status.endCursor : _this3._status.startCursor, isAppend ? \"end\" : \"start\"));\n\n\t\t\t\t_this3._insertItems(layouted, isAppend);\n\t\t\t\t_this3._updateCursor(isAppend);\n\t\t\t\t_this3.options.useRecycle && _this3._recycle(isAppend);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(layouted.items);\n\t\t\t\t_this3._onLayoutComplete(layouted.items, isAppend, isTrusted);\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._isVisible = function _isVisible(index) {\n\t\tvar min = Math.min.apply(Math, this._items.getOutline(index, \"start\"));\n\t\tvar max = Math.max.apply(Math, this._items.getOutline(index, \"end\"));\n\t\tvar pos = this._watcher.getScrollPos();\n\t\tvar viewSize = this._renderer.getViewSize();\n\n\t\tif (pos + viewSize + this.options.threshold < min) {\n\t\t\treturn -1;\n\t\t} else if (pos - this.options.threshold > max) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t};\n\n\tInfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {\n\t\tif (this.options.useRecycle) {\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.endCursor++;\n\t\t\t} else if (this._status.startCursor > 0) {\n\t\t\t\tthis._status.startCursor--;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor++; // outside prepend\n\t\t\t}\n\t\t\tif (this._status.startCursor < 0) {\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._status.startCursor = 0;\n\t\t\tthis._status.endCursor = this._items.size() - 1;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {\n\t\tlayouted.groupKey = layouted.items[0].groupKey;\n\t\tthis._items[isAppend ? \"append\" : \"prepend\"](layouted);\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestAppend = function _requestAppend() {\n\t\tvar items = this._getNextItems(_consts.APPEND);\n\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.\n * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다\n * @event eg.InfiniteGrid#append\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"append\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().pop()\n\t\t\t});\n\t\t}\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestPrepend = function _requestPrepend() {\n\t\tvar items = this._getNextItems(_consts.PREPEND);\n\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.\n * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.\n * @event eg.InfiniteGrid#prepend\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"prepend\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().shift()\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onCheck = function _onCheck(_ref) {\n\t\tvar isForward = _ref.isForward,\n\t\t scrollPos = _ref.scrollPos,\n\t\t horizontal = _ref.horizontal,\n\t\t orgScrollPos = _ref.orgScrollPos;\n\n\t\t/**\n * This event is fired when the user scrolls.\n * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.\n * @event eg.InfiniteGrid#change\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n */\n\t\tthis.trigger(\"change\", {\n\t\t\tisForward: isForward,\n\t\t\thorizontal: horizontal,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos\n\t\t});\n\t\tif (this.isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tvar rect = this._getEdgeOffset(isForward ? \"end\" : \"start\");\n\n\t\tif (!rect) {\n\t\t\treturn;\n\t\t}\n\t\tvar targetPos = isForward ? rect[horizontal ? \"left\" : \"top\"] - this._renderer.getViewSize() : rect[horizontal ? \"right\" : \"bottom\"];\n\n\t\tif (isForward) {\n\t\t\tif (scrollPos >= targetPos) {\n\t\t\t\tthis._requestAppend();\n\t\t\t}\n\t\t} else if (scrollPos <= targetPos) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {\n\t\tvar isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\t\tthis._updateEdge();\n\t\tvar size = this._getEdgeValue(\"end\");\n\n\t\tthis._renderer.setContainerSize(size + this._status.loadingSize);\n\t\tif (isAppend) {\n\t\t\tthis._isLoading() && this._renderLoading(true, size);\n\t\t} else {\n\t\t\tthis._fit(\"after\");\n\t\t}\n\t\tthis._process(_consts.PROCESSING, false);\n\t\t/**\n * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.\n * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다\n * @event eg.InfiniteGrid#layoutComplete\n *\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들\n * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\tthis.trigger(\"layoutComplete\", {\n\t\t\ttarget: items.concat(),\n\t\t\tisAppend: isAppend,\n\t\t\tisTrusted: isTrusted,\n\t\t\tscrollPos: this._watcher.getScrollPos(),\n\t\t\torgScrollPos: this._watcher.getOrgScrollPos(),\n\t\t\tsize: size\n\t\t});\n\t\tthis._watcher.reset();\n\t\t// console.warn(\"_onLayoutComplete [\", this._status.startCursor, this._status.endCursor, \"]\");\n\t};\n\n\tInfiniteGrid.prototype._reset = function _reset() {\n\t\tthis._status = {\n\t\t\tprocesingStatus: 0,\n\t\t\tstartCursor: -1,\n\t\t\tendCursor: -1,\n\t\t\tstart: null,\n\t\t\tend: null\n\t\t};\n\t};\n\t/**\n * Destroys elements, properties, and events used on a grid layout.\n * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다\n */\n\n\n\tInfiniteGrid.prototype.destroy = function destroy() {\n\t\tthis.off();\n\t\tthis._watcher.destroy();\n\t\tthis._reset();\n\t\tthis._items.clear();\n\t\tthis._renderer.destroy();\n\t};\n\n\treturn InfiniteGrid;\n}(_component2[\"default\"]);\n\nInfiniteGrid.VERSION = \"3.0.0-rc\";\n\nexports[\"default\"] = InfiniteGrid;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/InfiniteGrid.js\n// module id = 6\n// module chunks = 0 1","/*!\n * Copyright (c) 2017 NAVER Corp.\r\n * @egjs/component project is licensed under the MIT license\r\n * \r\n * @egjs/component JavaScript library\r\n * http://naver.github.io/egjs/component\r\n * \r\n * @version 2.1.0\n */\n(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[\"Component\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"Component\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _Component = __webpack_require__(1);\n\nvar _Component2 = _interopRequireDefault(_Component);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n_Component2[\"default\"].VERSION = \"2.1.0\";\nmodule.exports = _Component2[\"default\"];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n/**\n * A class used to manage events and options in a component\n * @ko 컴포넌트의 이벤트와 옵션을 관리할 수 있게 하는 클래스\n * @alias eg.Component\n */\nvar Component = function () {\n\t/**\n * @support {\"ie\": \"7+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n */\n\tfunction Component() {\n\t\t_classCallCheck(this, Component);\n\n\t\tthis._eventHandler = {};\n\t\tthis.options = {};\n\t}\n\t/**\n * Triggers a custom event.\n * @ko 커스텀 이벤트를 발생시킨다\n * @param {String} eventName The name of the custom event to be triggered 발생할 커스텀 이벤트의 이름\n * @param {Object} customEvent Event data to be sent when triggering a custom event 커스텀 이벤트가 발생할 때 전달할 데이터\n * @return {Boolean} Indicates whether the event has occurred. If the stop() method is called by a custom event handler, it will return false and prevent the event from occurring. Ref 이벤트 발생 여부. 커스텀 이벤트 핸들러에서 stop() 메서드를 호출하면 'false'를 반환하고 이벤트 발생을 중단한다. 참고\n * @example\n class Some extends eg.Component {\n some(){\n \tif(this.trigger(\"beforeHi\")){ // When event call to stop return false.\n \tthis.trigger(\"hi\");// fire hi event.\n \t}\n }\n }\n const some = new Some();\n some.on(\"beforeHi\", (e) => {\n if(condition){\n \te.stop(); // When event call to stop, `hi` event not call.\n }\n });\n some.on(\"hi\", (e) => {\n // `currentTarget` is component instance.\n console.log(some === e.currentTarget); // true\n });\n // If you want to more know event design. You can see article.\n // https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F\n */\n\n\n\tComponent.prototype.trigger = function trigger(eventName) {\n\t\tvar customEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tvar handlerList = this._eventHandler[eventName] || [];\n\t\tvar hasHandlerList = handlerList.length > 0;\n\n\t\tif (!hasHandlerList) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If detach method call in handler in first time then handeler list calls.\n\t\thandlerList = handlerList.concat();\n\n\t\tcustomEvent.eventType = eventName;\n\n\t\tvar isCanceled = false;\n\t\tvar arg = [customEvent];\n\t\tvar i = 0;\n\n\t\tcustomEvent.stop = function () {\n\t\t\tisCanceled = true;\n\t\t};\n\t\tcustomEvent.currentTarget = this;\n\n\t\tfor (var _len = arguments.length, restParam = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t\t\trestParam[_key - 2] = arguments[_key];\n\t\t}\n\n\t\tif (restParam.length >= 1) {\n\t\t\targ = arg.concat(restParam);\n\t\t}\n\n\t\tfor (i = 0; handlerList[i]; i++) {\n\t\t\thandlerList[i].apply(this, arg);\n\t\t}\n\n\t\treturn !isCanceled;\n\t};\n\t/**\n * Executed event just one time.\n * @ko 이벤트가 한번만 실행된다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n alert(\"hi\");\n }\n thing() {\n this.once(\"hi\", this.hi);\n }\n }\n var some = new Some();\n some.thing();\n some.trigger(\"hi\");\n // fire alert(\"hi\");\n some.trigger(\"hi\");\n // Nothing happens\n */\n\n\n\tComponent.prototype.once = function once(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar i = void 0;\n\n\t\t\tfor (i in eventHash) {\n\t\t\t\tthis.once(i, eventHash[i]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar self = this;\n\n\t\t\tthis.on(eventName, function listener() {\n\t\t\t\tfor (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\t\t\targ[_key2] = arguments[_key2];\n\t\t\t\t}\n\n\t\t\t\thandlerToAttach.apply(self, arg);\n\t\t\t\tself.off(eventName, listener);\n\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n * Checks whether an event has been attached to a component.\n * @ko 컴포넌트에 이벤트가 등록됐는지 확인한다.\n * @param {String} eventName The name of the event to be attached 등록 여부를 확인할 이벤트의 이름\n * @return {Boolean} Indicates whether the event is attached. 이벤트 등록 여부\n * @example\n class Some extends eg.Component {\n some() {\n this.hasOn(\"hi\");// check hi event.\n }\n }\n */\n\n\n\tComponent.prototype.hasOn = function hasOn(eventName) {\n\t\treturn !!this._eventHandler[eventName];\n\t};\n\n\t/**\n * Attaches an event to a component.\n * @ko 컴포넌트에 이벤트를 등록한다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.on(\"hi\",this.hi); //attach event\n }\n }\n */\n\n\n\tComponent.prototype.on = function on(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar name = void 0;\n\n\t\t\tfor (name in eventHash) {\n\t\t\t\tthis.on(name, eventHash[name]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\t\tif (typeof handlerList === \"undefined\") {\n\t\t\t\tthis._eventHandler[eventName] = [];\n\t\t\t\thandlerList = this._eventHandler[eventName];\n\t\t\t}\n\n\t\t\thandlerList.push(handlerToAttach);\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Detaches an event from the component.\n * @ko 컴포넌트에 등록된 이벤트를 해제한다\n * @param {eventName} eventName The name of the event to be detached 해제할 이벤트의 이름\n * @param {Function} handlerToDetach The handler function of the event to be detached 해제할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself 컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.off(\"hi\",this.hi); //detach event\n }\n }\n */\n\n\n\tComponent.prototype.off = function off(eventName, handlerToDetach) {\n\t\t// All event detach.\n\t\tif (typeof eventName === \"undefined\") {\n\t\t\tthis._eventHandler = {};\n\t\t\treturn this;\n\t\t}\n\n\t\t// All handler of specific event detach.\n\t\tif (typeof handlerToDetach === \"undefined\") {\n\t\t\tif (typeof eventName === \"string\") {\n\t\t\t\tthis._eventHandler[eventName] = undefined;\n\t\t\t\treturn this;\n\t\t\t} else {\n\t\t\t\tvar eventHash = eventName;\n\t\t\t\tvar name = void 0;\n\n\t\t\t\tfor (name in eventHash) {\n\t\t\t\t\tthis.off(name, eventHash[name]);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\t// The handler of specific event detach.\n\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\tif (handlerList) {\n\t\t\tvar k = void 0;\n\t\t\tvar handlerFunction = void 0;\n\n\t\t\tfor (k = 0; (handlerFunction = handlerList[k]) !== undefined; k++) {\n\t\t\t\tif (handlerFunction === handlerToDetach) {\n\t\t\t\t\thandlerList = handlerList.splice(k, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\treturn Component;\n}();\n\nexports[\"default\"] = Component;\nmodule.exports = exports[\"default\"];\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=component.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@egjs/component/dist/component.js\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _consts = require(\"./consts\");\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ItemManager = function () {\n\tItemManager.from = function from(elements, selector, _ref) {\n\t\tvar groupKey = _ref.groupKey,\n\t\t isAppend = _ref.isAppend;\n\n\t\tvar filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);\n\n\t\t// Item Structure\n\t\treturn (0, _utils.toArray)(filted).map(function (el) {\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tgroupKey: groupKey,\n\t\t\t\tcontent: el.outerHTML\n\t\t\t};\n\t\t});\n\t};\n\n\tItemManager.selectItems = function selectItems(elements, selector) {\n\t\treturn elements.filter(function (v) {\n\t\t\tif (selector === \"*\") {\n\t\t\t\treturn v;\n\t\t\t} else {\n\t\t\t\treturn v.className.split(\" \").some(function (c) {\n\t\t\t\t\treturn c === selector;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tItemManager.pluck = function pluck(data, property) {\n\t\treturn data.reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[property]);\n\t\t}, []);\n\t};\n\n\tfunction ItemManager() {\n\t\t_classCallCheck(this, ItemManager);\n\n\t\tthis.clear();\n\t}\n\n\tItemManager.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_data: this._data.map(function (data) {\n\t\t\t\tdata.items = data.items.map(function (item) {\n\t\t\t\t\tdelete item.el;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\treturn data;\n\t\t\t})\n\t\t};\n\t};\n\n\tItemManager.prototype.setStatus = function setStatus(status, start, end) {\n\t\tvar data = status._data;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tdata[i].items = _DOMRenderer2[\"default\"].createElements(data[i].items);\n\t\t}\n\t\tthis.set(data);\n\t};\n\n\tItemManager.prototype.size = function size() {\n\t\treturn this._data.length;\n\t};\n\n\tItemManager.prototype.fit = function fit(base, isVertical) {\n\t\tif (!this._data.length) {\n\t\t\treturn;\n\t\t}\n\t\tvar property = isVertical ? \"top\" : \"left\";\n\n\t\tif (base !== 0) {\n\t\t\tthis._data = this._data.map(function (v) {\n\t\t\t\tv.items = v.items.map(function (item) {\n\t\t\t\t\titem.rect[property] -= base;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\tv.outlines.start = v.outlines.start.map(function (start) {\n\t\t\t\t\treturn start - base;\n\t\t\t\t});\n\t\t\t\tv.outlines.end = v.outlines.end.map(function (end) {\n\t\t\t\t\treturn end - base;\n\t\t\t\t});\n\t\t\t\treturn v;\n\t\t\t});\n\t\t}\n\t};\n\n\tItemManager.prototype.pluck = function pluck(property, start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, end + 1), property);\n\t\t\t} else {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, start + 1), property);\n\t\t\t}\n\t\t} else {\n\t\t\treturn ItemManager.pluck(this._data, property);\n\t\t}\n\t};\n\n\tItemManager.prototype.getOutline = function getOutline(index, property) {\n\t\tif (this._data.length) {\n\t\t\treturn this._data[index].outlines[property];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t};\n\n\tItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {\n\t\tvar prop = cursor === \"start\" ? \"min\" : \"max\";\n\t\tvar index = -1;\n\t\tvar targetValue = cursor === \"start\" ? Infinity : -Infinity;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tvar value = Math[prop].apply(Math, this.getOutline(i, cursor));\n\n\t\t\tif (cursor === \"start\" && targetValue > value || cursor === \"end\" && targetValue < value) {\n\t\t\t\ttargetValue = value;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t};\n\n\tItemManager.prototype.getEdge = function getEdge(cursor, start, end) {\n\t\tvar dataIdx = this.getEdgeIndex(cursor, start, end);\n\t\tvar items = this.pluck(\"items\", dataIdx);\n\n\t\tif (items.length) {\n\t\t\tvar itemIdx = this.getOutline(dataIdx, cursor + \"Index\");\n\n\t\t\treturn items.length > itemIdx ? items[itemIdx] : null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {\n\t\tvar outlines = this.pluck(\"outlines\", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[cursor]);\n\t\t}, []);\n\n\t\treturn outlines.length ? Math[cursor === \"start\" ? \"min\" : \"max\"].apply(Math, outlines) : 0;\n\t};\n\n\tItemManager.prototype.append = function append(layouted) {\n\t\tthis._data.push(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.prepend = function prepend(layouted) {\n\t\tthis._data.unshift(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.clear = function clear() {\n\t\tthis._data = [];\n\t};\n\n\tItemManager.prototype.remove = function remove(element, start, end) {\n\t\tvar items = null;\n\t\tvar key = element.getAttribute(_consts.GROUPKEY_ATT);\n\t\tvar data = this.get(start, end).filter(function (v) {\n\t\t\treturn String(v.groupKey) === key;\n\t\t});\n\n\t\tif (!data.length) {\n\t\t\treturn items;\n\t\t}\n\t\tdata = data[0];\n\n\t\tvar len = data.items.length;\n\t\tvar idx = -1;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tif (data.items[i].el === element) {\n\t\t\t\tidx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (~idx) {\n\t\t\t// remove item information\n\t\t\tdata.items.splice(idx, 1);\n\t\t\tthis.set(data, key);\n\t\t\titems = data.items;\n\t\t}\n\t\treturn items;\n\t};\n\n\tItemManager.prototype.get = function get(start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn this._data.slice(start, end + 1);\n\t\t\t} else {\n\t\t\t\treturn this._data.slice(start, start + 1);\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._data.concat();\n\t\t}\n\t};\n\n\tItemManager.prototype.set = function set(data, key) {\n\t\tif (typeof key !== \"undefined\" && !Array.isArray(data)) {\n\t\t\tvar len = this._data.length;\n\t\t\tvar idx = -1;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tif (this._data[i].groupKey === key) {\n\t\t\t\t\tidx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t~idx && (this._data[idx] = data);\n\t\t} else {\n\t\t\tthis._data = data.concat();\n\t\t}\n\t};\n\n\treturn ItemManager;\n}();\n\nexports[\"default\"] = ItemManager;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ItemManager.js\n// module id = 8\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 ImageLoaded = function () {\n\tfunction ImageLoaded() {\n\t\t_classCallCheck(this, ImageLoaded);\n\t}\n\n\tImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {\n\t\tvar checkCount = needCheck.length;\n\t\tvar checkImage = function checkImage() {\n\t\t\tcheckCount--;\n\t\t\tcheckCount <= 0 && callback && callback();\n\t\t};\n\t\tvar onCheck = function onCheck(e) {\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"load\", onCheck);\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"error\", onCheck);\n\t\t\tcheckImage();\n\t\t};\n\n\t\t// workaround for IE\n\t\t_consts.IS_IE && needCheck.forEach(function (v) {\n\t\t\treturn v.setAttribute(\"src\", v.getAttribute(\"src\"));\n\t\t});\n\t\tneedCheck.forEach(function (v) {\n\t\t\tif (v.complete) {\n\t\t\t\tcheckImage();\n\t\t\t} else {\n\t\t\t\t(0, _utils.addEvent)(v, \"load\", onCheck);\n\t\t\t\t(0, _utils.addEvent)(v, \"error\", onCheck);\n\t\t\t}\n\t\t});\n\t};\n\n\tImageLoaded.checkImageLoaded = function checkImageLoaded(el) {\n\t\tif (el.tagName === \"IMG\") {\n\t\t\treturn !el.complete ? [el] : [];\n\t\t} else {\n\t\t\treturn (0, _utils.toArray)(el.querySelectorAll(\"img\")).filter(function (v) {\n\t\t\t\tif (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {\n\t\t\t\t\treturn !v.complete;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tImageLoaded.check = function check(elements, callback) {\n\t\tvar _this = this;\n\n\t\tvar needCheck = elements.reduce(function (acc, v) {\n\t\t\treturn acc.concat(_this.checkImageLoaded(v));\n\t\t}, []);\n\n\t\tif (needCheck.length > 0) {\n\t\t\tImageLoaded.waitImageLoaded(needCheck, callback);\n\t\t} else {\n\t\t\t// convert to async\n\t\t\tsetTimeout(function () {\n\t\t\t\tcallback && callback();\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\treturn ImageLoaded;\n}();\n\nexports[\"default\"] = ImageLoaded;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ImageLoaded.js\n// module id = 9\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 Watcher = function () {\n\tfunction Watcher(renderer, callback) {\n\t\t_classCallCheck(this, Watcher);\n\n\t\t_extends(this._callback = {\n\t\t\tlayout: null,\n\t\t\tcheck: null\n\t\t}, callback);\n\t\tthis._timer = {\n\t\t\tresize: null\n\t\t\t// doubleCheck: null,\n\t\t\t// doubleCheckCount: RETRY,\n\t\t};\n\t\tthis.reset();\n\t\tthis._renderer = renderer;\n\t\tthis._onCheck = this._onCheck.bind(this);\n\t\tthis._onResize = this._onResize.bind(this);\n\t\tthis.attachEvent();\n\t\tthis.setScrollPos();\n\t}\n\n\tWatcher.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_prevPos: this._prevPos,\n\t\t\tscrollPos: this.getOrgScrollPos()\n\t\t};\n\t};\n\n\tWatcher.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tthis._prevPos = status._prevPos;\n\t\tapplyScrollPos && this.scrollTo(status.scrollPos);\n\t};\n\n\tWatcher.prototype.scrollTo = function scrollTo(pos) {\n\t\tvar arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];\n\n\t\t_utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));\n\t};\n\n\tWatcher.prototype.getScrollPos = function getScrollPos() {\n\t\treturn this._prevPos;\n\t};\n\n\tWatcher.prototype.setScrollPos = function setScrollPos(pos) {\n\t\tvar rawPos = pos;\n\n\t\tif (typeof pos === \"undefined\") {\n\t\t\trawPos = this.getOrgScrollPos();\n\t\t}\n\t\tthis._prevPos = rawPos - this._renderer.getContainerOffset();\n\t};\n\n\tWatcher.prototype.attachEvent = function attachEvent() {\n\t\t(0, _utils.addEvent)(this._renderer.view, \"scroll\", this._onCheck);\n\t\t(0, _utils.addEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.getOrgScrollPos = function getOrgScrollPos() {\n\t\treturn (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);\n\t};\n\n\tWatcher.prototype.reset = function reset() {\n\t\tthis._prevPos = null;\n\t};\n\n\tWatcher.prototype._onCheck = function _onCheck() {\n\t\tvar orgScrollPos = this.getOrgScrollPos();\n\t\tvar prevPos = this.getScrollPos();\n\n\t\tthis.setScrollPos(orgScrollPos);\n\t\tvar scrollPos = this.getScrollPos();\n\n\t\tif (_consts.IS_IOS && (orgScrollPos === 0 || prevPos === null) || prevPos === scrollPos) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._callback.check && this._callback.check({\n\t\t\tisForward: prevPos < scrollPos,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos,\n\t\t\thorizontal: !this._renderer.options.isVertical\n\t\t});\n\t};\n\n\tWatcher.prototype._onResize = function _onResize() {\n\t\tvar _this = this;\n\n\t\tif (this._timer.resize) {\n\t\t\tclearTimeout(this._timer.resize);\n\t\t}\n\t\tthis._timer.resize = setTimeout(function () {\n\t\t\t_this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();\n\t\t\t_this._timer.resize = null;\n\t\t}, 100);\n\t};\n\n\tWatcher.prototype.detachEvent = function detachEvent() {\n\t\t(0, _utils.removeEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.destroy = function destroy() {\n\t\tthis.detachEvent();\n\t\tthis.reset();\n\t};\n\n\treturn Watcher;\n}();\n\nexports[\"default\"] = Watcher;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Watcher.js\n// module id = 10\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\n// ALIGN\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER,\n END = _consts.ALIGN.END,\n JUSTIFY = _consts.ALIGN.JUSTIFY;\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.\n * @class eg.InfiniteGrid.GridLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar GridLayout = function () {\n\tfunction GridLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, GridLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\talign: START,\n\t\t\titemSize: 0\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._columnSize = 0;\n\t\tthis._columnLength = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tGridLayout.prototype.getPoints = function getPoints(outlines) {\n\t\tvar pos = this.options.horizontal ? \"left\" : \"top\";\n\n\t\treturn outlines.map(function (outline) {\n\t\t\treturn outline[pos];\n\t\t});\n\t};\n\n\tGridLayout.prototype.checkColumn = function checkColumn(item) {\n\t\tvar margin = this.options.margin;\n\t\tvar sizeName = this.options.horizontal ? \"height\" : \"width\";\n\t\tvar columnSize = this.options.itemSize || item && item.size[sizeName] || 0;\n\n\t\tthis._columnSize = columnSize;\n\t\tif (!columnSize) {\n\t\t\tthis._columnLength = 1;\n\t\t\treturn;\n\t\t}\n\t\tthis._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);\n\t};\n\n\tGridLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar length = items.length;\n\t\tvar margin = this.options.margin;\n\t\tvar align = this.options.align;\n\t\tvar style = this._style;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar columnSize = this._columnSize;\n\t\tvar columnLength = this._columnLength;\n\n\t\tvar size = this._size;\n\t\tvar viewDist = size - (columnSize + margin) * columnLength + margin;\n\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar startOutline = outline.slice();\n\t\tvar endOutline = outline.slice();\n\t\tvar startIndex = 0;\n\t\tvar endIndex = -1;\n\t\tvar endPos = -1;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _item$rect;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline) || 0;\n\t\t\tvar index = endOutline.indexOf(point);\n\t\t\tvar item = items[isAppend ? i : length - 1 - i];\n\t\t\tvar size1 = item.size[size1Name];\n\t\t\tvar size2 = item.size[size2Name];\n\t\t\tvar pos1 = isAppend ? point : point - margin - size1;\n\t\t\tvar endPos1 = pos1 + size1 + margin;\n\n\t\t\tif (index === -1) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tvar pos2 = (columnSize + margin) * index;\n\n\t\t\t// ALIGN\n\t\t\tif (align === CENTER) {\n\t\t\t\tpos2 += viewDist / 2;\n\t\t\t} else if (align === END) {\n\t\t\t\tpos2 += viewDist + columnSize - size2;\n\t\t\t} else if (align === JUSTIFY) {\n\t\t\t\tif (columnLength <= 1) {\n\t\t\t\t\tpos2 += viewDist / 2;\n\t\t\t\t} else {\n\t\t\t\t\tpos2 = (size - columnSize) / (columnLength - 1) * index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// tetris\n\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);\n\t\t\titem.column = index;\n\t\t\tendOutline[index] = isAppend ? endPos1 : pos1;\n\t\t\tif (endIndex === -1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t} else if (endPos < endPos1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t}\n\t\t}\n\t\tif (!isAppend) {\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tendIndex = length - 1;\n\t\t}\n\t\t// if append items, startOutline is low, endOutline is high\n\t\t// if prepend items, startOutline is high, endOutline is low\n\t\treturn {\n\t\t\tstart: isAppend ? startOutline : endOutline,\n\t\t\tend: isAppend ? endOutline : startOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tGridLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\tvar startOutline = outline;\n\n\t\tif (!this._columnLength) {\n\t\t\tthis.checkColumn(items[0]);\n\t\t}\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? \"min\" : \"max\"].apply(Math, outline) || 0);\n\t\t}\n\n\t\tvar result = this._layout(clone, startOutline, type);\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: result\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.layout = function layout() {\n\t\tvar _this = this;\n\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;\n\n\t\tthis.checkColumn(firstItem);\n\n\t\t// if outlines' length and columns' length are now same, re-caculate outlines.\n\t\tvar startOutline = void 0;\n\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tvar pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);\n\n\t\t\t// re-layout items.\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, pos);\n\t\t} else {\n\t\t\tstartOutline = outline.slice();\n\t\t}\n\t\tgroups.forEach(function (group) {\n\t\t\tvar items = group.items;\n\t\t\tvar result = _this._layout(items, startOutline, _consts.APPEND);\n\n\t\t\tgroup.outlines = result;\n\t\t\tstartOutline = result.end;\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.GridLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tGridLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn GridLayout;\n}();\n\nexports[\"default\"] = GridLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/GridLayout.js\n// module id = 11\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _FrameLayout2 = require(\"./FrameLayout\");\n\nvar _FrameLayout3 = _interopRequireDefault(_FrameLayout2);\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction makeShapeOutline(outline, itemSize, columnLength, isAppend) {\n\tvar point = Math[isAppend ? \"min\" : \"max\"].apply(Math, outline) || 0;\n\n\tif (outline.length !== columnLength) {\n\t\treturn (0, _utils.fill)(columnLength, 0);\n\t}\n\treturn outline.map(function (l) {\n\t\treturn parseInt((l - point) / itemSize, 10);\n\t});\n}\nfunction getColumn(item) {\n\tif (item.column) {\n\t\treturn item.column;\n\t}\n\tvar column = 0;\n\n\tif (item.el) {\n\t\tvar dataset = item.el.dataset;\n\n\t\tif (dataset) {\n\t\t\tcolumn = dataset.column || 1;\n\t\t} else {\n\t\t\tcolumn = item.el.getAttribute(\"column\") || 1;\n\t\t}\n\t} else {\n\t\tcolumn = 1;\n\t}\n\titem.column = column;\n\treturn column;\n}\n\n/**\n * FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.SquareLayout\n * @extends eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar SquareLayout = function (_FrameLayout) {\n\t_inherits(SquareLayout, _FrameLayout);\n\n\tfunction SquareLayout() {\n\t\t_classCallCheck(this, SquareLayout);\n\n\t\treturn _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));\n\t}\n\n\tSquareLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tvar column = this.options.column;\n\n\t\tif (!column) {\n\t\t\t_FrameLayout.prototype._checkItemSize.call(this);\n\t\t\treturn;\n\t\t}\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / column - margin;\n\t};\n\n\tSquareLayout.prototype._layout = function _layout(items) {\n\t\tvar _shapes;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar itemSize = this._getItemSize();\n\t\tvar margin = this.options.margin;\n\t\tvar columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;\n\t\tvar length = items.length;\n\t\tvar endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar shapes = [];\n\t\tvar sign = isAppend ? 1 : -1;\n\t\tvar style = this._style;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _shapes$push;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline);\n\t\t\tvar index = (0, _utils.indexOf)(endOutline, point, !isAppend);\n\t\t\tvar item = items[i];\n\t\t\tvar columnWidth = item.columnWidth;\n\t\t\tvar column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);\n\t\t\tvar columnCount = 1;\n\n\t\t\tif (column > 1) {\n\t\t\t\tfor (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {\n\t\t\t\t\tif (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {\n\t\t\t\t\t\t++columnCount;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!isAppend) {\n\t\t\t\t\tindex -= columnCount - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.columnWidth = [columnLength, columnCount];\n\t\t\tshapes.push((_shapes$push = {\n\t\t\t\twidth: columnCount,\n\t\t\t\theight: columnCount\n\t\t\t}, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));\n\t\t\tfor (var _j = 0; _j < columnCount; ++_j) {\n\t\t\t\tendOutline[index + _j] = point + sign * columnCount;\n\t\t\t}\n\t\t}\n\t\tthis._shapes = (_shapes = {\n\t\t\tshapes: shapes\n\t\t}, _shapes[style.size2] = columnLength, _shapes);\n\n\t\tvar result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);\n\n\t\tif (!isAppend) {\n\t\t\tvar lastItem = items[items.length - 1];\n\n\t\t\tshapes.sort(function (shape1, shape2) {\n\t\t\t\tvar item1pos1 = shape1[pos1Name];\n\t\t\t\tvar item1pos2 = shape1[pos2Name];\n\t\t\t\tvar item2pos1 = shape2[pos1Name];\n\t\t\t\tvar item2pos2 = shape2[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tresult.startIndex = 0;\n\t\t\tresult.endIndex = items.indexOf(lastItem);\n\t\t}\n\t\treturn result;\n\t};\n\n\treturn SquareLayout;\n}(_FrameLayout3[\"default\"]);\n\nexports[\"default\"] = SquareLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/SquareLayout.js\n// module id = 12\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 _BoxModel = require(\"./lib/BoxModel.js\");\n\nvar _BoxModel2 = _interopRequireDefault(_BoxModel);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getCost(originLength, length) {\n\tvar cost = originLength / length;\n\n\tif (cost < 1) {\n\t\tcost = 1 / cost;\n\t}\n\n\treturn cost - 1;\n}\nfunction fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {\n\titem.setHeight(itemFitSize.height);\n\titem.setWidth(itemFitSize.width);\n\tbestFitArea.setHeight(containerFitSize.height);\n\tbestFitArea.setWidth(containerFitSize.width);\n\n\tif (layoutVertical) {\n\t\titem.setTop(bestFitArea.getTop() + bestFitArea.getHeight());\n\t\titem.setLeft(bestFitArea.getLeft());\n\t} else {\n\t\titem.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());\n\t\titem.setTop(bestFitArea.getTop());\n\t}\n}\n\n/**\n * PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.\n * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.\n * @class eg.InfiniteGrid.PackingLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비 \n * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치 \n * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치 \n * @example\n```\n\n```\n **/\n\nvar PackingLayout = function () {\n\tfunction PackingLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, PackingLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\taspectRatio: 1,\n\t\t\tsizeWeight: 1,\n\t\t\tratioWeight: 1\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tPackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {\n\t\tif (container.getRatio() === 0) {\n\t\t\t// 아이템 최초 삽입시 전체영역 지정\n\t\t\tcontainer.setOriginWidth(item.getWidth());\n\t\t\tcontainer.setOriginHeight(item.getHeight());\n\t\t\tcontainer.setWidth(item.getWidth());\n\t\t\tcontainer.setHeight(item.getHeight());\n\t\t\treturn;\n\t\t}\n\n\t\tvar bestFitArea = null;\n\t\tvar minCost = 10000000;\n\t\tvar layoutVertical = false;\n\t\tvar itemFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar containerFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar _options = this.options,\n\t\t sizeWeight = _options.sizeWeight,\n\t\t ratioWeight = _options.ratioWeight;\n\n\n\t\tcontainer.innerItem().forEach(function (v) {\n\t\t\tvar containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;\n\t\t\tvar containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;\n\t\t\tvar cost = void 0;\n\n\t\t\tfor (var i = 0; i < 2; ++i) {\n\t\t\t\tvar itemWidth = void 0;\n\t\t\t\tvar itemHeight = void 0;\n\t\t\t\tvar containerWidth = void 0;\n\t\t\t\tvar containerHeight = void 0;\n\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// 상하에 아이템 추가\n\t\t\t\t\titemWidth = v.getWidth();\n\t\t\t\t\titemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));\n\t\t\t\t\tcontainerWidth = v.getWidth();\n\t\t\t\t\tcontainerHeight = v.getHeight() - itemHeight;\n\t\t\t\t} else {\n\t\t\t\t\t// 좌우에 아이템 추가\n\t\t\t\t\titemHeight = v.getHeight();\n\t\t\t\t\titemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));\n\t\t\t\t\tcontainerHeight = v.getHeight();\n\t\t\t\t\tcontainerWidth = v.getWidth() - itemWidth;\n\t\t\t\t}\n\n\t\t\t\tvar itemSize = itemWidth * itemHeight;\n\t\t\t\tvar itemRatio = itemWidth / itemHeight;\n\t\t\t\tvar containerSize = containerWidth * containerHeight;\n\t\t\t\tvar containerRatio = containerHeight / containerHeight;\n\n\t\t\t\tcost = getCost(item.getSize(), itemSize) * sizeWeight;\n\t\t\t\tcost += getCost(item.getRatio(), itemRatio) * ratioWeight;\n\t\t\t\tcost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;\n\t\t\t\tcost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;\n\n\t\t\t\tif (cost === Math.min(cost, minCost)) {\n\t\t\t\t\tminCost = cost;\n\t\t\t\t\tbestFitArea = v;\n\t\t\t\t\tlayoutVertical = i === 0;\n\t\t\t\t\titemFitSize.width = itemWidth;\n\t\t\t\t\titemFitSize.height = itemHeight;\n\t\t\t\t\tcontainerFitSize.width = containerWidth;\n\t\t\t\t\tcontainerFitSize.height = containerHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);\n\t};\n\n\tPackingLayout.prototype._layout = function _layout(items) {\n\t\tvar _this = this;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar style = this._style;\n\t\tvar isHorizontal = this.options.horizontal;\n\t\tvar aspectRatio = this.options.aspectRatio;\n\t\tvar margin = this.options.margin;\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar containerWidth = this._size * (isHorizontal ? aspectRatio : 1);\n\t\tvar containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);\n\t\tvar containerSize1 = isHorizontal ? containerWidth : containerHeight;\n\t\tvar prevOutline = (0, _utils.toZeroArray)(outline);\n\t\tvar start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;\n\t\tvar end = start + containerSize1 + margin;\n\t\tvar container = new _BoxModel2[\"default\"]({});\n\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar startPos = -1;\n\t\tvar endPos = -1;\n\n\t\titems.forEach(function (item) {\n\t\t\tvar model = new _BoxModel2[\"default\"]({\n\t\t\t\toriginWidth: item.orgSize.width,\n\t\t\t\toriginHeight: item.orgSize.height,\n\t\t\t\twidth: item.orgSize.width,\n\t\t\t\theight: item.orgSize.height\n\t\t\t});\n\n\t\t\t_this._findBestFitArea(container, model);\n\t\t\tcontainer.pushItem(model);\n\t\t\tcontainer.scaleTo(containerWidth + margin, containerHeight + margin);\n\t\t});\n\t\titems.forEach(function (item, i) {\n\t\t\tvar boxItem = container.innerItem()[i];\n\t\t\t// console.log(\"boxItem\", boxItem, boxItem instanceof BoxModel);\n\t\t\tvar width = boxItem.getWidth();\n\t\t\tvar height = boxItem.getHeight();\n\t\t\tvar top = boxItem.getTop();\n\t\t\tvar left = boxItem.getLeft();\n\n\t\t\titem.rect = { top: top, left: left, width: width - margin, height: height - margin };\n\t\t\titem.rect[pos1Name] += start;\n\n\t\t\tif (startIndex === -1) {\n\t\t\t\tstartIndex = i;\n\t\t\t\tendIndex = i;\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tendPos = startPos;\n\t\t\t}\n\t\t\tif (startPos > item.rect[pos1Name]) {\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t\tif (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {\n\t\t\t\tendPos = item.rect[pos1Name] + item.rect[size1Name] + margin;\n\t\t\t\tendIndex = i;\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstart: [start],\n\t\t\tend: [end],\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tPackingLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tPackingLayout.prototype.layout = function layout() {\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar length = groups.length;\n\t\tvar point = outline;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.PackingLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tPackingLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn PackingLayout;\n}();\n\nexports[\"default\"] = PackingLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/PackingLayout.js\n// module id = 13\n// module chunks = 0 1","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BoxModel = function () {\n\tfunction BoxModel(option) {\n\t\t_classCallCheck(this, BoxModel);\n\n\t\tthis._originWidth = option.originWidth || 0;\n\t\tthis._originHeight = option.originHeight || 0;\n\t\tthis._width = option.width || 0;\n\t\tthis._height = option.height || 0;\n\t\tthis._left = option.left || 0;\n\t\tthis._top = option.top || 0;\n\t\tthis._item = option.item;\n\t\tthis._innerItem = option.innerItem || [];\n\t}\n\n\tBoxModel.prototype.getOriginWidth = function getOriginWidth() {\n\t\treturn this._originWidth;\n\t};\n\n\tBoxModel.prototype.setOriginWidth = function setOriginWidth(width) {\n\t\tthis._originWidth = width;\n\t};\n\n\tBoxModel.prototype.getOriginHeight = function getOriginHeight() {\n\t\treturn this._originHeight;\n\t};\n\n\tBoxModel.prototype.setOriginHeight = function setOriginHeight(height) {\n\t\tthis._originHeight = height;\n\t};\n\n\tBoxModel.prototype.getWidth = function getWidth() {\n\t\treturn this._width;\n\t};\n\n\tBoxModel.prototype.setWidth = function setWidth(width) {\n\t\tthis._width = width;\n\t};\n\n\tBoxModel.prototype.getHeight = function getHeight() {\n\t\treturn this._height;\n\t};\n\n\tBoxModel.prototype.setHeight = function setHeight(height) {\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.getLeft = function getLeft() {\n\t\treturn this._left;\n\t};\n\n\tBoxModel.prototype.setLeft = function setLeft(left) {\n\t\tthis._left = left;\n\t};\n\n\tBoxModel.prototype.getTop = function getTop() {\n\t\treturn this._top;\n\t};\n\n\tBoxModel.prototype.setTop = function setTop(top) {\n\t\tthis._top = top;\n\t};\n\n\tBoxModel.prototype.innerItem = function innerItem() {\n\t\treturn this._innerItem;\n\t};\n\n\tBoxModel.prototype.scaleTo = function scaleTo(width, height) {\n\t\tvar scaleX = this._width === 0 ? 0 : width / this._width;\n\t\tvar scaleY = this._height === 0 ? 0 : height / this._height;\n\n\t\tthis._innerItem.forEach(function (v) {\n\t\t\tif (scaleX !== 0) {\n\t\t\t\tv._left *= scaleX;\n\t\t\t\tv._width *= scaleX;\n\t\t\t}\n\t\t\tif (scaleY !== 0) {\n\t\t\t\tv._top *= scaleY;\n\t\t\t\tv._height *= scaleY;\n\t\t\t}\n\t\t});\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.pushItem = function pushItem(item) {\n\t\tthis._innerItem.push(item);\n\t};\n\n\tBoxModel.prototype.getOriginSize = function getOriginSize() {\n\t\treturn this._originWidth * this._originHeight;\n\t};\n\n\tBoxModel.prototype.getSize = function getSize() {\n\t\treturn this._width * this._height;\n\t};\n\n\tBoxModel.prototype.getOriginRatio = function getOriginRatio() {\n\t\treturn this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;\n\t};\n\n\tBoxModel.prototype.getRatio = function getRatio() {\n\t\treturn this._height === 0 ? 0 : this._width / this._height;\n\t};\n\n\tBoxModel.prototype.isSmallerThen = function isSmallerThen(box) {\n\t\treturn this._width <= box._width && this._height <= box._height;\n\t};\n\n\tBoxModel.prototype.isEqual = function isEqual(box) {\n\t\treturn this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;\n\t};\n\n\treturn BoxModel;\n}();\n\nmodule.exports = BoxModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/BoxModel.js\n// module id = 14\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 _dijkstra = require(\"./lib/dijkstra\");\n\nvar _dijkstra2 = _interopRequireDefault(_dijkstra);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.\n * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.\n * @class eg.InfiniteGrid.JustifiedLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기 \n * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기 \n * @example\n```\n\n```\n **/\nvar JustifiedLayout = function () {\n\tfunction JustifiedLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, JustifiedLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\tminSize: 0,\n\t\t\tmaxSize: 0\n\t\t}, options);\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t\tthis._size = 0;\n\t}\n\n\tJustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar _this = this;\n\n\t\tvar style = this._style;\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar startIndex = 0;\n\t\tvar endIndex = items.length;\n\t\tvar graph = function graph(_start) {\n\t\t\tvar results = {};\n\t\t\tvar start = +_start.replace(/[^0-9]/g, \"\");\n\t\t\tvar length = endIndex + 1;\n\n\t\t\tfor (var i = start + 1; i < length; ++i) {\n\t\t\t\tif (i - start > 8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar cost = _this._getCost(items, start, i, size1Name, size2Name);\n\n\t\t\t\tif (cost < 0 && i === length - 1) {\n\t\t\t\t\tcost = 0;\n\t\t\t\t}\n\t\t\t\tif (cost !== null) {\n\t\t\t\t\tresults[\"node\" + i] = Math.pow(cost, 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t\t// shortest path for items' total height.\n\t\tvar path = _dijkstra2[\"default\"].find_path(graph, \"node\" + startIndex, \"node\" + endIndex);\n\n\t\treturn this._setStyle(items, path, outline, isAppend);\n\t};\n\n\tJustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {\n\t\tvar margin = this.options.margin;\n\t\tvar size = items.reduce(function (sum, item) {\n\t\t\treturn sum + item.size[size2Name] / item.size[size1Name];\n\t\t}, 0);\n\n\t\treturn (this._size - margin * (items.length - 1)) / size;\n\t};\n\n\tJustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {\n\t\tvar size = this._getSize(items.slice(i, j), size1Name, size2Name);\n\t\tvar min = this.options.minSize || 0;\n\t\tvar max = this.options.maxSize || Infinity;\n\n\t\tif (isFinite(max)) {\n\t\t\t// if this size is not in range, the cost increases sharply.\n\t\t\tif (size < min) {\n\t\t\t\treturn Math.pow(size - min, 2) + Math.pow(max, 2);\n\t\t\t} else if (size > max) {\n\t\t\t\treturn Math.pow(size - max, 2) + Math.pow(max, 2);\n\t\t\t} else {\n\t\t\t\t// if this size in range, the cost is negative or low.\n\t\t\t\treturn Math.min(size - max, min - size);\n\t\t\t}\n\t\t}\n\t\t// if max is infinite type, caculate cost only with \"min\".\n\t\tif (size < min) {\n\t\t\treturn Math.max(Math.pow(min, 2), Math.pow(size, 2));\n\t\t}\n\t\treturn size - min;\n\t};\n\n\tJustifiedLayout.prototype._setStyle = function _setStyle(items, path) {\n\t\tvar outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\t\tvar isAppend = arguments[3];\n\n\t\tvar style = this._style;\n\t\t// if direction is vertical\n\t\t// pos1 : top, pos11 : bottom\n\t\t// size1 : height\n\t\t// pos2 : left, pos22 : right\n\t\t// size2 : width\n\n\t\t// if direction is horizontal\n\t\t// pos1 : left, pos11 : right\n\t\t// size1 : width\n\t\t// pos2 : top, pos22 : bottom\n\t\t// size2 : height\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar size2Name = style.size2;\n\t\tvar length = path.length;\n\t\tvar margin = this.options.margin;\n\t\tvar startPoint = outline[0] || 0;\n\t\tvar endPoint = startPoint;\n\t\tvar height = 0;\n\n\t\tfor (var i = 0; i < length - 1; ++i) {\n\t\t\tvar path1 = parseInt(path[i].replace(\"node\", \"\"), 10);\n\t\t\tvar path2 = parseInt(path[i + 1].replace(\"node\", \"\"), 10);\n\t\t\t// pathItems(path1 to path2) are in 1 line.\n\t\t\tvar pathItems = items.slice(path1, path2);\n\t\t\tvar pathItemsLength = pathItems.length;\n\t\t\tvar size1 = this._getSize(pathItems, size1Name, size2Name);\n\t\t\tvar pos1 = endPoint;\n\n\t\t\tfor (var j = 0; j < pathItemsLength; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = pathItems[j];\n\t\t\t\tvar size2 = item.size[size2Name] / item.size[size1Name] * size1;\n\t\t\t\t// item has margin bottom and right.\n\t\t\t\t// first item has not margin.\n\t\t\t\tvar prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;\n\t\t\t\tvar pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;\n\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\theight += margin + size1;\n\t\t\tendPoint = startPoint + height;\n\t\t}\n\t\tvar itemsLength = items.length;\n\t\tvar startIndex = itemsLength ? 0 : -1;\n\t\tvar endIndex = itemsLength ? itemsLength - 1 : -1;\n\n\t\tif (isAppend) {\n\t\t\t// previous group's end outline is current group's start outline\n\t\t\treturn {\n\t\t\t\tstart: [startPoint],\n\t\t\t\tend: [endPoint],\n\t\t\t\tstartIndex: startIndex,\n\t\t\t\tendIndex: endIndex\n\t\t\t};\n\t\t}\n\t\t// for prepend, only substract height from position.\n\t\t// always start is lower than end.\n\n\t\tfor (var _i = 0; _i < itemsLength; ++_i) {\n\t\t\tvar _item = items[_i];\n\n\t\t\t// move items as long as height for prepend\n\t\t\t_item.rect[pos1Name] -= height;\n\t\t}\n\t\treturn {\n\t\t\tstart: [startPoint - height],\n\t\t\tend: [startPoint], // endPoint - height = startPoint\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tJustifiedLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.JustifiedLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tJustifiedLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100]);\n */\n\n\n\tJustifiedLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\n\treturn JustifiedLayout;\n}();\n\nexports[\"default\"] = JustifiedLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/JustifiedLayout.js\n// module id = 15\n// module chunks = 0 1","'use strict';\n\n/* eslint-disable */\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\n(function () {\n var dijkstra = {\n single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = new BinaryHeap(function (x) {\n return x.cost;\n });\n open.push({ value: s, cost: 0 });\n\n var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;\n while (open.size()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph(u) || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (var v in adjacent_nodes) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = typeof costs[v] === 'undefined';\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });\n predecessors[v] = u;\n }\n }\n }\n\n if (typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function find_path(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);\n }\n\n };\n\n function BinaryHeap(scoreFunction) {\n this.content = [];\n this.scoreFunction = scoreFunction;\n }\n\n BinaryHeap.prototype = {\n push: function push(element) {\n // Add the new element to the end of the array.\n this.content.push(element);\n // Allow it to bubble up.\n this.bubbleUp(this.content.length - 1);\n },\n\n pop: function pop() {\n // Store the first element so we can return it later.\n var result = this.content[0];\n // Get the element at the end of the array.\n var end = this.content.pop();\n // If there are any elements left, put the end element at the\n // start, and let it sink down.\n if (this.content.length > 0) {\n this.content[0] = end;\n this.sinkDown(0);\n }\n return result;\n },\n\n remove: function remove(node) {\n var len = this.content.length;\n // To remove a value, we must search through the array to find\n // it.\n for (var i = 0; i < len; i++) {\n if (this.content[i] === node) {\n // When it is found, the process seen in 'pop' is repeated\n // to fill up the hole.\n var end = this.content.pop();\n if (i !== len - 1) {\n this.content[i] = end;\n if (this.scoreFunction(end) < this.scoreFunction(node)) {\n this.bubbleUp(i);\n } else {\n this.sinkDown(i);\n }\n }\n return;\n }\n }\n throw new Error('Node not found.');\n },\n\n size: function size() {\n return this.content.length;\n },\n\n bubbleUp: function bubbleUp(n) {\n // Fetch the element that has to be moved.\n var element = this.content[n];\n // When at 0, an element can not go up any further.\n while (n > 0) {\n // Compute the parent element's index, and fetch it.\n var parentN = Math.floor((n + 1) / 2) - 1,\n parent = this.content[parentN];\n // Swap the elements if the parent is greater.\n if (this.scoreFunction(element) < this.scoreFunction(parent)) {\n this.content[parentN] = element;\n this.content[n] = parent;\n // Update 'n' to continue at the new position.\n n = parentN;\n }\n // Found a parent that is less, no need to move it further.\n else {\n break;\n }\n }\n },\n\n sinkDown: function sinkDown(n) {\n // Look up the target element and its score.\n var length = this.content.length,\n element = this.content[n],\n elemScore = this.scoreFunction(element);\n\n while (true) {\n // Compute the indices of the child elements.\n var child2N = (n + 1) * 2,\n child1N = child2N - 1;\n // This is used to store the new position of the element,\n // if any.\n var swap = null;\n // If the first child exists (is inside the array)...\n if (child1N < length) {\n // Look it up and compute its score.\n var child1 = this.content[child1N],\n child1Score = this.scoreFunction(child1);\n // If the score is less than our element's, we need to swap.\n if (child1Score < elemScore) {\n swap = child1N;\n }\n }\n // Do the same checks for the other child.\n if (child2N < length) {\n var child2 = this.content[child2N],\n child2Score = this.scoreFunction(child2);\n if (child2Score < (swap == null ? elemScore : child1Score)) {\n swap = child2N;\n }\n }\n\n // If the element needs to be moved, swap it, and continue.\n if (swap !== null) {\n this.content[n] = this.content[swap];\n this.content[swap] = element;\n n = swap;\n }\n // Otherwise, we are done.\n else {\n break;\n }\n }\n }\n };\n\n /**\n * Browserify 지원을 위한 모듈화 코드\n */\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = dijkstra;\n } else {\n window.dijkstra = dijkstra;\n }\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/dijkstra.js\n// module id = 16\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;;;A;;;;;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;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvOA;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;;;;;;;AC1QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACt5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":""} \ No newline at end of file +{"version":3,"file":"infinitegrid.pkgd.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap d3985277e80d047cb2c4","webpack:///./src/consts.js","webpack:///./src/utils.js","webpack:///./src/browser.js","webpack:///./src/DOMRenderer.js","webpack:///./src/layouts/FrameLayout.js","webpack:///./src/index.js","webpack:///./src/InfiniteGrid.js","webpack:///./node_modules/@egjs/component/dist/component.js","webpack:///./src/ItemManager.js","webpack:///./src/ImageLoaded.js","webpack:///./src/Watcher.js","webpack:///./src/layouts/GridLayout.js","webpack:///./src/layouts/SquareLayout.js","webpack:///./src/layouts/PackingLayout.js","webpack:///./src/layouts/lib/BoxModel.js","webpack:///./src/layouts/JustifiedLayout.js","webpack:///./src/layouts/lib/dijkstra.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[\"InfiniteGrid\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"InfiniteGrid\"] = factory();\n})(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 = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d3985277e80d047cb2c4","\"use strict\";\n\nexports.__esModule = true;\nexports.DEFENSE_BROWSER = exports.PROCESSING = exports.LOADING_PREPEND = exports.LOADING_APPEND = 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.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_\";\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 = navigator.userAgent.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 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);\nvar webkitVersion = webkit && parseInt(webkit[1], 10) || 0;\n\nvar DEFENSE_BROWSER = exports.DEFENSE_BROWSER = webkitVersion < 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;\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.fill = fill;\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.indexOf = indexOf;\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 fill(length, value) {\n\tvar array = (typeof length === \"undefined\" ? \"undefined\" : _typeof(length)) === \"object\" ? length : new Array(length);\n\tvar len = array.length;\n\n\tfor (var i = len - 1; i >= 0; --i) {\n\t\tarray[i] = value;\n\t}\n\treturn array;\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 = param.match(/^<([A-z]+)\\s*([^>]*)>/);\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.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}\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 indexOf(arr, target) {\n\tvar isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\tif (!isRight) {\n\t\treturn arr.indexOf(target);\n\t}\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tif (arr[i] !== target) {\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 1\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 = window;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\nfunction _defense(element) {\n\tvar container = document.createElement(\"div\");\n\n\tcontainer.className = _consts.CONTAINER_CLASSNAME;\n\tcontainer.style.height = \"100%\";\n\n\tvar children = element.children;\n\tvar length = children.length; // for IE8\n\n\tfor (var i = 0; i < length; i++) {\n\t\tcontainer.appendChild(children[0]);\n\t}\n\n\telement.appendChild(container);\n\treturn container;\n}\n\nvar DOMRenderer = function () {\n\tDOMRenderer.renderItem = function renderItem(item, styles) {\n\t\tif (item.el) {\n\t\t\tvar elStyle = item.el.style;\n\n\t\t\t// for debugging\n\t\t\titem.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);\n\t\t\telStyle.position = \"absolute\";\n\t\t\t[\"left\", \"top\", \"width\", \"height\"].forEach(function (p) {\n\t\t\t\tp in styles && (elStyle[p] = styles[p] + \"px\");\n\t\t\t});\n\t\t}\n\t};\n\n\tDOMRenderer.renderItems = function renderItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tDOMRenderer.renderItem(item, item.rect);\n\t\t});\n\t};\n\n\tDOMRenderer.removeItems = function removeItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tDOMRenderer.removeElement(item.el);\n\t\t\t\titem.el = null;\n\t\t\t}\n\t\t});\n\t};\n\n\tDOMRenderer.removeElement = function removeElement(element) {\n\t\telement.parentNode.removeChild(element);\n\t};\n\n\tDOMRenderer.createElements = function createElements(items) {\n\t\tvar elements = (0, _utils.$)(items.reduce(function (acc, v, i) {\n\t\t\tacc.push(v.content.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, \"\"));\n\t\t\treturn acc;\n\t\t}, []).join(\"\"), _consts.MULTI);\n\n\t\treturn items.map(function (item, index) {\n\t\t\titem.el = elements[index];\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tfunction DOMRenderer(element, options) {\n\t\t_classCallCheck(this, DOMRenderer);\n\n\t\t_extends(this.options = {\n\t\t\tisOverflowScroll: false,\n\t\t\tisEqualSize: false,\n\t\t\tisVertical: true\n\t\t}, options);\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis._init(element);\n\t\tthis.resize();\n\t}\n\n\tDOMRenderer.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\tcssText: this.container.style.cssText,\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_size: _extends({}, this._size)\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.setStatus = function setStatus(status, items) {\n\t\tthis.container.style.cssText = status.cssText;\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._size, status._size);\n\n\t\tDOMRenderer.renderItems(items);\n\t\tthis._insert(items, _consts.APPEND);\n\t};\n\n\tDOMRenderer.prototype.updateSize = function updateSize(items) {\n\t\tvar _this = this;\n\n\t\treturn items.map(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tif (_this.options.isEqualSize) {\n\t\t\t\t\t_this._size.item = _this._size.item || {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t\titem.size = _extends({}, _this._size.item);\n\t\t\t\t} else {\n\t\t\t\t\titem.size = {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (!item.orgSize) {\n\t\t\t\t\titem.orgSize = _extends({}, item.size);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tDOMRenderer.prototype._init = function _init(el) {\n\t\tvar element = (0, _utils.$)(el);\n\t\tvar style = (0, _utils.getStyles)(element);\n\n\t\tthis._orgStyle = {};\n\n\t\tif (style.position === \"static\") {\n\t\t\tthis._orgStyle.position = element.style.position;\n\t\t\telement.style.position = \"relative\";\n\t\t}\n\t\tif (this.options.isOverflowScroll) {\n\t\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\t\tthis._orgStyle.overflowX = element.style.overflowX;\n\t\t\tthis._orgStyle.overflowY = element.style.overflowY;\n\t\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\t\tthis.view = element;\n\t\t\t// defense code for android < 4.4 or webkit < 537\n\t\t\tthis.container = !this.options.isVertical && _consts.DEFENSE_BROWSER ? _defense(element) : element;\n\t\t} else {\n\t\t\tthis.view = window;\n\t\t\tthis.container = element;\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.append = function append(items) {\n\t\tthis._insert(items, _consts.APPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.prepend = function prepend(items) {\n\t\tthis._insert(items, _consts.PREPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.clear = function clear() {\n\t\tthis.container.innerHTML = \"\";\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\t}\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {\n\t\tvar itemsWithElement = DOMRenderer.createElements(items);\n\n\t\tDOMRenderer.renderItems(itemsWithElement);\n\t\tthis._insert(itemsWithElement, isAppend);\n\t};\n\n\tDOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {\n\t\tvar df = document.createDocumentFragment();\n\n\t\titems.forEach(function (item) {\n\t\t\tstyles && DOMRenderer.renderItem(item, styles);\n\t\t\tisAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);\n\t\t});\n\t\tisAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);\n\t};\n\n\tDOMRenderer.prototype._calcSize = function _calcSize() {\n\t\treturn this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);\n\t};\n\n\tDOMRenderer.prototype.getViewSize = function getViewSize() {\n\t\treturn this._size.view;\n\t};\n\n\tDOMRenderer.prototype.scrollBy = function scrollBy(point) {\n\t\tvar pos = this.options.isVertical ? [0, point] : [point, 0];\n\n\t\t_utils.scrollBy.apply(undefined, [this.view].concat(pos));\n\t};\n\n\tDOMRenderer.prototype.getContainerOffset = function getContainerOffset() {\n\t\treturn this._size.containerOffset;\n\t};\n\n\tDOMRenderer.prototype.getViewportSize = function getViewportSize() {\n\t\tthis.resize();\n\t\treturn this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.setContainerSize = function setContainerSize(size) {\n\t\tif (!this.options.isOverflowScroll || !this.options.isVertical && _consts.DEFENSE_BROWSER) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = size + \"px\";\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.resize = function resize() {\n\t\tif (this.isNeededResize()) {\n\t\t\tvar isVertical = this.options.isVertical;\n\n\t\t\tthis._size = {\n\t\t\t\tcontainerOffset: this.container[\"offset\" + (isVertical ? \"Top\" : \"Left\")],\n\t\t\t\tviewport: this._calcSize(),\n\t\t\t\tview: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),\n\t\t\t\titem: null\n\t\t\t};\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tDOMRenderer.prototype.isNeededResize = function isNeededResize() {\n\t\treturn this._calcSize() !== this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.destroy = function destroy() {\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\tfor (var p in this._orgStyle) {\n\t\t\tthis[this.options.isOverflowScroll ? \"view\" : \"container\"].style[p] = this._orgStyle[p];\n\t\t}\n\t};\n\n\treturn DOMRenderer;\n}();\n\nexports[\"default\"] = DOMRenderer;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DOMRenderer.js\n// module id = 3\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\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\n/*\nFrame\n[\n[1, 1, 1, 1, 1],\n[0, 0, 2, 2, 2],\n[0, 0, 2, 2, 2],\n[3, 4, 5, 5, 5],\n]\n*/\nfunction disableFrame(frame, type, x, y, width, height) {\n\tfor (var i = y; i < y + height; ++i) {\n\t\tfor (var j = x; j < x + width; ++j) {\n\t\t\tif (type !== frame[i][j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tframe[i][j] = 0;\n\t\t}\n\t}\n}\nfunction searchShapeInFrame(frame, type, top, left, width, height) {\n\tvar size = {\n\t\tleft: left,\n\t\ttop: top,\n\t\ttype: type,\n\t\twidth: 1,\n\t\theight: 1\n\t};\n\n\tfor (var i = left; i < width; ++i) {\n\t\tif (frame[top][i] === type) {\n\t\t\tsize.width = i - left + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (var _i = top; _i < height; ++_i) {\n\t\tif (frame[_i][left] === type) {\n\t\t\tsize.height = _i - top + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\t// After finding the shape, it will not find again.\n\tdisableFrame(frame, type, left, top, size.width, size.height);\n\treturn size;\n}\nfunction getShapes(frame) {\n\tvar height = frame.length;\n\tvar width = height ? frame[0].length : 0;\n\tvar shapes = [];\n\n\tfor (var i = 0; i < height; ++i) {\n\t\tfor (var j = 0; j < width; ++j) {\n\t\t\tvar type = frame[i][j];\n\n\t\t\tif (!type) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Separate shapes with other numbers.\n\t\t\tshapes.push(searchShapeInFrame(frame, type, i, j, width, height));\n\t\t}\n\t}\n\tshapes.sort(function (a, b) {\n\t\treturn a.type < b.type ? -1 : 1;\n\t});\n\treturn {\n\t\tshapes: shapes,\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n/**\n * FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다. \n * @example\n```\n\n```\n **/\n\nvar FrameLayout = function () {\n\tfunction FrameLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, FrameLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\titemSize: 0,\n\t\t\tframe: [],\n\t\t\tframeFill: true\n\t\t}, options);\n\t\tvar frame = this.options.frame.map(function (row) {\n\t\t\treturn row.slice();\n\t\t});\n\t\t// divide frame into shapes.\n\t\tvar shapes = getShapes(frame);\n\n\t\tthis._itemSize = this.options.itemSize || 0;\n\t\tthis._shapes = shapes;\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tFrameLayout.prototype._getItemSize = function _getItemSize() {\n\t\tthis._checkItemSize();\n\n\t\treturn this._itemSize;\n\t};\n\n\tFrameLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tif (this.options.itemSize) {\n\t\t\tthis._itemSize = this.options.itemSize;\n\t\t\treturn;\n\t\t}\n\t\tvar style = this._style;\n\t\tvar size = style.size2;\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / this._shapes[size] - margin;\n\t};\n\n\tFrameLayout.prototype._layout = function _layout(items) {\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar length = items.length;\n\t\tvar style = this._style;\n\t\tvar _options = this.options,\n\t\t margin = _options.margin,\n\t\t frameFill = _options.frameFill;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar itemSize = this._getItemSize();\n\t\tvar isItemObject = (typeof itemSize === \"undefined\" ? \"undefined\" : _typeof(itemSize)) === \"object\";\n\t\tvar itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;\n\t\tvar itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;\n\t\tvar shapesSize = this._shapes[size2Name];\n\t\tvar shapes = this._shapes.shapes;\n\t\tvar shapesLength = shapes.length;\n\t\tvar startOutline = (0, _utils.fill)(shapesSize, -99999);\n\t\tvar endOutline = (0, _utils.fill)(shapesSize, -99999);\n\t\tvar dist = 0;\n\t\tvar end = 0;\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar minPos = -1;\n\t\tvar maxPos = -1;\n\n\t\tif (!shapesLength) {\n\t\t\treturn { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };\n\t\t}\n\t\tfor (var i = 0; i < length; i += shapesLength) {\n\t\t\tfor (var j = 0; j < shapesLength && i + j < length; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = items[i + j];\n\t\t\t\tvar shape = shapes[j];\n\t\t\t\tvar shapePos1 = shape[pos1Name];\n\t\t\t\tvar shapePos2 = shape[pos2Name];\n\t\t\t\tvar shapeSize1 = shape[size1Name];\n\t\t\t\tvar shapeSize2 = shape[size2Name];\n\t\t\t\tvar pos1 = end - dist + shapePos1 * (itemSize1 + margin);\n\t\t\t\tvar pos2 = shapePos2 * (itemSize2 + margin);\n\t\t\t\tvar size1 = shapeSize1 * (itemSize1 + margin) - margin;\n\t\t\t\tvar size2 = shapeSize2 * (itemSize2 + margin) - margin;\n\n\t\t\t\tfor (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {\n\t\t\t\t\tif (startOutline[k] === -99999) {\n\t\t\t\t\t\tstartOutline[k] = pos1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startIndex === -1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (minPos > pos1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxPos < pos1 + size1 + margin) {\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tstartOutline[k] = Math.min(startOutline[k], pos1);\n\t\t\t\t\tendOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);\n\t\t\t\t}\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\tend = Math.max.apply(Math, endOutline);\n\t\t\t// check dist once\n\t\t\tif (i !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// find & fill empty block\n\t\t\tif (!frameFill) {\n\t\t\t\tdist = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdist = end;\n\n\t\t\tfor (var _j = 0; _j < shapesSize; ++_j) {\n\t\t\t\tif (startOutline[_j] === -99999) {\n\t\t\t\t\tstartOutline[_j] = Math.max.apply(Math, startOutline);\n\t\t\t\t\tendOutline[_j] = startOutline[_j];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// the dist between frame's end outline and next frame's start outline\n\t\t\t\t// expect that next frame's start outline is startOutline[j] + end\n\t\t\t\tdist = Math.min(startOutline[_j] + end - endOutline[_j], dist);\n\t\t\t}\n\t\t}\n\t\t// The target outline is start outline when type is APPENDING\n\t\tvar targetOutline = isAppend ? startOutline : endOutline;\n\t\tvar prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? \"max\" : \"min\"].apply(Math, outline);\n\t\tvar prevOutlineDist = isAppend ? 0 : end;\n\n\t\tif (frameFill && outline.length === shapesSize) {\n\t\t\tprevOutlineDist = 99999999;\n\t\t\tfor (var _i2 = 0; _i2 < shapesSize; ++_i2) {\n\t\t\t\tif (startOutline[_i2] === endOutline[_i2]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// if appending type is PREPEND, subtract dist from appending group's height.\n\n\t\t\t\tprevOutlineDist = Math.min(targetOutline[_i2] + prevOutlineEnd - outline[_i2], prevOutlineDist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i3 = 0; _i3 < shapesSize; ++_i3) {\n\t\t\tstartOutline[_i3] += prevOutlineEnd - prevOutlineDist;\n\t\t\tendOutline[_i3] += prevOutlineEnd - prevOutlineDist;\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\titem.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;\n\t\t});\n\t\treturn {\n\t\t\tstart: startOutline,\n\t\t\tend: endOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tFrameLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tFrameLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.FrameLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tFrameLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\n\treturn FrameLayout;\n}();\n\nexports[\"default\"] = FrameLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/FrameLayout.js\n// module id = 4\n// module chunks = 0 1","\"use strict\";\n\nvar _InfiniteGrid = require(\"./InfiniteGrid\");\n\nvar _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);\n\nvar _GridLayout = require(\"./layouts/GridLayout\");\n\nvar _GridLayout2 = _interopRequireDefault(_GridLayout);\n\nvar _FrameLayout = require(\"./layouts/FrameLayout\");\n\nvar _FrameLayout2 = _interopRequireDefault(_FrameLayout);\n\nvar _SquareLayout = require(\"./layouts/SquareLayout\");\n\nvar _SquareLayout2 = _interopRequireDefault(_SquareLayout);\n\nvar _PackingLayout = require(\"./layouts/PackingLayout\");\n\nvar _PackingLayout2 = _interopRequireDefault(_PackingLayout);\n\nvar _JustifiedLayout = require(\"./layouts/JustifiedLayout\");\n\nvar _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Copyright (c) NAVER Corp.\n * egjs-infinitegrid projects are licensed under the MIT license\n */\n_InfiniteGrid2[\"default\"].GridLayout = _GridLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].FrameLayout = _FrameLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].SquareLayout = _SquareLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].PackingLayout = _PackingLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].JustifiedLayout = _JustifiedLayout2[\"default\"];\n\nmodule.exports = _InfiniteGrid2[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 5\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 * Copyright (c) 2017 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n\nvar _component = require(\"@egjs/component\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _ItemManager = require(\"./ItemManager\");\n\nvar _ItemManager2 = _interopRequireDefault(_ItemManager);\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _ImageLoaded = require(\"./ImageLoaded\");\n\nvar _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);\n\nvar _Watcher = require(\"./Watcher\");\n\nvar _Watcher2 = _interopRequireDefault(_Watcher);\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// IE8\n// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create\n/* eslint-disable */\nif (typeof Object.create !== \"function\") {\n\tObject.create = function (o, properties) {\n\t\tif ((typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) !== \"object\" && typeof o !== \"function\") {\n\t\t\tthrow new TypeError(\"Object prototype may only be an Object: \" + o);\n\t\t} else if (o === null) {\n\t\t\tthrow new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n\t\t}\n\t\tfunction F() {}\n\t\tF.prototype = o;\n\t\treturn new F();\n\t};\n}\n/* eslint-enable */\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다\n * @alias eg.InfiniteGrid\n * @extends eg.Component\n *\n * @example\n```\n
    \n\t
  • \n\t\t
    test1
    \n\t
  • \n\t
  • \n\t\t
    test2
    \n\t
  • \n\t
  • \n\t\t
    test3
    \n\t
  • \n\t
  • \n\t\t
    test4
    \n\t
  • \n\t
  • \n\t\t
    test5
    \n\t
  • \n\t
  • \n\t\t
    test6
    \n\t
  • \n
\n\n```\n *\n * @support {\"ie\": \"8+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n **/\n\nvar InfiniteGrid = function (_Component) {\n\t_inherits(InfiniteGrid, _Component);\n\n\t/**\n * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트\n * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체\n * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)\n * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.\n * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to \"true\", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다\n * @param {Number} [options.threshold=300] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.\n * @param {String|Object} [options.loadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector \n *\n */\n\tfunction InfiniteGrid(element, options) {\n\t\t_classCallCheck(this, InfiniteGrid);\n\n\t\tvar _this = _possibleConstructorReturn(this, _Component.call(this));\n\n\t\t_extends(_this.options = {\n\t\t\titemSelector: \"*\",\n\t\t\tisOverflowScroll: false,\n\t\t\tthreshold: 300,\n\t\t\tisEqualSize: false,\n\t\t\tuseRecycle: true,\n\t\t\thorizontal: false,\n\t\t\tloadingBar: {}\n\t\t}, options);\n\t\t_consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);\n\t\t_this._isVertical = !_this.options.horizontal;\n\t\t_this._reset();\n\t\t_this._items = new _ItemManager2[\"default\"]();\n\t\t_this._renderer = new _DOMRenderer2[\"default\"](element, {\n\t\t\tisOverflowScroll: _this.options.isOverflowScroll,\n\t\t\tisEqualSize: _this.options.isEqualSize,\n\t\t\tisVertical: _this._isVertical\n\t\t});\n\t\t_this._watcher = new _Watcher2[\"default\"](_this._renderer, {\n\t\t\tlayout: function layout() {\n\t\t\t\treturn _this.layout();\n\t\t\t},\n\t\t\tcheck: function check(param) {\n\t\t\t\treturn _this._onCheck(param);\n\t\t\t}\n\t\t});\n\t\t_this._initLoadingBar();\n\t\treturn _this;\n\t}\n\t/**\n * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.append(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.append([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.append([HTMLElement1, HTMLElement2]);\n * infinitegrid.append(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.append = function append(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.APPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.prepend(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.prepend([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.prepend([HTMLElement1, HTMLElement2]);\n * infinitegrid.prepend(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.PREPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Layout class to use.\n * @ko 사용할 Layout 클래스를 지정한다.\n * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스\n * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {\n * margin: 10,\n * align: \"start\"\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {\n * margin: 10,\n * minSize: 100,\n * maxSize: 200\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {\n * margin: 10,\n * column: 2\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {\n * margin: 10,\n * frame: [\n * [1, 2],\n * [4, 3],\n * ]\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {\n * margin: 10,\n * aspectRatio: 1.5\n * });\n */\n\n\n\tInfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {\n\t\tthis._layout = new LayoutKlass(_extends(options || {}, {\n\t\t\thorizontal: !this._isVertical\n\t\t}));\n\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\treturn this;\n\t};\n\t/**\n * Returns the layouted items.\n * @ko 레이아웃된 아이템들을 반환한다.\n * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.\n * @returns {Array} List of items 아이템의 목록\n */\n\n\n\tInfiniteGrid.prototype.getItems = function getItems() {\n\t\tvar includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\treturn this[includeCached ? \"_getItems\" : \"_getVisibleItems\"]();\n\t};\n\n\tInfiniteGrid.prototype._getItems = function _getItems() {\n\t\treturn this._items.pluck(\"items\", 0, this._items.size());\n\t};\n\n\tInfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {\n\t\treturn this._items.pluck(\"items\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._updateEdge = function _updateEdge() {\n\t\tthis._status.start = this._items.getEdge(\"start\", this._status.startCursor, this._status.endCursor);\n\t\tthis._status.end = this._items.getEdge(\"end\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {\n\t\tvar rect = null;\n\n\t\tif (!this._status[cursor]) {\n\t\t\tvar item = this._items.getEdge(cursor);\n\n\t\t\tthis._status[cursor] = item;\n\t\t}\n\n\t\tif (this._status[cursor]) {\n\t\t\trect = this._status[cursor].rect;\n\t\t\tif (cursor === \"start\") {\n\t\t\t\trect.bottom = rect.top + this._status[cursor].size.height;\n\t\t\t\trect.right = rect.left + this._status[cursor].size.width;\n\t\t\t}\n\t\t}\n\t\treturn rect;\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._fit = function _fit() {\n\t\tvar scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"after\";\n\n\t\t// for caching\n\t\tif (!this.options.useRecycle) {\n\t\t\tthis._fit = function () {\n\t\t\t\treturn 0;\n\t\t\t};\n\t\t\treturn 0;\n\t\t}\n\t\tif (this._layout) {\n\t\t\tvar base = this._getEdgeValue(\"start\");\n\t\t\tvar margin = this._status.loadingSize;\n\n\t\t\tif (base !== 0 || margin) {\n\t\t\t\tif (!this._isLoading()) {\n\t\t\t\t\tthis._process(_consts.PROCESSING);\n\t\t\t\t}\n\t\t\t\tif (scrollCycle === \"before\") {\n\t\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\t}\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t\tif (scrollCycle === \"after\") {\n\t\t\t\t\tthis._renderer.scrollBy(Math.abs(base) + margin);\n\t\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\t}\n\t\t\t\tif (!this._isLoading()) {\n\t\t\t\t\tthis._process(_consts.PROCESSING, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn base;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {\n\t\treturn this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);\n\t};\n\t/**\n * Rearranges a layout.\n * @ko 레이아웃을 다시 배치한다.\n * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.layout = function layout() {\n\t\tvar _this2 = this;\n\n\t\tvar isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n\t\tif (!this._layout || this._isProcessing()) {\n\t\t\treturn this;\n\t\t}\n\t\t// check childElement\n\t\tif (!this._items.size()) {\n\t\t\tthis._insert((0, _utils.toArray)(this._renderer.container.children), true);\n\t\t\treturn this;\n\t\t} else {\n\t\t\tthis._process(_consts.PROCESSING);\n\n\t\t\tvar data = void 0;\n\t\t\tvar outline = void 0;\n\n\t\t\tif (isRelayout) {\n\t\t\t\t// remove cache\n\t\t\t\tdata = this._items.get(this._status.startCursor, this._status.endCursor);\n\t\t\t\tif (this._renderer.resize()) {\n\t\t\t\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\t\tdata.items = _this2._renderer.updateSize(v.items);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdata = this._items.get(this._status.startCursor, this._items.size());\n\t\t\t\toutline = this._items.getOutline(this._status.startCursor, \"start\");\n\t\t\t}\n\t\t\tif (!data.length) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthis._layout.layout(data, outline);\n\n\t\t\tif (isRelayout) {\n\t\t\t\tthis._items.set(data);\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t\tthis._status.endCursor = data.length - 1;\n\t\t\t} else {\n\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\treturn _this2._items.set(v, v.groupKey);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tisRelayout && this._watcher.setScrollPos();\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Removes a item element on a grid layout.\n * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.\n * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트\n * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보\n */\n\n\n\tInfiniteGrid.prototype.remove = function remove(element) {\n\t\tif (element) {\n\t\t\tvar items = this._items.remove(element, this._status.startCursor, this._status.endCursor);\n\n\t\t\tif (items) {\n\t\t\t\t_DOMRenderer2[\"default\"].removeElement(element);\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tInfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {\n\t\tvar items = [];\n\t\tvar size = this._items.size();\n\n\t\t// from cache\n\t\tif (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {\n\t\t\tif (isAppend && size > this._status.endCursor + 1) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.endCursor + 1);\n\t\t\t} else if (!isAppend && this._status.startCursor > 0) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.startCursor - 1);\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t};\n\t/**\n * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.\n * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.\n * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.\n * @return {Array} List of group keys 그룹 키의 목록\n */\n\n\n\tInfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {\n\t\tvar data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);\n\n\t\treturn data.map(function (v) {\n\t\t\treturn v.groupKey;\n\t\t});\n\t};\n\t/**\n * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.\n * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다\n * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체\n */\n\n\n\tInfiniteGrid.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_status: _extends({}, this._status),\n\t\t\t_items: this._items.getStatus(),\n\t\t\t_renderer: this._renderer.getStatus(),\n\t\t\t_watcher: this._watcher.getStatus()\n\t\t};\n\t};\n\t/**\n * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.\n * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.\n * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체\n * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._watcher.detachEvent();\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._status, status._status);\n\t\tthis._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);\n\t\tthis._renderer.setStatus(status._renderer, this._getVisibleItems());\n\t\tthis._watcher.setStatus(status._watcher, applyScrollPos);\n\t\tthis._updateEdge();\n\t\tthis._watcher.attachEvent();\n\t\treturn this;\n\t};\n\t/**\n * Clears added card elements and data.\n * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.clear = function clear() {\n\t\tthis._items.clear();\n\t\tthis._renderer.clear();\n\t\tthis._reset();\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._initLoadingBar = function _initLoadingBar() {\n\t\tvar loadingBar = this.options.loadingBar;\n\t\tvar loadingBarObj = (typeof loadingBar === \"undefined\" ? \"undefined\" : _typeof(loadingBar)) === \"object\" ? loadingBar : {\n\t\t\t\"append\": loadingBar,\n\t\t\t\"prepend\": loadingBar\n\t\t};\n\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tthis._loadingBar = loadingBarObj;\n\t\tfor (var type in loadingBarObj) {\n\t\t\tloadingBarObj[type] = (0, _utils.$)(loadingBarObj[type]);\n\t\t}\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {\n\t\tvar loadingBar = this._loadingBar;\n\t\tvar container = this._renderer.container;\n\n\t\tfor (var type in loadingBar) {\n\t\t\tcontainer.appendChild(loadingBar[type]);\n\t\t}\n\t};\n\t/**\n * Checks whether a card element or data is being added.\n * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다\n * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부\n */\n\n\n\tInfiniteGrid.prototype.isProcessing = function isProcessing() {\n\t\treturn this._isProcessing() || this._isLoading();\n\t};\n\n\tInfiniteGrid.prototype._isProcessing = function _isProcessing() {\n\t\treturn (this._status.procesingStatus & _consts.PROCESSING) > 0;\n\t};\n\n\tInfiniteGrid.prototype._isLoading = function _isLoading() {\n\t\treturn this._getLoadingStatus() > 0;\n\t};\n\n\tInfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {\n\t\treturn this._status.procesingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);\n\t};\n\n\tInfiniteGrid.prototype._process = function _process(status) {\n\t\tvar isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (isAdd) {\n\t\t\tthis._status.procesingStatus |= status;\n\t\t} else {\n\t\t\tthis._status.procesingStatus -= this._status.procesingStatus & status;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {\n\t\tif (this._isProcessing() || elements.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\t\tvar key = typeof groupKey === \"undefined\" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;\n\t\tvar items = _ItemManager2[\"default\"].from((0, _utils.$)(elements, true), this.options.itemSelector, {\n\t\t\tisAppend: isAppend,\n\t\t\tgroupKey: key\n\t\t});\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);\n\t};\n\t// add items, and remove items for recycling\n\n\n\tInfiniteGrid.prototype._recycle = function _recycle(isAppend) {\n\t\tvar remove = [];\n\n\t\tif (this._status.startCursor !== this._status.endCursor) {\n\t\t\tfor (var i = this._status.startCursor; i <= this._status.endCursor; i++) {\n\t\t\t\tremove.push(this._isVisible(i));\n\t\t\t}\n\t\t}\n\t\tvar start = remove.indexOf(isAppend ? 1 : -1);\n\t\tvar end = remove.lastIndexOf(isAppend ? 1 : -1);\n\n\t\tif (start !== -1 && end !== -1) {\n\t\t\tstart = this._status.startCursor + start;\n\t\t\tend = start + end;\n\t\t\t_DOMRenderer2[\"default\"].removeItems(this._items.pluck(\"items\", start, end));\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.startCursor = end + 1;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor = start - 1;\n\t\t\t}\n\t\t}\n\t};\n\t/**\n * Returns the element of loading bar.\n * @ko 로딩 바의 element를 반환한다.\n * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @return {Element} The element of loading bar. 로딩 바의 element\n */\n\n\n\tInfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {\n\t\tvar isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;\n\n\t\treturn this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\t};\n\t/**\n * Start loading for append/prepend during loading data.\n * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.\n * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @param {Object} [userStyle = {display: \"block\"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.startLoading = function startLoading(isAppend) {\n\t\tvar userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: \"block\" };\n\n\t\tif (this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\n\t\tthis._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);\n\t\tif (!this._loadingBar[type]) {\n\t\t\treturn this;\n\t\t}\n\t\tvar pos = isAppend ? this._getEdgeValue(\"end\") : 0;\n\n\t\tthis._renderLoading(isAppend, pos, userStyle);\n\t\tthis._status.loadingStyle = userStyle;\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t} else {\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") + this._status.loadingSize);\n\t\t}\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._renderLoading = function _renderLoading(isAppend, pos) {\n\t\tvar _extends2;\n\n\t\tvar userStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._status.loadingStyle;\n\n\t\tvar el = this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\t\tvar style = _extends((_extends2 = {\n\t\t\tposition: \"absolute\"\n\t\t}, _extends2[this._isVertical ? \"top\" : \"left\"] = pos + \"px\", _extends2), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tthis._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);\n\t};\n\t/**\n * End loading after startLoading() for append/prepend\n * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.\n * @param {Object} [userStyle = {display: \"none\"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.endLoading = function endLoading() {\n\t\tvar _extends3;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: \"none\" };\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\t\tvar el = this._loadingBar[type];\n\t\tvar size = this._loadingSize;\n\n\t\tthis._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tif (!el) {\n\t\t\treturn this;\n\t\t}\n\t\tvar style = _extends((_extends3 = {}, _extends3[this._isVertical ? \"top\" : \"left\"] = -size + \"px\", _extends3), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t}\n\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {\n\t\tvar _this3 = this;\n\n\t\tif (fromCache) {\n\t\t\tthis._renderer.createAndInsert(items, isAppend);\n\t\t\tthis._updateCursor(isAppend);\n\t\t\tthis.options.useRecycle && this._recycle(isAppend);\n\t\t\tthis._onLayoutComplete(items, isAppend, isTrusted);\n\t\t} else {\n\t\t\tvar method = isAppend ? \"append\" : \"prepend\";\n\n\t\t\tthis._renderer[method](items);\n\t\t\t// check image sizes after elements are attated on DOM\n\t\t\t_ImageLoaded2[\"default\"].check(items.map(function (item) {\n\t\t\t\treturn item.el;\n\t\t\t}), function () {\n\t\t\t\tvar layouted = _this3._layout[method](_this3._renderer.updateSize(items), _this3._items.getOutline(isAppend ? _this3._status.endCursor : _this3._status.startCursor, isAppend ? \"end\" : \"start\"));\n\n\t\t\t\t_this3._insertItems(layouted, isAppend);\n\t\t\t\t_this3._updateCursor(isAppend);\n\t\t\t\t_this3.options.useRecycle && _this3._recycle(isAppend);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(layouted.items);\n\t\t\t\t_this3._onLayoutComplete(layouted.items, isAppend, isTrusted);\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._isVisible = function _isVisible(index) {\n\t\tvar min = Math.min.apply(Math, this._items.getOutline(index, \"start\"));\n\t\tvar max = Math.max.apply(Math, this._items.getOutline(index, \"end\"));\n\t\tvar pos = this._watcher.getScrollPos();\n\t\tvar viewSize = this._renderer.getViewSize();\n\n\t\tif (pos + viewSize + this.options.threshold < min) {\n\t\t\treturn -1;\n\t\t} else if (pos - this.options.threshold > max) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t};\n\n\tInfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {\n\t\tif (this.options.useRecycle) {\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.endCursor++;\n\t\t\t} else if (this._status.startCursor > 0) {\n\t\t\t\tthis._status.startCursor--;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor++; // outside prepend\n\t\t\t}\n\t\t\tif (this._status.startCursor < 0) {\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._status.startCursor = 0;\n\t\t\tthis._status.endCursor = this._items.size() - 1;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {\n\t\tlayouted.groupKey = layouted.items[0].groupKey;\n\t\tthis._items[isAppend ? \"append\" : \"prepend\"](layouted);\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestAppend = function _requestAppend() {\n\t\tvar items = this._getNextItems(_consts.APPEND);\n\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.\n * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다\n * @event eg.InfiniteGrid#append\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"append\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().pop()\n\t\t\t});\n\t\t}\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestPrepend = function _requestPrepend() {\n\t\tvar items = this._getNextItems(_consts.PREPEND);\n\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.\n * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.\n * @event eg.InfiniteGrid#prepend\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"prepend\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().shift()\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onCheck = function _onCheck(_ref) {\n\t\tvar isForward = _ref.isForward,\n\t\t scrollPos = _ref.scrollPos,\n\t\t horizontal = _ref.horizontal,\n\t\t orgScrollPos = _ref.orgScrollPos;\n\n\t\t/**\n * This event is fired when the user scrolls.\n * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.\n * @event eg.InfiniteGrid#change\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n */\n\t\tthis.trigger(\"change\", {\n\t\t\tisForward: isForward,\n\t\t\thorizontal: horizontal,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos\n\t\t});\n\t\tif (this.isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tvar rect = this._getEdgeOffset(isForward ? \"end\" : \"start\");\n\n\t\tif (!rect) {\n\t\t\treturn;\n\t\t}\n\t\tvar targetPos = isForward ? rect[horizontal ? \"left\" : \"top\"] - this._renderer.getViewSize() : rect[horizontal ? \"right\" : \"bottom\"];\n\n\t\tif (isForward) {\n\t\t\tif (scrollPos >= targetPos) {\n\t\t\t\tthis._requestAppend();\n\t\t\t}\n\t\t} else if (scrollPos <= targetPos) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {\n\t\tvar isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\t\tthis._updateEdge();\n\t\tvar size = this._getEdgeValue(\"end\");\n\n\t\tthis._renderer.setContainerSize(size + this._status.loadingSize);\n\t\tif (isAppend) {\n\t\t\tthis._isLoading() && this._renderLoading(true, size);\n\t\t} else {\n\t\t\tthis._fit(\"after\");\n\t\t}\n\t\tthis._process(_consts.PROCESSING, false);\n\t\t/**\n * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.\n * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다\n * @event eg.InfiniteGrid#layoutComplete\n *\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들\n * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\tthis.trigger(\"layoutComplete\", {\n\t\t\ttarget: items.concat(),\n\t\t\tisAppend: isAppend,\n\t\t\tisTrusted: isTrusted,\n\t\t\tscrollPos: this._watcher.getScrollPos(),\n\t\t\torgScrollPos: this._watcher.getOrgScrollPos(),\n\t\t\tsize: size\n\t\t});\n\t\tthis._watcher.reset();\n\t\t// console.warn(\"_onLayoutComplete [\", this._status.startCursor, this._status.endCursor, \"]\");\n\t};\n\n\tInfiniteGrid.prototype._reset = function _reset() {\n\t\tthis._status = {\n\t\t\tprocesingStatus: 0,\n\t\t\tstartCursor: -1,\n\t\t\tendCursor: -1,\n\t\t\tstart: null,\n\t\t\tend: null\n\t\t};\n\t};\n\t/**\n * Destroys elements, properties, and events used on a grid layout.\n * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다\n */\n\n\n\tInfiniteGrid.prototype.destroy = function destroy() {\n\t\tthis.off();\n\t\tthis._watcher.destroy();\n\t\tthis._reset();\n\t\tthis._items.clear();\n\t\tthis._renderer.destroy();\n\t};\n\n\treturn InfiniteGrid;\n}(_component2[\"default\"]);\n\nInfiniteGrid.VERSION = \"3.0.0-rc\";\n\nexports[\"default\"] = InfiniteGrid;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/InfiniteGrid.js\n// module id = 6\n// module chunks = 0 1","/*!\n * Copyright (c) 2017 NAVER Corp.\r\n * @egjs/component project is licensed under the MIT license\r\n * \r\n * @egjs/component JavaScript library\r\n * http://naver.github.io/egjs/component\r\n * \r\n * @version 2.1.0\n */\n(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[\"Component\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"Component\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _Component = __webpack_require__(1);\n\nvar _Component2 = _interopRequireDefault(_Component);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n_Component2[\"default\"].VERSION = \"2.1.0\";\nmodule.exports = _Component2[\"default\"];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n/**\n * A class used to manage events and options in a component\n * @ko 컴포넌트의 이벤트와 옵션을 관리할 수 있게 하는 클래스\n * @alias eg.Component\n */\nvar Component = function () {\n\t/**\n * @support {\"ie\": \"7+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n */\n\tfunction Component() {\n\t\t_classCallCheck(this, Component);\n\n\t\tthis._eventHandler = {};\n\t\tthis.options = {};\n\t}\n\t/**\n * Triggers a custom event.\n * @ko 커스텀 이벤트를 발생시킨다\n * @param {String} eventName The name of the custom event to be triggered 발생할 커스텀 이벤트의 이름\n * @param {Object} customEvent Event data to be sent when triggering a custom event 커스텀 이벤트가 발생할 때 전달할 데이터\n * @return {Boolean} Indicates whether the event has occurred. If the stop() method is called by a custom event handler, it will return false and prevent the event from occurring. Ref 이벤트 발생 여부. 커스텀 이벤트 핸들러에서 stop() 메서드를 호출하면 'false'를 반환하고 이벤트 발생을 중단한다. 참고\n * @example\n class Some extends eg.Component {\n some(){\n \tif(this.trigger(\"beforeHi\")){ // When event call to stop return false.\n \tthis.trigger(\"hi\");// fire hi event.\n \t}\n }\n }\n const some = new Some();\n some.on(\"beforeHi\", (e) => {\n if(condition){\n \te.stop(); // When event call to stop, `hi` event not call.\n }\n });\n some.on(\"hi\", (e) => {\n // `currentTarget` is component instance.\n console.log(some === e.currentTarget); // true\n });\n // If you want to more know event design. You can see article.\n // https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F\n */\n\n\n\tComponent.prototype.trigger = function trigger(eventName) {\n\t\tvar customEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tvar handlerList = this._eventHandler[eventName] || [];\n\t\tvar hasHandlerList = handlerList.length > 0;\n\n\t\tif (!hasHandlerList) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If detach method call in handler in first time then handeler list calls.\n\t\thandlerList = handlerList.concat();\n\n\t\tcustomEvent.eventType = eventName;\n\n\t\tvar isCanceled = false;\n\t\tvar arg = [customEvent];\n\t\tvar i = 0;\n\n\t\tcustomEvent.stop = function () {\n\t\t\tisCanceled = true;\n\t\t};\n\t\tcustomEvent.currentTarget = this;\n\n\t\tfor (var _len = arguments.length, restParam = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t\t\trestParam[_key - 2] = arguments[_key];\n\t\t}\n\n\t\tif (restParam.length >= 1) {\n\t\t\targ = arg.concat(restParam);\n\t\t}\n\n\t\tfor (i = 0; handlerList[i]; i++) {\n\t\t\thandlerList[i].apply(this, arg);\n\t\t}\n\n\t\treturn !isCanceled;\n\t};\n\t/**\n * Executed event just one time.\n * @ko 이벤트가 한번만 실행된다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n alert(\"hi\");\n }\n thing() {\n this.once(\"hi\", this.hi);\n }\n }\n var some = new Some();\n some.thing();\n some.trigger(\"hi\");\n // fire alert(\"hi\");\n some.trigger(\"hi\");\n // Nothing happens\n */\n\n\n\tComponent.prototype.once = function once(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar i = void 0;\n\n\t\t\tfor (i in eventHash) {\n\t\t\t\tthis.once(i, eventHash[i]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar self = this;\n\n\t\t\tthis.on(eventName, function listener() {\n\t\t\t\tfor (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\t\t\targ[_key2] = arguments[_key2];\n\t\t\t\t}\n\n\t\t\t\thandlerToAttach.apply(self, arg);\n\t\t\t\tself.off(eventName, listener);\n\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n * Checks whether an event has been attached to a component.\n * @ko 컴포넌트에 이벤트가 등록됐는지 확인한다.\n * @param {String} eventName The name of the event to be attached 등록 여부를 확인할 이벤트의 이름\n * @return {Boolean} Indicates whether the event is attached. 이벤트 등록 여부\n * @example\n class Some extends eg.Component {\n some() {\n this.hasOn(\"hi\");// check hi event.\n }\n }\n */\n\n\n\tComponent.prototype.hasOn = function hasOn(eventName) {\n\t\treturn !!this._eventHandler[eventName];\n\t};\n\n\t/**\n * Attaches an event to a component.\n * @ko 컴포넌트에 이벤트를 등록한다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.on(\"hi\",this.hi); //attach event\n }\n }\n */\n\n\n\tComponent.prototype.on = function on(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar name = void 0;\n\n\t\t\tfor (name in eventHash) {\n\t\t\t\tthis.on(name, eventHash[name]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\t\tif (typeof handlerList === \"undefined\") {\n\t\t\t\tthis._eventHandler[eventName] = [];\n\t\t\t\thandlerList = this._eventHandler[eventName];\n\t\t\t}\n\n\t\t\thandlerList.push(handlerToAttach);\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Detaches an event from the component.\n * @ko 컴포넌트에 등록된 이벤트를 해제한다\n * @param {eventName} eventName The name of the event to be detached 해제할 이벤트의 이름\n * @param {Function} handlerToDetach The handler function of the event to be detached 해제할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself 컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.off(\"hi\",this.hi); //detach event\n }\n }\n */\n\n\n\tComponent.prototype.off = function off(eventName, handlerToDetach) {\n\t\t// All event detach.\n\t\tif (typeof eventName === \"undefined\") {\n\t\t\tthis._eventHandler = {};\n\t\t\treturn this;\n\t\t}\n\n\t\t// All handler of specific event detach.\n\t\tif (typeof handlerToDetach === \"undefined\") {\n\t\t\tif (typeof eventName === \"string\") {\n\t\t\t\tthis._eventHandler[eventName] = undefined;\n\t\t\t\treturn this;\n\t\t\t} else {\n\t\t\t\tvar eventHash = eventName;\n\t\t\t\tvar name = void 0;\n\n\t\t\t\tfor (name in eventHash) {\n\t\t\t\t\tthis.off(name, eventHash[name]);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\t// The handler of specific event detach.\n\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\tif (handlerList) {\n\t\t\tvar k = void 0;\n\t\t\tvar handlerFunction = void 0;\n\n\t\t\tfor (k = 0; (handlerFunction = handlerList[k]) !== undefined; k++) {\n\t\t\t\tif (handlerFunction === handlerToDetach) {\n\t\t\t\t\thandlerList = handlerList.splice(k, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\treturn Component;\n}();\n\nexports[\"default\"] = Component;\nmodule.exports = exports[\"default\"];\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=component.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@egjs/component/dist/component.js\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _consts = require(\"./consts\");\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ItemManager = function () {\n\tItemManager.from = function from(elements, selector, _ref) {\n\t\tvar groupKey = _ref.groupKey,\n\t\t isAppend = _ref.isAppend;\n\n\t\tvar filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);\n\n\t\t// Item Structure\n\t\treturn (0, _utils.toArray)(filted).map(function (el) {\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tgroupKey: groupKey,\n\t\t\t\tcontent: el.outerHTML\n\t\t\t};\n\t\t});\n\t};\n\n\tItemManager.selectItems = function selectItems(elements, selector) {\n\t\treturn elements.filter(function (v) {\n\t\t\tif (selector === \"*\") {\n\t\t\t\treturn v;\n\t\t\t} else {\n\t\t\t\treturn v.className.split(\" \").some(function (c) {\n\t\t\t\t\treturn c === selector;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tItemManager.pluck = function pluck(data, property) {\n\t\treturn data.reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[property]);\n\t\t}, []);\n\t};\n\n\tfunction ItemManager() {\n\t\t_classCallCheck(this, ItemManager);\n\n\t\tthis.clear();\n\t}\n\n\tItemManager.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_data: this._data.map(function (data) {\n\t\t\t\tdata.items = data.items.map(function (item) {\n\t\t\t\t\tdelete item.el;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\treturn data;\n\t\t\t})\n\t\t};\n\t};\n\n\tItemManager.prototype.setStatus = function setStatus(status, start, end) {\n\t\tvar data = status._data;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tdata[i].items = _DOMRenderer2[\"default\"].createElements(data[i].items);\n\t\t}\n\t\tthis.set(data);\n\t};\n\n\tItemManager.prototype.size = function size() {\n\t\treturn this._data.length;\n\t};\n\n\tItemManager.prototype.fit = function fit(base, isVertical) {\n\t\tif (!this._data.length) {\n\t\t\treturn;\n\t\t}\n\t\tvar property = isVertical ? \"top\" : \"left\";\n\n\t\tif (base !== 0) {\n\t\t\tthis._data = this._data.map(function (v) {\n\t\t\t\tv.items = v.items.map(function (item) {\n\t\t\t\t\titem.rect[property] -= base;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\tv.outlines.start = v.outlines.start.map(function (start) {\n\t\t\t\t\treturn start - base;\n\t\t\t\t});\n\t\t\t\tv.outlines.end = v.outlines.end.map(function (end) {\n\t\t\t\t\treturn end - base;\n\t\t\t\t});\n\t\t\t\treturn v;\n\t\t\t});\n\t\t}\n\t};\n\n\tItemManager.prototype.pluck = function pluck(property, start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, end + 1), property);\n\t\t\t} else {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, start + 1), property);\n\t\t\t}\n\t\t} else {\n\t\t\treturn ItemManager.pluck(this._data, property);\n\t\t}\n\t};\n\n\tItemManager.prototype.getOutline = function getOutline(index, property) {\n\t\tif (this._data.length) {\n\t\t\treturn this._data[index].outlines[property];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t};\n\n\tItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {\n\t\tvar prop = cursor === \"start\" ? \"min\" : \"max\";\n\t\tvar index = -1;\n\t\tvar targetValue = cursor === \"start\" ? Infinity : -Infinity;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tvar value = Math[prop].apply(Math, this.getOutline(i, cursor));\n\n\t\t\tif (cursor === \"start\" && targetValue > value || cursor === \"end\" && targetValue < value) {\n\t\t\t\ttargetValue = value;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t};\n\n\tItemManager.prototype.getEdge = function getEdge(cursor, start, end) {\n\t\tvar dataIdx = this.getEdgeIndex(cursor, start, end);\n\t\tvar items = this.pluck(\"items\", dataIdx);\n\n\t\tif (items.length) {\n\t\t\tvar itemIdx = this.getOutline(dataIdx, cursor + \"Index\");\n\n\t\t\treturn items.length > itemIdx ? items[itemIdx] : null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {\n\t\tvar outlines = this.pluck(\"outlines\", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[cursor]);\n\t\t}, []);\n\n\t\treturn outlines.length ? Math[cursor === \"start\" ? \"min\" : \"max\"].apply(Math, outlines) : 0;\n\t};\n\n\tItemManager.prototype.append = function append(layouted) {\n\t\tthis._data.push(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.prepend = function prepend(layouted) {\n\t\tthis._data.unshift(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.clear = function clear() {\n\t\tthis._data = [];\n\t};\n\n\tItemManager.prototype.remove = function remove(element, start, end) {\n\t\tvar items = null;\n\t\tvar key = element.getAttribute(_consts.GROUPKEY_ATT);\n\t\tvar data = this.get(start, end).filter(function (v) {\n\t\t\treturn String(v.groupKey) === key;\n\t\t});\n\n\t\tif (!data.length) {\n\t\t\treturn items;\n\t\t}\n\t\tdata = data[0];\n\n\t\tvar len = data.items.length;\n\t\tvar idx = -1;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tif (data.items[i].el === element) {\n\t\t\t\tidx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (~idx) {\n\t\t\t// remove item information\n\t\t\tdata.items.splice(idx, 1);\n\t\t\tthis.set(data, key);\n\t\t\titems = data.items;\n\t\t}\n\t\treturn items;\n\t};\n\n\tItemManager.prototype.get = function get(start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn this._data.slice(start, end + 1);\n\t\t\t} else {\n\t\t\t\treturn this._data.slice(start, start + 1);\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._data.concat();\n\t\t}\n\t};\n\n\tItemManager.prototype.set = function set(data, key) {\n\t\tif (typeof key !== \"undefined\" && !Array.isArray(data)) {\n\t\t\tvar len = this._data.length;\n\t\t\tvar idx = -1;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tif (this._data[i].groupKey === key) {\n\t\t\t\t\tidx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t~idx && (this._data[idx] = data);\n\t\t} else {\n\t\t\tthis._data = data.concat();\n\t\t}\n\t};\n\n\treturn ItemManager;\n}();\n\nexports[\"default\"] = ItemManager;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ItemManager.js\n// module id = 8\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 ImageLoaded = function () {\n\tfunction ImageLoaded() {\n\t\t_classCallCheck(this, ImageLoaded);\n\t}\n\n\tImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {\n\t\tvar checkCount = needCheck.length;\n\t\tvar checkImage = function checkImage() {\n\t\t\tcheckCount--;\n\t\t\tcheckCount <= 0 && callback && callback();\n\t\t};\n\t\tvar onCheck = function onCheck(e) {\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"load\", onCheck);\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"error\", onCheck);\n\t\t\tcheckImage();\n\t\t};\n\n\t\t// workaround for IE\n\t\t_consts.IS_IE && needCheck.forEach(function (v) {\n\t\t\treturn v.setAttribute(\"src\", v.getAttribute(\"src\"));\n\t\t});\n\t\tneedCheck.forEach(function (v) {\n\t\t\tif (v.complete) {\n\t\t\t\tcheckImage();\n\t\t\t} else {\n\t\t\t\t(0, _utils.addEvent)(v, \"load\", onCheck);\n\t\t\t\t(0, _utils.addEvent)(v, \"error\", onCheck);\n\t\t\t}\n\t\t});\n\t};\n\n\tImageLoaded.checkImageLoaded = function checkImageLoaded(el) {\n\t\tif (el.tagName === \"IMG\") {\n\t\t\treturn !el.complete ? [el] : [];\n\t\t} else {\n\t\t\treturn (0, _utils.toArray)(el.querySelectorAll(\"img\")).filter(function (v) {\n\t\t\t\tif (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {\n\t\t\t\t\treturn !v.complete;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tImageLoaded.check = function check(elements, callback) {\n\t\tvar _this = this;\n\n\t\tvar needCheck = elements.reduce(function (acc, v) {\n\t\t\treturn acc.concat(_this.checkImageLoaded(v));\n\t\t}, []);\n\n\t\tif (needCheck.length > 0) {\n\t\t\tImageLoaded.waitImageLoaded(needCheck, callback);\n\t\t} else {\n\t\t\t// convert to async\n\t\t\tsetTimeout(function () {\n\t\t\t\tcallback && callback();\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\treturn ImageLoaded;\n}();\n\nexports[\"default\"] = ImageLoaded;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ImageLoaded.js\n// module id = 9\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 Watcher = function () {\n\tfunction Watcher(renderer, callback) {\n\t\t_classCallCheck(this, Watcher);\n\n\t\t_extends(this._callback = {\n\t\t\tlayout: null,\n\t\t\tcheck: null\n\t\t}, callback);\n\t\tthis._timer = {\n\t\t\tresize: null\n\t\t\t// doubleCheck: null,\n\t\t\t// doubleCheckCount: RETRY,\n\t\t};\n\t\tthis.reset();\n\t\tthis._renderer = renderer;\n\t\tthis._onCheck = this._onCheck.bind(this);\n\t\tthis._onResize = this._onResize.bind(this);\n\t\tthis.attachEvent();\n\t\tthis.setScrollPos();\n\t}\n\n\tWatcher.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_prevPos: this._prevPos,\n\t\t\tscrollPos: this.getOrgScrollPos()\n\t\t};\n\t};\n\n\tWatcher.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tthis._prevPos = status._prevPos;\n\t\tapplyScrollPos && this.scrollTo(status.scrollPos);\n\t};\n\n\tWatcher.prototype.scrollTo = function scrollTo(pos) {\n\t\tvar arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];\n\n\t\t_utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));\n\t};\n\n\tWatcher.prototype.getScrollPos = function getScrollPos() {\n\t\treturn this._prevPos;\n\t};\n\n\tWatcher.prototype.setScrollPos = function setScrollPos(pos) {\n\t\tvar rawPos = pos;\n\n\t\tif (typeof pos === \"undefined\") {\n\t\t\trawPos = this.getOrgScrollPos();\n\t\t}\n\t\tthis._prevPos = rawPos - this._renderer.getContainerOffset();\n\t};\n\n\tWatcher.prototype.attachEvent = function attachEvent() {\n\t\t(0, _utils.addEvent)(this._renderer.view, \"scroll\", this._onCheck);\n\t\t(0, _utils.addEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.getOrgScrollPos = function getOrgScrollPos() {\n\t\treturn (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);\n\t};\n\n\tWatcher.prototype.reset = function reset() {\n\t\tthis._prevPos = null;\n\t};\n\n\tWatcher.prototype._onCheck = function _onCheck() {\n\t\tvar orgScrollPos = this.getOrgScrollPos();\n\t\tvar prevPos = this.getScrollPos();\n\n\t\tthis.setScrollPos(orgScrollPos);\n\t\tvar scrollPos = this.getScrollPos();\n\n\t\tif (_consts.IS_IOS && (orgScrollPos === 0 || prevPos === null) || prevPos === scrollPos) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._callback.check && this._callback.check({\n\t\t\tisForward: prevPos < scrollPos,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos,\n\t\t\thorizontal: !this._renderer.options.isVertical\n\t\t});\n\t};\n\n\tWatcher.prototype._onResize = function _onResize() {\n\t\tvar _this = this;\n\n\t\tif (this._timer.resize) {\n\t\t\tclearTimeout(this._timer.resize);\n\t\t}\n\t\tthis._timer.resize = setTimeout(function () {\n\t\t\t_this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();\n\t\t\t_this._timer.resize = null;\n\t\t}, 100);\n\t};\n\n\tWatcher.prototype.detachEvent = function detachEvent() {\n\t\t(0, _utils.removeEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.destroy = function destroy() {\n\t\tthis.detachEvent();\n\t\tthis.reset();\n\t};\n\n\treturn Watcher;\n}();\n\nexports[\"default\"] = Watcher;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Watcher.js\n// module id = 10\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\n// ALIGN\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER,\n END = _consts.ALIGN.END,\n JUSTIFY = _consts.ALIGN.JUSTIFY;\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.\n * @class eg.InfiniteGrid.GridLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar GridLayout = function () {\n\tfunction GridLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, GridLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\talign: START,\n\t\t\titemSize: 0\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._columnSize = 0;\n\t\tthis._columnLength = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tGridLayout.prototype.getPoints = function getPoints(outlines) {\n\t\tvar pos = this.options.horizontal ? \"left\" : \"top\";\n\n\t\treturn outlines.map(function (outline) {\n\t\t\treturn outline[pos];\n\t\t});\n\t};\n\n\tGridLayout.prototype.checkColumn = function checkColumn(item) {\n\t\tvar margin = this.options.margin;\n\t\tvar sizeName = this.options.horizontal ? \"height\" : \"width\";\n\t\tvar columnSize = this.options.itemSize || item && item.size[sizeName] || 0;\n\n\t\tthis._columnSize = columnSize;\n\t\tif (!columnSize) {\n\t\t\tthis._columnLength = 1;\n\t\t\treturn;\n\t\t}\n\t\tthis._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);\n\t};\n\n\tGridLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar length = items.length;\n\t\tvar margin = this.options.margin;\n\t\tvar align = this.options.align;\n\t\tvar style = this._style;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar columnSize = this._columnSize;\n\t\tvar columnLength = this._columnLength;\n\n\t\tvar size = this._size;\n\t\tvar viewDist = size - (columnSize + margin) * columnLength + margin;\n\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar startOutline = outline.slice();\n\t\tvar endOutline = outline.slice();\n\t\tvar startIndex = 0;\n\t\tvar endIndex = -1;\n\t\tvar endPos = -1;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _item$rect;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline) || 0;\n\t\t\tvar index = endOutline.indexOf(point);\n\t\t\tvar item = items[isAppend ? i : length - 1 - i];\n\t\t\tvar size1 = item.size[size1Name];\n\t\t\tvar size2 = item.size[size2Name];\n\t\t\tvar pos1 = isAppend ? point : point - margin - size1;\n\t\t\tvar endPos1 = pos1 + size1 + margin;\n\n\t\t\tif (index === -1) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tvar pos2 = (columnSize + margin) * index;\n\n\t\t\t// ALIGN\n\t\t\tif (align === CENTER) {\n\t\t\t\tpos2 += viewDist / 2;\n\t\t\t} else if (align === END) {\n\t\t\t\tpos2 += viewDist + columnSize - size2;\n\t\t\t} else if (align === JUSTIFY) {\n\t\t\t\tif (columnLength <= 1) {\n\t\t\t\t\tpos2 += viewDist / 2;\n\t\t\t\t} else {\n\t\t\t\t\tpos2 = (size - columnSize) / (columnLength - 1) * index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// tetris\n\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);\n\t\t\titem.column = index;\n\t\t\tendOutline[index] = isAppend ? endPos1 : pos1;\n\t\t\tif (endIndex === -1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t} else if (endPos < endPos1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t}\n\t\t}\n\t\tif (!isAppend) {\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tendIndex = length - 1;\n\t\t}\n\t\t// if append items, startOutline is low, endOutline is high\n\t\t// if prepend items, startOutline is high, endOutline is low\n\t\treturn {\n\t\t\tstart: isAppend ? startOutline : endOutline,\n\t\t\tend: isAppend ? endOutline : startOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tGridLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\tvar startOutline = outline;\n\n\t\tif (!this._columnLength) {\n\t\t\tthis.checkColumn(items[0]);\n\t\t}\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? \"min\" : \"max\"].apply(Math, outline) || 0);\n\t\t}\n\n\t\tvar result = this._layout(clone, startOutline, type);\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: result\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.layout = function layout() {\n\t\tvar _this = this;\n\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;\n\n\t\tthis.checkColumn(firstItem);\n\n\t\t// if outlines' length and columns' length are now same, re-caculate outlines.\n\t\tvar startOutline = void 0;\n\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tvar pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);\n\n\t\t\t// re-layout items.\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, pos);\n\t\t} else {\n\t\t\tstartOutline = outline.slice();\n\t\t}\n\t\tgroups.forEach(function (group) {\n\t\t\tvar items = group.items;\n\t\t\tvar result = _this._layout(items, startOutline, _consts.APPEND);\n\n\t\t\tgroup.outlines = result;\n\t\t\tstartOutline = result.end;\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.GridLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tGridLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn GridLayout;\n}();\n\nexports[\"default\"] = GridLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/GridLayout.js\n// module id = 11\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _FrameLayout2 = require(\"./FrameLayout\");\n\nvar _FrameLayout3 = _interopRequireDefault(_FrameLayout2);\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction makeShapeOutline(outline, itemSize, columnLength, isAppend) {\n\tvar point = Math[isAppend ? \"min\" : \"max\"].apply(Math, outline) || 0;\n\n\tif (outline.length !== columnLength) {\n\t\treturn (0, _utils.fill)(columnLength, 0);\n\t}\n\treturn outline.map(function (l) {\n\t\treturn parseInt((l - point) / itemSize, 10);\n\t});\n}\nfunction getColumn(item) {\n\tif (item.column) {\n\t\treturn item.column;\n\t}\n\tvar column = 0;\n\n\tif (item.el) {\n\t\tvar dataset = item.el.dataset;\n\n\t\tif (dataset) {\n\t\t\tcolumn = dataset.column || 1;\n\t\t} else {\n\t\t\tcolumn = item.el.getAttribute(\"column\") || 1;\n\t\t}\n\t} else {\n\t\tcolumn = 1;\n\t}\n\titem.column = column;\n\treturn column;\n}\n\n/**\n * FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.SquareLayout\n * @extends eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar SquareLayout = function (_FrameLayout) {\n\t_inherits(SquareLayout, _FrameLayout);\n\n\tfunction SquareLayout() {\n\t\t_classCallCheck(this, SquareLayout);\n\n\t\treturn _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));\n\t}\n\n\tSquareLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tvar column = this.options.column;\n\n\t\tif (!column) {\n\t\t\t_FrameLayout.prototype._checkItemSize.call(this);\n\t\t\treturn;\n\t\t}\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / column - margin;\n\t};\n\n\tSquareLayout.prototype._layout = function _layout(items) {\n\t\tvar _shapes;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar itemSize = this._getItemSize();\n\t\tvar margin = this.options.margin;\n\t\tvar columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;\n\t\tvar length = items.length;\n\t\tvar endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar shapes = [];\n\t\tvar sign = isAppend ? 1 : -1;\n\t\tvar style = this._style;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _shapes$push;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline);\n\t\t\tvar index = (0, _utils.indexOf)(endOutline, point, !isAppend);\n\t\t\tvar item = items[i];\n\t\t\tvar columnWidth = item.columnWidth;\n\t\t\tvar column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);\n\t\t\tvar columnCount = 1;\n\n\t\t\tif (column > 1) {\n\t\t\t\tfor (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {\n\t\t\t\t\tif (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {\n\t\t\t\t\t\t++columnCount;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!isAppend) {\n\t\t\t\t\tindex -= columnCount - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.columnWidth = [columnLength, columnCount];\n\t\t\tshapes.push((_shapes$push = {\n\t\t\t\twidth: columnCount,\n\t\t\t\theight: columnCount\n\t\t\t}, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));\n\t\t\tfor (var _j = 0; _j < columnCount; ++_j) {\n\t\t\t\tendOutline[index + _j] = point + sign * columnCount;\n\t\t\t}\n\t\t}\n\t\tthis._shapes = (_shapes = {\n\t\t\tshapes: shapes\n\t\t}, _shapes[style.size2] = columnLength, _shapes);\n\n\t\tvar result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);\n\n\t\tif (!isAppend) {\n\t\t\tvar lastItem = items[items.length - 1];\n\n\t\t\tshapes.sort(function (shape1, shape2) {\n\t\t\t\tvar item1pos1 = shape1[pos1Name];\n\t\t\t\tvar item1pos2 = shape1[pos2Name];\n\t\t\t\tvar item2pos1 = shape2[pos1Name];\n\t\t\t\tvar item2pos2 = shape2[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tresult.startIndex = 0;\n\t\t\tresult.endIndex = items.indexOf(lastItem);\n\t\t}\n\t\treturn result;\n\t};\n\n\treturn SquareLayout;\n}(_FrameLayout3[\"default\"]);\n\nexports[\"default\"] = SquareLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/SquareLayout.js\n// module id = 12\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 _BoxModel = require(\"./lib/BoxModel.js\");\n\nvar _BoxModel2 = _interopRequireDefault(_BoxModel);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getCost(originLength, length) {\n\tvar cost = originLength / length;\n\n\tif (cost < 1) {\n\t\tcost = 1 / cost;\n\t}\n\n\treturn cost - 1;\n}\nfunction fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {\n\titem.setHeight(itemFitSize.height);\n\titem.setWidth(itemFitSize.width);\n\tbestFitArea.setHeight(containerFitSize.height);\n\tbestFitArea.setWidth(containerFitSize.width);\n\n\tif (layoutVertical) {\n\t\titem.setTop(bestFitArea.getTop() + bestFitArea.getHeight());\n\t\titem.setLeft(bestFitArea.getLeft());\n\t} else {\n\t\titem.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());\n\t\titem.setTop(bestFitArea.getTop());\n\t}\n}\n\n/**\n * PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.\n * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.\n * @class eg.InfiniteGrid.PackingLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비 \n * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치 \n * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치 \n * @example\n```\n\n```\n **/\n\nvar PackingLayout = function () {\n\tfunction PackingLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, PackingLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\taspectRatio: 1,\n\t\t\tsizeWeight: 1,\n\t\t\tratioWeight: 1\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tPackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {\n\t\tif (container.getRatio() === 0) {\n\t\t\t// 아이템 최초 삽입시 전체영역 지정\n\t\t\tcontainer.setOriginWidth(item.getWidth());\n\t\t\tcontainer.setOriginHeight(item.getHeight());\n\t\t\tcontainer.setWidth(item.getWidth());\n\t\t\tcontainer.setHeight(item.getHeight());\n\t\t\treturn;\n\t\t}\n\n\t\tvar bestFitArea = null;\n\t\tvar minCost = 10000000;\n\t\tvar layoutVertical = false;\n\t\tvar itemFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar containerFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar _options = this.options,\n\t\t sizeWeight = _options.sizeWeight,\n\t\t ratioWeight = _options.ratioWeight;\n\n\n\t\tcontainer.innerItem().forEach(function (v) {\n\t\t\tvar containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;\n\t\t\tvar containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;\n\t\t\tvar cost = void 0;\n\n\t\t\tfor (var i = 0; i < 2; ++i) {\n\t\t\t\tvar itemWidth = void 0;\n\t\t\t\tvar itemHeight = void 0;\n\t\t\t\tvar containerWidth = void 0;\n\t\t\t\tvar containerHeight = void 0;\n\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// 상하에 아이템 추가\n\t\t\t\t\titemWidth = v.getWidth();\n\t\t\t\t\titemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));\n\t\t\t\t\tcontainerWidth = v.getWidth();\n\t\t\t\t\tcontainerHeight = v.getHeight() - itemHeight;\n\t\t\t\t} else {\n\t\t\t\t\t// 좌우에 아이템 추가\n\t\t\t\t\titemHeight = v.getHeight();\n\t\t\t\t\titemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));\n\t\t\t\t\tcontainerHeight = v.getHeight();\n\t\t\t\t\tcontainerWidth = v.getWidth() - itemWidth;\n\t\t\t\t}\n\n\t\t\t\tvar itemSize = itemWidth * itemHeight;\n\t\t\t\tvar itemRatio = itemWidth / itemHeight;\n\t\t\t\tvar containerSize = containerWidth * containerHeight;\n\t\t\t\tvar containerRatio = containerHeight / containerHeight;\n\n\t\t\t\tcost = getCost(item.getSize(), itemSize) * sizeWeight;\n\t\t\t\tcost += getCost(item.getRatio(), itemRatio) * ratioWeight;\n\t\t\t\tcost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;\n\t\t\t\tcost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;\n\n\t\t\t\tif (cost === Math.min(cost, minCost)) {\n\t\t\t\t\tminCost = cost;\n\t\t\t\t\tbestFitArea = v;\n\t\t\t\t\tlayoutVertical = i === 0;\n\t\t\t\t\titemFitSize.width = itemWidth;\n\t\t\t\t\titemFitSize.height = itemHeight;\n\t\t\t\t\tcontainerFitSize.width = containerWidth;\n\t\t\t\t\tcontainerFitSize.height = containerHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);\n\t};\n\n\tPackingLayout.prototype._layout = function _layout(items) {\n\t\tvar _this = this;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar style = this._style;\n\t\tvar isHorizontal = this.options.horizontal;\n\t\tvar aspectRatio = this.options.aspectRatio;\n\t\tvar margin = this.options.margin;\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar containerWidth = this._size * (isHorizontal ? aspectRatio : 1);\n\t\tvar containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);\n\t\tvar containerSize1 = isHorizontal ? containerWidth : containerHeight;\n\t\tvar prevOutline = (0, _utils.toZeroArray)(outline);\n\t\tvar start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;\n\t\tvar end = start + containerSize1 + margin;\n\t\tvar container = new _BoxModel2[\"default\"]({});\n\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar startPos = -1;\n\t\tvar endPos = -1;\n\n\t\titems.forEach(function (item) {\n\t\t\tvar model = new _BoxModel2[\"default\"]({\n\t\t\t\toriginWidth: item.orgSize.width,\n\t\t\t\toriginHeight: item.orgSize.height,\n\t\t\t\twidth: item.orgSize.width,\n\t\t\t\theight: item.orgSize.height\n\t\t\t});\n\n\t\t\t_this._findBestFitArea(container, model);\n\t\t\tcontainer.pushItem(model);\n\t\t\tcontainer.scaleTo(containerWidth + margin, containerHeight + margin);\n\t\t});\n\t\titems.forEach(function (item, i) {\n\t\t\tvar boxItem = container.innerItem()[i];\n\t\t\t// console.log(\"boxItem\", boxItem, boxItem instanceof BoxModel);\n\t\t\tvar width = boxItem.getWidth();\n\t\t\tvar height = boxItem.getHeight();\n\t\t\tvar top = boxItem.getTop();\n\t\t\tvar left = boxItem.getLeft();\n\n\t\t\titem.rect = { top: top, left: left, width: width - margin, height: height - margin };\n\t\t\titem.rect[pos1Name] += start;\n\n\t\t\tif (startIndex === -1) {\n\t\t\t\tstartIndex = i;\n\t\t\t\tendIndex = i;\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tendPos = startPos;\n\t\t\t}\n\t\t\tif (startPos > item.rect[pos1Name]) {\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t\tif (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {\n\t\t\t\tendPos = item.rect[pos1Name] + item.rect[size1Name] + margin;\n\t\t\t\tendIndex = i;\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstart: [start],\n\t\t\tend: [end],\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tPackingLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tPackingLayout.prototype.layout = function layout() {\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar length = groups.length;\n\t\tvar point = outline;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.PackingLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tPackingLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn PackingLayout;\n}();\n\nexports[\"default\"] = PackingLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/PackingLayout.js\n// module id = 13\n// module chunks = 0 1","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BoxModel = function () {\n\tfunction BoxModel(option) {\n\t\t_classCallCheck(this, BoxModel);\n\n\t\tthis._originWidth = option.originWidth || 0;\n\t\tthis._originHeight = option.originHeight || 0;\n\t\tthis._width = option.width || 0;\n\t\tthis._height = option.height || 0;\n\t\tthis._left = option.left || 0;\n\t\tthis._top = option.top || 0;\n\t\tthis._item = option.item;\n\t\tthis._innerItem = option.innerItem || [];\n\t}\n\n\tBoxModel.prototype.getOriginWidth = function getOriginWidth() {\n\t\treturn this._originWidth;\n\t};\n\n\tBoxModel.prototype.setOriginWidth = function setOriginWidth(width) {\n\t\tthis._originWidth = width;\n\t};\n\n\tBoxModel.prototype.getOriginHeight = function getOriginHeight() {\n\t\treturn this._originHeight;\n\t};\n\n\tBoxModel.prototype.setOriginHeight = function setOriginHeight(height) {\n\t\tthis._originHeight = height;\n\t};\n\n\tBoxModel.prototype.getWidth = function getWidth() {\n\t\treturn this._width;\n\t};\n\n\tBoxModel.prototype.setWidth = function setWidth(width) {\n\t\tthis._width = width;\n\t};\n\n\tBoxModel.prototype.getHeight = function getHeight() {\n\t\treturn this._height;\n\t};\n\n\tBoxModel.prototype.setHeight = function setHeight(height) {\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.getLeft = function getLeft() {\n\t\treturn this._left;\n\t};\n\n\tBoxModel.prototype.setLeft = function setLeft(left) {\n\t\tthis._left = left;\n\t};\n\n\tBoxModel.prototype.getTop = function getTop() {\n\t\treturn this._top;\n\t};\n\n\tBoxModel.prototype.setTop = function setTop(top) {\n\t\tthis._top = top;\n\t};\n\n\tBoxModel.prototype.innerItem = function innerItem() {\n\t\treturn this._innerItem;\n\t};\n\n\tBoxModel.prototype.scaleTo = function scaleTo(width, height) {\n\t\tvar scaleX = this._width === 0 ? 0 : width / this._width;\n\t\tvar scaleY = this._height === 0 ? 0 : height / this._height;\n\n\t\tthis._innerItem.forEach(function (v) {\n\t\t\tif (scaleX !== 0) {\n\t\t\t\tv._left *= scaleX;\n\t\t\t\tv._width *= scaleX;\n\t\t\t}\n\t\t\tif (scaleY !== 0) {\n\t\t\t\tv._top *= scaleY;\n\t\t\t\tv._height *= scaleY;\n\t\t\t}\n\t\t});\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.pushItem = function pushItem(item) {\n\t\tthis._innerItem.push(item);\n\t};\n\n\tBoxModel.prototype.getOriginSize = function getOriginSize() {\n\t\treturn this._originWidth * this._originHeight;\n\t};\n\n\tBoxModel.prototype.getSize = function getSize() {\n\t\treturn this._width * this._height;\n\t};\n\n\tBoxModel.prototype.getOriginRatio = function getOriginRatio() {\n\t\treturn this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;\n\t};\n\n\tBoxModel.prototype.getRatio = function getRatio() {\n\t\treturn this._height === 0 ? 0 : this._width / this._height;\n\t};\n\n\tBoxModel.prototype.isSmallerThen = function isSmallerThen(box) {\n\t\treturn this._width <= box._width && this._height <= box._height;\n\t};\n\n\tBoxModel.prototype.isEqual = function isEqual(box) {\n\t\treturn this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;\n\t};\n\n\treturn BoxModel;\n}();\n\nmodule.exports = BoxModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/BoxModel.js\n// module id = 14\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 _dijkstra = require(\"./lib/dijkstra\");\n\nvar _dijkstra2 = _interopRequireDefault(_dijkstra);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.\n * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.\n * @class eg.InfiniteGrid.JustifiedLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기 \n * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기 \n * @example\n```\n\n```\n **/\nvar JustifiedLayout = function () {\n\tfunction JustifiedLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, JustifiedLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\tminSize: 0,\n\t\t\tmaxSize: 0\n\t\t}, options);\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t\tthis._size = 0;\n\t}\n\n\tJustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar _this = this;\n\n\t\tvar style = this._style;\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar startIndex = 0;\n\t\tvar endIndex = items.length;\n\t\tvar graph = function graph(_start) {\n\t\t\tvar results = {};\n\t\t\tvar start = +_start.replace(/[^0-9]/g, \"\");\n\t\t\tvar length = endIndex + 1;\n\n\t\t\tfor (var i = start + 1; i < length; ++i) {\n\t\t\t\tif (i - start > 8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar cost = _this._getCost(items, start, i, size1Name, size2Name);\n\n\t\t\t\tif (cost < 0 && i === length - 1) {\n\t\t\t\t\tcost = 0;\n\t\t\t\t}\n\t\t\t\tif (cost !== null) {\n\t\t\t\t\tresults[\"node\" + i] = Math.pow(cost, 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t\t// shortest path for items' total height.\n\t\tvar path = _dijkstra2[\"default\"].find_path(graph, \"node\" + startIndex, \"node\" + endIndex);\n\n\t\treturn this._setStyle(items, path, outline, isAppend);\n\t};\n\n\tJustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {\n\t\tvar margin = this.options.margin;\n\t\tvar size = items.reduce(function (sum, item) {\n\t\t\treturn sum + item.size[size2Name] / item.size[size1Name];\n\t\t}, 0);\n\n\t\treturn (this._size - margin * (items.length - 1)) / size;\n\t};\n\n\tJustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {\n\t\tvar size = this._getSize(items.slice(i, j), size1Name, size2Name);\n\t\tvar min = this.options.minSize || 0;\n\t\tvar max = this.options.maxSize || Infinity;\n\n\t\tif (isFinite(max)) {\n\t\t\t// if this size is not in range, the cost increases sharply.\n\t\t\tif (size < min) {\n\t\t\t\treturn Math.pow(size - min, 2) + Math.pow(max, 2);\n\t\t\t} else if (size > max) {\n\t\t\t\treturn Math.pow(size - max, 2) + Math.pow(max, 2);\n\t\t\t} else {\n\t\t\t\t// if this size in range, the cost is negative or low.\n\t\t\t\treturn Math.min(size - max, min - size);\n\t\t\t}\n\t\t}\n\t\t// if max is infinite type, caculate cost only with \"min\".\n\t\tif (size < min) {\n\t\t\treturn Math.max(Math.pow(min, 2), Math.pow(size, 2));\n\t\t}\n\t\treturn size - min;\n\t};\n\n\tJustifiedLayout.prototype._setStyle = function _setStyle(items, path) {\n\t\tvar outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\t\tvar isAppend = arguments[3];\n\n\t\tvar style = this._style;\n\t\t// if direction is vertical\n\t\t// pos1 : top, pos11 : bottom\n\t\t// size1 : height\n\t\t// pos2 : left, pos22 : right\n\t\t// size2 : width\n\n\t\t// if direction is horizontal\n\t\t// pos1 : left, pos11 : right\n\t\t// size1 : width\n\t\t// pos2 : top, pos22 : bottom\n\t\t// size2 : height\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar size2Name = style.size2;\n\t\tvar length = path.length;\n\t\tvar margin = this.options.margin;\n\t\tvar startPoint = outline[0] || 0;\n\t\tvar endPoint = startPoint;\n\t\tvar height = 0;\n\n\t\tfor (var i = 0; i < length - 1; ++i) {\n\t\t\tvar path1 = parseInt(path[i].replace(\"node\", \"\"), 10);\n\t\t\tvar path2 = parseInt(path[i + 1].replace(\"node\", \"\"), 10);\n\t\t\t// pathItems(path1 to path2) are in 1 line.\n\t\t\tvar pathItems = items.slice(path1, path2);\n\t\t\tvar pathItemsLength = pathItems.length;\n\t\t\tvar size1 = this._getSize(pathItems, size1Name, size2Name);\n\t\t\tvar pos1 = endPoint;\n\n\t\t\tfor (var j = 0; j < pathItemsLength; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = pathItems[j];\n\t\t\t\tvar size2 = item.size[size2Name] / item.size[size1Name] * size1;\n\t\t\t\t// item has margin bottom and right.\n\t\t\t\t// first item has not margin.\n\t\t\t\tvar prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;\n\t\t\t\tvar pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;\n\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\theight += margin + size1;\n\t\t\tendPoint = startPoint + height;\n\t\t}\n\t\tvar itemsLength = items.length;\n\t\tvar startIndex = itemsLength ? 0 : -1;\n\t\tvar endIndex = itemsLength ? itemsLength - 1 : -1;\n\n\t\tif (isAppend) {\n\t\t\t// previous group's end outline is current group's start outline\n\t\t\treturn {\n\t\t\t\tstart: [startPoint],\n\t\t\t\tend: [endPoint],\n\t\t\t\tstartIndex: startIndex,\n\t\t\t\tendIndex: endIndex\n\t\t\t};\n\t\t}\n\t\t// for prepend, only substract height from position.\n\t\t// always start is lower than end.\n\n\t\tfor (var _i = 0; _i < itemsLength; ++_i) {\n\t\t\tvar _item = items[_i];\n\n\t\t\t// move items as long as height for prepend\n\t\t\t_item.rect[pos1Name] -= height;\n\t\t}\n\t\treturn {\n\t\t\tstart: [startPoint - height],\n\t\t\tend: [startPoint], // endPoint - height = startPoint\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tJustifiedLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.JustifiedLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tJustifiedLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100]);\n */\n\n\n\tJustifiedLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\n\treturn JustifiedLayout;\n}();\n\nexports[\"default\"] = JustifiedLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/JustifiedLayout.js\n// module id = 15\n// module chunks = 0 1","'use strict';\n\n/* eslint-disable */\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\n(function () {\n var dijkstra = {\n single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = new BinaryHeap(function (x) {\n return x.cost;\n });\n open.push({ value: s, cost: 0 });\n\n var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;\n while (open.size()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph(u) || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (var v in adjacent_nodes) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = typeof costs[v] === 'undefined';\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });\n predecessors[v] = u;\n }\n }\n }\n\n if (typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function find_path(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);\n }\n\n };\n\n function BinaryHeap(scoreFunction) {\n this.content = [];\n this.scoreFunction = scoreFunction;\n }\n\n BinaryHeap.prototype = {\n push: function push(element) {\n // Add the new element to the end of the array.\n this.content.push(element);\n // Allow it to bubble up.\n this.bubbleUp(this.content.length - 1);\n },\n\n pop: function pop() {\n // Store the first element so we can return it later.\n var result = this.content[0];\n // Get the element at the end of the array.\n var end = this.content.pop();\n // If there are any elements left, put the end element at the\n // start, and let it sink down.\n if (this.content.length > 0) {\n this.content[0] = end;\n this.sinkDown(0);\n }\n return result;\n },\n\n remove: function remove(node) {\n var len = this.content.length;\n // To remove a value, we must search through the array to find\n // it.\n for (var i = 0; i < len; i++) {\n if (this.content[i] === node) {\n // When it is found, the process seen in 'pop' is repeated\n // to fill up the hole.\n var end = this.content.pop();\n if (i !== len - 1) {\n this.content[i] = end;\n if (this.scoreFunction(end) < this.scoreFunction(node)) {\n this.bubbleUp(i);\n } else {\n this.sinkDown(i);\n }\n }\n return;\n }\n }\n throw new Error('Node not found.');\n },\n\n size: function size() {\n return this.content.length;\n },\n\n bubbleUp: function bubbleUp(n) {\n // Fetch the element that has to be moved.\n var element = this.content[n];\n // When at 0, an element can not go up any further.\n while (n > 0) {\n // Compute the parent element's index, and fetch it.\n var parentN = Math.floor((n + 1) / 2) - 1,\n parent = this.content[parentN];\n // Swap the elements if the parent is greater.\n if (this.scoreFunction(element) < this.scoreFunction(parent)) {\n this.content[parentN] = element;\n this.content[n] = parent;\n // Update 'n' to continue at the new position.\n n = parentN;\n }\n // Found a parent that is less, no need to move it further.\n else {\n break;\n }\n }\n },\n\n sinkDown: function sinkDown(n) {\n // Look up the target element and its score.\n var length = this.content.length,\n element = this.content[n],\n elemScore = this.scoreFunction(element);\n\n while (true) {\n // Compute the indices of the child elements.\n var child2N = (n + 1) * 2,\n child1N = child2N - 1;\n // This is used to store the new position of the element,\n // if any.\n var swap = null;\n // If the first child exists (is inside the array)...\n if (child1N < length) {\n // Look it up and compute its score.\n var child1 = this.content[child1N],\n child1Score = this.scoreFunction(child1);\n // If the score is less than our element's, we need to swap.\n if (child1Score < elemScore) {\n swap = child1N;\n }\n }\n // Do the same checks for the other child.\n if (child2N < length) {\n var child2 = this.content[child2N],\n child2Score = this.scoreFunction(child2);\n if (child2Score < (swap == null ? elemScore : child1Score)) {\n swap = child2N;\n }\n }\n\n // If the element needs to be moved, swap it, and continue.\n if (swap !== null) {\n this.content[n] = this.content[swap];\n this.content[swap] = element;\n n = swap;\n }\n // Otherwise, we are done.\n else {\n break;\n }\n }\n }\n };\n\n /**\n * Browserify 지원을 위한 모듈화 코드\n */\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = dijkstra;\n } else {\n window.dijkstra = dijkstra;\n }\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/dijkstra.js\n// module id = 16\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;;;A;;;;;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;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvOA;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;;;;;;;AC1QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACt5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":""} \ No newline at end of file diff --git a/dist/infinitegrid.pkgd.min.js b/dist/infinitegrid.pkgd.min.js index 40eeee561..c209a50fa 100644 --- a/dist/infinitegrid.pkgd.min.js +++ b/dist/infinitegrid.pkgd.min.js @@ -154,12 +154,11 @@ var ALIGN = exports.ALIGN = { var LOADING_APPEND = exports.LOADING_APPEND = 1; var LOADING_PREPEND = exports.LOADING_PREPEND = 2; var PROCESSING = exports.PROCESSING = 4; -var DEFENSE_BROWSER = exports.DEFENSE_BROWSER = /android/.test(agent); -alert(agent); -/* -"Mozilla/5.0 (Linux; Android 4.3; SHV-E250S Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36" -*/ +var webkit = /applewebkit\/([\d|.]*)/g.exec(agent); +var webkitVersion = webkit && parseInt(webkit[1], 10) || 0; + +var DEFENSE_BROWSER = exports.DEFENSE_BROWSER = webkitVersion < 537; /***/ }), /* 1 */ @@ -431,6 +430,23 @@ var _utils = __webpack_require__(1); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defense(element) { + var container = document.createElement("div"); + + container.className = _consts.CONTAINER_CLASSNAME; + container.style.height = "100%"; + + var children = element.children; + var length = children.length; // for IE8 + + for (var i = 0; i < length; i++) { + container.appendChild(children[0]); + } + + element.appendChild(container); + return container; +} + var DOMRenderer = function () { DOMRenderer.renderItem = function renderItem(item, styles) { if (item.el) { @@ -554,31 +570,14 @@ var DOMRenderer = function () { element.style["overflow" + target[0]] = "scroll"; element.style["overflow" + target[1]] = "hidden"; this.view = element; - this.container = element; // DEFENSE_BROWSER ? this._defense(element) : element; + // defense code for android < 4.4 or webkit < 537 + this.container = !this.options.isVertical && _consts.DEFENSE_BROWSER ? _defense(element) : element; } else { this.view = window; this.container = element; } }; - DOMRenderer.prototype._defense = function _defense(element) { - var container = document.createElement("div"); - - container.className = _consts.CONTAINER_CLASSNAME; - - var children = element.children; - var length = children.length; // for IE8 - var target = this.options.isVertical ? ["Y", "X"] : ["X", "Y"]; - - for (var i = 0; i < length; i++) { - container.appendChild(children[0]); - } - element.style["overflow" + target[0]] = "scroll"; - element.style["overflow" + target[1]] = "hidden"; - element.appendChild(container); - return container; - }; - DOMRenderer.prototype.append = function append(items) { this._insert(items, _consts.APPEND, { top: _consts.DUMMY_POSITION @@ -644,7 +643,7 @@ var DOMRenderer = function () { }; DOMRenderer.prototype.setContainerSize = function setContainerSize(size) { - if (!this.options.isOverflowScroll) { + if (!this.options.isOverflowScroll || !this.options.isVertical && _consts.DEFENSE_BROWSER) { this.container.style[this.options.isVertical ? "height" : "width"] = size + "px"; } }; diff --git a/dist/infinitegrid.pkgd.min.js.map b/dist/infinitegrid.pkgd.min.js.map index 99594c235..c23644f66 100644 --- a/dist/infinitegrid.pkgd.min.js.map +++ b/dist/infinitegrid.pkgd.min.js.map @@ -1 +1 @@ -{"version":3,"file":"infinitegrid.pkgd.min.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 01f9464dd0998f5416ef","webpack:///./src/consts.js","webpack:///./src/utils.js","webpack:///./src/browser.js","webpack:///./src/DOMRenderer.js","webpack:///./src/layouts/FrameLayout.js","webpack:///./src/index.js","webpack:///./src/InfiniteGrid.js","webpack:///./node_modules/@egjs/component/dist/component.js","webpack:///./src/ItemManager.js","webpack:///./src/ImageLoaded.js","webpack:///./src/Watcher.js","webpack:///./src/layouts/GridLayout.js","webpack:///./src/layouts/SquareLayout.js","webpack:///./src/layouts/PackingLayout.js","webpack:///./src/layouts/lib/BoxModel.js","webpack:///./src/layouts/JustifiedLayout.js","webpack:///./src/layouts/lib/dijkstra.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[\"InfiniteGrid\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"InfiniteGrid\"] = factory();\n})(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 = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 01f9464dd0998f5416ef","\"use strict\";\n\nexports.__esModule = true;\nexports.DEFENSE_BROWSER = exports.PROCESSING = exports.LOADING_PREPEND = exports.LOADING_APPEND = 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.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_\";\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 = navigator.userAgent.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 LOADING_APPEND = exports.LOADING_APPEND = 1;\nvar LOADING_PREPEND = exports.LOADING_PREPEND = 2;\nvar PROCESSING = exports.PROCESSING = 4;\nvar DEFENSE_BROWSER = exports.DEFENSE_BROWSER = /android/.test(agent);\n\nalert(agent);\n/*\n\"Mozilla/5.0 (Linux; Android 4.3; SHV-E250S Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36\"\n*/\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;\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.fill = fill;\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.indexOf = indexOf;\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 fill(length, value) {\n\tvar array = (typeof length === \"undefined\" ? \"undefined\" : _typeof(length)) === \"object\" ? length : new Array(length);\n\tvar len = array.length;\n\n\tfor (var i = len - 1; i >= 0; --i) {\n\t\tarray[i] = value;\n\t}\n\treturn array;\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 = param.match(/^<([A-z]+)\\s*([^>]*)>/);\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.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}\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 indexOf(arr, target) {\n\tvar isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\tif (!isRight) {\n\t\treturn arr.indexOf(target);\n\t}\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tif (arr[i] !== target) {\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 1\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 = window;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 DOMRenderer = function () {\n\tDOMRenderer.renderItem = function renderItem(item, styles) {\n\t\tif (item.el) {\n\t\t\tvar elStyle = item.el.style;\n\n\t\t\t// for debugging\n\t\t\titem.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);\n\t\t\telStyle.position = \"absolute\";\n\t\t\t[\"left\", \"top\", \"width\", \"height\"].forEach(function (p) {\n\t\t\t\tp in styles && (elStyle[p] = styles[p] + \"px\");\n\t\t\t});\n\t\t}\n\t};\n\n\tDOMRenderer.renderItems = function renderItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tDOMRenderer.renderItem(item, item.rect);\n\t\t});\n\t};\n\n\tDOMRenderer.removeItems = function removeItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tDOMRenderer.removeElement(item.el);\n\t\t\t\titem.el = null;\n\t\t\t}\n\t\t});\n\t};\n\n\tDOMRenderer.removeElement = function removeElement(element) {\n\t\telement.parentNode.removeChild(element);\n\t};\n\n\tDOMRenderer.createElements = function createElements(items) {\n\t\tvar elements = (0, _utils.$)(items.reduce(function (acc, v, i) {\n\t\t\tacc.push(v.content.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, \"\"));\n\t\t\treturn acc;\n\t\t}, []).join(\"\"), _consts.MULTI);\n\n\t\treturn items.map(function (item, index) {\n\t\t\titem.el = elements[index];\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tfunction DOMRenderer(element, options) {\n\t\t_classCallCheck(this, DOMRenderer);\n\n\t\t_extends(this.options = {\n\t\t\tisOverflowScroll: false,\n\t\t\tisEqualSize: false,\n\t\t\tisVertical: true\n\t\t}, options);\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis._init(element);\n\t\tthis.resize();\n\t}\n\n\tDOMRenderer.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\tcssText: this.container.style.cssText,\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_size: _extends({}, this._size)\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.setStatus = function setStatus(status, items) {\n\t\tthis.container.style.cssText = status.cssText;\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._size, status._size);\n\n\t\tDOMRenderer.renderItems(items);\n\t\tthis._insert(items, _consts.APPEND);\n\t};\n\n\tDOMRenderer.prototype.updateSize = function updateSize(items) {\n\t\tvar _this = this;\n\n\t\treturn items.map(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tif (_this.options.isEqualSize) {\n\t\t\t\t\t_this._size.item = _this._size.item || {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t\titem.size = _extends({}, _this._size.item);\n\t\t\t\t} else {\n\t\t\t\t\titem.size = {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (!item.orgSize) {\n\t\t\t\t\titem.orgSize = _extends({}, item.size);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tDOMRenderer.prototype._init = function _init(el) {\n\t\tvar element = (0, _utils.$)(el);\n\t\tvar style = (0, _utils.getStyles)(element);\n\n\t\tthis._orgStyle = {};\n\n\t\tif (style.position === \"static\") {\n\t\t\tthis._orgStyle.position = element.style.position;\n\t\t\telement.style.position = \"relative\";\n\t\t}\n\t\tif (this.options.isOverflowScroll) {\n\t\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\t\tthis._orgStyle.overflowX = element.style.overflowX;\n\t\t\tthis._orgStyle.overflowY = element.style.overflowY;\n\t\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\t\tthis.view = element;\n\t\t\tthis.container = element; // DEFENSE_BROWSER ? this._defense(element) : element;\n\t\t} else {\n\t\t\tthis.view = window;\n\t\t\tthis.container = element;\n\t\t}\n\t};\n\n\tDOMRenderer.prototype._defense = function _defense(element) {\n\t\tvar container = document.createElement(\"div\");\n\n\t\tcontainer.className = _consts.CONTAINER_CLASSNAME;\n\n\t\tvar children = element.children;\n\t\tvar length = children.length; // for IE8\n\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tcontainer.appendChild(children[0]);\n\t\t}\n\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\telement.appendChild(container);\n\t\treturn container;\n\t};\n\n\tDOMRenderer.prototype.append = function append(items) {\n\t\tthis._insert(items, _consts.APPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.prepend = function prepend(items) {\n\t\tthis._insert(items, _consts.PREPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.clear = function clear() {\n\t\tthis.container.innerHTML = \"\";\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\t}\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {\n\t\tvar itemsWithElement = DOMRenderer.createElements(items);\n\n\t\tDOMRenderer.renderItems(itemsWithElement);\n\t\tthis._insert(itemsWithElement, isAppend);\n\t};\n\n\tDOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {\n\t\tvar df = document.createDocumentFragment();\n\n\t\titems.forEach(function (item) {\n\t\t\tstyles && DOMRenderer.renderItem(item, styles);\n\t\t\tisAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);\n\t\t});\n\t\tisAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);\n\t};\n\n\tDOMRenderer.prototype._calcSize = function _calcSize() {\n\t\treturn this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);\n\t};\n\n\tDOMRenderer.prototype.getViewSize = function getViewSize() {\n\t\treturn this._size.view;\n\t};\n\n\tDOMRenderer.prototype.scrollBy = function scrollBy(point) {\n\t\tvar pos = this.options.isVertical ? [0, point] : [point, 0];\n\n\t\t_utils.scrollBy.apply(undefined, [this.view].concat(pos));\n\t};\n\n\tDOMRenderer.prototype.getContainerOffset = function getContainerOffset() {\n\t\treturn this._size.containerOffset;\n\t};\n\n\tDOMRenderer.prototype.getViewportSize = function getViewportSize() {\n\t\tthis.resize();\n\t\treturn this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.setContainerSize = function setContainerSize(size) {\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = size + \"px\";\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.resize = function resize() {\n\t\tif (this.isNeededResize()) {\n\t\t\tvar isVertical = this.options.isVertical;\n\n\t\t\tthis._size = {\n\t\t\t\tcontainerOffset: this.container[\"offset\" + (isVertical ? \"Top\" : \"Left\")],\n\t\t\t\tviewport: this._calcSize(),\n\t\t\t\tview: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),\n\t\t\t\titem: null\n\t\t\t};\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tDOMRenderer.prototype.isNeededResize = function isNeededResize() {\n\t\treturn this._calcSize() !== this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.destroy = function destroy() {\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\tfor (var p in this._orgStyle) {\n\t\t\tthis[this.options.isOverflowScroll ? \"view\" : \"container\"].style[p] = this._orgStyle[p];\n\t\t}\n\t};\n\n\treturn DOMRenderer;\n}();\n\nexports[\"default\"] = DOMRenderer;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DOMRenderer.js\n// module id = 3\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\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\n/*\nFrame\n[\n[1, 1, 1, 1, 1],\n[0, 0, 2, 2, 2],\n[0, 0, 2, 2, 2],\n[3, 4, 5, 5, 5],\n]\n*/\nfunction disableFrame(frame, type, x, y, width, height) {\n\tfor (var i = y; i < y + height; ++i) {\n\t\tfor (var j = x; j < x + width; ++j) {\n\t\t\tif (type !== frame[i][j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tframe[i][j] = 0;\n\t\t}\n\t}\n}\nfunction searchShapeInFrame(frame, type, top, left, width, height) {\n\tvar size = {\n\t\tleft: left,\n\t\ttop: top,\n\t\ttype: type,\n\t\twidth: 1,\n\t\theight: 1\n\t};\n\n\tfor (var i = left; i < width; ++i) {\n\t\tif (frame[top][i] === type) {\n\t\t\tsize.width = i - left + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (var _i = top; _i < height; ++_i) {\n\t\tif (frame[_i][left] === type) {\n\t\t\tsize.height = _i - top + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\t// After finding the shape, it will not find again.\n\tdisableFrame(frame, type, left, top, size.width, size.height);\n\treturn size;\n}\nfunction getShapes(frame) {\n\tvar height = frame.length;\n\tvar width = height ? frame[0].length : 0;\n\tvar shapes = [];\n\n\tfor (var i = 0; i < height; ++i) {\n\t\tfor (var j = 0; j < width; ++j) {\n\t\t\tvar type = frame[i][j];\n\n\t\t\tif (!type) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Separate shapes with other numbers.\n\t\t\tshapes.push(searchShapeInFrame(frame, type, i, j, width, height));\n\t\t}\n\t}\n\tshapes.sort(function (a, b) {\n\t\treturn a.type < b.type ? -1 : 1;\n\t});\n\treturn {\n\t\tshapes: shapes,\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n/**\n * FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다. \n * @example\n```\n\n```\n **/\n\nvar FrameLayout = function () {\n\tfunction FrameLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, FrameLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\titemSize: 0,\n\t\t\tframe: [],\n\t\t\tframeFill: true\n\t\t}, options);\n\t\tvar frame = this.options.frame.map(function (row) {\n\t\t\treturn row.slice();\n\t\t});\n\t\t// divide frame into shapes.\n\t\tvar shapes = getShapes(frame);\n\n\t\tthis._itemSize = this.options.itemSize || 0;\n\t\tthis._shapes = shapes;\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tFrameLayout.prototype._getItemSize = function _getItemSize() {\n\t\tthis._checkItemSize();\n\n\t\treturn this._itemSize;\n\t};\n\n\tFrameLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tif (this.options.itemSize) {\n\t\t\tthis._itemSize = this.options.itemSize;\n\t\t\treturn;\n\t\t}\n\t\tvar style = this._style;\n\t\tvar size = style.size2;\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / this._shapes[size] - margin;\n\t};\n\n\tFrameLayout.prototype._layout = function _layout(items) {\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar length = items.length;\n\t\tvar style = this._style;\n\t\tvar _options = this.options,\n\t\t margin = _options.margin,\n\t\t frameFill = _options.frameFill;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar itemSize = this._getItemSize();\n\t\tvar isItemObject = (typeof itemSize === \"undefined\" ? \"undefined\" : _typeof(itemSize)) === \"object\";\n\t\tvar itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;\n\t\tvar itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;\n\t\tvar shapesSize = this._shapes[size2Name];\n\t\tvar shapes = this._shapes.shapes;\n\t\tvar shapesLength = shapes.length;\n\t\tvar startOutline = (0, _utils.fill)(shapesSize, -99999);\n\t\tvar endOutline = (0, _utils.fill)(shapesSize, -99999);\n\t\tvar dist = 0;\n\t\tvar end = 0;\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar minPos = -1;\n\t\tvar maxPos = -1;\n\n\t\tif (!shapesLength) {\n\t\t\treturn { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };\n\t\t}\n\t\tfor (var i = 0; i < length; i += shapesLength) {\n\t\t\tfor (var j = 0; j < shapesLength && i + j < length; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = items[i + j];\n\t\t\t\tvar shape = shapes[j];\n\t\t\t\tvar shapePos1 = shape[pos1Name];\n\t\t\t\tvar shapePos2 = shape[pos2Name];\n\t\t\t\tvar shapeSize1 = shape[size1Name];\n\t\t\t\tvar shapeSize2 = shape[size2Name];\n\t\t\t\tvar pos1 = end - dist + shapePos1 * (itemSize1 + margin);\n\t\t\t\tvar pos2 = shapePos2 * (itemSize2 + margin);\n\t\t\t\tvar size1 = shapeSize1 * (itemSize1 + margin) - margin;\n\t\t\t\tvar size2 = shapeSize2 * (itemSize2 + margin) - margin;\n\n\t\t\t\tfor (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {\n\t\t\t\t\tif (startOutline[k] === -99999) {\n\t\t\t\t\t\tstartOutline[k] = pos1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startIndex === -1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (minPos > pos1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxPos < pos1 + size1 + margin) {\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tstartOutline[k] = Math.min(startOutline[k], pos1);\n\t\t\t\t\tendOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);\n\t\t\t\t}\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\tend = Math.max.apply(Math, endOutline);\n\t\t\t// check dist once\n\t\t\tif (i !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// find & fill empty block\n\t\t\tif (!frameFill) {\n\t\t\t\tdist = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdist = end;\n\n\t\t\tfor (var _j = 0; _j < shapesSize; ++_j) {\n\t\t\t\tif (startOutline[_j] === -99999) {\n\t\t\t\t\tstartOutline[_j] = Math.max.apply(Math, startOutline);\n\t\t\t\t\tendOutline[_j] = startOutline[_j];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// the dist between frame's end outline and next frame's start outline\n\t\t\t\t// expect that next frame's start outline is startOutline[j] + end\n\t\t\t\tdist = Math.min(startOutline[_j] + end - endOutline[_j], dist);\n\t\t\t}\n\t\t}\n\t\t// The target outline is start outline when type is APPENDING\n\t\tvar targetOutline = isAppend ? startOutline : endOutline;\n\t\tvar prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? \"max\" : \"min\"].apply(Math, outline);\n\t\tvar prevOutlineDist = isAppend ? 0 : end;\n\n\t\tif (frameFill && outline.length === shapesSize) {\n\t\t\tprevOutlineDist = 99999999;\n\t\t\tfor (var _i2 = 0; _i2 < shapesSize; ++_i2) {\n\t\t\t\tif (startOutline[_i2] === endOutline[_i2]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// if appending type is PREPEND, subtract dist from appending group's height.\n\n\t\t\t\tprevOutlineDist = Math.min(targetOutline[_i2] + prevOutlineEnd - outline[_i2], prevOutlineDist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i3 = 0; _i3 < shapesSize; ++_i3) {\n\t\t\tstartOutline[_i3] += prevOutlineEnd - prevOutlineDist;\n\t\t\tendOutline[_i3] += prevOutlineEnd - prevOutlineDist;\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\titem.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;\n\t\t});\n\t\treturn {\n\t\t\tstart: startOutline,\n\t\t\tend: endOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tFrameLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tFrameLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.FrameLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tFrameLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\n\treturn FrameLayout;\n}();\n\nexports[\"default\"] = FrameLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/FrameLayout.js\n// module id = 4\n// module chunks = 0 1","\"use strict\";\n\nvar _InfiniteGrid = require(\"./InfiniteGrid\");\n\nvar _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);\n\nvar _GridLayout = require(\"./layouts/GridLayout\");\n\nvar _GridLayout2 = _interopRequireDefault(_GridLayout);\n\nvar _FrameLayout = require(\"./layouts/FrameLayout\");\n\nvar _FrameLayout2 = _interopRequireDefault(_FrameLayout);\n\nvar _SquareLayout = require(\"./layouts/SquareLayout\");\n\nvar _SquareLayout2 = _interopRequireDefault(_SquareLayout);\n\nvar _PackingLayout = require(\"./layouts/PackingLayout\");\n\nvar _PackingLayout2 = _interopRequireDefault(_PackingLayout);\n\nvar _JustifiedLayout = require(\"./layouts/JustifiedLayout\");\n\nvar _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Copyright (c) NAVER Corp.\n * egjs-infinitegrid projects are licensed under the MIT license\n */\n_InfiniteGrid2[\"default\"].GridLayout = _GridLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].FrameLayout = _FrameLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].SquareLayout = _SquareLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].PackingLayout = _PackingLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].JustifiedLayout = _JustifiedLayout2[\"default\"];\n\nmodule.exports = _InfiniteGrid2[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 5\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 * Copyright (c) 2017 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n\nvar _component = require(\"@egjs/component\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _ItemManager = require(\"./ItemManager\");\n\nvar _ItemManager2 = _interopRequireDefault(_ItemManager);\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _ImageLoaded = require(\"./ImageLoaded\");\n\nvar _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);\n\nvar _Watcher = require(\"./Watcher\");\n\nvar _Watcher2 = _interopRequireDefault(_Watcher);\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// IE8\n// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create\n/* eslint-disable */\nif (typeof Object.create !== \"function\") {\n\tObject.create = function (o, properties) {\n\t\tif ((typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) !== \"object\" && typeof o !== \"function\") {\n\t\t\tthrow new TypeError(\"Object prototype may only be an Object: \" + o);\n\t\t} else if (o === null) {\n\t\t\tthrow new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n\t\t}\n\t\tfunction F() {}\n\t\tF.prototype = o;\n\t\treturn new F();\n\t};\n}\n/* eslint-enable */\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다\n * @alias eg.InfiniteGrid\n * @extends eg.Component\n *\n * @example\n```\n
    \n\t
  • \n\t\t
    test1
    \n\t
  • \n\t
  • \n\t\t
    test2
    \n\t
  • \n\t
  • \n\t\t
    test3
    \n\t
  • \n\t
  • \n\t\t
    test4
    \n\t
  • \n\t
  • \n\t\t
    test5
    \n\t
  • \n\t
  • \n\t\t
    test6
    \n\t
  • \n
\n\n```\n *\n * @support {\"ie\": \"8+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n **/\n\nvar InfiniteGrid = function (_Component) {\n\t_inherits(InfiniteGrid, _Component);\n\n\t/**\n * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트\n * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체\n * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)\n * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.\n * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to \"true\", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다\n * @param {Number} [options.threshold=300] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.\n * @param {String|Object} [options.loadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector \n *\n */\n\tfunction InfiniteGrid(element, options) {\n\t\t_classCallCheck(this, InfiniteGrid);\n\n\t\tvar _this = _possibleConstructorReturn(this, _Component.call(this));\n\n\t\t_extends(_this.options = {\n\t\t\titemSelector: \"*\",\n\t\t\tisOverflowScroll: false,\n\t\t\tthreshold: 300,\n\t\t\tisEqualSize: false,\n\t\t\tuseRecycle: true,\n\t\t\thorizontal: false,\n\t\t\tloadingBar: {}\n\t\t}, options);\n\t\t_consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);\n\t\t_this._isVertical = !_this.options.horizontal;\n\t\t_this._reset();\n\t\t_this._items = new _ItemManager2[\"default\"]();\n\t\t_this._renderer = new _DOMRenderer2[\"default\"](element, {\n\t\t\tisOverflowScroll: _this.options.isOverflowScroll,\n\t\t\tisEqualSize: _this.options.isEqualSize,\n\t\t\tisVertical: _this._isVertical\n\t\t});\n\t\t_this._watcher = new _Watcher2[\"default\"](_this._renderer, {\n\t\t\tlayout: function layout() {\n\t\t\t\treturn _this.layout();\n\t\t\t},\n\t\t\tcheck: function check(param) {\n\t\t\t\treturn _this._onCheck(param);\n\t\t\t}\n\t\t});\n\t\t_this._initLoadingBar();\n\t\treturn _this;\n\t}\n\t/**\n * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.append(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.append([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.append([HTMLElement1, HTMLElement2]);\n * infinitegrid.append(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.append = function append(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.APPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.prepend(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.prepend([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.prepend([HTMLElement1, HTMLElement2]);\n * infinitegrid.prepend(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.PREPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Layout class to use.\n * @ko 사용할 Layout 클래스를 지정한다.\n * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스\n * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {\n * margin: 10,\n * align: \"start\"\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {\n * margin: 10,\n * minSize: 100,\n * maxSize: 200\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {\n * margin: 10,\n * column: 2\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {\n * margin: 10,\n * frame: [\n * [1, 2],\n * [4, 3],\n * ]\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {\n * margin: 10,\n * aspectRatio: 1.5\n * });\n */\n\n\n\tInfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {\n\t\tthis._layout = new LayoutKlass(_extends(options || {}, {\n\t\t\thorizontal: !this._isVertical\n\t\t}));\n\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\treturn this;\n\t};\n\t/**\n * Returns the layouted items.\n * @ko 레이아웃된 아이템들을 반환한다.\n * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.\n * @returns {Array} List of items 아이템의 목록\n */\n\n\n\tInfiniteGrid.prototype.getItems = function getItems() {\n\t\tvar includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\treturn this[includeCached ? \"_getItems\" : \"_getVisibleItems\"]();\n\t};\n\n\tInfiniteGrid.prototype._getItems = function _getItems() {\n\t\treturn this._items.pluck(\"items\", 0, this._items.size());\n\t};\n\n\tInfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {\n\t\treturn this._items.pluck(\"items\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._updateEdge = function _updateEdge() {\n\t\tthis._status.start = this._items.getEdge(\"start\", this._status.startCursor, this._status.endCursor);\n\t\tthis._status.end = this._items.getEdge(\"end\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {\n\t\tvar rect = null;\n\n\t\tif (!this._status[cursor]) {\n\t\t\tvar item = this._items.getEdge(cursor);\n\n\t\t\tthis._status[cursor] = item;\n\t\t}\n\n\t\tif (this._status[cursor]) {\n\t\t\trect = this._status[cursor].rect;\n\t\t\tif (cursor === \"start\") {\n\t\t\t\trect.bottom = rect.top + this._status[cursor].size.height;\n\t\t\t\trect.right = rect.left + this._status[cursor].size.width;\n\t\t\t}\n\t\t}\n\t\treturn rect;\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._fit = function _fit() {\n\t\tvar scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"after\";\n\n\t\t// for caching\n\t\tif (!this.options.useRecycle) {\n\t\t\tthis._fit = function () {\n\t\t\t\treturn 0;\n\t\t\t};\n\t\t\treturn 0;\n\t\t}\n\t\tif (this._layout) {\n\t\t\tvar base = this._getEdgeValue(\"start\");\n\t\t\tvar margin = this._status.loadingSize;\n\n\t\t\tif (base !== 0 || margin) {\n\t\t\t\tif (!this._isLoading()) {\n\t\t\t\t\tthis._process(_consts.PROCESSING);\n\t\t\t\t}\n\t\t\t\tif (scrollCycle === \"before\") {\n\t\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\t}\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t\tif (scrollCycle === \"after\") {\n\t\t\t\t\tthis._renderer.scrollBy(Math.abs(base) + margin);\n\t\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\t}\n\t\t\t\tif (!this._isLoading()) {\n\t\t\t\t\tthis._process(_consts.PROCESSING, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn base;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {\n\t\treturn this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);\n\t};\n\t/**\n * Rearranges a layout.\n * @ko 레이아웃을 다시 배치한다.\n * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.layout = function layout() {\n\t\tvar _this2 = this;\n\n\t\tvar isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n\t\tif (!this._layout || this._isProcessing()) {\n\t\t\treturn this;\n\t\t}\n\t\t// check childElement\n\t\tif (!this._items.size()) {\n\t\t\tthis._insert((0, _utils.toArray)(this._renderer.container.children), true);\n\t\t\treturn this;\n\t\t} else {\n\t\t\tthis._process(_consts.PROCESSING);\n\n\t\t\tvar data = void 0;\n\t\t\tvar outline = void 0;\n\n\t\t\tif (isRelayout) {\n\t\t\t\t// remove cache\n\t\t\t\tdata = this._items.get(this._status.startCursor, this._status.endCursor);\n\t\t\t\tif (this._renderer.resize()) {\n\t\t\t\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\t\tdata.items = _this2._renderer.updateSize(v.items);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdata = this._items.get(this._status.startCursor, this._items.size());\n\t\t\t\toutline = this._items.getOutline(this._status.startCursor, \"start\");\n\t\t\t}\n\t\t\tif (!data.length) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthis._layout.layout(data, outline);\n\n\t\t\tif (isRelayout) {\n\t\t\t\tthis._items.set(data);\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t\tthis._status.endCursor = data.length - 1;\n\t\t\t} else {\n\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\treturn _this2._items.set(v, v.groupKey);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tisRelayout && this._watcher.setScrollPos();\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Removes a item element on a grid layout.\n * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.\n * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트\n * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보\n */\n\n\n\tInfiniteGrid.prototype.remove = function remove(element) {\n\t\tif (element) {\n\t\t\tvar items = this._items.remove(element, this._status.startCursor, this._status.endCursor);\n\n\t\t\tif (items) {\n\t\t\t\t_DOMRenderer2[\"default\"].removeElement(element);\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tInfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {\n\t\tvar items = [];\n\t\tvar size = this._items.size();\n\n\t\t// from cache\n\t\tif (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {\n\t\t\tif (isAppend && size > this._status.endCursor + 1) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.endCursor + 1);\n\t\t\t} else if (!isAppend && this._status.startCursor > 0) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.startCursor - 1);\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t};\n\t/**\n * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.\n * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.\n * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.\n * @return {Array} List of group keys 그룹 키의 목록\n */\n\n\n\tInfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {\n\t\tvar data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);\n\n\t\treturn data.map(function (v) {\n\t\t\treturn v.groupKey;\n\t\t});\n\t};\n\t/**\n * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.\n * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다\n * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체\n */\n\n\n\tInfiniteGrid.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_status: _extends({}, this._status),\n\t\t\t_items: this._items.getStatus(),\n\t\t\t_renderer: this._renderer.getStatus(),\n\t\t\t_watcher: this._watcher.getStatus()\n\t\t};\n\t};\n\t/**\n * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.\n * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.\n * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체\n * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._watcher.detachEvent();\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._status, status._status);\n\t\tthis._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);\n\t\tthis._renderer.setStatus(status._renderer, this._getVisibleItems());\n\t\tthis._watcher.setStatus(status._watcher, applyScrollPos);\n\t\tthis._updateEdge();\n\t\tthis._watcher.attachEvent();\n\t\treturn this;\n\t};\n\t/**\n * Clears added card elements and data.\n * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.clear = function clear() {\n\t\tthis._items.clear();\n\t\tthis._renderer.clear();\n\t\tthis._reset();\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._initLoadingBar = function _initLoadingBar() {\n\t\tvar loadingBar = this.options.loadingBar;\n\t\tvar loadingBarObj = (typeof loadingBar === \"undefined\" ? \"undefined\" : _typeof(loadingBar)) === \"object\" ? loadingBar : {\n\t\t\t\"append\": loadingBar,\n\t\t\t\"prepend\": loadingBar\n\t\t};\n\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tthis._loadingBar = loadingBarObj;\n\t\tfor (var type in loadingBarObj) {\n\t\t\tloadingBarObj[type] = (0, _utils.$)(loadingBarObj[type]);\n\t\t}\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {\n\t\tvar loadingBar = this._loadingBar;\n\t\tvar container = this._renderer.container;\n\n\t\tfor (var type in loadingBar) {\n\t\t\tcontainer.appendChild(loadingBar[type]);\n\t\t}\n\t};\n\t/**\n * Checks whether a card element or data is being added.\n * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다\n * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부\n */\n\n\n\tInfiniteGrid.prototype.isProcessing = function isProcessing() {\n\t\treturn this._isProcessing() || this._isLoading();\n\t};\n\n\tInfiniteGrid.prototype._isProcessing = function _isProcessing() {\n\t\treturn (this._status.procesingStatus & _consts.PROCESSING) > 0;\n\t};\n\n\tInfiniteGrid.prototype._isLoading = function _isLoading() {\n\t\treturn this._getLoadingStatus() > 0;\n\t};\n\n\tInfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {\n\t\treturn this._status.procesingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);\n\t};\n\n\tInfiniteGrid.prototype._process = function _process(status) {\n\t\tvar isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (isAdd) {\n\t\t\tthis._status.procesingStatus |= status;\n\t\t} else {\n\t\t\tthis._status.procesingStatus -= this._status.procesingStatus & status;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {\n\t\tif (this._isProcessing() || elements.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\t\tvar key = typeof groupKey === \"undefined\" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;\n\t\tvar items = _ItemManager2[\"default\"].from((0, _utils.$)(elements, true), this.options.itemSelector, {\n\t\t\tisAppend: isAppend,\n\t\t\tgroupKey: key\n\t\t});\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);\n\t};\n\t// add items, and remove items for recycling\n\n\n\tInfiniteGrid.prototype._recycle = function _recycle(isAppend) {\n\t\tvar remove = [];\n\n\t\tif (this._status.startCursor !== this._status.endCursor) {\n\t\t\tfor (var i = this._status.startCursor; i <= this._status.endCursor; i++) {\n\t\t\t\tremove.push(this._isVisible(i));\n\t\t\t}\n\t\t}\n\t\tvar start = remove.indexOf(isAppend ? 1 : -1);\n\t\tvar end = remove.lastIndexOf(isAppend ? 1 : -1);\n\n\t\tif (start !== -1 && end !== -1) {\n\t\t\tstart = this._status.startCursor + start;\n\t\t\tend = start + end;\n\t\t\t_DOMRenderer2[\"default\"].removeItems(this._items.pluck(\"items\", start, end));\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.startCursor = end + 1;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor = start - 1;\n\t\t\t}\n\t\t}\n\t};\n\t/**\n * Returns the element of loading bar.\n * @ko 로딩 바의 element를 반환한다.\n * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @return {Element} The element of loading bar. 로딩 바의 element\n */\n\n\n\tInfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {\n\t\tvar isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;\n\n\t\treturn this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\t};\n\t/**\n * Start loading for append/prepend during loading data.\n * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.\n * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @param {Object} [userStyle = {display: \"block\"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.startLoading = function startLoading(isAppend) {\n\t\tvar userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: \"block\" };\n\n\t\tif (this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\n\t\tthis._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);\n\t\tif (!this._loadingBar[type]) {\n\t\t\treturn this;\n\t\t}\n\t\tvar pos = isAppend ? this._getEdgeValue(\"end\") : 0;\n\n\t\tthis._renderLoading(isAppend, pos, userStyle);\n\t\tthis._status.loadingStyle = userStyle;\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t} else {\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") + this._status.loadingSize);\n\t\t}\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._renderLoading = function _renderLoading(isAppend, pos) {\n\t\tvar _extends2;\n\n\t\tvar userStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._status.loadingStyle;\n\n\t\tvar el = this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\t\tvar style = _extends((_extends2 = {\n\t\t\tposition: \"absolute\"\n\t\t}, _extends2[this._isVertical ? \"top\" : \"left\"] = pos + \"px\", _extends2), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tthis._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);\n\t};\n\t/**\n * End loading after startLoading() for append/prepend\n * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.\n * @param {Object} [userStyle = {display: \"none\"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.endLoading = function endLoading() {\n\t\tvar _extends3;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: \"none\" };\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\t\tvar el = this._loadingBar[type];\n\t\tvar size = this._loadingSize;\n\n\t\tthis._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tif (!el) {\n\t\t\treturn this;\n\t\t}\n\t\tvar style = _extends((_extends3 = {}, _extends3[this._isVertical ? \"top\" : \"left\"] = -size + \"px\", _extends3), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t}\n\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {\n\t\tvar _this3 = this;\n\n\t\tif (fromCache) {\n\t\t\tthis._renderer.createAndInsert(items, isAppend);\n\t\t\tthis._updateCursor(isAppend);\n\t\t\tthis.options.useRecycle && this._recycle(isAppend);\n\t\t\tthis._onLayoutComplete(items, isAppend, isTrusted);\n\t\t} else {\n\t\t\tvar method = isAppend ? \"append\" : \"prepend\";\n\n\t\t\tthis._renderer[method](items);\n\t\t\t// check image sizes after elements are attated on DOM\n\t\t\t_ImageLoaded2[\"default\"].check(items.map(function (item) {\n\t\t\t\treturn item.el;\n\t\t\t}), function () {\n\t\t\t\tvar layouted = _this3._layout[method](_this3._renderer.updateSize(items), _this3._items.getOutline(isAppend ? _this3._status.endCursor : _this3._status.startCursor, isAppend ? \"end\" : \"start\"));\n\n\t\t\t\t_this3._insertItems(layouted, isAppend);\n\t\t\t\t_this3._updateCursor(isAppend);\n\t\t\t\t_this3.options.useRecycle && _this3._recycle(isAppend);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(layouted.items);\n\t\t\t\t_this3._onLayoutComplete(layouted.items, isAppend, isTrusted);\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._isVisible = function _isVisible(index) {\n\t\tvar min = Math.min.apply(Math, this._items.getOutline(index, \"start\"));\n\t\tvar max = Math.max.apply(Math, this._items.getOutline(index, \"end\"));\n\t\tvar pos = this._watcher.getScrollPos();\n\t\tvar viewSize = this._renderer.getViewSize();\n\n\t\tif (pos + viewSize + this.options.threshold < min) {\n\t\t\treturn -1;\n\t\t} else if (pos - this.options.threshold > max) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t};\n\n\tInfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {\n\t\tif (this.options.useRecycle) {\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.endCursor++;\n\t\t\t} else if (this._status.startCursor > 0) {\n\t\t\t\tthis._status.startCursor--;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor++; // outside prepend\n\t\t\t}\n\t\t\tif (this._status.startCursor < 0) {\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._status.startCursor = 0;\n\t\t\tthis._status.endCursor = this._items.size() - 1;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {\n\t\tlayouted.groupKey = layouted.items[0].groupKey;\n\t\tthis._items[isAppend ? \"append\" : \"prepend\"](layouted);\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestAppend = function _requestAppend() {\n\t\tvar items = this._getNextItems(_consts.APPEND);\n\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.\n * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다\n * @event eg.InfiniteGrid#append\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"append\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().pop()\n\t\t\t});\n\t\t}\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestPrepend = function _requestPrepend() {\n\t\tvar items = this._getNextItems(_consts.PREPEND);\n\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.\n * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.\n * @event eg.InfiniteGrid#prepend\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"prepend\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().shift()\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onCheck = function _onCheck(_ref) {\n\t\tvar isForward = _ref.isForward,\n\t\t scrollPos = _ref.scrollPos,\n\t\t horizontal = _ref.horizontal,\n\t\t orgScrollPos = _ref.orgScrollPos;\n\n\t\t/**\n * This event is fired when the user scrolls.\n * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.\n * @event eg.InfiniteGrid#change\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n */\n\t\tthis.trigger(\"change\", {\n\t\t\tisForward: isForward,\n\t\t\thorizontal: horizontal,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos\n\t\t});\n\t\tif (this.isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tvar rect = this._getEdgeOffset(isForward ? \"end\" : \"start\");\n\n\t\tif (!rect) {\n\t\t\treturn;\n\t\t}\n\t\tvar targetPos = isForward ? rect[horizontal ? \"left\" : \"top\"] - this._renderer.getViewSize() : rect[horizontal ? \"right\" : \"bottom\"];\n\n\t\tif (isForward) {\n\t\t\tif (scrollPos >= targetPos) {\n\t\t\t\tthis._requestAppend();\n\t\t\t}\n\t\t} else if (scrollPos <= targetPos) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {\n\t\tvar isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\t\tthis._updateEdge();\n\t\tvar size = this._getEdgeValue(\"end\");\n\n\t\tthis._renderer.setContainerSize(size + this._status.loadingSize);\n\t\tif (isAppend) {\n\t\t\tthis._isLoading() && this._renderLoading(true, size);\n\t\t} else {\n\t\t\tthis._fit(\"after\");\n\t\t}\n\t\tthis._process(_consts.PROCESSING, false);\n\t\t/**\n * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.\n * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다\n * @event eg.InfiniteGrid#layoutComplete\n *\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들\n * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\tthis.trigger(\"layoutComplete\", {\n\t\t\ttarget: items.concat(),\n\t\t\tisAppend: isAppend,\n\t\t\tisTrusted: isTrusted,\n\t\t\tscrollPos: this._watcher.getScrollPos(),\n\t\t\torgScrollPos: this._watcher.getOrgScrollPos(),\n\t\t\tsize: size\n\t\t});\n\t\tthis._watcher.reset();\n\t\t// console.warn(\"_onLayoutComplete [\", this._status.startCursor, this._status.endCursor, \"]\");\n\t};\n\n\tInfiniteGrid.prototype._reset = function _reset() {\n\t\tthis._status = {\n\t\t\tprocesingStatus: 0,\n\t\t\tstartCursor: -1,\n\t\t\tendCursor: -1,\n\t\t\tstart: null,\n\t\t\tend: null\n\t\t};\n\t};\n\t/**\n * Destroys elements, properties, and events used on a grid layout.\n * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다\n */\n\n\n\tInfiniteGrid.prototype.destroy = function destroy() {\n\t\tthis.off();\n\t\tthis._watcher.destroy();\n\t\tthis._reset();\n\t\tthis._items.clear();\n\t\tthis._renderer.destroy();\n\t};\n\n\treturn InfiniteGrid;\n}(_component2[\"default\"]);\n\nInfiniteGrid.VERSION = \"3.0.0-rc\";\n\nexports[\"default\"] = InfiniteGrid;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/InfiniteGrid.js\n// module id = 6\n// module chunks = 0 1","/*!\n * Copyright (c) 2017 NAVER Corp.\r\n * @egjs/component project is licensed under the MIT license\r\n * \r\n * @egjs/component JavaScript library\r\n * http://naver.github.io/egjs/component\r\n * \r\n * @version 2.1.0\n */\n(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[\"Component\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"Component\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _Component = __webpack_require__(1);\n\nvar _Component2 = _interopRequireDefault(_Component);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n_Component2[\"default\"].VERSION = \"2.1.0\";\nmodule.exports = _Component2[\"default\"];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n/**\n * A class used to manage events and options in a component\n * @ko 컴포넌트의 이벤트와 옵션을 관리할 수 있게 하는 클래스\n * @alias eg.Component\n */\nvar Component = function () {\n\t/**\n * @support {\"ie\": \"7+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n */\n\tfunction Component() {\n\t\t_classCallCheck(this, Component);\n\n\t\tthis._eventHandler = {};\n\t\tthis.options = {};\n\t}\n\t/**\n * Triggers a custom event.\n * @ko 커스텀 이벤트를 발생시킨다\n * @param {String} eventName The name of the custom event to be triggered 발생할 커스텀 이벤트의 이름\n * @param {Object} customEvent Event data to be sent when triggering a custom event 커스텀 이벤트가 발생할 때 전달할 데이터\n * @return {Boolean} Indicates whether the event has occurred. If the stop() method is called by a custom event handler, it will return false and prevent the event from occurring. Ref 이벤트 발생 여부. 커스텀 이벤트 핸들러에서 stop() 메서드를 호출하면 'false'를 반환하고 이벤트 발생을 중단한다. 참고\n * @example\n class Some extends eg.Component {\n some(){\n \tif(this.trigger(\"beforeHi\")){ // When event call to stop return false.\n \tthis.trigger(\"hi\");// fire hi event.\n \t}\n }\n }\n const some = new Some();\n some.on(\"beforeHi\", (e) => {\n if(condition){\n \te.stop(); // When event call to stop, `hi` event not call.\n }\n });\n some.on(\"hi\", (e) => {\n // `currentTarget` is component instance.\n console.log(some === e.currentTarget); // true\n });\n // If you want to more know event design. You can see article.\n // https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F\n */\n\n\n\tComponent.prototype.trigger = function trigger(eventName) {\n\t\tvar customEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tvar handlerList = this._eventHandler[eventName] || [];\n\t\tvar hasHandlerList = handlerList.length > 0;\n\n\t\tif (!hasHandlerList) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If detach method call in handler in first time then handeler list calls.\n\t\thandlerList = handlerList.concat();\n\n\t\tcustomEvent.eventType = eventName;\n\n\t\tvar isCanceled = false;\n\t\tvar arg = [customEvent];\n\t\tvar i = 0;\n\n\t\tcustomEvent.stop = function () {\n\t\t\tisCanceled = true;\n\t\t};\n\t\tcustomEvent.currentTarget = this;\n\n\t\tfor (var _len = arguments.length, restParam = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t\t\trestParam[_key - 2] = arguments[_key];\n\t\t}\n\n\t\tif (restParam.length >= 1) {\n\t\t\targ = arg.concat(restParam);\n\t\t}\n\n\t\tfor (i = 0; handlerList[i]; i++) {\n\t\t\thandlerList[i].apply(this, arg);\n\t\t}\n\n\t\treturn !isCanceled;\n\t};\n\t/**\n * Executed event just one time.\n * @ko 이벤트가 한번만 실행된다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n alert(\"hi\");\n }\n thing() {\n this.once(\"hi\", this.hi);\n }\n }\n var some = new Some();\n some.thing();\n some.trigger(\"hi\");\n // fire alert(\"hi\");\n some.trigger(\"hi\");\n // Nothing happens\n */\n\n\n\tComponent.prototype.once = function once(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar i = void 0;\n\n\t\t\tfor (i in eventHash) {\n\t\t\t\tthis.once(i, eventHash[i]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar self = this;\n\n\t\t\tthis.on(eventName, function listener() {\n\t\t\t\tfor (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\t\t\targ[_key2] = arguments[_key2];\n\t\t\t\t}\n\n\t\t\t\thandlerToAttach.apply(self, arg);\n\t\t\t\tself.off(eventName, listener);\n\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n * Checks whether an event has been attached to a component.\n * @ko 컴포넌트에 이벤트가 등록됐는지 확인한다.\n * @param {String} eventName The name of the event to be attached 등록 여부를 확인할 이벤트의 이름\n * @return {Boolean} Indicates whether the event is attached. 이벤트 등록 여부\n * @example\n class Some extends eg.Component {\n some() {\n this.hasOn(\"hi\");// check hi event.\n }\n }\n */\n\n\n\tComponent.prototype.hasOn = function hasOn(eventName) {\n\t\treturn !!this._eventHandler[eventName];\n\t};\n\n\t/**\n * Attaches an event to a component.\n * @ko 컴포넌트에 이벤트를 등록한다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.on(\"hi\",this.hi); //attach event\n }\n }\n */\n\n\n\tComponent.prototype.on = function on(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar name = void 0;\n\n\t\t\tfor (name in eventHash) {\n\t\t\t\tthis.on(name, eventHash[name]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\t\tif (typeof handlerList === \"undefined\") {\n\t\t\t\tthis._eventHandler[eventName] = [];\n\t\t\t\thandlerList = this._eventHandler[eventName];\n\t\t\t}\n\n\t\t\thandlerList.push(handlerToAttach);\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Detaches an event from the component.\n * @ko 컴포넌트에 등록된 이벤트를 해제한다\n * @param {eventName} eventName The name of the event to be detached 해제할 이벤트의 이름\n * @param {Function} handlerToDetach The handler function of the event to be detached 해제할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself 컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.off(\"hi\",this.hi); //detach event\n }\n }\n */\n\n\n\tComponent.prototype.off = function off(eventName, handlerToDetach) {\n\t\t// All event detach.\n\t\tif (typeof eventName === \"undefined\") {\n\t\t\tthis._eventHandler = {};\n\t\t\treturn this;\n\t\t}\n\n\t\t// All handler of specific event detach.\n\t\tif (typeof handlerToDetach === \"undefined\") {\n\t\t\tif (typeof eventName === \"string\") {\n\t\t\t\tthis._eventHandler[eventName] = undefined;\n\t\t\t\treturn this;\n\t\t\t} else {\n\t\t\t\tvar eventHash = eventName;\n\t\t\t\tvar name = void 0;\n\n\t\t\t\tfor (name in eventHash) {\n\t\t\t\t\tthis.off(name, eventHash[name]);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\t// The handler of specific event detach.\n\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\tif (handlerList) {\n\t\t\tvar k = void 0;\n\t\t\tvar handlerFunction = void 0;\n\n\t\t\tfor (k = 0; (handlerFunction = handlerList[k]) !== undefined; k++) {\n\t\t\t\tif (handlerFunction === handlerToDetach) {\n\t\t\t\t\thandlerList = handlerList.splice(k, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\treturn Component;\n}();\n\nexports[\"default\"] = Component;\nmodule.exports = exports[\"default\"];\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=component.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@egjs/component/dist/component.js\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _consts = require(\"./consts\");\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ItemManager = function () {\n\tItemManager.from = function from(elements, selector, _ref) {\n\t\tvar groupKey = _ref.groupKey,\n\t\t isAppend = _ref.isAppend;\n\n\t\tvar filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);\n\n\t\t// Item Structure\n\t\treturn (0, _utils.toArray)(filted).map(function (el) {\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tgroupKey: groupKey,\n\t\t\t\tcontent: el.outerHTML\n\t\t\t};\n\t\t});\n\t};\n\n\tItemManager.selectItems = function selectItems(elements, selector) {\n\t\treturn elements.filter(function (v) {\n\t\t\tif (selector === \"*\") {\n\t\t\t\treturn v;\n\t\t\t} else {\n\t\t\t\treturn v.className.split(\" \").some(function (c) {\n\t\t\t\t\treturn c === selector;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tItemManager.pluck = function pluck(data, property) {\n\t\treturn data.reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[property]);\n\t\t}, []);\n\t};\n\n\tfunction ItemManager() {\n\t\t_classCallCheck(this, ItemManager);\n\n\t\tthis.clear();\n\t}\n\n\tItemManager.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_data: this._data.map(function (data) {\n\t\t\t\tdata.items = data.items.map(function (item) {\n\t\t\t\t\tdelete item.el;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\treturn data;\n\t\t\t})\n\t\t};\n\t};\n\n\tItemManager.prototype.setStatus = function setStatus(status, start, end) {\n\t\tvar data = status._data;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tdata[i].items = _DOMRenderer2[\"default\"].createElements(data[i].items);\n\t\t}\n\t\tthis.set(data);\n\t};\n\n\tItemManager.prototype.size = function size() {\n\t\treturn this._data.length;\n\t};\n\n\tItemManager.prototype.fit = function fit(base, isVertical) {\n\t\tif (!this._data.length) {\n\t\t\treturn;\n\t\t}\n\t\tvar property = isVertical ? \"top\" : \"left\";\n\n\t\tif (base !== 0) {\n\t\t\tthis._data = this._data.map(function (v) {\n\t\t\t\tv.items = v.items.map(function (item) {\n\t\t\t\t\titem.rect[property] -= base;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\tv.outlines.start = v.outlines.start.map(function (start) {\n\t\t\t\t\treturn start - base;\n\t\t\t\t});\n\t\t\t\tv.outlines.end = v.outlines.end.map(function (end) {\n\t\t\t\t\treturn end - base;\n\t\t\t\t});\n\t\t\t\treturn v;\n\t\t\t});\n\t\t}\n\t};\n\n\tItemManager.prototype.pluck = function pluck(property, start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, end + 1), property);\n\t\t\t} else {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, start + 1), property);\n\t\t\t}\n\t\t} else {\n\t\t\treturn ItemManager.pluck(this._data, property);\n\t\t}\n\t};\n\n\tItemManager.prototype.getOutline = function getOutline(index, property) {\n\t\tif (this._data.length) {\n\t\t\treturn this._data[index].outlines[property];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t};\n\n\tItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {\n\t\tvar prop = cursor === \"start\" ? \"min\" : \"max\";\n\t\tvar index = -1;\n\t\tvar targetValue = cursor === \"start\" ? Infinity : -Infinity;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tvar value = Math[prop].apply(Math, this.getOutline(i, cursor));\n\n\t\t\tif (cursor === \"start\" && targetValue > value || cursor === \"end\" && targetValue < value) {\n\t\t\t\ttargetValue = value;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t};\n\n\tItemManager.prototype.getEdge = function getEdge(cursor, start, end) {\n\t\tvar dataIdx = this.getEdgeIndex(cursor, start, end);\n\t\tvar items = this.pluck(\"items\", dataIdx);\n\n\t\tif (items.length) {\n\t\t\tvar itemIdx = this.getOutline(dataIdx, cursor + \"Index\");\n\n\t\t\treturn items.length > itemIdx ? items[itemIdx] : null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {\n\t\tvar outlines = this.pluck(\"outlines\", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[cursor]);\n\t\t}, []);\n\n\t\treturn outlines.length ? Math[cursor === \"start\" ? \"min\" : \"max\"].apply(Math, outlines) : 0;\n\t};\n\n\tItemManager.prototype.append = function append(layouted) {\n\t\tthis._data.push(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.prepend = function prepend(layouted) {\n\t\tthis._data.unshift(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.clear = function clear() {\n\t\tthis._data = [];\n\t};\n\n\tItemManager.prototype.remove = function remove(element, start, end) {\n\t\tvar items = null;\n\t\tvar key = element.getAttribute(_consts.GROUPKEY_ATT);\n\t\tvar data = this.get(start, end).filter(function (v) {\n\t\t\treturn String(v.groupKey) === key;\n\t\t});\n\n\t\tif (!data.length) {\n\t\t\treturn items;\n\t\t}\n\t\tdata = data[0];\n\n\t\tvar len = data.items.length;\n\t\tvar idx = -1;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tif (data.items[i].el === element) {\n\t\t\t\tidx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (~idx) {\n\t\t\t// remove item information\n\t\t\tdata.items.splice(idx, 1);\n\t\t\tthis.set(data, key);\n\t\t\titems = data.items;\n\t\t}\n\t\treturn items;\n\t};\n\n\tItemManager.prototype.get = function get(start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn this._data.slice(start, end + 1);\n\t\t\t} else {\n\t\t\t\treturn this._data.slice(start, start + 1);\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._data.concat();\n\t\t}\n\t};\n\n\tItemManager.prototype.set = function set(data, key) {\n\t\tif (typeof key !== \"undefined\" && !Array.isArray(data)) {\n\t\t\tvar len = this._data.length;\n\t\t\tvar idx = -1;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tif (this._data[i].groupKey === key) {\n\t\t\t\t\tidx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t~idx && (this._data[idx] = data);\n\t\t} else {\n\t\t\tthis._data = data.concat();\n\t\t}\n\t};\n\n\treturn ItemManager;\n}();\n\nexports[\"default\"] = ItemManager;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ItemManager.js\n// module id = 8\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 ImageLoaded = function () {\n\tfunction ImageLoaded() {\n\t\t_classCallCheck(this, ImageLoaded);\n\t}\n\n\tImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {\n\t\tvar checkCount = needCheck.length;\n\t\tvar checkImage = function checkImage() {\n\t\t\tcheckCount--;\n\t\t\tcheckCount <= 0 && callback && callback();\n\t\t};\n\t\tvar onCheck = function onCheck(e) {\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"load\", onCheck);\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"error\", onCheck);\n\t\t\tcheckImage();\n\t\t};\n\n\t\t// workaround for IE\n\t\t_consts.IS_IE && needCheck.forEach(function (v) {\n\t\t\treturn v.setAttribute(\"src\", v.getAttribute(\"src\"));\n\t\t});\n\t\tneedCheck.forEach(function (v) {\n\t\t\tif (v.complete) {\n\t\t\t\tcheckImage();\n\t\t\t} else {\n\t\t\t\t(0, _utils.addEvent)(v, \"load\", onCheck);\n\t\t\t\t(0, _utils.addEvent)(v, \"error\", onCheck);\n\t\t\t}\n\t\t});\n\t};\n\n\tImageLoaded.checkImageLoaded = function checkImageLoaded(el) {\n\t\tif (el.tagName === \"IMG\") {\n\t\t\treturn !el.complete ? [el] : [];\n\t\t} else {\n\t\t\treturn (0, _utils.toArray)(el.querySelectorAll(\"img\")).filter(function (v) {\n\t\t\t\tif (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {\n\t\t\t\t\treturn !v.complete;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tImageLoaded.check = function check(elements, callback) {\n\t\tvar _this = this;\n\n\t\tvar needCheck = elements.reduce(function (acc, v) {\n\t\t\treturn acc.concat(_this.checkImageLoaded(v));\n\t\t}, []);\n\n\t\tif (needCheck.length > 0) {\n\t\t\tImageLoaded.waitImageLoaded(needCheck, callback);\n\t\t} else {\n\t\t\t// convert to async\n\t\t\tsetTimeout(function () {\n\t\t\t\tcallback && callback();\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\treturn ImageLoaded;\n}();\n\nexports[\"default\"] = ImageLoaded;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ImageLoaded.js\n// module id = 9\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 Watcher = function () {\n\tfunction Watcher(renderer, callback) {\n\t\t_classCallCheck(this, Watcher);\n\n\t\t_extends(this._callback = {\n\t\t\tlayout: null,\n\t\t\tcheck: null\n\t\t}, callback);\n\t\tthis._timer = {\n\t\t\tresize: null\n\t\t\t// doubleCheck: null,\n\t\t\t// doubleCheckCount: RETRY,\n\t\t};\n\t\tthis.reset();\n\t\tthis._renderer = renderer;\n\t\tthis._onCheck = this._onCheck.bind(this);\n\t\tthis._onResize = this._onResize.bind(this);\n\t\tthis.attachEvent();\n\t\tthis.setScrollPos();\n\t}\n\n\tWatcher.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_prevPos: this._prevPos,\n\t\t\tscrollPos: this.getOrgScrollPos()\n\t\t};\n\t};\n\n\tWatcher.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tthis._prevPos = status._prevPos;\n\t\tapplyScrollPos && this.scrollTo(status.scrollPos);\n\t};\n\n\tWatcher.prototype.scrollTo = function scrollTo(pos) {\n\t\tvar arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];\n\n\t\t_utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));\n\t};\n\n\tWatcher.prototype.getScrollPos = function getScrollPos() {\n\t\treturn this._prevPos;\n\t};\n\n\tWatcher.prototype.setScrollPos = function setScrollPos(pos) {\n\t\tvar rawPos = pos;\n\n\t\tif (typeof pos === \"undefined\") {\n\t\t\trawPos = this.getOrgScrollPos();\n\t\t}\n\t\tthis._prevPos = rawPos - this._renderer.getContainerOffset();\n\t};\n\n\tWatcher.prototype.attachEvent = function attachEvent() {\n\t\t(0, _utils.addEvent)(this._renderer.view, \"scroll\", this._onCheck);\n\t\t(0, _utils.addEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.getOrgScrollPos = function getOrgScrollPos() {\n\t\treturn (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);\n\t};\n\n\tWatcher.prototype.reset = function reset() {\n\t\tthis._prevPos = null;\n\t};\n\n\tWatcher.prototype._onCheck = function _onCheck() {\n\t\tvar orgScrollPos = this.getOrgScrollPos();\n\t\tvar prevPos = this.getScrollPos();\n\n\t\tthis.setScrollPos(orgScrollPos);\n\t\tvar scrollPos = this.getScrollPos();\n\n\t\tif (_consts.IS_IOS && (orgScrollPos === 0 || prevPos === null) || prevPos === scrollPos) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._callback.check && this._callback.check({\n\t\t\tisForward: prevPos < scrollPos,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos,\n\t\t\thorizontal: !this._renderer.options.isVertical\n\t\t});\n\t};\n\n\tWatcher.prototype._onResize = function _onResize() {\n\t\tvar _this = this;\n\n\t\tif (this._timer.resize) {\n\t\t\tclearTimeout(this._timer.resize);\n\t\t}\n\t\tthis._timer.resize = setTimeout(function () {\n\t\t\t_this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();\n\t\t\t_this._timer.resize = null;\n\t\t}, 100);\n\t};\n\n\tWatcher.prototype.detachEvent = function detachEvent() {\n\t\t(0, _utils.removeEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.destroy = function destroy() {\n\t\tthis.detachEvent();\n\t\tthis.reset();\n\t};\n\n\treturn Watcher;\n}();\n\nexports[\"default\"] = Watcher;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Watcher.js\n// module id = 10\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\n// ALIGN\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER,\n END = _consts.ALIGN.END,\n JUSTIFY = _consts.ALIGN.JUSTIFY;\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.\n * @class eg.InfiniteGrid.GridLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar GridLayout = function () {\n\tfunction GridLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, GridLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\talign: START,\n\t\t\titemSize: 0\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._columnSize = 0;\n\t\tthis._columnLength = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tGridLayout.prototype.getPoints = function getPoints(outlines) {\n\t\tvar pos = this.options.horizontal ? \"left\" : \"top\";\n\n\t\treturn outlines.map(function (outline) {\n\t\t\treturn outline[pos];\n\t\t});\n\t};\n\n\tGridLayout.prototype.checkColumn = function checkColumn(item) {\n\t\tvar margin = this.options.margin;\n\t\tvar sizeName = this.options.horizontal ? \"height\" : \"width\";\n\t\tvar columnSize = this.options.itemSize || item && item.size[sizeName] || 0;\n\n\t\tthis._columnSize = columnSize;\n\t\tif (!columnSize) {\n\t\t\tthis._columnLength = 1;\n\t\t\treturn;\n\t\t}\n\t\tthis._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);\n\t};\n\n\tGridLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar length = items.length;\n\t\tvar margin = this.options.margin;\n\t\tvar align = this.options.align;\n\t\tvar style = this._style;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar columnSize = this._columnSize;\n\t\tvar columnLength = this._columnLength;\n\n\t\tvar size = this._size;\n\t\tvar viewDist = size - (columnSize + margin) * columnLength + margin;\n\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar startOutline = outline.slice();\n\t\tvar endOutline = outline.slice();\n\t\tvar startIndex = 0;\n\t\tvar endIndex = -1;\n\t\tvar endPos = -1;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _item$rect;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline) || 0;\n\t\t\tvar index = endOutline.indexOf(point);\n\t\t\tvar item = items[isAppend ? i : length - 1 - i];\n\t\t\tvar size1 = item.size[size1Name];\n\t\t\tvar size2 = item.size[size2Name];\n\t\t\tvar pos1 = isAppend ? point : point - margin - size1;\n\t\t\tvar endPos1 = pos1 + size1 + margin;\n\n\t\t\tif (index === -1) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tvar pos2 = (columnSize + margin) * index;\n\n\t\t\t// ALIGN\n\t\t\tif (align === CENTER) {\n\t\t\t\tpos2 += viewDist / 2;\n\t\t\t} else if (align === END) {\n\t\t\t\tpos2 += viewDist + columnSize - size2;\n\t\t\t} else if (align === JUSTIFY) {\n\t\t\t\tif (columnLength <= 1) {\n\t\t\t\t\tpos2 += viewDist / 2;\n\t\t\t\t} else {\n\t\t\t\t\tpos2 = (size - columnSize) / (columnLength - 1) * index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// tetris\n\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);\n\t\t\titem.column = index;\n\t\t\tendOutline[index] = isAppend ? endPos1 : pos1;\n\t\t\tif (endIndex === -1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t} else if (endPos < endPos1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t}\n\t\t}\n\t\tif (!isAppend) {\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tendIndex = length - 1;\n\t\t}\n\t\t// if append items, startOutline is low, endOutline is high\n\t\t// if prepend items, startOutline is high, endOutline is low\n\t\treturn {\n\t\t\tstart: isAppend ? startOutline : endOutline,\n\t\t\tend: isAppend ? endOutline : startOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tGridLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\tvar startOutline = outline;\n\n\t\tif (!this._columnLength) {\n\t\t\tthis.checkColumn(items[0]);\n\t\t}\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? \"min\" : \"max\"].apply(Math, outline) || 0);\n\t\t}\n\n\t\tvar result = this._layout(clone, startOutline, type);\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: result\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.layout = function layout() {\n\t\tvar _this = this;\n\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;\n\n\t\tthis.checkColumn(firstItem);\n\n\t\t// if outlines' length and columns' length are now same, re-caculate outlines.\n\t\tvar startOutline = void 0;\n\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tvar pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);\n\n\t\t\t// re-layout items.\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, pos);\n\t\t} else {\n\t\t\tstartOutline = outline.slice();\n\t\t}\n\t\tgroups.forEach(function (group) {\n\t\t\tvar items = group.items;\n\t\t\tvar result = _this._layout(items, startOutline, _consts.APPEND);\n\n\t\t\tgroup.outlines = result;\n\t\t\tstartOutline = result.end;\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.GridLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tGridLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn GridLayout;\n}();\n\nexports[\"default\"] = GridLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/GridLayout.js\n// module id = 11\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _FrameLayout2 = require(\"./FrameLayout\");\n\nvar _FrameLayout3 = _interopRequireDefault(_FrameLayout2);\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction makeShapeOutline(outline, itemSize, columnLength, isAppend) {\n\tvar point = Math[isAppend ? \"min\" : \"max\"].apply(Math, outline) || 0;\n\n\tif (outline.length !== columnLength) {\n\t\treturn (0, _utils.fill)(columnLength, 0);\n\t}\n\treturn outline.map(function (l) {\n\t\treturn parseInt((l - point) / itemSize, 10);\n\t});\n}\nfunction getColumn(item) {\n\tif (item.column) {\n\t\treturn item.column;\n\t}\n\tvar column = 0;\n\n\tif (item.el) {\n\t\tvar dataset = item.el.dataset;\n\n\t\tif (dataset) {\n\t\t\tcolumn = dataset.column || 1;\n\t\t} else {\n\t\t\tcolumn = item.el.getAttribute(\"column\") || 1;\n\t\t}\n\t} else {\n\t\tcolumn = 1;\n\t}\n\titem.column = column;\n\treturn column;\n}\n\n/**\n * FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.SquareLayout\n * @extends eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar SquareLayout = function (_FrameLayout) {\n\t_inherits(SquareLayout, _FrameLayout);\n\n\tfunction SquareLayout() {\n\t\t_classCallCheck(this, SquareLayout);\n\n\t\treturn _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));\n\t}\n\n\tSquareLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tvar column = this.options.column;\n\n\t\tif (!column) {\n\t\t\t_FrameLayout.prototype._checkItemSize.call(this);\n\t\t\treturn;\n\t\t}\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / column - margin;\n\t};\n\n\tSquareLayout.prototype._layout = function _layout(items) {\n\t\tvar _shapes;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar itemSize = this._getItemSize();\n\t\tvar margin = this.options.margin;\n\t\tvar columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;\n\t\tvar length = items.length;\n\t\tvar endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar shapes = [];\n\t\tvar sign = isAppend ? 1 : -1;\n\t\tvar style = this._style;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _shapes$push;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline);\n\t\t\tvar index = (0, _utils.indexOf)(endOutline, point, !isAppend);\n\t\t\tvar item = items[i];\n\t\t\tvar columnWidth = item.columnWidth;\n\t\t\tvar column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);\n\t\t\tvar columnCount = 1;\n\n\t\t\tif (column > 1) {\n\t\t\t\tfor (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {\n\t\t\t\t\tif (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {\n\t\t\t\t\t\t++columnCount;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!isAppend) {\n\t\t\t\t\tindex -= columnCount - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.columnWidth = [columnLength, columnCount];\n\t\t\tshapes.push((_shapes$push = {\n\t\t\t\twidth: columnCount,\n\t\t\t\theight: columnCount\n\t\t\t}, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));\n\t\t\tfor (var _j = 0; _j < columnCount; ++_j) {\n\t\t\t\tendOutline[index + _j] = point + sign * columnCount;\n\t\t\t}\n\t\t}\n\t\tthis._shapes = (_shapes = {\n\t\t\tshapes: shapes\n\t\t}, _shapes[style.size2] = columnLength, _shapes);\n\n\t\tvar result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);\n\n\t\tif (!isAppend) {\n\t\t\tvar lastItem = items[items.length - 1];\n\n\t\t\tshapes.sort(function (shape1, shape2) {\n\t\t\t\tvar item1pos1 = shape1[pos1Name];\n\t\t\t\tvar item1pos2 = shape1[pos2Name];\n\t\t\t\tvar item2pos1 = shape2[pos1Name];\n\t\t\t\tvar item2pos2 = shape2[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tresult.startIndex = 0;\n\t\t\tresult.endIndex = items.indexOf(lastItem);\n\t\t}\n\t\treturn result;\n\t};\n\n\treturn SquareLayout;\n}(_FrameLayout3[\"default\"]);\n\nexports[\"default\"] = SquareLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/SquareLayout.js\n// module id = 12\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 _BoxModel = require(\"./lib/BoxModel.js\");\n\nvar _BoxModel2 = _interopRequireDefault(_BoxModel);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getCost(originLength, length) {\n\tvar cost = originLength / length;\n\n\tif (cost < 1) {\n\t\tcost = 1 / cost;\n\t}\n\n\treturn cost - 1;\n}\nfunction fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {\n\titem.setHeight(itemFitSize.height);\n\titem.setWidth(itemFitSize.width);\n\tbestFitArea.setHeight(containerFitSize.height);\n\tbestFitArea.setWidth(containerFitSize.width);\n\n\tif (layoutVertical) {\n\t\titem.setTop(bestFitArea.getTop() + bestFitArea.getHeight());\n\t\titem.setLeft(bestFitArea.getLeft());\n\t} else {\n\t\titem.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());\n\t\titem.setTop(bestFitArea.getTop());\n\t}\n}\n\n/**\n * PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.\n * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.\n * @class eg.InfiniteGrid.PackingLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비 \n * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치 \n * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치 \n * @example\n```\n\n```\n **/\n\nvar PackingLayout = function () {\n\tfunction PackingLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, PackingLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\taspectRatio: 1,\n\t\t\tsizeWeight: 1,\n\t\t\tratioWeight: 1\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tPackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {\n\t\tif (container.getRatio() === 0) {\n\t\t\t// 아이템 최초 삽입시 전체영역 지정\n\t\t\tcontainer.setOriginWidth(item.getWidth());\n\t\t\tcontainer.setOriginHeight(item.getHeight());\n\t\t\tcontainer.setWidth(item.getWidth());\n\t\t\tcontainer.setHeight(item.getHeight());\n\t\t\treturn;\n\t\t}\n\n\t\tvar bestFitArea = null;\n\t\tvar minCost = 10000000;\n\t\tvar layoutVertical = false;\n\t\tvar itemFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar containerFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar _options = this.options,\n\t\t sizeWeight = _options.sizeWeight,\n\t\t ratioWeight = _options.ratioWeight;\n\n\n\t\tcontainer.innerItem().forEach(function (v) {\n\t\t\tvar containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;\n\t\t\tvar containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;\n\t\t\tvar cost = void 0;\n\n\t\t\tfor (var i = 0; i < 2; ++i) {\n\t\t\t\tvar itemWidth = void 0;\n\t\t\t\tvar itemHeight = void 0;\n\t\t\t\tvar containerWidth = void 0;\n\t\t\t\tvar containerHeight = void 0;\n\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// 상하에 아이템 추가\n\t\t\t\t\titemWidth = v.getWidth();\n\t\t\t\t\titemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));\n\t\t\t\t\tcontainerWidth = v.getWidth();\n\t\t\t\t\tcontainerHeight = v.getHeight() - itemHeight;\n\t\t\t\t} else {\n\t\t\t\t\t// 좌우에 아이템 추가\n\t\t\t\t\titemHeight = v.getHeight();\n\t\t\t\t\titemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));\n\t\t\t\t\tcontainerHeight = v.getHeight();\n\t\t\t\t\tcontainerWidth = v.getWidth() - itemWidth;\n\t\t\t\t}\n\n\t\t\t\tvar itemSize = itemWidth * itemHeight;\n\t\t\t\tvar itemRatio = itemWidth / itemHeight;\n\t\t\t\tvar containerSize = containerWidth * containerHeight;\n\t\t\t\tvar containerRatio = containerHeight / containerHeight;\n\n\t\t\t\tcost = getCost(item.getSize(), itemSize) * sizeWeight;\n\t\t\t\tcost += getCost(item.getRatio(), itemRatio) * ratioWeight;\n\t\t\t\tcost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;\n\t\t\t\tcost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;\n\n\t\t\t\tif (cost === Math.min(cost, minCost)) {\n\t\t\t\t\tminCost = cost;\n\t\t\t\t\tbestFitArea = v;\n\t\t\t\t\tlayoutVertical = i === 0;\n\t\t\t\t\titemFitSize.width = itemWidth;\n\t\t\t\t\titemFitSize.height = itemHeight;\n\t\t\t\t\tcontainerFitSize.width = containerWidth;\n\t\t\t\t\tcontainerFitSize.height = containerHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);\n\t};\n\n\tPackingLayout.prototype._layout = function _layout(items) {\n\t\tvar _this = this;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar style = this._style;\n\t\tvar isHorizontal = this.options.horizontal;\n\t\tvar aspectRatio = this.options.aspectRatio;\n\t\tvar margin = this.options.margin;\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar containerWidth = this._size * (isHorizontal ? aspectRatio : 1);\n\t\tvar containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);\n\t\tvar containerSize1 = isHorizontal ? containerWidth : containerHeight;\n\t\tvar prevOutline = (0, _utils.toZeroArray)(outline);\n\t\tvar start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;\n\t\tvar end = start + containerSize1 + margin;\n\t\tvar container = new _BoxModel2[\"default\"]({});\n\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar startPos = -1;\n\t\tvar endPos = -1;\n\n\t\titems.forEach(function (item) {\n\t\t\tvar model = new _BoxModel2[\"default\"]({\n\t\t\t\toriginWidth: item.orgSize.width,\n\t\t\t\toriginHeight: item.orgSize.height,\n\t\t\t\twidth: item.orgSize.width,\n\t\t\t\theight: item.orgSize.height\n\t\t\t});\n\n\t\t\t_this._findBestFitArea(container, model);\n\t\t\tcontainer.pushItem(model);\n\t\t\tcontainer.scaleTo(containerWidth + margin, containerHeight + margin);\n\t\t});\n\t\titems.forEach(function (item, i) {\n\t\t\tvar boxItem = container.innerItem()[i];\n\t\t\t// console.log(\"boxItem\", boxItem, boxItem instanceof BoxModel);\n\t\t\tvar width = boxItem.getWidth();\n\t\t\tvar height = boxItem.getHeight();\n\t\t\tvar top = boxItem.getTop();\n\t\t\tvar left = boxItem.getLeft();\n\n\t\t\titem.rect = { top: top, left: left, width: width - margin, height: height - margin };\n\t\t\titem.rect[pos1Name] += start;\n\n\t\t\tif (startIndex === -1) {\n\t\t\t\tstartIndex = i;\n\t\t\t\tendIndex = i;\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tendPos = startPos;\n\t\t\t}\n\t\t\tif (startPos > item.rect[pos1Name]) {\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t\tif (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {\n\t\t\t\tendPos = item.rect[pos1Name] + item.rect[size1Name] + margin;\n\t\t\t\tendIndex = i;\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstart: [start],\n\t\t\tend: [end],\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tPackingLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tPackingLayout.prototype.layout = function layout() {\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar length = groups.length;\n\t\tvar point = outline;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.PackingLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tPackingLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn PackingLayout;\n}();\n\nexports[\"default\"] = PackingLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/PackingLayout.js\n// module id = 13\n// module chunks = 0 1","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BoxModel = function () {\n\tfunction BoxModel(option) {\n\t\t_classCallCheck(this, BoxModel);\n\n\t\tthis._originWidth = option.originWidth || 0;\n\t\tthis._originHeight = option.originHeight || 0;\n\t\tthis._width = option.width || 0;\n\t\tthis._height = option.height || 0;\n\t\tthis._left = option.left || 0;\n\t\tthis._top = option.top || 0;\n\t\tthis._item = option.item;\n\t\tthis._innerItem = option.innerItem || [];\n\t}\n\n\tBoxModel.prototype.getOriginWidth = function getOriginWidth() {\n\t\treturn this._originWidth;\n\t};\n\n\tBoxModel.prototype.setOriginWidth = function setOriginWidth(width) {\n\t\tthis._originWidth = width;\n\t};\n\n\tBoxModel.prototype.getOriginHeight = function getOriginHeight() {\n\t\treturn this._originHeight;\n\t};\n\n\tBoxModel.prototype.setOriginHeight = function setOriginHeight(height) {\n\t\tthis._originHeight = height;\n\t};\n\n\tBoxModel.prototype.getWidth = function getWidth() {\n\t\treturn this._width;\n\t};\n\n\tBoxModel.prototype.setWidth = function setWidth(width) {\n\t\tthis._width = width;\n\t};\n\n\tBoxModel.prototype.getHeight = function getHeight() {\n\t\treturn this._height;\n\t};\n\n\tBoxModel.prototype.setHeight = function setHeight(height) {\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.getLeft = function getLeft() {\n\t\treturn this._left;\n\t};\n\n\tBoxModel.prototype.setLeft = function setLeft(left) {\n\t\tthis._left = left;\n\t};\n\n\tBoxModel.prototype.getTop = function getTop() {\n\t\treturn this._top;\n\t};\n\n\tBoxModel.prototype.setTop = function setTop(top) {\n\t\tthis._top = top;\n\t};\n\n\tBoxModel.prototype.innerItem = function innerItem() {\n\t\treturn this._innerItem;\n\t};\n\n\tBoxModel.prototype.scaleTo = function scaleTo(width, height) {\n\t\tvar scaleX = this._width === 0 ? 0 : width / this._width;\n\t\tvar scaleY = this._height === 0 ? 0 : height / this._height;\n\n\t\tthis._innerItem.forEach(function (v) {\n\t\t\tif (scaleX !== 0) {\n\t\t\t\tv._left *= scaleX;\n\t\t\t\tv._width *= scaleX;\n\t\t\t}\n\t\t\tif (scaleY !== 0) {\n\t\t\t\tv._top *= scaleY;\n\t\t\t\tv._height *= scaleY;\n\t\t\t}\n\t\t});\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.pushItem = function pushItem(item) {\n\t\tthis._innerItem.push(item);\n\t};\n\n\tBoxModel.prototype.getOriginSize = function getOriginSize() {\n\t\treturn this._originWidth * this._originHeight;\n\t};\n\n\tBoxModel.prototype.getSize = function getSize() {\n\t\treturn this._width * this._height;\n\t};\n\n\tBoxModel.prototype.getOriginRatio = function getOriginRatio() {\n\t\treturn this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;\n\t};\n\n\tBoxModel.prototype.getRatio = function getRatio() {\n\t\treturn this._height === 0 ? 0 : this._width / this._height;\n\t};\n\n\tBoxModel.prototype.isSmallerThen = function isSmallerThen(box) {\n\t\treturn this._width <= box._width && this._height <= box._height;\n\t};\n\n\tBoxModel.prototype.isEqual = function isEqual(box) {\n\t\treturn this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;\n\t};\n\n\treturn BoxModel;\n}();\n\nmodule.exports = BoxModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/BoxModel.js\n// module id = 14\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 _dijkstra = require(\"./lib/dijkstra\");\n\nvar _dijkstra2 = _interopRequireDefault(_dijkstra);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.\n * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.\n * @class eg.InfiniteGrid.JustifiedLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기 \n * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기 \n * @example\n```\n\n```\n **/\nvar JustifiedLayout = function () {\n\tfunction JustifiedLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, JustifiedLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\tminSize: 0,\n\t\t\tmaxSize: 0\n\t\t}, options);\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t\tthis._size = 0;\n\t}\n\n\tJustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar _this = this;\n\n\t\tvar style = this._style;\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar startIndex = 0;\n\t\tvar endIndex = items.length;\n\t\tvar graph = function graph(_start) {\n\t\t\tvar results = {};\n\t\t\tvar start = +_start.replace(/[^0-9]/g, \"\");\n\t\t\tvar length = endIndex + 1;\n\n\t\t\tfor (var i = start + 1; i < length; ++i) {\n\t\t\t\tif (i - start > 8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar cost = _this._getCost(items, start, i, size1Name, size2Name);\n\n\t\t\t\tif (cost < 0 && i === length - 1) {\n\t\t\t\t\tcost = 0;\n\t\t\t\t}\n\t\t\t\tif (cost !== null) {\n\t\t\t\t\tresults[\"node\" + i] = Math.pow(cost, 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t\t// shortest path for items' total height.\n\t\tvar path = _dijkstra2[\"default\"].find_path(graph, \"node\" + startIndex, \"node\" + endIndex);\n\n\t\treturn this._setStyle(items, path, outline, isAppend);\n\t};\n\n\tJustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {\n\t\tvar margin = this.options.margin;\n\t\tvar size = items.reduce(function (sum, item) {\n\t\t\treturn sum + item.size[size2Name] / item.size[size1Name];\n\t\t}, 0);\n\n\t\treturn (this._size - margin * (items.length - 1)) / size;\n\t};\n\n\tJustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {\n\t\tvar size = this._getSize(items.slice(i, j), size1Name, size2Name);\n\t\tvar min = this.options.minSize || 0;\n\t\tvar max = this.options.maxSize || Infinity;\n\n\t\tif (isFinite(max)) {\n\t\t\t// if this size is not in range, the cost increases sharply.\n\t\t\tif (size < min) {\n\t\t\t\treturn Math.pow(size - min, 2) + Math.pow(max, 2);\n\t\t\t} else if (size > max) {\n\t\t\t\treturn Math.pow(size - max, 2) + Math.pow(max, 2);\n\t\t\t} else {\n\t\t\t\t// if this size in range, the cost is negative or low.\n\t\t\t\treturn Math.min(size - max, min - size);\n\t\t\t}\n\t\t}\n\t\t// if max is infinite type, caculate cost only with \"min\".\n\t\tif (size < min) {\n\t\t\treturn Math.max(Math.pow(min, 2), Math.pow(size, 2));\n\t\t}\n\t\treturn size - min;\n\t};\n\n\tJustifiedLayout.prototype._setStyle = function _setStyle(items, path) {\n\t\tvar outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\t\tvar isAppend = arguments[3];\n\n\t\tvar style = this._style;\n\t\t// if direction is vertical\n\t\t// pos1 : top, pos11 : bottom\n\t\t// size1 : height\n\t\t// pos2 : left, pos22 : right\n\t\t// size2 : width\n\n\t\t// if direction is horizontal\n\t\t// pos1 : left, pos11 : right\n\t\t// size1 : width\n\t\t// pos2 : top, pos22 : bottom\n\t\t// size2 : height\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar size2Name = style.size2;\n\t\tvar length = path.length;\n\t\tvar margin = this.options.margin;\n\t\tvar startPoint = outline[0] || 0;\n\t\tvar endPoint = startPoint;\n\t\tvar height = 0;\n\n\t\tfor (var i = 0; i < length - 1; ++i) {\n\t\t\tvar path1 = parseInt(path[i].replace(\"node\", \"\"), 10);\n\t\t\tvar path2 = parseInt(path[i + 1].replace(\"node\", \"\"), 10);\n\t\t\t// pathItems(path1 to path2) are in 1 line.\n\t\t\tvar pathItems = items.slice(path1, path2);\n\t\t\tvar pathItemsLength = pathItems.length;\n\t\t\tvar size1 = this._getSize(pathItems, size1Name, size2Name);\n\t\t\tvar pos1 = endPoint;\n\n\t\t\tfor (var j = 0; j < pathItemsLength; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = pathItems[j];\n\t\t\t\tvar size2 = item.size[size2Name] / item.size[size1Name] * size1;\n\t\t\t\t// item has margin bottom and right.\n\t\t\t\t// first item has not margin.\n\t\t\t\tvar prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;\n\t\t\t\tvar pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;\n\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\theight += margin + size1;\n\t\t\tendPoint = startPoint + height;\n\t\t}\n\t\tvar itemsLength = items.length;\n\t\tvar startIndex = itemsLength ? 0 : -1;\n\t\tvar endIndex = itemsLength ? itemsLength - 1 : -1;\n\n\t\tif (isAppend) {\n\t\t\t// previous group's end outline is current group's start outline\n\t\t\treturn {\n\t\t\t\tstart: [startPoint],\n\t\t\t\tend: [endPoint],\n\t\t\t\tstartIndex: startIndex,\n\t\t\t\tendIndex: endIndex\n\t\t\t};\n\t\t}\n\t\t// for prepend, only substract height from position.\n\t\t// always start is lower than end.\n\n\t\tfor (var _i = 0; _i < itemsLength; ++_i) {\n\t\t\tvar _item = items[_i];\n\n\t\t\t// move items as long as height for prepend\n\t\t\t_item.rect[pos1Name] -= height;\n\t\t}\n\t\treturn {\n\t\t\tstart: [startPoint - height],\n\t\t\tend: [startPoint], // endPoint - height = startPoint\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tJustifiedLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.JustifiedLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tJustifiedLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100]);\n */\n\n\n\tJustifiedLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\n\treturn JustifiedLayout;\n}();\n\nexports[\"default\"] = JustifiedLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/JustifiedLayout.js\n// module id = 15\n// module chunks = 0 1","'use strict';\n\n/* eslint-disable */\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\n(function () {\n var dijkstra = {\n single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = new BinaryHeap(function (x) {\n return x.cost;\n });\n open.push({ value: s, cost: 0 });\n\n var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;\n while (open.size()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph(u) || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (var v in adjacent_nodes) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = typeof costs[v] === 'undefined';\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });\n predecessors[v] = u;\n }\n }\n }\n\n if (typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function find_path(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);\n }\n\n };\n\n function BinaryHeap(scoreFunction) {\n this.content = [];\n this.scoreFunction = scoreFunction;\n }\n\n BinaryHeap.prototype = {\n push: function push(element) {\n // Add the new element to the end of the array.\n this.content.push(element);\n // Allow it to bubble up.\n this.bubbleUp(this.content.length - 1);\n },\n\n pop: function pop() {\n // Store the first element so we can return it later.\n var result = this.content[0];\n // Get the element at the end of the array.\n var end = this.content.pop();\n // If there are any elements left, put the end element at the\n // start, and let it sink down.\n if (this.content.length > 0) {\n this.content[0] = end;\n this.sinkDown(0);\n }\n return result;\n },\n\n remove: function remove(node) {\n var len = this.content.length;\n // To remove a value, we must search through the array to find\n // it.\n for (var i = 0; i < len; i++) {\n if (this.content[i] === node) {\n // When it is found, the process seen in 'pop' is repeated\n // to fill up the hole.\n var end = this.content.pop();\n if (i !== len - 1) {\n this.content[i] = end;\n if (this.scoreFunction(end) < this.scoreFunction(node)) {\n this.bubbleUp(i);\n } else {\n this.sinkDown(i);\n }\n }\n return;\n }\n }\n throw new Error('Node not found.');\n },\n\n size: function size() {\n return this.content.length;\n },\n\n bubbleUp: function bubbleUp(n) {\n // Fetch the element that has to be moved.\n var element = this.content[n];\n // When at 0, an element can not go up any further.\n while (n > 0) {\n // Compute the parent element's index, and fetch it.\n var parentN = Math.floor((n + 1) / 2) - 1,\n parent = this.content[parentN];\n // Swap the elements if the parent is greater.\n if (this.scoreFunction(element) < this.scoreFunction(parent)) {\n this.content[parentN] = element;\n this.content[n] = parent;\n // Update 'n' to continue at the new position.\n n = parentN;\n }\n // Found a parent that is less, no need to move it further.\n else {\n break;\n }\n }\n },\n\n sinkDown: function sinkDown(n) {\n // Look up the target element and its score.\n var length = this.content.length,\n element = this.content[n],\n elemScore = this.scoreFunction(element);\n\n while (true) {\n // Compute the indices of the child elements.\n var child2N = (n + 1) * 2,\n child1N = child2N - 1;\n // This is used to store the new position of the element,\n // if any.\n var swap = null;\n // If the first child exists (is inside the array)...\n if (child1N < length) {\n // Look it up and compute its score.\n var child1 = this.content[child1N],\n child1Score = this.scoreFunction(child1);\n // If the score is less than our element's, we need to swap.\n if (child1Score < elemScore) {\n swap = child1N;\n }\n }\n // Do the same checks for the other child.\n if (child2N < length) {\n var child2 = this.content[child2N],\n child2Score = this.scoreFunction(child2);\n if (child2Score < (swap == null ? elemScore : child1Score)) {\n swap = child2N;\n }\n }\n\n // If the element needs to be moved, swap it, and continue.\n if (swap !== null) {\n this.content[n] = this.content[swap];\n this.content[swap] = element;\n n = swap;\n }\n // Otherwise, we are done.\n else {\n break;\n }\n }\n }\n };\n\n /**\n * Browserify 지원을 위한 모듈화 코드\n */\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = dijkstra;\n } else {\n window.dijkstra = dijkstra;\n }\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/dijkstra.js\n// module id = 16\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;;;A;;;;;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;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvOA;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;;;;;;;AC1QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACt5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":""} \ No newline at end of file +{"version":3,"file":"infinitegrid.pkgd.min.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap d3985277e80d047cb2c4","webpack:///./src/consts.js","webpack:///./src/utils.js","webpack:///./src/browser.js","webpack:///./src/DOMRenderer.js","webpack:///./src/layouts/FrameLayout.js","webpack:///./src/index.js","webpack:///./src/InfiniteGrid.js","webpack:///./node_modules/@egjs/component/dist/component.js","webpack:///./src/ItemManager.js","webpack:///./src/ImageLoaded.js","webpack:///./src/Watcher.js","webpack:///./src/layouts/GridLayout.js","webpack:///./src/layouts/SquareLayout.js","webpack:///./src/layouts/PackingLayout.js","webpack:///./src/layouts/lib/BoxModel.js","webpack:///./src/layouts/JustifiedLayout.js","webpack:///./src/layouts/lib/dijkstra.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[\"InfiniteGrid\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"InfiniteGrid\"] = factory();\n})(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 = 5);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d3985277e80d047cb2c4","\"use strict\";\n\nexports.__esModule = true;\nexports.DEFENSE_BROWSER = exports.PROCESSING = exports.LOADING_PREPEND = exports.LOADING_APPEND = 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.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_\";\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 = navigator.userAgent.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 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);\nvar webkitVersion = webkit && parseInt(webkit[1], 10) || 0;\n\nvar DEFENSE_BROWSER = exports.DEFENSE_BROWSER = webkitVersion < 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;\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.fill = fill;\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.indexOf = indexOf;\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 fill(length, value) {\n\tvar array = (typeof length === \"undefined\" ? \"undefined\" : _typeof(length)) === \"object\" ? length : new Array(length);\n\tvar len = array.length;\n\n\tfor (var i = len - 1; i >= 0; --i) {\n\t\tarray[i] = value;\n\t}\n\treturn array;\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 = param.match(/^<([A-z]+)\\s*([^>]*)>/);\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.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}\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 indexOf(arr, target) {\n\tvar isRight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\tif (!isRight) {\n\t\treturn arr.indexOf(target);\n\t}\n\tvar length = arr.length;\n\n\tfor (var i = length - 1; i >= 0; --i) {\n\t\tif (arr[i] !== target) {\n\t\t\tcontinue;\n\t\t}\n\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/utils.js\n// module id = 1\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 = window;\nvar document = exports.document = win.document;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser.js\n// module id = 2\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\nfunction _defense(element) {\n\tvar container = document.createElement(\"div\");\n\n\tcontainer.className = _consts.CONTAINER_CLASSNAME;\n\tcontainer.style.height = \"100%\";\n\n\tvar children = element.children;\n\tvar length = children.length; // for IE8\n\n\tfor (var i = 0; i < length; i++) {\n\t\tcontainer.appendChild(children[0]);\n\t}\n\n\telement.appendChild(container);\n\treturn container;\n}\n\nvar DOMRenderer = function () {\n\tDOMRenderer.renderItem = function renderItem(item, styles) {\n\t\tif (item.el) {\n\t\t\tvar elStyle = item.el.style;\n\n\t\t\t// for debugging\n\t\t\titem.el.setAttribute(_consts.GROUPKEY_ATT, item.groupKey);\n\t\t\telStyle.position = \"absolute\";\n\t\t\t[\"left\", \"top\", \"width\", \"height\"].forEach(function (p) {\n\t\t\t\tp in styles && (elStyle[p] = styles[p] + \"px\");\n\t\t\t});\n\t\t}\n\t};\n\n\tDOMRenderer.renderItems = function renderItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tDOMRenderer.renderItem(item, item.rect);\n\t\t});\n\t};\n\n\tDOMRenderer.removeItems = function removeItems(items) {\n\t\titems.forEach(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tDOMRenderer.removeElement(item.el);\n\t\t\t\titem.el = null;\n\t\t\t}\n\t\t});\n\t};\n\n\tDOMRenderer.removeElement = function removeElement(element) {\n\t\telement.parentNode.removeChild(element);\n\t};\n\n\tDOMRenderer.createElements = function createElements(items) {\n\t\tvar elements = (0, _utils.$)(items.reduce(function (acc, v, i) {\n\t\t\tacc.push(v.content.replace(/^[\\s\\uFEFF]+|[\\s\\uFEFF]+$/g, \"\"));\n\t\t\treturn acc;\n\t\t}, []).join(\"\"), _consts.MULTI);\n\n\t\treturn items.map(function (item, index) {\n\t\t\titem.el = elements[index];\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tfunction DOMRenderer(element, options) {\n\t\t_classCallCheck(this, DOMRenderer);\n\n\t\t_extends(this.options = {\n\t\t\tisOverflowScroll: false,\n\t\t\tisEqualSize: false,\n\t\t\tisVertical: true\n\t\t}, options);\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis._init(element);\n\t\tthis.resize();\n\t}\n\n\tDOMRenderer.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\tcssText: this.container.style.cssText,\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_size: _extends({}, this._size)\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.setStatus = function setStatus(status, items) {\n\t\tthis.container.style.cssText = status.cssText;\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._size, status._size);\n\n\t\tDOMRenderer.renderItems(items);\n\t\tthis._insert(items, _consts.APPEND);\n\t};\n\n\tDOMRenderer.prototype.updateSize = function updateSize(items) {\n\t\tvar _this = this;\n\n\t\treturn items.map(function (item) {\n\t\t\tif (item.el) {\n\t\t\t\tif (_this.options.isEqualSize) {\n\t\t\t\t\t_this._size.item = _this._size.item || {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t\titem.size = _extends({}, _this._size.item);\n\t\t\t\t} else {\n\t\t\t\t\titem.size = {\n\t\t\t\t\t\twidth: (0, _utils.innerWidth)(item.el),\n\t\t\t\t\t\theight: (0, _utils.innerHeight)(item.el)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (!item.orgSize) {\n\t\t\t\t\titem.orgSize = _extends({}, item.size);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn item;\n\t\t});\n\t};\n\n\tDOMRenderer.prototype._init = function _init(el) {\n\t\tvar element = (0, _utils.$)(el);\n\t\tvar style = (0, _utils.getStyles)(element);\n\n\t\tthis._orgStyle = {};\n\n\t\tif (style.position === \"static\") {\n\t\t\tthis._orgStyle.position = element.style.position;\n\t\t\telement.style.position = \"relative\";\n\t\t}\n\t\tif (this.options.isOverflowScroll) {\n\t\t\tvar target = this.options.isVertical ? [\"Y\", \"X\"] : [\"X\", \"Y\"];\n\n\t\t\tthis._orgStyle.overflowX = element.style.overflowX;\n\t\t\tthis._orgStyle.overflowY = element.style.overflowY;\n\t\t\telement.style[\"overflow\" + target[0]] = \"scroll\";\n\t\t\telement.style[\"overflow\" + target[1]] = \"hidden\";\n\t\t\tthis.view = element;\n\t\t\t// defense code for android < 4.4 or webkit < 537\n\t\t\tthis.container = !this.options.isVertical && _consts.DEFENSE_BROWSER ? _defense(element) : element;\n\t\t} else {\n\t\t\tthis.view = window;\n\t\t\tthis.container = element;\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.append = function append(items) {\n\t\tthis._insert(items, _consts.APPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.prepend = function prepend(items) {\n\t\tthis._insert(items, _consts.PREPEND, {\n\t\t\ttop: _consts.DUMMY_POSITION\n\t\t});\n\t};\n\n\tDOMRenderer.prototype.clear = function clear() {\n\t\tthis.container.innerHTML = \"\";\n\t\tif (!this.options.isOverflowScroll) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\t}\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tcontainer: -1,\n\t\t\tview: -1\n\t\t};\n\t};\n\n\tDOMRenderer.prototype.createAndInsert = function createAndInsert(items, isAppend) {\n\t\tvar itemsWithElement = DOMRenderer.createElements(items);\n\n\t\tDOMRenderer.renderItems(itemsWithElement);\n\t\tthis._insert(itemsWithElement, isAppend);\n\t};\n\n\tDOMRenderer.prototype._insert = function _insert(items, isAppend, styles) {\n\t\tvar df = document.createDocumentFragment();\n\n\t\titems.forEach(function (item) {\n\t\t\tstyles && DOMRenderer.renderItem(item, styles);\n\t\t\tisAppend ? df.appendChild(item.el) : df.insertBefore(item.el, df.firstChild);\n\t\t});\n\t\tisAppend ? this.container.appendChild(df) : this.container.insertBefore(df, this.container.firstChild);\n\t};\n\n\tDOMRenderer.prototype._calcSize = function _calcSize() {\n\t\treturn this.options.isVertical ? (0, _utils.innerWidth)(this.container) : (0, _utils.innerHeight)(this.container);\n\t};\n\n\tDOMRenderer.prototype.getViewSize = function getViewSize() {\n\t\treturn this._size.view;\n\t};\n\n\tDOMRenderer.prototype.scrollBy = function scrollBy(point) {\n\t\tvar pos = this.options.isVertical ? [0, point] : [point, 0];\n\n\t\t_utils.scrollBy.apply(undefined, [this.view].concat(pos));\n\t};\n\n\tDOMRenderer.prototype.getContainerOffset = function getContainerOffset() {\n\t\treturn this._size.containerOffset;\n\t};\n\n\tDOMRenderer.prototype.getViewportSize = function getViewportSize() {\n\t\tthis.resize();\n\t\treturn this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.setContainerSize = function setContainerSize(size) {\n\t\tif (!this.options.isOverflowScroll || !this.options.isVertical && _consts.DEFENSE_BROWSER) {\n\t\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = size + \"px\";\n\t\t}\n\t};\n\n\tDOMRenderer.prototype.resize = function resize() {\n\t\tif (this.isNeededResize()) {\n\t\t\tvar isVertical = this.options.isVertical;\n\n\t\t\tthis._size = {\n\t\t\t\tcontainerOffset: this.container[\"offset\" + (isVertical ? \"Top\" : \"Left\")],\n\t\t\t\tviewport: this._calcSize(),\n\t\t\t\tview: isVertical ? (0, _utils.innerHeight)(this.view) : (0, _utils.innerWidth)(this.view),\n\t\t\t\titem: null\n\t\t\t};\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t};\n\n\tDOMRenderer.prototype.isNeededResize = function isNeededResize() {\n\t\treturn this._calcSize() !== this._size.viewport;\n\t};\n\n\tDOMRenderer.prototype.destroy = function destroy() {\n\t\tthis._size = {\n\t\t\tcontainerOffset: 0,\n\t\t\tviewport: -1,\n\t\t\tview: -1,\n\t\t\titem: null\n\t\t};\n\t\tthis.container.style[this.options.isVertical ? \"height\" : \"width\"] = \"\";\n\t\tfor (var p in this._orgStyle) {\n\t\t\tthis[this.options.isOverflowScroll ? \"view\" : \"container\"].style[p] = this._orgStyle[p];\n\t\t}\n\t};\n\n\treturn DOMRenderer;\n}();\n\nexports[\"default\"] = DOMRenderer;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/DOMRenderer.js\n// module id = 3\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\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\n/*\nFrame\n[\n[1, 1, 1, 1, 1],\n[0, 0, 2, 2, 2],\n[0, 0, 2, 2, 2],\n[3, 4, 5, 5, 5],\n]\n*/\nfunction disableFrame(frame, type, x, y, width, height) {\n\tfor (var i = y; i < y + height; ++i) {\n\t\tfor (var j = x; j < x + width; ++j) {\n\t\t\tif (type !== frame[i][j]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tframe[i][j] = 0;\n\t\t}\n\t}\n}\nfunction searchShapeInFrame(frame, type, top, left, width, height) {\n\tvar size = {\n\t\tleft: left,\n\t\ttop: top,\n\t\ttype: type,\n\t\twidth: 1,\n\t\theight: 1\n\t};\n\n\tfor (var i = left; i < width; ++i) {\n\t\tif (frame[top][i] === type) {\n\t\t\tsize.width = i - left + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tfor (var _i = top; _i < height; ++_i) {\n\t\tif (frame[_i][left] === type) {\n\t\t\tsize.height = _i - top + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\t// After finding the shape, it will not find again.\n\tdisableFrame(frame, type, left, top, size.width, size.height);\n\treturn size;\n}\nfunction getShapes(frame) {\n\tvar height = frame.length;\n\tvar width = height ? frame[0].length : 0;\n\tvar shapes = [];\n\n\tfor (var i = 0; i < height; ++i) {\n\t\tfor (var j = 0; j < width; ++j) {\n\t\t\tvar type = frame[i][j];\n\n\t\t\tif (!type) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Separate shapes with other numbers.\n\t\t\tshapes.push(searchShapeInFrame(frame, type, i, j, width, height));\n\t\t}\n\t}\n\tshapes.sort(function (a, b) {\n\t\treturn a.type < b.type ? -1 : 1;\n\t});\n\treturn {\n\t\tshapes: shapes,\n\t\twidth: width,\n\t\theight: height\n\t};\n}\n/**\n * FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.FrameLayout module eg.InfiniteGrid.FrameLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frame=[]] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @param {Boolean} [options.frameFill=true] Make sure that the frame can be attached after the previous frame. 다음 프레임이 전 프레임에 이어 붙일 수 있는지 있는지 확인한다. \n * @example\n```\n\n```\n **/\n\nvar FrameLayout = function () {\n\tfunction FrameLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, FrameLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\titemSize: 0,\n\t\t\tframe: [],\n\t\t\tframeFill: true\n\t\t}, options);\n\t\tvar frame = this.options.frame.map(function (row) {\n\t\t\treturn row.slice();\n\t\t});\n\t\t// divide frame into shapes.\n\t\tvar shapes = getShapes(frame);\n\n\t\tthis._itemSize = this.options.itemSize || 0;\n\t\tthis._shapes = shapes;\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tFrameLayout.prototype._getItemSize = function _getItemSize() {\n\t\tthis._checkItemSize();\n\n\t\treturn this._itemSize;\n\t};\n\n\tFrameLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tif (this.options.itemSize) {\n\t\t\tthis._itemSize = this.options.itemSize;\n\t\t\treturn;\n\t\t}\n\t\tvar style = this._style;\n\t\tvar size = style.size2;\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / this._shapes[size] - margin;\n\t};\n\n\tFrameLayout.prototype._layout = function _layout(items) {\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar length = items.length;\n\t\tvar style = this._style;\n\t\tvar _options = this.options,\n\t\t margin = _options.margin,\n\t\t frameFill = _options.frameFill;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar itemSize = this._getItemSize();\n\t\tvar isItemObject = (typeof itemSize === \"undefined\" ? \"undefined\" : _typeof(itemSize)) === \"object\";\n\t\tvar itemSize2 = isItemObject ? itemSize[size2Name] : itemSize;\n\t\tvar itemSize1 = isItemObject ? itemSize[size1Name] : itemSize;\n\t\tvar shapesSize = this._shapes[size2Name];\n\t\tvar shapes = this._shapes.shapes;\n\t\tvar shapesLength = shapes.length;\n\t\tvar startOutline = (0, _utils.fill)(shapesSize, -99999);\n\t\tvar endOutline = (0, _utils.fill)(shapesSize, -99999);\n\t\tvar dist = 0;\n\t\tvar end = 0;\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar minPos = -1;\n\t\tvar maxPos = -1;\n\n\t\tif (!shapesLength) {\n\t\t\treturn { start: outline, end: outline, startIndex: startIndex, endIndex: endIndex };\n\t\t}\n\t\tfor (var i = 0; i < length; i += shapesLength) {\n\t\t\tfor (var j = 0; j < shapesLength && i + j < length; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = items[i + j];\n\t\t\t\tvar shape = shapes[j];\n\t\t\t\tvar shapePos1 = shape[pos1Name];\n\t\t\t\tvar shapePos2 = shape[pos2Name];\n\t\t\t\tvar shapeSize1 = shape[size1Name];\n\t\t\t\tvar shapeSize2 = shape[size2Name];\n\t\t\t\tvar pos1 = end - dist + shapePos1 * (itemSize1 + margin);\n\t\t\t\tvar pos2 = shapePos2 * (itemSize2 + margin);\n\t\t\t\tvar size1 = shapeSize1 * (itemSize1 + margin) - margin;\n\t\t\t\tvar size2 = shapeSize2 * (itemSize2 + margin) - margin;\n\n\t\t\t\tfor (var k = shapePos2; k < shapePos2 + shapeSize2 && k < shapesSize; ++k) {\n\t\t\t\t\tif (startOutline[k] === -99999) {\n\t\t\t\t\t\tstartOutline[k] = pos1;\n\t\t\t\t\t}\n\t\t\t\t\tif (startIndex === -1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (minPos > pos1) {\n\t\t\t\t\t\tminPos = pos1;\n\t\t\t\t\t\tstartIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxPos < pos1 + size1 + margin) {\n\t\t\t\t\t\tmaxPos = pos1 + size1 + margin;\n\t\t\t\t\t\tendIndex = i + j;\n\t\t\t\t\t}\n\t\t\t\t\tstartOutline[k] = Math.min(startOutline[k], pos1);\n\t\t\t\t\tendOutline[k] = Math.max(endOutline[k], pos1 + size1 + margin);\n\t\t\t\t}\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\tend = Math.max.apply(Math, endOutline);\n\t\t\t// check dist once\n\t\t\tif (i !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// find & fill empty block\n\t\t\tif (!frameFill) {\n\t\t\t\tdist = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdist = end;\n\n\t\t\tfor (var _j = 0; _j < shapesSize; ++_j) {\n\t\t\t\tif (startOutline[_j] === -99999) {\n\t\t\t\t\tstartOutline[_j] = Math.max.apply(Math, startOutline);\n\t\t\t\t\tendOutline[_j] = startOutline[_j];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// the dist between frame's end outline and next frame's start outline\n\t\t\t\t// expect that next frame's start outline is startOutline[j] + end\n\t\t\t\tdist = Math.min(startOutline[_j] + end - endOutline[_j], dist);\n\t\t\t}\n\t\t}\n\t\t// The target outline is start outline when type is APPENDING\n\t\tvar targetOutline = isAppend ? startOutline : endOutline;\n\t\tvar prevOutlineEnd = outline.length === 0 ? 0 : Math[isAppend ? \"max\" : \"min\"].apply(Math, outline);\n\t\tvar prevOutlineDist = isAppend ? 0 : end;\n\n\t\tif (frameFill && outline.length === shapesSize) {\n\t\t\tprevOutlineDist = 99999999;\n\t\t\tfor (var _i2 = 0; _i2 < shapesSize; ++_i2) {\n\t\t\t\tif (startOutline[_i2] === endOutline[_i2]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// if appending type is PREPEND, subtract dist from appending group's height.\n\n\t\t\t\tprevOutlineDist = Math.min(targetOutline[_i2] + prevOutlineEnd - outline[_i2], prevOutlineDist);\n\t\t\t}\n\t\t}\n\t\tfor (var _i3 = 0; _i3 < shapesSize; ++_i3) {\n\t\t\tstartOutline[_i3] += prevOutlineEnd - prevOutlineDist;\n\t\t\tendOutline[_i3] += prevOutlineEnd - prevOutlineDist;\n\t\t}\n\t\titems.forEach(function (item) {\n\t\t\titem.rect[pos1Name] += prevOutlineEnd - prevOutlineDist;\n\t\t});\n\t\treturn {\n\t\t\tstart: startOutline,\n\t\t\tend: endOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tFrameLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tFrameLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.FrameLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.FrameLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tFrameLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.FrameLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tFrameLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\n\treturn FrameLayout;\n}();\n\nexports[\"default\"] = FrameLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/FrameLayout.js\n// module id = 4\n// module chunks = 0 1","\"use strict\";\n\nvar _InfiniteGrid = require(\"./InfiniteGrid\");\n\nvar _InfiniteGrid2 = _interopRequireDefault(_InfiniteGrid);\n\nvar _GridLayout = require(\"./layouts/GridLayout\");\n\nvar _GridLayout2 = _interopRequireDefault(_GridLayout);\n\nvar _FrameLayout = require(\"./layouts/FrameLayout\");\n\nvar _FrameLayout2 = _interopRequireDefault(_FrameLayout);\n\nvar _SquareLayout = require(\"./layouts/SquareLayout\");\n\nvar _SquareLayout2 = _interopRequireDefault(_SquareLayout);\n\nvar _PackingLayout = require(\"./layouts/PackingLayout\");\n\nvar _PackingLayout2 = _interopRequireDefault(_PackingLayout);\n\nvar _JustifiedLayout = require(\"./layouts/JustifiedLayout\");\n\nvar _JustifiedLayout2 = _interopRequireDefault(_JustifiedLayout);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * Copyright (c) NAVER Corp.\n * egjs-infinitegrid projects are licensed under the MIT license\n */\n_InfiniteGrid2[\"default\"].GridLayout = _GridLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].FrameLayout = _FrameLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].SquareLayout = _SquareLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].PackingLayout = _PackingLayout2[\"default\"];\n_InfiniteGrid2[\"default\"].JustifiedLayout = _JustifiedLayout2[\"default\"];\n\nmodule.exports = _InfiniteGrid2[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/index.js\n// module id = 5\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 * Copyright (c) 2017 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n\nvar _component = require(\"@egjs/component\");\n\nvar _component2 = _interopRequireDefault(_component);\n\nvar _ItemManager = require(\"./ItemManager\");\n\nvar _ItemManager2 = _interopRequireDefault(_ItemManager);\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _ImageLoaded = require(\"./ImageLoaded\");\n\nvar _ImageLoaded2 = _interopRequireDefault(_ImageLoaded);\n\nvar _Watcher = require(\"./Watcher\");\n\nvar _Watcher2 = _interopRequireDefault(_Watcher);\n\nvar _consts = require(\"./consts\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// IE8\n// https://stackoverflow.com/questions/43216659/babel-ie8-inherit-issue-with-object-create\n/* eslint-disable */\nif (typeof Object.create !== \"function\") {\n\tObject.create = function (o, properties) {\n\t\tif ((typeof o === \"undefined\" ? \"undefined\" : _typeof(o)) !== \"object\" && typeof o !== \"function\") {\n\t\t\tthrow new TypeError(\"Object prototype may only be an Object: \" + o);\n\t\t} else if (o === null) {\n\t\t\tthrow new Error(\"This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.\");\n\t\t}\n\t\tfunction F() {}\n\t\tF.prototype = o;\n\t\treturn new F();\n\t};\n}\n/* eslint-enable */\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko 콘텐츠가 있는 카드 엘리먼트를 레이아웃 타입에 따라 무한으로 배치하는 모듈. 다양한 크기의 카드 엘리먼트를 다양한 레이아웃으로 배치할 수 있다. 카드 엘리먼트의 개수가 계속 늘어나도 모듈이 처리하는 DOM의 개수를 일정하게 유지해 최적의 성능을 보장한다\n * @alias eg.InfiniteGrid\n * @extends eg.Component\n *\n * @example\n```\n
    \n\t
  • \n\t\t
    test1
    \n\t
  • \n\t
  • \n\t\t
    test2
    \n\t
  • \n\t
  • \n\t\t
    test3
    \n\t
  • \n\t
  • \n\t\t
    test4
    \n\t
  • \n\t
  • \n\t\t
    test5
    \n\t
  • \n\t
  • \n\t\t
    test6
    \n\t
  • \n
\n\n```\n *\n * @support {\"ie\": \"8+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n **/\n\nvar InfiniteGrid = function (_Component) {\n\t_inherits(InfiniteGrid, _Component);\n\n\t/**\n * @param {HTMLElement|String|jQuery} element A base element for a module 모듈을 적용할 기준 엘리먼트\n * @param {Object} [options] The option object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 옵션 객체\n * @param {String} [options.itemSelector] A selector to select card elements that make up the layout레이아웃을 구성하는 카드 엘리먼트를 선택할 선택자(selector)\n * @param {Boolean} [options.useRecycle=true] Indicates whether keep the number of DOMs is maintained. If the useRecycle value is 'true', keep the number of DOMs is maintained. If the useRecycle value is 'false', the number of DOMs will increase as card elements are added. DOM의 수를 유지할지 여부를 나타낸다. useRecycle 값이 'true'이면 DOM 개수를 일정하게 유지한다. useRecycle 값이 'false' 이면 카드 엘리먼트가 추가될수록 DOM 개수가 계속 증가한다.\n * @param {Boolean} [options.isOverflowScroll=false] Indicates whether overflow:scroll is appliedoverflow:scroll 적용여부를 결정한다.\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n * @param {Boolean} [options.isEqualSize=false] Indicates whether sizes of all card elements are equal to one another. If sizes of card elements to be arranged are all equal and this option is set to \"true\", the performance of layout arrangement can be improved. 카드 엘리먼트의 크기가 동일한지 여부. 배치될 카드 엘리먼트의 크기가 모두 동일할 때 이 옵션을 'true'로 설정하면 레이아웃 배치 성능을 높일 수 있다\n * @param {Number} [options.threshold=300] The threshold size of an event area where card elements are added to a layout.레이아웃에 카드 엘리먼트를 추가하는 이벤트가 발생하는 기준 영역의 크기.\n * @param {String|Object} [options.loadingBar={}] The loading bar HTML markup or element or element selector 로딩 바 HTML 또는 element 또는 selector \n *\n */\n\tfunction InfiniteGrid(element, options) {\n\t\t_classCallCheck(this, InfiniteGrid);\n\n\t\tvar _this = _possibleConstructorReturn(this, _Component.call(this));\n\n\t\t_extends(_this.options = {\n\t\t\titemSelector: \"*\",\n\t\t\tisOverflowScroll: false,\n\t\t\tthreshold: 300,\n\t\t\tisEqualSize: false,\n\t\t\tuseRecycle: true,\n\t\t\thorizontal: false,\n\t\t\tloadingBar: {}\n\t\t}, options);\n\t\t_consts.IS_ANDROID2 && (_this.options.isOverflowScroll = false);\n\t\t_this._isVertical = !_this.options.horizontal;\n\t\t_this._reset();\n\t\t_this._items = new _ItemManager2[\"default\"]();\n\t\t_this._renderer = new _DOMRenderer2[\"default\"](element, {\n\t\t\tisOverflowScroll: _this.options.isOverflowScroll,\n\t\t\tisEqualSize: _this.options.isEqualSize,\n\t\t\tisVertical: _this._isVertical\n\t\t});\n\t\t_this._watcher = new _Watcher2[\"default\"](_this._renderer, {\n\t\t\tlayout: function layout() {\n\t\t\t\treturn _this.layout();\n\t\t\t},\n\t\t\tcheck: function check(param) {\n\t\t\t\treturn _this._onCheck(param);\n\t\t\t}\n\t\t});\n\t\t_this._initLoadingBar();\n\t\treturn _this;\n\t}\n\t/**\n * Adds a card element at the bottom of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃 아래에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * 이 메소드는 isProcessing()의 반환값이 false일 경우에만 사용 가능하다.\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트의 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.append(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.append([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.append([HTMLElement1, HTMLElement2]);\n * infinitegrid.append(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.append = function append(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.APPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Adds a card element at the top of a layout. This method is available only if the isProcessing() method returns false.\n * @ko 카드 엘리먼트를 레이아웃의 위에 추가한다. isProcessing() 메서드의 반환값이 'false'일 때만 이 메서드를 사용할 수 있다\n * @param {Array|jQuery} elements Array of the card elements to be added 추가할 카드 엘리먼트 배열\n * @param {Number|String} [groupKey] The group key to be configured in a card element. It is automatically generated by default.\n * 추가할 카드 엘리먼트에 설정할 그룹 키. 생략하면 값이 자동으로 생성된다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.prepend(\"<div class='item'>test1</div><div class='item'>test2</div>\");\n * infinitegrid.prepend([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]);\n * infinitegrid.prepend([HTMLElement1, HTMLElement2]);\n * infinitegrid.prepend(jQuery([\"<div class='item'>test1</div>\", \"<div class='item'>test2</div>\"]));\n */\n\n\n\tInfiniteGrid.prototype.prepend = function prepend(elements, groupKey) {\n\t\tthis._layout && this._insert(elements, _consts.PREPEND, groupKey);\n\t\treturn this;\n\t};\n\t/**\n * Specifies the Layout class to use.\n * @ko 사용할 Layout 클래스를 지정한다.\n * @param {Class} LayoutKlass The Layout class to use 사용할 Layout 클래스\n * @param {Object} options Options to apply to the Layout.Layout에 적용할 옵션\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * infinitegrid.setLayout(eg.InfiniteGrid.GridLayout, {\n * margin: 10,\n * align: \"start\"\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.JustifiedLayout, {\n * margin: 10,\n * minSize: 100,\n * maxSize: 200\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.SquareLayout, {\n * margin: 10,\n * column: 2\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.FrameLayout, {\n * margin: 10,\n * frame: [\n * [1, 2],\n * [4, 3],\n * ]\n * });\n * infinitegrid.setLayout(eg.InfiniteGrid.PackingLayout, {\n * margin: 10,\n * aspectRatio: 1.5\n * });\n */\n\n\n\tInfiniteGrid.prototype.setLayout = function setLayout(LayoutKlass, options) {\n\t\tthis._layout = new LayoutKlass(_extends(options || {}, {\n\t\t\thorizontal: !this._isVertical\n\t\t}));\n\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\treturn this;\n\t};\n\t/**\n * Returns the layouted items.\n * @ko 레이아웃된 아이템들을 반환한다.\n * @param {Boolean} includeCached Indicates whether to include the cached items. 캐싱된 아이템을 포함할지 여부를 나타낸다.\n * @returns {Array} List of items 아이템의 목록\n */\n\n\n\tInfiniteGrid.prototype.getItems = function getItems() {\n\t\tvar includeCached = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\treturn this[includeCached ? \"_getItems\" : \"_getVisibleItems\"]();\n\t};\n\n\tInfiniteGrid.prototype._getItems = function _getItems() {\n\t\treturn this._items.pluck(\"items\", 0, this._items.size());\n\t};\n\n\tInfiniteGrid.prototype._getVisibleItems = function _getVisibleItems() {\n\t\treturn this._items.pluck(\"items\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._updateEdge = function _updateEdge() {\n\t\tthis._status.start = this._items.getEdge(\"start\", this._status.startCursor, this._status.endCursor);\n\t\tthis._status.end = this._items.getEdge(\"end\", this._status.startCursor, this._status.endCursor);\n\t};\n\n\tInfiniteGrid.prototype._getEdgeOffset = function _getEdgeOffset(cursor) {\n\t\tvar rect = null;\n\n\t\tif (!this._status[cursor]) {\n\t\t\tvar item = this._items.getEdge(cursor);\n\n\t\t\tthis._status[cursor] = item;\n\t\t}\n\n\t\tif (this._status[cursor]) {\n\t\t\trect = this._status[cursor].rect;\n\t\t\tif (cursor === \"start\") {\n\t\t\t\trect.bottom = rect.top + this._status[cursor].size.height;\n\t\t\t\trect.right = rect.left + this._status[cursor].size.width;\n\t\t\t}\n\t\t}\n\t\treturn rect;\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._fit = function _fit() {\n\t\tvar scrollCycle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"after\";\n\n\t\t// for caching\n\t\tif (!this.options.useRecycle) {\n\t\t\tthis._fit = function () {\n\t\t\t\treturn 0;\n\t\t\t};\n\t\t\treturn 0;\n\t\t}\n\t\tif (this._layout) {\n\t\t\tvar base = this._getEdgeValue(\"start\");\n\t\t\tvar margin = this._status.loadingSize;\n\n\t\t\tif (base !== 0 || margin) {\n\t\t\t\tif (!this._isLoading()) {\n\t\t\t\t\tthis._process(_consts.PROCESSING);\n\t\t\t\t}\n\t\t\t\tif (scrollCycle === \"before\") {\n\t\t\t\t\tthis._renderer.scrollBy(-Math.abs(base) + margin);\n\t\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\t}\n\t\t\t\tthis._items.fit(base - margin, this._isVertical);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") || margin);\n\t\t\t\tif (scrollCycle === \"after\") {\n\t\t\t\t\tthis._renderer.scrollBy(Math.abs(base) + margin);\n\t\t\t\t\tthis._watcher.setScrollPos();\n\t\t\t\t}\n\t\t\t\tif (!this._isLoading()) {\n\t\t\t\t\tthis._process(_consts.PROCESSING, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn base;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._getEdgeValue = function _getEdgeValue(cursor) {\n\t\treturn this._items.getEdgeValue(cursor, this._status.startCursor, this._status.endCursor);\n\t};\n\t/**\n * Rearranges a layout.\n * @ko 레이아웃을 다시 배치한다.\n * @param {Boolean} [isRelayout=true] Indicates whether a card element is being relayouted 카드 엘리먼트 재배치 여부\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.layout = function layout() {\n\t\tvar _this2 = this;\n\n\t\tvar isRelayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n\t\tif (!this._layout || this._isProcessing()) {\n\t\t\treturn this;\n\t\t}\n\t\t// check childElement\n\t\tif (!this._items.size()) {\n\t\t\tthis._insert((0, _utils.toArray)(this._renderer.container.children), true);\n\t\t\treturn this;\n\t\t} else {\n\t\t\tthis._process(_consts.PROCESSING);\n\n\t\t\tvar data = void 0;\n\t\t\tvar outline = void 0;\n\n\t\t\tif (isRelayout) {\n\t\t\t\t// remove cache\n\t\t\t\tdata = this._items.get(this._status.startCursor, this._status.endCursor);\n\t\t\t\tif (this._renderer.resize()) {\n\t\t\t\t\tthis._layout.setSize(this._renderer.getViewportSize());\n\t\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\t\tdata.items = _this2._renderer.updateSize(v.items);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdata = this._items.get(this._status.startCursor, this._items.size());\n\t\t\t\toutline = this._items.getOutline(this._status.startCursor, \"start\");\n\t\t\t}\n\t\t\tif (!data.length) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthis._layout.layout(data, outline);\n\n\t\t\tif (isRelayout) {\n\t\t\t\tthis._items.set(data);\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t\tthis._status.endCursor = data.length - 1;\n\t\t\t} else {\n\t\t\t\tdata.forEach(function (v) {\n\t\t\t\t\treturn _this2._items.set(v, v.groupKey);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._onLayoutComplete(data, _consts.APPEND, _consts.NO_TRUSTED);\n\t\t\t_DOMRenderer2[\"default\"].renderItems(this._getVisibleItems());\n\t\t\tisRelayout && this._watcher.setScrollPos();\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Removes a item element on a grid layout.\n * @ko 그리드 레이아웃의 카드 엘리먼트를 삭제한다.\n * @param {HTMLElement} item element to be removed 삭제될 아이템 엘리먼트\n * @return {Object} Removed item element 삭제된 아이템 엘리먼트 정보\n */\n\n\n\tInfiniteGrid.prototype.remove = function remove(element) {\n\t\tif (element) {\n\t\t\tvar items = this._items.remove(element, this._status.startCursor, this._status.endCursor);\n\n\t\t\tif (items) {\n\t\t\t\t_DOMRenderer2[\"default\"].removeElement(element);\n\t\t\t\treturn items;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tInfiniteGrid.prototype._getNextItems = function _getNextItems(isAppend) {\n\t\tvar items = [];\n\t\tvar size = this._items.size();\n\n\t\t// from cache\n\t\tif (size > 0 && this._status.startCursor !== -1 && this._status.endCursor !== -1) {\n\t\t\tif (isAppend && size > this._status.endCursor + 1) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.endCursor + 1);\n\t\t\t} else if (!isAppend && this._status.startCursor > 0) {\n\t\t\t\titems = this._items.pluck(\"items\", this._status.startCursor - 1);\n\t\t\t}\n\t\t}\n\t\treturn items;\n\t};\n\t/**\n * Returns the list of group keys which belongs to card elements currently being maintained. You can use the append() or prepend() method to configure group keys so that multiple card elements can be managed at once. If you do not use these methods to configure group keys, groupkey is automatically generated.\n * @ko 현재 유지하고 있는 카드 엘리먼트의 그룹 키 목록을 반환한다. 여러 개의 카드 엘리먼트를 묶어서 관리할 수 있도록 append() 메서드나 prepend() 메서드에서 그룹 키를 지정할 수 있다. append() 메서드나 prepend() 메서드에서 그룹 키를 지정하지 않았다면 자동으로 그룹키가 생성된다.\n * @param {Boolean} includeCached Indicates whether to include the cached groups. 캐싱된 그룹을 포함할지 여부를 나타낸다.\n * @return {Array} List of group keys 그룹 키의 목록\n */\n\n\n\tInfiniteGrid.prototype.getGroupKeys = function getGroupKeys(includeCached) {\n\t\tvar data = includeCached ? this._items.get() : this._items.get(this._status.startCursor, this._status.endCursor);\n\n\t\treturn data.map(function (v) {\n\t\t\treturn v.groupKey;\n\t\t});\n\t};\n\t/**\n * Returns the current state of a module such as location information. You can use the setStatus() method to restore the information returned through a call to this method.\n * @ko 카드의 위치 정보 등 모듈의 현재 상태 정보를 반환한다. 이 메서드가 반환한 정보를 저장해 두었다가 setStatus() 메서드로 복원할 수 있다\n * @return {Object} State object of the eg.InfiniteGrid moduleeg.InfiniteGrid 모듈의 상태 객체\n */\n\n\n\tInfiniteGrid.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\toptions: _extends({}, this.options),\n\t\t\t_status: _extends({}, this._status),\n\t\t\t_items: this._items.getStatus(),\n\t\t\t_renderer: this._renderer.getStatus(),\n\t\t\t_watcher: this._watcher.getStatus()\n\t\t};\n\t};\n\t/**\n * Sets the state of the eg.InfiniteGrid module with the information returned through a call to the getStatue() method.\n * @ko getStatue() 메서드가 저장한 정보로 eg.InfiniteGrid 모듈의 상태를 설정한다.\n * @param {Object} status State object of the eg.InfiniteGrid module eg.InfiniteGrid 모듈의 상태 객체\n * @param {boolean} [applyScrollPos=true] Checks whether to scroll스크롤의 위치를 복원할지 결정한다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (!status || !status.options || !status._status || !status._renderer || !status._items || !status._watcher) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._watcher.detachEvent();\n\t\t_extends(this.options, status.options);\n\t\t_extends(this._status, status._status);\n\t\tthis._items.setStatus(status._items, this._status.startCursor, this._status.endCursor);\n\t\tthis._renderer.setStatus(status._renderer, this._getVisibleItems());\n\t\tthis._watcher.setStatus(status._watcher, applyScrollPos);\n\t\tthis._updateEdge();\n\t\tthis._watcher.attachEvent();\n\t\treturn this;\n\t};\n\t/**\n * Clears added card elements and data.\n * @ko 추가된 카드 엘리먼트와 데이터를 모두 지운다.\n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.clear = function clear() {\n\t\tthis._items.clear();\n\t\tthis._renderer.clear();\n\t\tthis._reset();\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._initLoadingBar = function _initLoadingBar() {\n\t\tvar loadingBar = this.options.loadingBar;\n\t\tvar loadingBarObj = (typeof loadingBar === \"undefined\" ? \"undefined\" : _typeof(loadingBar)) === \"object\" ? loadingBar : {\n\t\t\t\"append\": loadingBar,\n\t\t\t\"prepend\": loadingBar\n\t\t};\n\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tthis._loadingBar = loadingBarObj;\n\t\tfor (var type in loadingBarObj) {\n\t\t\tloadingBarObj[type] = (0, _utils.$)(loadingBarObj[type]);\n\t\t}\n\t\tthis._appendLoadingBar();\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._appendLoadingBar = function _appendLoadingBar() {\n\t\tvar loadingBar = this._loadingBar;\n\t\tvar container = this._renderer.container;\n\n\t\tfor (var type in loadingBar) {\n\t\t\tcontainer.appendChild(loadingBar[type]);\n\t\t}\n\t};\n\t/**\n * Checks whether a card element or data is being added.\n * @ko 카드 엘리먼트 추가 또는 데이터 로딩이 진행 중인지 확인한다\n * @return {Boolean} Indicates whether a card element or data is being added 카드 엘리먼트 추가 또는 데이터 로딩 진행 중 여부\n */\n\n\n\tInfiniteGrid.prototype.isProcessing = function isProcessing() {\n\t\treturn this._isProcessing() || this._isLoading();\n\t};\n\n\tInfiniteGrid.prototype._isProcessing = function _isProcessing() {\n\t\treturn (this._status.procesingStatus & _consts.PROCESSING) > 0;\n\t};\n\n\tInfiniteGrid.prototype._isLoading = function _isLoading() {\n\t\treturn this._getLoadingStatus() > 0;\n\t};\n\n\tInfiniteGrid.prototype._getLoadingStatus = function _getLoadingStatus() {\n\t\treturn this._status.procesingStatus & (_consts.LOADING_APPEND | _consts.LOADING_PREPEND);\n\t};\n\n\tInfiniteGrid.prototype._process = function _process(status) {\n\t\tvar isAdd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tif (isAdd) {\n\t\t\tthis._status.procesingStatus |= status;\n\t\t} else {\n\t\t\tthis._status.procesingStatus -= this._status.procesingStatus & status;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insert = function _insert(elements, isAppend, groupKey) {\n\t\tif (this._isProcessing() || elements.length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tthis._process(_consts.PROCESSING);\n\t\tvar key = typeof groupKey === \"undefined\" ? new Date().getTime() + Math.floor(Math.random() * 1000) : groupKey;\n\t\tvar items = _ItemManager2[\"default\"].from((0, _utils.$)(elements, true), this.options.itemSelector, {\n\t\t\tisAppend: isAppend,\n\t\t\tgroupKey: key\n\t\t});\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._postLayout(_consts.NO_CACHE, items, isAppend, _consts.NO_TRUSTED);\n\t};\n\t// add items, and remove items for recycling\n\n\n\tInfiniteGrid.prototype._recycle = function _recycle(isAppend) {\n\t\tvar remove = [];\n\n\t\tif (this._status.startCursor !== this._status.endCursor) {\n\t\t\tfor (var i = this._status.startCursor; i <= this._status.endCursor; i++) {\n\t\t\t\tremove.push(this._isVisible(i));\n\t\t\t}\n\t\t}\n\t\tvar start = remove.indexOf(isAppend ? 1 : -1);\n\t\tvar end = remove.lastIndexOf(isAppend ? 1 : -1);\n\n\t\tif (start !== -1 && end !== -1) {\n\t\t\tstart = this._status.startCursor + start;\n\t\t\tend = start + end;\n\t\t\t_DOMRenderer2[\"default\"].removeItems(this._items.pluck(\"items\", start, end));\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.startCursor = end + 1;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor = start - 1;\n\t\t\t}\n\t\t}\n\t};\n\t/**\n * Returns the element of loading bar.\n * @ko 로딩 바의 element를 반환한다.\n * @param {Boolean} [isAppend=currentLoadingBar|true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @return {Element} The element of loading bar. 로딩 바의 element\n */\n\n\n\tInfiniteGrid.prototype.getLoadingBar = function getLoadingBar() {\n\t\tvar isAppend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._getLoadingStatus() !== _consts.LOADING_PREPEND;\n\n\t\treturn this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\t};\n\t/**\n * Start loading for append/prepend during loading data.\n * @ko 데이터가 로딩되는 동안 append/prepend하길 위해 로딩을 시작한다.\n * @param {Boolean} [isAppend=true] Checks whether the card element is added to the append () method. 카드 엘리먼트가 append() 메서드로 추가 할 것인지 확인한다.\n * @param {Object} [userStyle = {display: \"block\"}] custom style to apply to this loading bar for start. 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.startLoading = function startLoading(isAppend) {\n\t\tvar userStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { display: \"block\" };\n\n\t\tif (this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\n\t\tthis._process(isAppend ? _consts.LOADING_APPEND : _consts.LOADING_PREPEND);\n\t\tif (!this._loadingBar[type]) {\n\t\t\treturn this;\n\t\t}\n\t\tvar pos = isAppend ? this._getEdgeValue(\"end\") : 0;\n\n\t\tthis._renderLoading(isAppend, pos, userStyle);\n\t\tthis._status.loadingStyle = userStyle;\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t} else {\n\t\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\") + this._status.loadingSize);\n\t\t}\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._renderLoading = function _renderLoading(isAppend, pos) {\n\t\tvar _extends2;\n\n\t\tvar userStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._status.loadingStyle;\n\n\t\tvar el = this._loadingBar[isAppend ? \"append\" : \"prepend\"];\n\n\t\tif (!el) {\n\t\t\treturn;\n\t\t}\n\t\tvar style = _extends((_extends2 = {\n\t\t\tposition: \"absolute\"\n\t\t}, _extends2[this._isVertical ? \"top\" : \"left\"] = pos + \"px\", _extends2), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tthis._status.loadingSize = this._isVertical ? (0, _utils.innerHeight)(el) : (0, _utils.innerWidth)(el);\n\t};\n\t/**\n * End loading after startLoading() for append/prepend\n * @ko append/prepend하길 위해 startLoading() 호출해선 걸었던 로딩을 끝낸다.\n * @param {Object} [userStyle = {display: \"none\"}] custom style to apply to this loading bar for end 로딩 시작을 위한 로딩 바에 적용할 커스텀 스타일 \n * @return {eg.InfiniteGrid} An instance of a module itself모듈 자신의 인스턴스\n */\n\n\n\tInfiniteGrid.prototype.endLoading = function endLoading() {\n\t\tvar _extends3;\n\n\t\tvar userStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { display: \"none\" };\n\n\t\tif (!this._isLoading()) {\n\t\t\treturn this;\n\t\t}\n\t\tvar isAppend = this._getLoadingStatus() === _consts.LOADING_APPEND;\n\t\tvar type = isAppend ? \"append\" : \"prepend\";\n\t\tvar el = this._loadingBar[type];\n\t\tvar size = this._loadingSize;\n\n\t\tthis._process(_consts.LOADING_APPEND | _consts.LOADING_PREPEND, false);\n\t\tthis._status.loadingSize = 0;\n\t\tthis._status.loadingStyle = {};\n\t\tif (!el) {\n\t\t\treturn this;\n\t\t}\n\t\tvar style = _extends((_extends3 = {}, _extends3[this._isVertical ? \"top\" : \"left\"] = -size + \"px\", _extends3), userStyle);\n\n\t\tfor (var property in style) {\n\t\t\tel.style[property] = style[property];\n\t\t}\n\t\tif (!isAppend) {\n\t\t\tthis._fit(\"before\");\n\t\t}\n\t\tthis._renderer.setContainerSize(this._getEdgeValue(\"end\"));\n\t\treturn this;\n\t};\n\n\tInfiniteGrid.prototype._postLayout = function _postLayout(fromCache, items, isAppend, isTrusted) {\n\t\tvar _this3 = this;\n\n\t\tif (fromCache) {\n\t\t\tthis._renderer.createAndInsert(items, isAppend);\n\t\t\tthis._updateCursor(isAppend);\n\t\t\tthis.options.useRecycle && this._recycle(isAppend);\n\t\t\tthis._onLayoutComplete(items, isAppend, isTrusted);\n\t\t} else {\n\t\t\tvar method = isAppend ? \"append\" : \"prepend\";\n\n\t\t\tthis._renderer[method](items);\n\t\t\t// check image sizes after elements are attated on DOM\n\t\t\t_ImageLoaded2[\"default\"].check(items.map(function (item) {\n\t\t\t\treturn item.el;\n\t\t\t}), function () {\n\t\t\t\tvar layouted = _this3._layout[method](_this3._renderer.updateSize(items), _this3._items.getOutline(isAppend ? _this3._status.endCursor : _this3._status.startCursor, isAppend ? \"end\" : \"start\"));\n\n\t\t\t\t_this3._insertItems(layouted, isAppend);\n\t\t\t\t_this3._updateCursor(isAppend);\n\t\t\t\t_this3.options.useRecycle && _this3._recycle(isAppend);\n\t\t\t\t_DOMRenderer2[\"default\"].renderItems(layouted.items);\n\t\t\t\t_this3._onLayoutComplete(layouted.items, isAppend, isTrusted);\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._isVisible = function _isVisible(index) {\n\t\tvar min = Math.min.apply(Math, this._items.getOutline(index, \"start\"));\n\t\tvar max = Math.max.apply(Math, this._items.getOutline(index, \"end\"));\n\t\tvar pos = this._watcher.getScrollPos();\n\t\tvar viewSize = this._renderer.getViewSize();\n\n\t\tif (pos + viewSize + this.options.threshold < min) {\n\t\t\treturn -1;\n\t\t} else if (pos - this.options.threshold > max) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t};\n\n\tInfiniteGrid.prototype._updateCursor = function _updateCursor(isAppend) {\n\t\tif (this.options.useRecycle) {\n\t\t\tif (isAppend) {\n\t\t\t\tthis._status.endCursor++;\n\t\t\t} else if (this._status.startCursor > 0) {\n\t\t\t\tthis._status.startCursor--;\n\t\t\t} else {\n\t\t\t\tthis._status.endCursor++; // outside prepend\n\t\t\t}\n\t\t\tif (this._status.startCursor < 0) {\n\t\t\t\tthis._status.startCursor = 0;\n\t\t\t}\n\t\t} else {\n\t\t\tthis._status.startCursor = 0;\n\t\t\tthis._status.endCursor = this._items.size() - 1;\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._insertItems = function _insertItems(layouted, isAppend) {\n\t\tlayouted.groupKey = layouted.items[0].groupKey;\n\t\tthis._items[isAppend ? \"append\" : \"prepend\"](layouted);\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestAppend = function _requestAppend() {\n\t\tvar items = this._getNextItems(_consts.APPEND);\n\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.APPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the bottom or right of a layout because there is no card to be displayed on screen when a user scrolls near bottom or right.\n * @ko 카드 엘리먼트가 레이아웃의 아래나 오른쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 아래나 오른쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다\n * @event eg.InfiniteGrid#append\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 마지막 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"append\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().pop()\n\t\t\t});\n\t\t}\n\t};\n\t// called by visible\n\n\n\tInfiniteGrid.prototype._requestPrepend = function _requestPrepend() {\n\t\tvar items = this._getNextItems(_consts.PREPEND);\n\n\t\tif (items.length) {\n\t\t\tthis._postLayout(_consts.CACHE, items, _consts.PREPEND, _consts.TRUSTED);\n\t\t} else {\n\t\t\t/**\n * This event is fired when a card element must be added at the top or left of a layout because there is no card to be displayed on screen when a user scrolls near top or left.\n * @ko 카드가 레이아웃의 위나 왼쪽에 추가돼야 할 때 발생하는 이벤트. 사용자가 위나 왼쪽으로 스크롤해서 화면에 표시될 카드가 없을 때 발생한다.\n * @event eg.InfiniteGrid#prepend\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {String|Number} groupKey The group key of the first group visible on the screen 화면에 보여지는 첫번째 그룹의 그룹키\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\t\tthis.trigger(\"prepend\", {\n\t\t\t\tisTrusted: true,\n\t\t\t\tgroupKey: this.getGroupKeys().shift()\n\t\t\t});\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onCheck = function _onCheck(_ref) {\n\t\tvar isForward = _ref.isForward,\n\t\t scrollPos = _ref.scrollPos,\n\t\t horizontal = _ref.horizontal,\n\t\t orgScrollPos = _ref.orgScrollPos;\n\n\t\t/**\n * This event is fired when the user scrolls.\n * @ko 사용자가 스크롤 할 경우 발생하는 이벤트.\n * @event eg.InfiniteGrid#change\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Boolean} param.isForward Indicates whether the scroll progression direction is forward or backword. 스크롤 진행방향이 앞쪽으로 진행하는 지, 뒤쪽으로 진행하는지를 나타낸다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Boolean} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n * @param {Boolean} options.horizontal Direction of the scroll movement (true: horizontal, false: vertical) 스크롤 이동 방향 (true 가로방향, false 세로방향\n */\n\t\tthis.trigger(\"change\", {\n\t\t\tisForward: isForward,\n\t\t\thorizontal: horizontal,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos\n\t\t});\n\t\tif (this.isProcessing()) {\n\t\t\treturn;\n\t\t}\n\t\tvar rect = this._getEdgeOffset(isForward ? \"end\" : \"start\");\n\n\t\tif (!rect) {\n\t\t\treturn;\n\t\t}\n\t\tvar targetPos = isForward ? rect[horizontal ? \"left\" : \"top\"] - this._renderer.getViewSize() : rect[horizontal ? \"right\" : \"bottom\"];\n\n\t\tif (isForward) {\n\t\t\tif (scrollPos >= targetPos) {\n\t\t\t\tthis._requestAppend();\n\t\t\t}\n\t\t} else if (scrollPos <= targetPos) {\n\t\t\tthis._fit(\"before\");\n\t\t\tthis._requestPrepend();\n\t\t}\n\t};\n\n\tInfiniteGrid.prototype._onLayoutComplete = function _onLayoutComplete(items, isAppend) {\n\t\tvar isTrusted = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n\t\tthis._updateEdge();\n\t\tvar size = this._getEdgeValue(\"end\");\n\n\t\tthis._renderer.setContainerSize(size + this._status.loadingSize);\n\t\tif (isAppend) {\n\t\t\tthis._isLoading() && this._renderLoading(true, size);\n\t\t} else {\n\t\t\tthis._fit(\"after\");\n\t\t}\n\t\tthis._process(_consts.PROCESSING, false);\n\t\t/**\n * This event is fired when layout is successfully arranged through a call to the append(), prepend(), or layout() method.\n * @ko 레이아웃 배치가 완료됐을 때 발생하는 이벤트. append() 메서드나 prepend() 메서드, layout() 메서드 호출 후 카드의 배치가 완료됐을 때 발생한다\n * @event eg.InfiniteGrid#layoutComplete\n *\n * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\n * @param {Array} param.target Rearranged card elements재배치된 카드 엘리먼트들\n * @param {Boolean} param.isAppend Checks whether the append() method is used to add a card element. It returns true even though the layoutComplete event is fired after the layout() method is called. 카드 엘리먼트가 append() 메서드로 추가됐는지 확인한다. layout() 메서드가 호출된 후 layoutComplete 이벤트가 발생해도 'true'를 반환한다.\n * @param {Number} param.scrollPos Current scroll position value relative to the infiniteGrid container element. infiniteGrid 컨테이너 엘리먼트 기준의 현재 스크롤 위치값\n * @param {Number} param.orgScrollPos Current position of the scroll 현재 스크롤 위치값\n * @param {Number} param.size The size of container element 컨테이너 엘리먼트의 크기\n * @param {Boolean} param.isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.\n */\n\t\tthis.trigger(\"layoutComplete\", {\n\t\t\ttarget: items.concat(),\n\t\t\tisAppend: isAppend,\n\t\t\tisTrusted: isTrusted,\n\t\t\tscrollPos: this._watcher.getScrollPos(),\n\t\t\torgScrollPos: this._watcher.getOrgScrollPos(),\n\t\t\tsize: size\n\t\t});\n\t\tthis._watcher.reset();\n\t\t// console.warn(\"_onLayoutComplete [\", this._status.startCursor, this._status.endCursor, \"]\");\n\t};\n\n\tInfiniteGrid.prototype._reset = function _reset() {\n\t\tthis._status = {\n\t\t\tprocesingStatus: 0,\n\t\t\tstartCursor: -1,\n\t\t\tendCursor: -1,\n\t\t\tstart: null,\n\t\t\tend: null\n\t\t};\n\t};\n\t/**\n * Destroys elements, properties, and events used on a grid layout.\n * @ko 그리드 레이아웃에 사용한 엘리먼트와 속성, 이벤트를 해제한다\n */\n\n\n\tInfiniteGrid.prototype.destroy = function destroy() {\n\t\tthis.off();\n\t\tthis._watcher.destroy();\n\t\tthis._reset();\n\t\tthis._items.clear();\n\t\tthis._renderer.destroy();\n\t};\n\n\treturn InfiniteGrid;\n}(_component2[\"default\"]);\n\nInfiniteGrid.VERSION = \"3.0.0-rc\";\n\nexports[\"default\"] = InfiniteGrid;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/InfiniteGrid.js\n// module id = 6\n// module chunks = 0 1","/*!\n * Copyright (c) 2017 NAVER Corp.\r\n * @egjs/component project is licensed under the MIT license\r\n * \r\n * @egjs/component JavaScript library\r\n * http://naver.github.io/egjs/component\r\n * \r\n * @version 2.1.0\n */\n(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[\"Component\"] = factory();\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"Component\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _Component = __webpack_require__(1);\n\nvar _Component2 = _interopRequireDefault(_Component);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n_Component2[\"default\"].VERSION = \"2.1.0\";\nmodule.exports = _Component2[\"default\"];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.__esModule = true;\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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\n/**\n * A class used to manage events and options in a component\n * @ko 컴포넌트의 이벤트와 옵션을 관리할 수 있게 하는 클래스\n * @alias eg.Component\n */\nvar Component = function () {\n\t/**\n * @support {\"ie\": \"7+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.1+ (except 3.x)\"}\n */\n\tfunction Component() {\n\t\t_classCallCheck(this, Component);\n\n\t\tthis._eventHandler = {};\n\t\tthis.options = {};\n\t}\n\t/**\n * Triggers a custom event.\n * @ko 커스텀 이벤트를 발생시킨다\n * @param {String} eventName The name of the custom event to be triggered 발생할 커스텀 이벤트의 이름\n * @param {Object} customEvent Event data to be sent when triggering a custom event 커스텀 이벤트가 발생할 때 전달할 데이터\n * @return {Boolean} Indicates whether the event has occurred. If the stop() method is called by a custom event handler, it will return false and prevent the event from occurring. Ref 이벤트 발생 여부. 커스텀 이벤트 핸들러에서 stop() 메서드를 호출하면 'false'를 반환하고 이벤트 발생을 중단한다. 참고\n * @example\n class Some extends eg.Component {\n some(){\n \tif(this.trigger(\"beforeHi\")){ // When event call to stop return false.\n \tthis.trigger(\"hi\");// fire hi event.\n \t}\n }\n }\n const some = new Some();\n some.on(\"beforeHi\", (e) => {\n if(condition){\n \te.stop(); // When event call to stop, `hi` event not call.\n }\n });\n some.on(\"hi\", (e) => {\n // `currentTarget` is component instance.\n console.log(some === e.currentTarget); // true\n });\n // If you want to more know event design. You can see article.\n // https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F\n */\n\n\n\tComponent.prototype.trigger = function trigger(eventName) {\n\t\tvar customEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tvar handlerList = this._eventHandler[eventName] || [];\n\t\tvar hasHandlerList = handlerList.length > 0;\n\n\t\tif (!hasHandlerList) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If detach method call in handler in first time then handeler list calls.\n\t\thandlerList = handlerList.concat();\n\n\t\tcustomEvent.eventType = eventName;\n\n\t\tvar isCanceled = false;\n\t\tvar arg = [customEvent];\n\t\tvar i = 0;\n\n\t\tcustomEvent.stop = function () {\n\t\t\tisCanceled = true;\n\t\t};\n\t\tcustomEvent.currentTarget = this;\n\n\t\tfor (var _len = arguments.length, restParam = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t\t\trestParam[_key - 2] = arguments[_key];\n\t\t}\n\n\t\tif (restParam.length >= 1) {\n\t\t\targ = arg.concat(restParam);\n\t\t}\n\n\t\tfor (i = 0; handlerList[i]; i++) {\n\t\t\thandlerList[i].apply(this, arg);\n\t\t}\n\n\t\treturn !isCanceled;\n\t};\n\t/**\n * Executed event just one time.\n * @ko 이벤트가 한번만 실행된다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n alert(\"hi\");\n }\n thing() {\n this.once(\"hi\", this.hi);\n }\n }\n var some = new Some();\n some.thing();\n some.trigger(\"hi\");\n // fire alert(\"hi\");\n some.trigger(\"hi\");\n // Nothing happens\n */\n\n\n\tComponent.prototype.once = function once(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar i = void 0;\n\n\t\t\tfor (i in eventHash) {\n\t\t\t\tthis.once(i, eventHash[i]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar self = this;\n\n\t\t\tthis.on(eventName, function listener() {\n\t\t\t\tfor (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\t\t\targ[_key2] = arguments[_key2];\n\t\t\t\t}\n\n\t\t\t\thandlerToAttach.apply(self, arg);\n\t\t\t\tself.off(eventName, listener);\n\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t};\n\n\t/**\n * Checks whether an event has been attached to a component.\n * @ko 컴포넌트에 이벤트가 등록됐는지 확인한다.\n * @param {String} eventName The name of the event to be attached 등록 여부를 확인할 이벤트의 이름\n * @return {Boolean} Indicates whether the event is attached. 이벤트 등록 여부\n * @example\n class Some extends eg.Component {\n some() {\n this.hasOn(\"hi\");// check hi event.\n }\n }\n */\n\n\n\tComponent.prototype.hasOn = function hasOn(eventName) {\n\t\treturn !!this._eventHandler[eventName];\n\t};\n\n\t/**\n * Attaches an event to a component.\n * @ko 컴포넌트에 이벤트를 등록한다.\n * @param {eventName} eventName The name of the event to be attached 등록할 이벤트의 이름\n * @param {Function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.on(\"hi\",this.hi); //attach event\n }\n }\n */\n\n\n\tComponent.prototype.on = function on(eventName, handlerToAttach) {\n\t\tif ((typeof eventName === \"undefined\" ? \"undefined\" : _typeof(eventName)) === \"object\" && typeof handlerToAttach === \"undefined\") {\n\t\t\tvar eventHash = eventName;\n\t\t\tvar name = void 0;\n\n\t\t\tfor (name in eventHash) {\n\t\t\t\tthis.on(name, eventHash[name]);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else if (typeof eventName === \"string\" && typeof handlerToAttach === \"function\") {\n\t\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\t\tif (typeof handlerList === \"undefined\") {\n\t\t\t\tthis._eventHandler[eventName] = [];\n\t\t\t\thandlerList = this._eventHandler[eventName];\n\t\t\t}\n\n\t\t\thandlerList.push(handlerToAttach);\n\t\t}\n\n\t\treturn this;\n\t};\n\t/**\n * Detaches an event from the component.\n * @ko 컴포넌트에 등록된 이벤트를 해제한다\n * @param {eventName} eventName The name of the event to be detached 해제할 이벤트의 이름\n * @param {Function} handlerToDetach The handler function of the event to be detached 해제할 이벤트의 핸들러 함수\n * @return {eg.Component} An instance of a component itself 컴포넌트 자신의 인스턴스\n * @example\n class Some extends eg.Component {\n hi() {\n console.log(\"hi\");\n }\n some() {\n this.off(\"hi\",this.hi); //detach event\n }\n }\n */\n\n\n\tComponent.prototype.off = function off(eventName, handlerToDetach) {\n\t\t// All event detach.\n\t\tif (typeof eventName === \"undefined\") {\n\t\t\tthis._eventHandler = {};\n\t\t\treturn this;\n\t\t}\n\n\t\t// All handler of specific event detach.\n\t\tif (typeof handlerToDetach === \"undefined\") {\n\t\t\tif (typeof eventName === \"string\") {\n\t\t\t\tthis._eventHandler[eventName] = undefined;\n\t\t\t\treturn this;\n\t\t\t} else {\n\t\t\t\tvar eventHash = eventName;\n\t\t\t\tvar name = void 0;\n\n\t\t\t\tfor (name in eventHash) {\n\t\t\t\t\tthis.off(name, eventHash[name]);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\t// The handler of specific event detach.\n\t\tvar handlerList = this._eventHandler[eventName];\n\n\t\tif (handlerList) {\n\t\t\tvar k = void 0;\n\t\t\tvar handlerFunction = void 0;\n\n\t\t\tfor (k = 0; (handlerFunction = handlerList[k]) !== undefined; k++) {\n\t\t\t\tif (handlerFunction === handlerToDetach) {\n\t\t\t\t\thandlerList = handlerList.splice(k, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n\n\treturn Component;\n}();\n\nexports[\"default\"] = Component;\nmodule.exports = exports[\"default\"];\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=component.js.map\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@egjs/component/dist/component.js\n// module id = 7\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _consts = require(\"./consts\");\n\nvar _DOMRenderer = require(\"./DOMRenderer\");\n\nvar _DOMRenderer2 = _interopRequireDefault(_DOMRenderer);\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ItemManager = function () {\n\tItemManager.from = function from(elements, selector, _ref) {\n\t\tvar groupKey = _ref.groupKey,\n\t\t isAppend = _ref.isAppend;\n\n\t\tvar filted = ItemManager.selectItems((0, _utils.$)(elements, _consts.MULTI), selector);\n\n\t\t// Item Structure\n\t\treturn (0, _utils.toArray)(filted).map(function (el) {\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tgroupKey: groupKey,\n\t\t\t\tcontent: el.outerHTML\n\t\t\t};\n\t\t});\n\t};\n\n\tItemManager.selectItems = function selectItems(elements, selector) {\n\t\treturn elements.filter(function (v) {\n\t\t\tif (selector === \"*\") {\n\t\t\t\treturn v;\n\t\t\t} else {\n\t\t\t\treturn v.className.split(\" \").some(function (c) {\n\t\t\t\t\treturn c === selector;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t};\n\n\tItemManager.pluck = function pluck(data, property) {\n\t\treturn data.reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[property]);\n\t\t}, []);\n\t};\n\n\tfunction ItemManager() {\n\t\t_classCallCheck(this, ItemManager);\n\n\t\tthis.clear();\n\t}\n\n\tItemManager.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_data: this._data.map(function (data) {\n\t\t\t\tdata.items = data.items.map(function (item) {\n\t\t\t\t\tdelete item.el;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\treturn data;\n\t\t\t})\n\t\t};\n\t};\n\n\tItemManager.prototype.setStatus = function setStatus(status, start, end) {\n\t\tvar data = status._data;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tdata[i].items = _DOMRenderer2[\"default\"].createElements(data[i].items);\n\t\t}\n\t\tthis.set(data);\n\t};\n\n\tItemManager.prototype.size = function size() {\n\t\treturn this._data.length;\n\t};\n\n\tItemManager.prototype.fit = function fit(base, isVertical) {\n\t\tif (!this._data.length) {\n\t\t\treturn;\n\t\t}\n\t\tvar property = isVertical ? \"top\" : \"left\";\n\n\t\tif (base !== 0) {\n\t\t\tthis._data = this._data.map(function (v) {\n\t\t\t\tv.items = v.items.map(function (item) {\n\t\t\t\t\titem.rect[property] -= base;\n\t\t\t\t\treturn item;\n\t\t\t\t});\n\t\t\t\tv.outlines.start = v.outlines.start.map(function (start) {\n\t\t\t\t\treturn start - base;\n\t\t\t\t});\n\t\t\t\tv.outlines.end = v.outlines.end.map(function (end) {\n\t\t\t\t\treturn end - base;\n\t\t\t\t});\n\t\t\t\treturn v;\n\t\t\t});\n\t\t}\n\t};\n\n\tItemManager.prototype.pluck = function pluck(property, start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, end + 1), property);\n\t\t\t} else {\n\t\t\t\treturn ItemManager.pluck(this._data.slice(start, start + 1), property);\n\t\t\t}\n\t\t} else {\n\t\t\treturn ItemManager.pluck(this._data, property);\n\t\t}\n\t};\n\n\tItemManager.prototype.getOutline = function getOutline(index, property) {\n\t\tif (this._data.length) {\n\t\t\treturn this._data[index].outlines[property];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t};\n\n\tItemManager.prototype.getEdgeIndex = function getEdgeIndex(cursor, start, end) {\n\t\tvar prop = cursor === \"start\" ? \"min\" : \"max\";\n\t\tvar index = -1;\n\t\tvar targetValue = cursor === \"start\" ? Infinity : -Infinity;\n\n\t\tfor (var i = start; i <= end; i++) {\n\t\t\tvar value = Math[prop].apply(Math, this.getOutline(i, cursor));\n\n\t\t\tif (cursor === \"start\" && targetValue > value || cursor === \"end\" && targetValue < value) {\n\t\t\t\ttargetValue = value;\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t};\n\n\tItemManager.prototype.getEdge = function getEdge(cursor, start, end) {\n\t\tvar dataIdx = this.getEdgeIndex(cursor, start, end);\n\t\tvar items = this.pluck(\"items\", dataIdx);\n\n\t\tif (items.length) {\n\t\t\tvar itemIdx = this.getOutline(dataIdx, cursor + \"Index\");\n\n\t\t\treturn items.length > itemIdx ? items[itemIdx] : null;\n\t\t}\n\t\treturn null;\n\t};\n\n\tItemManager.prototype.getEdgeValue = function getEdgeValue(cursor, start, end) {\n\t\tvar outlines = this.pluck(\"outlines\", this.getEdgeIndex(cursor, start, end)).reduce(function (acc, v) {\n\t\t\treturn acc.concat(v[cursor]);\n\t\t}, []);\n\n\t\treturn outlines.length ? Math[cursor === \"start\" ? \"min\" : \"max\"].apply(Math, outlines) : 0;\n\t};\n\n\tItemManager.prototype.append = function append(layouted) {\n\t\tthis._data.push(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.prepend = function prepend(layouted) {\n\t\tthis._data.unshift(layouted);\n\t\treturn layouted.items;\n\t};\n\n\tItemManager.prototype.clear = function clear() {\n\t\tthis._data = [];\n\t};\n\n\tItemManager.prototype.remove = function remove(element, start, end) {\n\t\tvar items = null;\n\t\tvar key = element.getAttribute(_consts.GROUPKEY_ATT);\n\t\tvar data = this.get(start, end).filter(function (v) {\n\t\t\treturn String(v.groupKey) === key;\n\t\t});\n\n\t\tif (!data.length) {\n\t\t\treturn items;\n\t\t}\n\t\tdata = data[0];\n\n\t\tvar len = data.items.length;\n\t\tvar idx = -1;\n\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tif (data.items[i].el === element) {\n\t\t\t\tidx = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (~idx) {\n\t\t\t// remove item information\n\t\t\tdata.items.splice(idx, 1);\n\t\t\tthis.set(data, key);\n\t\t\titems = data.items;\n\t\t}\n\t\treturn items;\n\t};\n\n\tItemManager.prototype.get = function get(start, end) {\n\t\tif (typeof start !== \"undefined\") {\n\t\t\tif (typeof end !== \"undefined\") {\n\t\t\t\treturn this._data.slice(start, end + 1);\n\t\t\t} else {\n\t\t\t\treturn this._data.slice(start, start + 1);\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._data.concat();\n\t\t}\n\t};\n\n\tItemManager.prototype.set = function set(data, key) {\n\t\tif (typeof key !== \"undefined\" && !Array.isArray(data)) {\n\t\t\tvar len = this._data.length;\n\t\t\tvar idx = -1;\n\n\t\t\tfor (var i = 0; i < len; i++) {\n\t\t\t\tif (this._data[i].groupKey === key) {\n\t\t\t\t\tidx = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t~idx && (this._data[idx] = data);\n\t\t} else {\n\t\t\tthis._data = data.concat();\n\t\t}\n\t};\n\n\treturn ItemManager;\n}();\n\nexports[\"default\"] = ItemManager;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ItemManager.js\n// module id = 8\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 ImageLoaded = function () {\n\tfunction ImageLoaded() {\n\t\t_classCallCheck(this, ImageLoaded);\n\t}\n\n\tImageLoaded.waitImageLoaded = function waitImageLoaded(needCheck, callback) {\n\t\tvar checkCount = needCheck.length;\n\t\tvar checkImage = function checkImage() {\n\t\t\tcheckCount--;\n\t\t\tcheckCount <= 0 && callback && callback();\n\t\t};\n\t\tvar onCheck = function onCheck(e) {\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"load\", onCheck);\n\t\t\t(0, _utils.removeEvent)(e.target || e.srcElement, \"error\", onCheck);\n\t\t\tcheckImage();\n\t\t};\n\n\t\t// workaround for IE\n\t\t_consts.IS_IE && needCheck.forEach(function (v) {\n\t\t\treturn v.setAttribute(\"src\", v.getAttribute(\"src\"));\n\t\t});\n\t\tneedCheck.forEach(function (v) {\n\t\t\tif (v.complete) {\n\t\t\t\tcheckImage();\n\t\t\t} else {\n\t\t\t\t(0, _utils.addEvent)(v, \"load\", onCheck);\n\t\t\t\t(0, _utils.addEvent)(v, \"error\", onCheck);\n\t\t\t}\n\t\t});\n\t};\n\n\tImageLoaded.checkImageLoaded = function checkImageLoaded(el) {\n\t\tif (el.tagName === \"IMG\") {\n\t\t\treturn !el.complete ? [el] : [];\n\t\t} else {\n\t\t\treturn (0, _utils.toArray)(el.querySelectorAll(\"img\")).filter(function (v) {\n\t\t\t\tif (v.nodeType && [1, 9, 11].indexOf(v.nodeType) !== -1) {\n\t\t\t\t\treturn !v.complete;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n\n\tImageLoaded.check = function check(elements, callback) {\n\t\tvar _this = this;\n\n\t\tvar needCheck = elements.reduce(function (acc, v) {\n\t\t\treturn acc.concat(_this.checkImageLoaded(v));\n\t\t}, []);\n\n\t\tif (needCheck.length > 0) {\n\t\t\tImageLoaded.waitImageLoaded(needCheck, callback);\n\t\t} else {\n\t\t\t// convert to async\n\t\t\tsetTimeout(function () {\n\t\t\t\tcallback && callback();\n\t\t\t}, 0);\n\t\t}\n\t};\n\n\treturn ImageLoaded;\n}();\n\nexports[\"default\"] = ImageLoaded;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/ImageLoaded.js\n// module id = 9\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 Watcher = function () {\n\tfunction Watcher(renderer, callback) {\n\t\t_classCallCheck(this, Watcher);\n\n\t\t_extends(this._callback = {\n\t\t\tlayout: null,\n\t\t\tcheck: null\n\t\t}, callback);\n\t\tthis._timer = {\n\t\t\tresize: null\n\t\t\t// doubleCheck: null,\n\t\t\t// doubleCheckCount: RETRY,\n\t\t};\n\t\tthis.reset();\n\t\tthis._renderer = renderer;\n\t\tthis._onCheck = this._onCheck.bind(this);\n\t\tthis._onResize = this._onResize.bind(this);\n\t\tthis.attachEvent();\n\t\tthis.setScrollPos();\n\t}\n\n\tWatcher.prototype.getStatus = function getStatus() {\n\t\treturn {\n\t\t\t_prevPos: this._prevPos,\n\t\t\tscrollPos: this.getOrgScrollPos()\n\t\t};\n\t};\n\n\tWatcher.prototype.setStatus = function setStatus(status) {\n\t\tvar applyScrollPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\t\tthis._prevPos = status._prevPos;\n\t\tapplyScrollPos && this.scrollTo(status.scrollPos);\n\t};\n\n\tWatcher.prototype.scrollTo = function scrollTo(pos) {\n\t\tvar arrPos = this._renderer.options.isVertical ? [0, pos] : [pos, 0];\n\n\t\t_utils.scrollTo.apply(undefined, [this._renderer.view].concat(arrPos));\n\t};\n\n\tWatcher.prototype.getScrollPos = function getScrollPos() {\n\t\treturn this._prevPos;\n\t};\n\n\tWatcher.prototype.setScrollPos = function setScrollPos(pos) {\n\t\tvar rawPos = pos;\n\n\t\tif (typeof pos === \"undefined\") {\n\t\t\trawPos = this.getOrgScrollPos();\n\t\t}\n\t\tthis._prevPos = rawPos - this._renderer.getContainerOffset();\n\t};\n\n\tWatcher.prototype.attachEvent = function attachEvent() {\n\t\t(0, _utils.addEvent)(this._renderer.view, \"scroll\", this._onCheck);\n\t\t(0, _utils.addEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.getOrgScrollPos = function getOrgScrollPos() {\n\t\treturn (0, _utils.scroll)(this._renderer.view, this._renderer.options.isVertical);\n\t};\n\n\tWatcher.prototype.reset = function reset() {\n\t\tthis._prevPos = null;\n\t};\n\n\tWatcher.prototype._onCheck = function _onCheck() {\n\t\tvar orgScrollPos = this.getOrgScrollPos();\n\t\tvar prevPos = this.getScrollPos();\n\n\t\tthis.setScrollPos(orgScrollPos);\n\t\tvar scrollPos = this.getScrollPos();\n\n\t\tif (_consts.IS_IOS && (orgScrollPos === 0 || prevPos === null) || prevPos === scrollPos) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._callback.check && this._callback.check({\n\t\t\tisForward: prevPos < scrollPos,\n\t\t\tscrollPos: scrollPos,\n\t\t\torgScrollPos: orgScrollPos,\n\t\t\thorizontal: !this._renderer.options.isVertical\n\t\t});\n\t};\n\n\tWatcher.prototype._onResize = function _onResize() {\n\t\tvar _this = this;\n\n\t\tif (this._timer.resize) {\n\t\t\tclearTimeout(this._timer.resize);\n\t\t}\n\t\tthis._timer.resize = setTimeout(function () {\n\t\t\t_this._renderer.isNeededResize() && _this._callback.layout && _this._callback.layout();\n\t\t\t_this._timer.resize = null;\n\t\t}, 100);\n\t};\n\n\tWatcher.prototype.detachEvent = function detachEvent() {\n\t\t(0, _utils.removeEvent)(window, \"resize\", this._onResize);\n\t};\n\n\tWatcher.prototype.destroy = function destroy() {\n\t\tthis.detachEvent();\n\t\tthis.reset();\n\t};\n\n\treturn Watcher;\n}();\n\nexports[\"default\"] = Watcher;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/Watcher.js\n// module id = 10\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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\n// ALIGN\nvar START = _consts.ALIGN.START,\n CENTER = _consts.ALIGN.CENTER,\n END = _consts.ALIGN.END,\n JUSTIFY = _consts.ALIGN.JUSTIFY;\n\n/**\n * A module used to arrange card elements including content infinitely according to layout type. With this module, you can implement various layouts composed of different card elements whose sizes vary. It guarantees performance by maintaining the number of DOMs the module is handling under any circumstance\n * @ko GridLayout는 벽돌을 쌓아 올린 모양처럼 동일한 너비를 가진 이미지가 엇갈려 배열되는 레이아웃이다. 모든 이미지의 너비를 동일한 크기로 조정하고, 가장 높이가 낮은 열을 찾아 새로운 이미지를 삽입한다. 따라서 배치된 이미지 사이에 빈 공간이 생기지는 않지만 배치된 레이아웃의 아래쪽은 울퉁불퉁해진다.\n * @class eg.InfiniteGrid.GridLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.GridLayout module eg.InfiniteGrid.GridLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.align=START] Align of the position of the items (START, CENTER, END, JUSTIFY) 아이템들의 위치의 정렬 (START, CENTER, END, JUSTIFY)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar GridLayout = function () {\n\tfunction GridLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, GridLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\talign: START,\n\t\t\titemSize: 0\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._columnSize = 0;\n\t\tthis._columnLength = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tGridLayout.prototype.getPoints = function getPoints(outlines) {\n\t\tvar pos = this.options.horizontal ? \"left\" : \"top\";\n\n\t\treturn outlines.map(function (outline) {\n\t\t\treturn outline[pos];\n\t\t});\n\t};\n\n\tGridLayout.prototype.checkColumn = function checkColumn(item) {\n\t\tvar margin = this.options.margin;\n\t\tvar sizeName = this.options.horizontal ? \"height\" : \"width\";\n\t\tvar columnSize = this.options.itemSize || item && item.size[sizeName] || 0;\n\n\t\tthis._columnSize = columnSize;\n\t\tif (!columnSize) {\n\t\t\tthis._columnLength = 1;\n\t\t\treturn;\n\t\t}\n\t\tthis._columnLength = Math.max(parseInt((this._size + margin) / (columnSize + margin), 10), 1);\n\t};\n\n\tGridLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar length = items.length;\n\t\tvar margin = this.options.margin;\n\t\tvar align = this.options.align;\n\t\tvar style = this._style;\n\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar columnSize = this._columnSize;\n\t\tvar columnLength = this._columnLength;\n\n\t\tvar size = this._size;\n\t\tvar viewDist = size - (columnSize + margin) * columnLength + margin;\n\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar startOutline = outline.slice();\n\t\tvar endOutline = outline.slice();\n\t\tvar startIndex = 0;\n\t\tvar endIndex = -1;\n\t\tvar endPos = -1;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _item$rect;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline) || 0;\n\t\t\tvar index = endOutline.indexOf(point);\n\t\t\tvar item = items[isAppend ? i : length - 1 - i];\n\t\t\tvar size1 = item.size[size1Name];\n\t\t\tvar size2 = item.size[size2Name];\n\t\t\tvar pos1 = isAppend ? point : point - margin - size1;\n\t\t\tvar endPos1 = pos1 + size1 + margin;\n\n\t\t\tif (index === -1) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tvar pos2 = (columnSize + margin) * index;\n\n\t\t\t// ALIGN\n\t\t\tif (align === CENTER) {\n\t\t\t\tpos2 += viewDist / 2;\n\t\t\t} else if (align === END) {\n\t\t\t\tpos2 += viewDist + columnSize - size2;\n\t\t\t} else if (align === JUSTIFY) {\n\t\t\t\tif (columnLength <= 1) {\n\t\t\t\t\tpos2 += viewDist / 2;\n\t\t\t\t} else {\n\t\t\t\t\tpos2 = (size - columnSize) / (columnLength - 1) * index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// tetris\n\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect);\n\t\t\titem.column = index;\n\t\t\tendOutline[index] = isAppend ? endPos1 : pos1;\n\t\t\tif (endIndex === -1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t} else if (endPos < endPos1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tendPos = endPos1;\n\t\t\t}\n\t\t}\n\t\tif (!isAppend) {\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tendIndex = length - 1;\n\t\t}\n\t\t// if append items, startOutline is low, endOutline is high\n\t\t// if prepend items, startOutline is high, endOutline is low\n\t\treturn {\n\t\t\tstart: isAppend ? startOutline : endOutline,\n\t\t\tend: isAppend ? endOutline : startOutline,\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tGridLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\tvar startOutline = outline;\n\n\t\tif (!this._columnLength) {\n\t\t\tthis.checkColumn(items[0]);\n\t\t}\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, outline.length === 0 ? 0 : Math[type === _consts.APPEND ? \"min\" : \"max\"].apply(Math, outline) || 0);\n\t\t}\n\n\t\tvar result = this._layout(clone, startOutline, type);\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: result\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.GridLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tGridLayout.prototype.layout = function layout() {\n\t\tvar _this = this;\n\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar firstItem = groups.length && groups[0].items.length && groups[0].items[0] || 0;\n\n\t\tthis.checkColumn(firstItem);\n\n\t\t// if outlines' length and columns' length are now same, re-caculate outlines.\n\t\tvar startOutline = void 0;\n\n\t\tif (outline.length !== this._columnLength) {\n\t\t\tvar pos = outline.length === 0 ? 0 : Math.min.apply(Math, outline);\n\n\t\t\t// re-layout items.\n\t\t\tstartOutline = (0, _utils.fill)(this._columnLength, pos);\n\t\t} else {\n\t\t\tstartOutline = outline.slice();\n\t\t}\n\t\tgroups.forEach(function (group) {\n\t\t\tvar items = group.items;\n\t\t\tvar result = _this._layout(items, startOutline, _consts.APPEND);\n\n\t\t\tgroup.outlines = result;\n\t\t\tstartOutline = result.end;\n\t\t});\n\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.GridLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.GridLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tGridLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn GridLayout;\n}();\n\nexports[\"default\"] = GridLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/GridLayout.js\n// module id = 11\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\n\nvar _FrameLayout2 = require(\"./FrameLayout\");\n\nvar _FrameLayout3 = _interopRequireDefault(_FrameLayout2);\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction makeShapeOutline(outline, itemSize, columnLength, isAppend) {\n\tvar point = Math[isAppend ? \"min\" : \"max\"].apply(Math, outline) || 0;\n\n\tif (outline.length !== columnLength) {\n\t\treturn (0, _utils.fill)(columnLength, 0);\n\t}\n\treturn outline.map(function (l) {\n\t\treturn parseInt((l - point) / itemSize, 10);\n\t});\n}\nfunction getColumn(item) {\n\tif (item.column) {\n\t\treturn item.column;\n\t}\n\tvar column = 0;\n\n\tif (item.el) {\n\t\tvar dataset = item.el.dataset;\n\n\t\tif (dataset) {\n\t\t\tcolumn = dataset.column || 1;\n\t\t} else {\n\t\t\tcolumn = item.el.getAttribute(\"column\") || 1;\n\t\t}\n\t} else {\n\t\tcolumn = 1;\n\t}\n\titem.column = column;\n\treturn column;\n}\n\n/**\n * FrameLayout is a layout that allows you to place items in a given frame. It is a layout that corresponds to a level intermediate between the placement of the image directly by the designer and the layout using the algorithm.\n * @ko FrameLayout은 주어진 프레임에 맞춰 아이템을 배치하는 레이아웃입니다. 디자이너가 직접 이미지를 배치하는 것과 알고리즘을 사용한 배치의 중간 정도 수준에 해당하는 레이아웃이다.\n * @class eg.InfiniteGrid.SquareLayout\n * @extends eg.InfiniteGrid.FrameLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.SquareLayout module eg.InfiniteGrid.SquareLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.itemSize=0] The size of the items. If it is 0, it is calculated as the size of the first item in items. 아이템의 사이즈. 만약 아이템 사이즈가 0이면, 아이템들의 첫번째 아이템의 사이즈로 계산이 된다. \n * @example\n```\n\n```\n **/\n\nvar SquareLayout = function (_FrameLayout) {\n\t_inherits(SquareLayout, _FrameLayout);\n\n\tfunction SquareLayout() {\n\t\t_classCallCheck(this, SquareLayout);\n\n\t\treturn _possibleConstructorReturn(this, _FrameLayout.apply(this, arguments));\n\t}\n\n\tSquareLayout.prototype._checkItemSize = function _checkItemSize() {\n\t\tvar column = this.options.column;\n\n\t\tif (!column) {\n\t\t\t_FrameLayout.prototype._checkItemSize.call(this);\n\t\t\treturn;\n\t\t}\n\t\tvar margin = this.options.margin;\n\n\t\t// if itemSize is not in options, caculate itemSize from size.\n\t\tthis._itemSize = (this._size + margin) / column - margin;\n\t};\n\n\tSquareLayout.prototype._layout = function _layout(items) {\n\t\tvar _shapes;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar itemSize = this._getItemSize();\n\t\tvar margin = this.options.margin;\n\t\tvar columnLength = this.options.column || parseInt((this._size + margin) / (itemSize + margin), 10) || 1;\n\t\tvar length = items.length;\n\t\tvar endOutline = makeShapeOutline(outline, itemSize, columnLength, isAppend);\n\t\tvar pointCaculateName = isAppend ? \"min\" : \"max\";\n\t\tvar shapes = [];\n\t\tvar sign = isAppend ? 1 : -1;\n\t\tvar style = this._style;\n\t\tvar pos1Name = style.pos1;\n\t\tvar pos2Name = style.pos2;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar _shapes$push;\n\n\t\t\tvar point = Math[pointCaculateName].apply(Math, endOutline);\n\t\t\tvar index = (0, _utils.indexOf)(endOutline, point, !isAppend);\n\t\t\tvar item = items[i];\n\t\t\tvar columnWidth = item.columnWidth;\n\t\t\tvar column = columnWidth && columnWidth[0] === columnLength && columnWidth[1] || getColumn(item);\n\t\t\tvar columnCount = 1;\n\n\t\t\tif (column > 1) {\n\t\t\t\tfor (var j = 1; j < column && (isAppend && index + j < columnLength || !isAppend && index - j >= 0); ++j) {\n\t\t\t\t\tif (isAppend && endOutline[index + sign * j] <= point || !isAppend && endOutline[index + sign * j] >= point) {\n\t\t\t\t\t\t++columnCount;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!isAppend) {\n\t\t\t\t\tindex -= columnCount - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\titem.columnWidth = [columnLength, columnCount];\n\t\t\tshapes.push((_shapes$push = {\n\t\t\t\twidth: columnCount,\n\t\t\t\theight: columnCount\n\t\t\t}, _shapes$push[pos1Name] = point - (!isAppend ? columnCount : 0), _shapes$push[pos2Name] = index, _shapes$push.index = i, _shapes$push));\n\t\t\tfor (var _j = 0; _j < columnCount; ++_j) {\n\t\t\t\tendOutline[index + _j] = point + sign * columnCount;\n\t\t\t}\n\t\t}\n\t\tthis._shapes = (_shapes = {\n\t\t\tshapes: shapes\n\t\t}, _shapes[style.size2] = columnLength, _shapes);\n\n\t\tvar result = _FrameLayout.prototype._layout.call(this, items, outline, isAppend);\n\n\t\tif (!isAppend) {\n\t\t\tvar lastItem = items[items.length - 1];\n\n\t\t\tshapes.sort(function (shape1, shape2) {\n\t\t\t\tvar item1pos1 = shape1[pos1Name];\n\t\t\t\tvar item1pos2 = shape1[pos2Name];\n\t\t\t\tvar item2pos1 = shape2[pos1Name];\n\t\t\t\tvar item2pos2 = shape2[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\titems.sort(function (a, b) {\n\t\t\t\tvar item1pos1 = a.rect[pos1Name];\n\t\t\t\tvar item1pos2 = a.rect[pos2Name];\n\t\t\t\tvar item2pos1 = b.rect[pos1Name];\n\t\t\t\tvar item2pos2 = b.rect[pos2Name];\n\n\t\t\t\tif (item1pos1 - item2pos1) {\n\t\t\t\t\treturn item1pos1 - item2pos1;\n\t\t\t\t}\n\t\t\t\treturn item1pos2 - item2pos2;\n\t\t\t});\n\t\t\tresult.startIndex = 0;\n\t\t\tresult.endIndex = items.indexOf(lastItem);\n\t\t}\n\t\treturn result;\n\t};\n\n\treturn SquareLayout;\n}(_FrameLayout3[\"default\"]);\n\nexports[\"default\"] = SquareLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/SquareLayout.js\n// module id = 12\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 _BoxModel = require(\"./lib/BoxModel.js\");\n\nvar _BoxModel2 = _interopRequireDefault(_BoxModel);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getCost(originLength, length) {\n\tvar cost = originLength / length;\n\n\tif (cost < 1) {\n\t\tcost = 1 / cost;\n\t}\n\n\treturn cost - 1;\n}\nfunction fitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical) {\n\titem.setHeight(itemFitSize.height);\n\titem.setWidth(itemFitSize.width);\n\tbestFitArea.setHeight(containerFitSize.height);\n\tbestFitArea.setWidth(containerFitSize.width);\n\n\tif (layoutVertical) {\n\t\titem.setTop(bestFitArea.getTop() + bestFitArea.getHeight());\n\t\titem.setLeft(bestFitArea.getLeft());\n\t} else {\n\t\titem.setLeft(bestFitArea.getLeft() + bestFitArea.getWidth());\n\t\titem.setTop(bestFitArea.getTop());\n\t}\n}\n\n/**\n * PackingLayout show important images bigger without sacrificing the inherent size of the image. Rows and columns are separated so that images are dynamically placed within the horizontal and vertical space rather than arranged in an orderly fashion.\n * @ko PackingLayout은 이미지의 본래 크기에 따른 비중을 해치지 않으면서 중요한 이미지는 더 크게 보여 준다. 행과 열이 구분돼 이미지를 정돈되게 배치하는 대신 가로세로 일정 공간 내에서 동적으로 이미지를 배치한다.\n * @class eg.InfiniteGrid.PackingLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.PackingLayout module eg.InfiniteGrid.PackingLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.aspectRatio=1] The aspect ratio of the group 그룹의 가로 세로 비 \n * @param {Boolean} [options.sizeWeight=1] The size weight when placing an image 이미지를 배치할 때 사이즈 가중치 \n * @param {Boolean} [options.ratioWeight=1] The ratio weight when placing an image 이미지를 배치할 때 비율 가중치 \n * @example\n```\n\n```\n **/\n\nvar PackingLayout = function () {\n\tfunction PackingLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, PackingLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\taspectRatio: 1,\n\t\t\tsizeWeight: 1,\n\t\t\tratioWeight: 1\n\t\t}, options);\n\t\tthis._size = 0;\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t}\n\n\tPackingLayout.prototype._findBestFitArea = function _findBestFitArea(container, item) {\n\t\tif (container.getRatio() === 0) {\n\t\t\t// 아이템 최초 삽입시 전체영역 지정\n\t\t\tcontainer.setOriginWidth(item.getWidth());\n\t\t\tcontainer.setOriginHeight(item.getHeight());\n\t\t\tcontainer.setWidth(item.getWidth());\n\t\t\tcontainer.setHeight(item.getHeight());\n\t\t\treturn;\n\t\t}\n\n\t\tvar bestFitArea = null;\n\t\tvar minCost = 10000000;\n\t\tvar layoutVertical = false;\n\t\tvar itemFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar containerFitSize = {\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t};\n\t\tvar _options = this.options,\n\t\t sizeWeight = _options.sizeWeight,\n\t\t ratioWeight = _options.ratioWeight;\n\n\n\t\tcontainer.innerItem().forEach(function (v) {\n\t\t\tvar containerSizeCost = getCost(v.getOriginSize(), v.getSize()) * sizeWeight;\n\t\t\tvar containerRatioCost = getCost(v.getOriginRatio(), v.getRatio()) * ratioWeight;\n\t\t\tvar cost = void 0;\n\n\t\t\tfor (var i = 0; i < 2; ++i) {\n\t\t\t\tvar itemWidth = void 0;\n\t\t\t\tvar itemHeight = void 0;\n\t\t\t\tvar containerWidth = void 0;\n\t\t\t\tvar containerHeight = void 0;\n\n\t\t\t\tif (i === 0) {\n\t\t\t\t\t// 상하에 아이템 추가\n\t\t\t\t\titemWidth = v.getWidth();\n\t\t\t\t\titemHeight = v.getHeight() * (item.getHeight() / (v.getOriginHeight() + item.getHeight()));\n\t\t\t\t\tcontainerWidth = v.getWidth();\n\t\t\t\t\tcontainerHeight = v.getHeight() - itemHeight;\n\t\t\t\t} else {\n\t\t\t\t\t// 좌우에 아이템 추가\n\t\t\t\t\titemHeight = v.getHeight();\n\t\t\t\t\titemWidth = v.getWidth() * (item.getWidth() / (v.getOriginWidth() + item.getWidth()));\n\t\t\t\t\tcontainerHeight = v.getHeight();\n\t\t\t\t\tcontainerWidth = v.getWidth() - itemWidth;\n\t\t\t\t}\n\n\t\t\t\tvar itemSize = itemWidth * itemHeight;\n\t\t\t\tvar itemRatio = itemWidth / itemHeight;\n\t\t\t\tvar containerSize = containerWidth * containerHeight;\n\t\t\t\tvar containerRatio = containerHeight / containerHeight;\n\n\t\t\t\tcost = getCost(item.getSize(), itemSize) * sizeWeight;\n\t\t\t\tcost += getCost(item.getRatio(), itemRatio) * ratioWeight;\n\t\t\t\tcost += getCost(v.getOriginSize(), containerSize) * sizeWeight - containerSizeCost;\n\t\t\t\tcost += getCost(v.getOriginRatio(), containerRatio) * ratioWeight - containerRatioCost;\n\n\t\t\t\tif (cost === Math.min(cost, minCost)) {\n\t\t\t\t\tminCost = cost;\n\t\t\t\t\tbestFitArea = v;\n\t\t\t\t\tlayoutVertical = i === 0;\n\t\t\t\t\titemFitSize.width = itemWidth;\n\t\t\t\t\titemFitSize.height = itemHeight;\n\t\t\t\t\tcontainerFitSize.width = containerWidth;\n\t\t\t\t\tcontainerFitSize.height = containerHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfitArea(item, bestFitArea, itemFitSize, containerFitSize, layoutVertical);\n\t};\n\n\tPackingLayout.prototype._layout = function _layout(items) {\n\t\tvar _this = this;\n\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar isAppend = arguments[2];\n\n\t\tvar style = this._style;\n\t\tvar isHorizontal = this.options.horizontal;\n\t\tvar aspectRatio = this.options.aspectRatio;\n\t\tvar margin = this.options.margin;\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar containerWidth = this._size * (isHorizontal ? aspectRatio : 1);\n\t\tvar containerHeight = this._size / (isHorizontal ? 1 : aspectRatio);\n\t\tvar containerSize1 = isHorizontal ? containerWidth : containerHeight;\n\t\tvar prevOutline = (0, _utils.toZeroArray)(outline);\n\t\tvar start = isAppend ? Math.max.apply(Math, prevOutline) : Math.min.apply(Math, prevOutline) - containerSize1 - margin;\n\t\tvar end = start + containerSize1 + margin;\n\t\tvar container = new _BoxModel2[\"default\"]({});\n\n\t\tvar startIndex = -1;\n\t\tvar endIndex = -1;\n\t\tvar startPos = -1;\n\t\tvar endPos = -1;\n\n\t\titems.forEach(function (item) {\n\t\t\tvar model = new _BoxModel2[\"default\"]({\n\t\t\t\toriginWidth: item.orgSize.width,\n\t\t\t\toriginHeight: item.orgSize.height,\n\t\t\t\twidth: item.orgSize.width,\n\t\t\t\theight: item.orgSize.height\n\t\t\t});\n\n\t\t\t_this._findBestFitArea(container, model);\n\t\t\tcontainer.pushItem(model);\n\t\t\tcontainer.scaleTo(containerWidth + margin, containerHeight + margin);\n\t\t});\n\t\titems.forEach(function (item, i) {\n\t\t\tvar boxItem = container.innerItem()[i];\n\t\t\t// console.log(\"boxItem\", boxItem, boxItem instanceof BoxModel);\n\t\t\tvar width = boxItem.getWidth();\n\t\t\tvar height = boxItem.getHeight();\n\t\t\tvar top = boxItem.getTop();\n\t\t\tvar left = boxItem.getLeft();\n\n\t\t\titem.rect = { top: top, left: left, width: width - margin, height: height - margin };\n\t\t\titem.rect[pos1Name] += start;\n\n\t\t\tif (startIndex === -1) {\n\t\t\t\tstartIndex = i;\n\t\t\t\tendIndex = i;\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tendPos = startPos;\n\t\t\t}\n\t\t\tif (startPos > item.rect[pos1Name]) {\n\t\t\t\tstartPos = item.rect[pos1Name];\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t\tif (endPos < item.rect[pos1Name] + item.rect[size1Name] + margin) {\n\t\t\t\tendPos = item.rect[pos1Name] + item.rect[size1Name] + margin;\n\t\t\t\tendIndex = i;\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tstart: [start],\n\t\t\tend: [end],\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tPackingLayout.prototype._insert = function _insert() {\n\t\tvar items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\t\tvar type = arguments[2];\n\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tPackingLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.PackingLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100, 200, 300, 400]);\n */\n\n\n\tPackingLayout.prototype.layout = function layout() {\n\t\tvar groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\t\tvar outline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n\t\tvar length = groups.length;\n\t\tvar point = outline;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.PackingLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.PackingLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tPackingLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\n\treturn PackingLayout;\n}();\n\nexports[\"default\"] = PackingLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/PackingLayout.js\n// module id = 13\n// module chunks = 0 1","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BoxModel = function () {\n\tfunction BoxModel(option) {\n\t\t_classCallCheck(this, BoxModel);\n\n\t\tthis._originWidth = option.originWidth || 0;\n\t\tthis._originHeight = option.originHeight || 0;\n\t\tthis._width = option.width || 0;\n\t\tthis._height = option.height || 0;\n\t\tthis._left = option.left || 0;\n\t\tthis._top = option.top || 0;\n\t\tthis._item = option.item;\n\t\tthis._innerItem = option.innerItem || [];\n\t}\n\n\tBoxModel.prototype.getOriginWidth = function getOriginWidth() {\n\t\treturn this._originWidth;\n\t};\n\n\tBoxModel.prototype.setOriginWidth = function setOriginWidth(width) {\n\t\tthis._originWidth = width;\n\t};\n\n\tBoxModel.prototype.getOriginHeight = function getOriginHeight() {\n\t\treturn this._originHeight;\n\t};\n\n\tBoxModel.prototype.setOriginHeight = function setOriginHeight(height) {\n\t\tthis._originHeight = height;\n\t};\n\n\tBoxModel.prototype.getWidth = function getWidth() {\n\t\treturn this._width;\n\t};\n\n\tBoxModel.prototype.setWidth = function setWidth(width) {\n\t\tthis._width = width;\n\t};\n\n\tBoxModel.prototype.getHeight = function getHeight() {\n\t\treturn this._height;\n\t};\n\n\tBoxModel.prototype.setHeight = function setHeight(height) {\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.getLeft = function getLeft() {\n\t\treturn this._left;\n\t};\n\n\tBoxModel.prototype.setLeft = function setLeft(left) {\n\t\tthis._left = left;\n\t};\n\n\tBoxModel.prototype.getTop = function getTop() {\n\t\treturn this._top;\n\t};\n\n\tBoxModel.prototype.setTop = function setTop(top) {\n\t\tthis._top = top;\n\t};\n\n\tBoxModel.prototype.innerItem = function innerItem() {\n\t\treturn this._innerItem;\n\t};\n\n\tBoxModel.prototype.scaleTo = function scaleTo(width, height) {\n\t\tvar scaleX = this._width === 0 ? 0 : width / this._width;\n\t\tvar scaleY = this._height === 0 ? 0 : height / this._height;\n\n\t\tthis._innerItem.forEach(function (v) {\n\t\t\tif (scaleX !== 0) {\n\t\t\t\tv._left *= scaleX;\n\t\t\t\tv._width *= scaleX;\n\t\t\t}\n\t\t\tif (scaleY !== 0) {\n\t\t\t\tv._top *= scaleY;\n\t\t\t\tv._height *= scaleY;\n\t\t\t}\n\t\t});\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t};\n\n\tBoxModel.prototype.pushItem = function pushItem(item) {\n\t\tthis._innerItem.push(item);\n\t};\n\n\tBoxModel.prototype.getOriginSize = function getOriginSize() {\n\t\treturn this._originWidth * this._originHeight;\n\t};\n\n\tBoxModel.prototype.getSize = function getSize() {\n\t\treturn this._width * this._height;\n\t};\n\n\tBoxModel.prototype.getOriginRatio = function getOriginRatio() {\n\t\treturn this._originHeight === 0 ? 0 : this._originWidth / this._originHeight;\n\t};\n\n\tBoxModel.prototype.getRatio = function getRatio() {\n\t\treturn this._height === 0 ? 0 : this._width / this._height;\n\t};\n\n\tBoxModel.prototype.isSmallerThen = function isSmallerThen(box) {\n\t\treturn this._width <= box._width && this._height <= box._height;\n\t};\n\n\tBoxModel.prototype.isEqual = function isEqual(box) {\n\t\treturn this._left === box._left && this._top === box._top && this._width === box._width && this._height === box._height;\n\t};\n\n\treturn BoxModel;\n}();\n\nmodule.exports = BoxModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/BoxModel.js\n// module id = 14\n// module chunks = 0 1","\"use strict\";\n\nexports.__esModule = true;\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 _dijkstra = require(\"./lib/dijkstra\");\n\nvar _dijkstra2 = _interopRequireDefault(_dijkstra);\n\nvar _consts = require(\"../consts\");\n\nvar _utils = require(\"../utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * 'justified' is a printing term with the meaning that 'it fits in one row wide'. JustifiedLayout is a layout in which the image is filled up on the basis of a line given a width in the meaning of the term.\n * @ko 'justified'는 '1행의 너비에 맞게 꼭 들어찬'이라는 의미를 가진 인쇄 용어다. 용어의 의미대로 너비가 주어진 한 행을 기준으로 이미지가 가득 차도록 배치하는 레이아웃이다.\n * @class eg.InfiniteGrid.JustifiedLayout\n * @param {Object} [options] The option object of eg.InfiniteGrid.JustifiedLayout module eg.InfiniteGrid.JustifiedLayout 모듈의 옵션 객체\n * @param {String} [options.margin=0] Margin used to create space around items 아이템들 사이의 공간\n * @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) 스크롤 이동 방향 (false: 세로방향, true: 가로방향)\n * @param {Boolean} [options.minSize=0] Minimum size of item to be resized 아이템이 조정되는 최소 크기 \n * @param {Boolean} [options.maxSize=0] Maximum size of item to be resized 아이템이 조정되는 최대 크기 \n * @example\n```\n\n```\n **/\nvar JustifiedLayout = function () {\n\tfunction JustifiedLayout() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, JustifiedLayout);\n\n\t\tthis.options = (0, _utils.assignOptions)({\n\t\t\tminSize: 0,\n\t\t\tmaxSize: 0\n\t\t}, options);\n\t\tthis._style = (0, _utils.getStyleNames)(this.options.horizontal);\n\t\tthis._size = 0;\n\t}\n\n\tJustifiedLayout.prototype._layout = function _layout(items, outline, isAppend) {\n\t\tvar _this = this;\n\n\t\tvar style = this._style;\n\t\tvar size1Name = style.size1;\n\t\tvar size2Name = style.size2;\n\t\tvar startIndex = 0;\n\t\tvar endIndex = items.length;\n\t\tvar graph = function graph(_start) {\n\t\t\tvar results = {};\n\t\t\tvar start = +_start.replace(/[^0-9]/g, \"\");\n\t\t\tvar length = endIndex + 1;\n\n\t\t\tfor (var i = start + 1; i < length; ++i) {\n\t\t\t\tif (i - start > 8) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tvar cost = _this._getCost(items, start, i, size1Name, size2Name);\n\n\t\t\t\tif (cost < 0 && i === length - 1) {\n\t\t\t\t\tcost = 0;\n\t\t\t\t}\n\t\t\t\tif (cost !== null) {\n\t\t\t\t\tresults[\"node\" + i] = Math.pow(cost, 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn results;\n\t\t};\n\t\t// shortest path for items' total height.\n\t\tvar path = _dijkstra2[\"default\"].find_path(graph, \"node\" + startIndex, \"node\" + endIndex);\n\n\t\treturn this._setStyle(items, path, outline, isAppend);\n\t};\n\n\tJustifiedLayout.prototype._getSize = function _getSize(items, size1Name, size2Name) {\n\t\tvar margin = this.options.margin;\n\t\tvar size = items.reduce(function (sum, item) {\n\t\t\treturn sum + item.size[size2Name] / item.size[size1Name];\n\t\t}, 0);\n\n\t\treturn (this._size - margin * (items.length - 1)) / size;\n\t};\n\n\tJustifiedLayout.prototype._getCost = function _getCost(items, i, j, size1Name, size2Name) {\n\t\tvar size = this._getSize(items.slice(i, j), size1Name, size2Name);\n\t\tvar min = this.options.minSize || 0;\n\t\tvar max = this.options.maxSize || Infinity;\n\n\t\tif (isFinite(max)) {\n\t\t\t// if this size is not in range, the cost increases sharply.\n\t\t\tif (size < min) {\n\t\t\t\treturn Math.pow(size - min, 2) + Math.pow(max, 2);\n\t\t\t} else if (size > max) {\n\t\t\t\treturn Math.pow(size - max, 2) + Math.pow(max, 2);\n\t\t\t} else {\n\t\t\t\t// if this size in range, the cost is negative or low.\n\t\t\t\treturn Math.min(size - max, min - size);\n\t\t\t}\n\t\t}\n\t\t// if max is infinite type, caculate cost only with \"min\".\n\t\tif (size < min) {\n\t\t\treturn Math.max(Math.pow(min, 2), Math.pow(size, 2));\n\t\t}\n\t\treturn size - min;\n\t};\n\n\tJustifiedLayout.prototype._setStyle = function _setStyle(items, path) {\n\t\tvar outline = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\t\tvar isAppend = arguments[3];\n\n\t\tvar style = this._style;\n\t\t// if direction is vertical\n\t\t// pos1 : top, pos11 : bottom\n\t\t// size1 : height\n\t\t// pos2 : left, pos22 : right\n\t\t// size2 : width\n\n\t\t// if direction is horizontal\n\t\t// pos1 : left, pos11 : right\n\t\t// size1 : width\n\t\t// pos2 : top, pos22 : bottom\n\t\t// size2 : height\n\t\tvar pos1Name = style.pos1;\n\t\tvar size1Name = style.size1;\n\t\tvar pos2Name = style.pos2;\n\t\tvar size2Name = style.size2;\n\t\tvar length = path.length;\n\t\tvar margin = this.options.margin;\n\t\tvar startPoint = outline[0] || 0;\n\t\tvar endPoint = startPoint;\n\t\tvar height = 0;\n\n\t\tfor (var i = 0; i < length - 1; ++i) {\n\t\t\tvar path1 = parseInt(path[i].replace(\"node\", \"\"), 10);\n\t\t\tvar path2 = parseInt(path[i + 1].replace(\"node\", \"\"), 10);\n\t\t\t// pathItems(path1 to path2) are in 1 line.\n\t\t\tvar pathItems = items.slice(path1, path2);\n\t\t\tvar pathItemsLength = pathItems.length;\n\t\t\tvar size1 = this._getSize(pathItems, size1Name, size2Name);\n\t\t\tvar pos1 = endPoint;\n\n\t\t\tfor (var j = 0; j < pathItemsLength; ++j) {\n\t\t\t\tvar _item$rect;\n\n\t\t\t\tvar item = pathItems[j];\n\t\t\t\tvar size2 = item.size[size2Name] / item.size[size1Name] * size1;\n\t\t\t\t// item has margin bottom and right.\n\t\t\t\t// first item has not margin.\n\t\t\t\tvar prevItemRect = j === 0 ? 0 : pathItems[j - 1].rect;\n\t\t\t\tvar pos2 = prevItemRect ? prevItemRect[pos2Name] + prevItemRect[size2Name] + margin : 0;\n\n\t\t\t\titem.rect = (_item$rect = {}, _item$rect[pos1Name] = pos1, _item$rect[pos2Name] = pos2, _item$rect[size1Name] = size1, _item$rect[size2Name] = size2, _item$rect);\n\t\t\t}\n\t\t\theight += margin + size1;\n\t\t\tendPoint = startPoint + height;\n\t\t}\n\t\tvar itemsLength = items.length;\n\t\tvar startIndex = itemsLength ? 0 : -1;\n\t\tvar endIndex = itemsLength ? itemsLength - 1 : -1;\n\n\t\tif (isAppend) {\n\t\t\t// previous group's end outline is current group's start outline\n\t\t\treturn {\n\t\t\t\tstart: [startPoint],\n\t\t\t\tend: [endPoint],\n\t\t\t\tstartIndex: startIndex,\n\t\t\t\tendIndex: endIndex\n\t\t\t};\n\t\t}\n\t\t// for prepend, only substract height from position.\n\t\t// always start is lower than end.\n\n\t\tfor (var _i = 0; _i < itemsLength; ++_i) {\n\t\t\tvar _item = items[_i];\n\n\t\t\t// move items as long as height for prepend\n\t\t\t_item.rect[pos1Name] -= height;\n\t\t}\n\t\treturn {\n\t\t\tstart: [startPoint - height],\n\t\t\tend: [startPoint], // endPoint - height = startPoint\n\t\t\tstartIndex: startIndex,\n\t\t\tendIndex: endIndex\n\t\t};\n\t};\n\n\tJustifiedLayout.prototype._insert = function _insert(items, outline, type) {\n\t\t// this only needs the size of the item.\n\t\tvar clone = items.map(function (item) {\n\t\t\treturn _extends({}, item);\n\t\t});\n\n\t\treturn {\n\t\t\titems: clone,\n\t\t\toutlines: this._layout(clone, outline, type)\n\t\t};\n\t};\n\t/**\n * Set the viewport size of the layout.\n * @ko 레이아웃의 가시 사이즈를 설정한다.\n * @method eg.InfiniteGrid.JustifiedLayout#setSize\n * @param {Number} size The viewport size of container area where items are added to a layout 레이아웃에 아이템을 추가하는 컨테이너 영역의 가시 사이즈\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.setSize(800);\n */\n\n\n\tJustifiedLayout.prototype.setSize = function setSize(size) {\n\t\tthis._size = size;\n\t\treturn this;\n\t};\n\t/**\n * Adds items at the bottom of a outline.\n * @ko 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#append\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.append = function append(items, outline) {\n\t\treturn this._insert(items, outline, _consts.APPEND);\n\t};\n\t/**\n * Adds items at the top of a outline.\n * @ko 아이템을 아웃라인 위에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#prepend\n * @param {Array} items Array of items to be layouted 레이아웃할 아이템들의 배열\n * @param {Array} [outline=[]] Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {Object} Layouted items and outline of start and end 레이아웃이 된 아이템과 시작과 끝의 아웃라인이 담긴 정보\n * @example\n * layout.prepend(items, [100]);\n */\n\n\n\tJustifiedLayout.prototype.prepend = function prepend(items, outline) {\n\t\treturn this._insert(items, outline, _consts.PREPEND);\n\t};\n\t/**\n * Adds items of groups at the bottom of a outline.\n * @ko 그룹들의 아이템들을 아웃라인 아래에 추가한다.\n * @method eg.InfiniteGrid.JustifiedLayout#layout\n * @param {Array} groups Array of groups to be layouted 레이아웃할 그룹들의 배열\n * @param {Array} outline Array of outline points to be reference points 기준점이 되는 아웃라인 점들의 배열\n * @return {eg.InfiniteGrid.JustifiedLayout} An instance of a module itself모듈 자신의 인스턴스\n * @example\n * layout.layout(groups, [100]);\n */\n\n\n\tJustifiedLayout.prototype.layout = function layout(groups, outlines) {\n\t\tvar length = groups.length;\n\t\tvar point = outlines;\n\n\t\tfor (var i = 0; i < length; ++i) {\n\t\t\tvar group = groups[i];\n\n\t\t\tpoint = this._layout(group.items, point, _consts.APPEND);\n\t\t\tgroup.outlines = point;\n\t\t\tpoint = point.end;\n\t\t}\n\t\treturn this;\n\t};\n\n\treturn JustifiedLayout;\n}();\n\nexports[\"default\"] = JustifiedLayout;\nmodule.exports = exports[\"default\"];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/JustifiedLayout.js\n// module id = 15\n// module chunks = 0 1","'use strict';\n\n/* eslint-disable */\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin \n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\n(function () {\n var dijkstra = {\n single_source_shortest_paths: function single_source_shortest_paths(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = new BinaryHeap(function (x) {\n return x.cost;\n });\n open.push({ value: s, cost: 0 });\n\n var closest, u, cost_of_s_to_u, adjacent_nodes, cost_of_e, cost_of_s_to_u_plus_cost_of_e, cost_of_s_to_v, first_visit;\n while (open.size()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph(u) || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (var v in adjacent_nodes) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = typeof costs[v] === 'undefined';\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push({ value: v, cost: cost_of_s_to_u_plus_cost_of_e });\n predecessors[v] = u;\n }\n }\n }\n\n if (typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function extract_shortest_path_from_predecessor_list(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function find_path(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(predecessors, d);\n }\n\n };\n\n function BinaryHeap(scoreFunction) {\n this.content = [];\n this.scoreFunction = scoreFunction;\n }\n\n BinaryHeap.prototype = {\n push: function push(element) {\n // Add the new element to the end of the array.\n this.content.push(element);\n // Allow it to bubble up.\n this.bubbleUp(this.content.length - 1);\n },\n\n pop: function pop() {\n // Store the first element so we can return it later.\n var result = this.content[0];\n // Get the element at the end of the array.\n var end = this.content.pop();\n // If there are any elements left, put the end element at the\n // start, and let it sink down.\n if (this.content.length > 0) {\n this.content[0] = end;\n this.sinkDown(0);\n }\n return result;\n },\n\n remove: function remove(node) {\n var len = this.content.length;\n // To remove a value, we must search through the array to find\n // it.\n for (var i = 0; i < len; i++) {\n if (this.content[i] === node) {\n // When it is found, the process seen in 'pop' is repeated\n // to fill up the hole.\n var end = this.content.pop();\n if (i !== len - 1) {\n this.content[i] = end;\n if (this.scoreFunction(end) < this.scoreFunction(node)) {\n this.bubbleUp(i);\n } else {\n this.sinkDown(i);\n }\n }\n return;\n }\n }\n throw new Error('Node not found.');\n },\n\n size: function size() {\n return this.content.length;\n },\n\n bubbleUp: function bubbleUp(n) {\n // Fetch the element that has to be moved.\n var element = this.content[n];\n // When at 0, an element can not go up any further.\n while (n > 0) {\n // Compute the parent element's index, and fetch it.\n var parentN = Math.floor((n + 1) / 2) - 1,\n parent = this.content[parentN];\n // Swap the elements if the parent is greater.\n if (this.scoreFunction(element) < this.scoreFunction(parent)) {\n this.content[parentN] = element;\n this.content[n] = parent;\n // Update 'n' to continue at the new position.\n n = parentN;\n }\n // Found a parent that is less, no need to move it further.\n else {\n break;\n }\n }\n },\n\n sinkDown: function sinkDown(n) {\n // Look up the target element and its score.\n var length = this.content.length,\n element = this.content[n],\n elemScore = this.scoreFunction(element);\n\n while (true) {\n // Compute the indices of the child elements.\n var child2N = (n + 1) * 2,\n child1N = child2N - 1;\n // This is used to store the new position of the element,\n // if any.\n var swap = null;\n // If the first child exists (is inside the array)...\n if (child1N < length) {\n // Look it up and compute its score.\n var child1 = this.content[child1N],\n child1Score = this.scoreFunction(child1);\n // If the score is less than our element's, we need to swap.\n if (child1Score < elemScore) {\n swap = child1N;\n }\n }\n // Do the same checks for the other child.\n if (child2N < length) {\n var child2 = this.content[child2N],\n child2Score = this.scoreFunction(child2);\n if (child2Score < (swap == null ? elemScore : child1Score)) {\n swap = child2N;\n }\n }\n\n // If the element needs to be moved, swap it, and continue.\n if (swap !== null) {\n this.content[n] = this.content[swap];\n this.content[swap] = element;\n n = swap;\n }\n // Otherwise, we are done.\n else {\n break;\n }\n }\n }\n };\n\n /**\n * Browserify 지원을 위한 모듈화 코드\n */\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = dijkstra;\n } else {\n window.dijkstra = dijkstra;\n }\n})();\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/layouts/lib/dijkstra.js\n// module id = 16\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;;;A;;;;;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;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvOA;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;;;;;;;AC1QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACt5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":""} \ No newline at end of file diff --git a/dist/parallax.js b/dist/parallax.js index 8b2222905..4534a1108 100644 --- a/dist/parallax.js +++ b/dist/parallax.js @@ -7,5 +7,5 @@ * * @version 3.0.0-rc */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Parallax=t():(e.eg=e.eg||{},e.eg.Parallax=t())}(this,function(){return function(e){function __webpack_require__(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}var t={};return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=2)}([function(e,t,n){"use strict";t.__esModule=!0,t.DEFENSE_BROWSER=t.PROCESSING=t.LOADING_PREPEND=t.LOADING_APPEND=t.ALIGN=t.isMobile=t.agent=t.DEFAULT_OPTIONS=t.GROUPKEY_ATT=t.DUMMY_POSITION=t.SINGLE=t.MULTI=t.NO_TRUSTED=t.TRUSTED=t.NO_CACHE=t.CACHE=t.HORIZONTAL=t.VERTICAL=t.PREPEND=t.APPEND=t.CONTAINER_CLASSNAME=t.RETRY=t.IS_ANDROID2=t.IS_IOS=t.IS_IE=t.SUPPORT_PASSIVE=t.SUPPORT_ADDEVENTLISTENER=t.SUPPORT_COMPUTEDSTYLE=undefined;var o=n(1),r=o.window.navigator.userAgent,i=(t.SUPPORT_COMPUTEDSTYLE=!!("getComputedStyle"in o.window),t.SUPPORT_ADDEVENTLISTENER=!!("addEventListener"in document)),a=(t.SUPPORT_PASSIVE=function(){var e=!1;try{i&&Object.defineProperty&&document.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){e=!0}}))}catch(t){}return e}(),t.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),t.IS_IOS=/iPhone|iPad/.test(r),t.IS_ANDROID2=/Android 2\./.test(r),t.RETRY=3,t.CONTAINER_CLASSNAME="_eg-infinitegrid-container_",t.APPEND=!0,t.PREPEND=!1,t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.CACHE=!0,t.NO_CACHE=!1,t.TRUSTED=!0,t.NO_TRUSTED=!1,t.MULTI=!0,t.SINGLE=!1,t.DUMMY_POSITION=-1e5,t.GROUPKEY_ATT="data-groupkey",t.DEFAULT_OPTIONS={horizontal:!1,margin:0},t.agent=navigator.userAgent.toLowerCase());t.isMobile=/mobi|ios|android/.test(a),t.ALIGN={START:"start",CENTER:"center",END:"end",JUSTIFY:"justify"},t.LOADING_APPEND=1,t.LOADING_PREPEND=2,t.PROCESSING=4,t.DEFENSE_BROWSER=/android/.test(a);alert(a)},function(e,t,n){"use strict";t.__esModule=!0;var o=window;t.window=window;t.document=o.document},function(e,t,n){"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==undefined?arguments[0]:window,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parallax),this.options=o({container:null,selector:"img",strength:1,center:0,range:[-1,1],align:_,horizontal:!1},t),this._root=(0,i.$)(e),this._container=this.options.container&&(0,i.$)(this.options.container),this._rootSize=0,this._containerPosition=0,this._style=a[this.options.horizontal?"horizontal":"vertical"],this.resize()}return Parallax.prototype._checkParallaxItem=function(e){if(e){var t=this.options.selector;if(!e.__IMAGE__){var n=e.querySelector(t);if(e.__IMAGE__=n||-1,-1===e.__IMAGE__)return;e.__BOX__=n.parentNode}if(-1!==e.__IMAGE__){var o=this._style.cammelSize;e.__IMAGE__.__SIZE__=e.__IMAGE__["offset"+o],e.__BOX__.__SIZE__=e.__BOX__["offset"+o]}}},Parallax.prototype.resize=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=this._root,o=this._container,a=this._style.position,_=this._style.cammelSize;if(o&&n!==o){var s=((0,i.isWindow)(n)?document.body:n).getBoundingClientRect(),c=o.getBoundingClientRect();this._containerPosition=c[a]-s[a]}else this._containerPosition=0;if(this._rootSize=(0,i.isWindow)(n)?window["inner"+_]||document.documentElement["client"+_]:n["client"+_],r.isMobile&(0,i.isWindow)(n)){var l=document.body.offsetWidth||document.documentElement.offsetWidth,u=window.innerWidth;this._rootSize=this._rootSize/(l/u)}return t.forEach(function(t){e._checkParallaxItem(t.el)}),this},Parallax.prototype.refresh=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,o=this._style,r=o.position,i=o.coordinate,a=o.size,_=this.options,l=_.strength,u=_.center,d=_.range,f=_.align,E=this._rootSize,h=n+E,S=this._containerPosition;return t.forEach(function(t){if(t.rect&&t.size&&t.el){var o=S+t.rect[r],_=t.rect[a]||t.size[a];if(!(n>o+_||h=y)T.style[c]="";else{var m=(n+E/2-(E+P)/2*u-(o+P/2))/(E+P)*2*l,g=(P-y)/2,A=g*(1-(m=Math.max(Math.min(m,d[1]),d[0])));f===s&&(A-=g),T.__TRANSLATE__=A,T.__RATIO__=m,T.style[c]="translate"+i+"("+A+"px)"}}}}}),this},Parallax}();e.exports=l},function(e,t,n){"use strict";function toArray(e){var t=[];if(e)for(var n=0,o=e.length;n1&&arguments[1]!==undefined&&arguments[1],n=void 0;if("string"==typeof e){if(e.match(/^<([A-z]+)\s*([^>]*)>/)){var o=i.document.createElement("div");o.innerHTML=e,n=o.childNodes}else n=i.document.querySelectorAll(e);n=t?toArray(n):n&&n.length>0&&n[0]||undefined}else e===i.window?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in i.window&&e instanceof i.window.jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map(function(e){return $(e)}),t||(n=n.length>=1?n[0]:undefined)):n=e;return n}function getStyles(e){return a.SUPPORT_COMPUTEDSTYLE?i.window.getComputedStyle(e):e.currentStyle}function _getSize(e,t){if(e===i.window)return e.document.documentElement["client"+t];if(9===e.nodeType){var n=e.documentElement;return Math.max(e.body["scroll"+t],n["scroll"+t],e.body["offset"+t],n["offset"+t],n["client"+t])}var o=getStyles(e),r=o[t.toLowerCase()];return parseFloat(/auto|%/.test(r)?e["offset"+t]:o[t.toLowerCase()])}t.__esModule=!0,t.STYLE=undefined;var o=Object.assign||function(e){for(var t=1;t=0;--o)n[o]=t;return n},t.$=$,t.addEvent=function(e,t,n,o){if(a.SUPPORT_ADDEVENTLISTENER){var i=o||!1;"object"===(void 0===o?"undefined":r(o))&&(i=!!a.SUPPORT_PASSIVE&&o),e.addEventListener(t,n,i)}else e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.scroll=function(e,t){var n="scroll"+(t?"Top":"Left");return e===i.window?i.document.body[n]||i.document.documentElement[n]:e[n]},t.scrollTo=function(e,t,n){e===i.window?e.scroll(t,n):(e.scrollLeft=t,e.scrollTop=n)},t.scrollBy=function(e,t,n){e===i.window?e.scrollBy(t,n):(e.scrollLeft+=t,e.scrollTop+=n)},t.getStyles=getStyles,t.innerWidth=function(e){return _getSize(e,"Width")},t.innerHeight=function(e){return _getSize(e,"Height")},t.getStyleNames=function(e){return _[e?a.HORIZONTAL:a.VERTICAL]},t.assignOptions=function(e,t){return o({},a.DEFAULT_OPTIONS,e,t)},t.toZeroArray=function(e){return e&&e.length?e:[0]},t.isWindow=function(e){return e===i.window},t.indexOf=function(e,t){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return e.indexOf(t);for(var n=e.length-1;n>=0;--n)if(e[n]===t)return n;return-1};var i=n(1),a=n(0),_=t.STYLE={vertical:{pos1:"top",endPos1:"bottom",size1:"height",pos2:"left",endPos2:"right",size2:"width"},horizontal:{pos1:"left",endPos1:"right",size1:"width",pos2:"top",endPos2:"bottom",size2:"height"}}}])}); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Parallax=t():(e.eg=e.eg||{},e.eg.Parallax=t())}(this,function(){return function(e){function __webpack_require__(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}var t={};return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=2)}([function(e,t,n){"use strict";t.__esModule=!0,t.DEFENSE_BROWSER=t.PROCESSING=t.LOADING_PREPEND=t.LOADING_APPEND=t.ALIGN=t.isMobile=t.agent=t.DEFAULT_OPTIONS=t.GROUPKEY_ATT=t.DUMMY_POSITION=t.SINGLE=t.MULTI=t.NO_TRUSTED=t.TRUSTED=t.NO_CACHE=t.CACHE=t.HORIZONTAL=t.VERTICAL=t.PREPEND=t.APPEND=t.CONTAINER_CLASSNAME=t.RETRY=t.IS_ANDROID2=t.IS_IOS=t.IS_IE=t.SUPPORT_PASSIVE=t.SUPPORT_ADDEVENTLISTENER=t.SUPPORT_COMPUTEDSTYLE=undefined;var o=n(1),r=o.window.navigator.userAgent,i=(t.SUPPORT_COMPUTEDSTYLE=!!("getComputedStyle"in o.window),t.SUPPORT_ADDEVENTLISTENER=!!("addEventListener"in document)),a=(t.SUPPORT_PASSIVE=function(){var e=!1;try{i&&Object.defineProperty&&document.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){e=!0}}))}catch(t){}return e}(),t.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),t.IS_IOS=/iPhone|iPad/.test(r),t.IS_ANDROID2=/Android 2\./.test(r),t.RETRY=3,t.CONTAINER_CLASSNAME="_eg-infinitegrid-container_",t.APPEND=!0,t.PREPEND=!1,t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.CACHE=!0,t.NO_CACHE=!1,t.TRUSTED=!0,t.NO_TRUSTED=!1,t.MULTI=!0,t.SINGLE=!1,t.DUMMY_POSITION=-1e5,t.GROUPKEY_ATT="data-groupkey",t.DEFAULT_OPTIONS={horizontal:!1,margin:0},t.agent=navigator.userAgent.toLowerCase()),_=(t.isMobile=/mobi|ios|android/.test(a),t.ALIGN={START:"start",CENTER:"center",END:"end",JUSTIFY:"justify"},t.LOADING_APPEND=1,t.LOADING_PREPEND=2,t.PROCESSING=4,/applewebkit\/([\d|.]*)/g.exec(a)),s=_&&parseInt(_[1],10)||0;t.DEFENSE_BROWSER=s<537},function(e,t,n){"use strict";t.__esModule=!0;var o=window;t.window=window;t.document=o.document},function(e,t,n){"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==undefined?arguments[0]:window,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parallax),this.options=o({container:null,selector:"img",strength:1,center:0,range:[-1,1],align:_,horizontal:!1},t),this._root=(0,i.$)(e),this._container=this.options.container&&(0,i.$)(this.options.container),this._rootSize=0,this._containerPosition=0,this._style=a[this.options.horizontal?"horizontal":"vertical"],this.resize()}return Parallax.prototype._checkParallaxItem=function(e){if(e){var t=this.options.selector;if(!e.__IMAGE__){var n=e.querySelector(t);if(e.__IMAGE__=n||-1,-1===e.__IMAGE__)return;e.__BOX__=n.parentNode}if(-1!==e.__IMAGE__){var o=this._style.cammelSize;e.__IMAGE__.__SIZE__=e.__IMAGE__["offset"+o],e.__BOX__.__SIZE__=e.__BOX__["offset"+o]}}},Parallax.prototype.resize=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=this._root,o=this._container,a=this._style.position,_=this._style.cammelSize;if(o&&n!==o){var s=((0,i.isWindow)(n)?document.body:n).getBoundingClientRect(),c=o.getBoundingClientRect();this._containerPosition=c[a]-s[a]}else this._containerPosition=0;if(this._rootSize=(0,i.isWindow)(n)?window["inner"+_]||document.documentElement["client"+_]:n["client"+_],r.isMobile&(0,i.isWindow)(n)){var l=document.body.offsetWidth||document.documentElement.offsetWidth,u=window.innerWidth;this._rootSize=this._rootSize/(l/u)}return t.forEach(function(t){e._checkParallaxItem(t.el)}),this},Parallax.prototype.refresh=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,o=this._style,r=o.position,i=o.coordinate,a=o.size,_=this.options,l=_.strength,u=_.center,d=_.range,f=_.align,E=this._rootSize,h=n+E,p=this._containerPosition;return t.forEach(function(t){if(t.rect&&t.size&&t.el){var o=p+t.rect[r],_=t.rect[a]||t.size[a];if(!(n>o+_||h=y)T.style[c]="";else{var m=(n+E/2-(E+P)/2*u-(o+P/2))/(E+P)*2*l,g=(P-y)/2,A=g*(1-(m=Math.max(Math.min(m,d[1]),d[0])));f===s&&(A-=g),T.__TRANSLATE__=A,T.__RATIO__=m,T.style[c]="translate"+i+"("+A+"px)"}}}}}),this},Parallax}();e.exports=l},function(e,t,n){"use strict";function toArray(e){var t=[];if(e)for(var n=0,o=e.length;n1&&arguments[1]!==undefined&&arguments[1],n=void 0;if("string"==typeof e){if(e.match(/^<([A-z]+)\s*([^>]*)>/)){var o=i.document.createElement("div");o.innerHTML=e,n=o.childNodes}else n=i.document.querySelectorAll(e);n=t?toArray(n):n&&n.length>0&&n[0]||undefined}else e===i.window?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in i.window&&e instanceof i.window.jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map(function(e){return $(e)}),t||(n=n.length>=1?n[0]:undefined)):n=e;return n}function getStyles(e){return a.SUPPORT_COMPUTEDSTYLE?i.window.getComputedStyle(e):e.currentStyle}function _getSize(e,t){if(e===i.window)return e.document.documentElement["client"+t];if(9===e.nodeType){var n=e.documentElement;return Math.max(e.body["scroll"+t],n["scroll"+t],e.body["offset"+t],n["offset"+t],n["client"+t])}var o=getStyles(e),r=o[t.toLowerCase()];return parseFloat(/auto|%/.test(r)?e["offset"+t]:o[t.toLowerCase()])}t.__esModule=!0,t.STYLE=undefined;var o=Object.assign||function(e){for(var t=1;t=0;--o)n[o]=t;return n},t.$=$,t.addEvent=function(e,t,n,o){if(a.SUPPORT_ADDEVENTLISTENER){var i=o||!1;"object"===(void 0===o?"undefined":r(o))&&(i=!!a.SUPPORT_PASSIVE&&o),e.addEventListener(t,n,i)}else e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.scroll=function(e,t){var n="scroll"+(t?"Top":"Left");return e===i.window?i.document.body[n]||i.document.documentElement[n]:e[n]},t.scrollTo=function(e,t,n){e===i.window?e.scroll(t,n):(e.scrollLeft=t,e.scrollTop=n)},t.scrollBy=function(e,t,n){e===i.window?e.scrollBy(t,n):(e.scrollLeft+=t,e.scrollTop+=n)},t.getStyles=getStyles,t.innerWidth=function(e){return _getSize(e,"Width")},t.innerHeight=function(e){return _getSize(e,"Height")},t.getStyleNames=function(e){return _[e?a.HORIZONTAL:a.VERTICAL]},t.assignOptions=function(e,t){return o({},a.DEFAULT_OPTIONS,e,t)},t.toZeroArray=function(e){return e&&e.length?e:[0]},t.isWindow=function(e){return e===i.window},t.indexOf=function(e,t){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return e.indexOf(t);for(var n=e.length-1;n>=0;--n)if(e[n]===t)return n;return-1};var i=n(1),a=n(0),_=t.STYLE={vertical:{pos1:"top",endPos1:"bottom",size1:"height",pos2:"left",endPos2:"right",size2:"width"},horizontal:{pos1:"left",endPos1:"right",size1:"width",pos2:"top",endPos2:"bottom",size2:"height"}}}])}); //# sourceMappingURL=parallax.js.map \ No newline at end of file diff --git a/dist/parallax.js.map b/dist/parallax.js.map index b6ca64dec..8dc5660ef 100644 --- a/dist/parallax.js.map +++ b/dist/parallax.js.map @@ -1 +1 @@ -{"version":3,"file":"parallax.js","sources":["webpack:///parallax.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.Parallax=t():(e.eg=e.eg||{},e.eg.Parallax=t())}(this,function(){return function(e){function __webpack_require__(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}var t={};return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e[\"default\"]}:function(){return e};return __webpack_require__.d(t,\"a\",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p=\"\",__webpack_require__(__webpack_require__.s=2)}([function(e,t,n){\"use strict\";t.__esModule=!0,t.DEFENSE_BROWSER=t.PROCESSING=t.LOADING_PREPEND=t.LOADING_APPEND=t.ALIGN=t.isMobile=t.agent=t.DEFAULT_OPTIONS=t.GROUPKEY_ATT=t.DUMMY_POSITION=t.SINGLE=t.MULTI=t.NO_TRUSTED=t.TRUSTED=t.NO_CACHE=t.CACHE=t.HORIZONTAL=t.VERTICAL=t.PREPEND=t.APPEND=t.CONTAINER_CLASSNAME=t.RETRY=t.IS_ANDROID2=t.IS_IOS=t.IS_IE=t.SUPPORT_PASSIVE=t.SUPPORT_ADDEVENTLISTENER=t.SUPPORT_COMPUTEDSTYLE=undefined;var o=n(1),r=o.window.navigator.userAgent,i=(t.SUPPORT_COMPUTEDSTYLE=!!(\"getComputedStyle\"in o.window),t.SUPPORT_ADDEVENTLISTENER=!!(\"addEventListener\"in document)),a=(t.SUPPORT_PASSIVE=function(){var e=!1;try{i&&Object.defineProperty&&document.addEventListener(\"test\",null,Object.defineProperty({},\"passive\",{get:function(){e=!0}}))}catch(t){}return e}(),t.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),t.IS_IOS=/iPhone|iPad/.test(r),t.IS_ANDROID2=/Android 2\\./.test(r),t.RETRY=3,t.CONTAINER_CLASSNAME=\"_eg-infinitegrid-container_\",t.APPEND=!0,t.PREPEND=!1,t.VERTICAL=\"vertical\",t.HORIZONTAL=\"horizontal\",t.CACHE=!0,t.NO_CACHE=!1,t.TRUSTED=!0,t.NO_TRUSTED=!1,t.MULTI=!0,t.SINGLE=!1,t.DUMMY_POSITION=-1e5,t.GROUPKEY_ATT=\"data-groupkey\",t.DEFAULT_OPTIONS={horizontal:!1,margin:0},t.agent=navigator.userAgent.toLowerCase());t.isMobile=/mobi|ios|android/.test(a),t.ALIGN={START:\"start\",CENTER:\"center\",END:\"end\",JUSTIFY:\"justify\"},t.LOADING_APPEND=1,t.LOADING_PREPEND=2,t.PROCESSING=4,t.DEFENSE_BROWSER=/android/.test(a);alert(a)},function(e,t,n){\"use strict\";t.__esModule=!0;var o=window;t.window=window;t.document=o.document},function(e,t,n){\"use strict\";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var o=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==undefined?arguments[0]:window,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parallax),this.options=o({container:null,selector:\"img\",strength:1,center:0,range:[-1,1],align:_,horizontal:!1},t),this._root=(0,i.$)(e),this._container=this.options.container&&(0,i.$)(this.options.container),this._rootSize=0,this._containerPosition=0,this._style=a[this.options.horizontal?\"horizontal\":\"vertical\"],this.resize()}return Parallax.prototype._checkParallaxItem=function(e){if(e){var t=this.options.selector;if(!e.__IMAGE__){var n=e.querySelector(t);if(e.__IMAGE__=n||-1,-1===e.__IMAGE__)return;e.__BOX__=n.parentNode}if(-1!==e.__IMAGE__){var o=this._style.cammelSize;e.__IMAGE__.__SIZE__=e.__IMAGE__[\"offset\"+o],e.__BOX__.__SIZE__=e.__BOX__[\"offset\"+o]}}},Parallax.prototype.resize=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=this._root,o=this._container,a=this._style.position,_=this._style.cammelSize;if(o&&n!==o){var s=((0,i.isWindow)(n)?document.body:n).getBoundingClientRect(),c=o.getBoundingClientRect();this._containerPosition=c[a]-s[a]}else this._containerPosition=0;if(this._rootSize=(0,i.isWindow)(n)?window[\"inner\"+_]||document.documentElement[\"client\"+_]:n[\"client\"+_],r.isMobile&(0,i.isWindow)(n)){var l=document.body.offsetWidth||document.documentElement.offsetWidth,u=window.innerWidth;this._rootSize=this._rootSize/(l/u)}return t.forEach(function(t){e._checkParallaxItem(t.el)}),this},Parallax.prototype.refresh=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,o=this._style,r=o.position,i=o.coordinate,a=o.size,_=this.options,l=_.strength,u=_.center,d=_.range,f=_.align,E=this._rootSize,h=n+E,S=this._containerPosition;return t.forEach(function(t){if(t.rect&&t.size&&t.el){var o=S+t.rect[r],_=t.rect[a]||t.size[a];if(!(n>o+_||h=y)T.style[c]=\"\";else{var m=(n+E/2-(E+P)/2*u-(o+P/2))/(E+P)*2*l,g=(P-y)/2,A=g*(1-(m=Math.max(Math.min(m,d[1]),d[0])));f===s&&(A-=g),T.__TRANSLATE__=A,T.__RATIO__=m,T.style[c]=\"translate\"+i+\"(\"+A+\"px)\"}}}}}),this},Parallax}();e.exports=l},function(e,t,n){\"use strict\";function toArray(e){var t=[];if(e)for(var n=0,o=e.length;n1&&arguments[1]!==undefined&&arguments[1],n=void 0;if(\"string\"==typeof e){if(e.match(/^<([A-z]+)\\s*([^>]*)>/)){var o=i.document.createElement(\"div\");o.innerHTML=e,n=o.childNodes}else n=i.document.querySelectorAll(e);n=t?toArray(n):n&&n.length>0&&n[0]||undefined}else e===i.window?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?\"jQuery\"in i.window&&e instanceof i.window.jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map(function(e){return $(e)}),t||(n=n.length>=1?n[0]:undefined)):n=e;return n}function getStyles(e){return a.SUPPORT_COMPUTEDSTYLE?i.window.getComputedStyle(e):e.currentStyle}function _getSize(e,t){if(e===i.window)return e.document.documentElement[\"client\"+t];if(9===e.nodeType){var n=e.documentElement;return Math.max(e.body[\"scroll\"+t],n[\"scroll\"+t],e.body[\"offset\"+t],n[\"offset\"+t],n[\"client\"+t])}var o=getStyles(e),r=o[t.toLowerCase()];return parseFloat(/auto|%/.test(r)?e[\"offset\"+t]:o[t.toLowerCase()])}t.__esModule=!0,t.STYLE=undefined;var o=Object.assign||function(e){for(var t=1;t=0;--o)n[o]=t;return n},t.$=$,t.addEvent=function(e,t,n,o){if(a.SUPPORT_ADDEVENTLISTENER){var i=o||!1;\"object\"===(void 0===o?\"undefined\":r(o))&&(i=!!a.SUPPORT_PASSIVE&&o),e.addEventListener(t,n,i)}else e.attachEvent?e.attachEvent(\"on\"+t,n):e[\"on\"+t]=n},t.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent(\"on\"+t,n):e[\"on\"+t]=null},t.scroll=function(e,t){var n=\"scroll\"+(t?\"Top\":\"Left\");return e===i.window?i.document.body[n]||i.document.documentElement[n]:e[n]},t.scrollTo=function(e,t,n){e===i.window?e.scroll(t,n):(e.scrollLeft=t,e.scrollTop=n)},t.scrollBy=function(e,t,n){e===i.window?e.scrollBy(t,n):(e.scrollLeft+=t,e.scrollTop+=n)},t.getStyles=getStyles,t.innerWidth=function(e){return _getSize(e,\"Width\")},t.innerHeight=function(e){return _getSize(e,\"Height\")},t.getStyleNames=function(e){return _[e?a.HORIZONTAL:a.VERTICAL]},t.assignOptions=function(e,t){return o({},a.DEFAULT_OPTIONS,e,t)},t.toZeroArray=function(e){return e&&e.length?e:[0]},t.isWindow=function(e){return e===i.window},t.indexOf=function(e,t){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return e.indexOf(t);for(var n=e.length-1;n>=0;--n)if(e[n]===t)return n;return-1};var i=n(1),a=n(0),_=t.STYLE={vertical:{pos1:\"top\",endPos1:\"bottom\",size1:\"height\",pos2:\"left\",endPos2:\"right\",size2:\"width\"},horizontal:{pos1:\"left\",endPos1:\"right\",size1:\"width\",pos2:\"top\",endPos2:\"bottom\",size2:\"height\"}}}])});\n\n\n// WEBPACK FOOTER //\n// parallax.js"],"mappings":";;;;;;;;;AAAA","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"parallax.js","sources":["webpack:///parallax.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.Parallax=t():(e.eg=e.eg||{},e.eg.Parallax=t())}(this,function(){return function(e){function __webpack_require__(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}var t={};return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e[\"default\"]}:function(){return e};return __webpack_require__.d(t,\"a\",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p=\"\",__webpack_require__(__webpack_require__.s=2)}([function(e,t,n){\"use strict\";t.__esModule=!0,t.DEFENSE_BROWSER=t.PROCESSING=t.LOADING_PREPEND=t.LOADING_APPEND=t.ALIGN=t.isMobile=t.agent=t.DEFAULT_OPTIONS=t.GROUPKEY_ATT=t.DUMMY_POSITION=t.SINGLE=t.MULTI=t.NO_TRUSTED=t.TRUSTED=t.NO_CACHE=t.CACHE=t.HORIZONTAL=t.VERTICAL=t.PREPEND=t.APPEND=t.CONTAINER_CLASSNAME=t.RETRY=t.IS_ANDROID2=t.IS_IOS=t.IS_IE=t.SUPPORT_PASSIVE=t.SUPPORT_ADDEVENTLISTENER=t.SUPPORT_COMPUTEDSTYLE=undefined;var o=n(1),r=o.window.navigator.userAgent,i=(t.SUPPORT_COMPUTEDSTYLE=!!(\"getComputedStyle\"in o.window),t.SUPPORT_ADDEVENTLISTENER=!!(\"addEventListener\"in document)),a=(t.SUPPORT_PASSIVE=function(){var e=!1;try{i&&Object.defineProperty&&document.addEventListener(\"test\",null,Object.defineProperty({},\"passive\",{get:function(){e=!0}}))}catch(t){}return e}(),t.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),t.IS_IOS=/iPhone|iPad/.test(r),t.IS_ANDROID2=/Android 2\\./.test(r),t.RETRY=3,t.CONTAINER_CLASSNAME=\"_eg-infinitegrid-container_\",t.APPEND=!0,t.PREPEND=!1,t.VERTICAL=\"vertical\",t.HORIZONTAL=\"horizontal\",t.CACHE=!0,t.NO_CACHE=!1,t.TRUSTED=!0,t.NO_TRUSTED=!1,t.MULTI=!0,t.SINGLE=!1,t.DUMMY_POSITION=-1e5,t.GROUPKEY_ATT=\"data-groupkey\",t.DEFAULT_OPTIONS={horizontal:!1,margin:0},t.agent=navigator.userAgent.toLowerCase()),_=(t.isMobile=/mobi|ios|android/.test(a),t.ALIGN={START:\"start\",CENTER:\"center\",END:\"end\",JUSTIFY:\"justify\"},t.LOADING_APPEND=1,t.LOADING_PREPEND=2,t.PROCESSING=4,/applewebkit\\/([\\d|.]*)/g.exec(a)),s=_&&parseInt(_[1],10)||0;t.DEFENSE_BROWSER=s<537},function(e,t,n){\"use strict\";t.__esModule=!0;var o=window;t.window=window;t.document=o.document},function(e,t,n){\"use strict\";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var o=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==undefined?arguments[0]:window,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parallax),this.options=o({container:null,selector:\"img\",strength:1,center:0,range:[-1,1],align:_,horizontal:!1},t),this._root=(0,i.$)(e),this._container=this.options.container&&(0,i.$)(this.options.container),this._rootSize=0,this._containerPosition=0,this._style=a[this.options.horizontal?\"horizontal\":\"vertical\"],this.resize()}return Parallax.prototype._checkParallaxItem=function(e){if(e){var t=this.options.selector;if(!e.__IMAGE__){var n=e.querySelector(t);if(e.__IMAGE__=n||-1,-1===e.__IMAGE__)return;e.__BOX__=n.parentNode}if(-1!==e.__IMAGE__){var o=this._style.cammelSize;e.__IMAGE__.__SIZE__=e.__IMAGE__[\"offset\"+o],e.__BOX__.__SIZE__=e.__BOX__[\"offset\"+o]}}},Parallax.prototype.resize=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=this._root,o=this._container,a=this._style.position,_=this._style.cammelSize;if(o&&n!==o){var s=((0,i.isWindow)(n)?document.body:n).getBoundingClientRect(),c=o.getBoundingClientRect();this._containerPosition=c[a]-s[a]}else this._containerPosition=0;if(this._rootSize=(0,i.isWindow)(n)?window[\"inner\"+_]||document.documentElement[\"client\"+_]:n[\"client\"+_],r.isMobile&(0,i.isWindow)(n)){var l=document.body.offsetWidth||document.documentElement.offsetWidth,u=window.innerWidth;this._rootSize=this._rootSize/(l/u)}return t.forEach(function(t){e._checkParallaxItem(t.el)}),this},Parallax.prototype.refresh=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,o=this._style,r=o.position,i=o.coordinate,a=o.size,_=this.options,l=_.strength,u=_.center,d=_.range,f=_.align,E=this._rootSize,h=n+E,p=this._containerPosition;return t.forEach(function(t){if(t.rect&&t.size&&t.el){var o=p+t.rect[r],_=t.rect[a]||t.size[a];if(!(n>o+_||h=y)T.style[c]=\"\";else{var m=(n+E/2-(E+P)/2*u-(o+P/2))/(E+P)*2*l,g=(P-y)/2,A=g*(1-(m=Math.max(Math.min(m,d[1]),d[0])));f===s&&(A-=g),T.__TRANSLATE__=A,T.__RATIO__=m,T.style[c]=\"translate\"+i+\"(\"+A+\"px)\"}}}}}),this},Parallax}();e.exports=l},function(e,t,n){\"use strict\";function toArray(e){var t=[];if(e)for(var n=0,o=e.length;n1&&arguments[1]!==undefined&&arguments[1],n=void 0;if(\"string\"==typeof e){if(e.match(/^<([A-z]+)\\s*([^>]*)>/)){var o=i.document.createElement(\"div\");o.innerHTML=e,n=o.childNodes}else n=i.document.querySelectorAll(e);n=t?toArray(n):n&&n.length>0&&n[0]||undefined}else e===i.window?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?\"jQuery\"in i.window&&e instanceof i.window.jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map(function(e){return $(e)}),t||(n=n.length>=1?n[0]:undefined)):n=e;return n}function getStyles(e){return a.SUPPORT_COMPUTEDSTYLE?i.window.getComputedStyle(e):e.currentStyle}function _getSize(e,t){if(e===i.window)return e.document.documentElement[\"client\"+t];if(9===e.nodeType){var n=e.documentElement;return Math.max(e.body[\"scroll\"+t],n[\"scroll\"+t],e.body[\"offset\"+t],n[\"offset\"+t],n[\"client\"+t])}var o=getStyles(e),r=o[t.toLowerCase()];return parseFloat(/auto|%/.test(r)?e[\"offset\"+t]:o[t.toLowerCase()])}t.__esModule=!0,t.STYLE=undefined;var o=Object.assign||function(e){for(var t=1;t=0;--o)n[o]=t;return n},t.$=$,t.addEvent=function(e,t,n,o){if(a.SUPPORT_ADDEVENTLISTENER){var i=o||!1;\"object\"===(void 0===o?\"undefined\":r(o))&&(i=!!a.SUPPORT_PASSIVE&&o),e.addEventListener(t,n,i)}else e.attachEvent?e.attachEvent(\"on\"+t,n):e[\"on\"+t]=n},t.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent(\"on\"+t,n):e[\"on\"+t]=null},t.scroll=function(e,t){var n=\"scroll\"+(t?\"Top\":\"Left\");return e===i.window?i.document.body[n]||i.document.documentElement[n]:e[n]},t.scrollTo=function(e,t,n){e===i.window?e.scroll(t,n):(e.scrollLeft=t,e.scrollTop=n)},t.scrollBy=function(e,t,n){e===i.window?e.scrollBy(t,n):(e.scrollLeft+=t,e.scrollTop+=n)},t.getStyles=getStyles,t.innerWidth=function(e){return _getSize(e,\"Width\")},t.innerHeight=function(e){return _getSize(e,\"Height\")},t.getStyleNames=function(e){return _[e?a.HORIZONTAL:a.VERTICAL]},t.assignOptions=function(e,t){return o({},a.DEFAULT_OPTIONS,e,t)},t.toZeroArray=function(e){return e&&e.length?e:[0]},t.isWindow=function(e){return e===i.window},t.indexOf=function(e,t){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return e.indexOf(t);for(var n=e.length-1;n>=0;--n)if(e[n]===t)return n;return-1};var i=n(1),a=n(0),_=t.STYLE={vertical:{pos1:\"top\",endPos1:\"bottom\",size1:\"height\",pos2:\"left\",endPos2:\"right\",size2:\"width\"},horizontal:{pos1:\"left\",endPos1:\"right\",size1:\"width\",pos2:\"top\",endPos2:\"bottom\",size2:\"height\"}}}])});\n\n\n// WEBPACK FOOTER //\n// parallax.js"],"mappings":";;;;;;;;;AAAA","sourceRoot":""} \ No newline at end of file diff --git a/dist/parallax.min.js b/dist/parallax.min.js index b2f26a6d5..2570bcf84 100644 --- a/dist/parallax.min.js +++ b/dist/parallax.min.js @@ -7,5 +7,5 @@ * * @version 3.0.0-rc */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Parallax=t():(e.eg=e.eg||{},e.eg.Parallax=t())}(this,function(){return function(e){function __webpack_require__(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}var t={};return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=2)}([function(e,t,n){"use strict";t.__esModule=!0,t.DEFENSE_BROWSER=t.PROCESSING=t.LOADING_PREPEND=t.LOADING_APPEND=t.ALIGN=t.isMobile=t.agent=t.DEFAULT_OPTIONS=t.GROUPKEY_ATT=t.DUMMY_POSITION=t.SINGLE=t.MULTI=t.NO_TRUSTED=t.TRUSTED=t.NO_CACHE=t.CACHE=t.HORIZONTAL=t.VERTICAL=t.PREPEND=t.APPEND=t.CONTAINER_CLASSNAME=t.RETRY=t.IS_ANDROID2=t.IS_IOS=t.IS_IE=t.SUPPORT_PASSIVE=t.SUPPORT_ADDEVENTLISTENER=t.SUPPORT_COMPUTEDSTYLE=undefined;var o=n(1),r=o.window.navigator.userAgent,i=(t.SUPPORT_COMPUTEDSTYLE=!!("getComputedStyle"in o.window),t.SUPPORT_ADDEVENTLISTENER=!!("addEventListener"in document)),a=(t.SUPPORT_PASSIVE=function(){var e=!1;try{i&&Object.defineProperty&&document.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){e=!0}}))}catch(t){}return e}(),t.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),t.IS_IOS=/iPhone|iPad/.test(r),t.IS_ANDROID2=/Android 2\./.test(r),t.RETRY=3,t.CONTAINER_CLASSNAME="_eg-infinitegrid-container_",t.APPEND=!0,t.PREPEND=!1,t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.CACHE=!0,t.NO_CACHE=!1,t.TRUSTED=!0,t.NO_TRUSTED=!1,t.MULTI=!0,t.SINGLE=!1,t.DUMMY_POSITION=-1e5,t.GROUPKEY_ATT="data-groupkey",t.DEFAULT_OPTIONS={horizontal:!1,margin:0},t.agent=navigator.userAgent.toLowerCase());t.isMobile=/mobi|ios|android/.test(a),t.ALIGN={START:"start",CENTER:"center",END:"end",JUSTIFY:"justify"},t.LOADING_APPEND=1,t.LOADING_PREPEND=2,t.PROCESSING=4,t.DEFENSE_BROWSER=/android/.test(a);alert(a)},function(e,t,n){"use strict";t.__esModule=!0;var o=window;t.window=window;t.document=o.document},function(e,t,n){"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==undefined?arguments[0]:window,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parallax),this.options=o({container:null,selector:"img",strength:1,center:0,range:[-1,1],align:_,horizontal:!1},t),this._root=(0,i.$)(e),this._container=this.options.container&&(0,i.$)(this.options.container),this._rootSize=0,this._containerPosition=0,this._style=a[this.options.horizontal?"horizontal":"vertical"],this.resize()}return Parallax.prototype._checkParallaxItem=function(e){if(e){var t=this.options.selector;if(!e.__IMAGE__){var n=e.querySelector(t);if(e.__IMAGE__=n||-1,-1===e.__IMAGE__)return;e.__BOX__=n.parentNode}if(-1!==e.__IMAGE__){var o=this._style.cammelSize;e.__IMAGE__.__SIZE__=e.__IMAGE__["offset"+o],e.__BOX__.__SIZE__=e.__BOX__["offset"+o]}}},Parallax.prototype.resize=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=this._root,o=this._container,a=this._style.position,_=this._style.cammelSize;if(o&&n!==o){var s=((0,i.isWindow)(n)?document.body:n).getBoundingClientRect(),c=o.getBoundingClientRect();this._containerPosition=c[a]-s[a]}else this._containerPosition=0;if(this._rootSize=(0,i.isWindow)(n)?window["inner"+_]||document.documentElement["client"+_]:n["client"+_],r.isMobile&(0,i.isWindow)(n)){var l=document.body.offsetWidth||document.documentElement.offsetWidth,u=window.innerWidth;this._rootSize=this._rootSize/(l/u)}return t.forEach(function(t){e._checkParallaxItem(t.el)}),this},Parallax.prototype.refresh=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,o=this._style,r=o.position,i=o.coordinate,a=o.size,_=this.options,l=_.strength,u=_.center,d=_.range,f=_.align,E=this._rootSize,h=n+E,S=this._containerPosition;return t.forEach(function(t){if(t.rect&&t.size&&t.el){var o=S+t.rect[r],_=t.rect[a]||t.size[a];if(!(n>o+_||h=y)T.style[c]="";else{var m=(n+E/2-(E+P)/2*u-(o+P/2))/(E+P)*2*l,g=(P-y)/2,A=g*(1-(m=Math.max(Math.min(m,d[1]),d[0])));f===s&&(A-=g),T.__TRANSLATE__=A,T.__RATIO__=m,T.style[c]="translate"+i+"("+A+"px)"}}}}}),this},Parallax}();e.exports=l},function(e,t,n){"use strict";function toArray(e){var t=[];if(e)for(var n=0,o=e.length;n1&&arguments[1]!==undefined&&arguments[1],n=void 0;if("string"==typeof e){if(e.match(/^<([A-z]+)\s*([^>]*)>/)){var o=i.document.createElement("div");o.innerHTML=e,n=o.childNodes}else n=i.document.querySelectorAll(e);n=t?toArray(n):n&&n.length>0&&n[0]||undefined}else e===i.window?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in i.window&&e instanceof i.window.jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map(function(e){return $(e)}),t||(n=n.length>=1?n[0]:undefined)):n=e;return n}function getStyles(e){return a.SUPPORT_COMPUTEDSTYLE?i.window.getComputedStyle(e):e.currentStyle}function _getSize(e,t){if(e===i.window)return e.document.documentElement["client"+t];if(9===e.nodeType){var n=e.documentElement;return Math.max(e.body["scroll"+t],n["scroll"+t],e.body["offset"+t],n["offset"+t],n["client"+t])}var o=getStyles(e),r=o[t.toLowerCase()];return parseFloat(/auto|%/.test(r)?e["offset"+t]:o[t.toLowerCase()])}t.__esModule=!0,t.STYLE=undefined;var o=Object.assign||function(e){for(var t=1;t=0;--o)n[o]=t;return n},t.$=$,t.addEvent=function(e,t,n,o){if(a.SUPPORT_ADDEVENTLISTENER){var i=o||!1;"object"===(void 0===o?"undefined":r(o))&&(i=!!a.SUPPORT_PASSIVE&&o),e.addEventListener(t,n,i)}else e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.scroll=function(e,t){var n="scroll"+(t?"Top":"Left");return e===i.window?i.document.body[n]||i.document.documentElement[n]:e[n]},t.scrollTo=function(e,t,n){e===i.window?e.scroll(t,n):(e.scrollLeft=t,e.scrollTop=n)},t.scrollBy=function(e,t,n){e===i.window?e.scrollBy(t,n):(e.scrollLeft+=t,e.scrollTop+=n)},t.getStyles=getStyles,t.innerWidth=function(e){return _getSize(e,"Width")},t.innerHeight=function(e){return _getSize(e,"Height")},t.getStyleNames=function(e){return _[e?a.HORIZONTAL:a.VERTICAL]},t.assignOptions=function(e,t){return o({},a.DEFAULT_OPTIONS,e,t)},t.toZeroArray=function(e){return e&&e.length?e:[0]},t.isWindow=function(e){return e===i.window},t.indexOf=function(e,t){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return e.indexOf(t);for(var n=e.length-1;n>=0;--n)if(e[n]===t)return n;return-1};var i=n(1),a=n(0),_=t.STYLE={vertical:{pos1:"top",endPos1:"bottom",size1:"height",pos2:"left",endPos2:"right",size2:"width"},horizontal:{pos1:"left",endPos1:"right",size1:"width",pos2:"top",endPos2:"bottom",size2:"height"}}}])}); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Parallax=t():(e.eg=e.eg||{},e.eg.Parallax=t())}(this,function(){return function(e){function __webpack_require__(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}var t={};return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=2)}([function(e,t,n){"use strict";t.__esModule=!0,t.DEFENSE_BROWSER=t.PROCESSING=t.LOADING_PREPEND=t.LOADING_APPEND=t.ALIGN=t.isMobile=t.agent=t.DEFAULT_OPTIONS=t.GROUPKEY_ATT=t.DUMMY_POSITION=t.SINGLE=t.MULTI=t.NO_TRUSTED=t.TRUSTED=t.NO_CACHE=t.CACHE=t.HORIZONTAL=t.VERTICAL=t.PREPEND=t.APPEND=t.CONTAINER_CLASSNAME=t.RETRY=t.IS_ANDROID2=t.IS_IOS=t.IS_IE=t.SUPPORT_PASSIVE=t.SUPPORT_ADDEVENTLISTENER=t.SUPPORT_COMPUTEDSTYLE=undefined;var o=n(1),r=o.window.navigator.userAgent,i=(t.SUPPORT_COMPUTEDSTYLE=!!("getComputedStyle"in o.window),t.SUPPORT_ADDEVENTLISTENER=!!("addEventListener"in document)),a=(t.SUPPORT_PASSIVE=function(){var e=!1;try{i&&Object.defineProperty&&document.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){e=!0}}))}catch(t){}return e}(),t.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),t.IS_IOS=/iPhone|iPad/.test(r),t.IS_ANDROID2=/Android 2\./.test(r),t.RETRY=3,t.CONTAINER_CLASSNAME="_eg-infinitegrid-container_",t.APPEND=!0,t.PREPEND=!1,t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t.CACHE=!0,t.NO_CACHE=!1,t.TRUSTED=!0,t.NO_TRUSTED=!1,t.MULTI=!0,t.SINGLE=!1,t.DUMMY_POSITION=-1e5,t.GROUPKEY_ATT="data-groupkey",t.DEFAULT_OPTIONS={horizontal:!1,margin:0},t.agent=navigator.userAgent.toLowerCase()),_=(t.isMobile=/mobi|ios|android/.test(a),t.ALIGN={START:"start",CENTER:"center",END:"end",JUSTIFY:"justify"},t.LOADING_APPEND=1,t.LOADING_PREPEND=2,t.PROCESSING=4,/applewebkit\/([\d|.]*)/g.exec(a)),s=_&&parseInt(_[1],10)||0;t.DEFENSE_BROWSER=s<537},function(e,t,n){"use strict";t.__esModule=!0;var o=window;t.window=window;t.document=o.document},function(e,t,n){"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==undefined?arguments[0]:window,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parallax),this.options=o({container:null,selector:"img",strength:1,center:0,range:[-1,1],align:_,horizontal:!1},t),this._root=(0,i.$)(e),this._container=this.options.container&&(0,i.$)(this.options.container),this._rootSize=0,this._containerPosition=0,this._style=a[this.options.horizontal?"horizontal":"vertical"],this.resize()}return Parallax.prototype._checkParallaxItem=function(e){if(e){var t=this.options.selector;if(!e.__IMAGE__){var n=e.querySelector(t);if(e.__IMAGE__=n||-1,-1===e.__IMAGE__)return;e.__BOX__=n.parentNode}if(-1!==e.__IMAGE__){var o=this._style.cammelSize;e.__IMAGE__.__SIZE__=e.__IMAGE__["offset"+o],e.__BOX__.__SIZE__=e.__BOX__["offset"+o]}}},Parallax.prototype.resize=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=this._root,o=this._container,a=this._style.position,_=this._style.cammelSize;if(o&&n!==o){var s=((0,i.isWindow)(n)?document.body:n).getBoundingClientRect(),c=o.getBoundingClientRect();this._containerPosition=c[a]-s[a]}else this._containerPosition=0;if(this._rootSize=(0,i.isWindow)(n)?window["inner"+_]||document.documentElement["client"+_]:n["client"+_],r.isMobile&(0,i.isWindow)(n)){var l=document.body.offsetWidth||document.documentElement.offsetWidth,u=window.innerWidth;this._rootSize=this._rootSize/(l/u)}return t.forEach(function(t){e._checkParallaxItem(t.el)}),this},Parallax.prototype.refresh=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,o=this._style,r=o.position,i=o.coordinate,a=o.size,_=this.options,l=_.strength,u=_.center,d=_.range,f=_.align,E=this._rootSize,h=n+E,p=this._containerPosition;return t.forEach(function(t){if(t.rect&&t.size&&t.el){var o=p+t.rect[r],_=t.rect[a]||t.size[a];if(!(n>o+_||h=y)T.style[c]="";else{var m=(n+E/2-(E+P)/2*u-(o+P/2))/(E+P)*2*l,g=(P-y)/2,A=g*(1-(m=Math.max(Math.min(m,d[1]),d[0])));f===s&&(A-=g),T.__TRANSLATE__=A,T.__RATIO__=m,T.style[c]="translate"+i+"("+A+"px)"}}}}}),this},Parallax}();e.exports=l},function(e,t,n){"use strict";function toArray(e){var t=[];if(e)for(var n=0,o=e.length;n1&&arguments[1]!==undefined&&arguments[1],n=void 0;if("string"==typeof e){if(e.match(/^<([A-z]+)\s*([^>]*)>/)){var o=i.document.createElement("div");o.innerHTML=e,n=o.childNodes}else n=i.document.querySelectorAll(e);n=t?toArray(n):n&&n.length>0&&n[0]||undefined}else e===i.window?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in i.window&&e instanceof i.window.jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map(function(e){return $(e)}),t||(n=n.length>=1?n[0]:undefined)):n=e;return n}function getStyles(e){return a.SUPPORT_COMPUTEDSTYLE?i.window.getComputedStyle(e):e.currentStyle}function _getSize(e,t){if(e===i.window)return e.document.documentElement["client"+t];if(9===e.nodeType){var n=e.documentElement;return Math.max(e.body["scroll"+t],n["scroll"+t],e.body["offset"+t],n["offset"+t],n["client"+t])}var o=getStyles(e),r=o[t.toLowerCase()];return parseFloat(/auto|%/.test(r)?e["offset"+t]:o[t.toLowerCase()])}t.__esModule=!0,t.STYLE=undefined;var o=Object.assign||function(e){for(var t=1;t=0;--o)n[o]=t;return n},t.$=$,t.addEvent=function(e,t,n,o){if(a.SUPPORT_ADDEVENTLISTENER){var i=o||!1;"object"===(void 0===o?"undefined":r(o))&&(i=!!a.SUPPORT_PASSIVE&&o),e.addEventListener(t,n,i)}else e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.scroll=function(e,t){var n="scroll"+(t?"Top":"Left");return e===i.window?i.document.body[n]||i.document.documentElement[n]:e[n]},t.scrollTo=function(e,t,n){e===i.window?e.scroll(t,n):(e.scrollLeft=t,e.scrollTop=n)},t.scrollBy=function(e,t,n){e===i.window?e.scrollBy(t,n):(e.scrollLeft+=t,e.scrollTop+=n)},t.getStyles=getStyles,t.innerWidth=function(e){return _getSize(e,"Width")},t.innerHeight=function(e){return _getSize(e,"Height")},t.getStyleNames=function(e){return _[e?a.HORIZONTAL:a.VERTICAL]},t.assignOptions=function(e,t){return o({},a.DEFAULT_OPTIONS,e,t)},t.toZeroArray=function(e){return e&&e.length?e:[0]},t.isWindow=function(e){return e===i.window},t.indexOf=function(e,t){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return e.indexOf(t);for(var n=e.length-1;n>=0;--n)if(e[n]===t)return n;return-1};var i=n(1),a=n(0),_=t.STYLE={vertical:{pos1:"top",endPos1:"bottom",size1:"height",pos2:"left",endPos2:"right",size2:"width"},horizontal:{pos1:"left",endPos1:"right",size1:"width",pos2:"top",endPos2:"bottom",size2:"height"}}}])}); //# sourceMappingURL=parallax.min.js.map \ No newline at end of file diff --git a/dist/parallax.min.js.map b/dist/parallax.min.js.map index 6d0d6a254..6aaf0a11e 100644 --- a/dist/parallax.min.js.map +++ b/dist/parallax.min.js.map @@ -1 +1 @@ -{"version":3,"file":"parallax.min.js","sources":["webpack:///parallax.min.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.Parallax=t():(e.eg=e.eg||{},e.eg.Parallax=t())}(this,function(){return function(e){function __webpack_require__(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}var t={};return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e[\"default\"]}:function(){return e};return __webpack_require__.d(t,\"a\",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p=\"\",__webpack_require__(__webpack_require__.s=2)}([function(e,t,n){\"use strict\";t.__esModule=!0,t.DEFENSE_BROWSER=t.PROCESSING=t.LOADING_PREPEND=t.LOADING_APPEND=t.ALIGN=t.isMobile=t.agent=t.DEFAULT_OPTIONS=t.GROUPKEY_ATT=t.DUMMY_POSITION=t.SINGLE=t.MULTI=t.NO_TRUSTED=t.TRUSTED=t.NO_CACHE=t.CACHE=t.HORIZONTAL=t.VERTICAL=t.PREPEND=t.APPEND=t.CONTAINER_CLASSNAME=t.RETRY=t.IS_ANDROID2=t.IS_IOS=t.IS_IE=t.SUPPORT_PASSIVE=t.SUPPORT_ADDEVENTLISTENER=t.SUPPORT_COMPUTEDSTYLE=undefined;var o=n(1),r=o.window.navigator.userAgent,i=(t.SUPPORT_COMPUTEDSTYLE=!!(\"getComputedStyle\"in o.window),t.SUPPORT_ADDEVENTLISTENER=!!(\"addEventListener\"in document)),a=(t.SUPPORT_PASSIVE=function(){var e=!1;try{i&&Object.defineProperty&&document.addEventListener(\"test\",null,Object.defineProperty({},\"passive\",{get:function(){e=!0}}))}catch(t){}return e}(),t.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),t.IS_IOS=/iPhone|iPad/.test(r),t.IS_ANDROID2=/Android 2\\./.test(r),t.RETRY=3,t.CONTAINER_CLASSNAME=\"_eg-infinitegrid-container_\",t.APPEND=!0,t.PREPEND=!1,t.VERTICAL=\"vertical\",t.HORIZONTAL=\"horizontal\",t.CACHE=!0,t.NO_CACHE=!1,t.TRUSTED=!0,t.NO_TRUSTED=!1,t.MULTI=!0,t.SINGLE=!1,t.DUMMY_POSITION=-1e5,t.GROUPKEY_ATT=\"data-groupkey\",t.DEFAULT_OPTIONS={horizontal:!1,margin:0},t.agent=navigator.userAgent.toLowerCase());t.isMobile=/mobi|ios|android/.test(a),t.ALIGN={START:\"start\",CENTER:\"center\",END:\"end\",JUSTIFY:\"justify\"},t.LOADING_APPEND=1,t.LOADING_PREPEND=2,t.PROCESSING=4,t.DEFENSE_BROWSER=/android/.test(a);alert(a)},function(e,t,n){\"use strict\";t.__esModule=!0;var o=window;t.window=window;t.document=o.document},function(e,t,n){\"use strict\";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var o=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==undefined?arguments[0]:window,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parallax),this.options=o({container:null,selector:\"img\",strength:1,center:0,range:[-1,1],align:_,horizontal:!1},t),this._root=(0,i.$)(e),this._container=this.options.container&&(0,i.$)(this.options.container),this._rootSize=0,this._containerPosition=0,this._style=a[this.options.horizontal?\"horizontal\":\"vertical\"],this.resize()}return Parallax.prototype._checkParallaxItem=function(e){if(e){var t=this.options.selector;if(!e.__IMAGE__){var n=e.querySelector(t);if(e.__IMAGE__=n||-1,-1===e.__IMAGE__)return;e.__BOX__=n.parentNode}if(-1!==e.__IMAGE__){var o=this._style.cammelSize;e.__IMAGE__.__SIZE__=e.__IMAGE__[\"offset\"+o],e.__BOX__.__SIZE__=e.__BOX__[\"offset\"+o]}}},Parallax.prototype.resize=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=this._root,o=this._container,a=this._style.position,_=this._style.cammelSize;if(o&&n!==o){var s=((0,i.isWindow)(n)?document.body:n).getBoundingClientRect(),c=o.getBoundingClientRect();this._containerPosition=c[a]-s[a]}else this._containerPosition=0;if(this._rootSize=(0,i.isWindow)(n)?window[\"inner\"+_]||document.documentElement[\"client\"+_]:n[\"client\"+_],r.isMobile&(0,i.isWindow)(n)){var l=document.body.offsetWidth||document.documentElement.offsetWidth,u=window.innerWidth;this._rootSize=this._rootSize/(l/u)}return t.forEach(function(t){e._checkParallaxItem(t.el)}),this},Parallax.prototype.refresh=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,o=this._style,r=o.position,i=o.coordinate,a=o.size,_=this.options,l=_.strength,u=_.center,d=_.range,f=_.align,E=this._rootSize,h=n+E,S=this._containerPosition;return t.forEach(function(t){if(t.rect&&t.size&&t.el){var o=S+t.rect[r],_=t.rect[a]||t.size[a];if(!(n>o+_||h=y)T.style[c]=\"\";else{var m=(n+E/2-(E+P)/2*u-(o+P/2))/(E+P)*2*l,g=(P-y)/2,A=g*(1-(m=Math.max(Math.min(m,d[1]),d[0])));f===s&&(A-=g),T.__TRANSLATE__=A,T.__RATIO__=m,T.style[c]=\"translate\"+i+\"(\"+A+\"px)\"}}}}}),this},Parallax}();e.exports=l},function(e,t,n){\"use strict\";function toArray(e){var t=[];if(e)for(var n=0,o=e.length;n1&&arguments[1]!==undefined&&arguments[1],n=void 0;if(\"string\"==typeof e){if(e.match(/^<([A-z]+)\\s*([^>]*)>/)){var o=i.document.createElement(\"div\");o.innerHTML=e,n=o.childNodes}else n=i.document.querySelectorAll(e);n=t?toArray(n):n&&n.length>0&&n[0]||undefined}else e===i.window?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?\"jQuery\"in i.window&&e instanceof i.window.jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map(function(e){return $(e)}),t||(n=n.length>=1?n[0]:undefined)):n=e;return n}function getStyles(e){return a.SUPPORT_COMPUTEDSTYLE?i.window.getComputedStyle(e):e.currentStyle}function _getSize(e,t){if(e===i.window)return e.document.documentElement[\"client\"+t];if(9===e.nodeType){var n=e.documentElement;return Math.max(e.body[\"scroll\"+t],n[\"scroll\"+t],e.body[\"offset\"+t],n[\"offset\"+t],n[\"client\"+t])}var o=getStyles(e),r=o[t.toLowerCase()];return parseFloat(/auto|%/.test(r)?e[\"offset\"+t]:o[t.toLowerCase()])}t.__esModule=!0,t.STYLE=undefined;var o=Object.assign||function(e){for(var t=1;t=0;--o)n[o]=t;return n},t.$=$,t.addEvent=function(e,t,n,o){if(a.SUPPORT_ADDEVENTLISTENER){var i=o||!1;\"object\"===(void 0===o?\"undefined\":r(o))&&(i=!!a.SUPPORT_PASSIVE&&o),e.addEventListener(t,n,i)}else e.attachEvent?e.attachEvent(\"on\"+t,n):e[\"on\"+t]=n},t.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent(\"on\"+t,n):e[\"on\"+t]=null},t.scroll=function(e,t){var n=\"scroll\"+(t?\"Top\":\"Left\");return e===i.window?i.document.body[n]||i.document.documentElement[n]:e[n]},t.scrollTo=function(e,t,n){e===i.window?e.scroll(t,n):(e.scrollLeft=t,e.scrollTop=n)},t.scrollBy=function(e,t,n){e===i.window?e.scrollBy(t,n):(e.scrollLeft+=t,e.scrollTop+=n)},t.getStyles=getStyles,t.innerWidth=function(e){return _getSize(e,\"Width\")},t.innerHeight=function(e){return _getSize(e,\"Height\")},t.getStyleNames=function(e){return _[e?a.HORIZONTAL:a.VERTICAL]},t.assignOptions=function(e,t){return o({},a.DEFAULT_OPTIONS,e,t)},t.toZeroArray=function(e){return e&&e.length?e:[0]},t.isWindow=function(e){return e===i.window},t.indexOf=function(e,t){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return e.indexOf(t);for(var n=e.length-1;n>=0;--n)if(e[n]===t)return n;return-1};var i=n(1),a=n(0),_=t.STYLE={vertical:{pos1:\"top\",endPos1:\"bottom\",size1:\"height\",pos2:\"left\",endPos2:\"right\",size2:\"width\"},horizontal:{pos1:\"left\",endPos1:\"right\",size1:\"width\",pos2:\"top\",endPos2:\"bottom\",size2:\"height\"}}}])});\n\n\n// WEBPACK FOOTER //\n// parallax.min.js"],"mappings":";;;;;;;;;AAAA","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"parallax.min.js","sources":["webpack:///parallax.min.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.Parallax=t():(e.eg=e.eg||{},e.eg.Parallax=t())}(this,function(){return function(e){function __webpack_require__(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}var t={};return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,n){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e[\"default\"]}:function(){return e};return __webpack_require__.d(t,\"a\",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p=\"\",__webpack_require__(__webpack_require__.s=2)}([function(e,t,n){\"use strict\";t.__esModule=!0,t.DEFENSE_BROWSER=t.PROCESSING=t.LOADING_PREPEND=t.LOADING_APPEND=t.ALIGN=t.isMobile=t.agent=t.DEFAULT_OPTIONS=t.GROUPKEY_ATT=t.DUMMY_POSITION=t.SINGLE=t.MULTI=t.NO_TRUSTED=t.TRUSTED=t.NO_CACHE=t.CACHE=t.HORIZONTAL=t.VERTICAL=t.PREPEND=t.APPEND=t.CONTAINER_CLASSNAME=t.RETRY=t.IS_ANDROID2=t.IS_IOS=t.IS_IE=t.SUPPORT_PASSIVE=t.SUPPORT_ADDEVENTLISTENER=t.SUPPORT_COMPUTEDSTYLE=undefined;var o=n(1),r=o.window.navigator.userAgent,i=(t.SUPPORT_COMPUTEDSTYLE=!!(\"getComputedStyle\"in o.window),t.SUPPORT_ADDEVENTLISTENER=!!(\"addEventListener\"in document)),a=(t.SUPPORT_PASSIVE=function(){var e=!1;try{i&&Object.defineProperty&&document.addEventListener(\"test\",null,Object.defineProperty({},\"passive\",{get:function(){e=!0}}))}catch(t){}return e}(),t.IS_IE=/MSIE|Trident|Windows Phone|Edge/.test(r),t.IS_IOS=/iPhone|iPad/.test(r),t.IS_ANDROID2=/Android 2\\./.test(r),t.RETRY=3,t.CONTAINER_CLASSNAME=\"_eg-infinitegrid-container_\",t.APPEND=!0,t.PREPEND=!1,t.VERTICAL=\"vertical\",t.HORIZONTAL=\"horizontal\",t.CACHE=!0,t.NO_CACHE=!1,t.TRUSTED=!0,t.NO_TRUSTED=!1,t.MULTI=!0,t.SINGLE=!1,t.DUMMY_POSITION=-1e5,t.GROUPKEY_ATT=\"data-groupkey\",t.DEFAULT_OPTIONS={horizontal:!1,margin:0},t.agent=navigator.userAgent.toLowerCase()),_=(t.isMobile=/mobi|ios|android/.test(a),t.ALIGN={START:\"start\",CENTER:\"center\",END:\"end\",JUSTIFY:\"justify\"},t.LOADING_APPEND=1,t.LOADING_PREPEND=2,t.PROCESSING=4,/applewebkit\\/([\\d|.]*)/g.exec(a)),s=_&&parseInt(_[1],10)||0;t.DEFENSE_BROWSER=s<537},function(e,t,n){\"use strict\";t.__esModule=!0;var o=window;t.window=window;t.document=o.document},function(e,t,n){\"use strict\";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}var o=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==undefined?arguments[0]:window,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Parallax),this.options=o({container:null,selector:\"img\",strength:1,center:0,range:[-1,1],align:_,horizontal:!1},t),this._root=(0,i.$)(e),this._container=this.options.container&&(0,i.$)(this.options.container),this._rootSize=0,this._containerPosition=0,this._style=a[this.options.horizontal?\"horizontal\":\"vertical\"],this.resize()}return Parallax.prototype._checkParallaxItem=function(e){if(e){var t=this.options.selector;if(!e.__IMAGE__){var n=e.querySelector(t);if(e.__IMAGE__=n||-1,-1===e.__IMAGE__)return;e.__BOX__=n.parentNode}if(-1!==e.__IMAGE__){var o=this._style.cammelSize;e.__IMAGE__.__SIZE__=e.__IMAGE__[\"offset\"+o],e.__BOX__.__SIZE__=e.__BOX__[\"offset\"+o]}}},Parallax.prototype.resize=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=this._root,o=this._container,a=this._style.position,_=this._style.cammelSize;if(o&&n!==o){var s=((0,i.isWindow)(n)?document.body:n).getBoundingClientRect(),c=o.getBoundingClientRect();this._containerPosition=c[a]-s[a]}else this._containerPosition=0;if(this._rootSize=(0,i.isWindow)(n)?window[\"inner\"+_]||document.documentElement[\"client\"+_]:n[\"client\"+_],r.isMobile&(0,i.isWindow)(n)){var l=document.body.offsetWidth||document.documentElement.offsetWidth,u=window.innerWidth;this._rootSize=this._rootSize/(l/u)}return t.forEach(function(t){e._checkParallaxItem(t.el)}),this},Parallax.prototype.refresh=function(){var e=this,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0,o=this._style,r=o.position,i=o.coordinate,a=o.size,_=this.options,l=_.strength,u=_.center,d=_.range,f=_.align,E=this._rootSize,h=n+E,p=this._containerPosition;return t.forEach(function(t){if(t.rect&&t.size&&t.el){var o=p+t.rect[r],_=t.rect[a]||t.size[a];if(!(n>o+_||h=y)T.style[c]=\"\";else{var m=(n+E/2-(E+P)/2*u-(o+P/2))/(E+P)*2*l,g=(P-y)/2,A=g*(1-(m=Math.max(Math.min(m,d[1]),d[0])));f===s&&(A-=g),T.__TRANSLATE__=A,T.__RATIO__=m,T.style[c]=\"translate\"+i+\"(\"+A+\"px)\"}}}}}),this},Parallax}();e.exports=l},function(e,t,n){\"use strict\";function toArray(e){var t=[];if(e)for(var n=0,o=e.length;n1&&arguments[1]!==undefined&&arguments[1],n=void 0;if(\"string\"==typeof e){if(e.match(/^<([A-z]+)\\s*([^>]*)>/)){var o=i.document.createElement(\"div\");o.innerHTML=e,n=o.childNodes}else n=i.document.querySelectorAll(e);n=t?toArray(n):n&&n.length>0&&n[0]||undefined}else e===i.window?n=e:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?\"jQuery\"in i.window&&e instanceof i.window.jQuery||e.constructor.prototype.jquery?n=t?e.toArray():e.get(0):Array.isArray(e)&&(n=e.map(function(e){return $(e)}),t||(n=n.length>=1?n[0]:undefined)):n=e;return n}function getStyles(e){return a.SUPPORT_COMPUTEDSTYLE?i.window.getComputedStyle(e):e.currentStyle}function _getSize(e,t){if(e===i.window)return e.document.documentElement[\"client\"+t];if(9===e.nodeType){var n=e.documentElement;return Math.max(e.body[\"scroll\"+t],n[\"scroll\"+t],e.body[\"offset\"+t],n[\"offset\"+t],n[\"client\"+t])}var o=getStyles(e),r=o[t.toLowerCase()];return parseFloat(/auto|%/.test(r)?e[\"offset\"+t]:o[t.toLowerCase()])}t.__esModule=!0,t.STYLE=undefined;var o=Object.assign||function(e){for(var t=1;t=0;--o)n[o]=t;return n},t.$=$,t.addEvent=function(e,t,n,o){if(a.SUPPORT_ADDEVENTLISTENER){var i=o||!1;\"object\"===(void 0===o?\"undefined\":r(o))&&(i=!!a.SUPPORT_PASSIVE&&o),e.addEventListener(t,n,i)}else e.attachEvent?e.attachEvent(\"on\"+t,n):e[\"on\"+t]=n},t.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent(\"on\"+t,n):e[\"on\"+t]=null},t.scroll=function(e,t){var n=\"scroll\"+(t?\"Top\":\"Left\");return e===i.window?i.document.body[n]||i.document.documentElement[n]:e[n]},t.scrollTo=function(e,t,n){e===i.window?e.scroll(t,n):(e.scrollLeft=t,e.scrollTop=n)},t.scrollBy=function(e,t,n){e===i.window?e.scrollBy(t,n):(e.scrollLeft+=t,e.scrollTop+=n)},t.getStyles=getStyles,t.innerWidth=function(e){return _getSize(e,\"Width\")},t.innerHeight=function(e){return _getSize(e,\"Height\")},t.getStyleNames=function(e){return _[e?a.HORIZONTAL:a.VERTICAL]},t.assignOptions=function(e,t){return o({},a.DEFAULT_OPTIONS,e,t)},t.toZeroArray=function(e){return e&&e.length?e:[0]},t.isWindow=function(e){return e===i.window},t.indexOf=function(e,t){if(!(arguments.length>2&&arguments[2]!==undefined&&arguments[2]))return e.indexOf(t);for(var n=e.length-1;n>=0;--n)if(e[n]===t)return n;return-1};var i=n(1),a=n(0),_=t.STYLE={vertical:{pos1:\"top\",endPos1:\"bottom\",size1:\"height\",pos2:\"left\",endPos2:\"right\",size2:\"width\"},horizontal:{pos1:\"left\",endPos1:\"right\",size1:\"width\",pos2:\"top\",endPos2:\"bottom\",size2:\"height\"}}}])});\n\n\n// WEBPACK FOOTER //\n// parallax.min.js"],"mappings":";;;;;;;;;AAAA","sourceRoot":""} \ No newline at end of file diff --git a/src/DOMRenderer.js b/src/DOMRenderer.js index 33a3ae80c..19dea24c1 100644 --- a/src/DOMRenderer.js +++ b/src/DOMRenderer.js @@ -5,7 +5,7 @@ import { MULTI, GROUPKEY_ATT, CONTAINER_CLASSNAME, - // DEFENSE_BROWSER, + DEFENSE_BROWSER, } from "./consts"; import { $, @@ -15,6 +15,23 @@ import { getStyles, } from "./utils"; + +function _defense(element) { + const container = document.createElement("div"); + + container.className = CONTAINER_CLASSNAME; + container.style.height = "100%"; + + const children = element.children; + const length = children.length; // for IE8 + + for (let i = 0; i < length; i++) { + container.appendChild(children[0]); + } + + element.appendChild(container); + return container; +} export default class DOMRenderer { static renderItem(item, styles) { if (item.el) { @@ -125,29 +142,13 @@ export default class DOMRenderer { element.style[`overflow${target[0]}`] = "scroll"; element.style[`overflow${target[1]}`] = "hidden"; this.view = element; - this.container = element; // DEFENSE_BROWSER ? this._defense(element) : element; + // defense code for android < 4.4 or webkit < 537 + this.container = !this.options.isVertical && DEFENSE_BROWSER ? _defense(element) : element; } else { this.view = window; this.container = element; } } - _defense(element) { - const container = document.createElement("div"); - - container.className = CONTAINER_CLASSNAME; - - const children = element.children; - const length = children.length; // for IE8 - const target = this.options.isVertical ? ["Y", "X"] : ["X", "Y"]; - - for (let i = 0; i < length; i++) { - container.appendChild(children[0]); - } - element.style[`overflow${target[0]}`] = "scroll"; - element.style[`overflow${target[1]}`] = "hidden"; - element.appendChild(container); - return container; - } append(items) { this._insert(items, APPEND, { top: DUMMY_POSITION, @@ -206,7 +207,7 @@ export default class DOMRenderer { return this._size.viewport; } setContainerSize(size) { - if (!this.options.isOverflowScroll) { + if (!this.options.isOverflowScroll || (!this.options.isVertical && DEFENSE_BROWSER)) { this.container.style[this.options.isVertical ? "height" : "width"] = `${size}px`; } } diff --git a/src/consts.js b/src/consts.js index c56403cbb..95009a1f3 100644 --- a/src/consts.js +++ b/src/consts.js @@ -57,9 +57,9 @@ export const ALIGN = { export const LOADING_APPEND = 1; export const LOADING_PREPEND = 2; export const PROCESSING = 4; -export const DEFENSE_BROWSER = /android/.test(agent); -alert(agent); -/* -"Mozilla/5.0 (Linux; Android 4.3; SHV-E250S Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36" -*/ + +const webkit = /applewebkit\/([\d|.]*)/g.exec(agent); +const webkitVersion = (webkit && parseInt(webkit[1], 10)) || 0; + +export const DEFENSE_BROWSER = webkitVersion < 537;