New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-ui-scroll

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-ui-scroll - npm Package Compare versions

Comparing version 1.7.0-rc.6 to 1.7.0

.babelrc

11

dist/ui-scroll-grid.js
/*!
* angular-ui-scroll (uncompressed)
* angular-ui-scroll
* https://github.com/angular-ui/ui-scroll
* Version: 1.7.0-rc.6 -- 2017-11-17T18:27:05.558Z
* Version: 1.7.0 -- 2017-12-05T17:50:06.228Z
* License: MIT

@@ -42,5 +42,2 @@ */

/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports

@@ -73,3 +70,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) {

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 6);
/******/ return __webpack_require__(__webpack_require__.s = 7);
/******/ })

@@ -79,3 +76,3 @@ /************************************************************************/

/***/ 6:
/***/ 7:
/***/ (function(module, exports, __webpack_require__) {

@@ -82,0 +79,0 @@

/*!
* angular-ui-scroll (compressed)
* angular-ui-scroll
* https://github.com/angular-ui/ui-scroll
* Version: 1.7.0-rc.6 -- 2017-11-17T18:27:05.969Z
* Version: 1.7.0 -- 2017-12-05T17:50:06.228Z
* License: MIT
*/
!function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};n.m=t,n.c=r,n.i=function(t){return t},n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=6)}({6:function(t,n,r){"use strict";angular.module("ui.scroll.grid",[]).directive("uiScrollTh",["$log","$timeout",function(t,n){function r(t){this.getLayout=function(){return t.getLayout()},this.applyLayout=function(n){return t.applyLayout(n)},this.columnFromPoint=function(n,r){return t.columnFromPoint(n,r)},Object.defineProperty(this,"columns",{get:function(){return t.getColumns()}})}function e(t,n){this.css=function(){var r=arguments[0],e=arguments[1];if(1==arguments.length)return n.header.css(r);2==arguments.length&&(n.header.css(r,e),t.forEachRow(function(t){return t[n.id].css(r,e)}),n.css[r]=e)},this.moveBefore=function(r){return t.moveBefore(n,r)},this.exchangeWith=function(r){return t.exchangeWith(n,r)},Object.defineProperty(this,"columnId",{get:function(){return n.id}})}function o(t,n,r){function e(t,n,r){var e=t.offset();return!(n<e.left||e.left+t.outerWidth(!0)<n)&&!(r<e.top||e.top+t.outerHeight(!0)<r)}function o(t,n){t.detach(),n.before(t)}function i(t){var n=t.parent();t.detach(),n.append(t)}function u(t,n){t.removeAttr("style");for(var r in n)n.hasOwnProperty(r)&&t.css(r,n[r])}this.header=r,this.css={},this.mapTo=n.length,this.id=n.length,this.applyLayout=function(t){this.css=Object.assign({},t.css),this.mapTo=t.mapTo,u(this.header,this.css)},this.moveBefore=function(n){var e=this;n?(o(r,n.header),t.forEachRow(function(t){return o(t[e.id],t[n.id])})):(i(r),t.forEachRow(function(t){return i(t[e.id])}))},this.columnFromPoint=function(n,o){var i=this;if(e(r,n,o))return this;var u=null;return t.forEachRow(function(t){return u=e(t[i.id],n,o)?i:u}),u},this.applyCss=function(t){u(t,this.css)}}function i(t){function i(t){var n=t[0].parent(),r=[];t.forEach(function(n,e){c[e].applyCss(n),r[c[e].mapTo]=t[e],t[e].detach()}),r.forEach(function(t){return n.append(t)})}var u=this,c=[],a=new Map;n(function(){t.adapter.publicContext.gridAdapter=new r(u),t.adapter.transform=function(t,n){return i(a.get(t))}}),this.registerColumn=function(t){c.push(new o(this,c,t))},this.registerCell=function(t,n){var r=a.get(t);return r||(r=[],a.set(t,r)),!(r.length>=c.length)&&(r.push(n),!0)},this.unregisterCell=function(t,n){var r=a.get(t),e=r.indexOf(n);r.splice(e,1),r.length||a.delete(t)},this.forEachRow=function(t){a.forEach(t)},this.getColumns=function(){var t=this,n=[];return c.slice().sort(function(t,n){return t.mapTo-n.mapTo}).forEach(function(r){return n.push(new e(t,r))}),n},this.getLayout=function(){var t=[];return c.forEach(function(n,r){return t.push({index:r,css:Object.assign({},n.css),mapTo:n.mapTo})}),t},this.applyLayout=function(t){if(!t||t.length!=c.length)throw new Error("Failed to apply layout - number of layouts should match number of columns");t.forEach(function(t,n){return c[n].applyLayout(t)}),i(c.map(function(t){return t.header})),a.forEach(function(t){return i(t)})},this.moveBefore=function(t,n){var r=n;if(n%1!=0&&(r=n?c[n.columnId].mapTo:c.length),!(r<0||r>c.length)){var e=t.mapTo,o=null;r-=e<r?1:0,c.forEach(function(t){t.mapTo-=t.mapTo>e?1:0,t.mapTo+=t.mapTo>=r?1:0,o=t.mapTo===r+1?t:o}),t.mapTo=r,t.moveBefore(o)}},this.exchangeWith=function(t,n){n<0||n>=c.length||(c.find(function(t){return t.mapTo===n}).mapTo=t.mapTo,t.mapTo=n)},this.columnFromPoint=function(t,n){var r=c.find(function(r){return r.columnFromPoint(t,n)});return r?new e(this,r):void 0}}return{require:["^^uiScrollViewport"],restrict:"A",link:function(t,n,r,e){e[0].gridController=e[0].gridController||new i(e[0]),e[0].gridController.registerColumn(n)}}}]).directive("uiScrollTd",function(){return{require:["?^^uiScrollViewport"],restrict:"A",link:function(t,n,r,e){if(e[0]){var o=t,i=t.uiScrollTdInitializer;i||(i=t.uiScrollTdInitializer={linking:!0}),i.linking||(o=i.scope);var u=e[0].gridController;u.registerCell(o,n)&&t.$on("$destroy",function(){return u.unregisterCell(o,n)}),i.linking||i.onLink()}}}})}});
!function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:e})},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=7)}({7:function(t,n,r){"use strict";angular.module("ui.scroll.grid",[]).directive("uiScrollTh",["$log","$timeout",function(t,n){function r(t){this.getLayout=function(){return t.getLayout()},this.applyLayout=function(n){return t.applyLayout(n)},this.columnFromPoint=function(n,r){return t.columnFromPoint(n,r)},Object.defineProperty(this,"columns",{get:function(){return t.getColumns()}})}function e(t,n){this.css=function(){var r=arguments[0],e=arguments[1];if(1==arguments.length)return n.header.css(r);2==arguments.length&&(n.header.css(r,e),t.forEachRow(function(t){return t[n.id].css(r,e)}),n.css[r]=e)},this.moveBefore=function(r){return t.moveBefore(n,r)},this.exchangeWith=function(r){return t.exchangeWith(n,r)},Object.defineProperty(this,"columnId",{get:function(){return n.id}})}function o(t,n,r){function e(t,n,r){var e=t.offset();return!(n<e.left||e.left+t.outerWidth(!0)<n)&&!(r<e.top||e.top+t.outerHeight(!0)<r)}function o(t,n){t.detach(),n.before(t)}function i(t){var n=t.parent();t.detach(),n.append(t)}function u(t,n){t.removeAttr("style");for(var r in n)n.hasOwnProperty(r)&&t.css(r,n[r])}this.header=r,this.css={},this.mapTo=n.length,this.id=n.length,this.applyLayout=function(t){this.css=Object.assign({},t.css),this.mapTo=t.mapTo,u(this.header,this.css)},this.moveBefore=function(n){var e=this;n?(o(r,n.header),t.forEachRow(function(t){return o(t[e.id],t[n.id])})):(i(r),t.forEachRow(function(t){return i(t[e.id])}))},this.columnFromPoint=function(n,o){var i=this;if(e(r,n,o))return this;var u=null;return t.forEachRow(function(t){return u=e(t[i.id],n,o)?i:u}),u},this.applyCss=function(t){u(t,this.css)}}function i(t){function i(t){var n=t[0].parent(),r=[];t.forEach(function(n,e){c[e].applyCss(n),r[c[e].mapTo]=t[e],t[e].detach()}),r.forEach(function(t){return n.append(t)})}var u=this,c=[],a=new Map;n(function(){t.adapter.publicContext.gridAdapter=new r(u),t.adapter.transform=function(t,n){return i(a.get(t))}}),this.registerColumn=function(t){c.push(new o(this,c,t))},this.registerCell=function(t,n){var r=a.get(t);return r||(r=[],a.set(t,r)),!(r.length>=c.length)&&(r.push(n),!0)},this.unregisterCell=function(t,n){var r=a.get(t),e=r.indexOf(n);r.splice(e,1),r.length||a.delete(t)},this.forEachRow=function(t){a.forEach(t)},this.getColumns=function(){var t=this,n=[];return c.slice().sort(function(t,n){return t.mapTo-n.mapTo}).forEach(function(r){return n.push(new e(t,r))}),n},this.getLayout=function(){var t=[];return c.forEach(function(n,r){return t.push({index:r,css:Object.assign({},n.css),mapTo:n.mapTo})}),t},this.applyLayout=function(t){if(!t||t.length!=c.length)throw new Error("Failed to apply layout - number of layouts should match number of columns");t.forEach(function(t,n){return c[n].applyLayout(t)}),i(c.map(function(t){return t.header})),a.forEach(function(t){return i(t)})},this.moveBefore=function(t,n){var r=n;if(n%1!=0&&(r=n?c[n.columnId].mapTo:c.length),!(r<0||r>c.length)){var e=t.mapTo,o=null;r-=e<r?1:0,c.forEach(function(t){t.mapTo-=t.mapTo>e?1:0,t.mapTo+=t.mapTo>=r?1:0,o=t.mapTo===r+1?t:o}),t.mapTo=r,t.moveBefore(o)}},this.exchangeWith=function(t,n){n<0||n>=c.length||(c.find(function(t){return t.mapTo===n}).mapTo=t.mapTo,t.mapTo=n)},this.columnFromPoint=function(t,n){var r=c.find(function(r){return r.columnFromPoint(t,n)});return r?new e(this,r):void 0}}return{require:["^^uiScrollViewport"],restrict:"A",link:function(t,n,r,e){e[0].gridController=e[0].gridController||new i(e[0]),e[0].gridController.registerColumn(n)}}}]).directive("uiScrollTd",function(){return{require:["?^^uiScrollViewport"],restrict:"A",link:function(t,n,r,e){if(e[0]){var o=t,i=t.uiScrollTdInitializer;i||(i=t.uiScrollTdInitializer={linking:!0}),i.linking||(o=i.scope);var u=e[0].gridController;u.registerCell(o,n)&&t.$on("$destroy",function(){return u.unregisterCell(o,n)}),i.linking||i.onLink()}}}})}});
//# sourceMappingURL=ui-scroll-grid.min.js.map

@@ -12,2 +12,2 @@ /*!

}());
})();

@@ -12,2 +12,2 @@ /*!

}());
})();
/*!
* angular-ui-scroll (uncompressed)
* angular-ui-scroll
* https://github.com/angular-ui/ui-scroll
* Version: 1.7.0-rc.6 -- 2017-11-17T18:27:05.558Z
* Version: 1.7.0 -- 2017-12-05T17:50:06.228Z
* License: MIT

@@ -42,5 +42,2 @@ */

/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports

@@ -73,3 +70,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) {

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 7);
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })

@@ -84,516 +81,527 @@ /************************************************************************/

Object.defineProperty(exports, "__esModule", {
value: true
});
var _jqLiteExtras = __webpack_require__(1);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _jqLiteExtras2 = _interopRequireDefault(_jqLiteExtras);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var _elementRoutines = __webpack_require__(2);
var Adapter = function () {
function Adapter($scope, $parse, $attr, viewport, buffer, doAdjust, reload) {
_classCallCheck(this, Adapter);
var _elementRoutines2 = _interopRequireDefault(_elementRoutines);
this.$parse = $parse;
this.$attr = $attr;
this.viewport = viewport;
this.buffer = buffer;
var _buffer = __webpack_require__(3);
this.doAdjust = doAdjust;
this.reload = reload;
var _buffer2 = _interopRequireDefault(_buffer);
this.isLoading = false;
this.disabled = false;
var _viewport = __webpack_require__(4);
var viewportScope = viewport.getScope();
this.startScope = viewportScope.$parent ? viewportScope : $scope;
var _viewport2 = _interopRequireDefault(_viewport);
this.publicContext = {};
this.assignAdapter($attr.adapter);
this.generatePublicContext();
}
var _adapter = __webpack_require__(6);
_createClass(Adapter, [{
key: 'assignAdapter',
value: function assignAdapter(adapterAttr) {
if (!adapterAttr || !(adapterAttr = adapterAttr.replace(/^\s+|\s+$/gm, ''))) {
return;
}
var adapterOnScope = void 0;
var _adapter2 = _interopRequireDefault(_adapter);
try {
this.$parse(adapterAttr).assign(this.startScope, {});
adapterOnScope = this.$parse(adapterAttr)(this.startScope);
} catch (error) {
error.message = 'Angular ui-scroll Adapter assignment exception.\n' + ('Can\'t parse "' + adapterAttr + '" expression.\n') + error.message;
throw error;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
Object.assign(adapterOnScope, this.publicContext);
this.publicContext = adapterOnScope;
}
}, {
key: 'generatePublicContext',
value: function generatePublicContext() {
angular.module('ui.scroll', []).constant('JQLiteExtras', _jqLiteExtras2.default).run(['JQLiteExtras', function (JQLiteExtras) {
return !window.jQuery ? new JQLiteExtras().registerFor(angular.element) : null;
}]).directive('uiScrollViewport', function () {
return {
restrict: 'A',
controller: ['$scope', '$element', function (scope, element) {
var _this = this;
// these methods will be accessible out of ui-scroll via user defined adapter
var publicMethods = ['reload', 'applyUpdates', 'append', 'prepend', 'isBOF', 'isEOF', 'isEmpty'];
for (var i = publicMethods.length - 1; i >= 0; i--) {
this.publicContext[publicMethods[i]] = this[publicMethods[i]].bind(this);
}
this.container = element;
this.viewport = element;
this.scope = scope;
// these read-only props will be accessible out of ui-scroll via user defined adapter
var publicProps = ['isLoading', 'topVisible', 'topVisibleElement', 'topVisibleScope', 'bottomVisible', 'bottomVisibleElement', 'bottomVisibleScope'];
angular.forEach(element.children(), function (child) {
if (child.tagName.toLowerCase() === 'tbody') {
_this.viewport = angular.element(child);
}
});
var _loop = function _loop(_i) {
var property = void 0,
attr = _this.$attr[publicProps[_i]];
Object.defineProperty(_this, publicProps[_i], {
get: function get() {
return property;
},
set: function set(value) {
property = value;
_this.publicContext[publicProps[_i]] = value;
if (attr) {
_this.$parse(attr).assign(_this.startScope, value);
}
}
});
};
return this;
}]
};
}).directive('uiScroll', ['$log', '$injector', '$rootScope', '$timeout', '$interval', '$q', '$parse', function (console, $injector, $rootScope, $timeout, $interval, $q, $parse) {
for (var _i = publicProps.length - 1; _i >= 0; _i--) {
_loop(_i);
}
return {
require: ['?^uiScrollViewport'],
restrict: 'A',
transclude: 'element',
priority: 1000,
terminal: true,
link: link
};
// non-read-only public property
Object.defineProperty(this.publicContext, 'disabled', {
get: function get() {
return _this.disabled;
},
set: function set(value) {
return !(_this.disabled = value) ? _this.doAdjust() : null;
}
});
function link($scope, element, $attr, controllers, linker) {
var match = $attr.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);
if (!match) {
throw new Error('Expected uiScroll in form of \'_item_ in _datasource_\' but got \'' + $attr.uiScroll + '\'');
}
}, {
key: 'loading',
value: function loading(value) {
this.isLoading = value;
function parseNumericAttr(value, defaultValue) {
var result = $parse(value)($scope);
return isNaN(result) ? defaultValue : result;
}
}, {
key: 'isBOF',
value: function isBOF() {
return this.buffer.bof;
var BUFFER_MIN = 3;
var BUFFER_DEFAULT = 10;
var PADDING_MIN = 0.3;
var PADDING_DEFAULT = 0.5;
var MAX_VIEWPORT_DELAY = 500;
var VIEWPORT_POLLING_INTERVAL = 50;
var datasource = null;
var itemName = match[1];
var datasourceName = match[2];
var viewportController = controllers[0];
var bufferSize = Math.max(BUFFER_MIN, parseNumericAttr($attr.bufferSize, BUFFER_DEFAULT));
var padding = Math.max(PADDING_MIN, parseNumericAttr($attr.padding, PADDING_DEFAULT));
var startIndex = parseNumericAttr($attr.startIndex, 1);
var ridActual = 0; // current data revision id
var pending = [];
var elementRoutines = new _elementRoutines2.default($injector, $q);
var buffer = new _buffer2.default(elementRoutines, bufferSize, startIndex);
var viewport = new _viewport2.default(elementRoutines, buffer, element, viewportController, $rootScope, padding);
var adapter = new _adapter2.default($scope, $parse, $attr, viewport, buffer, doAdjust, reload);
if (viewportController) {
viewportController.adapter = adapter;
}
}, {
key: 'isEOF',
value: function isEOF() {
return this.buffer.eof;
}
}, {
key: 'isEmpty',
value: function isEmpty() {
return !this.buffer.length;
}
}, {
key: 'append',
value: function append(newItems) {
this.buffer.append(newItems);
this.doAdjust();
this.viewport.clipTop();
this.viewport.clipBottom();
}
}, {
key: 'prepend',
value: function prepend(newItems) {
this.buffer.prepend(newItems);
this.doAdjust();
this.viewport.clipTop();
this.viewport.clipBottom();
}
}, {
key: 'applyUpdates',
value: function applyUpdates(arg1, arg2) {
if (typeof arg1 === 'function') {
this.applyUpdatesFunc(arg1);
} else {
this.applyUpdatesIndex(arg1, arg2);
var isDatasourceValid = function isDatasourceValid() {
return Object.prototype.toString.call(datasource) === '[object Object]' && typeof datasource.get === 'function';
};
datasource = $parse(datasourceName)($scope); // try to get datasource on scope
if (!isDatasourceValid()) {
datasource = $injector.get(datasourceName); // try to inject datasource as service
if (!isDatasourceValid()) {
throw new Error(datasourceName + ' is not a valid datasource');
}
this.doAdjust();
}
}, {
key: 'applyUpdatesFunc',
value: function applyUpdatesFunc(cb) {
var _this2 = this;
this.buffer.slice(0).forEach(function (wrapper) {
// we need to do it on the buffer clone, because buffer content
// may change as we iterate through
_this2.applyUpdate(wrapper, cb(wrapper.item, wrapper.scope, wrapper.element));
var onRenderHandlers = [];
function onRenderHandlersRunner() {
onRenderHandlers.forEach(function (handler) {
return handler.run();
});
onRenderHandlers = [];
}
}, {
key: 'applyUpdatesIndex',
value: function applyUpdatesIndex(index, newItems) {
if (index % 1 !== 0) {
throw new Error('applyUpdates - ' + index + ' is not a valid index (should be an integer)');
}
var _index = index - this.buffer.first;
// apply updates only within buffer
if (_index >= 0 && _index < this.buffer.length) {
this.applyUpdate(this.buffer[_index], newItems);
}
// out-of-buffer case: deletion may affect Paddings
else if (index >= this.buffer.getAbsMinIndex() && index <= this.buffer.getAbsMaxIndex()) {
if (Array.isArray(newItems) && !newItems.length) {
this.viewport.removeCacheItem(index, index === this.buffer.minIndex);
if (index === this.buffer.getAbsMinIndex()) {
this.buffer.incrementMinIndex();
} else {
this.buffer.decrementMaxIndex();
function persistDatasourceIndex(datasource, propName) {
var getter = void 0;
// need to postpone min/maxIndexUser processing if the view is empty
if (Number.isInteger(datasource[propName])) {
getter = datasource[propName];
if (Number.isInteger(getter)) {
onRenderHandlers = onRenderHandlers.filter(function (handler) {
return handler.id !== propName;
});
onRenderHandlers.push({
id: propName,
run: function run() {
return datasource[propName] = getter;
}
}
});
}
}
}
}, {
key: 'applyUpdate',
value: function applyUpdate(wrapper, newItems) {
var _this3 = this;
if (!Array.isArray(newItems)) {
function defineDatasourceIndex(datasource, propName, propUserName) {
var descriptor = Object.getOwnPropertyDescriptor(datasource, propName);
if (descriptor && (descriptor.set || descriptor.get)) {
return;
}
var position = this.buffer.indexOf(wrapper);
if (!newItems.reverse().some(function (newItem) {
return newItem === wrapper.item;
})) {
wrapper.op = 'remove';
if (position === 0 && !newItems.length) {
wrapper._op = 'isTop'; // to catch "first" edge case on remove
var getter = void 0;
persistDatasourceIndex(datasource, propName);
Object.defineProperty(datasource, propName, {
set: function set(value) {
getter = value;
if (pending.length && !buffer.length) {
persistDatasourceIndex(datasource, propName);
return;
}
buffer[propUserName] = value;
var topPaddingHeightOld = viewport.topDataPos();
viewport.adjustPaddings();
if (propName === 'minIndex') {
viewport.onAfterMinIndexSet(topPaddingHeightOld);
}
},
get: function get() {
return getter;
}
}
newItems.forEach(function (newItem) {
if (newItem === wrapper.item) {
position--;
} else {
// 3 parameter (isTop) is to catch "first" edge case on insert
_this3.buffer.insert(position + 1, newItem, position === -1);
}
});
}
}, {
key: 'calculateProperties',
value: function calculateProperties() {
var rowTop = null,
topHeight = 0;
var topDone = false,
bottomDone = false;
var length = this.buffer.length;
for (var i = 0; i < length; i++) {
var item = this.buffer[i];
var itemTop = item.element.offset().top;
defineDatasourceIndex(datasource, 'minIndex', 'minIndexUser');
defineDatasourceIndex(datasource, 'maxIndex', 'maxIndexUser');
if (rowTop !== itemTop) {
// a new row condition
var itemHeight = item.element.outerHeight(true);
var top = this.viewport.topDataPos() + topHeight + itemHeight;
var fetchNext = datasource.get.length !== 2 ? function (success) {
return datasource.get(buffer.next, bufferSize, success);
} : function (success) {
datasource.get({
index: buffer.next,
append: buffer.length ? buffer[buffer.length - 1].item : void 0,
count: bufferSize
}, success);
};
if (!topDone && top > this.viewport.topVisiblePos()) {
topDone = true;
this['topVisible'] = item.item;
this['topVisibleElement'] = item.element;
this['topVisibleScope'] = item.scope;
var fetchPrevious = datasource.get.length !== 2 ? function (success) {
return datasource.get(buffer.first - bufferSize, bufferSize, success);
} : function (success) {
datasource.get({
index: buffer.first - bufferSize,
prepend: buffer.length ? buffer[0].item : void 0,
count: bufferSize
}, success);
};
var initialize = function initialize() {
var tryCount = 0;
if (!viewport.applyContainerStyle()) {
var timer = $interval(function () {
tryCount++;
if (viewport.applyContainerStyle()) {
$interval.cancel(timer);
doAdjust();
}
if (!bottomDone && (top >= this.viewport.bottomVisiblePos() || i === length - 1 && this.isEOF())) {
bottomDone = true;
this['bottomVisible'] = item.item;
this['bottomVisibleElement'] = item.element;
this['bottomVisibleScope'] = item.scope;
if (tryCount * VIEWPORT_POLLING_INTERVAL >= MAX_VIEWPORT_DELAY) {
$interval.cancel(timer);
throw Error('ui-scroll directive requires a viewport with non-zero height in ' + MAX_VIEWPORT_DELAY + 'ms');
}
topHeight += itemHeight;
}
rowTop = itemTop;
if (topDone && bottomDone) {
break;
}
}, VIEWPORT_POLLING_INTERVAL);
} else {
doAdjust();
}
}
}]);
};
return Adapter;
}();
/**
* Build padding elements
*
* Calling linker is the only way I found to get access to the tag name of the template
* to prevent the directive scope from pollution a new scope is created and destroyed
* right after the builder creation is completed
*/
linker(function (clone, scope) {
viewport.createPaddingElements(clone[0]);
// we do not include the clone in the DOM. It means that the nested directives will not
// be able to reach the parent directives, but in this case it is intentional because we
// created the clone to access the template tag name
scope.$destroy();
clone.remove();
});
exports.default = Adapter;
$scope.$on('$destroy', function () {
unbindEvents();
viewport.unbind('mousewheel', wheelHandler);
});
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
viewport.bind('mousewheel', wheelHandler);
"use strict";
initialize();
/* Private function definitions */
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = ScrollBuffer;
function ScrollBuffer(elementRoutines, bufferSize, startIndex) {
var buffer = Object.create(Array.prototype);
function isInvalid(rid) {
return rid && rid !== ridActual || $scope.$$destroyed;
}
Object.assign(buffer, {
size: bufferSize,
function bindEvents() {
viewport.bind('resize', resizeAndScrollHandler);
viewport.bind('scroll', resizeAndScrollHandler);
}
reset: function reset(startIndex) {
buffer.remove(0, buffer.length);
buffer.eof = false;
buffer.bof = false;
buffer.first = startIndex;
buffer.next = startIndex;
buffer.minIndex = startIndex;
buffer.maxIndex = startIndex;
buffer.minIndexUser = null;
buffer.maxIndexUser = null;
},
append: function append(items) {
items.forEach(function (item) {
++buffer.next;
buffer.insert('append', item);
});
buffer.maxIndex = buffer.eof ? buffer.next - 1 : Math.max(buffer.next - 1, buffer.maxIndex);
},
prepend: function prepend(items) {
items.reverse().forEach(function (item) {
--buffer.first;
buffer.insert('prepend', item);
});
buffer.minIndex = buffer.bof ? buffer.minIndex = buffer.first : Math.min(buffer.first, buffer.minIndex);
},
function unbindEvents() {
viewport.unbind('resize', resizeAndScrollHandler);
viewport.unbind('scroll', resizeAndScrollHandler);
}
function reload() {
viewport.resetTopPadding();
viewport.resetBottomPadding();
if (arguments.length) {
startIndex = arguments[0];
}
buffer.reset(startIndex);
persistDatasourceIndex(datasource, 'minIndex');
persistDatasourceIndex(datasource, 'maxIndex');
doAdjust();
}
/**
* inserts wrapped element in the buffer
* the first argument is either operation keyword (see below) or a number for operation 'insert'
* for insert the number is the index for the buffer element the new one have to be inserted after
* operations: 'append', 'prepend', 'insert', 'remove', 'update', 'none'
*/
insert: function insert(operation, item, isTop) {
var wrapper = {
item: item
};
function isElementVisible(wrapper) {
return wrapper.element.height() && wrapper.element[0].offsetParent;
}
if (operation % 1 === 0) {
// it is an insert
wrapper.op = 'insert';
buffer.splice(operation, 0, wrapper);
if (isTop) {
buffer.first--;
function visibilityWatcher(wrapper) {
if (isElementVisible(wrapper)) {
buffer.forEach(function (item) {
if (typeof item.unregisterVisibilityWatcher === 'function') {
item.unregisterVisibilityWatcher();
delete item.unregisterVisibilityWatcher;
}
});
if (!pending.length) {
$timeout(function () {
return doAdjust();
});
}
}
}
function insertWrapperContent(wrapper, insertAfter) {
createElement(wrapper, insertAfter, viewport.insertElement);
if (!isElementVisible(wrapper)) {
wrapper.unregisterVisibilityWatcher = wrapper.scope.$watch(function () {
return visibilityWatcher(wrapper);
});
}
elementRoutines.hideElement(wrapper); // hide inserted elements before data binding
}
function createElement(wrapper, insertAfter, insertElement) {
var promises = null;
var sibling = insertAfter > 0 ? buffer[insertAfter - 1].element : undefined;
linker(function (clone, scope) {
promises = insertElement(clone, sibling);
wrapper.element = clone;
wrapper.scope = scope;
scope[itemName] = wrapper.item;
});
// ui-scroll-grid apply
if (adapter.transform) {
var tdInitializer = wrapper.scope.uiScrollTdInitializer;
if (tdInitializer && tdInitializer.linking) {
adapter.transform(wrapper.scope, wrapper.element);
} else {
buffer.next++;
wrapper.scope.uiScrollTdInitializer = {
onLink: function onLink() {
return adapter.transform(wrapper.scope, wrapper.element);
},
scope: wrapper.scope
};
}
} else {
wrapper.op = operation;
switch (operation) {
}
return promises;
}
function updateDOM() {
var promises = [];
var toBePrepended = [];
var toBeRemoved = [];
var inserted = [];
buffer.forEach(function (wrapper, i) {
switch (wrapper.op) {
case 'prepend':
toBePrepended.unshift(wrapper);
break;
case 'append':
buffer.push(wrapper);
insertWrapperContent(wrapper, i);
wrapper.op = 'none';
inserted.push(wrapper);
break;
case 'prepend':
buffer.unshift(wrapper);
case 'insert':
promises = promises.concat(createElement(wrapper, i, viewport.insertElementAnimated));
wrapper.op = 'none';
inserted.push(wrapper);
break;
case 'remove':
toBeRemoved.push(wrapper);
}
}
},
});
toBeRemoved.forEach(function (wrapper) {
return promises = promises.concat(viewport.removeItem(wrapper));
});
// removes elements from buffer
remove: function remove(arg1, arg2) {
if (Number.isInteger(arg1)) {
// removes items from arg1 (including) through arg2 (excluding)
for (var i = arg1; i < arg2; i++) {
elementRoutines.removeElement(buffer[i]);
}
return buffer.splice(arg1, arg2 - arg1);
}
// removes single item(wrapper) from the buffer
buffer.splice(buffer.indexOf(arg1), 1);
if (arg1._op === 'isTop' && buffer.first === this.getAbsMinIndex()) {
this.incrementMinIndex();
if (toBePrepended.length) toBePrepended.forEach(function (wrapper) {
insertWrapperContent(wrapper);
wrapper.op = 'none';
});
buffer.forEach(function (item, i) {
return item.scope.$index = buffer.first + i;
});
return {
prepended: toBePrepended,
removed: toBeRemoved,
inserted: inserted,
animated: promises
};
}
function updatePaddings(rid, updates) {
// schedule another doAdjust after animation completion
if (updates.animated.length) {
$q.all(updates.animated).then(function () {
viewport.adjustPaddings();
doAdjust(rid);
});
} else {
this.decrementMaxIndex();
viewport.adjustPaddings();
}
if (arg1._op === 'isTop') {
buffer.first++;
} else {
buffer.next--;
}
if (!buffer.length) {
buffer.first = 1;
buffer.next = 1;
}
}
return elementRoutines.removeElementAnimated(arg1);
},
incrementMinIndex: function incrementMinIndex() {
if (buffer.minIndexUser !== null) {
if (buffer.minIndex > buffer.minIndexUser) {
buffer.minIndexUser++;
return;
function enqueueFetch(rid, updates) {
if (viewport.shouldLoadBottom()) {
if (!updates || buffer.effectiveHeight(updates.inserted) > 0) {
// this means that at least one item appended in the last batch has height > 0
if (pending.push(true) === 1) {
adapter.loading(true);
fetch(rid);
}
}
if (buffer.minIndex === buffer.minIndexUser) {
buffer.minIndexUser++;
} else if (viewport.shouldLoadTop()) {
if (!updates || buffer.effectiveHeight(updates.prepended) > 0 || pending[0]) {
// this means that at least one item appended in the last batch has height > 0
// pending[0] = true means that previous fetch was appending. We need to force at least one prepend
// BTW there will always be at least 1 element in the pending array because bottom is fetched first
if (pending.push(false) === 1) {
adapter.loading(true);
fetch(rid);
}
}
}
buffer.minIndex++;
},
decrementMaxIndex: function decrementMaxIndex() {
if (buffer.maxIndexUser !== null && buffer.maxIndex <= buffer.maxIndexUser) {
buffer.maxIndexUser--;
}
function processUpdates() {
var updates = updateDOM();
// We need the item bindings to be processed before we can do adjustments
!$scope.$$phase && !$rootScope.$$phase && $scope.$digest();
updates.inserted.forEach(function (w) {
return elementRoutines.showElement(w);
});
updates.prepended.forEach(function (w) {
return elementRoutines.showElement(w);
});
return updates;
}
function doAdjust(rid) {
if (!rid) {
// dismiss pending requests
pending = [];
rid = ++ridActual;
}
buffer.maxIndex--;
},
getAbsMinIndex: function getAbsMinIndex() {
if (buffer.minIndexUser !== null) {
return Math.min(buffer.minIndexUser, buffer.minIndex);
var updates = processUpdates();
if (isInvalid(rid)) {
return;
}
return buffer.minIndex;
},
getAbsMaxIndex: function getAbsMaxIndex() {
if (buffer.maxIndexUser !== null) {
return Math.max(buffer.maxIndexUser, buffer.maxIndex);
updatePaddings(rid, updates);
enqueueFetch(rid);
if (!pending.length) {
adapter.calculateProperties();
}
return buffer.maxIndex;
},
effectiveHeight: function effectiveHeight(elements) {
if (!elements.length) {
return 0;
}
var top = Number.MAX_VALUE;
var bottom = Number.NEGATIVE_INFINITY;
elements.forEach(function (wrapper) {
if (wrapper.element[0].offsetParent) {
// element style is not display:none
top = Math.min(top, wrapper.element.offset().top);
bottom = Math.max(bottom, wrapper.element.offset().top + wrapper.element.outerHeight(true));
}
});
return Math.max(0, bottom - top);
}
});
buffer.reset(startIndex);
function doAdjustAfterFetch(rid) {
var updates = processUpdates();
return buffer;
}
viewport.onAfterPrepend(updates);
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
if (isInvalid(rid)) {
return;
}
"use strict";
updatePaddings(rid, updates);
onRenderHandlersRunner();
enqueueFetch(rid, updates);
pending.shift();
if (pending.length) fetch(rid);else {
adapter.loading(false);
bindEvents();
adapter.calculateProperties();
}
}
Object.defineProperty(exports, "__esModule", {
value: true
});
function fetch(rid) {
if (pending[0]) {
// scrolling down
if (buffer.length && !viewport.shouldLoadBottom()) {
doAdjustAfterFetch(rid);
} else {
fetchNext(function (result) {
if (isInvalid(rid)) {
return;
}
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
if (result.length < bufferSize) {
buffer.eof = true;
}
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
if (result.length > 0) {
viewport.clipTop();
buffer.append(result);
}
var hideClassToken = 'ng-ui-scroll-hide';
doAdjustAfterFetch(rid);
});
}
} else {
// scrolling up
if (buffer.length && !viewport.shouldLoadTop()) {
doAdjustAfterFetch(rid);
} else {
fetchPrevious(function (result) {
if (isInvalid(rid)) {
return;
}
function addCSSRule(sheet, selector, rules, index) {
if ('insertRule' in sheet) {
sheet.insertRule(selector + '{' + rules + '}', index);
} else if ('addRule' in sheet) {
sheet.addRule(selector, rules, index);
}
}
if (result.length < bufferSize) {
buffer.bof = true;
// log 'bof is reached'
}
var ElementRoutines = function () {
function ElementRoutines($injector, $q) {
_classCallCheck(this, ElementRoutines);
if (result.length > 0) {
if (buffer.length) {
viewport.clipBottom();
}
buffer.prepend(result);
}
this.$animate = $injector.has && $injector.has('$animate') ? $injector.get('$animate') : null;
this.isAngularVersionLessThen1_3 = angular.version.major === 1 && angular.version.minor < 3;
this.$q = $q;
addCSSRule(document.styleSheets[0], '.' + hideClassToken, 'display: none');
}
_createClass(ElementRoutines, [{
key: 'hideElement',
value: function hideElement(wrapper) {
wrapper.element.addClass(hideClassToken);
doAdjustAfterFetch(rid);
});
}
}
}
}, {
key: 'showElement',
value: function showElement(wrapper) {
wrapper.element.removeClass(hideClassToken);
}
}, {
key: 'insertElement',
value: function insertElement(newElement, previousElement) {
previousElement.after(newElement);
return [];
}
}, {
key: 'removeElement',
value: function removeElement(wrapper) {
wrapper.element.remove();
wrapper.scope.$destroy();
return [];
}
}, {
key: 'insertElementAnimated',
value: function insertElementAnimated(newElement, previousElement) {
if (!this.$animate) {
return this.insertElement(newElement, previousElement);
}
if (this.isAngularVersionLessThen1_3) {
var deferred = this.$q.defer();
// no need for parent - previous element is never null
this.$animate.enter(newElement, null, previousElement, function () {
return deferred.resolve();
});
function resizeAndScrollHandler() {
if (!$rootScope.$$phase && !adapter.isLoading && !adapter.disabled) {
return [deferred.promise];
enqueueFetch(ridActual);
if (pending.length) {
unbindEvents();
} else {
adapter.calculateProperties();
!$scope.$$phase && $scope.$digest();
}
}
// no need for parent - previous element is never null
return [this.$animate.enter(newElement, null, previousElement)];
}
}, {
key: 'removeElementAnimated',
value: function removeElementAnimated(wrapper) {
if (!this.$animate) {
return this.removeElement(wrapper);
}
if (this.isAngularVersionLessThen1_3) {
var deferred = this.$q.defer();
this.$animate.leave(wrapper.element, function () {
wrapper.scope.$destroy();
return deferred.resolve();
});
function wheelHandler(event) {
if (!adapter.disabled) {
var scrollTop = viewport[0].scrollTop;
var yMax = viewport[0].scrollHeight - viewport[0].clientHeight;
return [deferred.promise];
if (scrollTop === 0 && !buffer.bof || scrollTop === yMax && !buffer.eof) {
event.preventDefault();
}
}
return [this.$animate.leave(wrapper.element).then(function () {
return wrapper.scope.$destroy();
})];
}
}]);
}
}]);
return ElementRoutines;
}();
exports.default = ElementRoutines;
/***/ }),
/* 3 */
/* 1 */
/***/ (function(module, exports, __webpack_require__) {

@@ -914,2 +922,266 @@

/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var hideClassToken = 'ng-ui-scroll-hide';
function addCSSRule(sheet, selector, rules, index) {
if ('insertRule' in sheet) {
sheet.insertRule(selector + '{' + rules + '}', index);
} else if ('addRule' in sheet) {
sheet.addRule(selector, rules, index);
}
}
var ElementRoutines = function () {
function ElementRoutines($injector, $q) {
_classCallCheck(this, ElementRoutines);
this.$animate = $injector.has && $injector.has('$animate') ? $injector.get('$animate') : null;
this.isAngularVersionLessThen1_3 = angular.version.major === 1 && angular.version.minor < 3;
this.$q = $q;
addCSSRule(document.styleSheets[0], '.' + hideClassToken, 'display: none');
}
_createClass(ElementRoutines, [{
key: 'hideElement',
value: function hideElement(wrapper) {
wrapper.element.addClass(hideClassToken);
}
}, {
key: 'showElement',
value: function showElement(wrapper) {
wrapper.element.removeClass(hideClassToken);
}
}, {
key: 'insertElement',
value: function insertElement(newElement, previousElement) {
previousElement.after(newElement);
return [];
}
}, {
key: 'removeElement',
value: function removeElement(wrapper) {
wrapper.element.remove();
wrapper.scope.$destroy();
return [];
}
}, {
key: 'insertElementAnimated',
value: function insertElementAnimated(newElement, previousElement) {
if (!this.$animate) {
return this.insertElement(newElement, previousElement);
}
if (this.isAngularVersionLessThen1_3) {
var deferred = this.$q.defer();
// no need for parent - previous element is never null
this.$animate.enter(newElement, null, previousElement, function () {
return deferred.resolve();
});
return [deferred.promise];
}
// no need for parent - previous element is never null
return [this.$animate.enter(newElement, null, previousElement)];
}
}, {
key: 'removeElementAnimated',
value: function removeElementAnimated(wrapper) {
if (!this.$animate) {
return this.removeElement(wrapper);
}
if (this.isAngularVersionLessThen1_3) {
var deferred = this.$q.defer();
this.$animate.leave(wrapper.element, function () {
wrapper.scope.$destroy();
return deferred.resolve();
});
return [deferred.promise];
}
return [this.$animate.leave(wrapper.element).then(function () {
return wrapper.scope.$destroy();
})];
}
}]);
return ElementRoutines;
}();
exports.default = ElementRoutines;
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = ScrollBuffer;
function ScrollBuffer(elementRoutines, bufferSize, startIndex) {
var buffer = Object.create(Array.prototype);
Object.assign(buffer, {
size: bufferSize,
reset: function reset(startIndex) {
buffer.remove(0, buffer.length);
buffer.eof = false;
buffer.bof = false;
buffer.first = startIndex;
buffer.next = startIndex;
buffer.minIndex = startIndex;
buffer.maxIndex = startIndex;
buffer.minIndexUser = null;
buffer.maxIndexUser = null;
},
append: function append(items) {
items.forEach(function (item) {
++buffer.next;
buffer.insert('append', item);
});
buffer.maxIndex = buffer.eof ? buffer.next - 1 : Math.max(buffer.next - 1, buffer.maxIndex);
},
prepend: function prepend(items) {
items.reverse().forEach(function (item) {
--buffer.first;
buffer.insert('prepend', item);
});
buffer.minIndex = buffer.bof ? buffer.minIndex = buffer.first : Math.min(buffer.first, buffer.minIndex);
},
/**
* inserts wrapped element in the buffer
* the first argument is either operation keyword (see below) or a number for operation 'insert'
* for insert the number is the index for the buffer element the new one have to be inserted after
* operations: 'append', 'prepend', 'insert', 'remove', 'update', 'none'
*/
insert: function insert(operation, item, isTop) {
var wrapper = {
item: item
};
if (operation % 1 === 0) {
// it is an insert
wrapper.op = 'insert';
buffer.splice(operation, 0, wrapper);
if (isTop) {
buffer.first--;
} else {
buffer.next++;
}
} else {
wrapper.op = operation;
switch (operation) {
case 'append':
buffer.push(wrapper);
break;
case 'prepend':
buffer.unshift(wrapper);
break;
}
}
},
// removes elements from buffer
remove: function remove(arg1, arg2) {
if (Number.isInteger(arg1)) {
// removes items from arg1 (including) through arg2 (excluding)
for (var i = arg1; i < arg2; i++) {
elementRoutines.removeElement(buffer[i]);
}
return buffer.splice(arg1, arg2 - arg1);
}
// removes single item(wrapper) from the buffer
buffer.splice(buffer.indexOf(arg1), 1);
if (arg1._op === 'isTop' && buffer.first === this.getAbsMinIndex()) {
this.incrementMinIndex();
} else {
this.decrementMaxIndex();
}
if (arg1._op === 'isTop') {
buffer.first++;
} else {
buffer.next--;
}
if (!buffer.length) {
buffer.first = 1;
buffer.next = 1;
}
return elementRoutines.removeElementAnimated(arg1);
},
incrementMinIndex: function incrementMinIndex() {
if (buffer.minIndexUser !== null) {
if (buffer.minIndex > buffer.minIndexUser) {
buffer.minIndexUser++;
return;
}
if (buffer.minIndex === buffer.minIndexUser) {
buffer.minIndexUser++;
}
}
buffer.minIndex++;
},
decrementMaxIndex: function decrementMaxIndex() {
if (buffer.maxIndexUser !== null && buffer.maxIndex <= buffer.maxIndexUser) {
buffer.maxIndexUser--;
}
buffer.maxIndex--;
},
getAbsMinIndex: function getAbsMinIndex() {
if (buffer.minIndexUser !== null) {
return Math.min(buffer.minIndexUser, buffer.minIndex);
}
return buffer.minIndex;
},
getAbsMaxIndex: function getAbsMaxIndex() {
if (buffer.maxIndexUser !== null) {
return Math.max(buffer.maxIndexUser, buffer.maxIndex);
}
return buffer.maxIndex;
},
effectiveHeight: function effectiveHeight(elements) {
if (!elements.length) {
return 0;
}
var top = Number.MAX_VALUE;
var bottom = Number.NEGATIVE_INFINITY;
elements.forEach(function (wrapper) {
if (wrapper.element[0].offsetParent) {
// element style is not display:none
top = Math.min(top, wrapper.element.offset().top);
bottom = Math.max(bottom, wrapper.element.offset().top + wrapper.element.outerHeight(true));
}
});
return Math.max(0, bottom - top);
}
});
buffer.reset(startIndex);
return buffer;
}
/***/ }),
/* 4 */

@@ -1251,4 +1523,3 @@ /***/ (function(module, exports, __webpack_require__) {

/***/ }),
/* 6 */,
/* 7 */
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

@@ -1259,526 +1530,249 @@

var _jqLiteExtras = __webpack_require__(3);
Object.defineProperty(exports, "__esModule", {
value: true
});
var _jqLiteExtras2 = _interopRequireDefault(_jqLiteExtras);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _elementRoutines = __webpack_require__(2);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var _elementRoutines2 = _interopRequireDefault(_elementRoutines);
var Adapter = function () {
function Adapter($scope, $parse, $attr, viewport, buffer, doAdjust, reload) {
_classCallCheck(this, Adapter);
var _buffer = __webpack_require__(1);
this.$parse = $parse;
this.$attr = $attr;
this.viewport = viewport;
this.buffer = buffer;
var _buffer2 = _interopRequireDefault(_buffer);
this.doAdjust = doAdjust;
this.reload = reload;
var _viewport = __webpack_require__(4);
this.isLoading = false;
this.disabled = false;
var _viewport2 = _interopRequireDefault(_viewport);
var viewportScope = viewport.getScope();
this.startScope = viewportScope.$parent ? viewportScope : $scope;
var _adapter = __webpack_require__(0);
this.publicContext = {};
this.assignAdapter($attr.adapter);
this.generatePublicContext();
}
var _adapter2 = _interopRequireDefault(_adapter);
_createClass(Adapter, [{
key: 'assignAdapter',
value: function assignAdapter(adapterAttr) {
if (!adapterAttr || !(adapterAttr = adapterAttr.replace(/^\s+|\s+$/gm, ''))) {
return;
}
var adapterOnScope = void 0;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
try {
this.$parse(adapterAttr).assign(this.startScope, {});
adapterOnScope = this.$parse(adapterAttr)(this.startScope);
} catch (error) {
error.message = 'Angular ui-scroll Adapter assignment exception.\n' + ('Can\'t parse "' + adapterAttr + '" expression.\n') + error.message;
throw error;
}
angular.module('ui.scroll', []).service('jqLiteExtras', function () {
return new _jqLiteExtras2.default();
}).run(['jqLiteExtras', function (jqLiteExtras) {
return !window.jQuery ? jqLiteExtras.registerFor(angular.element) : null;
}]).directive('uiScrollViewport', function () {
return {
restrict: 'A',
controller: ['$scope', '$element', function (scope, element) {
Object.assign(adapterOnScope, this.publicContext);
this.publicContext = adapterOnScope;
}
}, {
key: 'generatePublicContext',
value: function generatePublicContext() {
var _this = this;
this.container = element;
this.viewport = element;
this.scope = scope;
// these methods will be accessible out of ui-scroll via user defined adapter
var publicMethods = ['reload', 'applyUpdates', 'append', 'prepend', 'isBOF', 'isEOF', 'isEmpty'];
for (var i = publicMethods.length - 1; i >= 0; i--) {
this.publicContext[publicMethods[i]] = this[publicMethods[i]].bind(this);
}
angular.forEach(element.children(), function (child) {
if (child.tagName.toLowerCase() === 'tbody') {
_this.viewport = angular.element(child);
}
});
// these read-only props will be accessible out of ui-scroll via user defined adapter
var publicProps = ['isLoading', 'topVisible', 'topVisibleElement', 'topVisibleScope', 'bottomVisible', 'bottomVisibleElement', 'bottomVisibleScope'];
return this;
}]
};
}).directive('uiScroll', ['$log', '$injector', '$rootScope', '$timeout', '$interval', '$q', '$parse', function (console, $injector, $rootScope, $timeout, $interval, $q, $parse) {
var _loop = function _loop(_i) {
var property = void 0,
attr = _this.$attr[publicProps[_i]];
Object.defineProperty(_this, publicProps[_i], {
get: function get() {
return property;
},
set: function set(value) {
property = value;
_this.publicContext[publicProps[_i]] = value;
if (attr) {
_this.$parse(attr).assign(_this.startScope, value);
}
}
});
};
return {
require: ['?^uiScrollViewport'],
restrict: 'A',
transclude: 'element',
priority: 1000,
terminal: true,
link: link
};
function link($scope, element, $attr, controllers, linker) {
var match = $attr.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);
if (!match) {
throw new Error('Expected uiScroll in form of \'_item_ in _datasource_\' but got \'' + $attr.uiScroll + '\'');
}
function parseNumericAttr(value, defaultValue) {
var result = $parse(value)($scope);
return isNaN(result) ? defaultValue : result;
}
var BUFFER_MIN = 3;
var BUFFER_DEFAULT = 10;
var PADDING_MIN = 0.3;
var PADDING_DEFAULT = 0.5;
var MAX_VIEWPORT_DELAY = 500;
var VIEWPORT_POLLING_INTERVAL = 50;
var datasource = null;
var itemName = match[1];
var datasourceName = match[2];
var viewportController = controllers[0];
var bufferSize = Math.max(BUFFER_MIN, parseNumericAttr($attr.bufferSize, BUFFER_DEFAULT));
var padding = Math.max(PADDING_MIN, parseNumericAttr($attr.padding, PADDING_DEFAULT));
var startIndex = parseNumericAttr($attr.startIndex, 1);
var ridActual = 0; // current data revision id
var pending = [];
var elementRoutines = new _elementRoutines2.default($injector, $q);
var buffer = new _buffer2.default(elementRoutines, bufferSize, startIndex);
var viewport = new _viewport2.default(elementRoutines, buffer, element, viewportController, $rootScope, padding);
var adapter = new _adapter2.default($scope, $parse, $attr, viewport, buffer, doAdjust, reload);
if (viewportController) {
viewportController.adapter = adapter;
}
var isDatasourceValid = function isDatasourceValid() {
return Object.prototype.toString.call(datasource) === '[object Object]' && typeof datasource.get === 'function';
};
datasource = $parse(datasourceName)($scope); // try to get datasource on scope
if (!isDatasourceValid()) {
datasource = $injector.get(datasourceName); // try to inject datasource as service
if (!isDatasourceValid()) {
throw new Error(datasourceName + ' is not a valid datasource');
for (var _i = publicProps.length - 1; _i >= 0; _i--) {
_loop(_i);
}
}
var onRenderHandlers = [];
function onRenderHandlersRunner() {
onRenderHandlers.forEach(function (handler) {
return handler.run();
});
onRenderHandlers = [];
}
function persistDatasourceIndex(datasource, propName) {
var getter = void 0;
// need to postpone min/maxIndexUser processing if the view is empty
if (Number.isInteger(datasource[propName])) {
getter = datasource[propName];
if (Number.isInteger(getter)) {
onRenderHandlers = onRenderHandlers.filter(function (handler) {
return handler.id !== propName;
});
onRenderHandlers.push({
id: propName,
run: function run() {
return datasource[propName] = getter;
}
});
}
}
}
function defineDatasourceIndex(datasource, propName, propUserName) {
var descriptor = Object.getOwnPropertyDescriptor(datasource, propName);
if (descriptor && (descriptor.set || descriptor.get)) {
return;
}
var getter = void 0;
persistDatasourceIndex(datasource, propName);
Object.defineProperty(datasource, propName, {
// non-read-only public property
Object.defineProperty(this.publicContext, 'disabled', {
get: function get() {
return _this.disabled;
},
set: function set(value) {
getter = value;
if (pending.length && !buffer.length) {
persistDatasourceIndex(datasource, propName);
return;
}
buffer[propUserName] = value;
var topPaddingHeightOld = viewport.topDataPos();
viewport.adjustPaddings();
if (propName === 'minIndex') {
viewport.onAfterMinIndexSet(topPaddingHeightOld);
}
},
get: function get() {
return getter;
return !(_this.disabled = value) ? _this.doAdjust() : null;
}
});
}
defineDatasourceIndex(datasource, 'minIndex', 'minIndexUser');
defineDatasourceIndex(datasource, 'maxIndex', 'maxIndexUser');
var fetchNext = datasource.get.length !== 2 ? function (success) {
return datasource.get(buffer.next, bufferSize, success);
} : function (success) {
datasource.get({
index: buffer.next,
append: buffer.length ? buffer[buffer.length - 1].item : void 0,
count: bufferSize
}, success);
};
var fetchPrevious = datasource.get.length !== 2 ? function (success) {
return datasource.get(buffer.first - bufferSize, bufferSize, success);
} : function (success) {
datasource.get({
index: buffer.first - bufferSize,
prepend: buffer.length ? buffer[0].item : void 0,
count: bufferSize
}, success);
};
var initialize = function initialize() {
var tryCount = 0;
if (!viewport.applyContainerStyle()) {
var timer = $interval(function () {
tryCount++;
if (viewport.applyContainerStyle()) {
$interval.cancel(timer);
doAdjust();
}
if (tryCount * VIEWPORT_POLLING_INTERVAL >= MAX_VIEWPORT_DELAY) {
$interval.cancel(timer);
throw Error('ui-scroll directive requires a viewport with non-zero height in ' + MAX_VIEWPORT_DELAY + 'ms');
}
}, VIEWPORT_POLLING_INTERVAL);
} else {
doAdjust();
}
};
/**
* Build padding elements
*
* Calling linker is the only way I found to get access to the tag name of the template
* to prevent the directive scope from pollution a new scope is created and destroyed
* right after the builder creation is completed
*/
linker(function (clone, scope) {
viewport.createPaddingElements(clone[0]);
// we do not include the clone in the DOM. It means that the nested directives will not
// be able to reach the parent directives, but in this case it is intentional because we
// created the clone to access the template tag name
scope.$destroy();
clone.remove();
});
$scope.$on('$destroy', function () {
unbindEvents();
viewport.unbind('mousewheel', wheelHandler);
});
viewport.bind('mousewheel', wheelHandler);
initialize();
/* Private function definitions */
function isInvalid(rid) {
return rid && rid !== ridActual || $scope.$$destroyed;
}, {
key: 'loading',
value: function loading(value) {
this.isLoading = value;
}
function bindEvents() {
viewport.bind('resize', resizeAndScrollHandler);
viewport.bind('scroll', resizeAndScrollHandler);
}, {
key: 'isBOF',
value: function isBOF() {
return this.buffer.bof;
}
function unbindEvents() {
viewport.unbind('resize', resizeAndScrollHandler);
viewport.unbind('scroll', resizeAndScrollHandler);
}, {
key: 'isEOF',
value: function isEOF() {
return this.buffer.eof;
}
function reload() {
viewport.resetTopPadding();
viewport.resetBottomPadding();
if (arguments.length) {
startIndex = arguments[0];
}
buffer.reset(startIndex);
persistDatasourceIndex(datasource, 'minIndex');
persistDatasourceIndex(datasource, 'maxIndex');
doAdjust();
}, {
key: 'isEmpty',
value: function isEmpty() {
return !this.buffer.length;
}
function isElementVisible(wrapper) {
return wrapper.element.height() && wrapper.element[0].offsetParent;
}, {
key: 'append',
value: function append(newItems) {
this.buffer.append(newItems);
this.doAdjust();
this.viewport.clipTop();
this.viewport.clipBottom();
}
function visibilityWatcher(wrapper) {
if (isElementVisible(wrapper)) {
buffer.forEach(function (item) {
if (typeof item.unregisterVisibilityWatcher === 'function') {
item.unregisterVisibilityWatcher();
delete item.unregisterVisibilityWatcher;
}
});
if (!pending.length) {
$timeout(function () {
return doAdjust();
});
}
}
}, {
key: 'prepend',
value: function prepend(newItems) {
this.buffer.prepend(newItems);
this.doAdjust();
this.viewport.clipTop();
this.viewport.clipBottom();
}
function insertWrapperContent(wrapper, insertAfter) {
createElement(wrapper, insertAfter, viewport.insertElement);
if (!isElementVisible(wrapper)) {
wrapper.unregisterVisibilityWatcher = wrapper.scope.$watch(function () {
return visibilityWatcher(wrapper);
});
}, {
key: 'applyUpdates',
value: function applyUpdates(arg1, arg2) {
if (typeof arg1 === 'function') {
this.applyUpdatesFunc(arg1);
} else {
this.applyUpdatesIndex(arg1, arg2);
}
elementRoutines.hideElement(wrapper); // hide inserted elements before data binding
this.doAdjust();
}
}, {
key: 'applyUpdatesFunc',
value: function applyUpdatesFunc(cb) {
var _this2 = this;
function createElement(wrapper, insertAfter, insertElement) {
var promises = null;
var sibling = insertAfter > 0 ? buffer[insertAfter - 1].element : undefined;
linker(function (clone, scope) {
promises = insertElement(clone, sibling);
wrapper.element = clone;
wrapper.scope = scope;
scope[itemName] = wrapper.item;
this.buffer.slice(0).forEach(function (wrapper) {
// we need to do it on the buffer clone, because buffer content
// may change as we iterate through
_this2.applyUpdate(wrapper, cb(wrapper.item, wrapper.scope, wrapper.element));
});
// ui-scroll-grid apply
if (adapter.transform) {
var tdInitializer = wrapper.scope.uiScrollTdInitializer;
if (tdInitializer && tdInitializer.linking) {
adapter.transform(wrapper.scope, wrapper.element);
} else {
wrapper.scope.uiScrollTdInitializer = {
onLink: function onLink() {
return adapter.transform(wrapper.scope, wrapper.element);
},
scope: wrapper.scope
};
}
}
}, {
key: 'applyUpdatesIndex',
value: function applyUpdatesIndex(index, newItems) {
if (index % 1 !== 0) {
throw new Error('applyUpdates - ' + index + ' is not a valid index (should be an integer)');
}
return promises;
}
var _index = index - this.buffer.first;
function updateDOM() {
var promises = [];
var toBePrepended = [];
var toBeRemoved = [];
var inserted = [];
buffer.forEach(function (wrapper, i) {
switch (wrapper.op) {
case 'prepend':
toBePrepended.unshift(wrapper);
break;
case 'append':
insertWrapperContent(wrapper, i);
wrapper.op = 'none';
inserted.push(wrapper);
break;
case 'insert':
promises = promises.concat(createElement(wrapper, i, viewport.insertElementAnimated));
wrapper.op = 'none';
inserted.push(wrapper);
break;
case 'remove':
toBeRemoved.push(wrapper);
}
});
toBeRemoved.forEach(function (wrapper) {
return promises = promises.concat(viewport.removeItem(wrapper));
});
if (toBePrepended.length) toBePrepended.forEach(function (wrapper) {
insertWrapperContent(wrapper);
wrapper.op = 'none';
});
buffer.forEach(function (item, i) {
return item.scope.$index = buffer.first + i;
});
return {
prepended: toBePrepended,
removed: toBeRemoved,
inserted: inserted,
animated: promises
};
}
function updatePaddings(rid, updates) {
// schedule another doAdjust after animation completion
if (updates.animated.length) {
$q.all(updates.animated).then(function () {
viewport.adjustPaddings();
doAdjust(rid);
});
} else {
viewport.adjustPaddings();
// apply updates only within buffer
if (_index >= 0 && _index < this.buffer.length) {
this.applyUpdate(this.buffer[_index], newItems);
}
}
function enqueueFetch(rid, updates) {
if (viewport.shouldLoadBottom()) {
if (!updates || buffer.effectiveHeight(updates.inserted) > 0) {
// this means that at least one item appended in the last batch has height > 0
if (pending.push(true) === 1) {
adapter.loading(true);
fetch(rid);
// out-of-buffer case: deletion may affect Paddings
else if (index >= this.buffer.getAbsMinIndex() && index <= this.buffer.getAbsMaxIndex()) {
if (Array.isArray(newItems) && !newItems.length) {
this.viewport.removeCacheItem(index, index === this.buffer.minIndex);
if (index === this.buffer.getAbsMinIndex()) {
this.buffer.incrementMinIndex();
} else {
this.buffer.decrementMaxIndex();
}
}
}
} else if (viewport.shouldLoadTop()) {
if (!updates || buffer.effectiveHeight(updates.prepended) > 0 || pending[0]) {
// this means that at least one item appended in the last batch has height > 0
// pending[0] = true means that previous fetch was appending. We need to force at least one prepend
// BTW there will always be at least 1 element in the pending array because bottom is fetched first
if (pending.push(false) === 1) {
adapter.loading(true);
fetch(rid);
}
}
}
}
}, {
key: 'applyUpdate',
value: function applyUpdate(wrapper, newItems) {
var _this3 = this;
function processUpdates() {
var updates = updateDOM();
// We need the item bindings to be processed before we can do adjustments
!$scope.$$phase && !$rootScope.$$phase && $scope.$digest();
updates.inserted.forEach(function (w) {
return elementRoutines.showElement(w);
});
updates.prepended.forEach(function (w) {
return elementRoutines.showElement(w);
});
return updates;
}
function doAdjust(rid) {
if (!rid) {
// dismiss pending requests
pending = [];
rid = ++ridActual;
}
var updates = processUpdates();
if (isInvalid(rid)) {
if (!Array.isArray(newItems)) {
return;
}
updatePaddings(rid, updates);
enqueueFetch(rid);
if (!pending.length) {
adapter.calculateProperties();
var position = this.buffer.indexOf(wrapper);
if (!newItems.reverse().some(function (newItem) {
return newItem === wrapper.item;
})) {
wrapper.op = 'remove';
if (position === 0 && !newItems.length) {
wrapper._op = 'isTop'; // to catch "first" edge case on remove
}
}
}
function doAdjustAfterFetch(rid) {
var updates = processUpdates();
viewport.onAfterPrepend(updates);
if (isInvalid(rid)) {
return;
}
updatePaddings(rid, updates);
onRenderHandlersRunner();
enqueueFetch(rid, updates);
pending.shift();
if (pending.length) fetch(rid);else {
adapter.loading(false);
bindEvents();
adapter.calculateProperties();
}
}
function fetch(rid) {
if (pending[0]) {
// scrolling down
if (buffer.length && !viewport.shouldLoadBottom()) {
doAdjustAfterFetch(rid);
newItems.forEach(function (newItem) {
if (newItem === wrapper.item) {
position--;
} else {
fetchNext(function (result) {
if (isInvalid(rid)) {
return;
}
if (result.length < bufferSize) {
buffer.eof = true;
}
if (result.length > 0) {
viewport.clipTop();
buffer.append(result);
}
doAdjustAfterFetch(rid);
});
// 3 parameter (isTop) is to catch "first" edge case on insert
_this3.buffer.insert(position + 1, newItem, position === -1);
}
} else {
// scrolling up
if (buffer.length && !viewport.shouldLoadTop()) {
doAdjustAfterFetch(rid);
} else {
fetchPrevious(function (result) {
if (isInvalid(rid)) {
return;
}
});
}
}, {
key: 'calculateProperties',
value: function calculateProperties() {
var rowTop = null,
topHeight = 0;
var topDone = false,
bottomDone = false;
var length = this.buffer.length;
if (result.length < bufferSize) {
buffer.bof = true;
// log 'bof is reached'
}
for (var i = 0; i < length; i++) {
var item = this.buffer[i];
var itemTop = item.element.offset().top;
if (result.length > 0) {
if (buffer.length) {
viewport.clipBottom();
}
buffer.prepend(result);
}
if (rowTop !== itemTop) {
// a new row condition
var itemHeight = item.element.outerHeight(true);
var top = this.viewport.topDataPos() + topHeight + itemHeight;
doAdjustAfterFetch(rid);
});
if (!topDone && top > this.viewport.topVisiblePos()) {
topDone = true;
this['topVisible'] = item.item;
this['topVisibleElement'] = item.element;
this['topVisibleScope'] = item.scope;
}
if (!bottomDone && (top >= this.viewport.bottomVisiblePos() || i === length - 1 && this.isEOF())) {
bottomDone = true;
this['bottomVisible'] = item.item;
this['bottomVisibleElement'] = item.element;
this['bottomVisibleScope'] = item.scope;
}
topHeight += itemHeight;
}
}
}
rowTop = itemTop;
function resizeAndScrollHandler() {
if (!$rootScope.$$phase && !adapter.isLoading && !adapter.disabled) {
enqueueFetch(ridActual);
if (pending.length) {
unbindEvents();
} else {
adapter.calculateProperties();
!$scope.$$phase && $scope.$digest();
if (topDone && bottomDone) {
break;
}
}
}
}]);
function wheelHandler(event) {
if (!adapter.disabled) {
var scrollTop = viewport[0].scrollTop;
var yMax = viewport[0].scrollHeight - viewport[0].clientHeight;
return Adapter;
}();
if (scrollTop === 0 && !buffer.bof || scrollTop === yMax && !buffer.eof) {
event.preventDefault();
}
}
}
}
}]);
exports.default = Adapter;

@@ -1785,0 +1779,0 @@ /***/ })

/*!
* angular-ui-scroll (compressed)
* angular-ui-scroll
* https://github.com/angular-ui/ui-scroll
* Version: 1.7.0-rc.6 -- 2017-11-17T18:27:05.969Z
* Version: 1.7.0 -- 2017-12-05T17:50:06.228Z
* License: MIT
*/
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t,n,r,o,a,u,s){i(this,e),this.$parse=n,this.$attr=r,this.viewport=o,this.buffer=a,this.doAdjust=u,this.reload=s,this.isLoading=!1,this.disabled=!1;var l=o.getScope();this.startScope=l.$parent?l:t,this.publicContext={},this.assignAdapter(r.adapter),this.generatePublicContext()}return r(e,[{key:"assignAdapter",value:function(e){if(e&&(e=e.replace(/^\s+|\s+$/gm,""))){var t=void 0;try{this.$parse(e).assign(this.startScope,{}),t=this.$parse(e)(this.startScope)}catch(t){throw t.message="Angular ui-scroll Adapter assignment exception.\nCan't parse \""+e+'" expression.\n'+t.message,t}Object.assign(t,this.publicContext),this.publicContext=t}}},{key:"generatePublicContext",value:function(){for(var e=this,t=["reload","applyUpdates","append","prepend","isBOF","isEOF","isEmpty"],n=t.length-1;n>=0;n--)this.publicContext[t[n]]=this[t[n]].bind(this);for(var i=["isLoading","topVisible","topVisibleElement","topVisibleScope","bottomVisible","bottomVisibleElement","bottomVisibleScope"],r=i.length-1;r>=0;r--)!function(t){var n=void 0,r=e.$attr[i[t]];Object.defineProperty(e,i[t],{get:function(){return n},set:function(o){n=o,e.publicContext[i[t]]=o,r&&e.$parse(r).assign(e.startScope,o)}})}(r);Object.defineProperty(this.publicContext,"disabled",{get:function(){return e.disabled},set:function(t){return(e.disabled=t)?null:e.doAdjust()}})}},{key:"loading",value:function(e){this.isLoading=e}},{key:"isBOF",value:function(){return this.buffer.bof}},{key:"isEOF",value:function(){return this.buffer.eof}},{key:"isEmpty",value:function(){return!this.buffer.length}},{key:"append",value:function(e){this.buffer.append(e),this.doAdjust(),this.viewport.clipTop(),this.viewport.clipBottom()}},{key:"prepend",value:function(e){this.buffer.prepend(e),this.doAdjust(),this.viewport.clipTop(),this.viewport.clipBottom()}},{key:"applyUpdates",value:function(e,t){"function"==typeof e?this.applyUpdatesFunc(e):this.applyUpdatesIndex(e,t),this.doAdjust()}},{key:"applyUpdatesFunc",value:function(e){var t=this;this.buffer.slice(0).forEach(function(n){t.applyUpdate(n,e(n.item,n.scope,n.element))})}},{key:"applyUpdatesIndex",value:function(e,t){if(e%1!=0)throw new Error("applyUpdates - "+e+" is not a valid index (should be an integer)");var n=e-this.buffer.first;n>=0&&n<this.buffer.length?this.applyUpdate(this.buffer[n],t):e>=this.buffer.getAbsMinIndex()&&e<=this.buffer.getAbsMaxIndex()&&Array.isArray(t)&&!t.length&&(this.viewport.removeCacheItem(e,e===this.buffer.minIndex),e===this.buffer.getAbsMinIndex()?this.buffer.incrementMinIndex():this.buffer.decrementMaxIndex())}},{key:"applyUpdate",value:function(e,t){var n=this;if(Array.isArray(t)){var i=this.buffer.indexOf(e);t.reverse().some(function(t){return t===e.item})||(e.op="remove",0!==i||t.length||(e._op="isTop")),t.forEach(function(t){t===e.item?i--:n.buffer.insert(i+1,t,-1===i)})}}},{key:"calculateProperties",value:function(){for(var e=null,t=0,n=!1,i=!1,r=this.buffer.length,o=0;o<r;o++){var a=this.buffer[o],u=a.element.offset().top;if(e!==u){var s=a.element.outerHeight(!0),l=this.viewport.topDataPos()+t+s;!n&&l>this.viewport.topVisiblePos()&&(n=!0,this.topVisible=a.item,this.topVisibleElement=a.element,this.topVisibleScope=a.scope),!i&&(l>=this.viewport.bottomVisiblePos()||o===r-1&&this.isEOF())&&(i=!0,this.bottomVisible=a.item,this.bottomVisibleElement=a.element,this.bottomVisibleScope=a.scope),t+=s}if(e=u,n&&i)break}}}]),e}();t.default=o},function(e,t,n){"use strict";function i(e,t,n){var i=Object.create(Array.prototype);return Object.assign(i,{size:t,reset:function(e){i.remove(0,i.length),i.eof=!1,i.bof=!1,i.first=e,i.next=e,i.minIndex=e,i.maxIndex=e,i.minIndexUser=null,i.maxIndexUser=null},append:function(e){e.forEach(function(e){++i.next,i.insert("append",e)}),i.maxIndex=i.eof?i.next-1:Math.max(i.next-1,i.maxIndex)},prepend:function(e){e.reverse().forEach(function(e){--i.first,i.insert("prepend",e)}),i.minIndex=i.bof?i.minIndex=i.first:Math.min(i.first,i.minIndex)},insert:function(e,t,n){var r={item:t};if(e%1==0)r.op="insert",i.splice(e,0,r),n?i.first--:i.next++;else switch(r.op=e,e){case"append":i.push(r);break;case"prepend":i.unshift(r)}},remove:function(t,n){if(Number.isInteger(t)){for(var r=t;r<n;r++)e.removeElement(i[r]);return i.splice(t,n-t)}return i.splice(i.indexOf(t),1),"isTop"===t._op&&i.first===this.getAbsMinIndex()?this.incrementMinIndex():this.decrementMaxIndex(),"isTop"===t._op?i.first++:i.next--,i.length||(i.first=1,i.next=1),e.removeElementAnimated(t)},incrementMinIndex:function(){if(null!==i.minIndexUser){if(i.minIndex>i.minIndexUser)return void i.minIndexUser++;i.minIndex===i.minIndexUser&&i.minIndexUser++}i.minIndex++},decrementMaxIndex:function(){null!==i.maxIndexUser&&i.maxIndex<=i.maxIndexUser&&i.maxIndexUser--,i.maxIndex--},getAbsMinIndex:function(){return null!==i.minIndexUser?Math.min(i.minIndexUser,i.minIndex):i.minIndex},getAbsMaxIndex:function(){return null!==i.maxIndexUser?Math.max(i.maxIndexUser,i.maxIndex):i.maxIndex},effectiveHeight:function(e){if(!e.length)return 0;var t=Number.MAX_VALUE,n=Number.NEGATIVE_INFINITY;return e.forEach(function(e){e.element[0].offsetParent&&(t=Math.min(t,e.element.offset().top),n=Math.max(n,e.element.offset().top+e.element.outerHeight(!0)))}),Math.max(0,n-t)}}),i.reset(n),i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i){"insertRule"in e?e.insertRule(t+"{"+n+"}",i):"addRule"in e&&e.addRule(t,n,i)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a="ng-ui-scroll-hide",u=function(){function e(t,n){i(this,e),this.$animate=t.has&&t.has("$animate")?t.get("$animate"):null,this.isAngularVersionLessThen1_3=1===angular.version.major&&angular.version.minor<3,this.$q=n,r(document.styleSheets[0],"."+a,"display: none")}return o(e,[{key:"hideElement",value:function(e){e.element.addClass(a)}},{key:"showElement",value:function(e){e.element.removeClass(a)}},{key:"insertElement",value:function(e,t){return t.after(e),[]}},{key:"removeElement",value:function(e){return e.element.remove(),e.scope.$destroy(),[]}},{key:"insertElementAnimated",value:function(e,t){if(!this.$animate)return this.insertElement(e,t);if(this.isAngularVersionLessThen1_3){var n=this.$q.defer();return this.$animate.enter(e,null,t,function(){return n.resolve()}),[n.promise]}return[this.$animate.enter(e,null,t)]}},{key:"removeElementAnimated",value:function(e){if(!this.$animate)return this.removeElement(e);if(this.isAngularVersionLessThen1_3){var t=this.$q.defer();return this.$animate.leave(e.element,function(){return e.scope.$destroy(),t.resolve()}),[t.promise]}return[this.$animate.leave(e.element).then(function(){return e.scope.$destroy()})]}}]),e}();t.default=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(i=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&u.return&&u.return()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(){i(this,e)}return o(e,[{key:"registerFor",value:function(e){function t(e,t,n){var i=e[0],o=r({top:["scrollTop","pageYOffset","scrollLeft"],left:["scrollLeft","pageXOffset","scrollTop"]}[t],3),a=o[0],u=o[1],l=o[2],c=void 0!==n;return s(i)?c?i.scrollTo(e[l].call(e),n):u in i?i[u]:i.document.documentElement[a]:(c&&(i[a]=n),i[a])}function n(e,t){var n=void 0,i=void 0,a=void 0,l=void 0,c=void 0,f=void 0,d=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0;if(s(e))return n=document.documentElement[{height:"clientHeight",width:"clientWidth"}[t]],{base:n,padding:0,border:0,margin:0};var b=r({width:[e.offsetWidth,"Left","Right"],height:[e.offsetHeight,"Top","Bottom"]}[t],3);return n=b[0],d=b[1],h=b[2],f=u(e),g=o(e,f["padding"+d])||0,v=o(e,f["padding"+h])||0,i=o(e,f["border"+d+"Width"])||0,a=o(e,f["border"+h+"Width"])||0,l=f["margin"+d],c=f["margin"+h],p=o(e,l)||0,m=o(e,c)||0,{base:n,padding:g+v,border:i+a,margin:p+m}}function i(e,t,i){var r=void 0,o=void 0,a=n(e,t);return a.base>0?{base:a.base-a.padding-a.border,outer:a.base,outerfull:a.base+a.margin}[i]:(r=u(e),o=r[t],(o<0||null===o)&&(o=e.style[t]||0),o=parseFloat(o)||0,{base:o-a.padding-a.border,outer:o,outerfull:o+a.padding+a.border+a.margin}[i])}var o=void 0,a=void 0,u=void 0,s=void 0;return a=angular.element.prototype.css,e.prototype.css=function(e,t){var n=this,i=n[0];if(i&&3!==i.nodeType&&8!==i.nodeType&&i.style)return a.call(n,e,t)},s=function(e){return e&&e.document&&e.location&&e.alert&&e.setInterval},window.getComputedStyle?(u=function(e){return window.getComputedStyle(e,null)},o=function(e,t){return parseFloat(t)}):(u=function(e){return e.currentStyle},o=function(e,t){var n=void 0,i=void 0,r=void 0,o=void 0,a=void 0,u=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;return new RegExp("^("+u+")(?!px)[a-z%]+$","i").test(t)?(a=e.style,n=a.left,r=e.runtimeStyle,o=r&&r.left,r&&(r.left=a.left),a.left=t,i=a.pixelLeft,a.left=n,o&&(r.left=o),i):parseFloat(t)}),angular.forEach({before:function(e){var t,n,i,r,o,a,u;if(u=this,n=u[0],o=u.parent(),t=o.contents(),t[0]===n)return o.prepend(e);for(i=r=1,a=t.length-1;1<=a?r<=a:r>=a;i=1<=a?++r:--r)if(t[i]===n)return void angular.element(t[i-1]).after(e);throw new Error("invalid DOM structure "+n.outerHTML)},height:function(e){var t;return t=this,void 0!==e?(Number.isInteger(e)&&(e+="px"),a.call(t,"height",e)):i(this[0],"height","base")},outerHeight:function(e){return i(this[0],"height",e?"outerfull":"outer")},outerWidth:function(e){return i(this[0],"width",e?"outerfull":"outer")},offset:function(e){var t=void 0,n=void 0,i=this,r={top:0,left:0},o=i[0],a=o&&o.ownerDocument;if(arguments.length){if(void 0===e)return i;throw new Error("offset setter method is not implemented")}if(a)return t=a.documentElement,null!=o.getBoundingClientRect&&(r=o.getBoundingClientRect()),n=a.defaultView||a.parentWindow,{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}},scrollTop:function(e){return t(this,"top",e)},scrollLeft:function(e){return t(this,"left",e)}},function(t,n){if(!e.prototype[n])return e.prototype[n]=t})}}]),e}();t.default=a},function(e,t,n){"use strict";function i(e,t,n,i,r,a){function u(){return c.outerHeight()*a}var s=null,l=null,c=i&&i.viewport?i.viewport:angular.element(window),f=i&&i.container?i.container:void 0,d=i&&i.scope?i.scope:r;return c.css({"overflow-anchor":"none","overflow-y":"auto",display:"block"}),Object.assign(c,{getScope:function(){return d},createPaddingElements:function(e){s=new o.default(e),l=new o.default(e),n.before(s.element),n.after(l.element),s.height(0),l.height(0)},applyContainerStyle:function(){return!f||(f!==c&&c.css("height",window.getComputedStyle(f[0]).height),c.height()>0)},bottomDataPos:function(){var e=c[0].scrollHeight;return(e=null!=e?e:c[0].document.documentElement.scrollHeight)-l.height()},topDataPos:function(){return s.height()},bottomVisiblePos:function(){return c.scrollTop()+c.outerHeight()},topVisiblePos:function(){return c.scrollTop()},insertElement:function(t,n){return e.insertElement(t,n||s.element)},insertElementAnimated:function(t,n){return e.insertElementAnimated(t,n||s.element)},shouldLoadBottom:function(){return!t.eof&&c.bottomDataPos()<c.bottomVisiblePos()+u()},clipBottom:function(){for(var e=0,n=0,i=0,r=c.bottomDataPos()-c.bottomVisiblePos()-u(),o=t.length-1;o>=0&&(i=t[o].element.outerHeight(!0),!(n+i>r));o--)l.cache.add(t[o]),n+=i,e++;e>0&&(t.eof=!1,t.remove(t.length-e,t.length),t.next-=e,c.adjustPaddings())},shouldLoadTop:function(){return!t.bof&&c.topDataPos()>c.topVisiblePos()-u()},clipTop:function(){for(var e=0,n=0,i=0,r=c.topVisiblePos()-c.topDataPos()-u(),o=0;o<t.length&&(i=t[o].element.outerHeight(!0),!(n+i>r));o++)s.cache.add(t[o]),n+=i,e++;e>0&&(s.height(s.height()+n),t.bof=!1,t.remove(0,e),t.first+=e)},adjustPaddings:function(){if(t.length){var e=t.reduce(function(e,t){return e+t.element.outerHeight(!0)},0),n=0,i=0;s.cache.forEach(function(e){e.index<t.first&&(n+=e.height,i++)});var r=0,o=0;l.cache.forEach(function(e){e.index>=t.next&&(r+=e.height,o++)});var a=e+n+r,u=a/(i+o+t.length),c=null!==t.minIndexUser&&t.minIndex>t.minIndexUser,f=null!==t.maxIndexUser&&t.maxIndex<t.maxIndexUser,d=c?(t.minIndex-t.minIndexUser)*u:0,h=f?(t.maxIndexUser-t.maxIndex)*u:0;s.height(n+d),l.height(r+h)}},onAfterMinIndexSet:function(e){if(null!==t.minIndexUser&&t.minIndex>t.minIndexUser){var n=s.height()-e;for(c.scrollTop(c.scrollTop()+n);(n-=c.scrollTop())>0;)l.height(l.height()+n),c.scrollTop(c.scrollTop()+n)}},onAfterPrepend:function(e){if(e.prepended.length){var n=t.effectiveHeight(e.prepended),i=s.height()-n;i>=0?s.height(i):(s.height(0),c.scrollTop(c.scrollTop()-i))}},resetTopPadding:function(){s.height(0),s.cache.clear()},resetBottomPadding:function(){l.height(0),l.cache.clear()},removeCacheItem:function(e,t){s.cache.remove(e,t),l.cache.remove(e,t)},removeItem:function(e){return this.removeCacheItem(e),t.remove(e)}}),c}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(5),o=function(e){return e&&e.__esModule?e:{default:e}}(r)},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(){var e=[];return e.push.apply(e,arguments),Object.setPrototypeOf(e,r.prototype),e}function o(e){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("ui-scroll directive requires an Element node for templating the view");var t=void 0;switch(e.tagName.toLowerCase()){case"dl":throw new Error("ui-scroll directive does not support <"+e.tagName+"> as a repeating tag: "+e.outerHTML);case"tr":t=angular.element("<table><tr><td><div></div></td></tr></table>").find("tr");break;case"li":t=angular.element("<li></li>");break;default:t=angular.element("<div></div>")}return t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=function(){function e(){i(this,e)}return a(e,[{key:"add",value:function(e){for(var t=this.length-1;t>=0;t--)if(this[t].index===e.scope.$index)return void(this[t].height=e.element.outerHeight());this.push({index:e.scope.$index,height:e.element.outerHeight()}),this.sort(function(e,t){return e.index<t.index?-1:e.index>t.index?1:0})}},{key:"remove",value:function(e,t){for(var n=e%1==0?e:e.scope.$index,i=e%1==0?t:"isTop"===e._op,r=this.length-1;r>=0;r--)if(this[r].index===n){this.splice(r,1);break}if(!i)for(var o=this.length-1;o>=0;o--)this[o].index>n&&this[o].index--}},{key:"clear",value:function(){this.length=0}}]),e}();r.prototype=Object.create(Array.prototype),Object.getOwnPropertyNames(u.prototype).forEach(function(e){return r.prototype[e]=u.prototype[e]});var s=function(){function e(t){i(this,e),this.element=o(t),this.cache=new r}return a(e,[{key:"height",value:function(){return this.element.height.apply(this.element,arguments)}}]),e}();t.default=s},,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var r=n(3),o=i(r),a=n(2),u=i(a),s=n(1),l=i(s),c=n(4),f=i(c),d=n(0),h=i(d);angular.module("ui.scroll",[]).service("jqLiteExtras",function(){return new o.default}).run(["jqLiteExtras",function(e){return window.jQuery?null:e.registerFor(angular.element)}]).directive("uiScrollViewport",function(){return{restrict:"A",controller:["$scope","$element",function(e,t){var n=this;return this.container=t,this.viewport=t,this.scope=e,angular.forEach(t.children(),function(e){"tbody"===e.tagName.toLowerCase()&&(n.viewport=angular.element(e))}),this}]}}).directive("uiScroll",["$log","$injector","$rootScope","$timeout","$interval","$q","$parse",function(e,t,n,i,r,o,a){function s(e,s,c,d,p){function m(t,n){var i=a(t)(e);return isNaN(i)?n:i}function g(){J.forEach(function(e){return e.run()}),J=[]}function v(e,t){var n=void 0;Number.isInteger(e[t])&&(n=e[t],Number.isInteger(n)&&(J=J.filter(function(e){return e.id!==t}),J.push({id:t,run:function(){return e[t]=n}})))}function b(e,t,n){var i=Object.getOwnPropertyDescriptor(e,t);if(!i||!i.set&&!i.get){var r=void 0;v(e,t),Object.defineProperty(e,t,{set:function(i){if(r=i,z.length&&!X.length)return void v(e,t);X[n]=i;var o=Y.topDataPos();Y.adjustPaddings(),"minIndex"===t&&Y.onAfterMinIndexSet(o)},get:function(){return r}})}}function x(t){return t&&t!==q||e.$$destroyed}function y(){Y.bind("resize",V),Y.bind("scroll",V)}function w(){Y.unbind("resize",V),Y.unbind("scroll",V)}function I(){Y.resetTopPadding(),Y.resetBottomPadding(),arguments.length&&(W=arguments[0]),X.reset(W),v(C,"minIndex"),v(C,"maxIndex"),M()}function E(e){return e.element.height()&&e.element[0].offsetParent}function P(e){E(e)&&(X.forEach(function(e){"function"==typeof e.unregisterVisibilityWatcher&&(e.unregisterVisibilityWatcher(),delete e.unregisterVisibilityWatcher)}),z.length||i(function(){return M()}))}function $(e,t){T(e,t,Y.insertElement),E(e)||(e.unregisterVisibilityWatcher=e.scope.$watch(function(){return P(e)})),R.hideElement(e)}function T(e,t,n){var i=null,r=t>0?X[t-1].element:void 0;if(p(function(t,o){i=n(t,r),e.element=t,e.scope=o,o[H]=e.item}),G.transform){var o=e.scope.uiScrollTdInitializer;o&&o.linking?G.transform(e.scope,e.element):e.scope.uiScrollTdInitializer={onLink:function(){return G.transform(e.scope,e.element)},scope:e.scope}}return i}function O(){var e=[],t=[],n=[],i=[];return X.forEach(function(r,o){switch(r.op){case"prepend":t.unshift(r);break;case"append":$(r,o),r.op="none",i.push(r);break;case"insert":e=e.concat(T(r,o,Y.insertElementAnimated)),r.op="none",i.push(r);break;case"remove":n.push(r)}}),n.forEach(function(t){return e=e.concat(Y.removeItem(t))}),t.length&&t.forEach(function(e){$(e),e.op="none"}),X.forEach(function(e,t){return e.scope.$index=X.first+t}),{prepended:t,removed:n,inserted:i,animated:e}}function j(e,t){t.animated.length?o.all(t.animated).then(function(){Y.adjustPaddings(),M(e)}):Y.adjustPaddings()}function A(e,t){Y.shouldLoadBottom()?(!t||X.effectiveHeight(t.inserted)>0)&&1===z.push(!0)&&(G.loading(!0),S(e)):Y.shouldLoadTop()&&(!t||X.effectiveHeight(t.prepended)>0||z[0])&&1===z.push(!1)&&(G.loading(!0),S(e))}function k(){var t=O();return!e.$$phase&&!n.$$phase&&e.$digest(),t.inserted.forEach(function(e){return R.showElement(e)}),t.prepended.forEach(function(e){return R.showElement(e)}),t}function M(e){e||(z=[],e=++q);var t=k();x(e)||(j(e,t),A(e),z.length||G.calculateProperties())}function U(e){var t=k();Y.onAfterPrepend(t),x(e)||(j(e,t),g(),A(e,t),z.shift(),z.length?S(e):(G.loading(!1),y(),G.calculateProperties()))}function S(e){z[0]?X.length&&!Y.shouldLoadBottom()?U(e):K(function(t){x(e)||(t.length<D&&(X.eof=!0),t.length>0&&(Y.clipTop(),X.append(t)),U(e))}):X.length&&!Y.shouldLoadTop()?U(e):Z(function(t){x(e)||(t.length<D&&(X.bof=!0),t.length>0&&(X.length&&Y.clipBottom(),X.prepend(t)),U(e))})}function V(){n.$$phase||G.isLoading||G.disabled||(A(q),z.length?w():(G.calculateProperties(),!e.$$phase&&e.$digest()))}function _(e){if(!G.disabled){var t=Y[0].scrollTop,n=Y[0].scrollHeight-Y[0].clientHeight;(0===t&&!X.bof||t===n&&!X.eof)&&e.preventDefault()}}var L=c.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);if(!L)throw new Error("Expected uiScroll in form of '_item_ in _datasource_' but got '"+c.uiScroll+"'");var C=null,H=L[1],N=L[2],B=d[0],D=Math.max(3,m(c.bufferSize,10)),F=Math.max(.3,m(c.padding,.5)),W=m(c.startIndex,1),q=0,z=[],R=new u.default(t,o),X=new l.default(R,D,W),Y=new f.default(R,X,s,B,n,F),G=new h.default(e,a,c,Y,X,M,I);B&&(B.adapter=G);var Q=function(){return"[object Object]"===Object.prototype.toString.call(C)&&"function"==typeof C.get};if(C=a(N)(e),!Q()&&(C=t.get(N),!Q()))throw new Error(N+" is not a valid datasource");var J=[];b(C,"minIndex","minIndexUser"),b(C,"maxIndex","maxIndexUser");var K=2!==C.get.length?function(e){return C.get(X.next,D,e)}:function(e){C.get({index:X.next,append:X.length?X[X.length-1].item:void 0,count:D},e)},Z=2!==C.get.length?function(e){return C.get(X.first-D,D,e)}:function(e){C.get({index:X.first-D,prepend:X.length?X[0].item:void 0,count:D},e)};p(function(e,t){Y.createPaddingElements(e[0]),t.$destroy(),e.remove()}),e.$on("$destroy",function(){w(),Y.unbind("mousewheel",_)}),Y.bind("mousewheel",_),function(){var e=0;if(Y.applyContainerStyle())M();else var t=r(function(){if(e++,Y.applyContainerStyle()&&(r.cancel(t),M()),50*e>=500)throw r.cancel(t),Error("ui-scroll directive requires a viewport with non-zero height in 500ms")},50)}()}return{require:["?^uiScrollViewport"],restrict:"A",transclude:"element",priority:1e3,terminal:!0,link:s}}])}]);
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var r=n(1),o=i(r),a=n(2),u=i(a),s=n(3),l=i(s),c=n(4),f=i(c),d=n(6),h=i(d);angular.module("ui.scroll",[]).constant("JQLiteExtras",o.default).run(["JQLiteExtras",function(e){return window.jQuery?null:(new e).registerFor(angular.element)}]).directive("uiScrollViewport",function(){return{restrict:"A",controller:["$scope","$element",function(e,t){var n=this;return this.container=t,this.viewport=t,this.scope=e,angular.forEach(t.children(),function(e){"tbody"===e.tagName.toLowerCase()&&(n.viewport=angular.element(e))}),this}]}}).directive("uiScroll",["$log","$injector","$rootScope","$timeout","$interval","$q","$parse",function(e,t,n,i,r,o,a){function s(e,s,c,d,p){function m(t,n){var i=a(t)(e);return isNaN(i)?n:i}function g(){G.forEach(function(e){return e.run()}),G=[]}function v(e,t){var n=void 0;Number.isInteger(e[t])&&(n=e[t],Number.isInteger(n)&&(G=G.filter(function(e){return e.id!==t}),G.push({id:t,run:function(){return e[t]=n}})))}function b(e,t,n){var i=Object.getOwnPropertyDescriptor(e,t);if(!i||!i.set&&!i.get){var r=void 0;v(e,t),Object.defineProperty(e,t,{set:function(i){if(r=i,R.length&&!Q.length)return void v(e,t);Q[n]=i;var o=X.topDataPos();X.adjustPaddings(),"minIndex"===t&&X.onAfterMinIndexSet(o)},get:function(){return r}})}}function x(t){return t&&t!==z||e.$$destroyed}function y(){X.bind("resize",V),X.bind("scroll",V)}function w(){X.unbind("resize",V),X.unbind("scroll",V)}function I(){X.resetTopPadding(),X.resetBottomPadding(),arguments.length&&(W=arguments[0]),Q.reset(W),v(C,"minIndex"),v(C,"maxIndex"),M()}function E(e){return e.element.height()&&e.element[0].offsetParent}function P(e){E(e)&&(Q.forEach(function(e){"function"==typeof e.unregisterVisibilityWatcher&&(e.unregisterVisibilityWatcher(),delete e.unregisterVisibilityWatcher)}),R.length||i(function(){return M()}))}function $(e,t){T(e,t,X.insertElement),E(e)||(e.unregisterVisibilityWatcher=e.scope.$watch(function(){return P(e)})),q.hideElement(e)}function T(e,t,n){var i=null,r=t>0?Q[t-1].element:void 0;if(p(function(t,o){i=n(t,r),e.element=t,e.scope=o,o[H]=e.item}),Y.transform){var o=e.scope.uiScrollTdInitializer;o&&o.linking?Y.transform(e.scope,e.element):e.scope.uiScrollTdInitializer={onLink:function(){return Y.transform(e.scope,e.element)},scope:e.scope}}return i}function O(){var e=[],t=[],n=[],i=[];return Q.forEach(function(r,o){switch(r.op){case"prepend":t.unshift(r);break;case"append":$(r,o),r.op="none",i.push(r);break;case"insert":e=e.concat(T(r,o,X.insertElementAnimated)),r.op="none",i.push(r);break;case"remove":n.push(r)}}),n.forEach(function(t){return e=e.concat(X.removeItem(t))}),t.length&&t.forEach(function(e){$(e),e.op="none"}),Q.forEach(function(e,t){return e.scope.$index=Q.first+t}),{prepended:t,removed:n,inserted:i,animated:e}}function A(e,t){t.animated.length?o.all(t.animated).then(function(){X.adjustPaddings(),M(e)}):X.adjustPaddings()}function j(e,t){X.shouldLoadBottom()?(!t||Q.effectiveHeight(t.inserted)>0)&&1===R.push(!0)&&(Y.loading(!0),S(e)):X.shouldLoadTop()&&(!t||Q.effectiveHeight(t.prepended)>0||R[0])&&1===R.push(!1)&&(Y.loading(!0),S(e))}function k(){var t=O();return!e.$$phase&&!n.$$phase&&e.$digest(),t.inserted.forEach(function(e){return q.showElement(e)}),t.prepended.forEach(function(e){return q.showElement(e)}),t}function M(e){e||(R=[],e=++z);var t=k();x(e)||(A(e,t),j(e),R.length||Y.calculateProperties())}function U(e){var t=k();X.onAfterPrepend(t),x(e)||(A(e,t),g(),j(e,t),R.shift(),R.length?S(e):(Y.loading(!1),y(),Y.calculateProperties()))}function S(e){R[0]?Q.length&&!X.shouldLoadBottom()?U(e):K(function(t){x(e)||(t.length<D&&(Q.eof=!0),t.length>0&&(X.clipTop(),Q.append(t)),U(e))}):Q.length&&!X.shouldLoadTop()?U(e):Z(function(t){x(e)||(t.length<D&&(Q.bof=!0),t.length>0&&(Q.length&&X.clipBottom(),Q.prepend(t)),U(e))})}function V(){n.$$phase||Y.isLoading||Y.disabled||(j(z),R.length?w():(Y.calculateProperties(),!e.$$phase&&e.$digest()))}function _(e){if(!Y.disabled){var t=X[0].scrollTop,n=X[0].scrollHeight-X[0].clientHeight;(0===t&&!Q.bof||t===n&&!Q.eof)&&e.preventDefault()}}var L=c.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);if(!L)throw new Error("Expected uiScroll in form of '_item_ in _datasource_' but got '"+c.uiScroll+"'");var C=null,H=L[1],N=L[2],B=d[0],D=Math.max(3,m(c.bufferSize,10)),F=Math.max(.3,m(c.padding,.5)),W=m(c.startIndex,1),z=0,R=[],q=new u.default(t,o),Q=new l.default(q,D,W),X=new f.default(q,Q,s,B,n,F),Y=new h.default(e,a,c,X,Q,M,I);B&&(B.adapter=Y);var J=function(){return"[object Object]"===Object.prototype.toString.call(C)&&"function"==typeof C.get};if(C=a(N)(e),!J()&&(C=t.get(N),!J()))throw new Error(N+" is not a valid datasource");var G=[];b(C,"minIndex","minIndexUser"),b(C,"maxIndex","maxIndexUser");var K=2!==C.get.length?function(e){return C.get(Q.next,D,e)}:function(e){C.get({index:Q.next,append:Q.length?Q[Q.length-1].item:void 0,count:D},e)},Z=2!==C.get.length?function(e){return C.get(Q.first-D,D,e)}:function(e){C.get({index:Q.first-D,prepend:Q.length?Q[0].item:void 0,count:D},e)};p(function(e,t){X.createPaddingElements(e[0]),t.$destroy(),e.remove()}),e.$on("$destroy",function(){w(),X.unbind("mousewheel",_)}),X.bind("mousewheel",_),function(){var e=0;if(X.applyContainerStyle())M();else var t=r(function(){if(e++,X.applyContainerStyle()&&(r.cancel(t),M()),50*e>=500)throw r.cancel(t),Error("ui-scroll directive requires a viewport with non-zero height in 500ms")},50)}()}return{require:["?^uiScrollViewport"],restrict:"A",transclude:"element",priority:1e3,terminal:!0,link:s}}])},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(i=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&u.return&&u.return()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(){i(this,e)}return o(e,[{key:"registerFor",value:function(e){function t(e,t,n){var i=e[0],o=r({top:["scrollTop","pageYOffset","scrollLeft"],left:["scrollLeft","pageXOffset","scrollTop"]}[t],3),a=o[0],u=o[1],l=o[2],c=void 0!==n;return s(i)?c?i.scrollTo(e[l].call(e),n):u in i?i[u]:i.document.documentElement[a]:(c&&(i[a]=n),i[a])}function n(e,t){var n=void 0,i=void 0,a=void 0,l=void 0,c=void 0,f=void 0,d=void 0,h=void 0,p=void 0,m=void 0,g=void 0,v=void 0;if(s(e))return n=document.documentElement[{height:"clientHeight",width:"clientWidth"}[t]],{base:n,padding:0,border:0,margin:0};var b=r({width:[e.offsetWidth,"Left","Right"],height:[e.offsetHeight,"Top","Bottom"]}[t],3);return n=b[0],d=b[1],h=b[2],f=u(e),g=o(e,f["padding"+d])||0,v=o(e,f["padding"+h])||0,i=o(e,f["border"+d+"Width"])||0,a=o(e,f["border"+h+"Width"])||0,l=f["margin"+d],c=f["margin"+h],p=o(e,l)||0,m=o(e,c)||0,{base:n,padding:g+v,border:i+a,margin:p+m}}function i(e,t,i){var r=void 0,o=void 0,a=n(e,t);return a.base>0?{base:a.base-a.padding-a.border,outer:a.base,outerfull:a.base+a.margin}[i]:(r=u(e),o=r[t],(o<0||null===o)&&(o=e.style[t]||0),o=parseFloat(o)||0,{base:o-a.padding-a.border,outer:o,outerfull:o+a.padding+a.border+a.margin}[i])}var o=void 0,a=void 0,u=void 0,s=void 0;return a=angular.element.prototype.css,e.prototype.css=function(e,t){var n=this,i=n[0];if(i&&3!==i.nodeType&&8!==i.nodeType&&i.style)return a.call(n,e,t)},s=function(e){return e&&e.document&&e.location&&e.alert&&e.setInterval},window.getComputedStyle?(u=function(e){return window.getComputedStyle(e,null)},o=function(e,t){return parseFloat(t)}):(u=function(e){return e.currentStyle},o=function(e,t){var n=void 0,i=void 0,r=void 0,o=void 0,a=void 0,u=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;return new RegExp("^("+u+")(?!px)[a-z%]+$","i").test(t)?(a=e.style,n=a.left,r=e.runtimeStyle,o=r&&r.left,r&&(r.left=a.left),a.left=t,i=a.pixelLeft,a.left=n,o&&(r.left=o),i):parseFloat(t)}),angular.forEach({before:function(e){var t,n,i,r,o,a,u;if(u=this,n=u[0],o=u.parent(),t=o.contents(),t[0]===n)return o.prepend(e);for(i=r=1,a=t.length-1;1<=a?r<=a:r>=a;i=1<=a?++r:--r)if(t[i]===n)return void angular.element(t[i-1]).after(e);throw new Error("invalid DOM structure "+n.outerHTML)},height:function(e){var t;return t=this,void 0!==e?(Number.isInteger(e)&&(e+="px"),a.call(t,"height",e)):i(this[0],"height","base")},outerHeight:function(e){return i(this[0],"height",e?"outerfull":"outer")},outerWidth:function(e){return i(this[0],"width",e?"outerfull":"outer")},offset:function(e){var t=void 0,n=void 0,i=this,r={top:0,left:0},o=i[0],a=o&&o.ownerDocument;if(arguments.length){if(void 0===e)return i;throw new Error("offset setter method is not implemented")}if(a)return t=a.documentElement,null!=o.getBoundingClientRect&&(r=o.getBoundingClientRect()),n=a.defaultView||a.parentWindow,{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}},scrollTop:function(e){return t(this,"top",e)},scrollLeft:function(e){return t(this,"left",e)}},function(t,n){if(!e.prototype[n])return e.prototype[n]=t})}}]),e}();t.default=a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i){"insertRule"in e?e.insertRule(t+"{"+n+"}",i):"addRule"in e&&e.addRule(t,n,i)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a="ng-ui-scroll-hide",u=function(){function e(t,n){i(this,e),this.$animate=t.has&&t.has("$animate")?t.get("$animate"):null,this.isAngularVersionLessThen1_3=1===angular.version.major&&angular.version.minor<3,this.$q=n,r(document.styleSheets[0],"."+a,"display: none")}return o(e,[{key:"hideElement",value:function(e){e.element.addClass(a)}},{key:"showElement",value:function(e){e.element.removeClass(a)}},{key:"insertElement",value:function(e,t){return t.after(e),[]}},{key:"removeElement",value:function(e){return e.element.remove(),e.scope.$destroy(),[]}},{key:"insertElementAnimated",value:function(e,t){if(!this.$animate)return this.insertElement(e,t);if(this.isAngularVersionLessThen1_3){var n=this.$q.defer();return this.$animate.enter(e,null,t,function(){return n.resolve()}),[n.promise]}return[this.$animate.enter(e,null,t)]}},{key:"removeElementAnimated",value:function(e){if(!this.$animate)return this.removeElement(e);if(this.isAngularVersionLessThen1_3){var t=this.$q.defer();return this.$animate.leave(e.element,function(){return e.scope.$destroy(),t.resolve()}),[t.promise]}return[this.$animate.leave(e.element).then(function(){return e.scope.$destroy()})]}}]),e}();t.default=u},function(e,t,n){"use strict";function i(e,t,n){var i=Object.create(Array.prototype);return Object.assign(i,{size:t,reset:function(e){i.remove(0,i.length),i.eof=!1,i.bof=!1,i.first=e,i.next=e,i.minIndex=e,i.maxIndex=e,i.minIndexUser=null,i.maxIndexUser=null},append:function(e){e.forEach(function(e){++i.next,i.insert("append",e)}),i.maxIndex=i.eof?i.next-1:Math.max(i.next-1,i.maxIndex)},prepend:function(e){e.reverse().forEach(function(e){--i.first,i.insert("prepend",e)}),i.minIndex=i.bof?i.minIndex=i.first:Math.min(i.first,i.minIndex)},insert:function(e,t,n){var r={item:t};if(e%1==0)r.op="insert",i.splice(e,0,r),n?i.first--:i.next++;else switch(r.op=e,e){case"append":i.push(r);break;case"prepend":i.unshift(r)}},remove:function(t,n){if(Number.isInteger(t)){for(var r=t;r<n;r++)e.removeElement(i[r]);return i.splice(t,n-t)}return i.splice(i.indexOf(t),1),"isTop"===t._op&&i.first===this.getAbsMinIndex()?this.incrementMinIndex():this.decrementMaxIndex(),"isTop"===t._op?i.first++:i.next--,i.length||(i.first=1,i.next=1),e.removeElementAnimated(t)},incrementMinIndex:function(){if(null!==i.minIndexUser){if(i.minIndex>i.minIndexUser)return void i.minIndexUser++;i.minIndex===i.minIndexUser&&i.minIndexUser++}i.minIndex++},decrementMaxIndex:function(){null!==i.maxIndexUser&&i.maxIndex<=i.maxIndexUser&&i.maxIndexUser--,i.maxIndex--},getAbsMinIndex:function(){return null!==i.minIndexUser?Math.min(i.minIndexUser,i.minIndex):i.minIndex},getAbsMaxIndex:function(){return null!==i.maxIndexUser?Math.max(i.maxIndexUser,i.maxIndex):i.maxIndex},effectiveHeight:function(e){if(!e.length)return 0;var t=Number.MAX_VALUE,n=Number.NEGATIVE_INFINITY;return e.forEach(function(e){e.element[0].offsetParent&&(t=Math.min(t,e.element.offset().top),n=Math.max(n,e.element.offset().top+e.element.outerHeight(!0)))}),Math.max(0,n-t)}}),i.reset(n),i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function i(e,t,n,i,r,a){function u(){return c.outerHeight()*a}var s=null,l=null,c=i&&i.viewport?i.viewport:angular.element(window),f=i&&i.container?i.container:void 0,d=i&&i.scope?i.scope:r;return c.css({"overflow-anchor":"none","overflow-y":"auto",display:"block"}),Object.assign(c,{getScope:function(){return d},createPaddingElements:function(e){s=new o.default(e),l=new o.default(e),n.before(s.element),n.after(l.element),s.height(0),l.height(0)},applyContainerStyle:function(){return!f||(f!==c&&c.css("height",window.getComputedStyle(f[0]).height),c.height()>0)},bottomDataPos:function(){var e=c[0].scrollHeight;return(e=null!=e?e:c[0].document.documentElement.scrollHeight)-l.height()},topDataPos:function(){return s.height()},bottomVisiblePos:function(){return c.scrollTop()+c.outerHeight()},topVisiblePos:function(){return c.scrollTop()},insertElement:function(t,n){return e.insertElement(t,n||s.element)},insertElementAnimated:function(t,n){return e.insertElementAnimated(t,n||s.element)},shouldLoadBottom:function(){return!t.eof&&c.bottomDataPos()<c.bottomVisiblePos()+u()},clipBottom:function(){for(var e=0,n=0,i=0,r=c.bottomDataPos()-c.bottomVisiblePos()-u(),o=t.length-1;o>=0&&(i=t[o].element.outerHeight(!0),!(n+i>r));o--)l.cache.add(t[o]),n+=i,e++;e>0&&(t.eof=!1,t.remove(t.length-e,t.length),t.next-=e,c.adjustPaddings())},shouldLoadTop:function(){return!t.bof&&c.topDataPos()>c.topVisiblePos()-u()},clipTop:function(){for(var e=0,n=0,i=0,r=c.topVisiblePos()-c.topDataPos()-u(),o=0;o<t.length&&(i=t[o].element.outerHeight(!0),!(n+i>r));o++)s.cache.add(t[o]),n+=i,e++;e>0&&(s.height(s.height()+n),t.bof=!1,t.remove(0,e),t.first+=e)},adjustPaddings:function(){if(t.length){var e=t.reduce(function(e,t){return e+t.element.outerHeight(!0)},0),n=0,i=0;s.cache.forEach(function(e){e.index<t.first&&(n+=e.height,i++)});var r=0,o=0;l.cache.forEach(function(e){e.index>=t.next&&(r+=e.height,o++)});var a=e+n+r,u=a/(i+o+t.length),c=null!==t.minIndexUser&&t.minIndex>t.minIndexUser,f=null!==t.maxIndexUser&&t.maxIndex<t.maxIndexUser,d=c?(t.minIndex-t.minIndexUser)*u:0,h=f?(t.maxIndexUser-t.maxIndex)*u:0;s.height(n+d),l.height(r+h)}},onAfterMinIndexSet:function(e){if(null!==t.minIndexUser&&t.minIndex>t.minIndexUser){var n=s.height()-e;for(c.scrollTop(c.scrollTop()+n);(n-=c.scrollTop())>0;)l.height(l.height()+n),c.scrollTop(c.scrollTop()+n)}},onAfterPrepend:function(e){if(e.prepended.length){var n=t.effectiveHeight(e.prepended),i=s.height()-n;i>=0?s.height(i):(s.height(0),c.scrollTop(c.scrollTop()-i))}},resetTopPadding:function(){s.height(0),s.cache.clear()},resetBottomPadding:function(){l.height(0),l.cache.clear()},removeCacheItem:function(e,t){s.cache.remove(e,t),l.cache.remove(e,t)},removeItem:function(e){return this.removeCacheItem(e),t.remove(e)}}),c}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=n(5),o=function(e){return e&&e.__esModule?e:{default:e}}(r)},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(){var e=[];return e.push.apply(e,arguments),Object.setPrototypeOf(e,r.prototype),e}function o(e){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("ui-scroll directive requires an Element node for templating the view");var t=void 0;switch(e.tagName.toLowerCase()){case"dl":throw new Error("ui-scroll directive does not support <"+e.tagName+"> as a repeating tag: "+e.outerHTML);case"tr":t=angular.element("<table><tr><td><div></div></td></tr></table>").find("tr");break;case"li":t=angular.element("<li></li>");break;default:t=angular.element("<div></div>")}return t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),u=function(){function e(){i(this,e)}return a(e,[{key:"add",value:function(e){for(var t=this.length-1;t>=0;t--)if(this[t].index===e.scope.$index)return void(this[t].height=e.element.outerHeight());this.push({index:e.scope.$index,height:e.element.outerHeight()}),this.sort(function(e,t){return e.index<t.index?-1:e.index>t.index?1:0})}},{key:"remove",value:function(e,t){for(var n=e%1==0?e:e.scope.$index,i=e%1==0?t:"isTop"===e._op,r=this.length-1;r>=0;r--)if(this[r].index===n){this.splice(r,1);break}if(!i)for(var o=this.length-1;o>=0;o--)this[o].index>n&&this[o].index--}},{key:"clear",value:function(){this.length=0}}]),e}();r.prototype=Object.create(Array.prototype),Object.getOwnPropertyNames(u.prototype).forEach(function(e){return r.prototype[e]=u.prototype[e]});var s=function(){function e(t){i(this,e),this.element=o(t),this.cache=new r}return a(e,[{key:"height",value:function(){return this.element.height.apply(this.element,arguments)}}]),e}();t.default=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(t,n,r,o,a,u,s){i(this,e),this.$parse=n,this.$attr=r,this.viewport=o,this.buffer=a,this.doAdjust=u,this.reload=s,this.isLoading=!1,this.disabled=!1;var l=o.getScope();this.startScope=l.$parent?l:t,this.publicContext={},this.assignAdapter(r.adapter),this.generatePublicContext()}return r(e,[{key:"assignAdapter",value:function(e){if(e&&(e=e.replace(/^\s+|\s+$/gm,""))){var t=void 0;try{this.$parse(e).assign(this.startScope,{}),t=this.$parse(e)(this.startScope)}catch(t){throw t.message="Angular ui-scroll Adapter assignment exception.\nCan't parse \""+e+'" expression.\n'+t.message,t}Object.assign(t,this.publicContext),this.publicContext=t}}},{key:"generatePublicContext",value:function(){for(var e=this,t=["reload","applyUpdates","append","prepend","isBOF","isEOF","isEmpty"],n=t.length-1;n>=0;n--)this.publicContext[t[n]]=this[t[n]].bind(this);for(var i=["isLoading","topVisible","topVisibleElement","topVisibleScope","bottomVisible","bottomVisibleElement","bottomVisibleScope"],r=i.length-1;r>=0;r--)!function(t){var n=void 0,r=e.$attr[i[t]];Object.defineProperty(e,i[t],{get:function(){return n},set:function(o){n=o,e.publicContext[i[t]]=o,r&&e.$parse(r).assign(e.startScope,o)}})}(r);Object.defineProperty(this.publicContext,"disabled",{get:function(){return e.disabled},set:function(t){return(e.disabled=t)?null:e.doAdjust()}})}},{key:"loading",value:function(e){this.isLoading=e}},{key:"isBOF",value:function(){return this.buffer.bof}},{key:"isEOF",value:function(){return this.buffer.eof}},{key:"isEmpty",value:function(){return!this.buffer.length}},{key:"append",value:function(e){this.buffer.append(e),this.doAdjust(),this.viewport.clipTop(),this.viewport.clipBottom()}},{key:"prepend",value:function(e){this.buffer.prepend(e),this.doAdjust(),this.viewport.clipTop(),this.viewport.clipBottom()}},{key:"applyUpdates",value:function(e,t){"function"==typeof e?this.applyUpdatesFunc(e):this.applyUpdatesIndex(e,t),this.doAdjust()}},{key:"applyUpdatesFunc",value:function(e){var t=this;this.buffer.slice(0).forEach(function(n){t.applyUpdate(n,e(n.item,n.scope,n.element))})}},{key:"applyUpdatesIndex",value:function(e,t){if(e%1!=0)throw new Error("applyUpdates - "+e+" is not a valid index (should be an integer)");var n=e-this.buffer.first;n>=0&&n<this.buffer.length?this.applyUpdate(this.buffer[n],t):e>=this.buffer.getAbsMinIndex()&&e<=this.buffer.getAbsMaxIndex()&&Array.isArray(t)&&!t.length&&(this.viewport.removeCacheItem(e,e===this.buffer.minIndex),e===this.buffer.getAbsMinIndex()?this.buffer.incrementMinIndex():this.buffer.decrementMaxIndex())}},{key:"applyUpdate",value:function(e,t){var n=this;if(Array.isArray(t)){var i=this.buffer.indexOf(e);t.reverse().some(function(t){return t===e.item})||(e.op="remove",0!==i||t.length||(e._op="isTop")),t.forEach(function(t){t===e.item?i--:n.buffer.insert(i+1,t,-1===i)})}}},{key:"calculateProperties",value:function(){for(var e=null,t=0,n=!1,i=!1,r=this.buffer.length,o=0;o<r;o++){var a=this.buffer[o],u=a.element.offset().top;if(e!==u){var s=a.element.outerHeight(!0),l=this.viewport.topDataPos()+t+s;!n&&l>this.viewport.topVisiblePos()&&(n=!0,this.topVisible=a.item,this.topVisibleElement=a.element,this.topVisibleScope=a.scope),!i&&(l>=this.viewport.bottomVisiblePos()||o===r-1&&this.isEOF())&&(i=!0,this.bottomVisible=a.item,this.bottomVisibleElement=a.element,this.bottomVisibleScope=a.scope),t+=s}if(e=u,n&&i)break}}}]),e}();t.default=o}]);
//# sourceMappingURL=ui-scroll.min.js.map
{
"name": "angular-ui-scroll",
"description": "AngularJS infinite scrolling module",
"version": "1.7.0-rc.6",
"version": "1.7.0",
"src": "./src/",

@@ -22,29 +22,30 @@ "public": "./dist/",

"scripts": {
"start": "grunt",
"test": "grunt test",
"dev": "concurrently --kill-others --raw \"grunt server\" \"grunt test\"",
"build": "grunt build"
"prod-build": "webpack --color",
"prod-test": "karma start test/config/karma.conf.js",
"dev-server": "webpack-dev-server --color",
"dev-test": "karma start test/config/karma.conf.js",
"hint-tests": "jshint --verbose test",
"build": "npm run hint-tests && npm run prod-build && npm run prod-test",
"dev": "npm-run-all --parallel dev-server dev-test",
"test": "npm run dev-test",
"start": "npm run dev-server"
},
"devDependencies": {
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
"babel-preset-es2015": "^6.22.0",
"clean-webpack-plugin": "^0.1.15",
"concurrently": "^3.4.0",
"express": "^4.14.0",
"grunt": "^1.0.1",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-karma": "^2.0.0",
"grunt-webpack": "^2.0.1",
"jasmine-core": "^2.5.2",
"karma": "^1.4.0",
"karma-chrome-launcher": "^2.0.0",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.1",
"clean-webpack-plugin": "^0.1.17",
"copy-webpack-plugin": "^4.2.0",
"jasmine-core": "^2.8.0",
"jshint": "^2.9.2",
"jshint-loader": "^0.8.4",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-firefox-launcher": "^1.0.1",
"karma-ie-launcher": "^1.0.0",
"karma-jasmine": "^1.1.0",
"webpack": "^2.6.1"
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.6",
"npm-run-all": "^4.1.2",
"webpack": "^3.8.1",
"webpack-dev-server": "^2.9.4"
},

@@ -51,0 +52,0 @@ "keywords": [

@@ -139,3 +139,3 @@ ### UI Scroll - [AngularJS](http://angularjs.org/) directive to provide infinite scroll over a limited element buffer

- [uiScrollViewport directive](#uiscrollviewport-directive)
- [jqLiteExtras service](#jqliteextras-service) (with runner)
- [jqLiteExtras constant](#jqliteextras-constant) (with runner)
- __ui.scroll.grid__ module which has

@@ -353,5 +353,5 @@ - [uiScrollTh directive](#uiscrollth-and-uiscrolltd-directives)

## jqLiteExtras service
## jqLiteExtras constant
This service implements some DOM element methods of jQuery which are currently not implemented in jqLite, namely
This constant is a class that implements some DOM element methods of jQuery which are currently not implemented in jqLite, namely

@@ -430,4 +430,3 @@ * before(elem)

The ui-scroll sources are in [./src](https://github.com/angular-ui/ui-scroll/tree/master/src) folder. They could not be run as is
because of ES6 modules (since v1.6.0), they should be built. Build process includes jshint sources verification, webpack-based
distributive files forming and tests running.
because of ES6 modules (since v1.6.0), they should be built. The build process includes jshint sources verification, distributive files generating and tests running.

@@ -442,6 +441,3 @@ There are some npm scripts available for developing.

This should start development server on 5005 port over the [./demo](https://github.com/angular-ui/ui-scroll/tree/master/demo) folder.
The middleware is configured to provide work with temporary distributive files (./temp) despite the direct links to public distributive
files (./dist). So the dist-folder should stay clear until the development is finished. Dev-server watches for the source codes (./src)
and automatically re-build temporary distributive files.
This should start development server on 5005 port over the [./demo](https://github.com/angular-ui/ui-scroll/tree/master/demo) folder. The dev-server proxy is configured to provide work with temporary distributive files (which are being built in-memory each time the sources from ./src have been changed) despite the direct links to public distributive files form ./dist folder. So the dist-folder should stay clear until the development is finished.

@@ -454,5 +450,3 @@ __2__. To run tests in keep-alive mode use

This runs karma testing against temporary distributive files (./temp). We created a number of specifications which consist of more
than 160 tests. They are living at the [./test](https://github.com/angular-ui/ui-scroll/tree/master/test) folder. Karma watches for temp
and test folders changes and automatically re-runs tests.
This runs Karma testing against temporary distributive files that are being built in-memory by the Webpack. We created a number of specifications which consist of more than 200 tests. They are living at the [./test](https://github.com/angular-ui/ui-scroll/tree/master/test) folder. Karma watches both for ./src and ./test folders and automatically re-runs tests after the source code has been changed.

@@ -465,4 +459,3 @@ __3__. To run both dev-server and tests in keep-alive mode use

This is the combination of first two scripts running in concurrently mode. This allows you to work with the ui-scroll examples on 5005 port
during continuous tests running.
This is the combination of first two scripts running in concurrently mode. This allows you to work with the ui-scroll examples on 5005 port during continuous tests running.

@@ -475,9 +468,8 @@ __4__. To run full build process use

After developing and testing complete, the build process should be run to
a) pass through jshint,
b) generate minified versions of distributive,
c) run tests with minified distributive files,
d) obtain all necessary files in the [./dist](https://github.com/angular-ui/ui-scroll/tree/master/dist) folder.
After developing and testing are completed, the build process should be run to
a) pass through jshint (both of ui-scroll and test specifications sources),
b) generate compressed and uncompressed versions of the ui-scroll distributive in the public [./dist](https://github.com/angular-ui/ui-scroll/tree/master/dist) folder,
c) run tests over minified distributive files.
PR should include source code (./scr) changes, may include tests (./test) changes and may not include public distributive (./dist) changes.
Pull Rerquest should include source code (./scr) changes, may include tests (./test) changes and may not include public distributive (./dist) changes.

@@ -492,7 +484,8 @@

* Reduced dygest cycles amount.
* Refactored Adapter and Padding classes.
* Refactored some core classes (Adapter, Padding).
* Reconsidered min/max indices processing.
* Refactored tests (removed timeouts, added helpers).
* Added ~50 new tests.
* Fixed a number of issues.
* Fixed a number of issues and other improvements.
* Removed Grunt from the build stack, now Webpack is the only build tool.

@@ -499,0 +492,0 @@ ### v1.6.2

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc