##// END OF EJS Templates
frontend: get rid of bower and nix
ergo -
Show More
This diff has been collapsed as it changes many lines, (8646 lines changed) Show them Hide them
@@ -1,13103 +1,20627 b''
1 // Underscore.js 1.6.0
1 // Underscore.js 1.8.3
2 2 // http://underscorejs.org
3 // (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3 // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4 4 // Underscore may be freely distributed under the MIT license.
5 5
6 6 (function() {
7 7
8 8 // Baseline setup
9 9 // --------------
10 10
11 11 // Establish the root object, `window` in the browser, or `exports` on the server.
12 12 var root = this;
13 13
14 14 // Save the previous value of the `_` variable.
15 15 var previousUnderscore = root._;
16 16
17 // Establish the object that gets returned to break out of a loop iteration.
18 var breaker = {};
19
20 17 // Save bytes in the minified (but not gzipped) version:
21 18 var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
22 19
23 20 // Create quick reference variables for speed access to core prototypes.
24 21 var
25 22 push = ArrayProto.push,
26 23 slice = ArrayProto.slice,
27 concat = ArrayProto.concat,
28 24 toString = ObjProto.toString,
29 25 hasOwnProperty = ObjProto.hasOwnProperty;
30 26
31 27 // All **ECMAScript 5** native function implementations that we hope to use
32 28 // are declared here.
33 29 var
34 nativeForEach = ArrayProto.forEach,
35 nativeMap = ArrayProto.map,
36 nativeReduce = ArrayProto.reduce,
37 nativeReduceRight = ArrayProto.reduceRight,
38 nativeFilter = ArrayProto.filter,
39 nativeEvery = ArrayProto.every,
40 nativeSome = ArrayProto.some,
41 nativeIndexOf = ArrayProto.indexOf,
42 nativeLastIndexOf = ArrayProto.lastIndexOf,
43 30 nativeIsArray = Array.isArray,
44 31 nativeKeys = Object.keys,
45 nativeBind = FuncProto.bind;
32 nativeBind = FuncProto.bind,
33 nativeCreate = Object.create;
34
35 // Naked function reference for surrogate-prototype-swapping.
36 var Ctor = function(){};
46 37
47 38 // Create a safe reference to the Underscore object for use below.
48 39 var _ = function(obj) {
49 40 if (obj instanceof _) return obj;
50 41 if (!(this instanceof _)) return new _(obj);
51 42 this._wrapped = obj;
52 43 };
53 44
54 45 // Export the Underscore object for **Node.js**, with
55 46 // backwards-compatibility for the old `require()` API. If we're in
56 // the browser, add `_` as a global object via a string identifier,
57 // for Closure Compiler "advanced" mode.
47 // the browser, add `_` as a global object.
58 48 if (typeof exports !== 'undefined') {
59 49 if (typeof module !== 'undefined' && module.exports) {
60 50 exports = module.exports = _;
61 51 }
62 52 exports._ = _;
63 53 } else {
64 54 root._ = _;
65 55 }
66 56
67 57 // Current version.
68 _.VERSION = '1.6.0';
58 _.VERSION = '1.8.3';
59
60 // Internal function that returns an efficient (for current engines) version
61 // of the passed-in callback, to be repeatedly applied in other Underscore
62 // functions.
63 var optimizeCb = function(func, context, argCount) {
64 if (context === void 0) return func;
65 switch (argCount == null ? 3 : argCount) {
66 case 1: return function(value) {
67 return func.call(context, value);
68 };
69 case 2: return function(value, other) {
70 return func.call(context, value, other);
71 };
72 case 3: return function(value, index, collection) {
73 return func.call(context, value, index, collection);
74 };
75 case 4: return function(accumulator, value, index, collection) {
76 return func.call(context, accumulator, value, index, collection);
77 };
78 }
79 return function() {
80 return func.apply(context, arguments);
81 };
82 };
83
84 // A mostly-internal function to generate callbacks that can be applied
85 // to each element in a collection, returning the desired result β€” either
86 // identity, an arbitrary callback, a property matcher, or a property accessor.
87 var cb = function(value, context, argCount) {
88 if (value == null) return _.identity;
89 if (_.isFunction(value)) return optimizeCb(value, context, argCount);
90 if (_.isObject(value)) return _.matcher(value);
91 return _.property(value);
92 };
93 _.iteratee = function(value, context) {
94 return cb(value, context, Infinity);
95 };
96
97 // An internal function for creating assigner functions.
98 var createAssigner = function(keysFunc, undefinedOnly) {
99 return function(obj) {
100 var length = arguments.length;
101 if (length < 2 || obj == null) return obj;
102 for (var index = 1; index < length; index++) {
103 var source = arguments[index],
104 keys = keysFunc(source),
105 l = keys.length;
106 for (var i = 0; i < l; i++) {
107 var key = keys[i];
108 if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];
109 }
110 }
111 return obj;
112 };
113 };
114
115 // An internal function for creating a new object that inherits from another.
116 var baseCreate = function(prototype) {
117 if (!_.isObject(prototype)) return {};
118 if (nativeCreate) return nativeCreate(prototype);
119 Ctor.prototype = prototype;
120 var result = new Ctor;
121 Ctor.prototype = null;
122 return result;
123 };
124
125 var property = function(key) {
126 return function(obj) {
127 return obj == null ? void 0 : obj[key];
128 };
129 };
130
131 // Helper for collection methods to determine whether a collection
132 // should be iterated as an array or as an object
133 // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
134 // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
135 var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
136 var getLength = property('length');
137 var isArrayLike = function(collection) {
138 var length = getLength(collection);
139 return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
140 };
69 141
70 142 // Collection Functions
71 143 // --------------------
72 144
73 145 // The cornerstone, an `each` implementation, aka `forEach`.
74 // Handles objects with the built-in `forEach`, arrays, and raw objects.
75 // Delegates to **ECMAScript 5**'s native `forEach` if available.
76 var each = _.each = _.forEach = function(obj, iterator, context) {
77 if (obj == null) return obj;
78 if (nativeForEach && obj.forEach === nativeForEach) {
79 obj.forEach(iterator, context);
80 } else if (obj.length === +obj.length) {
81 for (var i = 0, length = obj.length; i < length; i++) {
82 if (iterator.call(context, obj[i], i, obj) === breaker) return;
146 // Handles raw objects in addition to array-likes. Treats all
147 // sparse array-likes as if they were dense.
148 _.each = _.forEach = function(obj, iteratee, context) {
149 iteratee = optimizeCb(iteratee, context);
150 var i, length;
151 if (isArrayLike(obj)) {
152 for (i = 0, length = obj.length; i < length; i++) {
153 iteratee(obj[i], i, obj);
83 154 }
84 155 } else {
85 156 var keys = _.keys(obj);
86 for (var i = 0, length = keys.length; i < length; i++) {
87 if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;
157 for (i = 0, length = keys.length; i < length; i++) {
158 iteratee(obj[keys[i]], keys[i], obj);
88 159 }
89 160 }
90 161 return obj;
91 162 };
92 163
93 // Return the results of applying the iterator to each element.
94 // Delegates to **ECMAScript 5**'s native `map` if available.
95 _.map = _.collect = function(obj, iterator, context) {
96 var results = [];
97 if (obj == null) return results;
98 if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
99 each(obj, function(value, index, list) {
100 results.push(iterator.call(context, value, index, list));
101 });
164 // Return the results of applying the iteratee to each element.
165 _.map = _.collect = function(obj, iteratee, context) {
166 iteratee = cb(iteratee, context);
167 var keys = !isArrayLike(obj) && _.keys(obj),
168 length = (keys || obj).length,
169 results = Array(length);
170 for (var index = 0; index < length; index++) {
171 var currentKey = keys ? keys[index] : index;
172 results[index] = iteratee(obj[currentKey], currentKey, obj);
173 }
102 174 return results;
103 175 };
104 176
105 var reduceError = 'Reduce of empty array with no initial value';
177 // Create a reducing function iterating left or right.
178 function createReduce(dir) {
179 // Optimized iterator function as using arguments.length
180 // in the main function will deoptimize the, see #1991.
181 function iterator(obj, iteratee, memo, keys, index, length) {
182 for (; index >= 0 && index < length; index += dir) {
183 var currentKey = keys ? keys[index] : index;
184 memo = iteratee(memo, obj[currentKey], currentKey, obj);
185 }
186 return memo;
187 }
106 188
107 // **Reduce** builds up a single result from a list of values, aka `inject`,
108 // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
109 _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
110 var initial = arguments.length > 2;
111 if (obj == null) obj = [];
112 if (nativeReduce && obj.reduce === nativeReduce) {
113 if (context) iterator = _.bind(iterator, context);
114 return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
115 }
116 each(obj, function(value, index, list) {
117 if (!initial) {
118 memo = value;
119 initial = true;
120 } else {
121 memo = iterator.call(context, memo, value, index, list);
189 return function(obj, iteratee, memo, context) {
190 iteratee = optimizeCb(iteratee, context, 4);
191 var keys = !isArrayLike(obj) && _.keys(obj),
192 length = (keys || obj).length,
193 index = dir > 0 ? 0 : length - 1;
194 // Determine the initial value if none is provided.
195 if (arguments.length < 3) {
196 memo = obj[keys ? keys[index] : index];
197 index += dir;
122 198 }
123 });
124 if (!initial) throw new TypeError(reduceError);
125 return memo;
126 };
199 return iterator(obj, iteratee, memo, keys, index, length);
200 };
201 }
202
203 // **Reduce** builds up a single result from a list of values, aka `inject`,
204 // or `foldl`.
205 _.reduce = _.foldl = _.inject = createReduce(1);
127 206
128 207 // The right-associative version of reduce, also known as `foldr`.
129 // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
130 _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
131 var initial = arguments.length > 2;
132 if (obj == null) obj = [];
133 if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
134 if (context) iterator = _.bind(iterator, context);
135 return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
136 }
137 var length = obj.length;
138 if (length !== +length) {
139 var keys = _.keys(obj);
140 length = keys.length;
141 }
142 each(obj, function(value, index, list) {
143 index = keys ? keys[--length] : --length;
144 if (!initial) {
145 memo = obj[index];
146 initial = true;
147 } else {
148 memo = iterator.call(context, memo, obj[index], index, list);
149 }
150 });
151 if (!initial) throw new TypeError(reduceError);
152 return memo;
153 };
208 _.reduceRight = _.foldr = createReduce(-1);
154 209
155 210 // Return the first value which passes a truth test. Aliased as `detect`.
156 211 _.find = _.detect = function(obj, predicate, context) {
157 var result;
158 any(obj, function(value, index, list) {
159 if (predicate.call(context, value, index, list)) {
160 result = value;
161 return true;
162 }
163 });
164 return result;
212 var key;
213 if (isArrayLike(obj)) {
214 key = _.findIndex(obj, predicate, context);
215 } else {
216 key = _.findKey(obj, predicate, context);
217 }
218 if (key !== void 0 && key !== -1) return obj[key];
165 219 };
166 220
167 221 // Return all the elements that pass a truth test.
168 // Delegates to **ECMAScript 5**'s native `filter` if available.
169 222 // Aliased as `select`.
170 223 _.filter = _.select = function(obj, predicate, context) {
171 224 var results = [];
172 if (obj == null) return results;
173 if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context);
174 each(obj, function(value, index, list) {
175 if (predicate.call(context, value, index, list)) results.push(value);
225 predicate = cb(predicate, context);
226 _.each(obj, function(value, index, list) {
227 if (predicate(value, index, list)) results.push(value);
176 228 });
177 229 return results;
178 230 };
179 231
180 232 // Return all the elements for which a truth test fails.
181 233 _.reject = function(obj, predicate, context) {
182 return _.filter(obj, function(value, index, list) {
183 return !predicate.call(context, value, index, list);
184 }, context);
234 return _.filter(obj, _.negate(cb(predicate)), context);
185 235 };
186 236
187 237 // Determine whether all of the elements match a truth test.
188 // Delegates to **ECMAScript 5**'s native `every` if available.
189 238 // Aliased as `all`.
190 239 _.every = _.all = function(obj, predicate, context) {
191 predicate || (predicate = _.identity);
192 var result = true;
193 if (obj == null) return result;
194 if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context);
195 each(obj, function(value, index, list) {
196 if (!(result = result && predicate.call(context, value, index, list))) return breaker;
197 });
198 return !!result;
240 predicate = cb(predicate, context);
241 var keys = !isArrayLike(obj) && _.keys(obj),
242 length = (keys || obj).length;
243 for (var index = 0; index < length; index++) {
244 var currentKey = keys ? keys[index] : index;
245 if (!predicate(obj[currentKey], currentKey, obj)) return false;
246 }
247 return true;
199 248 };
200 249
201 250 // Determine if at least one element in the object matches a truth test.
202 // Delegates to **ECMAScript 5**'s native `some` if available.
203 251 // Aliased as `any`.
204 var any = _.some = _.any = function(obj, predicate, context) {
205 predicate || (predicate = _.identity);
206 var result = false;
207 if (obj == null) return result;
208 if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context);
209 each(obj, function(value, index, list) {
210 if (result || (result = predicate.call(context, value, index, list))) return breaker;
211 });
212 return !!result;
252 _.some = _.any = function(obj, predicate, context) {
253 predicate = cb(predicate, context);
254 var keys = !isArrayLike(obj) && _.keys(obj),
255 length = (keys || obj).length;
256 for (var index = 0; index < length; index++) {
257 var currentKey = keys ? keys[index] : index;
258 if (predicate(obj[currentKey], currentKey, obj)) return true;
259 }
260 return false;
213 261 };
214 262
215 // Determine if the array or object contains a given value (using `===`).
216 // Aliased as `include`.
217 _.contains = _.include = function(obj, target) {
218 if (obj == null) return false;
219 if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
220 return any(obj, function(value) {
221 return value === target;
222 });
263 // Determine if the array or object contains a given item (using `===`).
264 // Aliased as `includes` and `include`.
265 _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {
266 if (!isArrayLike(obj)) obj = _.values(obj);
267 if (typeof fromIndex != 'number' || guard) fromIndex = 0;
268 return _.indexOf(obj, item, fromIndex) >= 0;
223 269 };
224 270
225 271 // Invoke a method (with arguments) on every item in a collection.
226 272 _.invoke = function(obj, method) {
227 273 var args = slice.call(arguments, 2);
228 274 var isFunc = _.isFunction(method);
229 275 return _.map(obj, function(value) {
230 return (isFunc ? method : value[method]).apply(value, args);
276 var func = isFunc ? method : value[method];
277 return func == null ? func : func.apply(value, args);
231 278 });
232 279 };
233 280
234 281 // Convenience version of a common use case of `map`: fetching a property.
235 282 _.pluck = function(obj, key) {
236 283 return _.map(obj, _.property(key));
237 284 };
238 285
239 286 // Convenience version of a common use case of `filter`: selecting only objects
240 287 // containing specific `key:value` pairs.
241 288 _.where = function(obj, attrs) {
242 return _.filter(obj, _.matches(attrs));
289 return _.filter(obj, _.matcher(attrs));
243 290 };
244 291
245 292 // Convenience version of a common use case of `find`: getting the first object
246 293 // containing specific `key:value` pairs.
247 294 _.findWhere = function(obj, attrs) {
248 return _.find(obj, _.matches(attrs));
295 return _.find(obj, _.matcher(attrs));
249 296 };
250 297
251 // Return the maximum element or (element-based computation).
252 // Can't optimize arrays of integers longer than 65,535 elements.
253 // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797)
254 _.max = function(obj, iterator, context) {
255 if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
256 return Math.max.apply(Math, obj);
257 }
258 var result = -Infinity, lastComputed = -Infinity;
259 each(obj, function(value, index, list) {
260 var computed = iterator ? iterator.call(context, value, index, list) : value;
261 if (computed > lastComputed) {
262 result = value;
263 lastComputed = computed;
298 // Return the maximum element (or element-based computation).
299 _.max = function(obj, iteratee, context) {
300 var result = -Infinity, lastComputed = -Infinity,
301 value, computed;
302 if (iteratee == null && obj != null) {
303 obj = isArrayLike(obj) ? obj : _.values(obj);
304 for (var i = 0, length = obj.length; i < length; i++) {
305 value = obj[i];
306 if (value > result) {
307 result = value;
308 }
264 309 }
265 });
310 } else {
311 iteratee = cb(iteratee, context);
312 _.each(obj, function(value, index, list) {
313 computed = iteratee(value, index, list);
314 if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
315 result = value;
316 lastComputed = computed;
317 }
318 });
319 }
266 320 return result;
267 321 };
268 322
269 323 // Return the minimum element (or element-based computation).
270 _.min = function(obj, iterator, context) {
271 if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
272 return Math.min.apply(Math, obj);
273 }
274 var result = Infinity, lastComputed = Infinity;
275 each(obj, function(value, index, list) {
276 var computed = iterator ? iterator.call(context, value, index, list) : value;
277 if (computed < lastComputed) {
278 result = value;
279 lastComputed = computed;
324 _.min = function(obj, iteratee, context) {
325 var result = Infinity, lastComputed = Infinity,
326 value, computed;
327 if (iteratee == null && obj != null) {
328 obj = isArrayLike(obj) ? obj : _.values(obj);
329 for (var i = 0, length = obj.length; i < length; i++) {
330 value = obj[i];
331 if (value < result) {
332 result = value;
333 }
280 334 }
281 });
335 } else {
336 iteratee = cb(iteratee, context);
337 _.each(obj, function(value, index, list) {
338 computed = iteratee(value, index, list);
339 if (computed < lastComputed || computed === Infinity && result === Infinity) {
340 result = value;
341 lastComputed = computed;
342 }
343 });
344 }
282 345 return result;
283 346 };
284 347
285 // Shuffle an array, using the modern version of the
348 // Shuffle a collection, using the modern version of the
286 349 // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
287 350 _.shuffle = function(obj) {
288 var rand;
289 var index = 0;
290 var shuffled = [];
291 each(obj, function(value) {
292 rand = _.random(index++);
293 shuffled[index - 1] = shuffled[rand];
294 shuffled[rand] = value;
295 });
351 var set = isArrayLike(obj) ? obj : _.values(obj);
352 var length = set.length;
353 var shuffled = Array(length);
354 for (var index = 0, rand; index < length; index++) {
355 rand = _.random(0, index);
356 if (rand !== index) shuffled[index] = shuffled[rand];
357 shuffled[rand] = set[index];
358 }
296 359 return shuffled;
297 360 };
298 361
299 362 // Sample **n** random values from a collection.
300 363 // If **n** is not specified, returns a single random element.
301 364 // The internal `guard` argument allows it to work with `map`.
302 365 _.sample = function(obj, n, guard) {
303 366 if (n == null || guard) {
304 if (obj.length !== +obj.length) obj = _.values(obj);
367 if (!isArrayLike(obj)) obj = _.values(obj);
305 368 return obj[_.random(obj.length - 1)];
306 369 }
307 370 return _.shuffle(obj).slice(0, Math.max(0, n));
308 371 };
309 372
310 // An internal function to generate lookup iterators.
311 var lookupIterator = function(value) {
312 if (value == null) return _.identity;
313 if (_.isFunction(value)) return value;
314 return _.property(value);
315 };
316
317 // Sort the object's values by a criterion produced by an iterator.
318 _.sortBy = function(obj, iterator, context) {
319 iterator = lookupIterator(iterator);
373 // Sort the object's values by a criterion produced by an iteratee.
374 _.sortBy = function(obj, iteratee, context) {
375 iteratee = cb(iteratee, context);
320 376 return _.pluck(_.map(obj, function(value, index, list) {
321 377 return {
322 378 value: value,
323 379 index: index,
324 criteria: iterator.call(context, value, index, list)
380 criteria: iteratee(value, index, list)
325 381 };
326 382 }).sort(function(left, right) {
327 383 var a = left.criteria;
328 384 var b = right.criteria;
329 385 if (a !== b) {
330 386 if (a > b || a === void 0) return 1;
331 387 if (a < b || b === void 0) return -1;
332 388 }
333 389 return left.index - right.index;
334 390 }), 'value');
335 391 };
336 392
337 393 // An internal function used for aggregate "group by" operations.
338 394 var group = function(behavior) {
339 return function(obj, iterator, context) {
395 return function(obj, iteratee, context) {
340 396 var result = {};
341 iterator = lookupIterator(iterator);
342 each(obj, function(value, index) {
343 var key = iterator.call(context, value, index, obj);
344 behavior(result, key, value);
397 iteratee = cb(iteratee, context);
398 _.each(obj, function(value, index) {
399 var key = iteratee(value, index, obj);
400 behavior(result, value, key);
345 401 });
346 402 return result;
347 403 };
348 404 };
349 405
350 406 // Groups the object's values by a criterion. Pass either a string attribute
351 407 // to group by, or a function that returns the criterion.
352 _.groupBy = group(function(result, key, value) {
353 _.has(result, key) ? result[key].push(value) : result[key] = [value];
408 _.groupBy = group(function(result, value, key) {
409 if (_.has(result, key)) result[key].push(value); else result[key] = [value];
354 410 });
355 411
356 412 // Indexes the object's values by a criterion, similar to `groupBy`, but for
357 413 // when you know that your index values will be unique.
358 _.indexBy = group(function(result, key, value) {
414 _.indexBy = group(function(result, value, key) {
359 415 result[key] = value;
360 416 });
361 417
362 418 // Counts instances of an object that group by a certain criterion. Pass
363 419 // either a string attribute to count by, or a function that returns the
364 420 // criterion.
365 _.countBy = group(function(result, key) {
366 _.has(result, key) ? result[key]++ : result[key] = 1;
421 _.countBy = group(function(result, value, key) {
422 if (_.has(result, key)) result[key]++; else result[key] = 1;
367 423 });
368 424
369 // Use a comparator function to figure out the smallest index at which
370 // an object should be inserted so as to maintain order. Uses binary search.
371 _.sortedIndex = function(array, obj, iterator, context) {
372 iterator = lookupIterator(iterator);
373 var value = iterator.call(context, obj);
374 var low = 0, high = array.length;
375 while (low < high) {
376 var mid = (low + high) >>> 1;
377 iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
378 }
379 return low;
380 };
381
382 425 // Safely create a real, live array from anything iterable.
383 426 _.toArray = function(obj) {
384 427 if (!obj) return [];
385 428 if (_.isArray(obj)) return slice.call(obj);
386 if (obj.length === +obj.length) return _.map(obj, _.identity);
429 if (isArrayLike(obj)) return _.map(obj, _.identity);
387 430 return _.values(obj);
388 431 };
389 432
390 433 // Return the number of elements in an object.
391 434 _.size = function(obj) {
392 435 if (obj == null) return 0;
393 return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
436 return isArrayLike(obj) ? obj.length : _.keys(obj).length;
437 };
438
439 // Split a collection into two arrays: one whose elements all satisfy the given
440 // predicate, and one whose elements all do not satisfy the predicate.
441 _.partition = function(obj, predicate, context) {
442 predicate = cb(predicate, context);
443 var pass = [], fail = [];
444 _.each(obj, function(value, key, obj) {
445 (predicate(value, key, obj) ? pass : fail).push(value);
446 });
447 return [pass, fail];
394 448 };
395 449
396 450 // Array Functions
397 451 // ---------------
398 452
399 453 // Get the first element of an array. Passing **n** will return the first N
400 454 // values in the array. Aliased as `head` and `take`. The **guard** check
401 455 // allows it to work with `_.map`.
402 456 _.first = _.head = _.take = function(array, n, guard) {
403 457 if (array == null) return void 0;
404 if ((n == null) || guard) return array[0];
405 if (n < 0) return [];
406 return slice.call(array, 0, n);
458 if (n == null || guard) return array[0];
459 return _.initial(array, array.length - n);
407 460 };
408 461
409 462 // Returns everything but the last entry of the array. Especially useful on
410 463 // the arguments object. Passing **n** will return all the values in
411 // the array, excluding the last N. The **guard** check allows it to work with
412 // `_.map`.
464 // the array, excluding the last N.
413 465 _.initial = function(array, n, guard) {
414 return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
466 return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
415 467 };
416 468
417 469 // Get the last element of an array. Passing **n** will return the last N
418 // values in the array. The **guard** check allows it to work with `_.map`.
470 // values in the array.
419 471 _.last = function(array, n, guard) {
420 472 if (array == null) return void 0;
421 if ((n == null) || guard) return array[array.length - 1];
422 return slice.call(array, Math.max(array.length - n, 0));
473 if (n == null || guard) return array[array.length - 1];
474 return _.rest(array, Math.max(0, array.length - n));
423 475 };
424 476
425 477 // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
426 478 // Especially useful on the arguments object. Passing an **n** will return
427 // the rest N values in the array. The **guard**
428 // check allows it to work with `_.map`.
479 // the rest N values in the array.
429 480 _.rest = _.tail = _.drop = function(array, n, guard) {
430 return slice.call(array, (n == null) || guard ? 1 : n);
481 return slice.call(array, n == null || guard ? 1 : n);
431 482 };
432 483
433 484 // Trim out all falsy values from an array.
434 485 _.compact = function(array) {
435 486 return _.filter(array, _.identity);
436 487 };
437 488
438 489 // Internal implementation of a recursive `flatten` function.
439 var flatten = function(input, shallow, output) {
440 if (shallow && _.every(input, _.isArray)) {
441 return concat.apply(output, input);
442 }
443 each(input, function(value) {
444 if (_.isArray(value) || _.isArguments(value)) {
445 shallow ? push.apply(output, value) : flatten(value, shallow, output);
446 } else {
447 output.push(value);
490 var flatten = function(input, shallow, strict, startIndex) {
491 var output = [], idx = 0;
492 for (var i = startIndex || 0, length = getLength(input); i < length; i++) {
493 var value = input[i];
494 if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {
495 //flatten current level of array or arguments object
496 if (!shallow) value = flatten(value, shallow, strict);
497 var j = 0, len = value.length;
498 output.length += len;
499 while (j < len) {
500 output[idx++] = value[j++];
501 }
502 } else if (!strict) {
503 output[idx++] = value;
448 504 }
449 });
505 }
450 506 return output;
451 507 };
452 508
453 509 // Flatten out an array, either recursively (by default), or just one level.
454 510 _.flatten = function(array, shallow) {
455 return flatten(array, shallow, []);
511 return flatten(array, shallow, false);
456 512 };
457 513
458 514 // Return a version of the array that does not contain the specified value(s).
459 515 _.without = function(array) {
460 516 return _.difference(array, slice.call(arguments, 1));
461 517 };
462 518
463 // Split an array into two arrays: one whose elements all satisfy the given
464 // predicate, and one whose elements all do not satisfy the predicate.
465 _.partition = function(array, predicate) {
466 var pass = [], fail = [];
467 each(array, function(elem) {
468 (predicate(elem) ? pass : fail).push(elem);
469 });
470 return [pass, fail];
471 };
472
473 519 // Produce a duplicate-free version of the array. If the array has already
474 520 // been sorted, you have the option of using a faster algorithm.
475 521 // Aliased as `unique`.
476 _.uniq = _.unique = function(array, isSorted, iterator, context) {
477 if (_.isFunction(isSorted)) {
478 context = iterator;
479 iterator = isSorted;
522 _.uniq = _.unique = function(array, isSorted, iteratee, context) {
523 if (!_.isBoolean(isSorted)) {
524 context = iteratee;
525 iteratee = isSorted;
480 526 isSorted = false;
481 527 }
482 var initial = iterator ? _.map(array, iterator, context) : array;
483 var results = [];
528 if (iteratee != null) iteratee = cb(iteratee, context);
529 var result = [];
484 530 var seen = [];
485 each(initial, function(value, index) {
486 if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
487 seen.push(value);
488 results.push(array[index]);
531 for (var i = 0, length = getLength(array); i < length; i++) {
532 var value = array[i],
533 computed = iteratee ? iteratee(value, i, array) : value;
534 if (isSorted) {
535 if (!i || seen !== computed) result.push(value);
536 seen = computed;
537 } else if (iteratee) {
538 if (!_.contains(seen, computed)) {
539 seen.push(computed);
540 result.push(value);
541 }
542 } else if (!_.contains(result, value)) {
543 result.push(value);
489 544 }
490 });
491 return results;
545 }
546 return result;
492 547 };
493 548
494 549 // Produce an array that contains the union: each distinct element from all of
495 550 // the passed-in arrays.
496 551 _.union = function() {
497 return _.uniq(_.flatten(arguments, true));
552 return _.uniq(flatten(arguments, true, true));
498 553 };
499 554
500 555 // Produce an array that contains every item shared between all the
501 556 // passed-in arrays.
502 557 _.intersection = function(array) {
503 var rest = slice.call(arguments, 1);
504 return _.filter(_.uniq(array), function(item) {
505 return _.every(rest, function(other) {
506 return _.contains(other, item);
507 });
508 });
558 var result = [];
559 var argsLength = arguments.length;
560 for (var i = 0, length = getLength(array); i < length; i++) {
561 var item = array[i];
562 if (_.contains(result, item)) continue;
563 for (var j = 1; j < argsLength; j++) {
564 if (!_.contains(arguments[j], item)) break;
565 }
566 if (j === argsLength) result.push(item);
567 }
568 return result;
509 569 };
510 570
511 571 // Take the difference between one array and a number of other arrays.
512 572 // Only the elements present in just the first array will remain.
513 573 _.difference = function(array) {
514 var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
515 return _.filter(array, function(value){ return !_.contains(rest, value); });
574 var rest = flatten(arguments, true, true, 1);
575 return _.filter(array, function(value){
576 return !_.contains(rest, value);
577 });
516 578 };
517 579
518 580 // Zip together multiple lists into a single array -- elements that share
519 581 // an index go together.
520 582 _.zip = function() {
521 var length = _.max(_.pluck(arguments, 'length').concat(0));
522 var results = new Array(length);
523 for (var i = 0; i < length; i++) {
524 results[i] = _.pluck(arguments, '' + i);
583 return _.unzip(arguments);
584 };
585
586 // Complement of _.zip. Unzip accepts an array of arrays and groups
587 // each array's elements on shared indices
588 _.unzip = function(array) {
589 var length = array && _.max(array, getLength).length || 0;
590 var result = Array(length);
591
592 for (var index = 0; index < length; index++) {
593 result[index] = _.pluck(array, index);
525 594 }
526 return results;
595 return result;
527 596 };
528 597
529 598 // Converts lists into objects. Pass either a single array of `[key, value]`
530 599 // pairs, or two parallel arrays of the same length -- one of keys, and one of
531 600 // the corresponding values.
532 601 _.object = function(list, values) {
533 if (list == null) return {};
534 602 var result = {};
535 for (var i = 0, length = list.length; i < length; i++) {
603 for (var i = 0, length = getLength(list); i < length; i++) {
536 604 if (values) {
537 605 result[list[i]] = values[i];
538 606 } else {
539 607 result[list[i][0]] = list[i][1];
540 608 }
541 609 }
542 610 return result;
543 611 };
544 612
545 // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
546 // we need this function. Return the position of the first occurrence of an
547 // item in an array, or -1 if the item is not included in the array.
548 // Delegates to **ECMAScript 5**'s native `indexOf` if available.
549 // If the array is large and already in sort order, pass `true`
550 // for **isSorted** to use binary search.
551 _.indexOf = function(array, item, isSorted) {
552 if (array == null) return -1;
553 var i = 0, length = array.length;
554 if (isSorted) {
555 if (typeof isSorted == 'number') {
556 i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted);
557 } else {
558 i = _.sortedIndex(array, item);
559 return array[i] === item ? i : -1;
613 // Generator function to create the findIndex and findLastIndex functions
614 function createPredicateIndexFinder(dir) {
615 return function(array, predicate, context) {
616 predicate = cb(predicate, context);
617 var length = getLength(array);
618 var index = dir > 0 ? 0 : length - 1;
619 for (; index >= 0 && index < length; index += dir) {
620 if (predicate(array[index], index, array)) return index;
560 621 }
561 }
562 if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
563 for (; i < length; i++) if (array[i] === item) return i;
564 return -1;
565 };
622 return -1;
623 };
624 }
566 625
567 // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
568 _.lastIndexOf = function(array, item, from) {
569 if (array == null) return -1;
570 var hasIndex = from != null;
571 if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
572 return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
626 // Returns the first index on an array-like that passes a predicate test
627 _.findIndex = createPredicateIndexFinder(1);
628 _.findLastIndex = createPredicateIndexFinder(-1);
629
630 // Use a comparator function to figure out the smallest index at which
631 // an object should be inserted so as to maintain order. Uses binary search.
632 _.sortedIndex = function(array, obj, iteratee, context) {
633 iteratee = cb(iteratee, context, 1);
634 var value = iteratee(obj);
635 var low = 0, high = getLength(array);
636 while (low < high) {
637 var mid = Math.floor((low + high) / 2);
638 if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
573 639 }
574 var i = (hasIndex ? from : array.length);
575 while (i--) if (array[i] === item) return i;
576 return -1;
640 return low;
577 641 };
578 642
643 // Generator function to create the indexOf and lastIndexOf functions
644 function createIndexFinder(dir, predicateFind, sortedIndex) {
645 return function(array, item, idx) {
646 var i = 0, length = getLength(array);
647 if (typeof idx == 'number') {
648 if (dir > 0) {
649 i = idx >= 0 ? idx : Math.max(idx + length, i);
650 } else {
651 length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
652 }
653 } else if (sortedIndex && idx && length) {
654 idx = sortedIndex(array, item);
655 return array[idx] === item ? idx : -1;
656 }
657 if (item !== item) {
658 idx = predicateFind(slice.call(array, i, length), _.isNaN);
659 return idx >= 0 ? idx + i : -1;
660 }
661 for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
662 if (array[idx] === item) return idx;
663 }
664 return -1;
665 };
666 }
667
668 // Return the position of the first occurrence of an item in an array,
669 // or -1 if the item is not included in the array.
670 // If the array is large and already in sort order, pass `true`
671 // for **isSorted** to use binary search.
672 _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);
673 _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);
674
579 675 // Generate an integer Array containing an arithmetic progression. A port of
580 676 // the native Python `range()` function. See
581 677 // [the Python documentation](http://docs.python.org/library/functions.html#range).
582 678 _.range = function(start, stop, step) {
583 if (arguments.length <= 1) {
679 if (stop == null) {
584 680 stop = start || 0;
585 681 start = 0;
586 682 }
587 step = arguments[2] || 1;
683 step = step || 1;
588 684
589 685 var length = Math.max(Math.ceil((stop - start) / step), 0);
590 var idx = 0;
591 var range = new Array(length);
686 var range = Array(length);
592 687
593 while(idx < length) {
594 range[idx++] = start;
595 start += step;
688 for (var idx = 0; idx < length; idx++, start += step) {
689 range[idx] = start;
596 690 }
597 691
598 692 return range;
599 693 };
600 694
601 695 // Function (ahem) Functions
602 696 // ------------------
603 697
604 // Reusable constructor function for prototype setting.
605 var ctor = function(){};
698 // Determines whether to execute a function as a constructor
699 // or a normal function with the provided arguments
700 var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {
701 if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
702 var self = baseCreate(sourceFunc.prototype);
703 var result = sourceFunc.apply(self, args);
704 if (_.isObject(result)) return result;
705 return self;
706 };
606 707
607 708 // Create a function bound to a given object (assigning `this`, and arguments,
608 709 // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
609 710 // available.
610 711 _.bind = function(func, context) {
611 var args, bound;
612 712 if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
613 if (!_.isFunction(func)) throw new TypeError;
614 args = slice.call(arguments, 2);
615 return bound = function() {
616 if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
617 ctor.prototype = func.prototype;
618 var self = new ctor;
619 ctor.prototype = null;
620 var result = func.apply(self, args.concat(slice.call(arguments)));
621 if (Object(result) === result) return result;
622 return self;
713 if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
714 var args = slice.call(arguments, 2);
715 var bound = function() {
716 return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));
623 717 };
718 return bound;
624 719 };
625 720
626 721 // Partially apply a function by creating a version that has had some of its
627 722 // arguments pre-filled, without changing its dynamic `this` context. _ acts
628 723 // as a placeholder, allowing any combination of arguments to be pre-filled.
629 724 _.partial = function(func) {
630 725 var boundArgs = slice.call(arguments, 1);
631 return function() {
632 var position = 0;
633 var args = boundArgs.slice();
634 for (var i = 0, length = args.length; i < length; i++) {
635 if (args[i] === _) args[i] = arguments[position++];
726 var bound = function() {
727 var position = 0, length = boundArgs.length;
728 var args = Array(length);
729 for (var i = 0; i < length; i++) {
730 args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];
636 731 }
637 732 while (position < arguments.length) args.push(arguments[position++]);
638 return func.apply(this, args);
733 return executeBound(func, bound, this, this, args);
639 734 };
735 return bound;
640 736 };
641 737
642 738 // Bind a number of an object's methods to that object. Remaining arguments
643 739 // are the method names to be bound. Useful for ensuring that all callbacks
644 740 // defined on an object belong to it.
645 741 _.bindAll = function(obj) {
646 var funcs = slice.call(arguments, 1);
647 if (funcs.length === 0) throw new Error('bindAll must be passed function names');
648 each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
742 var i, length = arguments.length, key;
743 if (length <= 1) throw new Error('bindAll must be passed function names');
744 for (i = 1; i < length; i++) {
745 key = arguments[i];
746 obj[key] = _.bind(obj[key], obj);
747 }
649 748 return obj;
650 749 };
651 750
652 751 // Memoize an expensive function by storing its results.
653 752 _.memoize = function(func, hasher) {
654 var memo = {};
655 hasher || (hasher = _.identity);
656 return function() {
657 var key = hasher.apply(this, arguments);
658 return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
753 var memoize = function(key) {
754 var cache = memoize.cache;
755 var address = '' + (hasher ? hasher.apply(this, arguments) : key);
756 if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);
757 return cache[address];
659 758 };
759 memoize.cache = {};
760 return memoize;
660 761 };
661 762
662 763 // Delays a function for the given number of milliseconds, and then calls
663 764 // it with the arguments supplied.
664 765 _.delay = function(func, wait) {
665 766 var args = slice.call(arguments, 2);
666 return setTimeout(function(){ return func.apply(null, args); }, wait);
767 return setTimeout(function(){
768 return func.apply(null, args);
769 }, wait);
667 770 };
668 771
669 772 // Defers a function, scheduling it to run after the current call stack has
670 773 // cleared.
671 _.defer = function(func) {
672 return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
673 };
774 _.defer = _.partial(_.delay, _, 1);
674 775
675 776 // Returns a function, that, when invoked, will only be triggered at most once
676 777 // during a given window of time. Normally, the throttled function will run
677 778 // as much as it can, without ever going more than once per `wait` duration;
678 779 // but if you'd like to disable the execution on the leading edge, pass
679 780 // `{leading: false}`. To disable execution on the trailing edge, ditto.
680 781 _.throttle = function(func, wait, options) {
681 782 var context, args, result;
682 783 var timeout = null;
683 784 var previous = 0;
684 options || (options = {});
785 if (!options) options = {};
685 786 var later = function() {
686 787 previous = options.leading === false ? 0 : _.now();
687 788 timeout = null;
688 789 result = func.apply(context, args);
689 context = args = null;
790 if (!timeout) context = args = null;
690 791 };
691 792 return function() {
692 793 var now = _.now();
693 794 if (!previous && options.leading === false) previous = now;
694 795 var remaining = wait - (now - previous);
695 796 context = this;
696 797 args = arguments;
697 if (remaining <= 0) {
698 clearTimeout(timeout);
699 timeout = null;
798 if (remaining <= 0 || remaining > wait) {
799 if (timeout) {
800 clearTimeout(timeout);
801 timeout = null;
802 }
700 803 previous = now;
701 804 result = func.apply(context, args);
702 context = args = null;
805 if (!timeout) context = args = null;
703 806 } else if (!timeout && options.trailing !== false) {
704 807 timeout = setTimeout(later, remaining);
705 808 }
706 809 return result;
707 810 };
708 811 };
709 812
710 813 // Returns a function, that, as long as it continues to be invoked, will not
711 814 // be triggered. The function will be called after it stops being called for
712 815 // N milliseconds. If `immediate` is passed, trigger the function on the
713 816 // leading edge, instead of the trailing.
714 817 _.debounce = function(func, wait, immediate) {
715 818 var timeout, args, context, timestamp, result;
716 819
717 820 var later = function() {
718 821 var last = _.now() - timestamp;
719 if (last < wait) {
822
823 if (last < wait && last >= 0) {
720 824 timeout = setTimeout(later, wait - last);
721 825 } else {
722 826 timeout = null;
723 827 if (!immediate) {
724 828 result = func.apply(context, args);
725 context = args = null;
829 if (!timeout) context = args = null;
726 830 }
727 831 }
728 832 };
729 833
730 834 return function() {
731 835 context = this;
732 836 args = arguments;
733 837 timestamp = _.now();
734 838 var callNow = immediate && !timeout;
735 if (!timeout) {
736 timeout = setTimeout(later, wait);
737 }
839 if (!timeout) timeout = setTimeout(later, wait);
738 840 if (callNow) {
739 841 result = func.apply(context, args);
740 842 context = args = null;
741 843 }
742 844
743 845 return result;
744 846 };
745 847 };
746 848
747 // Returns a function that will be executed at most one time, no matter how
748 // often you call it. Useful for lazy initialization.
749 _.once = function(func) {
750 var ran = false, memo;
751 return function() {
752 if (ran) return memo;
753 ran = true;
754 memo = func.apply(this, arguments);
755 func = null;
756 return memo;
757 };
758 };
759
760 849 // Returns the first function passed as an argument to the second,
761 850 // allowing you to adjust arguments, run code before and after, and
762 851 // conditionally execute the original function.
763 852 _.wrap = function(func, wrapper) {
764 853 return _.partial(wrapper, func);
765 854 };
766 855
856 // Returns a negated version of the passed-in predicate.
857 _.negate = function(predicate) {
858 return function() {
859 return !predicate.apply(this, arguments);
860 };
861 };
862
767 863 // Returns a function that is the composition of a list of functions, each
768 864 // consuming the return value of the function that follows.
769 865 _.compose = function() {
770 var funcs = arguments;
866 var args = arguments;
867 var start = args.length - 1;
771 868 return function() {
772 var args = arguments;
773 for (var i = funcs.length - 1; i >= 0; i--) {
774 args = [funcs[i].apply(this, args)];
775 }
776 return args[0];
869 var i = start;
870 var result = args[start].apply(this, arguments);
871 while (i--) result = args[i].call(this, result);
872 return result;
777 873 };
778 874 };
779 875
780 // Returns a function that will only be executed after being called N times.
876 // Returns a function that will only be executed on and after the Nth call.
781 877 _.after = function(times, func) {
782 878 return function() {
783 879 if (--times < 1) {
784 880 return func.apply(this, arguments);
785 881 }
786 882 };
787 883 };
788 884
885 // Returns a function that will only be executed up to (but not including) the Nth call.
886 _.before = function(times, func) {
887 var memo;
888 return function() {
889 if (--times > 0) {
890 memo = func.apply(this, arguments);
891 }
892 if (times <= 1) func = null;
893 return memo;
894 };
895 };
896
897 // Returns a function that will be executed at most one time, no matter how
898 // often you call it. Useful for lazy initialization.
899 _.once = _.partial(_.before, 2);
900
789 901 // Object Functions
790 902 // ----------------
791 903
792 // Retrieve the names of an object's properties.
904 // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
905 var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
906 var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
907 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
908
909 function collectNonEnumProps(obj, keys) {
910 var nonEnumIdx = nonEnumerableProps.length;
911 var constructor = obj.constructor;
912 var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;
913
914 // Constructor is a special case.
915 var prop = 'constructor';
916 if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
917
918 while (nonEnumIdx--) {
919 prop = nonEnumerableProps[nonEnumIdx];
920 if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
921 keys.push(prop);
922 }
923 }
924 }
925
926 // Retrieve the names of an object's own properties.
793 927 // Delegates to **ECMAScript 5**'s native `Object.keys`
794 928 _.keys = function(obj) {
795 929 if (!_.isObject(obj)) return [];
796 930 if (nativeKeys) return nativeKeys(obj);
797 931 var keys = [];
798 932 for (var key in obj) if (_.has(obj, key)) keys.push(key);
933 // Ahem, IE < 9.
934 if (hasEnumBug) collectNonEnumProps(obj, keys);
935 return keys;
936 };
937
938 // Retrieve all the property names of an object.
939 _.allKeys = function(obj) {
940 if (!_.isObject(obj)) return [];
941 var keys = [];
942 for (var key in obj) keys.push(key);
943 // Ahem, IE < 9.
944 if (hasEnumBug) collectNonEnumProps(obj, keys);
799 945 return keys;
800 946 };
801 947
802 948 // Retrieve the values of an object's properties.
803 949 _.values = function(obj) {
804 950 var keys = _.keys(obj);
805 951 var length = keys.length;
806 var values = new Array(length);
952 var values = Array(length);
807 953 for (var i = 0; i < length; i++) {
808 954 values[i] = obj[keys[i]];
809 955 }
810 956 return values;
811 957 };
812 958
959 // Returns the results of applying the iteratee to each element of the object
960 // In contrast to _.map it returns an object
961 _.mapObject = function(obj, iteratee, context) {
962 iteratee = cb(iteratee, context);
963 var keys = _.keys(obj),
964 length = keys.length,
965 results = {},
966 currentKey;
967 for (var index = 0; index < length; index++) {
968 currentKey = keys[index];
969 results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
970 }
971 return results;
972 };
973
813 974 // Convert an object into a list of `[key, value]` pairs.
814 975 _.pairs = function(obj) {
815 976 var keys = _.keys(obj);
816 977 var length = keys.length;
817 var pairs = new Array(length);
978 var pairs = Array(length);
818 979 for (var i = 0; i < length; i++) {
819 980 pairs[i] = [keys[i], obj[keys[i]]];
820 981 }
821 982 return pairs;
822 983 };
823 984
824 985 // Invert the keys and values of an object. The values must be serializable.
825 986 _.invert = function(obj) {
826 987 var result = {};
827 988 var keys = _.keys(obj);
828 989 for (var i = 0, length = keys.length; i < length; i++) {
829 990 result[obj[keys[i]]] = keys[i];
830 991 }
831 992 return result;
832 993 };
833 994
834 995 // Return a sorted list of the function names available on the object.
835 996 // Aliased as `methods`
836 997 _.functions = _.methods = function(obj) {
837 998 var names = [];
838 999 for (var key in obj) {
839 1000 if (_.isFunction(obj[key])) names.push(key);
840 1001 }
841 1002 return names.sort();
842 1003 };
843 1004
844 1005 // Extend a given object with all the properties in passed-in object(s).
845 _.extend = function(obj) {
846 each(slice.call(arguments, 1), function(source) {
847 if (source) {
848 for (var prop in source) {
849 obj[prop] = source[prop];
850 }
851 }
852 });
853 return obj;
1006 _.extend = createAssigner(_.allKeys);
1007
1008 // Assigns a given object with all the own properties in the passed-in object(s)
1009 // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
1010 _.extendOwn = _.assign = createAssigner(_.keys);
1011
1012 // Returns the first key on an object that passes a predicate test
1013 _.findKey = function(obj, predicate, context) {
1014 predicate = cb(predicate, context);
1015 var keys = _.keys(obj), key;
1016 for (var i = 0, length = keys.length; i < length; i++) {
1017 key = keys[i];
1018 if (predicate(obj[key], key, obj)) return key;
1019 }
854 1020 };
855 1021
856 1022 // Return a copy of the object only containing the whitelisted properties.
857 _.pick = function(obj) {
858 var copy = {};
859 var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
860 each(keys, function(key) {
861 if (key in obj) copy[key] = obj[key];
862 });
863 return copy;
1023 _.pick = function(object, oiteratee, context) {
1024 var result = {}, obj = object, iteratee, keys;
1025 if (obj == null) return result;
1026 if (_.isFunction(oiteratee)) {
1027 keys = _.allKeys(obj);
1028 iteratee = optimizeCb(oiteratee, context);
1029 } else {
1030 keys = flatten(arguments, false, false, 1);
1031 iteratee = function(value, key, obj) { return key in obj; };
1032 obj = Object(obj);
1033 }
1034 for (var i = 0, length = keys.length; i < length; i++) {
1035 var key = keys[i];
1036 var value = obj[key];
1037 if (iteratee(value, key, obj)) result[key] = value;
1038 }
1039 return result;
864 1040 };
865 1041
866 1042 // Return a copy of the object without the blacklisted properties.
867 _.omit = function(obj) {
868 var copy = {};
869 var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
870 for (var key in obj) {
871 if (!_.contains(keys, key)) copy[key] = obj[key];
1043 _.omit = function(obj, iteratee, context) {
1044 if (_.isFunction(iteratee)) {
1045 iteratee = _.negate(iteratee);
1046 } else {
1047 var keys = _.map(flatten(arguments, false, false, 1), String);
1048 iteratee = function(value, key) {
1049 return !_.contains(keys, key);
1050 };
872 1051 }
873 return copy;
1052 return _.pick(obj, iteratee, context);
874 1053 };
875 1054
876 1055 // Fill in a given object with default properties.
877 _.defaults = function(obj) {
878 each(slice.call(arguments, 1), function(source) {
879 if (source) {
880 for (var prop in source) {
881 if (obj[prop] === void 0) obj[prop] = source[prop];
882 }
883 }
884 });
885 return obj;
1056 _.defaults = createAssigner(_.allKeys, true);
1057
1058 // Creates an object that inherits from the given prototype object.
1059 // If additional properties are provided then they will be added to the
1060 // created object.
1061 _.create = function(prototype, props) {
1062 var result = baseCreate(prototype);
1063 if (props) _.extendOwn(result, props);
1064 return result;
886 1065 };
887 1066
888 1067 // Create a (shallow-cloned) duplicate of an object.
889 1068 _.clone = function(obj) {
890 1069 if (!_.isObject(obj)) return obj;
891 1070 return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
892 1071 };
893 1072
894 1073 // Invokes interceptor with the obj, and then returns obj.
895 1074 // The primary purpose of this method is to "tap into" a method chain, in
896 1075 // order to perform operations on intermediate results within the chain.
897 1076 _.tap = function(obj, interceptor) {
898 1077 interceptor(obj);
899 1078 return obj;
900 1079 };
901 1080
1081 // Returns whether an object has a given set of `key:value` pairs.
1082 _.isMatch = function(object, attrs) {
1083 var keys = _.keys(attrs), length = keys.length;
1084 if (object == null) return !length;
1085 var obj = Object(object);
1086 for (var i = 0; i < length; i++) {
1087 var key = keys[i];
1088 if (attrs[key] !== obj[key] || !(key in obj)) return false;
1089 }
1090 return true;
1091 };
1092
1093
902 1094 // Internal recursive comparison function for `isEqual`.
903 1095 var eq = function(a, b, aStack, bStack) {
904 1096 // Identical objects are equal. `0 === -0`, but they aren't identical.
905 1097 // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
906 if (a === b) return a !== 0 || 1 / a == 1 / b;
1098 if (a === b) return a !== 0 || 1 / a === 1 / b;
907 1099 // A strict comparison is necessary because `null == undefined`.
908 1100 if (a == null || b == null) return a === b;
909 1101 // Unwrap any wrapped objects.
910 1102 if (a instanceof _) a = a._wrapped;
911 1103 if (b instanceof _) b = b._wrapped;
912 1104 // Compare `[[Class]]` names.
913 1105 var className = toString.call(a);
914 if (className != toString.call(b)) return false;
1106 if (className !== toString.call(b)) return false;
915 1107 switch (className) {
916 // Strings, numbers, dates, and booleans are compared by value.
1108 // Strings, numbers, regular expressions, dates, and booleans are compared by value.
1109 case '[object RegExp]':
1110 // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
917 1111 case '[object String]':
918 1112 // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
919 1113 // equivalent to `new String("5")`.
920 return a == String(b);
1114 return '' + a === '' + b;
921 1115 case '[object Number]':
922 // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
923 // other numeric values.
924 return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
1116 // `NaN`s are equivalent, but non-reflexive.
1117 // Object(NaN) is equivalent to NaN
1118 if (+a !== +a) return +b !== +b;
1119 // An `egal` comparison is performed for other numeric values.
1120 return +a === 0 ? 1 / +a === 1 / b : +a === +b;
925 1121 case '[object Date]':
926 1122 case '[object Boolean]':
927 1123 // Coerce dates and booleans to numeric primitive values. Dates are compared by their
928 1124 // millisecond representations. Note that invalid dates with millisecond representations
929 1125 // of `NaN` are not equivalent.
930 return +a == +b;
931 // RegExps are compared by their source patterns and flags.
932 case '[object RegExp]':
933 return a.source == b.source &&
934 a.global == b.global &&
935 a.multiline == b.multiline &&
936 a.ignoreCase == b.ignoreCase;
1126 return +a === +b;
1127 }
1128
1129 var areArrays = className === '[object Array]';
1130 if (!areArrays) {
1131 if (typeof a != 'object' || typeof b != 'object') return false;
1132
1133 // Objects with different constructors are not equivalent, but `Object`s or `Array`s
1134 // from different frames are.
1135 var aCtor = a.constructor, bCtor = b.constructor;
1136 if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
1137 _.isFunction(bCtor) && bCtor instanceof bCtor)
1138 && ('constructor' in a && 'constructor' in b)) {
1139 return false;
1140 }
937 1141 }
938 if (typeof a != 'object' || typeof b != 'object') return false;
939 1142 // Assume equality for cyclic structures. The algorithm for detecting cyclic
940 1143 // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
1144
1145 // Initializing stack of traversed objects.
1146 // It's done here since we only need them for objects and arrays comparison.
1147 aStack = aStack || [];
1148 bStack = bStack || [];
941 1149 var length = aStack.length;
942 1150 while (length--) {
943 1151 // Linear search. Performance is inversely proportional to the number of
944 1152 // unique nested structures.
945 if (aStack[length] == a) return bStack[length] == b;
946 }
947 // Objects with different constructors are not equivalent, but `Object`s
948 // from different frames are.
949 var aCtor = a.constructor, bCtor = b.constructor;
950 if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
951 _.isFunction(bCtor) && (bCtor instanceof bCtor))
952 && ('constructor' in a && 'constructor' in b)) {
953 return false;
1153 if (aStack[length] === a) return bStack[length] === b;
954 1154 }
1155
955 1156 // Add the first object to the stack of traversed objects.
956 1157 aStack.push(a);
957 1158 bStack.push(b);
958 var size = 0, result = true;
1159
959 1160 // Recursively compare objects and arrays.
960 if (className == '[object Array]') {
1161 if (areArrays) {
961 1162 // Compare array lengths to determine if a deep comparison is necessary.
962 size = a.length;
963 result = size == b.length;
964 if (result) {
965 // Deep compare the contents, ignoring non-numeric properties.
966 while (size--) {
967 if (!(result = eq(a[size], b[size], aStack, bStack))) break;
968 }
1163 length = a.length;
1164 if (length !== b.length) return false;
1165 // Deep compare the contents, ignoring non-numeric properties.
1166 while (length--) {
1167 if (!eq(a[length], b[length], aStack, bStack)) return false;
969 1168 }
970 1169 } else {
971 1170 // Deep compare objects.
972 for (var key in a) {
973 if (_.has(a, key)) {
974 // Count the expected number of properties.
975 size++;
976 // Deep compare each member.
977 if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
978 }
979 }
980 // Ensure that both objects contain the same number of properties.
981 if (result) {
982 for (key in b) {
983 if (_.has(b, key) && !(size--)) break;
984 }
985 result = !size;
1171 var keys = _.keys(a), key;
1172 length = keys.length;
1173 // Ensure that both objects contain the same number of properties before comparing deep equality.
1174 if (_.keys(b).length !== length) return false;
1175 while (length--) {
1176 // Deep compare each member
1177 key = keys[length];
1178 if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
986 1179 }
987 1180 }
988 1181 // Remove the first object from the stack of traversed objects.
989 1182 aStack.pop();
990 1183 bStack.pop();
991 return result;
1184 return true;
992 1185 };
993 1186
994 1187 // Perform a deep comparison to check if two objects are equal.
995 1188 _.isEqual = function(a, b) {
996 return eq(a, b, [], []);
1189 return eq(a, b);
997 1190 };
998 1191
999 1192 // Is a given array, string, or object empty?
1000 1193 // An "empty" object has no enumerable own-properties.
1001 1194 _.isEmpty = function(obj) {
1002 1195 if (obj == null) return true;
1003 if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
1004 for (var key in obj) if (_.has(obj, key)) return false;
1005 return true;
1196 if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;
1197 return _.keys(obj).length === 0;
1006 1198 };
1007 1199
1008 1200 // Is a given value a DOM element?
1009 1201 _.isElement = function(obj) {
1010 1202 return !!(obj && obj.nodeType === 1);
1011 1203 };
1012 1204
1013 1205 // Is a given value an array?
1014 1206 // Delegates to ECMA5's native Array.isArray
1015 1207 _.isArray = nativeIsArray || function(obj) {
1016 return toString.call(obj) == '[object Array]';
1208 return toString.call(obj) === '[object Array]';
1017 1209 };
1018 1210
1019 1211 // Is a given variable an object?
1020 1212 _.isObject = function(obj) {
1021 return obj === Object(obj);
1213 var type = typeof obj;
1214 return type === 'function' || type === 'object' && !!obj;
1022 1215 };
1023 1216
1024 // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
1025 each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
1217 // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.
1218 _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {
1026 1219 _['is' + name] = function(obj) {
1027 return toString.call(obj) == '[object ' + name + ']';
1220 return toString.call(obj) === '[object ' + name + ']';
1028 1221 };
1029 1222 });
1030 1223
1031 // Define a fallback version of the method in browsers (ahem, IE), where
1224 // Define a fallback version of the method in browsers (ahem, IE < 9), where
1032 1225 // there isn't any inspectable "Arguments" type.
1033 1226 if (!_.isArguments(arguments)) {
1034 1227 _.isArguments = function(obj) {
1035 return !!(obj && _.has(obj, 'callee'));
1228 return _.has(obj, 'callee');
1036 1229 };
1037 1230 }
1038 1231
1039 // Optimize `isFunction` if appropriate.
1040 if (typeof (/./) !== 'function') {
1232 // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,
1233 // IE 11 (#1621), and in Safari 8 (#1929).
1234 if (typeof /./ != 'function' && typeof Int8Array != 'object') {
1041 1235 _.isFunction = function(obj) {
1042 return typeof obj === 'function';
1236 return typeof obj == 'function' || false;
1043 1237 };
1044 1238 }
1045 1239
1046 1240 // Is a given object a finite number?
1047 1241 _.isFinite = function(obj) {
1048 1242 return isFinite(obj) && !isNaN(parseFloat(obj));
1049 1243 };
1050 1244
1051 1245 // Is the given value `NaN`? (NaN is the only number which does not equal itself).
1052 1246 _.isNaN = function(obj) {
1053 return _.isNumber(obj) && obj != +obj;
1247 return _.isNumber(obj) && obj !== +obj;
1054 1248 };
1055 1249
1056 1250 // Is a given value a boolean?
1057 1251 _.isBoolean = function(obj) {
1058 return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
1252 return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
1059 1253 };
1060 1254
1061 1255 // Is a given value equal to null?
1062 1256 _.isNull = function(obj) {
1063 1257 return obj === null;
1064 1258 };
1065 1259
1066 1260 // Is a given variable undefined?
1067 1261 _.isUndefined = function(obj) {
1068 1262 return obj === void 0;
1069 1263 };
1070 1264
1071 1265 // Shortcut function for checking if an object has a given property directly
1072 1266 // on itself (in other words, not on a prototype).
1073 1267 _.has = function(obj, key) {
1074 return hasOwnProperty.call(obj, key);
1268 return obj != null && hasOwnProperty.call(obj, key);
1075 1269 };
1076 1270
1077 1271 // Utility Functions
1078 1272 // -----------------
1079 1273
1080 1274 // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
1081 1275 // previous owner. Returns a reference to the Underscore object.
1082 1276 _.noConflict = function() {
1083 1277 root._ = previousUnderscore;
1084 1278 return this;
1085 1279 };
1086 1280
1087 // Keep the identity function around for default iterators.
1281 // Keep the identity function around for default iteratees.
1088 1282 _.identity = function(value) {
1089 1283 return value;
1090 1284 };
1091 1285
1286 // Predicate-generating functions. Often useful outside of Underscore.
1092 1287 _.constant = function(value) {
1093 return function () {
1288 return function() {
1094 1289 return value;
1095 1290 };
1096 1291 };
1097 1292
1098 _.property = function(key) {
1099 return function(obj) {
1293 _.noop = function(){};
1294
1295 _.property = property;
1296
1297 // Generates a function for a given object that returns a given property.
1298 _.propertyOf = function(obj) {
1299 return obj == null ? function(){} : function(key) {
1100 1300 return obj[key];
1101 1301 };
1102 1302 };
1103 1303
1104 // Returns a predicate for checking whether an object has a given set of `key:value` pairs.
1105 _.matches = function(attrs) {
1304 // Returns a predicate for checking whether an object has a given set of
1305 // `key:value` pairs.
1306 _.matcher = _.matches = function(attrs) {
1307 attrs = _.extendOwn({}, attrs);
1106 1308 return function(obj) {
1107 if (obj === attrs) return true; //avoid comparing an object to itself.
1108 for (var key in attrs) {
1109 if (attrs[key] !== obj[key])
1110 return false;
1111 }
1112 return true;
1113 }
1309 return _.isMatch(obj, attrs);
1310 };
1114 1311 };
1115 1312
1116 1313 // Run a function **n** times.
1117 _.times = function(n, iterator, context) {
1314 _.times = function(n, iteratee, context) {
1118 1315 var accum = Array(Math.max(0, n));
1119 for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
1316 iteratee = optimizeCb(iteratee, context, 1);
1317 for (var i = 0; i < n; i++) accum[i] = iteratee(i);
1120 1318 return accum;
1121 1319 };
1122 1320
1123 1321 // Return a random integer between min and max (inclusive).
1124 1322 _.random = function(min, max) {
1125 1323 if (max == null) {
1126 1324 max = min;
1127 1325 min = 0;
1128 1326 }
1129 1327 return min + Math.floor(Math.random() * (max - min + 1));
1130 1328 };
1131 1329
1132 1330 // A (possibly faster) way to get the current timestamp as an integer.
1133 _.now = Date.now || function() { return new Date().getTime(); };
1134
1135 // List of HTML entities for escaping.
1136 var entityMap = {
1137 escape: {
1138 '&': '&amp;',
1139 '<': '&lt;',
1140 '>': '&gt;',
1141 '"': '&quot;',
1142 "'": '&#x27;'
1143 }
1331 _.now = Date.now || function() {
1332 return new Date().getTime();
1144 1333 };
1145 entityMap.unescape = _.invert(entityMap.escape);
1146 1334
1147 // Regexes containing the keys and values listed immediately above.
1148 var entityRegexes = {
1149 escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
1150 unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
1335 // List of HTML entities for escaping.
1336 var escapeMap = {
1337 '&': '&amp;',
1338 '<': '&lt;',
1339 '>': '&gt;',
1340 '"': '&quot;',
1341 "'": '&#x27;',
1342 '`': '&#x60;'
1151 1343 };
1344 var unescapeMap = _.invert(escapeMap);
1152 1345
1153 1346 // Functions for escaping and unescaping strings to/from HTML interpolation.
1154 _.each(['escape', 'unescape'], function(method) {
1155 _[method] = function(string) {
1156 if (string == null) return '';
1157 return ('' + string).replace(entityRegexes[method], function(match) {
1158 return entityMap[method][match];
1159 });
1347 var createEscaper = function(map) {
1348 var escaper = function(match) {
1349 return map[match];
1160 1350 };
1161 });
1351 // Regexes for identifying a key that needs to be escaped
1352 var source = '(?:' + _.keys(map).join('|') + ')';
1353 var testRegexp = RegExp(source);
1354 var replaceRegexp = RegExp(source, 'g');
1355 return function(string) {
1356 string = string == null ? '' : '' + string;
1357 return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
1358 };
1359 };
1360 _.escape = createEscaper(escapeMap);
1361 _.unescape = createEscaper(unescapeMap);
1162 1362
1163 1363 // If the value of the named `property` is a function then invoke it with the
1164 1364 // `object` as context; otherwise, return it.
1165 _.result = function(object, property) {
1166 if (object == null) return void 0;
1167 var value = object[property];
1365 _.result = function(object, property, fallback) {
1366 var value = object == null ? void 0 : object[property];
1367 if (value === void 0) {
1368 value = fallback;
1369 }
1168 1370 return _.isFunction(value) ? value.call(object) : value;
1169 1371 };
1170 1372
1171 // Add your own custom functions to the Underscore object.
1172 _.mixin = function(obj) {
1173 each(_.functions(obj), function(name) {
1174 var func = _[name] = obj[name];
1175 _.prototype[name] = function() {
1176 var args = [this._wrapped];
1177 push.apply(args, arguments);
1178 return result.call(this, func.apply(_, args));
1179 };
1180 });
1181 };
1182
1183 1373 // Generate a unique integer id (unique within the entire client session).
1184 1374 // Useful for temporary DOM ids.
1185 1375 var idCounter = 0;
1186 1376 _.uniqueId = function(prefix) {
1187 1377 var id = ++idCounter + '';
1188 1378 return prefix ? prefix + id : id;
1189 1379 };
1190 1380
1191 1381 // By default, Underscore uses ERB-style template delimiters, change the
1192 1382 // following template settings to use alternative delimiters.
1193 1383 _.templateSettings = {
1194 1384 evaluate : /<%([\s\S]+?)%>/g,
1195 1385 interpolate : /<%=([\s\S]+?)%>/g,
1196 1386 escape : /<%-([\s\S]+?)%>/g
1197 1387 };
1198 1388
1199 1389 // When customizing `templateSettings`, if you don't want to define an
1200 1390 // interpolation, evaluation or escaping regex, we need one that is
1201 1391 // guaranteed not to match.
1202 1392 var noMatch = /(.)^/;
1203 1393
1204 1394 // Certain characters need to be escaped so that they can be put into a
1205 1395 // string literal.
1206 1396 var escapes = {
1207 1397 "'": "'",
1208 1398 '\\': '\\',
1209 1399 '\r': 'r',
1210 1400 '\n': 'n',
1211 '\t': 't',
1212 1401 '\u2028': 'u2028',
1213 1402 '\u2029': 'u2029'
1214 1403 };
1215 1404
1216 var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
1405 var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
1406
1407 var escapeChar = function(match) {
1408 return '\\' + escapes[match];
1409 };
1217 1410
1218 1411 // JavaScript micro-templating, similar to John Resig's implementation.
1219 1412 // Underscore templating handles arbitrary delimiters, preserves whitespace,
1220 1413 // and correctly escapes quotes within interpolated code.
1221 _.template = function(text, data, settings) {
1222 var render;
1414 // NB: `oldSettings` only exists for backwards compatibility.
1415 _.template = function(text, settings, oldSettings) {
1416 if (!settings && oldSettings) settings = oldSettings;
1223 1417 settings = _.defaults({}, settings, _.templateSettings);
1224 1418
1225 1419 // Combine delimiters into one regular expression via alternation.
1226 var matcher = new RegExp([
1420 var matcher = RegExp([
1227 1421 (settings.escape || noMatch).source,
1228 1422 (settings.interpolate || noMatch).source,
1229 1423 (settings.evaluate || noMatch).source
1230 1424 ].join('|') + '|$', 'g');
1231 1425
1232 1426 // Compile the template source, escaping string literals appropriately.
1233 1427 var index = 0;
1234 1428 var source = "__p+='";
1235 1429 text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
1236 source += text.slice(index, offset)
1237 .replace(escaper, function(match) { return '\\' + escapes[match]; });
1430 source += text.slice(index, offset).replace(escaper, escapeChar);
1431 index = offset + match.length;
1238 1432
1239 1433 if (escape) {
1240 1434 source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
1241 }
1242 if (interpolate) {
1435 } else if (interpolate) {
1243 1436 source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
1244 }
1245 if (evaluate) {
1437 } else if (evaluate) {
1246 1438 source += "';\n" + evaluate + "\n__p+='";
1247 1439 }
1248 index = offset + match.length;
1440
1441 // Adobe VMs need the match returned to produce the correct offest.
1249 1442 return match;
1250 1443 });
1251 1444 source += "';\n";
1252 1445
1253 1446 // If a variable is not specified, place data values in local scope.
1254 1447 if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
1255 1448
1256 1449 source = "var __t,__p='',__j=Array.prototype.join," +
1257 1450 "print=function(){__p+=__j.call(arguments,'');};\n" +
1258 source + "return __p;\n";
1451 source + 'return __p;\n';
1259 1452
1260 1453 try {
1261 render = new Function(settings.variable || 'obj', '_', source);
1454 var render = new Function(settings.variable || 'obj', '_', source);
1262 1455 } catch (e) {
1263 1456 e.source = source;
1264 1457 throw e;
1265 1458 }
1266 1459
1267 if (data) return render(data, _);
1268 1460 var template = function(data) {
1269 1461 return render.call(this, data, _);
1270 1462 };
1271 1463
1272 // Provide the compiled function source as a convenience for precompilation.
1273 template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
1464 // Provide the compiled source as a convenience for precompilation.
1465 var argument = settings.variable || 'obj';
1466 template.source = 'function(' + argument + '){\n' + source + '}';
1274 1467
1275 1468 return template;
1276 1469 };
1277 1470
1278 // Add a "chain" function, which will delegate to the wrapper.
1471 // Add a "chain" function. Start chaining a wrapped Underscore object.
1279 1472 _.chain = function(obj) {
1280 return _(obj).chain();
1473 var instance = _(obj);
1474 instance._chain = true;
1475 return instance;
1281 1476 };
1282 1477
1283 1478 // OOP
1284 1479 // ---------------
1285 1480 // If Underscore is called as a function, it returns a wrapped object that
1286 1481 // can be used OO-style. This wrapper holds altered versions of all the
1287 1482 // underscore functions. Wrapped objects may be chained.
1288 1483
1289 1484 // Helper function to continue chaining intermediate results.
1290 var result = function(obj) {
1291 return this._chain ? _(obj).chain() : obj;
1485 var result = function(instance, obj) {
1486 return instance._chain ? _(obj).chain() : obj;
1487 };
1488
1489 // Add your own custom functions to the Underscore object.
1490 _.mixin = function(obj) {
1491 _.each(_.functions(obj), function(name) {
1492 var func = _[name] = obj[name];
1493 _.prototype[name] = function() {
1494 var args = [this._wrapped];
1495 push.apply(args, arguments);
1496 return result(this, func.apply(_, args));
1497 };
1498 });
1292 1499 };
1293 1500
1294 1501 // Add all of the Underscore functions to the wrapper object.
1295 1502 _.mixin(_);
1296 1503
1297 1504 // Add all mutator Array functions to the wrapper.
1298 each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
1505 _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
1299 1506 var method = ArrayProto[name];
1300 1507 _.prototype[name] = function() {
1301 1508 var obj = this._wrapped;
1302 1509 method.apply(obj, arguments);
1303 if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
1304 return result.call(this, obj);
1510 if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
1511 return result(this, obj);
1305 1512 };
1306 1513 });
1307 1514
1308 1515 // Add all accessor Array functions to the wrapper.
1309 each(['concat', 'join', 'slice'], function(name) {
1516 _.each(['concat', 'join', 'slice'], function(name) {
1310 1517 var method = ArrayProto[name];
1311 1518 _.prototype[name] = function() {
1312 return result.call(this, method.apply(this._wrapped, arguments));
1519 return result(this, method.apply(this._wrapped, arguments));
1313 1520 };
1314 1521 });
1315 1522
1316 _.extend(_.prototype, {
1317
1318 // Start chaining a wrapped Underscore object.
1319 chain: function() {
1320 this._chain = true;
1321 return this;
1322 },
1523 // Extracts the result from a wrapped and chained object.
1524 _.prototype.value = function() {
1525 return this._wrapped;
1526 };
1323 1527
1324 // Extracts the result from a wrapped and chained object.
1325 value: function() {
1326 return this._wrapped;
1327 }
1528 // Provide unwrapping proxy for some methods used in engine operations
1529 // such as arithmetic and JSON stringification.
1530 _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
1328 1531
1329 });
1532 _.prototype.toString = function() {
1533 return '' + this._wrapped;
1534 };
1330 1535
1331 1536 // AMD registration happens at the end for compatibility with AMD loaders
1332 1537 // that may not enforce next-turn semantics on modules. Even though general
1333 1538 // practice for AMD registration is to be anonymous, underscore registers
1334 1539 // as a named module because, like jQuery, it is a base library that is
1335 1540 // popular enough to be bundled in a third party lib, but not be part of
1336 1541 // an AMD load request. Those cases could generate an error when an
1337 1542 // anonymous define() is called outside of a loader request.
1338 1543 if (typeof define === 'function' && define.amd) {
1339 1544 define('underscore', [], function() {
1340 1545 return _;
1341 1546 });
1342 1547 }
1343 }).call(this);
1548 }.call(this));
1344 1549
1345 1550 ;/*
1346 1551 AngularJS v1.7.7
1347 1552 (c) 2010-2018 Google, Inc. http://angularjs.org
1348 1553 License: MIT
1349 1554 */
1350 1555 (function(C){'use strict';function re(a){if(D(a))w(a.objectMaxDepth)&&(Wb.objectMaxDepth=Xb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Wb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Wb}function Xb(a){return W(a)&&0<a}function F(a,b){b=b||Error;return function(){var d=arguments[0],c;c="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.7.7/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var e=encodeURIComponent,
1351 1556 f;f=arguments[d];f="function"==typeof f?f.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof f?"undefined":"string"!=typeof f?JSON.stringify(f):f;c+=e(f)}return new b(c)}}function ya(a){if(null==a||$a(a))return!1;if(H(a)||A(a)||x&&a instanceof x)return!0;var b="length"in Object(a)&&a.length;return W(b)&&(0<=b&&b-1 in a||"function"===typeof a.item)}function r(a,b,d){var c,e;if(a)if(B(a))for(c in a)"prototype"!==c&&"length"!==c&&"name"!==c&&a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else if(H(a)||
1352 1557 ya(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==r)a.forEach(b,d,a);else if(Nc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ta.call(a,c)&&b.call(d,a[c],c,a);return a}function Oc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function Yb(a){return function(b,d){a(d,b)}}function se(){return++pb}
1353 1558 function Zb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||B(g))for(var k=Object.keys(g),h=0,l=k.length;h<l;h++){var m=k[h],p=g[m];d&&D(p)?ha(p)?a[m]=new Date(p.valueOf()):ab(p)?a[m]=new RegExp(p):p.nodeName?a[m]=p.cloneNode(!0):$b(p)?a[m]=p.clone():(D(a[m])||(a[m]=H(p)?[]:{}),Zb(a[m],[p],!0)):a[m]=p}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return Zb(a,Ha.call(arguments,1),!1)}function te(a){return Zb(a,Ha.call(arguments,1),!0)}function fa(a){return parseInt(a,
1354 1559 10)}function ac(a,b){return S(Object.create(a),b)}function E(){}function Ta(a){return a}function ia(a){return function(){return a}}function bc(a){return B(a.toString)&&a.toString!==la}function z(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function Nc(a){return null!==a&&"object"===typeof a&&!Pc(a)}function A(a){return"string"===typeof a}function W(a){return"number"===typeof a}function ha(a){return"[object Date]"===la.call(a)}
1355 1560 function H(a){return Array.isArray(a)||a instanceof Array}function cc(a){switch(la.call(a)){case "[object Error]":return!0;case "[object Exception]":return!0;case "[object DOMException]":return!0;default:return a instanceof Error}}function B(a){return"function"===typeof a}function ab(a){return"[object RegExp]"===la.call(a)}function $a(a){return a&&a.window===a}function bb(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function ue(a){return a&&W(a.length)&&ve.test(la.call(a))}
1356 1561 function $b(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function we(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ua(a){return K(a.nodeName||a[0]&&a[0].nodeName)}function cb(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function Ia(a,b,d){function c(a,b,c){c--;if(0>c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f<g;f++)b.push(e(a[f],c))}else if(Nc(a))for(f in a)b[f]=e(a[f],c);else if(a&&"function"===typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&&
1357 1562 (b[f]=e(a[f],c));else for(f in a)ta.call(a,f)&&(b[f]=e(a[f],c));d?b.$$hashKey=d:delete b.$$hashKey;return b}function e(a,b){if(!D(a))return a;var d=g.indexOf(a);if(-1!==d)return k[d];if($a(a)||bb(a))throw pa("cpws");var d=!1,e=f(a);void 0===e&&(e=H(a)?[]:Object.create(Pc(a)),d=!0);g.push(a);k.push(e);return d?c(a,e,b):e}function f(a){switch(la.call(a)){case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Float32Array]":case "[object Float64Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return new a.constructor(e(a.buffer),
1358 1563 a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(B(a.cloneNode))return a.cloneNode(!0)}
1359 1564 var g=[],k=[];d=Xb(d)?d:NaN;if(b){if(ue(b)||"[object ArrayBuffer]"===la.call(b))throw pa("cpta");if(a===b)throw pa("cpi");H(b)?b.length=0:r(b,function(a,c){"$$hashKey"!==c&&delete b[c]});g.push(a);k.push(b);return c(a,b,d)}return e(a,d)}function dc(a,b){return a===b||a!==a&&b!==b}function va(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d===typeof b&&"object"===d)if(H(a)){if(!H(b))return!1;if((d=a.length)===b.length){for(c=0;c<d;c++)if(!va(a[c],
1360 1565 b[c]))return!1;return!0}}else{if(ha(a))return ha(b)?dc(a.getTime(),b.getTime()):!1;if(ab(a))return ab(b)?a.toString()===b.toString():!1;if(bb(a)||bb(b)||$a(a)||$a(b)||H(b)||ha(b)||ab(b))return!1;d=T();for(c in a)if("$"!==c.charAt(0)&&!B(a[c])){if(!va(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!B(b[c]))return!1;return!0}return!1}function db(a,b,d){return a.concat(Ha.call(b,d))}function Va(a,b){var d=2<arguments.length?Ha.call(arguments,2):[];return!B(b)||b instanceof
1361 1566 RegExp?b:d.length?function(){return arguments.length?b.apply(a,db(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Qc(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:$a(b)?d="$WINDOW":b&&C.document===b?d="$DOCUMENT":bb(b)&&(d="$SCOPE");return d}function eb(a,b){if(!z(a))return W(b)||(b=b?2:null),JSON.stringify(a,Qc,b)}function Rc(a){return A(a)?JSON.parse(a):a}function ec(a,b){a=a.replace(xe,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+
1362 1567 a)/6E4;return X(d)?b:d}function Sc(a,b){a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function fc(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=ec(b,c);return Sc(a,d*(b-c))}function za(a){a=x(a).clone().empty();var b=x("<div></div>").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Tc(a){try{return decodeURIComponent(a)}catch(b){}}function gc(a){var b={};r((a||"").split("&"),
1363 1568 function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Tc(e),w(e)&&(f=w(f)?Tc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function ye(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function hc(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a,
1364 1569 b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ze(a,b){var d,c,e=Qa.length;for(c=0;c<e;++c)if(d=Qa[c]+b,A(d=a.getAttribute(d)))return d;return null}function Ae(a,b){var d,c,e={};r(Qa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});r(Qa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))});
1365 1570 d&&(Be?(e.strictDi=null!==ze(d,"strict-di"),b(d,c?[c]:[],e)):C.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Uc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===C.document?"document":za(a);throw pa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",
1366 1571 function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;C&&e.test(C.name)&&(d.debugInfoEnabled=!0,C.name=C.name.replace(e,""));if(C&&!f.test(C.name))return c();C.name=C.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&&
1367 1572 ca.resumeDeferredBootstrap()}function Ce(){C.name="NG_ENABLE_DEBUG_INFO!"+C.name;C.location.reload()}function De(a){a=ca.element(a).injector();if(!a)throw pa("test");return a.get("$$testability")}function Vc(a,b){b=b||"_";return a.replace(Ee,function(a,c){return(c?b:"")+a.toLowerCase()})}function Fe(){var a;if(!Wc){var b=qb();(rb=z(b)?C.jQuery:b?C[b]:void 0)&&rb.fn.on?(x=rb,S(rb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})):
1368 1573 x=Y;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Wc=!0}}function gb(a,b,d){if(!a)throw pa("areq",b||"?",d||"required");return a}function sb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw pa("badname",b);}function Ge(a,b,d){if(!b)return a;b=b.split(".");
1369 1574 for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&B(a)?Va(e,a):a}function tb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=x(Ha.call(a,0,e))),c.push(b);return c||a}function T(){return Object.create(null)}function ic(a){if(null==a)return"";switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=!bc(a)||H(a)||ha(a)?eb(a):a.toString()}return a}function He(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=F("$injector"),
1370 1575 c=F("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||F;return b(a,"module",function(){var a={};return function(f,g,k){var h={};if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,c,d,f){f||(f=e);return function(){f[d||"push"]([b,c,arguments]);return t}}function b(a,c,d){d||(d=e);return function(b,e){e&&B(e)&&(e.$$moduleName=f);d.push([a,c,arguments]);return t}}if(!g)throw d("nomod",f);var e=[],n=[],s=[],G=a("$injector","invoke",
1371 1576 "push",n),t={_invokeQueue:e,_configBlocks:n,_runBlocks:s,info:function(a){if(w(a)){if(!D(a))throw c("aobj","value");h=a;return this}return h},requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator",n),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider",
1372 1577 "directive"),component:b("$compileProvider","component"),config:G,run:function(a){s.push(a);return this}};k&&G(k);return t})}})}function ja(a,b){if(H(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function Ie(a,b){var d=[];Xb(b)&&(a=ca.copy(a,null,b));return JSON.stringify(a,function(a,b){b=Qc(a,b);if(D(b)){if(0<=d.indexOf(b))return"...";d.push(b)}return b})}function Je(a){S(a,{errorHandlingConfig:re,
1373 1578 bootstrap:Uc,copy:Ia,extend:S,merge:te,equals:va,element:x,forEach:r,injector:fb,noop:E,bind:Va,toJson:eb,fromJson:Rc,identity:Ta,isUndefined:z,isDefined:w,isString:A,isFunction:B,isObject:D,isNumber:W,isElement:$b,isArray:H,version:Ke,isDate:ha,callbacks:{$$counter:0},getTestability:De,reloadWithDebugInfo:Ce,$$minErr:F,$$csp:Aa,$$encodeUriSegment:hc,$$encodeUriQuery:ba,$$lowercase:K,$$stringify:ic,$$uppercase:ub});kc=He(C);kc("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Le});
1374 1579 a.provider("$compile",Xc).directive({a:Me,input:Yc,textarea:Yc,form:Ne,script:Oe,select:Pe,option:Qe,ngBind:Re,ngBindHtml:Se,ngBindTemplate:Te,ngClass:Ue,ngClassEven:Ve,ngClassOdd:We,ngCloak:Xe,ngController:Ye,ngForm:Ze,ngHide:$e,ngIf:af,ngInclude:bf,ngInit:cf,ngNonBindable:df,ngPluralize:ef,ngRef:ff,ngRepeat:gf,ngShow:hf,ngStyle:jf,ngSwitch:kf,ngSwitchWhen:lf,ngSwitchDefault:mf,ngOptions:nf,ngTransclude:of,ngModel:pf,ngList:qf,ngChange:rf,pattern:Zc,ngPattern:Zc,required:$c,ngRequired:$c,minlength:ad,
1375 1580 ngMinlength:ad,maxlength:bd,ngMaxlength:bd,ngValue:sf,ngModelOptions:tf}).directive({ngInclude:uf,input:vf}).directive(vb).directive(cd);a.provider({$anchorScroll:wf,$animate:xf,$animateCss:yf,$$animateJs:zf,$$animateQueue:Af,$$AnimateRunner:Bf,$$animateAsyncRun:Cf,$browser:Df,$cacheFactory:Ef,$controller:Ff,$document:Gf,$$isDocumentHidden:Hf,$exceptionHandler:If,$filter:dd,$$forceReflow:Jf,$interpolate:Kf,$interval:Lf,$$intervalFactory:Mf,$http:Nf,$httpParamSerializer:Of,$httpParamSerializerJQLike:Pf,
1376 1581 $httpBackend:Qf,$xhrFactory:Rf,$jsonpCallbacks:Sf,$location:Tf,$log:Uf,$parse:Vf,$rootScope:Wf,$q:Xf,$$q:Yf,$sce:Zf,$sceDelegate:$f,$sniffer:ag,$$taskTrackerFactory:bg,$templateCache:cg,$templateRequest:dg,$$testability:eg,$timeout:fg,$window:gg,$$rAF:hg,$$jqLite:ig,$$Map:jg,$$cookieReader:kg})}]).info({angularVersion:"1.7.7"})}function wb(a,b){return b.toUpperCase()}function xb(a){return a.replace(lg,wb)}function lc(a){a=a.nodeType;return 1===a||!a||9===a}function ed(a,b){var d,c,e=b.createDocumentFragment(),
1377 1582 f=[];if(mc.test(a)){d=e.appendChild(b.createElement("div"));c=(mg.exec(a)||["",""])[1].toLowerCase();c=oa[c]||oa._default;d.innerHTML=c[1]+a.replace(ng,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=db(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";r(f,function(a){e.appendChild(a)});return e}function Y(a){if(a instanceof Y)return a;var b;A(a)&&(a=U(a),b=!0);if(!(this instanceof Y)){if(b&&"<"!==a.charAt(0))throw nc("nosel");return new Y(a)}if(b){b=
1378 1583 C.document;var d;a=(d=og.exec(a))?[b.createElement(d[1])]:(d=ed(a,b))?d.childNodes:[];oc(this,a)}else B(a)?fd(a):oc(this,a)}function pc(a){return a.cloneNode(!0)}function yb(a,b){!b&&lc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function gd(a){for(var b in a)return!1;return!0}function hd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!gd(d)||c&&!gd(c)||(delete Ka[b],a.ng339=void 0)}function id(a,b,d,c){if(w(c))throw nc("offargs");var e=(c=zb(a))&&c.events,
1379 1584 f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f),delete e[b])};r(b.split(" "),function(a){g(a);Ab[a]&&g(Ab[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f),delete e[b];hd(a)}}function qc(a,b){var d=a.ng339;if(d=d&&Ka[d])b?delete d.data[b]:d.data={},hd(a)}function zb(a,b){var d=a.ng339,d=d&&Ka[d];b&&!d&&(a.ng339=d=++pg,d=Ka[d]={events:{},data:{},handle:void 0});return d}function rc(a,b,d){if(lc(a)){var c,e=w(d),
1380 1585 f=!e&&b&&!D(b),g=!b;a=(a=zb(a,!f))&&a.data;if(e)a[xb(b)]=d;else{if(g)return a;if(f)return a&&a[xb(b)];for(c in b)a[xb(c)]=b[c]}}}function Bb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Cb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=U(a);c=c.replace(" "+a+" "," ")});c!==d&&a.setAttribute("class",U(c))}}function Db(a,b){if(b&&a.setAttribute){var d=
1381 1586 (" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=U(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});c!==d&&a.setAttribute("class",U(c))}}function oc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function jd(a,b){return Eb(a,"$"+(b||"ngController")+"Controller")}function Eb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=H(b)?b:[b];a;){for(var c=
1382 1587 0,e=b.length;c<e;c++)if(w(d=x.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function kd(a){for(yb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Fb(a,b){b||yb(a);var d=a.parentNode;d&&d.removeChild(a)}function qg(a,b){b=b||C;if("complete"===b.document.readyState)b.setTimeout(a);else x(b).on("load",a)}function fd(a){function b(){C.document.removeEventListener("DOMContentLoaded",b);C.removeEventListener("load",b);a()}"complete"===C.document.readyState?C.setTimeout(a):(C.document.addEventListener("DOMContentLoaded",
1383 1588 b),C.addEventListener("load",b))}function ld(a,b){var d=Gb[b.toLowerCase()];return d&&md[ua(a)]&&d}function rg(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(z(c.immediatePropagationStopped)){var k=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();k&&k.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};
1384 1589 var h=f.specialHandlerWrapper||sg;1<g&&(f=ja(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||h(a,c,f[l])}};d.elem=a;return d}function sg(a,b,d){d.call(a,b)}function tg(a,b,d){var c=b.relatedTarget;c&&(c===a||ug.call(a,c))||d.call(a,b)}function ig(){this.$get=function(){return S(Y,{hasClass:function(a,b){a.attr&&(a=a[0]);return Bb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Cb(a,b)}})}}function La(a,b){var d=a&&a.$$hashKey;
1385 1590 if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||se)():d+":"+a}function nd(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function od(a){a=Function.prototype.toString.call(a).replace(vg,"");return a.match(wg)||a.match(xg)}function yg(a){return(a=od(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(a,b){function d(a){return function(b,c){if(D(b))r(b,Yb(a));else return a(b,
1386 1591 c)}}function c(a,b){Ja(a,"service");if(B(b)||H(b))b=n.instantiate(b);if(!b.$get)throw Ba("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=t.invoke(b,this);if(z(c))throw Ba("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){gb(z(a)||H(a),"modulesToLoad","not an array");var b=[],c;r(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=n.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.set(a,!0);try{A(a)?(c=kc(a),
1387 1592 t.modules[a]=c,b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):B(a)?b.push(n.invoke(a)):H(a)?b.push(n.invoke(a)):sb(a,"module")}catch(e){throw H(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ba("modulerr",a,e.stack||e.message||e);}}});return b}function k(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===h)throw Ba("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=h,a[b]=c(b,e),
1388 1593 a[b]}catch(f){throw a[b]===h&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=fb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ba("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&&(d=c,c=null);c=e(a,c,d);H(a)&&(a=a[a.length-1]);d=a;if(Ca||"function"!==typeof d)d=!1;else{var f=d.$$ngIsClass;Ga(f)||(f=d.$$ngIsClass=/^class\b/.test(Function.prototype.toString.call(d)));d=f}return d?
1389 1594 (c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=H(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return p.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var h={},l=[],m=new Hb,p={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,
1390 1595 ia(b),!1)}),constant:d(function(a,b){Ja(a,"constant");p[a]=b;s[a]=b}),decorator:function(a,b){var c=n.get(a+"Provider"),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},n=p.$injector=k(p,function(a,b){ca.isString(b)&&l.push(b);throw Ba("unpr",l.join(" <- "));}),s={},G=k(s,function(a,b){var c=n.get(a+"Provider",b);return t.invoke(c.$get,c,void 0,a)}),t=G;p.$injectorProvider={$get:ia(G)};t.modules=n.modules=T();var N=g(a),t=G.get("$injector");t.strictDi=b;r(N,
1391 1596 function(a){a&&t.invoke(a)});t.loadNewModules=function(a){r(g(a),function(a){a&&t.invoke(a)})};return t}function wf(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===ua(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;B(c)?c=c():$b(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):W(c)||
1392 1597 (c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=A(a)?a:W(a)?a.toString():d.hash();var b;a?(b=k.getElementById(a))?f(b):(b=e(k.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var k=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||qg(function(){c.$evalAsync(g)})});return g}]}function hb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;H(a)&&(a=a.join(" "));H(b)&&(b=b.join(" "));return a+" "+b}function zg(a){A(a)&&
1393 1598 (a=a.split(" "));var b=T();r(a,function(a){a.length&&(b[a]=!0)});return b}function ra(a){return D(a)?a:{}}function Ag(a,b,d,c,e){function f(){qa=null;k()}function g(){t=y();t=z(t)?null:t;va(t,P)&&(t=P);N=P=t}function k(){var a=N;g();if(v!==h.url()||a!==t)v=h.url(),N=t,r(J,function(a){a(h.url(),t)})}var h=this,l=a.location,m=a.history,p=a.setTimeout,n=a.clearTimeout,s={},G=e(d);h.isMock=!1;h.$$completeOutstandingRequest=G.completeTask;h.$$incOutstandingRequestCount=G.incTaskCount;h.notifyWhenNoOutstandingRequests=
1394 1599 G.notifyWhenNoPendingTasks;var t,N,v=l.href,jc=b.find("base"),qa=null,y=c.history?function(){try{return m.state}catch(a){}}:E;g();h.url=function(b,d,e){z(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=N===e;b=ga(b).href;if(v===b&&(!c.history||f))return h;var k=v&&Da(v)===Da(b);v=b;N=e;!c.history||k&&f?(k||(qa=b),d?l.replace(b):k?(d=l,e=b,f=e.indexOf("#"),e=-1===f?"":e.substr(f),d.hash=e):l.href=b,l.href!==b&&(qa=b)):(m[d?"replaceState":"pushState"](e,"",b),g());
1395 1600 qa&&(qa=b);return h}return(qa||l.href).replace(/#$/,"")};h.state=function(){return t};var J=[],I=!1,P=null;h.onUrlChange=function(b){if(!I){if(c.history)x(a).on("popstate",f);x(a).on("hashchange",f);I=!0}J.push(b);return b};h.$$applicationDestroyed=function(){x(a).off("hashchange popstate",f)};h.$$checkUrlChange=k;h.baseHref=function(){var a=jc.attr("href");return a?a.replace(/^(https?:)?\/\/[^/]*/,""):""};h.defer=function(a,b,c){var d;b=b||0;c=c||G.DEFAULT_TASK_TYPE;G.incTaskCount(c);d=p(function(){delete s[d];
1396 1601 G.completeTask(a,c)},b);s[d]=c;return d};h.defer.cancel=function(a){if(s.hasOwnProperty(a)){var b=s[a];delete s[a];n(a);G.completeTask(E,b);return!0}return!1}}function Df(){this.$get=["$window","$log","$sniffer","$document","$$taskTrackerFactory",function(a,b,d,c,e){return new Ag(a,c,b,d,e)}]}function Ef(){this.$get=function(){function a(a,c){function e(a){a!==p&&(n?n===a&&(n=a.n):n=a,f(a.n,a.p),f(a,p),p=a,p.n=null)}function f(a,b){a!==b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw F("$cacheFactory")("iid",
1397 1602 a);var g=0,k=S({},c,{id:a}),h=T(),l=c&&c.capacity||Number.MAX_VALUE,m=T(),p=null,n=null;return b[a]={put:function(a,b){if(!z(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in h||g++;h[a]=b;g>l&&this.remove(n.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return h[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b===p&&(p=b.p);b===n&&(n=b.n);f(b.n,b.p);delete m[a]}a in h&&(delete h[a],g--)},removeAll:function(){h=T();g=0;m=T();
1398 1603 p=n=null},destroy:function(){m=k=h=null;delete b[a]},info:function(){return S({},k,{size:g})}}}var b={};a.info=function(){var a={};r(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function cg(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Xc(a,b){function d(a,b,c){var d=/^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/,e=T();r(a,function(a,f){a=a.trim();if(a in p)e[f]=p[a];else{var g=a.match(d);if(!g)throw $("iscp",b,f,a,c?"controller bindings definition":
1399 1604 "isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(p[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==K(b))throw $("baddir",a);if(a!==a.trim())throw $("baddir",a);}function e(a){var b=a.require||a.controller&&a.name;!H(b)&&D(b)&&r(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive:\s*([\w-]+)\s+(.*)$/,k=/(([\w-]+)(?::([^;]+))?;?)/,h=we("ngSrc,ngSrcset,src,srcset"),
1400 1605 l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,p=T();this.directive=function qa(b,d){gb(b,"name");Ja(b,"directive");A(b)?(c(b),gb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];r(f[b],function(f,g){try{var h=a.invoke(f);B(h)?h={compile:ia(h)}:!h.compile&&h.link&&(h.compile=ia(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);var k=h,l=h.restrict;if(l&&(!A(l)||!/[EACM]/.test(l)))throw $("badrestrict",
1401 1606 l,b);k.restrict=l||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),f[b].push(d)):r(b,Yb(qa));return this};this.component=function y(a,b){function c(a){function e(b){return B(b)||H(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}:b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Bg(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",
1402 1607 require:b.require};r(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}if(!A(a))return r(a,Yb(Va(this,y))),this;var d=b.controller||function(){};r(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,B(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a,c)};this.aHrefSanitizationWhitelist=function(a){return w(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};
1403 1608 var n=!0;this.debugInfoEnabled=function(a){return w(a)?(n=a,this):n};var s=!1;this.strictComponentBindingsEnabled=function(a){return w(a)?(s=a,this):s};var G=10;this.onChangesTtl=function(a){return arguments.length?(G=a,this):G};var t=!0;this.commentDirectivesEnabled=function(a){return arguments.length?(t=a,this):t};var N=!0;this.cssClassDirectivesEnabled=function(a){return arguments.length?(N=a,this):N};var v=T();this.addPropertySecurityContext=function(a,b,c){var d=a.toLowerCase()+"|"+b.toLowerCase();
1404 1609 if(d in v&&v[d]!==c)throw $("ctxoverride",a,b,v[d],c);v[d]=c;return this};(function(){function a(b,c){r(c,function(a){v[a.toLowerCase()]=b})}a(V.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]);a(V.CSS,["*|style"]);a(V.URL,"area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" "));a(V.MEDIA_URL,"audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" "));a(V.RESOURCE_URL,"*|formAction applet|code applet|codebase base|href embed|src frame|src form|action head|profile html|manifest iframe|src link|href media|src object|codebase object|data script|src".split(" "))})();
1405 1610 this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate",function(a,b,c,e,p,M,L,u,R){function q(){try{if(!--Ja)throw Ua=void 0,$("infchng",G);L.$apply(function(){for(var a=0,b=Ua.length;a<b;++a)try{Ua[a]()}catch(d){c(d)}Ua=void 0})}finally{Ja++}}function ma(a,b){if(!a)return a;if(!A(a))throw $("srcset",b,a.toString());for(var c="",d=U(a),e=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,e=/\s/.test(d)?e:/(,)/,d=d.split(e),e=Math.floor(d.length/
1406 1611 2),f=0;f<e;f++)var g=2*f,c=c+u.getTrustedMediaUrl(U(d[g])),c=c+(" "+U(d[g+1]));d=U(d[2*f]).split(/\s/);c+=u.getTrustedMediaUrl(U(d[0]));2===d.length&&(c+=" "+U(d[1]));return c}function w(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a}function O(a,b,c){Fa.innerHTML="<span "+b+">";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}}
1407 1612 function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("<div></div>").append(a).html())):c?Wa.clone.call(a):
1408 1613 a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;m<h.length;m+=3)f=h[m],t[f]=c[f];else t=c;m=0;for(p=h.length;m<p;)k=t[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),da.$$addScopeInfo(x(k),l)):l=a,I=c.transcludeOnThisElement?ka(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ka(a,b):null,c(f,l,k,d,I)):f&&f(a,k.childNodes,
1409 1614 void 0,e)}for(var h=[],k=H(a)||a instanceof x,l,m,p,I,n,t=0;t<a.length;t++){l=new w;11===Ca&&ib(a,t,k);m=sc(a[t],[],l,0===t?d:void 0,e);(f=m.length?aa(m,a[t],l,b,c,null,[],[],f):null)&&f.scope&&da.$$addScopeClass(l.$$element);l=f&&f.terminal||!(p=a[t].childNodes)||!p.length?null:Xa(p,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(t,f,l),I=!0,n=n||f;f=null}return I?g:null}function ib(a,b,c){var d=a[b],e=d.parentNode,f;if(d.nodeType===Pa)for(;;){f=e?d.nextSibling:
1410 1615 a[b+1];if(!f||f.nodeType!==Pa)break;d.nodeValue+=f.nodeValue;f.parentNode&&f.parentNode.removeChild(f);c&&f===a[b+1]&&a.splice(b+1,1)}}function ka(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g,futureParentElement:h})}var e=d.$$slots=T(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?ka(a,b.$$slots[f],c):null;return d}function sc(a,b,d,e,f){var g=d.$attr,h;switch(a.nodeType){case 1:h=ua(a);X(b,wa(h),"E",e,f);for(var l,m,
1411 1616 n,t,J,s=a.attributes,v=0,G=s&&s.length;v<G;v++){var P=!1,N=!1,r=!1,y=!1,u=!1,M;l=s[v];m=l.name;t=l.value;n=wa(m.toLowerCase());(J=n.match(Ra))?(r="Attr"===J[1],y="Prop"===J[1],u="On"===J[1],m=m.replace(pd,"").toLowerCase().substr(4+J[1].length).replace(/_(.)/g,function(a,b){return b.toUpperCase()})):(M=n.match(Sa))&&ca(M[1])&&(P=m,N=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));if(y||u)d[n]=t,g[n]=l.name,y?Ea(a,b,n,m):b.push(qd(p,L,c,n,m,!1));else{n=wa(m.toLowerCase());g[n]=m;if(r||!d.hasOwnProperty(n))d[n]=
1412 1617 t,ld(a,n)&&(d[n]=!0);Ia(a,b,t,n,r);X(b,n,"A",e,f,P,N)}}"input"===h&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off");if(!Qa)break;g=a.className;D(g)&&(g=g.animVal);if(A(g)&&""!==g)for(;a=k.exec(g);)n=wa(a[2]),X(b,n,"C",e,f)&&(d[n]=U(a[3])),g=g.substr(a.index+a[0].length);break;case Pa:na(b,a.nodeValue);break;case 8:if(!Oa)break;F(a,b,d,e,f)}b.sort(ia);return b}function F(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=wa(f[1]);X(b,h,"M",d,e)&&(c[h]=U(f[2]))}}catch(k){}}
1413 1618 function V(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw $("uterdir",b,c);1===a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function Y(a,b,c){return function(d,e,f,g,h){e=V(e[0],b,c);return a(d,e,f,g,h)}}function Z(a,b,c,d,e,f){var g;return a?da(b,c,d,e,f):function(){g||(g=da(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function aa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=
1414 1619 Y(a,c,d));a.require=u.require;a.directiveName=Q;if(s===u||u.$$isolateScope)a=Aa(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=Y(b,c,d));b.require=u.require;b.directiveName=Q;if(s===u||u.$$isolateScope)b=Aa(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;bb(a)||(d=c,c=b,b=a,a=void 0);N&&(e=P);c||(c=N?Q.parent():Q);if(d){var f=l.$$slots[d];if(f)return f(a,b,e,c,R);if(z(f))throw $("noslot",d,za(Q));}else return l(a,b,e,c,R)}var n,u,L,y,G,P,M,Q;b===f?(g=d,Q=d.$$element):(Q=
1415 1620 x(f),g=new w(Q,d));G=e;s?y=e.$new(!0):t&&(G=e.$parent);l&&(M=m,M.$$boundTransclude=l,M.isSlotFilled=function(a){return!!l.$$slots[a]});J&&(P=ea(Q,g,M,J,y,e,s));s&&(da.$$addScopeInfo(Q,y,!0,!(v&&(v===s||v===s.$$originalDirective))),da.$$addScopeClass(Q,!0),y.$$isolateBindings=s.$$isolateBindings,u=Da(e,g,y,y.$$isolateBindings,s),u.removeWatches&&y.$on("$destroy",u.removeWatches));for(n in P){u=J[n];L=P[n];var Cg=u.$$bindings.bindToController;L.instance=L();Q.data("$"+u.name+"Controller",L.instance);
1416 1621 L.bindingInfo=Da(G,g,L.instance,Cg,u)}r(J,function(a,b){var c=a.require;a.bindToController&&!H(c)&&D(c)&&S(P[b].instance,W(b,c,Q,P))});r(P,function(a){var b=a.instance;if(B(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(B(b.$onInit))try{b.$onInit()}catch(e){c(e)}B(b.$doCheck)&&(G.$watch(function(){b.$doCheck()}),b.$doCheck());B(b.$onDestroy)&&G.$on("$destroy",function(){b.$onDestroy()})});n=0;for(u=h.length;n<u;n++)L=h[n],Ba(L,L.isolateScope?y:e,Q,g,L.require&&W(L.directiveName,
1417 1622 L.require,Q,P),M);var R=e;s&&(s.template||null===s.templateUrl)&&(R=y);a&&a(R,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)L=k[n],Ba(L,L.isolateScope?y:e,Q,g,L.require&&W(L.directiveName,L.require,Q,P),M);r(P,function(a){a=a.instance;B(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE,t=l.newScopeDirective,J=l.controllerDirectives,s=l.newIsolateScopeDirective,v=l.templateDirective,L=l.nonTlbTranscludeDirective,G=!1,P=!1,N=l.hasElementTranscludeDirective,y=d.$$element=x(b),u,Q,
1418 1623 M,R=e,q,ma=!1,Ib=!1,O,sa=0,A=a.length;sa<A;sa++){u=a[sa];var E=u.$$start,ib=u.$$end;E&&(y=V(b,E,ib));M=void 0;if(n>u.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&&!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Ib=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",
1419 1624 J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],pa(f,Ha.call(M,0),b),R=Z(Ib,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=C.document.createDocumentFragment();var Xa=T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[wa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||C.document.createDocumentFragment(),
1420 1625 ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Ib,R,e));M=x(M.childNodes)}else M=x(pc(b)).contents();y.empty();R=Z(Ib,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P=!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=mc.test(O)?rd(ja(u.templateNamespace,U(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",
1421 1626 Q,"");pa(f,y,b);A={$attr:{}};O=sc(b,[],A);var Dg=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Dg);ga(d,A);A=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!==u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),A=a.length;else if(u.compile)try{q=u.compile(y,d,R);var X=u.$$originalDirective||u;B(q)?m(null,Va(X,q),E,ib):
1422 1627 q&&m(Va(X,q.pre),Va(X,q.post),E,ib)}catch(ca){c(ca,za(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function W(a,b,c,d){var e;if(A(b)){var f=b.match(l);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&&
1423 1628 !f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=W(a,b[g],c,d);else D(b)&&(e={},r(b,function(b,f){e[f]=W(a,b,c,d)}));return e||null}function ea(a,b,c,d,e,f,g){var h=T(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"===p&&(p=b[l.name]);m=M(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function fa(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=ac(a[d],{$$isolateScope:b,
1424 1629 $$newScope:c})}function X(b,c,e,g,h,k,l){if(c===h)return null;var m=null;if(f.hasOwnProperty(c)){h=a.get(c+"Directive");for(var p=0,n=h.length;p<n;p++)if(c=h[p],(z(g)||g>c.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=ac(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null};D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController,
1425 1630 t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function ga(a,b){var c=b.$attr,d=a.$attr;r(a,function(d,e){"$"!==e.charAt(0)&&(b[e]&&b[e]!==d&&(d=d.length?d+(("style"===e?";":" ")+b[e]):b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,e){a.hasOwnProperty(e)||
1426 1631 "$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ha(a,b,d,f,g,h,k,l){var m=[],p,n,t=b[0],u=a.shift(),J=ac(u,{templateUrl:null,transclude:null,replace:null,$$originalDirective:u}),s=B(u.templateUrl)?u.templateUrl(b,d):u.templateUrl,L=u.templateNamespace;b.empty();e(s).then(function(c){var e,I;c=Na(c);if(u.replace){c=mc.test(c)?rd(ja(L,U(c))):[];e=c[0];if(1!==c.length||1!==e.nodeType)throw $("tplrt",u.name,s);c={$attr:{}};pa(f,b,e);var v=sc(e,[],c);D(u.scope)&&fa(v,!0);a=
1427 1632 v.concat(a);ga(d,c)}else e=t,b.html(c);a.unshift(J);p=aa(a,e,d,g,b,u,h,k,l);r(f,function(a,c){a===e&&(f[c]=b[0])});for(n=Xa(b[0].childNodes,g);m.length;){c=m.shift();I=m.shift();var y=m.shift(),P=m.shift(),v=b[0];if(!c.$$destroyed){if(I!==t){var G=I.className;l.hasElementTranscludeDirective&&u.replace||(v=pc(e));pa(y,x(I),v);sa(x(v),G)}I=p.transcludeOnThisElement?ka(c,p.transclude,P):P;p(n,c,v,f,I)}}m=null}).catch(function(a){cc(a)&&c(a)});return function(a,b,c,d,e){a=e;b.$$destroyed||(m?m.push(b,
1428 1633 c,d,a):(p.transcludeOnThisElement&&(a=ka(b,p.transclude,e)),p(n,b,c,d,a)))}}function ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function ba(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw $("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,za(d));}function na(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&da.$$addBindingClass(a);return function(a,c){var e=c.parent();
1429 1634 b||da.$$addBindingClass(e);da.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ja(a,b){a=K(a||"html");switch(a){case "svg":case "math":var c=C.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function oa(a,b){if("srcdoc"===b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL:
1430 1635 "a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function xa(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function ya(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c,d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=xa(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=ya;b.push({priority:100,compile:function(a,b){var e=
1431 1636 p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=oa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",za(a));if(m.test(e))throw $("nodomevents");c.push({priority:100,compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&
1432 1637 f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function pa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]===d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=C.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);x.hasData(d)&&(x.data(c,x.data(d)),x(d).off("$destroy"));x.cleanData(a.querySelectorAll("*"));
1433 1638 for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function Aa(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function Ba(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,za(d))}}function ra(a,b){if(s)throw $("missingattr",a,b);}function Da(a,c,d,e,f){function g(b,c,e){B(d.$onChanges)&&!dc(c,e)&&(Ua||(a.$$postDigest(q),Ua=[]),m||(m={},Ua.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Jb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;r(e,function(e,h){var m=e.attrName,n=e.optional,
1434 1639 I,t,u,s;switch(e.mode){case "@":n||ta.call(c,m)||(ra(m,f.name),d[h]=c[m]=void 0);n=c.$observe(m,function(a){if(A(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;I=c[m];A(I)?d[h]=b(I)(a):Ga(I)&&(d[h]=I);l[h]=new Jb(tc,d[h]);k.push(n);break;case "=":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);s=t.literal?va:dc;u=t.assign||function(){I=d[h]=t(a);throw $("nonassign",c[m],m,f.name);};I=d[h]=t(a);n=function(b){s(b,d[h])||(s(b,I)?u(a,b=d[h]):d[h]=b);return I=
1435 1640 b};n.$stateful=!0;n=e.collection?a.$watchCollection(c[m],n):a.$watch(p(c[m],n),null,t.literal);k.push(n);break;case "<":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);var v=t.literal,L=d[h]=t(a);l[h]=new Jb(tc,d[h]);n=a[e.collection?"$watchCollection":"$watch"](t,function(a,b){if(b===a){if(b===L||v&&va(b,L))return;b=L}g(h,a,b);d[h]=a});k.push(n);break;case "&":n||ta.call(c,m)||ra(m,f.name);t=c.hasOwnProperty(m)?p(c[m]):E;if(t===E&&n)break;d[h]=function(b){return t(a,
1436 1641 b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var Ma=/^\w/,Fa=C.document.createElement("div"),Oa=t,Qa=N,Ja=G,Ua;w.prototype={$normalize:wa,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=sd(a,b);c&&c.length&&R.addClass(this.$$element,c);(c=sd(b,a))&&c.length&&R.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=
1437 1642 ld(this.$$element[0],a),g=td[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Vc(a,"-"));"img"===ua(this.$$element)&&"srcset"===a&&(this[a]=b=ma(b,"$set('srcset', value)"));!1!==d&&(null===b||z(b)?this.$$element.removeAttr(e):Ma.test(e)?f&&!1===b?this.$$element.removeAttr(e):this.$$element.attr(e,b):O(this.$$element[0],e,b));(a=this.$$observers)&&r(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,
1438 1643 d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||z(c[a])||b(c[a])});return function(){cb(e,b)}}};var Ka=b.startSymbol(),La=b.endSymbol(),Na="{{"===Ka&&"}}"===La?Ta:function(a){return a.replace(/\{\{/g,Ka).replace(/}}/g,La)},Ra=/^ng(Attr|Prop|On)([A-Z].*)$/,Sa=/^(.+)Start$/;da.$$addBindingInfo=n?function(a,b){var c=a.data("$binding")||[];H(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:E;da.$$addBindingClass=n?function(a){sa(a,
1439 1644 "ng-binding")}:E;da.$$addScopeInfo=n?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:E;da.$$addScopeClass=n?function(a,b){sa(a,b?"ng-isolate-scope":"ng-scope")}:E;da.$$createComment=function(a,b){var c="";n&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return C.document.createComment(c)};return da}]}function Jb(a,b){this.previousValue=a;this.currentValue=b}function wa(a){return a.replace(pd,"").replace(Eg,function(a,d,c){return c?d.toUpperCase():d})}function sd(a,b){var d=
1440 1645 "",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],k=0;k<e.length;k++)if(g===e[k])continue a;d+=(0<d.length?" ":"")+g}return d}function rd(a){a=x(a);var b=a.length;if(1>=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Fg.call(a,b,1)}return a}function Bg(a,b){if(b&&A(b))return b;if(A(a)){var d=ud.exec(a);if(d)return d[3]}}function Ff(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,
1441 1646 "controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&A(g)&&(l=g);if(A(c)){g=c.match(ud);if(!g)throw vd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Ge(e.$scope,h,!0);if(!c)throw vd("ctrlreg",h);sb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h);
1442 1647 a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Gf(){this.$get=["$window",function(a){return x(a.document)}]}function Hf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden;a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function If(){this.$get=["$log",function(a){return function(b,
1443 1648 d){a.error.apply(a,arguments)}}]}function uc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Of(){this.$get=function(){return function(a){if(!a)return"";var b=[];Oc(a,function(a,c){null===a||z(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(uc(a)))}):b.push(ba(c)+"="+ba(uc(a))))});return b.join("&")}}}function Pf(){this.$get=function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):
1444 1649 (B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(uc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function vc(a,b){if(A(a)){var d=a.replace(Gg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(wd),e;(e=c)||(e=(e=d.match(Hg))&&Ig[e[0]].test(d));if(e)try{a=Rc(d)}catch(f){if(!c)return a;throw Kb("baddata",a,f);}}}return a}function xd(a){var b=T(),d;A(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(U(a.substr(0,d)));a=U(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&
1445 1650 r(a,function(a,d){var f=K(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function yd(a){var b;return function(d){b||(b=xd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function zd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Nf(){var a=this.defaults={transformResponse:[vc],transformRequest:[function(a){return D(a)&&"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
1446 1651 post:ja(wc),put:ja(wc),patch:ja(wc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfWhitelistedOrigins=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];
1447 1652 a=a.then(f,g)}b.length=0;return a}function d(a,b){var c,e={};r(a,function(a,d){B(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a});return e}function f(a){var b=S({},a);b.data=zd(a.data,a.headers,a.status,g.transformResponse);a=a.status;return 200<=a&&300>a?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!A(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam},
1448 1653 b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method=ub(g.method);g.paramSerializer=A(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});
1449 1654 b=c(b,h);b=b.then(function(b){var c=b.headers,d=zd(b.data,yd(c),void 0,b.transformRequest);z(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});z(b.withCredentials)&&!z(a.withCredentials)&&(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a,
1450 1655 c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,xd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300>b?L.resolve:L.reject)({data:a,status:b,headers:yd(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method),
1451 1656 O=c.url;x?O=p.getTrustedResourceUrl(O):A(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));z(q)&&((q=jc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=
1452 1657 q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0<b.length&&(a+=(-1===a.indexOf("?")?"?":"&")+b);return a}function t(a,b){var c=a.split("?");if(2<c.length)throw Kb("badjsonp",a);c=gc(c[1]);r(c,function(c,d){if("JSON_CALLBACK"===c)throw Kb("badjsonp",a);if(d===b)throw Kb("badjsonp",b,a);});return a+=(-1===a.indexOf("?")?"?":"&")+b+"=JSON_CALLBACK"}var N=k("$http");a.paramSerializer=A(a.paramSerializer)?m.get(a.paramSerializer):
1453 1658 a.paramSerializer;var v=[];r(d,function(a){v.unshift(A(a)?m.get(a):m.invoke(a))});var jc=Jg(c);n.pendingRequests=[];(function(a){r(arguments,function(a){n[a]=function(b,c){return n(S({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){n[a]=function(b,c,d){return n(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=a;return n}]}function Rf(){this.$get=function(){return function(){return new C.XMLHttpRequest}}}function Qf(){this.$get=
1454 1659 ["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return Kg(a,c,a.defer,b,d[0])}]}function Kg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK",b);var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m);f.removeEventListener("error",m);e.body.removeChild(f);f=null;var g=-1,s="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),s=a.type,g="error"===a.type?404:200);d&&d(g,s)};f.addEventListener("load",
1455 1660 m);f.addEventListener("error",m);e.body.appendChild(f);return m}return function(e,k,h,l,m,p,n,s,G,t){function N(a){J="timeout"===a;qa&&qa();y&&y.abort()}function v(a,b,c,e,f,g){w(P)&&d.cancel(P);qa=y=null;a(b,c,e,f,g)}k=k||a.url();if("jsonp"===K(e))var q=c.createCallback(k),qa=f(k,q,function(a,b){var d=200===a&&c.getResponse(q);v(l,a,d,"",b,"complete");c.removeCallback(q)});else{var y=b(e,k),J=!1;y.open(e,k,!0);r(m,function(a,b){w(a)&&y.setRequestHeader(b,a)});y.onload=function(){var a=y.statusText||
1456 1661 "",b="response"in y?y.response:y.responseText,c=1223===y.status?204:y.status;0===c&&(c=b?200:"file"===ga(k).protocol?404:0);v(l,c,b,y.getAllResponseHeaders(),a,"complete")};y.onerror=function(){v(l,-1,null,null,"","error")};y.ontimeout=function(){v(l,-1,null,null,"","timeout")};y.onabort=function(){v(l,-1,null,null,"",J?"timeout":"abort")};r(G,function(a,b){y.addEventListener(b,a)});r(t,function(a,b){y.upload.addEventListener(b,a)});n&&(y.withCredentials=!0);if(s)try{y.responseType=s}catch(I){if("json"!==
1457 1662 s)throw I;}y.send(z(h)?null:h)}if(0<p)var P=d(function(){N("timeout")},p);else p&&B(p.then)&&p.then(function(){N(w(p.$$timeoutId)?"timeout":"abort")})}}function Kf(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(p,a).replace(n,b)}function k(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}
1458 1663 function h(f,h,n,p){function v(a){try{return a=n&&!r?e.getTrusted(n,a):e.valueOf(a),p&&!w(a)?a:ic(a)}catch(b){c(Ma.interr(f,b))}}var r=n===e.URL||n===e.MEDIA_URL;if(!f.length||-1===f.indexOf(a)){if(h)return;h=g(f);r&&(h=e.getTrusted(n,h));h=ia(h);h.exp=f;h.expressions=[];h.$$watchDelegate=k;return h}p=!!p;for(var q,y,J=0,I=[],P,Q=f.length,M=[],L=[],u;J<Q;)if(-1!==(q=f.indexOf(a,J))&&-1!==(y=f.indexOf(b,q+l)))J!==q&&M.push(g(f.substring(J,q))),J=f.substring(q+l,y),I.push(J),J=y+m,L.push(M.length),
1459 1664 M.push("");else{J!==Q&&M.push(g(f.substring(J)));break}u=1===M.length&&1===L.length;var R=r&&u?void 0:v;P=I.map(function(a){return d(a,R)});if(!h||I.length){var x=function(a){for(var b=0,c=I.length;b<c;b++){if(p&&z(a[b]))return;M[L[b]]=a[b]}if(r)return e.getTrusted(n,u?M[0]:M.join(""));n&&1<M.length&&Ma.throwNoconcat(f);return M.join("")};return S(function(a){var b=0,d=I.length,e=Array(d);try{for(;b<d;b++)e[b]=P[b](a);return x(e)}catch(g){c(Ma.interr(f,g))}},{exp:f,expressions:I,$$watchDelegate:function(a,
1460 1665 b){var c;return a.$watchGroup(P,function(d,e){var f=x(d);b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,p=new RegExp(a.replace(/./g,f),"g"),n=new RegExp(b.replace(/./g,f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function Lf(){this.$get=["$$intervalFactory","$window",function(a,b){var d={},c=function(a){b.clearInterval(a);delete d[a]},e=a(function(a,c,e){a=b.setInterval(a,c);d[a]=e;return a},c);e.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$intervalId"))throw Lg("badprom");
1461 1666 if(!d.hasOwnProperty(a.$$intervalId))return!1;a=a.$$intervalId;var b=d[a],e=b.promise;e.$$state&&(e.$$state.pur=!0);b.reject("canceled");c(a);return!0};return e}]}function Mf(){this.$get=["$browser","$q","$$q","$rootScope",function(a,b,d,c){return function(e,f){return function(g,k,h,l){function m(){p?g.apply(null,n):g(s)}var p=4<arguments.length,n=p?Ha.call(arguments,4):[],s=0,G=w(l)&&!l,t=(G?d:b).defer(),r=t.promise;h=w(h)?h:0;r.$$intervalId=e(function(){G?a.defer(m):c.$evalAsync(m);t.notify(s++);
1462 1667 0<h&&s>=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Ad(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=fa(d.port)||Mg[d.protocol]||null}function Bd(a,b,d){if(Ng.test(a))throw jb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=gc(a.search);
1463 1668 b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function xc(a,b){return a.slice(0,b.length)===b}function xa(a,b){if(xc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function yc(a,b,d){this.$$html5=!0;d=d||"";Ad(a,this);this.$$parse=function(a){var d=xa(b,a);if(!A(d))throw jb("ipthprfx",a,b);Bd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};
1464 1669 this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=xa(a,c))?(g=f,g=d&&w(f=xa(d,f))?b+(xa("/",f)||f):a+g):w(f=xa(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function zc(a,b,d){Ad(a,this);this.$$parse=function(c){var e=xa(a,c)||xa(b,c),f;z(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",z(e)&&(a=c,this.replace())):(f=xa(d,e),z(f)&&(f=e));Bd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;xc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?
1465 1670 f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b,d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Cd(a,b,d){this.$$html5=!0;zc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=xa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Lb(a){return function(){return this[a]}}function Dd(a,
1466 1671 b){return function(d){if(z(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Tf(){var a="!",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||A(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer",
1467 1672 "$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a,b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw jb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?yc:Cd}else s=Da(n),p=zc;var r=s.substr(0,
1468 1673 Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i;f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!A(e)||!z(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")||
1469 1674 a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!==n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){xc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation=
1470 1675 !1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!==m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Uf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){cc(a)&&(a.stack&&
1471 1676 f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=Ca||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,
1472 1677 arguments)}}()}}]}function Og(a){return a+""}function Pg(a,b){return"undefined"!==typeof a?a:b}function Ed(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Qg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Fd:b}function Z(a,b,d){var c,e,f=a.isPure=Qg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,
1473 1678 b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch=[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test,
1474 1679 b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,
1475 1680 a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,
1476 1681 a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant=!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Gd(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Hd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Id(a){if(1===a.body.length&&Hd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}
1477 1682 function Jd(a){this.$filter=a}function Kd(a){this.$filter=a}function Mb(a,b,d){this.ast=new q(a,d);this.astCompiler=d.csp?new Kd(b):new Jd(b)}function Ac(a){return B(a.valueOf)?a.valueOf():Rg.call(a)}function Vf(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Nb(G),
1478 1683 d=(new Mb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E,c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Ac(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Ac(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n<p;n++)l[n]=g,m[n]=null;return a.$watch(function(a){for(var b=
1479 1684 !1,c=0,e=f.length;c<e;c++){var k=f[c](a);if(b||(b=!g(k,l[c],f[c].isPure)))m[c]=k,l[c]=k&&Ac(k)}b&&(h=d(a,void 0,void 0,m));return h},b,c,e)}function h(a,b,c,d,e){function f(){h(m)&&k()}function g(a,b,c,d){m=u&&d?d[0]:n(a,b,c,d);h(m)&&a.$$postDigest(f);return s(m)}var h=d.literal?l:w,k,m,n=d.$$intercepted||d,s=d.$$interceptor||Ta,u=d.inputs&&!n.inputs;g.literal=d.literal;g.constant=d.constant;g.inputs=d.inputs;p(g);return k=a.$watch(g,b,c,e)}function l(a){var b=!0;r(a,function(a){w(a)||(b=!1)});return b}
1480 1685 function m(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function p(a){a.constant?a.$$watchDelegate=m:a.oneTime?a.$$watchDelegate=h:a.inputs&&(a.$$watchDelegate=k);return a}function n(a,b){function c(d){return b(a(d))}c.$stateful=a.$stateful||b.$stateful;c.$$pure=a.$$pure&&b.$$pure;return c}function s(a,b){if(!b)return a;a.$$interceptor&&(b=n(a.$$interceptor,b),a=a.$$intercepted);var c=!1,d=function(d,e,f,g){d=c&&g?g[0]:a(d,e,f,g);return b(d)};d.$$intercepted=a;d.$$interceptor=
1481 1686 b;d.literal=a.literal;d.oneTime=a.oneTime;d.constant=a.constant;b.$stateful||(c=!a.inputs,d.inputs=a.inputs?a.inputs:[a],b.$$pure||(d.inputs=d.inputs.map(function(a){return a.isPure===Fd?function(b){return a(b)}:a})));return p(d)}var G={csp:Aa().noUnsafeEval,literals:Ia(b),isIdentifierStart:B(d)&&d,isIdentifierContinue:B(c)&&c};f.$$getAst=function(a){var b=new Nb(G);return(new Mb(b,e,G)).getAst(a).ast};return f}]}function Xf(){var a=!0;this.$get=["$rootScope","$exceptionHandler",function(b,d){return Ld(function(a){b.$evalAsync(a)},
1482 1687 d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Yf(){var a=!0;this.$get=["$browser","$exceptionHandler",function(b,d){return Ld(function(a){b.defer(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Ld(a,b,d){function c(){return new e}function e(){var a=this.promise=new f;this.resolve=function(b){h(a,b)};this.reject=function(b){m(a,b)};this.notify=function(b){n(a,b)}}function f(){this.$$state={status:0}}function g(){for(;!w&&
1483 1688 x.length;){var a=x.shift();if(!a.pur){a.pur=!0;var c=a.value,c="Possibly unhandled rejection: "+("function"===typeof c?c.toString().replace(/ \{[\s\S]*$/,""):z(c)?"undefined":"string"!==typeof c?Ie(c,void 0):c);cc(a.value)?b(a.value,c):b(c)}}}function k(c){!d||c.pending||2!==c.status||c.pur||(0===w&&0===x.length&&a(g),x.push(c));!c.processScheduled&&c.pending&&(c.processScheduled=!0,++w,a(function(){var e,f,k;k=c.pending;c.processScheduled=!1;c.pending=void 0;try{for(var l=0,n=k.length;l<n;++l){c.pur=
1484 1689 !0;f=k[l][0];e=k[l][c.status];try{B(e)?h(f,e(c.value)):1===c.status?h(f,c.value):m(f,c.value)}catch(p){m(f,p),p&&!0===p.$$passToExceptionHandler&&b(p)}}}finally{--w,d&&0===w&&a(g)}}))}function h(a,b){a.$$state.status||(b===a?p(a,v("qcycle",b)):l(a,b))}function l(a,b){function c(b){g||(g=!0,l(a,b))}function d(b){g||(g=!0,p(a,b))}function e(b){n(a,b)}var f,g=!1;try{if(D(b)||B(b))f=b.then;B(f)?(a.$$state.status=-1,f.call(b,c,d,e)):(a.$$state.value=b,a.$$state.status=1,k(a.$$state))}catch(h){d(h)}}function m(a,
1485 1690 b){a.$$state.status||p(a,b)}function p(a,b){a.$$state.value=b;a.$$state.status=2;k(a.$$state)}function n(c,d){var e=c.$$state.pending;0>=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;f<g;f++){c=e[f][0];a=e[f][3];try{n(c,B(a)?a(d):d)}catch(h){b(h)}}})}function s(a){var b=new f;m(b,a);return b}function G(a,b,c){var d=null;try{B(c)&&(d=c())}catch(e){return s(e)}return d&&B(d.then)?d.then(function(){return b(a)},s):b(a)}function t(a,b,c,d){var e=new f;h(e,a);return e.then(b,c,
1486 1691 d)}function q(a){if(!B(a))throw v("norslvr",a);var b=new f;a(function(a){h(b,a)},function(a){m(b,a)});return b}var v=F("$q",TypeError),w=0,x=[];S(f.prototype,{then:function(a,b,c){if(z(a)&&z(b)&&z(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&k(this.$$state);return d},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return G(b,y,a)},function(b){return G(b,s,a)},
1487 1692 b)}});var y=t;q.prototype=f.prototype;q.defer=c;q.reject=s;q.when=t;q.resolve=y;q.all=function(a){var b=new f,c=0,d=H(a)?[]:{};r(a,function(a,e){c++;t(a).then(function(a){d[e]=a;--c||h(b,d)},function(a){m(b,a)})});0===c&&h(b,d);return b};q.race=function(a){var b=c();r(a,function(a){t(a).then(b.resolve,b.reject)});return b.promise};return q}function hg(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||
1488 1693 a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function Wf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++pb;this.$$ChildScope=null;this.$$suspended=!1}b.prototype=a;return b}var b=10,d=F("$rootScope"),c=null,e=null;this.digestTtl=
1489 1694 function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser",function(f,g,k){function h(a){a.currentScope.$$destroyed=!0}function l(a){9===Ca&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++pb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=
1490 1695 this;this.$$suspended=this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function p(a){if(v.$$phase)throw d("inprog",v.$$phase);v.$$phase=a}function n(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function G(){}function t(){for(;y.length;)try{y.shift()()}catch(a){f(a)}e=null}function q(){null===e&&(e=k.defer(function(){v.$apply(t)},
1491 1696 null,"$applyAsync"))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!==this)&&d.$on("$destroy",h);return d},$watch:function(a,b,d,e){var f=g(a);b=B(b)?b:E;if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l=
1492 1697 {fn:b,last:G,get:f,exp:e||a,eq:!!d};c=null;k||(k=h.$$watchers=[],k.$$digestWatchIndex=-1);k.unshift(l);k.$$digestWatchIndex++;n(this,1);return function(){var a=cb(k,l);0<=a&&(n(h,-1),a<k.$$digestWatchIndex&&k.$$digestWatchIndex--);c=null}},$watchGroup:function(a,b){function c(){h=!1;try{k?(k=!1,b(e,e,g)):b(e,d,g)}finally{for(var f=0;f<a.length;f++)d[f]=e[f]}}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=
1493 1698 !1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});r(a,function(a,b){var d=g.$watch(a,function(a){e[b]=a;h||(h=!0,g.$evalAsync(c))});f.push(d)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!z(e)){if(D(e))if(ya(e))for(f!==n&&(f=n,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},t=0,l++);a=0;for(b in e)ta.call(e,
1494 1699 b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t>a)for(b in l++,f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],p={},s=!0,t=0;return this.$watch(m,function(){s?(s=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(ya(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ta.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,
1495 1700 g,h,l,m,n,s,r=b,q,y=w.length?v:this,N=[],z,A;p("$digest");k.$$checkUrlChange();this===v&&null!==e&&(k.defer.cancel(e),t());c=null;do{s=!1;q=y;for(n=0;n<w.length;n++){try{A=w[n],l=A.fn,l(A.scope,A.locals)}catch(C){f(C)}c=null}w.length=0;a:do{if(n=!q.$$suspended&&q.$$watchers)for(n.$$digestWatchIndex=n.length;n.$$digestWatchIndex--;)try{if(a=n[n.$$digestWatchIndex])if(m=a.get,(g=m(q))!==(h=a.last)&&!(a.eq?va(g,h):X(g)&&X(h)))s=!0,c=a,a.last=a.eq?Ia(g,null):g,l=a.fn,l(g,h===G?g:h,q),5>r&&(z=4-r,N[z]||
1496 1701 (N[z]=[]),N[z].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s=!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;J<x.length;)try{x[J++]()}catch(D){f(D)}x.length=J=0;k.$$checkUrlChange()},$suspend:function(){this.$$suspended=!0},$isSuspended:function(){return this.$$suspended},
1497 1702 $resume:function(){this.$$suspended=!1},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&k.$$applicationDestroyed();n(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead===this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail===this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=
1498 1703 this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=E;this.$on=this.$watch=this.$watchGroup=function(){return E};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){v.$$phase||w.length||k.defer(function(){w.length&&v.$digest()},null,"$evalAsync");w.push({scope:this,fn:g(a),locals:b})},$$postDigest:function(a){x.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{v.$$phase=
1499 1704 null}}catch(b){f(b)}finally{try{v.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&y.push(b);a=g(a);q()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(delete c[d],s(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=
1500 1705 !0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=db([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)break;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=db([e],arguments,
1501 1706 1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var v=new m,w=v.$$asyncQueue=[],x=v.$$postDigestQueue=[],y=v.$$applyAsyncQueue=[],J=0;return v}]}function Le(){var a=/^\s*(https?|s?ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;
1502 1707 this.aHrefSanitizationWhitelist=function(b){return w(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f=ga(d&&d.trim()).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function Sg(a){if("self"===a)return a;if(A(a)){if(-1<a.indexOf("***"))throw Ea("iwcard",a);a=Md(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(ab(a))return new RegExp("^"+a.source+"$");throw Ea("imatcher");
1503 1708 }function Nd(a){var b=[];w(a)&&r(a,function(a){b.push(Sg(a))});return b}function $f(){this.SCE_CONTEXTS=V;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=Nd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=Nd(a));return b};this.$get=["$injector","$$sanitizeUri",function(d,c){function e(a,b){var c;"self"===a?(c=Bc(b,Od))||(C.document.baseURI?c=C.document.baseURI:(Na||(Na=C.document.createElement("a"),Na.href=".",Na=Na.cloneNode(!1)),c=Na.href),
1504 1709 c=Bc(b,c)):c=!!a.exec(b.href);return c}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var g=function(a){throw Ea("unsafe");};d.has("$sanitize")&&(g=d.get("$sanitize"));var k=f(),h={};h[V.HTML]=f(k);h[V.CSS]=f(k);h[V.MEDIA_URL]=f(k);h[V.URL]=f(h[V.MEDIA_URL]);h[V.JS]=f(k);h[V.RESOURCE_URL]=
1505 1710 f(h[V.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ea("icontext",a,b);if(null===b||z(b)||""===b)return b;if("string"!==typeof b)throw Ea("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||z(f)||""===f)return f;var k=h.hasOwnProperty(d)?h[d]:null;if(k&&f instanceof k)return f.$$unwrapTrustedValue();B(f.$$unwrapTrustedValue)&&(f=f.$$unwrapTrustedValue());if(d===V.MEDIA_URL||d===V.URL)return c(f.toString(),d===V.MEDIA_URL);if(d===V.RESOURCE_URL){var k=
1506 1711 ga(f.toString()),n,s,r=!1;n=0;for(s=a.length;n<s;n++)if(e(a[n],k)){r=!0;break}if(r)for(n=0,s=b.length;n<s;n++)if(e(b[n],k)){r=!1;break}if(r)return f;throw Ea("insecurl",f.toString());}if(d===V.HTML)return g(f);throw Ea("unsafe");},valueOf:function(a){return a instanceof k?a.$$unwrapTrustedValue():a}}}]}function Zf(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ca)throw Ea("iequirks");var c=ja(V);c.isEnabled=function(){return a};
1507 1712 c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(V,function(a,b){var d=K(b);c[("parse_as_"+d).replace(Cc,wb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Cc,wb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Cc,wb)]=function(b){return g(a,b)}});
1508 1713 return c}]}function ag(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||
1509 1714 4>e||f),hasEvent:function(a){if("input"===a&&Ca)return!1;if(z(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Aa(),transitions:h,animations:l,android:e}}]}function bg(){this.$get=ia(function(a){return new Tg(a)})}function Tg(a){function b(){var a=e.pop();return a&&a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e,
1510 1715 h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}):a()}}function dg(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!A(k)||
1511 1716 z(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==vc}):l===vc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)},function(a){h||(a=Ug("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function eg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,
1512 1717 b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Md(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],k=0;k<g.length;++k){var h=a.querySelectorAll("["+g[k]+"model"+(d?"=":"*=")+'"'+b+'"]');if(h.length)return h}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},
1513 1718 whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function fg(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,h,l){B(f)||(l=h,h=f,f=E);var m=Ha.call(arguments,3),p=w(l)&&!l,n=(p?c:d).defer(),s=n.promise,r;r=b.defer(function(){try{n.resolve(f.apply(null,m))}catch(b){n.reject(b),e(b)}finally{delete g[s.$$timeoutId]}p||a.$apply()},h,"$timeout");s.$$timeoutId=r;g[r]=n;return s}var g={};f.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$timeoutId"))throw Vg("badprom");
1514 1719 if(!g.hasOwnProperty(a.$$timeoutId))return!1;a=a.$$timeoutId;var c=g[a],d=c.promise;d.$$state&&(d.$$state.pur=!0);c.reject("canceled");delete g[a];return b.defer.cancel(a)};return f}]}function ga(a){if(!A(a))return a;Ca&&(aa.setAttribute("href",a),a=aa.href);aa.setAttribute("href",a);a=aa.hostname;!Wg&&-1<a.indexOf(":")&&(a="["+a+"]");return{href:aa.href,protocol:aa.protocol?aa.protocol.replace(/:$/,""):"",host:aa.host,search:aa.search?aa.search.replace(/^\?/,""):"",hash:aa.hash?aa.hash.replace(/^#/,
1515 1720 ""):"",hostname:a,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function Jg(a){var b=[Od].concat(a.map(ga));return function(a){a=ga(a);return b.some(Bc.bind(null,a))}}function Bc(a,b){a=ga(a);b=ga(b);return a.protocol===b.protocol&&a.host===b.host}function gg(){this.$get=ia(C)}function Pd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,k,h,l;try{a=d.cookie||""}catch(m){a=""}if(a!==e)for(e=a,a=
1516 1721 e.split("; "),c={},k=0;k<a.length;k++)g=a[k],h=g.indexOf("="),0<h&&(l=b(g.substring(0,h)),z(c[l])&&(c[l]=b(g.substring(h+1))));return c}}function kg(){this.$get=Pd}function dd(a){function b(d,c){if(D(d)){var e={};r(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Qd);b("date",Rd);b("filter",Xg);b("json",Yg);b("limitTo",Zg);b("lowercase",$g);b("number",Sd);b("orderBy",
1517 1722 Td);b("uppercase",ah)}function Xg(){return function(a,b,d,c){if(!ya(a)){if(null==a)return a;throw F("filter")("notarray",a);}c=c||"$";var e;switch(Dc(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=bh(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a,b)}}function bh(a,b,d,c){var e=D(a)&&d in a;!0===b?b=va:B(b)||(b=function(a,b){if(z(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!bc(a))return!1;a=K(""+a);b=K(""+
1518 1723 b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?Fa(f,a[d],b,d,!1):Fa(f,a,b,d,c)}}function Fa(a,b,d,c,e,f){var g=Dc(a),k=Dc(b);if("string"===k&&"!"===b.charAt(0))return!Fa(a,b.substring(1),d,c,e);if(H(a))return a.some(function(a){return Fa(a,b,d,c,e)});switch(g){case "object":var h;if(e){for(h in a)if(h.charAt&&"$"!==h.charAt(0)&&Fa(a[h],b,d,c,!0))return!0;return f?!1:Fa(a,b,d,c,!1)}if("object"===k){for(h in b)if(f=b[h],!B(f)&&!z(f)&&(g=h===c,!Fa(g?a:a[h],f,d,c,g,g)))return!1;return!0}return d(a,
1519 1724 b);case "function":return!1;default:return d(a,b)}}function Dc(a){return null===a?"null":typeof a}function Qd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){z(c)&&(c=b.CURRENCY_SYM);z(e)&&(e=b.PATTERNS[1].maxFrac);var f=c?/\u00A4/g:/\s*\u00A4\s*/g;return null==a?a:Ud(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(f,c)}}function Sd(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Ud(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function ch(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Vd))&&
1520 1725 (a=a.replace(Vd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Ec;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Ec;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Wd&&(d=d.splice(0,Wd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function dh(a,b,d,c){var e=a.d,f=e.length-a.i;b=z(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=
1521 1726 1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Ud(a,b,d,c,e){if(!A(a)&&!W(a)||isNaN(a))return"";var f=!isFinite(a),g=!1,k=Math.abs(a)+"",h="";if(f)h="\u221e";else{g=ch(k);dh(g,e,b.minFrac,b.maxFrac);h=g.d;k=g.i;e=g.e;f=[];for(g=h.reduce(function(a,b){return a&&!b},
1522 1727 !0);0>k;)h.unshift(0),k++;0<k?f=h.splice(k,h.length):(f=h,h=[0]);k=[];for(h.length>=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+h+b.posSuf}function Ob(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=Ec+a;d&&(a=a.substr(a.length-b));return e+a}function ea(a,
1523 1728 b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12===d&&(f=12);return Ob(f,b,c,e)}}function kb(a,b,d){return function(c,e){var f=c["get"+a](),g=ub((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Xd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Yd(a){return function(b){var d=Xd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Ob(b,a)}}function Fc(a,b){return 0>=
1524 1729 a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Rd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,
1525 1730 d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;A(c)&&(c=eh.test(c)?fa(c):b(c));W(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=fh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=ec(f,m),c=fc(c,f,!0));r(k,function(b){h=gh[b];g+=h?h(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Yg(){return function(a,b){z(b)&&(b=2);return eb(a,b)}}function Zg(){return function(a,
1526 1731 b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(X(b))return a;W(a)&&(a=a.toString());if(!ya(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Gc(a,d,d+b):0===d?Gc(a,b,a.length):Gc(a,Math.max(0,d+b),d)}}function Gc(a,b,d){return A(a)?a.slice(b,d):Ha.call(a,b,d)}function Td(a){function b(b){return b.map(function(b){var c=1,d=Ta;if(B(b))d=b;else if(A(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=
1527 1732 d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c=h<l?-1:1)}else c="undefined"===d?1:"undefined"===h?-1:"null"===d?1:"null"===h?-1:d<h?-1:1;return c}return function(a,f,g,k){if(null==a)return a;if(!ya(a))throw F("orderBy")("notarray",
1528 1733 a);H(f)||(f=[f]);0===f.length&&(f=["+"]);var h=b(f),l=g?-1:1,m=B(k)?k:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:h.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="null";else if("object"===c)a:{if(B(e.valueOf)&&(e=e.valueOf(),d(e)))break a;bc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var d=0,e=h.length;d<e;d++){var f=m(a.predicateValues[d],b.predicateValues[d]);if(f)return f*
1529 1734 h[d].descending*l}return(m(a.tieBreaker,b.tieBreaker)||c(a.tieBreaker,b.tieBreaker))*l});return a=a.map(function(a){return a.value})}}function Ra(a){B(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ia(a)}function Pb(a,b,d,c,e){this.$$controls=[];this.$error={};this.$$success={};this.$pending=void 0;this.$name=e(b.name||b.ngForm||"")(d);this.$dirty=!1;this.$valid=this.$pristine=!0;this.$submitted=this.$invalid=!1;this.$$parentForm=lb;this.$$element=a;this.$$animate=c;Zd(this)}function Zd(a){a.$$classCache=
1530 1735 {};a.$$classCache[$d]=!(a.$$classCache[mb]=a.$$element.hasClass(mb))}function ae(a){function b(a,b,c){c&&!a.$$classCache[b]?(a.$$animate.addClass(a.$$element,b),a.$$classCache[b]=!0):!c&&a.$$classCache[b]&&(a.$$animate.removeClass(a.$$element,b),a.$$classCache[b]=!1)}function d(a,c,d){c=c?"-"+Vc(c,"-"):"";b(a,mb+c,!0===d);b(a,$d+c,!1===d)}var c=a.set,e=a.unset;a.clazz.prototype.$setValidity=function(a,g,k){z(g)?(this.$pending||(this.$pending={}),c(this.$pending,a,k)):(this.$pending&&e(this.$pending,
1531 1736 a,k),be(this.$pending)&&(this.$pending=void 0));Ga(g)?g?(e(this.$error,a,k),c(this.$$success,a,k)):(c(this.$error,a,k),e(this.$$success,a,k)):(e(this.$error,a,k),e(this.$$success,a,k));this.$pending?(b(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,d(this,"",null)):(b(this,"ng-pending",!1),this.$valid=be(this.$error),this.$invalid=!this.$valid,d(this,"",this.$valid));g=this.$pending&&this.$pending[a]?void 0:this.$error[a]?!1:this.$$success[a]?!0:null;d(this,a,g);this.$$parentForm.$setValidity(a,
1532 1737 g,this)}}function be(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Hc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function Sa(a,b,d,c,e,f){var g=K(b[0].type);if(!e.android){var k=!1;b.on("compositionstart",function(){k=!0});b.on("compositionupdate",function(a){if(z(a.data)||""===a.data)k=!1});b.on("compositionend",function(){k=!1;l()})}var h,l=function(a){h&&(f.defer.cancel(h),h=null);if(!k){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&
1533 1738 "false"===d.ngTrim||(e=U(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){h||(h=f.defer(function(){h=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ce[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,
1534 1739 c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Qb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(A(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(hh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),
1535 1740 ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),e=new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0),100>f.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function nb(a,b,d,c){return function(e,f,g,k,h,l,m,p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Sc(b,ec(v)));var e=d(a,
1536 1741 b);!isNaN(e)&&c&&(e=fc(e,c));return e}Ic(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw ob("datefmt",a);if(n(a)){q=a;var b=k.$options.getOption("timezone");b&&(v=b,q=fc(q,b,!0));var d=c;t&&A(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,
1537 1742 d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),B=s(x);k.$validators.min=function(a){return!n(a)||z(B)||d(a)>=B};g.$observe("min",function(a){a!==x&&(B=s(a),x=a,k.$validate())})}if(w(g.max)||g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||z(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Ic(a,b,d,
1538 1743 c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function de(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(ih.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!W(b))throw ob("numfmt",b);b=b.toString()}return b})}function na(a){w(a)&&!W(a)&&(a=parseFloat(a));return X(a)?void 0:a}function Jc(a){var b=a.toString(),
1539 1744 d=b.indexOf(".");return-1===d?-1<a&&1>a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ee(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Jc(a):0,k=e?Jc(b):0,h=f?Jc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function fe(a,b,d,c,e){if(w(c)){a=a(c);if(!a.constant)throw ob("constexpr",d,c);return a(b)}return e}function Kc(a,b){function d(a,b){if(!a||!a.length)return[];
1540 1745 if(!b||!b.length)return a;var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e===b[m])continue a;c.push(e)}return c}function c(a){if(!a)return a;var b=a;H(a)?b=a.map(c).join(" "):D(a)?b=Object.keys(a).filter(function(b){return a[b]}).join(" "):A(a)||(b=a+"");return b}a="ngClass"+a;var e;return["$parse",function(f){return{restrict:"AC",link:function(g,k,h){function l(a,b){var c=[];r(a,function(a){if(0<b||p[a])p[a]=(p[a]||0)+b,p[a]===+(0<b)&&c.push(a)});return c.join(" ")}function m(a){if(a===
1541 1746 b){var c=s,c=l(c&&c.split(" "),1);h.$addClass(c)}else c=s,c=l(c&&c.split(" "),-1),h.$removeClass(c);n=a}var p=k.data("$classCounts"),n=!0,s;p||(p=T(),k.data("$classCounts",p));"ngClass"!==a&&(e||(e=f("$index",function(a){return a&1})),g.$watch(e,m));g.$watch(f(h[a],c),function(a){if(n===b){var c=s&&s.split(" "),e=a&&a.split(" "),f=d(c,e),c=d(e,c),f=l(f,-1),c=l(c,1);h.$addClass(c);h.$removeClass(f)}s=a})}}}]}function qd(a,b,d,c,e,f){return{restrict:"A",compile:function(g,k){var h=a(k[c]);return function(a,
1542 1747 c){c.on(e,function(c){var e=function(){h(a,{$event:c})};if(b.$$phase)if(f)a.$evalAsync(e);else try{e()}catch(g){d(g)}else a.$apply(e)})}}}}function Rb(a,b,d,c,e,f,g,k,h){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=
1543 1748 void 0;this.$name=h(d.name||"",!1)(a);this.$$parentForm=lb;this.$options=Sb;this.$$updateEvents="";this.$$updateEventHandler=this.$$updateEventHandler.bind(this);this.$$parsedNgModel=e(d.ngModel);this.$$parsedNgModelAssign=this.$$parsedNgModel.assign;this.$$ngModelGet=this.$$parsedNgModel;this.$$ngModelSet=this.$$parsedNgModelAssign;this.$$pendingDebounce=null;this.$$parserValid=void 0;this.$$parserName="parse";this.$$currentValidationRunId=0;this.$$scope=a;this.$$rootScope=a.$root;this.$$attr=d;
1544 1749 this.$$element=c;this.$$animate=f;this.$$timeout=g;this.$$parse=e;this.$$q=k;this.$$exceptionHandler=b;Zd(this);jh(this)}function jh(a){a.$$scope.$watch(function(b){b=a.$$ngModelGet(b);b===a.$modelValue||a.$modelValue!==a.$modelValue&&b!==b||a.$$setModelValue(b);return b})}function Lc(a){this.$$options=a}function ge(a,b){r(b,function(b,c){w(a[c])||(a[c]=b)})}function Oa(a,b){a.prop("selected",b);a.attr("selected",b)}function he(a,b,d){if(a){A(a)&&(a=new RegExp("^"+a+"$"));if(!a.test)throw F("ngPattern")("noregexp",
1545 1750 b,a,za(d));return a}}function Tb(a){a=fa(a);return X(a)?-1:a}var Wb={objectMaxDepth:5,urlErrorParamsEnabled:!0},ie=/^\/(.+)\/([a-z]*)$/,ta=Object.prototype.hasOwnProperty,K=function(a){return A(a)?a.toLowerCase():a},ub=function(a){return A(a)?a.toUpperCase():a},Ca,x,rb,Ha=[].slice,Fg=[].splice,kh=[].push,la=Object.prototype.toString,Pc=Object.getPrototypeOf,pa=F("ng"),ca=C.angular||(C.angular={}),kc,pb=0;Ca=C.document.documentMode;var X=Number.isNaN||function(a){return a!==a};E.$inject=[];Ta.$inject=
1546 1751 [];var ve=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,U=function(a){return A(a)?a.trim():a},Md=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Aa=function(){if(!w(Aa.rules)){var a=C.document.querySelector("[ng-csp]")||C.document.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Aa.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==
1547 1752 b.indexOf("no-inline-style")}}else{a=Aa;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Aa.rules},qb=function(){if(w(qb.name_))return qb.name_;var a,b,d=Qa.length,c,e;for(b=0;b<d;++b)if(c=Qa[b],a=C.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return qb.name_=e},xe=/:/g,Qa=["ng-","data-ng-","ng:","x-ng-"],Be=function(a){var b=a.currentScript;if(!b)return!0;if(!(b instanceof C.HTMLScriptElement||b instanceof C.SVGScriptElement))return!1;
1548 1753 b=b.attributes;return[b.getNamedItem("src"),b.getNamedItem("href"),b.getNamedItem("xlink:href")].every(function(b){if(!b)return!0;if(!b.value)return!1;var c=a.createElement("a");c.href=b.value;if(a.location.origin===c.origin)return!0;switch(c.protocol){case "http:":case "https:":case "ftp:":case "blob:":case "file:":case "data:":return!0;default:return!1}})}(C.document),Ee=/[A-Z]/g,Wc=!1,Pa=3,Ke={full:"1.7.7",major:1,minor:7,dot:7,codeName:"kingly-exiting"};Y.expando="ng339";var Ka=Y.cache={},pg=
1549 1754 1;Y._data=function(a){return this.cache[a[this.expando]]||{}};var lg=/-([a-z])/g,lh=/^-ms-/,Ab={mouseleave:"mouseout",mouseenter:"mouseover"},nc=F("jqLite"),og=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,mc=/<|&#?\w+;/,mg=/<([\w:-]+)/,ng=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,oa={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>",
1550 1755 "</tr></tbody></table>"],_default:[0,"",""]};oa.optgroup=oa.option;oa.tbody=oa.tfoot=oa.colgroup=oa.caption=oa.thead;oa.th=oa.td;var ug=C.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=Y.prototype={ready:fd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:kh,sort:[].sort,splice:[].splice},Gb={};r("multiple selected checked disabled readOnly required open".split(" "),
1551 1756 function(a){Gb[K(a)]=a});var md={};r("input select option textarea button form details".split(" "),function(a){md[a]=!0});var td={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:rc,removeData:qc,hasData:function(a){for(var b in Ka[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)qc(a[b]),id(a[b])}},function(a,b){Y[b]=a});r({data:rc,inheritedData:Eb,scope:function(a){return x.data(a,"$scope")||Eb(a.parentNode||
1552 1757 a,["$isolateScope","$scope"])},isolateScope:function(a){return x.data(a,"$isolateScope")||x.data(a,"$isolateScopeNoTemplate")},controller:jd,injector:function(a){return Eb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Bb,css:function(a,b,d){b=xb(b.replace(lh,"ms-"));if(w(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Pa&&2!==c&&8!==c&&a.getAttribute){var c=K(b),e=Gb[c];if(w(d))null===d||!1===d&&e?a.removeAttribute(b):a.setAttribute(b,
1553 1758 e?c:d);else return a=a.getAttribute(b),e&&null!==a&&(a=c),null===a?void 0:a}},prop:function(a,b,d){if(w(d))a[b]=d;else return a[b]},text:function(){function a(a,d){if(z(d)){var c=a.nodeType;return 1===c||c===Pa?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(z(b)){if(a.multiple&&"select"===ua(a)){var d=[];r(a.options,function(a){a.selected&&d.push(a.value||a.text)});return d}return a.value}a.value=b},html:function(a,b){if(z(b))return a.innerHTML;yb(a,!0);a.innerHTML=b},
1554 1759 empty:kd},function(a,b){Y.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==kd&&z(2===a.length&&a!==Bb&&a!==jd?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===rc)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=z(e)?Math.min(g,1):g;for(f=0;f<g;f++){var k=a(this[f],b,c);e=e?e+k:k}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});r({removeData:qc,on:function(a,b,d,c){if(w(c))throw nc("onargs");if(lc(a)){c=zb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=rg(a,e));c=0<=b.indexOf(" ")?
1555 1760 b.split(" "):[b];for(var g=c.length,k=function(b,c,g){var k=e[b];k||(k=e[b]=[],k.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,f));k.push(d)};g--;)b=c[g],Ab[b]?(k(Ab[b],tg),k(b,void 0,!0)):k(b)}},off:id,one:function(a,b,d){a=x(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;yb(a);r(new Y(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];r(a.childNodes,function(a){1===
1556 1761 a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===d){b=new Y(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;r(new Y(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){var d=x(b).eq(0).clone()[0],c=a.parentNode;c&&c.replaceChild(d,a);d.appendChild(a)},remove:Fb,detach:function(a){Fb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;
1557 1762 if(c){b=new Y(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Db,removeClass:Cb,toggleClass:function(a,b,d){b&&r(b.split(" "),function(b){var e=d;z(e)&&(e=!Bb(a,b));(e?Db:Cb)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:pc,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=zb(a);if(g=(g=g&&g.events)&&
1558 1763 g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:E,type:f,target:a},b.type&&(c=S(c,b)),b=ja(g),e=d?[c].concat(d):[c],r(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){Y.prototype[b]=function(b,c,e){for(var f,g=0,k=this.length;g<
1559 1764 k;g++)z(f)?(f=a(this[g],b,c,e),w(f)&&(f=x(f))):oc(f,a(this[g],b,c,e));return w(f)?f:this}});Y.prototype.bind=Y.prototype.on;Y.prototype.unbind=Y.prototype.off;var mh=Object.create(null);nd.prototype={_idx:function(a){a!==this._lastKey&&(this._lastKey=a,this._lastIndex=this._keys.indexOf(a));return this._lastIndex},_transformKey:function(a){return X(a)?mh:a},get:function(a){a=this._transformKey(a);a=this._idx(a);if(-1!==a)return this._values[a]},has:function(a){a=this._transformKey(a);return-1!==this._idx(a)},
1560 1765 set:function(a,b){a=this._transformKey(a);var d=this._idx(a);-1===d&&(d=this._lastIndex=this._keys.length);this._keys[d]=a;this._values[d]=b},delete:function(a){a=this._transformKey(a);a=this._idx(a);if(-1===a)return!1;this._keys.splice(a,1);this._values.splice(a,1);this._lastKey=NaN;this._lastIndex=-1;return!0}};var Hb=nd,jg=[function(){this.$get=[function(){return Hb}]}],wg=/^([^(]+?)=>/,xg=/^[^(]*\(\s*([^)]*)\)/m,nh=/,/,oh=/^\s*(_?)(\S+?)\1\s*$/,vg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ba=F("$injector");
1561 1766 fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw A(d)&&d||(d=a.name||yg(a)),Ba("strictdi",d);b=od(a);r(b[1].split(nh),function(a){a.replace(oh,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,sb(a[b],"fn"),c=a.slice(0,b)):sb(a,"fn",!0);return c};var je=F("$animate"),zf=function(){this.$get=E},Af=function(){var a=new Hb,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=A(b)?b.split(" "):
1562 1767 H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=zg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Db(a,e);f&&Cb(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g,k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),
1563 1768 k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},xf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw je("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g,d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?
1564 1769 a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,je("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){e=f;break a}}e=void 0}!e||e.parentNode||e.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.cancel&&a.cancel()},enter:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,
1565 1770 "enter",ra(l))},move:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"move",ra(l))},leave:function(b,c){return a.push(b,"leave",ra(c),function(){b.remove()})},addClass:function(b,c,d){d=ra(d);d.addClass=hb(d.addclass,c);return a.push(b,"addClass",d)},removeClass:function(b,c,d){d=ra(d);d.removeClass=hb(d.removeClass,c);return a.push(b,"removeClass",d)},setClass:function(b,c,d,f){f=ra(f);f.addClass=hb(f.addClass,c);f.removeClass=hb(f.removeClass,d);return a.push(b,"setClass",
1566 1771 f)},animate:function(b,c,d,f,m){m=ra(m);m.from=m.from?S(m.from,c):c;m.to=m.to?S(m.to,d):d;m.tempClasses=hb(m.tempClasses,f||"ng-inline-animate");return a.push(b,"animate",m)}}}]}],Cf=function(){this.$get=["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a=!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},Bf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(a,
1567 1772 b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){c()?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;r(a,function(a){a.done(c)})};f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:E,getPromise:function(){if(!this.promise){var b=
1568 1773 this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},
1569 1774 complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(r(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return f}]},yf=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&&(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);k||
1570 1775 h.complete();k=!0});return h}var g=e||{};g.$$prepared||(g=Ia(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var k,h=new d;return{start:f,end:f}}}]},$=F("$compile"),tc=new function(){};Xc.$inject=["$provide","$$sanitizeUriProvider"];Jb.prototype.isFirstChange=function(){return this.previousValue===tc};var pd=/^((?:x|data)[:\-_])/i,Eg=/[:\-_]+(.)/g,vd=F("$controller"),ud=/^(\S+)(\s+as\s+([\w$]+))?$/,Jf=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&
1571 1776 b instanceof x&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},wd="application/json",wc={"Content-Type":wd+";charset=utf-8"},Hg=/^\[|^\{(?!\{)/,Ig={"[":/]$/,"{":/}$/},Gg=/^\)]\}',?\n/,Kb=F("$http"),Ma=ca.$interpolateMinErr=F("$interpolate");Ma.throwNoconcat=function(a){throw Ma("noconcat",a);};Ma.interr=function(a,b){return Ma("interr",a,b.toString())};var Lg=F("$interval"),Sf=function(){this.$get=function(){function a(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var b=ca.callbacks,
1572 1777 d={};return{createCallback:function(c){c="_"+(b.$$counter++).toString(36);var e="angular.callbacks."+c,f=a(c);d[e]=b[c]=f;return e},wasCalled:function(a){return d[a].called},getResponse:function(a){return d[a].data},removeCallback:function(a){delete b[d[a].id];delete d[a]}}}},ph=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Mg={http:80,https:443,ftp:21},jb=F("$location"),Ng=/^\s*[\\/]{2,}/,qh={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){for(var a=this.$$path,b=this.$$hash,d=ye(this.$$search),b=b?
1573 1778 "#"+hc(b):"",a=a.split("/"),c=a.length;c--;)a[c]=hc(a[c].replace(/%2F/g,"/"));this.$$url=a.join("/")+(d?"?"+d:"")+b;this.$$absUrl=this.$$normalizeUrl(this.$$url);this.$$urlUpdatedByLocation=!0},absUrl:Lb("$$absUrl"),url:function(a){if(z(a))return this.$$url;var b=ph.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Lb("$$protocol"),host:Lb("$$host"),port:Lb("$$port"),path:Dd("$$path",function(a){a=null!==
1574 1779 a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(A(a)||W(a))a=a.toString(),this.$$search=gc(a);else if(D(a))a=Ia(a,{}),r(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw jb("isrcharg");break;default:z(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:Dd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};
1575 1780 r([Cd,zc,yc],function(a){a.prototype=Object.create(qh);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==yc||!this.$$html5)throw jb("nostate");this.$$state=z(b)?null:b;this.$$urlUpdatedByLocation=!0;return this}});var Ya=F("$parse"),Rg={}.constructor.prototype.valueOf,Ub=T();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Ub[a]=!0});var rh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Nb=function(a){this.options=a};Nb.prototype={constructor:Nb,
1576 1781 lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Ub[b],e=Ub[d];Ub[a]||
1577 1782 c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?
1578 1783 this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):
1579 1784 (a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<
1580 1785 this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<
1581 1786 this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,
1582 1787 16))):d+=rh[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var q=function(a,b){this.lexer=a;this.options=b};q.Program="Program";q.ExpressionStatement="ExpressionStatement";q.AssignmentExpression="AssignmentExpression";q.ConditionalExpression="ConditionalExpression";q.LogicalExpression="LogicalExpression";q.BinaryExpression="BinaryExpression";q.UnaryExpression="UnaryExpression";
1583 1788 q.CallExpression="CallExpression";q.MemberExpression="MemberExpression";q.Identifier="Identifier";q.Literal="Literal";q.ArrayExpression="ArrayExpression";q.Property="Property";q.ObjectExpression="ObjectExpression";q.ThisExpression="ThisExpression";q.LocalsExpression="LocalsExpression";q.NGValueParameter="NGValueParameter";q.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},
1584 1789 program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:q.Program,body:a}},expressionStatement:function(){return{type:q.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();if(this.expect("=")){if(!Hd(a))throw Ya("lval");
1585 1790 a={type:q.AssignmentExpression,left:a,right:this.assignment(),operator:"="}}return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:q.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:q.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a=
1586 1791 {type:q.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,
1587 1792 operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?
1588 1793 a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):
1589 1794 "["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))
1590 1795 }return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;
1591 1796 b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");
1592 1797 return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,
1593 1798 e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Fd=2;Jd.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Id(a))this.state.computing=
1594 1799 "assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Gd(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage="main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+
1595 1800 d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Og,Pg,Ed);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,
1596 1801 b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,
1597 1802 this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,
1598 1803 void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right,b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,
1599 1804 b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)),h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",
1600 1805 a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b,m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,
1601 1806 a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)):(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant?
1602 1807 void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context,g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b,
1603 1808 a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId();h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0:
1604 1809 h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,
1605 1810 b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},
1606 1811 not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=
1607 1812 this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(A(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(W(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a,
1608 1813 b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Kd.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Id(a))c=this.recurse(d);d=Gd(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body,function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=
1609 1814 d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),
1610 1815 this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),
1611 1816 a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n<g.length;++n)p.push(g[n](a,c,d,f));a=e.apply(void 0,p,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,f){var p=e(a,c,d,f),n;if(null!=p.value){n=[];for(var s=0;s<g.length;++s)n.push(g[s](a,c,d,f));n=p.value.apply(p.context,n)}return b?{value:n}:n};case q.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,f,g){var p=
1612 1817 c(a,d,f,g);a=e(a,d,f,g);p.context[p.name]=a;return b?{value:a}:a};case q.ArrayExpression:return g=[],r(a.elements,function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case q.ObjectExpression:return g=[],r(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}):g.push({key:a.key.type===q.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,
1613 1818 c,d,e){for(var f={},n=0;n<g.length;++n)g[n].computed?f[g[n].key(a,c,d,e)]=g[n].value(a,c,d,e):f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case q.ThisExpression:return function(a){return b?{value:a}:a};case q.LocalsExpression:return function(a,c){return b?{value:c}:c};case q.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,
1614 1819 e,f);d=w(d)?-d:-0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=Ed(k,c);return d?{value:k}:k}},"binary-":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=(w(k)?k:0)-(w(c)?c:0);return d?{value:k}:k}},"binary*":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,
1615 1820 e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,
1616 1821 e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=
1617 1822 a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c=e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:
1618 1823 e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};Mb.prototype={constructor:Mb,parse:function(a){a=this.getAst(a);var b=
1619 1824 this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a),oneTime:b}}};var Ea=F("$sce"),V={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",
1620 1825 JS:"js"},Cc=/_([a-z])/g,Ug=F("$templateRequest"),Vg=F("$timeout"),aa=C.document.createElement("a"),Od=ga(C.location.href),Na;aa.href="http://[::1]";var Wg="[::1]"===aa.hostname;Pd.$inject=["$document"];dd.$inject=["$provide"];var Wd=22,Vd=".",Ec="0";Qd.$inject=["$locale"];Sd.$inject=["$locale"];var gh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0),MMMM:kb("Month"),MMM:kb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:kb("Month",!1,!0),dd:ea("Date",2),
1621 1826 d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:kb("Day"),EEE:kb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Ob(Math[0<a?"floor":"ceil"](a/60),2)+Ob(Math.abs(a%60),2))},ww:Yd(2),w:Yd(1),G:Fc,GG:Fc,GGG:Fc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},
1622 1827 fh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,eh=/^-?\d+$/;Rd.$inject=["$locale"];var $g=ia(K),ah=ia(ub);Td.$inject=["$parse"];var Me=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),vb={};r(Gb,function(a,b){function d(a,d,e){a.$watch(e[c],
1623 1828 function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=wa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});vb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(td,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ie))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=wa("ng-"+a);vb[b]=
1624 1829 ["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),Ca&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var lb={$addControl:E,$getControls:ia([]),$$renameControl:function(a,b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Pb.$inject=
1625 1830 ["$element","$attrs","$scope","$animate","$interpolate"];Pb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)},$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&
1626 1831 this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=lb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,
1627 1832 Za,Vb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==lb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ae({clazz:Pb,set:function(a,
1628 1833 b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var ke=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Pb,compile:function(d,f){d.addClass(Za).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();
1629 1834 p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))}));d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,lb)})}}}}}]},Ne=ke(),Ze=ke(!0),hh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,
1630 1835 sh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,th=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,ih=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,le=/^(\d{4,})-(\d{2})-(\d{2})$/,me=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Mc=/^(\d{4,})-W(\d\d)$/,ne=/^(\d{4,})-(\d\d)$/,
1631 1836 oe=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ce=T();r(["date","datetime-local","month","time","week"],function(a){ce[a]=!0});var pe={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c)},date:nb("date",le,Qb(le,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":nb("datetimelocal",me,Qb(me,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:nb("time",oe,Qb(oe,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:nb("week",Mc,function(a,b){if(ha(a))return a;if(A(a)){Mc.lastIndex=0;var d=Mc.exec(a);
1632 1837 if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Xd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:nb("month",ne,Qb(ne,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Ic(a,b,d,c,"number");de(c);Sa(a,b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||z(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),
1633 1838 l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||z(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)||z(s)||ee(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.url=function(a,b){var d=
1634 1839 a||b;return c.$isEmpty(d)||sh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Hc(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||th.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==U(d.ngTrim);z(d.name)&&b.attr("name",++pb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g=U(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=U(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,
1635 1840 c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);X(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);X(c.$modelValue)||(m?(a=b.val(),n<a&&(b.val(n),a=n<p?p:n),c.$setViewValue(a)):c.$validate())}function l(a){s=na(a);X(c.$modelValue)||(m?c.$viewValue!==b.val()&&c.$setViewValue(b.val()):c.$validate())}Ic(a,b,d,c,"range");de(c);Sa(a,b,d,c,e,f);var m=c.$$hasNativeValidators&&"range"===b[0].type,p=m?
1636 1841 0:void 0,n=m?100:void 0,s=m?1:void 0,r=b[0].validity;a=w(d.min);e=w(d.max);f=w(d.step);var q=c.$render;c.$render=m&&w(r.rangeUnderflow)&&w(r.rangeOverflow)?function(){q();c.$setViewValue(b.val())}:q;a&&(p=na(d.min),c.$validators.min=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||z(p)||b>=p},g("min",k));e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||z(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:
1637 1842 function(a,b){return c.$isEmpty(b)||z(s)||ee(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=fe(k,a,"ngTrueValue",d.ngTrueValue,!0),l=fe(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},Yc=["$browser","$sniffer",
1638 1843 "$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(pe[K(g.type)]||pe.text)(e,f,g,k[0],b,a,d,c)}}}}],vf=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}};return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&&
1639 1844 Object.defineProperty(b,"value",a)}}}}},uh=/^(true|false|\d+)$/,sf=function(){function a(a,d,c){var e=w(c)?c:9===Ca?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return uh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue,function(b){a(d,f,b)})}}}},Re=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];
1640 1845 b.$watch(e.ngBind,function(a){c.textContent=ic(a)})}}}}],Te=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=z(a)?"":a})}}}}],Se=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);
1641 1846 return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],rf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ue=Kc("",!0),We=Kc("Odd",0),Ve=Kc("Even",1),Xe=Ra({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Ye=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],cd={},vh={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),
1642 1847 function(a){var b=wa("ng-"+a);cd[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return qd(d,c,e,b,a,vh[a])}]});var af=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=tb(k.clone),
1643 1848 a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],bf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1===
1644 1849 a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],uf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?
1645 1850 (d.empty(),a(ed(e.template,C.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],cf=Ra({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),qf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!z(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});
1646 1851 c.$isEmpty=function(a){return!a||!a.length}}}},mb="ng-valid",$d="ng-invalid",Za="ng-pristine",Vb="ng-dirty",ob=F("ngModel");Rb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");Rb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet=
1647 1852 function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw ob("nonassign",this.$$attr.ngModel,za(this.$$element));},$render:E,$isEmpty:function(a){return z(a)||""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,
1648 1853 "ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Vb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element,Vb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=
1649 1854 !0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!X(this.$modelValue)){var a=this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==
1650 1855 c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!B(h.then))throw ob("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&
1651 1856 h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(z(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a,b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==
1652 1857 a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid=z(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;d<this.$parsers.length;d++)if(a=this.$parsers[d](a),z(a)){this.$$parserValid=!1;break}X(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));
1653 1858 var c=this.$modelValue,e=this.$options.getOption("allowInvalid");this.$$rawModelValue=a;e&&(this.$modelValue=a,b.$modelValue!==c&&b.$$writeModelToScope());this.$$runValidators(a,this.$$lastCommittedViewValue,function(d){e||(b.$modelValue=d?a:void 0,b.$modelValue!==c&&b.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue);r(this.$viewChangeListeners,function(a){try{a()}catch(b){this.$$exceptionHandler(b)}},this)},$setViewValue:function(a,b){this.$viewValue=
1654 1859 a;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(b)},$$debounceViewValueCommit:function(a){var b=this.$options.getOption("debounce");W(b[a])?b=b[a]:W(b["default"])&&-1===this.$options.getOption("updateOn").indexOf(a)?b=b["default"]:W(b["*"])&&(b=b["*"]);this.$$timeout.cancel(this.$$pendingDebounce);var d=this;0<b?this.$$pendingDebounce=this.$$timeout(function(){d.$commitViewValue()},b):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){d.$commitViewValue()})},
1655 1860 $overrideModelOptions:function(a){this.$options=this.$options.createChild(a);this.$$setUpdateOnEvents()},$processModelValue:function(){var a=this.$$format();this.$viewValue!==a&&(this.$$updateEmptyClasses(a),this.$viewValue=this.$$lastCommittedViewValue=a,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,E))},$$format:function(){for(var a=this.$formatters,b=a.length,d=this.$modelValue;b--;)d=a[b](d);return d},$$setModelValue:function(a){this.$modelValue=this.$$rawModelValue=a;this.$$parserValid=
1656 1861 void 0;this.$processModelValue()},$$setUpdateOnEvents:function(){this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler);if(this.$$updateEvents=this.$options.getOption("updateOn"))this.$$element.on(this.$$updateEvents,this.$$updateEventHandler)},$$updateEventHandler:function(a){this.$$debounceViewValueCommit(a&&a.type)}};ae({clazz:Rb,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]}});var pf=["$rootScope",function(a){return{restrict:"A",require:["ngModel",
1657 1862 "^?form","^?ngModelOptions"],controller:Rb,priority:1,compile:function(b){b.addClass(Za).addClass("ng-untouched").addClass(mb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;if(f=f[2])g.$options=f.$options;g.$$initGetterSetters();b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){function g(){k.$setTouched()}var k=f[0];k.$$setUpdateOnEvents();c.on("blur",
1658 1863 function(){k.$touched||(a.$$phase?b.$evalAsync(g):b.$apply(g))})}}}}}],Sb,wh=/(\s+|^)default(\s+|$)/;Lc.prototype={getOption:function(a){return this.$$options[a]},createChild:function(a){var b=!1;a=S({},a);r(a,function(d,c){"$inherit"===d?"*"===c?b=!0:(a[c]=this.$$options[c],"updateOn"===c&&(a.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===c&&(a.updateOnDefault=!1,a[c]=U(d.replace(wh,function(){a.updateOnDefault=!0;return" "})))},this);b&&(delete a["*"],ge(a,this.$$options));ge(a,Sb.$$options);
1659 1864 return new Lc(a)}};Sb=new Lc({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var tf=function(){function a(a,d){this.$$attrs=a;this.$$scope=d}a.$inject=["$attrs","$scope"];a.prototype={$onInit:function(){var a=this.parentCtrl?this.parentCtrl.$options:Sb,d=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=a.createChild(d)}};return{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:a}},df=Ra({terminal:!0,
1660 1865 priority:1E3}),xh=F("ngOptions"),yh=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,nf=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!r&&ya(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&
1661 1866 "$"!==c.charAt(0)&&b.push(c)}return b}var p=a.match(yh);if(!p)throw xh("iexp",a,za(b));var n=p[5]||p[7],r=p[6];a=/ as /.test(p[0])&&p[1];var q=p[9];b=d(p[2]?p[1]:n);var t=a&&d(a)||b,w=q&&d(q),v=q?function(a,b){return w(c,b)}:function(a){return La(a)},x=function(a,b){return v(a,A(a,b))},z=d(p[2]||p[1]),y=d(p[3]||""),J=d(p[4]||""),I=d(p[8]),B={},A=r?function(a,b){B[r]=b;B[n]=a;return B}:function(a){B[n]=a;return B};return{trackBy:q,getTrackByValue:x,getWatchables:d(I,function(a){var b=[];a=a||[];for(var d=
1662 1867 f(a),e=d.length,g=0;g<e;g++){var k=a===d?g:d[g],l=a[k],k=A(l,k),l=v(l,k);b.push(l);if(p[2]||p[1])l=z(c,k),b.push(l);p[4]&&(k=J(c,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},d=I(c)||[],g=f(d),k=g.length,n=0;n<k;n++){var p=d===g?n:g[n],r=A(d[p],p),s=t(c,r),p=v(s,r),w=z(c,r),B=y(c,r),r=J(c,r),s=new e(p,s,w,B,r);a.push(s);b[p]=s}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[x(a)]},getViewValueFromOption:function(a){return q?Ia(a.viewValue):a.viewValue}}}}}
1663 1868 var e=C.document.createElement("option"),f=C.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=E},post:function(d,k,h,l){function m(a){var b=(a=v.getOptionFromViewValue(a))&&a.element;b&&!b.selected&&(b.selected=!0);return a}function p(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);b.value=a.selectValue}var n=l[0],q=l[1],z=h.multiple;l=0;for(var t=k.children(),
1664 1869 B=t.length;l<B;l++)if(""===t[l].value){n.hasEmptyOption=!0;n.emptyOption=t.eq(l);break}k.empty();l=!!n.emptyOption;x(e.cloneNode(!1)).val("?");var v,A=c(h.ngOptions,k,d),C=b[0].createDocumentFragment();n.generateUnknownOptionValue=function(a){return"?"};z?(n.writeValue=function(a){if(v){var b=a&&a.map(m)||[];v.items.forEach(function(a){a.element.selected&&-1===Array.prototype.indexOf.call(b,a)&&(a.element.selected=!1)})}},n.readValue=function(){var a=k.val()||[],b=[];r(a,function(a){(a=v.selectValueMap[a])&&
1665 1870 !a.disabled&&b.push(v.getViewValueFromOption(a))});return b},A.trackBy&&d.$watchCollection(function(){if(H(q.$viewValue))return q.$viewValue.map(function(a){return A.getTrackByValue(a)})},function(){q.$render()})):(n.writeValue=function(a){if(v){var b=k[0].options[k[0].selectedIndex],c=v.getOptionFromViewValue(a);b&&b.removeAttribute("selected");c?(k[0].value!==c.selectValue&&(n.removeUnknownOption(),k[0].value=c.selectValue,c.element.selected=!0),c.element.setAttribute("selected","selected")):n.selectUnknownOrEmptyOption(a)}},
1666 1871 n.readValue=function(){var a=v.selectValueMap[k.val()];return a&&!a.disabled?(n.unselectEmptyOption(),n.removeUnknownOption(),v.getViewValueFromOption(a)):null},A.trackBy&&d.$watch(function(){return A.getTrackByValue(q.$viewValue)},function(){q.$render()}));l&&(a(n.emptyOption)(d),k.prepend(n.emptyOption),8===n.emptyOption[0].nodeType?(n.hasEmptyOption=!1,n.registerOption=function(a,b){""===b.val()&&(n.hasEmptyOption=!0,n.emptyOption=b,n.emptyOption.removeClass("ng-scope"),q.$render(),b.on("$destroy",
1667 1872 function(){var a=n.$isEmptyOptionSelected();n.hasEmptyOption=!1;n.emptyOption=void 0;a&&q.$render()}))}):n.emptyOption.removeClass("ng-scope"));d.$watchCollection(A.getWatchables,function(){var a=v&&n.readValue();if(v)for(var b=v.items.length-1;0<=b;b--){var c=v.items[b];w(c.group)?Fb(c.element.parentNode):Fb(c.element)}v=A.getOptions();var d={};v.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);
1668 1873 var c=e.cloneNode(!1);b.appendChild(c);p(a,c)}else b=e.cloneNode(!1),C.appendChild(b),p(a,b)});k[0].appendChild(C);q.$render();q.$isEmpty(a)||(b=n.readValue(),(A.trackBy||z?va(a,b):a===b)||(q.$setViewValue(b),q.$render()))})}}}}],ef=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,k){function h(a){g.text(a||"")}var l=k.count,m=k.$attr.when&&g.attr(k.$attr.when),p=k.offset||0,n=f.$eval(m)||{},q={},w=b.startSymbol(),t=b.endSymbol(),x=w+l+"-"+
1669 1874 p+t,v=ca.noop,A;r(k,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+K(c[2]),n[c]=g.attr(k.$attr[b]))});r(n,function(a,d){q[d]=b(a.replace(c,x))});f.$watch(l,function(b){var c=parseFloat(b),e=X(c);e||c in n||(c=a.pluralCat(c-p));c===A||e&&X(A)||(v(),e=q[c],z(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),v=E,h()):v=f.$watch(e,h),A=c)})}}}],qe=F("ngRef"),ff=["$parse",function(a){return{priority:-1,restrict:"A",compile:function(b,d){var c=wa(ua(b)),e=a(d.ngRef),f=e.assign||
1670 1875 function(){throw qe("nonassign",d.ngRef);};return function(a,b,h){var l;if(h.hasOwnProperty("ngRefRead"))if("$element"===h.ngRefRead)l=b;else{if(l=b.data("$"+h.ngRefRead+"Controller"),!l)throw qe("noctrl",h.ngRefRead,d.ngRef);}else l=b.data("$"+c+"Controller");l=l||b;f(a,l);b.on("$destroy",function(){e(a)===l&&f(a,null)})}}}}],gf=["$parse","$animate","$compile",function(a,b,d){var c=F("ngRepeat"),e=function(a,b,c,d,e,f,g){a[c]=d;e&&(a[e]=f);a.$index=b;a.$first=0===b;a.$last=b===g-1;a.$middle=!(a.$first||
1671 1876 a.$last);a.$odd=!(a.$even=0===(b&1))},f=function(a,b,c){return La(c)},g=function(a,b){return b};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(k,h){var l=h.ngRepeat,m=d.$$createComment("end ngRepeat",l),p=l.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw c("iexp",l);var n=p[1],q=p[2],w=p[3],t=p[4],p=n.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!p)throw c("iidexp",
1672 1877 n);var x=p[3]||p[1],v=p[2];if(w&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(w)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(w)))throw c("badident",w);var z;if(t){var A={$id:La},y=a(t);z=function(a,b,c,d){v&&(A[v]=b);A[x]=c;A.$index=d;return y(a,A)}}return function(a,d,h,k,n){var p=T();a.$watchCollection(q,function(h){var k,q,t=d[0],s,y=T(),B,C,E,D,H,F,K;w&&(a[w]=h);if(ya(h))H=h,q=z||f;else for(K in q=z||g,H=[],h)ta.call(h,K)&&"$"!==K.charAt(0)&&H.push(K);
1673 1878 B=H.length;K=Array(B);for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],D=q(a,C,E,k),p[D])F=p[D],delete p[D],y[D]=F,K[k]=F;else{if(y[D])throw r(K,function(a){a&&a.scope&&(p[a.id]=a)}),c("dupes",l,D,E);K[k]={id:D,scope:void 0,clone:void 0};y[D]=!0}A&&(A[x]=void 0);for(s in p){F=p[s];D=tb(F.clone);b.leave(D);if(D[0].parentNode)for(k=0,q=D.length;k<q;k++)D[k].$$NG_REMOVED=!0;F.scope.$destroy()}for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],F=K[k],F.scope){s=t;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);F.clone[0]!==
1674 1879 s&&b.move(tb(F.clone),null,t);t=F.clone[F.clone.length-1];e(F.scope,k,x,E,v,C,B)}else n(function(a,c){F.scope=c;var d=m.cloneNode(!1);a[a.length++]=d;b.enter(a,null,t);t=d;F.clone=a;y[F.id]=F;e(F.scope,k,x,E,v,C,B)});p=y})}}}}],hf=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],$e=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,
1675 1880 d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],jf=Ra(function(a,b,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&(a||(a={}),r(d,function(b,d){null==a[d]&&(a[d]="")}));a&&b.css(a)})}),kf=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],k=[],h=[],l=[],m=function(a,b){return function(c){!1!==c&&a.splice(b,1)}};d.$watch(e.ngSwitch||
1676 1881 e.on,function(c){for(var d,e;h.length;)a.cancel(h.pop());d=0;for(e=l.length;d<e;++d){var q=tb(k[d].clone);l[d].$destroy();(h[d]=a.leave(q)).done(m(h,d))}k.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&r(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");k.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],lf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){a=d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function(a,
1677 1882 b,c){return c[b-1]!==a});r(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:e,element:b})})}}),mf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,element:b})}}),zh=F("ngTransclude"),of=["$compile",function(a){return{restrict:"EAC",compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,k){function h(){d(a,function(a){b.append(a)})}if(!k)throw zh("orphan",
1678 1883 za(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;k(function(a,c){var d;if(d=a.length)a:{d=0;for(var f=a.length;d<f;d++){var g=a[d];if(g.nodeType!==Pa||g.nodeValue.trim()){d=!0;break a}}d=void 0}d?b.append(a):(h(),c.$destroy())},null,f);f&&!k.isSlotFilled(f)&&h()}}}}],Oe=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],Ah={$setViewValue:E,$render:E},Bh=["$element",
1679 1884 "$scope",function(a,b){function d(){g||(g=!0,b.$$postDigest(function(){g=!1;e.ngModelCtrl.$render()}))}function c(a){k||(k=!0,b.$$postDigest(function(){b.$$destroyed||(k=!1,e.ngModelCtrl.$setViewValue(e.readValue()),a&&e.ngModelCtrl.$render())}))}var e=this,f=new Hb;e.selectValueMap={};e.ngModelCtrl=Ah;e.multiple=!1;e.unknownOption=x(C.document.createElement("option"));e.hasEmptyOption=!1;e.emptyOption=void 0;e.renderUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);
1680 1885 a.prepend(e.unknownOption);Oa(e.unknownOption,!0);a.val(b)};e.updateUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);Oa(e.unknownOption,!0);a.val(b)};e.generateUnknownOptionValue=function(a){return"? "+La(a)+" ?"};e.removeUnknownOption=function(){e.unknownOption.parent()&&e.unknownOption.remove()};e.selectEmptyOption=function(){e.emptyOption&&(a.val(""),Oa(e.emptyOption,!0))};e.unselectEmptyOption=function(){e.hasEmptyOption&&Oa(e.emptyOption,!1)};b.$on("$destroy",
1681 1886 function(){e.renderUnknownOption=E});e.readValue=function(){var b=a.val(),b=b in e.selectValueMap?e.selectValueMap[b]:b;return e.hasOption(b)?b:null};e.writeValue=function(b){var c=a[0].options[a[0].selectedIndex];c&&Oa(x(c),!1);e.hasOption(b)?(e.removeUnknownOption(),c=La(b),a.val(c in e.selectValueMap?c:b),Oa(x(a[0].options[a[0].selectedIndex]),!0)):e.selectUnknownOrEmptyOption(b)};e.addOption=function(a,b){if(8!==b[0].nodeType){Ja(a,'"option value"');""===a&&(e.hasEmptyOption=!0,e.emptyOption=
1682 1887 b);var c=f.get(a)||0;f.set(a,c+1);d()}};e.removeOption=function(a){var b=f.get(a);b&&(1===b?(f.delete(a),""===a&&(e.hasEmptyOption=!1,e.emptyOption=void 0)):f.set(a,b-1))};e.hasOption=function(a){return!!f.get(a)};e.$hasEmptyOption=function(){return e.hasEmptyOption};e.$isUnknownOptionSelected=function(){return a[0].options[0]===e.unknownOption[0]};e.$isEmptyOptionSelected=function(){return e.hasEmptyOption&&a[0].options[a[0].selectedIndex]===e.emptyOption[0]};e.selectUnknownOrEmptyOption=function(a){null==
1683 1888 a&&e.emptyOption?(e.removeUnknownOption(),e.selectEmptyOption()):e.unknownOption.parent().length?e.updateUnknownOption(a):e.renderUnknownOption(a)};var g=!1,k=!1;e.registerOption=function(a,b,f,g,k){if(f.$attr.ngValue){var q,r;f.$observe("value",function(a){var d,f=b.prop("selected");w(r)&&(e.removeOption(q),delete e.selectValueMap[r],d=!0);r=La(a);q=a;e.selectValueMap[r]=a;e.addOption(a,b);b.attr("value",r);d&&f&&c()})}else g?f.$observe("value",function(a){e.readValue();var d,f=b.prop("selected");
1684 1889 w(q)&&(e.removeOption(q),d=!0);q=a;e.addOption(a,b);d&&f&&c()}):k?a.$watch(k,function(a,d){f.$set("value",a);var g=b.prop("selected");d!==a&&e.removeOption(d);e.addOption(a,b);d&&g&&c()}):e.addOption(f.value,b);f.$observe("disabled",function(a){if("true"===a||a&&b.prop("selected"))e.multiple?c(!0):(e.ngModelCtrl.$setViewValue(null),e.ngModelCtrl.$render())});b.on("$destroy",function(){var a=e.readValue(),b=f.value;e.removeOption(b);d();(e.multiple&&a&&-1!==a.indexOf(b)||a===b)&&c(!0)})}}],Pe=function(){return{restrict:"E",
1685 1890 require:["select","?ngModel"],controller:Bh,priority:1,link:{pre:function(a,b,d,c){var e=c[0],f=c[1];if(f){if(e.ngModelCtrl=f,b.on("change",function(){e.removeUnknownOption();a.$apply(function(){f.$setViewValue(e.readValue())})}),d.multiple){e.multiple=!0;e.readValue=function(){var a=[];r(b.find("option"),function(b){b.selected&&!b.disabled&&(b=b.value,a.push(b in e.selectValueMap?e.selectValueMap[b]:b))});return a};e.writeValue=function(a){r(b.find("option"),function(b){var c=!!a&&(-1!==Array.prototype.indexOf.call(a,
1686 1891 b.value)||-1!==Array.prototype.indexOf.call(a,e.selectValueMap[b.value]));c!==b.selected&&Oa(x(b),c)})};var g,k=NaN;a.$watch(function(){k!==f.$viewValue||va(g,f.$viewValue)||(g=ja(f.$viewValue),f.$render());k=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}else e.registerOption=E},post:function(a,b,d,c){var e=c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},Qe=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,e;w(d.ngValue)||
1687 1892 (w(d.value)?c=a(d.value,!0):(e=a(b.text(),!0))||d.$set("value",b.text()));return function(a,b,d){var h=b.parent();(h=h.data("$selectController")||h.parent().data("$selectController"))&&h.registerOption(a,b,d,c,e)}}}}],$c=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.required||a(c.ngRequired)(b);c.required=!0;e.$validators.required=function(a,b){return!f||!e.$isEmpty(b)};c.$observe("required",function(a){f!==a&&(f=a,e.$validate())})}}}}],Zc=["$parse",
1688 1893 function(a){return{restrict:"A",require:"?ngModel",compile:function(b,d){var c,e;d.ngPattern&&(c=d.ngPattern,e="/"===d.ngPattern.charAt(0)&&ie.test(d.ngPattern)?function(){return d.ngPattern}:a(d.ngPattern));return function(a,b,d,h){if(h){var l=d.pattern;d.ngPattern?l=e(a):c=d.pattern;var m=he(l,c,b);d.$observe("pattern",function(a){var d=m;m=he(a,c,b);(d&&d.toString())!==(m&&m.toString())&&h.$validate()});h.$validators.pattern=function(a,b){return h.$isEmpty(b)||z(m)||m.test(b)}}}}}}],bd=["$parse",
1689 1894 function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.maxlength||a(c.ngMaxlength)(b),g=Tb(f);c.$observe("maxlength",function(a){f!==a&&(g=Tb(a),f=a,e.$validate())});e.$validators.maxlength=function(a,b){return 0>g||e.$isEmpty(b)||b.length<=g}}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Tb(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Tb(a)||-1,f=a,e.$validate())});
1690 1895 e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];C.angular.bootstrap?C.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Fe(),Je(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,
1691 1896 MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",
1692 1897 shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ae(C.document,Uc)}))})(window);
1693 1898 !window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
1694 1899 //# sourceMappingURL=angular.min.js.map
1695 1900
1696 1901 ;/*
1697 1902 AngularJS v1.7.7
1698 1903 (c) 2010-2018 Google, Inc. http://angularjs.org
1699 1904 License: MIT
1700 1905 */
1701 1906 (function(n,e){'use strict';function m(d,k,l){var a=l.baseHref(),h=d[0];return function(f,b,c){var d,g;c=c||{};g=c.expires;d=e.isDefined(c.path)?c.path:a;e.isUndefined(b)&&(g="Thu, 01 Jan 1970 00:00:00 GMT",b="");e.isString(g)&&(g=new Date(g));b=encodeURIComponent(f)+"="+encodeURIComponent(b);b=b+(d?";path="+d:"")+(c.domain?";domain="+c.domain:"");b+=g?";expires="+g.toUTCString():"";b+=c.secure?";secure":"";b+=c.samesite?";samesite="+c.samesite:"";c=b.length+1;4096<c&&k.warn("Cookie '"+f+"' possibly not set or overflowed because it was too large ("+
1702 1907 c+" > 4096 bytes)!");h.cookie=b}}e.module("ngCookies",["ng"]).info({angularVersion:"1.7.7"}).provider("$cookies",[function(){var d=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(k,l){return{get:function(a){return k()[a]},getObject:function(a){return(a=this.get(a))?e.fromJson(a):a},getAll:function(){return k()},put:function(a,h,f){l(a,h,f?e.extend({},d,f):d)},putObject:function(a,d,f){this.put(a,e.toJson(d),f)},remove:function(a,h){l(a,void 0,h?e.extend({},d,h):d)}}}]}]);m.$inject=
1703 1908 ["$document","$log","$browser"];e.module("ngCookies").provider("$$cookieWriter",function(){this.$get=m})})(window,window.angular);
1704 1909 //# sourceMappingURL=angular-cookies.min.js.map
1705 1910
1706 1911 ;/*
1707 1912 AngularJS v1.7.7
1708 1913 (c) 2010-2018 Google, Inc. http://angularjs.org
1709 1914 License: MIT
1710 1915 */
1711 1916 (function(I,b){'use strict';function z(b,h){var d=[],c=b.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(b,c,h,k){b="?"===k||"*?"===k;k="*"===k||"*?"===k;d.push({name:h,optional:b});c=c||"";return(b?"(?:"+c:c+"(?:")+(k?"(.+?)":"([^/]+)")+(b?"?)?":")")}).replace(/([/$*])/g,"\\$1");h.ignoreTrailingSlashes&&(c=c.replace(/\/+$/,"")+"/*");return{keys:d,regexp:new RegExp("^"+c+"(?:[?#]|$)",h.caseInsensitiveMatch?"i":"")}}function A(b){p&&b.get("$route")}function v(u,h,d){return{restrict:"ECA",
1712 1917 terminal:!0,priority:400,transclude:"element",link:function(c,f,g,l,k){function q(){r&&(d.cancel(r),r=null);m&&(m.$destroy(),m=null);s&&(r=d.leave(s),r.done(function(b){!1!==b&&(r=null)}),s=null)}function C(){var g=u.current&&u.current.locals;if(b.isDefined(g&&g.$template)){var g=c.$new(),l=u.current;s=k(g,function(g){d.enter(g,null,s||f).done(function(d){!1===d||!b.isDefined(w)||w&&!c.$eval(w)||h()});q()});m=l.scope=g;m.$emit("$viewContentLoaded");m.$eval(p)}else q()}var m,s,r,w=g.autoscroll,p=g.onload||
1713 1918 "";c.$on("$routeChangeSuccess",C);C()}}}function x(b,h,d){return{restrict:"ECA",priority:-400,link:function(c,f){var g=d.current,l=g.locals;f.html(l.$template);var k=b(f.contents());if(g.controller){l.$scope=c;var q=h(g.controller,l);g.controllerAs&&(c[g.controllerAs]=q);f.data("$ngControllerController",q);f.children().data("$ngControllerController",q)}c[g.resolveAs||"$resolve"]=l;k(c)}}}var D,E,F,G,y=b.module("ngRoute",[]).info({angularVersion:"1.7.7"}).provider("$route",function(){function u(d,
1714 1919 c){return b.extend(Object.create(d),c)}D=b.isArray;E=b.isObject;F=b.isDefined;G=b.noop;var h={};this.when=function(d,c){var f;f=void 0;if(D(c)){f=f||[];for(var g=0,l=c.length;g<l;g++)f[g]=c[g]}else if(E(c))for(g in f=f||{},c)if("$"!==g.charAt(0)||"$"!==g.charAt(1))f[g]=c[g];f=f||c;b.isUndefined(f.reloadOnUrl)&&(f.reloadOnUrl=!0);b.isUndefined(f.reloadOnSearch)&&(f.reloadOnSearch=!0);b.isUndefined(f.caseInsensitiveMatch)&&(f.caseInsensitiveMatch=this.caseInsensitiveMatch);h[d]=b.extend(f,{originalPath:d},
1715 1920 d&&z(d,f));d&&(g="/"===d[d.length-1]?d.substr(0,d.length-1):d+"/",h[g]=b.extend({originalPath:d,redirectTo:d},z(g,f)));return this};this.caseInsensitiveMatch=!1;this.otherwise=function(b){"string"===typeof b&&(b={redirectTo:b});this.when(null,b);return this};p=!0;this.eagerInstantiationEnabled=function(b){return F(b)?(p=b,this):p};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser",function(d,c,f,g,l,k,q,p){function m(a){var e=t.current;n=A();(x=
1716 1921 !B&&n&&e&&n.$$route===e.$$route&&(!n.reloadOnUrl||!n.reloadOnSearch&&b.equals(n.pathParams,e.pathParams)))||!e&&!n||d.$broadcast("$routeChangeStart",n,e).defaultPrevented&&a&&a.preventDefault()}function s(){var a=t.current,e=n;if(x)a.params=e.params,b.copy(a.params,f),d.$broadcast("$routeUpdate",a);else if(e||a){B=!1;t.current=e;var c=g.resolve(e);p.$$incOutstandingRequestCount("$route");c.then(r).then(w).then(function(g){return g&&c.then(y).then(function(c){e===t.current&&(e&&(e.locals=c,b.copy(e.params,
1717 1922 f)),d.$broadcast("$routeChangeSuccess",e,a))})}).catch(function(b){e===t.current&&d.$broadcast("$routeChangeError",e,a,b)}).finally(function(){p.$$completeOutstandingRequest(G,"$route")})}}function r(a){var e={route:a,hasRedirection:!1};if(a)if(a.redirectTo)if(b.isString(a.redirectTo))e.path=v(a.redirectTo,a.params),e.search=a.params,e.hasRedirection=!0;else{var d=c.path(),f=c.search();a=a.redirectTo(a.pathParams,d,f);b.isDefined(a)&&(e.url=a,e.hasRedirection=!0)}else if(a.resolveRedirectTo)return g.resolve(l.invoke(a.resolveRedirectTo)).then(function(a){b.isDefined(a)&&
1718 1923 (e.url=a,e.hasRedirection=!0);return e});return e}function w(a){var b=!0;if(a.route!==t.current)b=!1;else if(a.hasRedirection){var g=c.url(),d=a.url;d?c.url(d).replace():d=c.path(a.path).search(a.search).replace().url();d!==g&&(b=!1)}return b}function y(a){if(a){var e=b.extend({},a.resolve);b.forEach(e,function(a,c){e[c]=b.isString(a)?l.get(a):l.invoke(a,null,null,c)});a=z(a);b.isDefined(a)&&(e.$template=a);return g.all(e)}}function z(a){var e,c;b.isDefined(e=a.template)?b.isFunction(e)&&(e=e(a.params)):
1719 1924 b.isDefined(c=a.templateUrl)&&(b.isFunction(c)&&(c=c(a.params)),b.isDefined(c)&&(a.loadedTemplateUrl=q.valueOf(c),e=k(c)));return e}function A(){var a,e;b.forEach(h,function(d,g){var f;if(f=!e){var h=c.path();f=d.keys;var l={};if(d.regexp)if(h=d.regexp.exec(h)){for(var k=1,p=h.length;k<p;++k){var m=f[k-1],n=h[k];m&&n&&(l[m.name]=n)}f=l}else f=null;else f=null;f=a=f}f&&(e=u(d,{params:b.extend({},c.search(),a),pathParams:a}),e.$$route=d)});return e||h[null]&&u(h[null],{params:{},pathParams:{}})}function v(a,
1720 1925 c){var d=[];b.forEach((a||"").split(":"),function(a,b){if(0===b)d.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),g=f[1];d.push(c[g]);d.push(f[2]||"");delete c[g]}});return d.join("")}var B=!1,n,x,t={routes:h,reload:function(){B=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;B=!1}};d.$evalAsync(function(){m(a);a.defaultPrevented||s()})},updateParams:function(a){if(this.current&&this.current.$$route)a=b.extend({},this.current.params,a),c.path(v(this.current.$$route.originalPath,
1721 1926 a)),c.search(a);else throw H("norout");}};d.$on("$locationChangeStart",m);d.$on("$locationChangeSuccess",s);return t}]}).run(A),H=b.$$minErr("ngRoute"),p;A.$inject=["$injector"];y.provider("$routeParams",function(){this.$get=function(){return{}}});y.directive("ngView",v);y.directive("ngView",x);v.$inject=["$route","$anchorScroll","$animate"];x.$inject=["$compile","$controller","$route"]})(window,window.angular);
1722 1927 //# sourceMappingURL=angular-route.min.js.map
1723 1928
1724 1929 ;/*
1725 1930 AngularJS v1.7.7
1726 1931 (c) 2010-2018 Google, Inc. http://angularjs.org
1727 1932 License: MIT
1728 1933 */
1729 1934 (function(T,a){'use strict';function M(m,f){f=f||{};a.forEach(f,function(a,d){delete f[d]});for(var d in m)!m.hasOwnProperty(d)||"$"===d.charAt(0)&&"$"===d.charAt(1)||(f[d]=m[d]);return f}var B=a.$$minErr("$resource"),H=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;a.module("ngResource",["ng"]).info({angularVersion:"1.7.7"}).provider("$resource",function(){var m=/^https?:\/\/\[[^\]]*][^/]*/,f=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",
1730 1935 isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};this.$get=["$http","$log","$q","$timeout",function(d,F,G,N){function C(a,d){this.template=a;this.defaults=n({},f.defaults,d);this.urlParams={}}var O=a.noop,r=a.forEach,n=a.extend,R=a.copy,P=a.isArray,D=a.isDefined,x=a.isFunction,I=a.isNumber,y=a.$$encodeUriQuery,S=a.$$encodeUriSegment;C.prototype={setUrlParams:function(a,d,f){var g=this,c=f||g.template,s,h,n="",b=g.urlParams=Object.create(null);r(c.split(/\W/),function(a){if("hasOwnProperty"===
1731 1936 a)throw B("badname");!/^\d+$/.test(a)&&a&&(new RegExp("(^|[^\\\\]):"+a+"(\\W|$)")).test(c)&&(b[a]={isQueryParamValue:(new RegExp("\\?.*=:"+a+"(?:\\W|$)")).test(c)})});c=c.replace(/\\:/g,":");c=c.replace(m,function(b){n=b;return""});d=d||{};r(g.urlParams,function(b,a){s=d.hasOwnProperty(a)?d[a]:g.defaults[a];D(s)&&null!==s?(h=b.isQueryParamValue?y(s,!0):S(s),c=c.replace(new RegExp(":"+a+"(\\W|$)","g"),function(b,a){return h+a})):c=c.replace(new RegExp("(/?):"+a+"(\\W|$)","g"),function(b,a,e){return"/"===
1732 1937 e.charAt(0)?e:a+e})});g.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");a.url=n+c.replace(/\/(\\|%5C)\./,"/.");r(d,function(b,c){g.urlParams[c]||(a.params=a.params||{},a.params[c]=b)})}};return function(m,y,z,g){function c(b,c){var d={};c=n({},y,c);r(c,function(c,f){x(c)&&(c=c(b));var e;if(c&&c.charAt&&"@"===c.charAt(0)){e=b;var k=c.substr(1);if(null==k||""===k||"hasOwnProperty"===k||!H.test("."+k))throw B("badmember",k);for(var k=k.split("."),h=0,
1733 1938 n=k.length;h<n&&a.isDefined(e);h++){var g=k[h];e=null!==e?e[g]:void 0}}else e=c;d[f]=e});return d}function s(b){return b.resource}function h(b){M(b||{},this)}var Q=new C(m,g);z=n({},f.defaults.actions,z);h.prototype.toJSON=function(){var b=n({},this);delete b.$promise;delete b.$resolved;delete b.$cancelRequest;return b};r(z,function(b,a){var f=!0===b.hasBody||!1!==b.hasBody&&/^(POST|PUT|PATCH)$/i.test(b.method),g=b.timeout,m=D(b.cancellable)?b.cancellable:Q.defaults.cancellable;g&&!I(g)&&(F.debug("ngResource:\n Only numeric values are allowed as `timeout`.\n Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),
1734 1939 delete b.timeout,g=null);h[a]=function(e,k,J,y){function z(a){p.catch(O);null!==u&&u.resolve(a)}var K={},v,t,w;switch(arguments.length){case 4:w=y,t=J;case 3:case 2:if(x(k)){if(x(e)){t=e;w=k;break}t=k;w=J}else{K=e;v=k;t=J;break}case 1:x(e)?t=e:f?v=e:K=e;break;case 0:break;default:throw B("badargs",arguments.length);}var E=this instanceof h,l=E?v:b.isArray?[]:new h(v),q={},C=b.interceptor&&b.interceptor.request||void 0,D=b.interceptor&&b.interceptor.requestError||void 0,F=b.interceptor&&b.interceptor.response||
1735 1940 s,H=b.interceptor&&b.interceptor.responseError||G.reject,I=t?function(a){t(a,A.headers,A.status,A.statusText)}:void 0;w=w||void 0;var u,L,A;r(b,function(a,b){switch(b){default:q[b]=R(a);case "params":case "isArray":case "interceptor":case "cancellable":}});!E&&m&&(u=G.defer(),q.timeout=u.promise,g&&(L=N(u.resolve,g)));f&&(q.data=v);Q.setUrlParams(q,n({},c(v,b.params||{}),K),b.url);var p=G.resolve(q).then(C).catch(D).then(d),p=p.then(function(c){var e=c.data;if(e){if(P(e)!==!!b.isArray)throw B("badcfg",
1736 1941 a,b.isArray?"array":"object",P(e)?"array":"object",q.method,q.url);if(b.isArray)l.length=0,r(e,function(a){"object"===typeof a?l.push(new h(a)):l.push(a)});else{var d=l.$promise;M(e,l);l.$promise=d}}c.resource=l;A=c;return F(c)},function(a){a.resource=l;A=a;return H(a)}),p=p["finally"](function(){l.$resolved=!0;!E&&m&&(l.$cancelRequest=O,N.cancel(L),u=L=q.timeout=null)});p.then(I,w);return E?p:(l.$promise=p,l.$resolved=!1,m&&(l.$cancelRequest=z),l)};h.prototype["$"+a]=function(b,c,d){x(b)&&(d=c,c=
1737 1942 b,b={});b=h[a].call(this,b,this,c,d);return b.$promise||b}});return h}}]})})(window,window.angular);
1738 1943 //# sourceMappingURL=angular-resource.min.js.map
1739 1944
1740 1945 ;/*
1741 1946 AngularJS v1.7.7
1742 1947 (c) 2010-2018 Google, Inc. http://angularjs.org
1743 1948 License: MIT
1744 1949 */
1745 1950 (function(Y,z){'use strict';function Fa(a,b,c){if(!a)throw Pa("areq",b||"?",c||"required");return a}function Ga(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;Z(a)&&(a=a.join(" "));Z(b)&&(b=b.join(" "));return a+" "+b}function Qa(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function $(a,b,c){var d="";a=Z(a)?a:a&&G(a)&&a.length?a.split(/\s+/):[];s(a,function(a,k){a&&0<a.length&&(d+=0<k?" ":"",d+=c?b+a:a+b)});return d}function Ha(a){if(a instanceof A)switch(a.length){case 0:return a;
1746 1951 case 1:if(1===a[0].nodeType)return a;break;default:return A(va(a))}if(1===a.nodeType)return A(a)}function va(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1===c.nodeType)return c}}function Ra(a,b,c){s(b,function(b){a.addClass(b,c)})}function Sa(a,b,c){s(b,function(b){a.removeClass(b,c)})}function aa(a){return function(b,c){c.addClass&&(Ra(a,b,c.addClass),c.addClass=null);c.removeClass&&(Sa(a,b,c.removeClass),c.removeClass=null)}}function pa(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||
1747 1952 N;a.domOperation=function(){a.$$domOperationFired=!0;b();b=N};a.$$prepared=!0}return a}function ha(a,b){Ia(a,b);Ja(a,b)}function Ia(a,b){b.from&&(a.css(b.from),b.from=null)}function Ja(a,b){b.to&&(a.css(b.to),b.to=null)}function T(a,b,c){var d=b.options||{};c=c.options||{};var f=(d.addClass||"")+" "+(c.addClass||""),k=(d.removeClass||"")+" "+(c.removeClass||"");a=Ta(a.attr("class"),f,k);c.preparationClasses&&(d.preparationClasses=ba(c.preparationClasses,d.preparationClasses),delete c.preparationClasses);
1748 1953 f=d.domOperation!==N?d.domOperation:null;wa(d,c);f&&(d.domOperation=f);d.addClass=a.addClass?a.addClass:null;d.removeClass=a.removeClass?a.removeClass:null;b.addClass=d.addClass;b.removeClass=d.removeClass;return d}function Ta(a,b,c){function d(a){G(a)&&(a=a.split(" "));var c={};s(a,function(a){a.length&&(c[a]=!0)});return c}var f={};a=d(a);b=d(b);s(b,function(a,c){f[c]=1});c=d(c);s(c,function(a,c){f[c]=1===f[c]?null:-1});var k={addClass:"",removeClass:""};s(f,function(c,b){var d,f;1===c?(d="addClass",
1749 1954 f=!a[b]||a[b+"-remove"]):-1===c&&(d="removeClass",f=a[b]||a[b+"-add"]);f&&(k[d].length&&(k[d]+=" "),k[d]+=b)});return k}function K(a){return a instanceof A?a[0]:a}function Ua(a,b,c,d){a="";c&&(a=$(c,"ng-",!0));d.addClass&&(a=ba(a,$(d.addClass,"-add")));d.removeClass&&(a=ba(a,$(d.removeClass,"-remove")));a.length&&(d.preparationClasses=a,b.addClass(a))}function xa(a,b){var c=b?"paused":"",d=ca+"PlayState";ma(a,[d,c]);return[d,c]}function ma(a,b){a.style[b[0]]=b[1]}function ba(a,b){return a?b?a+" "+
1750 1955 b:a:b}function Ka(a,b,c){var d=Object.create(null),f=a.getComputedStyle(b)||{};s(c,function(a,c){var b=f[a];if(b){var L=b.charAt(0);if("-"===L||"+"===L||0<=L)b=Va(b);0===b&&(b=null);d[c]=b}});return d}function Va(a){var b=0;a=a.split(/\s*,\s*/);s(a,function(a){"s"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function ya(a){return 0===a||null!=a}function La(a,b){var c=M,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function Ma(a,b,c){s(c,
1751 1956 function(c){a[c]=za(a[c])?a[c]:b.style.getPropertyValue(c)})}var M,Aa,ca,Ba;void 0===Y.ontransitionend&&void 0!==Y.onwebkittransitionend?(M="WebkitTransition",Aa="webkitTransitionEnd transitionend"):(M="transition",Aa="transitionend");void 0===Y.onanimationend&&void 0!==Y.onwebkitanimationend?(ca="WebkitAnimation",Ba="webkitAnimationEnd animationend"):(ca="animation",Ba="animationend");var qa=ca+"Delay",Ca=ca+"Duration",na=M+"Delay",Na=M+"Duration",Pa=z.$$minErr("ng"),ra={blockTransitions:function(a,
1752 1957 b){var c=b?"-"+b+"s":"";ma(a,[na,c]);return[na,c]}},Wa={transitionDuration:Na,transitionDelay:na,transitionProperty:M+"Property",animationDuration:Ca,animationDelay:qa,animationIterationCount:ca+"IterationCount"},Xa={transitionDuration:Na,transitionDelay:na,animationDuration:Ca,animationDelay:qa},Da,wa,s,Z,za,sa,Ea,ta,G,R,A,N;z.module("ngAnimate",[],function(){N=z.noop;Da=z.copy;wa=z.extend;A=z.element;s=z.forEach;Z=z.isArray;G=z.isString;ta=z.isObject;R=z.isUndefined;za=z.isDefined;Ea=z.isFunction;
1753 1958 sa=z.isElement}).info({angularVersion:"1.7.7"}).directive("ngAnimateSwap",["$animate",function(a){return{restrict:"A",transclude:"element",terminal:!0,priority:550,link:function(b,c,d,f,k){var e,Q;b.$watchCollection(d.ngAnimateSwap||d["for"],function(b){e&&a.leave(e);Q&&(Q.$destroy(),Q=null);(b||0===b)&&k(function(b,d){e=b;Q=d;a.enter(b,null,c)})})}}}]).directive("ngAnimateChildren",["$interpolate",function(a){return{link:function(b,c,d){function f(a){c.data("$$ngAnimateChildren","on"===a||"true"===
1754 1959 a)}var k=d.ngAnimateChildren;G(k)&&0===k.length?c.data("$$ngAnimateChildren",!0):(f(a(k)(b)),d.$observe("ngAnimateChildren",f))}}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),e=0;e<b.length;e++)b[e]();f||a(function(){f||c()})}}var d,f;d=b.queue=[];b.waitUntilQuiet=function(b){f&&f();f=a(function(){f=null;b();c()})};return b}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a){return{addClass:a.addClass,
1755 1960 removeClass:a.removeClass,from:a.from,to:a.to}}function c(a){if(!a)return null;a=a.split(" ");var b=Object.create(null);s(a,function(a){b[a]=!0});return b}function d(a,b){if(a&&b){var d=c(b);return a.split(" ").some(function(a){return d[a]})}}function f(a,b,c){return e[a].some(function(a){return a(b,c)})}function k(a,b){var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var e=this.rules={skip:[],cancel:[],join:[]};e.join.push(function(a,b){return!a.structural&&k(a)});
1756 1961 e.skip.push(function(a,b){return!a.structural&&!k(a)});e.skip.push(function(a,b){return"leave"===b.event&&a.structural});e.skip.push(function(a,b){return b.structural&&2===b.state&&!a.structural});e.cancel.push(function(a,b){return b.structural&&a.structural});e.cancel.push(function(a,b){return 2===b.state&&a.structural});e.cancel.push(function(a,b){if(b.structural)return!1;var c=a.addClass,f=a.removeClass,k=b.addClass,e=b.removeClass;return R(c)&&R(f)||R(k)&&R(e)?!1:d(c,e)||d(f,k)});this.$get=["$$rAF",
1757 1962 "$rootScope","$rootElement","$document","$$Map","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow","$$isDocumentHidden",function(c,d,e,C,U,oa,H,u,t,I,da){function ia(a){O.delete(a.target)}function v(){var a=!1;return function(b){a?b():d.$$postDigest(function(){a=!0;b()})}}function ua(a,b,c){var g=[],l=m[c];l&&s(l,function(l){Oa.call(l.node,b)?g.push(l.callback):"leave"===c&&Oa.call(l.node,a)&&g.push(l.callback)});return g}function h(a,b,c){var l=va(b);return a.filter(function(a){return!(a.node===
1758 1963 l&&(!c||a.callback===c))})}function q(a,J,w){function e(a,b,l,g){u(function(){var a=ua(ia,m,b);a.length?c(function(){s(a,function(a){a(h,l,g)});"close"!==l||m.parentNode||D.off(m)}):"close"!==l||m.parentNode||D.off(m)});a.progress(b,l,g)}function I(a){var b=h,c=n;c.preparationClasses&&(b.removeClass(c.preparationClasses),c.preparationClasses=null);c.activeClasses&&(b.removeClass(c.activeClasses),c.activeClasses=null);W(h,n);ha(h,n);n.domOperation();q.complete(!a)}var n=Da(w),h=Ha(a),m=K(h),ia=m&&
1759 1964 m.parentNode,n=pa(n),q=new H,u=v();Z(n.addClass)&&(n.addClass=n.addClass.join(" "));n.addClass&&!G(n.addClass)&&(n.addClass=null);Z(n.removeClass)&&(n.removeClass=n.removeClass.join(" "));n.removeClass&&!G(n.removeClass)&&(n.removeClass=null);n.from&&!ta(n.from)&&(n.from=null);n.to&&!ta(n.to)&&(n.to=null);if(!(B&&m&&fa(m,J,w)&&Ya(m,n)))return I(),q;var x=0<=["enter","move","leave"].indexOf(J),r=da(),P=r||O.get(m);w=!P&&y.get(m)||{};var p=!!w.state;P||p&&1===w.state||(P=!E(m,ia,J));if(P)return r&&
1760 1965 e(q,J,"start",b(n)),I(),r&&e(q,J,"close",b(n)),q;x&&F(m);r={structural:x,element:h,event:J,addClass:n.addClass,removeClass:n.removeClass,close:I,options:n,runner:q};if(p){if(f("skip",r,w)){if(2===w.state)return I(),q;T(h,w,r);return w.runner}if(f("cancel",r,w))if(2===w.state)w.runner.end();else if(w.structural)w.close();else return T(h,w,r),w.runner;else if(f("join",r,w))if(2===w.state)T(h,r,{});else return Ua(t,h,x?J:null,n),J=r.event=w.event,n=T(h,w,r),w.runner}else T(h,r,{});(p=r.structural)||
1761 1966 (p="animate"===r.event&&0<Object.keys(r.options.to||{}).length||k(r));if(!p)return I(),g(m),q;var C=(w.counter||0)+1;r.counter=C;l(m,1,r);d.$$postDigest(function(){h=Ha(a);var c=y.get(m),d=!c,c=c||{},t=0<(h.parent()||[]).length&&("animate"===c.event||c.structural||k(c));if(d||c.counter!==C||!t){d&&(W(h,n),ha(h,n));if(d||x&&c.event!==J)n.domOperation(),q.end();t||g(m)}else J=!c.structural&&k(c,!0)?"setClass":c.event,l(m,2),c=oa(h,J,c.options),q.setHost(c),e(q,J,"start",b(n)),c.done(function(a){I(!a);
1762 1967 (a=y.get(m))&&a.counter===C&&g(m);e(q,J,"close",b(n))})});return q}function F(a){a=a.querySelectorAll("[data-ng-animate]");s(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate"),10),c=y.get(a);if(c)switch(b){case 2:c.runner.end();case 1:y.delete(a)}})}function g(a){a.removeAttribute("data-ng-animate");y.delete(a)}function E(a,b,c){c=C[0].body;var l=K(e),g=a===c||"HTML"===a.nodeName,d=a===l,t=!1,m=O.get(a),h;for((a=A.data(a,"$ngAnimatePin"))&&(b=K(a));b;){d||(d=b===l);if(1!==b.nodeType)break;
1763 1968 a=y.get(b)||{};if(!t){var f=O.get(b);if(!0===f&&!1!==m){m=!0;break}else!1===f&&(m=!1);t=a.structural}if(R(h)||!0===h)a=A.data(b,"$$ngAnimateChildren"),za(a)&&(h=a);if(t&&!1===h)break;g||(g=b===c);if(g&&d)break;if(!d&&(a=A.data(b,"$ngAnimatePin"))){b=K(a);continue}b=b.parentNode}return(!t||h)&&!0!==m&&d&&g}function l(a,b,c){c=c||{};c.state=b;a.setAttribute("data-ng-animate",b);c=(b=y.get(a))?wa(b,c):c;y.set(a,c)}var y=new U,O=new U,B=null,P=d.$watch(function(){return 0===u.totalPendingRequests},function(a){a&&
1764 1969 (P(),d.$$postDigest(function(){d.$$postDigest(function(){null===B&&(B=!0)})}))}),m=Object.create(null);U=a.customFilter();var la=a.classNameFilter();I=function(){return!0};var fa=U||I,Ya=la?function(a,b){var c=[a.getAttribute("class"),b.addClass,b.removeClass].join(" ");return la.test(c)}:I,W=aa(t),Oa=Y.Node.prototype.contains||function(a){return this===a||!!(this.compareDocumentPosition(a)&16)},D={on:function(a,b,c){var l=va(b);m[a]=m[a]||[];m[a].push({node:l,callback:c});A(b).on("$destroy",function(){y.get(l)||
1765 1970 D.off(a,b,c)})},off:function(a,b,c){if(1!==arguments.length||G(arguments[0])){var l=m[a];l&&(m[a]=1===arguments.length?null:h(l,b,c))}else for(l in b=arguments[0],m)m[l]=h(m[l],b)},pin:function(a,b){Fa(sa(a),"element","not an element");Fa(sa(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,l){c=c||{};c.domOperation=l;return q(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!B;else if(sa(a)){var l=K(a);if(1===c)b=!O.get(l);else{if(!O.has(l))A(a).on("$destroy",
1766 1971 ia);O.set(l,!b)}}else b=B=!!a;return b}};return D}]}]).provider("$$animateCache",function(){var a=0,b=Object.create(null);this.$get=[function(){return{cacheKey:function(b,d,f,k){var e=b.parentNode;b=[e.$$ngAnimateParentKey||(e.$$ngAnimateParentKey=++a),d,b.getAttribute("class")];f&&b.push(f);k&&b.push(k);return b.join(" ")},containsCachedAnimationWithoutDuration:function(a){return(a=b[a])&&!a.isValid||!1},flush:function(){b=Object.create(null)},count:function(a){return(a=b[a])?a.total:0},get:function(a){return(a=
1767 1972 b[a])&&a.value},put:function(a,d,f){b[a]?(b[a].total++,b[a].value=d):b[a]={total:1,value:d,isValid:f}}}}]}).provider("$$animation",["$animateProvider",function(a){var b=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$Map","$$rAFScheduler","$$animateCache",function(a,d,f,k,e,Q,L){function x(a){function b(a){if(a.processed)return a;a.processed=!0;var d=a.domNode,t=d.parentNode;f.set(d,a);for(var h;t;){if(h=f.get(t)){h.processed||(h=b(h));break}t=t.parentNode}(h||
1768 1973 c).children.push(a);return a}var c={children:[]},d,f=new e;for(d=0;d<a.length;d++){var da=a[d];f.set(da.domNode,a[d]={domNode:da.domNode,element:da.element,fn:da.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var t=0,f=[];for(d=0;d<c.length;d++){var g=c[d];0>=a&&(a=t,t=0,b.push(f),f=[]);f.push(g);g.children.forEach(function(a){t++;c.push(a)});a--}f.length&&b.push(f);return b}(c)}var C=[],U=aa(a);return function(e,
1769 1974 H,u){function t(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];s(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function I(a){var b=[],c={};s(a,function(a,d){var l=K(a.element),g=0<=["enter","move"].indexOf(a.event),l=a.structural?t(l):[];if(l.length){var f=g?"to":"from";s(l,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][f]={animationID:d,element:A(a)}})}else b.push(a)});var d={},g={};s(c,function(c,
1770 1975 t){var f=c.from,e=c.to;if(f&&e){var h=a[f.animationID],k=a[e.animationID],E=f.animationID.toString();if(!g[E]){var I=g[E]={structural:!0,beforeStart:function(){h.beforeStart();k.beforeStart()},close:function(){h.close();k.close()},classes:da(h.classes,k.classes),from:h,to:k,anchors:[]};I.classes.length?b.push(I):(b.push(h),b.push(k))}g[E].anchors.push({out:f.element,"in":e.element})}else f=f?f.animationID:e.animationID,e=f.toString(),d[e]||(d[e]=!0,b.push(a[f]))});return b}function da(a,b){a=a.split(" ");
1771 1976 b=b.split(" ");for(var c=[],d=0;d<a.length;d++){var g=a[d];if("ng-"!==g.substring(0,3))for(var t=0;t<b.length;t++)if(g===b[t]){c.push(g);break}}return c.join(" ")}function ia(a){for(var c=b.length-1;0<=c;c--){var d=f.get(b[c])(a);if(d)return d}}function v(a,b){function c(a){(a=a.data("$$animationRunner"))&&a.setHost(b)}a.from&&a.to?(c(a.from.element),c(a.to.element)):c(a.element)}function ua(){var a=e.data("$$animationRunner");!a||"leave"===H&&u.$$domOperationFired||a.end()}function h(b){e.off("$destroy",
1772 1977 ua);e.removeData("$$animationRunner");U(e,u);ha(e,u);u.domOperation();E&&a.removeClass(e,E);F.complete(!b)}u=pa(u);var q=0<=["enter","move","leave"].indexOf(H),F=new k({end:function(){h()},cancel:function(){h(!0)}});if(!b.length)return h(),F;var g=Ga(e.attr("class"),Ga(u.addClass,u.removeClass)),E=u.tempClasses;E&&(g+=" "+E,u.tempClasses=null);q&&e.data("$$animatePrepareClasses","ng-"+H+"-prepare");e.data("$$animationRunner",F);C.push({element:e,classes:g,event:H,structural:q,options:u,beforeStart:function(){E=
1773 1978 (E?E+" ":"")+"ng-animate";a.addClass(e,E);var b=e.data("$$animatePrepareClasses");b&&a.removeClass(e,b)},close:h});e.on("$destroy",ua);if(1<C.length)return F;d.$$postDigest(function(){var b=[];s(C,function(a){a.element.data("$$animationRunner")?b.push(a):a.close()});C.length=0;var d=I(b),g=[];s(d,function(a){var b=a.from?a.from.element:a.element,c=u.addClass,d=L.cacheKey(b[0],a.event,(c?c+" ":"")+"ng-animate",u.removeClass);g.push({element:b,domNode:K(b),fn:function(){var b,c=a.close;if(L.containsCachedAnimationWithoutDuration(d))c();
1774 1979 else{a.beforeStart();if((a.anchors?a.from.element||a.to.element:a.element).data("$$animationRunner")){var g=ia(a);g&&(b=g.start)}b?(b=b(),b.done(function(a){c(!a)}),v(a,b)):c()}}})});for(var d=x(g),t=0;t<d.length;t++)for(var f=d[t],e=0;e<f.length;e++){var h=f[e],k=h.element;d[t][e]=h.fn;0===t?k.removeData("$$animatePrepareClasses"):(h=k.data("$$animatePrepareClasses"))&&a.addClass(k,h)}Q(d)});return F}}]}]).provider("$animateCss",["$animateProvider",function(a){this.$get=["$window","$$jqLite","$$AnimateRunner",
1775 1980 "$timeout","$$animateCache","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(a,c,d,f,k,e,Q,L,x){function C(d,f,e,x){var v,s="stagger-"+e;0<k.count(e)&&(v=k.get(s),v||(f=$(f,"-stagger"),c.addClass(d,f),v=Ka(a,d,x),v.animationDuration=Math.max(v.animationDuration,0),v.transitionDuration=Math.max(v.transitionDuration,0),c.removeClass(d,f),k.put(s,v,!0)));return v||{}}function U(a){u.push(a);L.waitUntilQuiet(function(){k.flush();for(var a=e(),b=0;b<u.length;b++)u[b](a);u.length=0})}
1776 1981 function z(c,d,f,e){d=k.get(f);d||(d=Ka(a,c,Wa),"infinite"===d.animationIterationCount&&(d.animationIterationCount=1));k.put(f,d,e||0<d.transitionDuration||0<d.animationDuration);c=d;f=c.animationDelay;e=c.transitionDelay;c.maxDelay=f&&e?Math.max(f,e):f||e;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var H=aa(c),u=[];return function(a,b){function e(){v()}function L(){v(!0)}function v(b){if(!(P||la&&m)){P=!0;m=!1;V&&!g.$$skipPreparationClasses&&
1777 1982 c.removeClass(a,V);ba&&c.removeClass(a,ba);xa(l,!1);ra.blockTransitions(l,!1);s(y,function(a){l.style[a[0]]=""});H(a,g);ha(a,g);Object.keys(E).length&&s(E,function(a,b){a?l.style.setProperty(b,a):l.style.removeProperty(b)});if(g.onDone)g.onDone();w&&w.length&&a.off(w.join(" "),q);var d=a.data("$$animateCss");d&&(f.cancel(d[0].timer),a.removeData("$$animateCss"));fa&&fa.complete(!b)}}function u(a){p.blockTransition&&ra.blockTransitions(l,a);p.blockKeyframeAnimation&&xa(l,!!a)}function h(){fa=new d({end:e,
1778 1983 cancel:L});U(N);v();return{$$willAnimate:!1,start:function(){return fa},end:e}}function q(a){a.stopPropagation();var b=a.originalEvent||a;b.target===l&&(a=b.$manualTimeStamp||Date.now(),b=parseFloat(b.elapsedTime.toFixed(3)),Math.max(a-J,0)>=G&&b>=D&&(la=!0,v()))}function F(){function b(){if(!P){u(!1);s(y,function(a){l.style[a[0]]=a[1]});H(a,g);c.addClass(a,ba);if(p.recalculateTimingStyles){T=l.getAttribute("class")+" "+V;ka=k.cacheKey(l,ja,g.addClass,g.removeClass);r=z(l,T,ka,!1);ga=r.maxDelay;W=
1779 1984 Math.max(ga,0);D=r.maxDuration;if(0===D){v();return}p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration}p.applyAnimationDelay&&(ga="boolean"!==typeof g.delay&&ya(g.delay)?parseFloat(g.delay):ga,W=Math.max(ga,0),r.animationDelay=ga,ea=[qa,ga+"s"],y.push(ea),l.style[ea[0]]=ea[1]);G=1E3*W;R=1E3*D;if(g.easing){var e,h=g.easing;p.hasTransitions&&(e=M+"TimingFunction",y.push([e,h]),l.style[e]=h);p.hasAnimations&&(e=ca+"TimingFunction",y.push([e,h]),l.style[e]=h)}r.transitionDuration&&
1780 1985 w.push(Aa);r.animationDuration&&w.push(Ba);J=Date.now();var m=G+1.5*R;e=J+m;var h=a.data("$$animateCss")||[],F=!0;if(h.length){var n=h[0];(F=e>n.expectedEndTime)?f.cancel(n.timer):h.push(v)}F&&(m=f(d,m,!1),h[0]={timer:m,expectedEndTime:e},h.push(v),a.data("$$animateCss",h));if(w.length)a.on(w.join(" "),q);g.to&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.to)),Ja(a,g))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c<b.length;c++)b[c]();a.removeData("$$animateCss")}}if(!P)if(l.parentNode){var e=
1781 1986 function(a){if(la)m&&a&&(m=!1,v());else if(m=!a,r.animationDuration)if(a=xa(l,m),m)y.push(a);else{var b=y,c=b.indexOf(a);0<=a&&b.splice(c,1)}},h=0<aa&&(r.transitionDuration&&0===X.transitionDuration||r.animationDuration&&0===X.animationDuration)&&Math.max(X.animationDelay,X.transitionDelay);h?f(b,Math.floor(h*aa*1E3),!1):b();A.resume=function(){e(!0)};A.pause=function(){e(!1)}}else v()}var g=b||{};g.$$prepared||(g=pa(Da(g)));var E={},l=K(a);if(!l||!l.parentNode||!x.enabled())return h();var y=[],O=
1782 1987 a.attr("class"),B=Qa(g),P,m,la,fa,A,W,G,D,R,J,w=[];if(0===g.duration||!Q.animations&&!Q.transitions)return h();var ja=g.event&&Z(g.event)?g.event.join(" "):g.event,Y=ja&&g.structural,n="",S="";Y?n=$(ja,"ng-",!0):ja&&(n=ja);g.addClass&&(S+=$(g.addClass,"-add"));g.removeClass&&(S.length&&(S+=" "),S+=$(g.removeClass,"-remove"));g.applyClassesEarly&&S.length&&H(a,g);var V=[n,S].join(" ").trim(),T=O+" "+V,O=B.to&&0<Object.keys(B.to).length;if(!(0<(g.keyframeStyle||"").length||O||V))return h();var X,ka=
1783 1988 k.cacheKey(l,ja,g.addClass,g.removeClass);if(k.containsCachedAnimationWithoutDuration(ka))return V=null,h();0<g.stagger?(B=parseFloat(g.stagger),X={transitionDelay:B,animationDelay:B,transitionDuration:0,animationDuration:0}):X=C(l,V,ka,Xa);g.$$skipPreparationClasses||c.addClass(a,V);g.transitionStyle&&(B=[M,g.transitionStyle],ma(l,B),y.push(B));0<=g.duration&&(B=0<l.style[M].length,B=La(g.duration,B),ma(l,B),y.push(B));g.keyframeStyle&&(B=[ca,g.keyframeStyle],ma(l,B),y.push(B));var aa=X?0<=g.staggerIndex?
1784 1989 g.staggerIndex:k.count(ka):0;(n=0===aa)&&!g.skipBlocking&&ra.blockTransitions(l,9999);var r=z(l,T,ka,!Y),ga=r.maxDelay;W=Math.max(ga,0);D=r.maxDuration;var p={};p.hasTransitions=0<r.transitionDuration;p.hasAnimations=0<r.animationDuration;p.hasTransitionAll=p.hasTransitions&&"all"===r.transitionProperty;p.applyTransitionDuration=O&&(p.hasTransitions&&!p.hasTransitionAll||p.hasAnimations&&!p.hasTransitions);p.applyAnimationDuration=g.duration&&p.hasAnimations;p.applyTransitionDelay=ya(g.delay)&&(p.applyTransitionDuration||
1785 1990 p.hasTransitions);p.applyAnimationDelay=ya(g.delay)&&p.hasAnimations;p.recalculateTimingStyles=0<S.length;if(p.applyTransitionDuration||p.applyAnimationDuration)D=g.duration?parseFloat(g.duration):D,p.applyTransitionDuration&&(p.hasTransitions=!0,r.transitionDuration=D,B=0<l.style[M+"Property"].length,y.push(La(D,B))),p.applyAnimationDuration&&(p.hasAnimations=!0,r.animationDuration=D,y.push([Ca,D+"s"]));if(0===D&&!p.recalculateTimingStyles)return h();var ba=$(V,"-active");if(null!=g.delay){var ea;
1786 1991 "boolean"!==typeof g.delay&&(ea=parseFloat(g.delay),W=Math.max(ea,0));p.applyTransitionDelay&&y.push([na,ea+"s"]);p.applyAnimationDelay&&y.push([qa,ea+"s"])}null==g.duration&&0<r.transitionDuration&&(p.recalculateTimingStyles=p.recalculateTimingStyles||n);G=1E3*W;R=1E3*D;g.skipBlocking||(p.blockTransition=0<r.transitionDuration,p.blockKeyframeAnimation=0<r.animationDuration&&0<X.animationDelay&&0===X.animationDuration);g.from&&(g.cleanupStyles&&Ma(E,l,Object.keys(g.from)),Ia(a,g));p.blockTransition||
1787 1992 p.blockKeyframeAnimation?u(D):g.skipBlocking||ra.blockTransitions(l,!1);return{$$willAnimate:!0,end:e,start:function(){if(!P)return A={end:e,cancel:L,resume:null,pause:null},fa=new d(A),U(F),fa}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,f,k,e,Q){function L(a){return a.replace(/\bng-\S+\b/g,"")}function x(a,b){G(a)&&
1788 1993 (a=a.split(" "));G(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}function C(c,e,f){function k(a){var b={},c=K(a).getBoundingClientRect();s(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=H.scrollTop;break;case "left":d+=H.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function v(){var c=L(f.attr("class")||""),d=x(c,q),c=x(q,c),d=a(h,{to:k(f),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate?
1789 1994 d:null}function C(){h.remove();e.removeClass("ng-animate-shim");f.removeClass("ng-animate-shim")}var h=A(K(e).cloneNode(!0)),q=L(h.attr("class")||"");e.addClass("ng-animate-shim");f.addClass("ng-animate-shim");h.addClass("ng-anchor");u.append(h);var F;c=function(){var c=a(h,{addClass:"ng-anchor-out",delay:!0,from:k(e)});return c.$$willAnimate?c:null}();if(!c&&(F=v(),!F))return C();var g=c||F;return{start:function(){function a(){c&&c.end()}var b,c=g.start();c.done(function(){c=null;if(!F&&(F=v()))return c=
1790 1995 F.start(),c.done(function(){c=null;C();b.complete()}),c;C();b.complete()});return b=new d({end:a,cancel:a})}}}function z(a,b,c,e){var f=oa(a,N),k=oa(b,N),h=[];s(e,function(a){(a=C(c,a.out,a["in"]))&&h.push(a)});if(f||k||0!==h.length)return{start:function(){function a(){s(b,function(a){a.end()})}var b=[];f&&b.push(f.start());k&&b.push(k.start());s(h,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function oa(c){var d=c.element,e=c.options||
1791 1996 {};c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event&&(e.onDone=e.domOperation));e.preparationClasses&&(e.event=ba(e.event,e.preparationClasses));c=a(d,e);return c.$$willAnimate?c:null}if(!k.animations&&!k.transitions)return N;var H=Q[0].body;c=K(f);var u=A(c.parentNode&&11===c.parentNode.nodeType||H.contains(c)?c:H);return function(a){return a.from&&a.to?z(a.from,a.to,a.classes,a.anchors):oa(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=
1792 1997 ["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function f(c){c=Z(c)?c:c.split(" ");for(var d=[],f={},k=0;k<c.length;k++){var s=c[k],z=a.$$registeredAnimations[s];z&&!f[s]&&(d.push(b.get(z)),f[s]=!0)}return d}var k=aa(d);return function(a,b,d,x){function C(){x.domOperation();k(a,x)}function z(a,b,d,f,e){switch(d){case "animate":b=[b,f.from,f.to,e];break;case "setClass":b=[b,t,I,e];break;case "addClass":b=[b,t,e];break;case "removeClass":b=[b,I,e];break;default:b=[b,e]}b.push(f);if(a=a.apply(a,
1793 1998 b))if(Ea(a.start)&&(a=a.start()),a instanceof c)a.done(e);else if(Ea(a))return a;return N}function A(a,b,d,e,f){var h=[];s(e,function(e){var l=e[f];l&&h.push(function(){var e,f,h=!1,k=function(a){h||(h=!0,(f||N)(a),e.complete(!a))};e=new c({end:function(){k()},cancel:function(){k(!0)}});f=z(l,a,b,d,function(a){k(!1===a)});return e})});return h}function H(a,b,d,e,f){var h=A(a,b,d,e,f);if(0===h.length){var k,q;"beforeSetClass"===f?(k=A(a,"removeClass",d,e,"beforeRemoveClass"),q=A(a,"addClass",d,e,"beforeAddClass")):
1794 1999 "setClass"===f&&(k=A(a,"removeClass",d,e,"removeClass"),q=A(a,"addClass",d,e,"addClass"));k&&(h=h.concat(k));q&&(h=h.concat(q))}if(0!==h.length)return function(a){var b=[];h.length&&s(h,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){s(b,function(b){a?b.cancel():b.end()})}}}var u=!1;3===arguments.length&&ta(d)&&(x=d,d=null);x=pa(x);d||(d=a.attr("class")||"",x.addClass&&(d+=" "+x.addClass),x.removeClass&&(d+=" "+x.removeClass));var t=x.addClass,I=x.removeClass,G=f(d),K,v;if(G.length){var M,
1795 2000 h;"leave"===b?(h="leave",M="afterLeave"):(h="before"+b.charAt(0).toUpperCase()+b.substr(1),M=b);"enter"!==b&&"move"!==b&&(K=H(a,b,x,G,h));v=H(a,b,x,G,M)}if(K||v){var q;return{$$willAnimate:!0,end:function(){q?q.end():(u=!0,C(),ha(a,x),q=new c,q.complete(!0));return q},start:function(){function b(c){u=!0;C();ha(a,x);q.complete(c)}if(q)return q;q=new c;var d,f=[];K&&f.push(function(a){d=K(a)});f.length?f.push(function(a){C();a(!0)}):C();v&&f.push(function(a){d=v(a)});q.setHost({end:function(){u||((d||
1796 2001 N)(void 0),b(void 0))},cancel:function(){u||((d||N)(!0),b(!0))}});c.chain(f,b);return q}}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),e=d(a.to);if(b||e)return{start:function(){function a(){return function(){s(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());e&&
1797 2002 d.push(e.start());c.all(d,function(a){f.complete(a)});var f=new c({end:a(),cancel:a()});return f}}}else return d(a)}}]}])})(window,window.angular);
1798 2003 //# sourceMappingURL=angular-animate.min.js.map
1799 2004
1800 2005 ;/*
1801 2006 * angular-ui-bootstrap
1802 2007 * http://angular-ui.github.io/bootstrap/
1803 2008
1804 2009 * Version: 1.3.2 - 2016-04-14
1805 2010 * License: MIT
1806 */angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){if(a){var c=angular.element(b[0].querySelector("[uib-accordion-header]"));c.html(""),c.append(a)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;t.length;)t.shift()}function g(a){for(var b=0;b<q.length;b++)q[b].slide.active=b===a}function h(c,d,i){if(!u){if(angular.extend(c,{direction:i}),angular.extend(q[s].slide||{},{direction:i}),e.enabled(b)&&!a.$currentTransition&&q[d].element&&p.slides.length>1){q[d].element.data(r,c.direction);var j=p.getCurrentIndex();angular.isNumber(j)&&q[j].element&&q[j].element.data(r,c.direction),a.$currentTransition=!0,e.on("addClass",q[d].element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),t.length)){var d=t.pop().slide,g=d.index,i=g>p.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})}a.active=c.index,s=c.index,g(d),l()}}function i(a){for(var b=0;b<q.length;b++)if(q[b].slide===a)return b}function j(){n&&(c.cancel(n),n=null)}function k(b){b.length||(a.$currentTransition=null,f())}function l(){j();var b=+a.interval;!isNaN(b)&&b>0&&(n=c(m,b))}function m(){var b=+a.interval;o&&!isNaN(b)&&b>0&&q.length?a.next():a.pause()}var n,o,p=this,q=p.slides=a.slides=[],r="uib-slideDirection",s=a.active,t=[],u=!1;p.addSlide=function(b,c){q.push({slide:b,element:c}),q.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===q.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),s=b.index,a.active=b.index,g(s),p.select(q[i(b)]),1===q.length&&a.play())},p.getCurrentIndex=function(){for(var a=0;a<q.length;a++)if(q[a].slide.index===s)return a},p.next=a.next=function(){var b=(p.getCurrentIndex()+1)%q.length;return 0===b&&a.noWrap()?void a.pause():p.select(q[b],"next")},p.prev=a.prev=function(){var b=p.getCurrentIndex()-1<0?q.length-1:p.getCurrentIndex()-1;return a.noWrap()&&b===q.length-1?void a.pause():p.select(q[b],"prev")},p.removeSlide=function(b){var c=i(b),d=t.indexOf(q[c]);-1!==d&&t.splice(d,1),q.splice(c,1),q.length>0&&s===c?c>=q.length?(s=q.length-1,a.active=s,g(s),p.select(q[q.length-1])):(s=c,a.active=s,g(s),p.select(q[c])):s>c&&(s--,a.active=s),0===q.length&&(s=null,a.active=null,f())},p.select=a.select=function(b,c){var d=i(b.slide);void 0===c&&(c=d>p.getCurrentIndex()?"next":"prev"),b.slide.index===s||a.$currentTransition?b&&b.slide.index!==s&&a.$currentTransition&&t.push(q[d]):h(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===q.length-1&&a.noWrap()},a.pause=function(){a.noPause||(o=!1,j())},a.play=function(){o||(o=!0,l())},a.$on("$destroy",function(){u=!0,j()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",l),a.$watchCollection("slides",k),a.$watch("active",function(a){if(angular.isNumber(a)&&s!==a){for(var b=0;b<q.length;b++)if(q[b].slide.index===a){a=b;break}var c=q[a];c&&(g(a),p.select(q[a]),s=a)}})}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h<a.length;h++)g?("'"===a[h]&&(h+1<a.length&&"'"===a[h+1]?(a[h+1]="$",e[h+1]=""):(e[h]="",g=!1)),a[h]="$"):"'"===a[h]&&(a[h]="$",e[h]="",g=!0);a=a.join("")}return angular.forEach(n,function(d){var f=a.indexOf(d.key);if(f>-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,""));var h=d===f.length-1?g:"";return c.apply?b+c.apply.call(null,a)+h:b+h},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k){function l(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}var m=this,n={$setViewValue:angular.noop},o={},p=[];!!b.datepickerOptions;a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:h.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":m[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":m[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?m.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?m.startingDay=h.startingDay:m.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?m[b]=k.fromTimezone(new Date(a),o.timezone):(i&&f.warn("Literal date support has been deprecated, please switch to date object usage"),m[b]=new Date(g(a,"medium"))):m[b]=h[b]?k.fromTimezone(new Date(h[b]),o.timezone):null,m.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){m[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)<m.modes.indexOf(m[b])||"maxMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)>m.modes.indexOf(m[b]))&&(a.datepickerMode=m[b],a.datepickerOptions.datepickerMode=m[b])}):m[b]=a[b]=h[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&p.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,m.refreshView()})),a.isActive=function(b){return 0===m.compare(b.date,m.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){n=b,o=b.$options||h.ngModelOptions,a.datepickerOptions.initDate?(m.activeDate=k.fromTimezone(a.datepickerOptions.initDate,o.timezone)||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(n.$isEmpty(n.$modelValue)||n.$invalid)&&(m.activeDate=k.fromTimezone(a,o.timezone),m.refreshView())})):m.activeDate=new Date,this.activeDate=n.$modelValue?k.fromTimezone(new Date(n.$modelValue),o.timezone):k.fromTimezone(new Date,o.timezone),n.$render=function(){m.render()}},this.render=function(){if(n.$viewValue){var a=new Date(n.$viewValue),b=!isNaN(a);b?this.activeDate=k.fromTimezone(a,o.timezone):j||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=n.$viewValue?new Date(n.$viewValue):null;b=k.fromTimezone(b,o.timezone),n.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=n.$viewValue?new Date(n.$viewValue):null;d=k.fromTimezone(d,o.timezone);var e=new Date;e=k.fromTimezone(e,o.timezone);var f=this.compare(b,e),g={date:b,label:k.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),m.activeDate&&0===this.compare(g.date,m.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===m.minMode){var c=n.$viewValue?k.fromTimezone(new Date(n.$viewValue),o.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=k.toTimezone(c,o.timezone),n.$setViewValue(c),n.$render()}else m.activeDate=b,l(m.modes[m.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=m.activeDate.getFullYear()+a*(m.step.years||0),c=m.activeDate.getMonth()+a*(m.step.months||0);m.activeDate.setFullYear(b,c,1),m.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===m.maxMode&&1===b||a.datepickerMode===m.minMode&&-1===b||(l(m.modes[m.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var q=function(){m.element[0].focus()};a.$on("uib:datepicker.focus",q),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),m.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(m.isDisabled(m.activeDate))return;a.select(m.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(m.handleKeyDown(c,b),m.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;p.length;)p.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('<div class="uib-position-scrollbar-measure"></div>');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(f,g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX);
1807 },scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,w,a.date);if(isNaN(c))for(var d=0;d<I.length;d++)if(c=l.parse(b,I[d],a.date),!isNaN(c))return c;return c}function r(a){if(angular.isNumber(a)&&(a=new Date(a)),!a)return null;if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=q(a);if(!isNaN(b))return l.toTimezone(b,J)}return F.$options&&F.$options.allowInvalid?a:void 0}function s(a,b){var d=a||b;return c.ngRequired||d?(angular.isNumber(d)&&(d=new Date(d)),d?angular.isDate(d)&&!isNaN(d)?!0:angular.isString(d)?!isNaN(q(b)):!1:!0):!0}function t(c){if(a.isOpen||!a.disabled){var d=H[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}}function u(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}function v(){if(a.isOpen){var d=angular.element(H[0].querySelector(".uib-datepicker-popup")),e=c.popupPlacement?c.popupPlacement:m.placement,f=j.positionElements(b,d,e,y);d.css({top:f.top+"px",left:f.left+"px"}),d.hasClass("uib-position-measure")&&d.removeClass("uib-position-measure")}}var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K=!1,L=[];this.init=function(e){if(F=e,G=e.$options,x=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):m.closeOnDateSelection,y=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):m.appendToBody,z=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):m.onOpenFocus,A=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:m.datepickerPopupTemplateUrl,B=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:m.datepickerTemplateUrl,I=angular.isDefined(c.altInputFormats)?a.$parent.$eval(c.altInputFormats):m.altInputFormats,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):m.showButtonBar,m.html5Types[c.type]?(w=m.html5Types[c.type],K=!0):(w=c.uibDatepickerPopup||m.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||m.datepickerPopup;if(c!==w&&(w=c,F.$modelValue=null,!w))throw new Error("uibDatepickerPopup must have a date format specified.")})),!w)throw new Error("uibDatepickerPopup must have a date format specified.");if(K&&c.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");C=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),G?(J=G.timezone,a.ngModelOptions=angular.copy(G),a.ngModelOptions.timezone=null,a.ngModelOptions.updateOnDefault===!0&&(a.ngModelOptions.updateOn=a.ngModelOptions.updateOn?a.ngModelOptions.updateOn+" default":"default"),C.attr("ng-model-options","ngModelOptions")):J=null,C.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":A}),D=angular.element(C.children()[0]),D.attr("template-url",B),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),D.attr("datepicker-options","datepickerOptions"),K?F.$formatters.push(function(b){return a.date=l.fromTimezone(b,J),b}):(F.$$parserName="date",F.$validators.date=s,F.$parsers.unshift(r),F.$formatters.push(function(b){return F.$isEmpty(b)?(a.date=b,b):(a.date=l.fromTimezone(b,J),angular.isNumber(a.date)&&(a.date=new Date(a.date)),l.filter(a.date,w))})),F.$viewChangeListeners.push(function(){a.date=q(F.$viewValue)}),b.on("keydown",u),H=d(C)(a),C.remove(),y?h.find("body").append(H):b.after(H),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),H.remove(),b.off("keydown",u),h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,J));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=l.fromTimezone(new Date(a.datepickerOptions[b]),J):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?l.filter(a.date,w):null;b.val(d),F.$setViewValue(d),x&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):b=new Date(d.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),z&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;y||j.parsePlacement(d)[2]?(E=E||angular.element(j.scrollParent(b)),E&&E.on("scroll",v)):E=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),E&&E.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b,f){c||(a.on("click",d),f.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b,f){c===b&&(c=null,a.off("click",d),f.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(a.stopPropagation(),c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen,angular.isFunction(r)&&r(o,o.isOpen),o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b,x=w.hasClass(u?p:q);if(x===!c&&g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o,b);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var y=angular.element('<ul class="dropdown-menu"></ul>');n.dropdownMenu.replaceWith(y),n.dropdownMenu=y}f.close(o,b),n.selectedOption=null}angular.isFunction(r)&&r(a,c)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b===a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b===a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap","ui.bootstrap.position"]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}).provider("$uibResolve",function(){var a=this;this.resolver=null,this.setResolver=function(a){this.resolver=a},this.$get=["$injector","$q",function(b,c){var d=a.resolver?b.get(a.resolver):null;return{resolve:function(a,e,f,g){if(d)return d.resolve(a,e,f,g);var h=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?h.push(c.resolve(b.invoke(a))):angular.isString(a)?h.push(c.resolve(b.get(a))):h.push(c.resolve(a))}),c.all(h).then(function(b){var c={},d=0;return angular.forEach(a,function(a,e){c[e]=b[d++]}),c})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(a,b,c){function d(b,d,e){e.modalInClass&&(a.addClass(d,e.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(c,f){var g=f();b.modalOptions.animation?a.removeClass(d,e.modalInClass).then(g):g()}))}return{replace:!0,templateUrl:"uib/template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(a,b,c,d){return{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/modal/window.html"},link:function(e,f,g){f.addClass(g.windowClass||""),f.addClass(g.windowTopClass||""),e.size=g.size,e.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},f.on("click",e.close),e.$isRendered=!0;var h=b.defer();g.$observe("modalRender",function(a){"true"===a&&h.resolve()}),h.promise.then(function(){var h=null;g.modalInClass&&(h=c(f,{addClass:g.modalInClass}).start(),e.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();c(f,{removeClass:g.modalInClass}).start().then(d)})),b.when(h).then(function(){var b=a.getTop();if(b&&a.modalRendered(b.key),!d[0].activeElement||!f[0].contains(d[0].activeElement)){var c=f[0].querySelector("[autofocus]");c?c.focus():f[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",function(){return{link:function(a,b,c,d,e){e(a.$parent,function(a){b.empty(),b.append(a)})}}}).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(a,b,c,d,e,f,g,h,i){function j(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function k(){for(var a=-1,b=v.keys(),c=0;c<b.length;c++)v.get(b[c]).value.backdrop&&(a=c);return a>-1&&y>a&&(a=y),a}function l(a,b){var c=v.get(a).value,d=c.appendTo;v.remove(a),z=v.top(),z&&(y=parseInt(z.value.modalDomEl.attr("index"),10)),o(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||u;w.remove(b,a);var e=w.hasKey(b);d.toggleClass(b,e),!e&&t&&t.heightOverflow&&t.scrollbarWidth&&(t.originalRight?d.css({paddingRight:t.originalRight+"px"}):d.css({paddingRight:""}),t=null),m(!0)},c.closedDeferred),n(),b&&b.focus?b.focus():d.focus&&d.focus()}function m(a){var b;v.length()>0&&(b=v.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function n(){if(r&&-1===k()){var a=s;o(r,s,function(){a=null}),r=void 0,s=void 0}}function o(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){b.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(x.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function p(a){if(a.isDefaultPrevented())return a;var b=v.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){x.dismiss(b.key,"escape key press")}));break;case 9:var c=x.loadFocusElementList(b),d=!1;a.shiftKey?(x.isFocusInFirstItem(a,c)||x.isModalFocused(a,b))&&(d=x.focusLastFocusableElement(c)):x.isFocusInLastItem(a,c)&&(d=x.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function q(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var r,s,t,u="modal-open",v=h.createNew(),w=g.createNew(),x={NOW_CLOSING_EVENT:"modal.stack.now-closing"},y=0,z=null,A="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(k,function(a){s&&(s.index=a)}),c.on("keydown",p),e.$on("$destroy",function(){c.off("keydown",p)}),x.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||u;m(!1),z=v.top(),v.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),w.put(h,b);var j=f.appendTo,l=k();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!r&&(s=e.$new(!0),s.modalOptions=f,s.index=l,r=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>'),r.attr("backdrop-class",f.backdropClass),f.animation&&r.attr("modal-animation","true"),d(r)(s),a.enter(r,j),t=i.scrollbarPadding(j),t.heightOverflow&&t.scrollbarWidth&&j.css({paddingRight:t.right+"px"})),y=z?parseInt(z.value.modalDomEl.attr("index"),10)+1:0;var n=angular.element('<div uib-modal-window="modal-window"></div>');n.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:y,animate:"animate"}).html(f.content),f.animation&&n.attr("modal-animation","true"),j.addClass(h),a.enter(d(n)(f.scope),j),v.top().value.modalDomEl=n,v.top().value.modalOpener=g},x.close=function(a,b){var c=v.get(a);return c&&q(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),l(a,c.value.modalOpener),!0):!c},x.dismiss=function(a,b){var c=v.get(a);return c&&q(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),l(a,c.value.modalOpener),!0):!c},x.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},x.getTop=function(){return v.top()},x.modalRendered=function(a){var b=v.get(a);b&&b.value.renderDeferred.resolve()},x.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},x.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},x.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},x.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},x.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},x.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(A);return c?Array.prototype.filter.call(c,function(a){return j(a)}):c}}},x}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i,j={};e.controller&&(j.$scope=d,j.$uibModalInstance=p,angular.forEach(a[1],function(a,b){j[b]=a}),i=f(e.controller,j,!0),e.controllerAs?(g=i.instance,e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),g=i(),d[e.controllerAs]=g):g=i(),angular.isFunction(g.$onInit)&&g.$onInit()),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"Β« Previous",nextText:"Next Β»",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup uib-title="'+r+"title"+s+'" '+(n.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'placement="'+r+"placement"+s+'" popup-class="'+r+"popupClass"+s+'" animation="animation" is-open="isOpen" origin-scope="origScope" class="uib-position-measure"></div>';
1808 return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){N.isOpen?q():m()}function m(){M&&!a.$eval(d[k+"Enable"])||(u(),x(),N.popupDelay?G||(G=g(r,N.popupDelay,!1)):r())}function q(){s(),N.popupCloseDelay?H||(H=g(t,N.popupCloseDelay,!1)):t()}function r(){return s(),u(),N.content?(v(),void N.$evalAsync(function(){N.isOpen=!0,y(!0),S()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){N&&N.$evalAsync(function(){N&&(N.isOpen=!1,y(!1),N.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=N.$new(),D=c(E,function(a){K?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){N.title=d[k+"Title"],Q?N.content=Q(a):N.content=d[e],N.popupClass=d[k+"Class"],N.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(N.placement);J=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);N.popupDelay=isNaN(c)?n.popupDelay:c,N.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){P&&angular.isFunction(P.assign)&&P.assign(a,b)}function z(){R.length=0,Q?(R.push(a.$watch(Q,function(a){N.content=a,!a&&N.isOpen&&t()})),R.push(E.$watch(function(){O||(O=!0,E.$$postDigest(function(){O=!1,N&&N.isOpen&&S()}))}))):R.push(d.$observe(e,function(a){N.content=a,!a&&N.isOpen?t():S()})),R.push(d.$observe(k+"Title",function(a){N.title=a,N.isOpen&&S()})),R.push(d.$observe(k+"Placement",function(a){N.placement=a?a:n.placement,N.isOpen&&S()}))}function A(){R.length&&(angular.forEach(R,function(a){a()}),R.length=0)}function B(a){N&&N.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];T(),L=p(a),"none"!==L.show&&L.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===L.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(L.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J,K=angular.isDefined(n.appendToBody)?n.appendToBody:!1,L=p(void 0),M=angular.isDefined(d[k+"Enable"]),N=a.$new(!0),O=!1,P=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,Q=n.useContentExp?l(d[e]):!1,R=[],S=function(){D&&D.html()&&(I||(I=g(function(){var a=i.positionElements(b,D,N.placement,K);D.css({top:a.top+"px",left:a.left+"px"}),D.hasClass(a.placement.split("-")[0])||(D.removeClass(J.split("-")[0]),D.addClass(a.placement.split("-")[0])),D.hasClass(n.placementClassPrefix+a.placement)||(D.removeClass(n.placementClassPrefix+J),D.addClass(n.placementClassPrefix+a.placement)),D.hasClass("uib-position-measure")?(i.positionArrow(D,a.placement),D.removeClass("uib-position-measure")):J!==a.placement&&i.positionArrow(D,a.placement),J=a.placement,I=null},0,!1)))};N.origScope=a,N.isOpen=!1,o.add(N,{close:t}),N.contentExp=function(){return N.content},d.$observe("disabled",function(a){a&&s(),a&&N.isOpen&&t()}),P&&a.$watch(P,function(a){N&&!a===N.isOpen&&j()});var T=function(){L.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),L.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var U=a.$eval(d[k+"Animation"]);N.animation=angular.isDefined(U)?!!U:n.animation;var V,W=k+"AppendToBody";V=W in d&&void 0===d[W]?!0:a.$eval(d[W]),K=angular.isDefined(V)?V:K,a.$on("$destroy",function(){T(),w(),o.remove(N),N=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{uibTitle:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",uibTitle:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{uibTitle:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;b<d.tabs.length;b++)if(d.tabs[b].index===a)return b}var c,d=this;d.tabs=[],d.select=function(a,f){if(!e){var g=b(c),h=d.tabs[g];if(h){if(h.tab.onDeselect({$event:f}),f&&f.isDefaultPrevented())return;h.tab.active=!1}var i=d.tabs[a];i?(i.tab.onSelect({$event:f}),i.tab.active=!0,d.active=i.index,c=i.index):!i&&angular.isNumber(c)&&(d.active=null,c=null)}},d.addTab=function(a){if(d.tabs.push({tab:a,index:a.index}),d.tabs.sort(function(a,b){return a.index>b.index?1:a.index<b.index?-1:0}),a.index===d.active||!angular.isNumber(d.active)&&1===d.tabs.length){var c=b(a.index);d.select(c)}},d.removeTab=function(a){for(var b,c=0;c<d.tabs.length;c++)if(d.tabs[c].tab===a){b=c;break}if(d.tabs[b].index===d.active){var e=b===d.tabs.length-1?b-1:b+1%d.tabs.length;d.select(e)}d.tabs.splice(b,1)},a.$watch("tabset.active",function(a){angular.isNumber(a)&&a!==c&&d.select(b(a))});var e;a.$on("$destroy",function(){e=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tabset.html"},link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1,angular.isUndefined(c.active)&&(a.active=0)}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),angular.isUndefined(d.index)&&(e.tabs&&e.tabs.length?b.index=Math.max.apply(null,e.tabs.map(function(a){return a.index}))+1:b.index=0),angular.isUndefined(d.classes)&&(b.classes=""),b.select=function(a){if(!b.disabled){for(var c,d=0;d<e.tabs.length;d++)if(e.tabs[d].tab===b){c=d;break}e.select(c,a)}},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase()||"uib:tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude).tab;e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===v[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),u.$setViewValue(new Date(s)),n(a)}function m(){u.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(u.$modelValue){var c=s.getHours(),d=s.getMinutes(),e=s.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!w),"m"!==b&&(a.minutes=k(d)),a.meridian=s.getHours()<12?v[0]:v[1],"s"!==b&&(a.seconds=k(e)),a.meridian=s.getHours()<12?v[0]:v[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=v[0]}function o(a){s=q(s,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s=new Date,t=[],u={$setViewValue:angular.noop},v=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,w=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){u=b,u.$render=this.render,u.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var x=g.hourStep;c.hourStep&&t.push(a.$parent.$watch(d(c.hourStep),function(a){x=+a}));var y=g.minuteStep;c.minuteStep&&t.push(a.$parent.$watch(d(c.minuteStep),function(a){y=+a}));var z;t.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);z=isNaN(b)?void 0:b}));var A;t.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);A=isNaN(b)?void 0:b}));var B=!1;c.ngDisabled&&t.push(a.$parent.$watch(d(c.ngDisabled),function(a){B=a})),a.noIncrementHours=function(){var a=p(s,60*x);return B||a>A||s>a&&z>a},a.noDecrementHours=function(){var a=p(s,60*-x);return B||z>a||a>s&&a>A},a.noIncrementMinutes=function(){var a=p(s,y);return B||a>A||s>a&&z>a},a.noDecrementMinutes=function(){var a=p(s,-y);return B||z>a||a>s&&a>A},a.noIncrementSeconds=function(){var a=q(s,C);return B||a>A||s>a&&z>a},a.noDecrementSeconds=function(){var a=q(s,-C);return B||z>a||a>s&&a>A},a.noToggleMeridian=function(){return s.getHours()<12?B||p(s,720)>A:B||p(s,-720)<z};var C=g.secondStep;c.secondStep&&t.push(a.$parent.$watch(d(c.secondStep),function(a){C=+a})),a.showSeconds=g.showSeconds,c.showSeconds&&t.push(a.$parent.$watch(d(c.showSeconds),function(b){a.showSeconds=!!b})),a.showMeridian=g.showMeridian,c.showMeridian&&t.push(a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,u.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(s.setHours(c),l())}else n()})),this.setupMousewheelEvents=function(b,c,d){var e=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){B||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){B||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){u.$setViewValue(null),u.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(a),s.setMinutes(b),z>s||s>A?e(!0):l("h")):e(!0)},b.bind("blur",function(b){u.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!w)})}),a.updateMinutes=function(){var a=i(),b=h();u.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(s.setHours(b),s.setMinutes(a),z>s||s>A?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){u.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();u.$setDirty(),angular.isDefined(a)?(s.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=u.$viewValue;isNaN(b)?(u.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(s=b),z>s||s>A?(u.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*x*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-x*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*y)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-y)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(C)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-C)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(s.getHours()<12?60:-60)):a.meridian=a.meridian===v[0]?v[1]:v[0])},a.blur=function(){u.$setTouched()},a.$on("$destroy",function(){for(;t.length;)t.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1),a.$watch(c.typeaheadMinLength,function(a){t=a||0===a?a:1});var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("<div></div>"),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.attr("tabindex","-1"),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("<div uib-typeahead-popup></div>");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h<f.length;h++)e[M.itemName]=f[h],N.matches.push({id:V(h),label:M.viewMapper(N,e),model:f[h]});if(N.query=c,o(),b.attr("aria-expanded",!0),G&&1===N.matches.length&&W(c,0)&&(angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(0,d)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(0,d)),I){var i=N.matches[0].label;angular.isString(c)&&c.length>0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==N.matches.length&&-1!==r.indexOf(b.which)){if(-1===N.activeIdx&&(9===b.which||13===b.which)||9===b.which&&b.shiftKey)return U(),void N.$digest();b.preventDefault();var c;switch(b.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,b)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,b)});break;case 27:b.stopPropagation(),U(),a.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$setViewValue(),p.$setValidity("editable",!0),p.$setValidity("parse",!0),b.val("")),w=!1,x=!1});var aa=function(c){b[0]!==c.target&&3!==c.which&&0!==N.matches.length&&(U(),j.$$phase||a.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'<div class="panel" ng-class="panelClass || \'panel-default\'">\n <div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <div class="carousel-inner" ng-transclude></div>\n <a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n </a>\n <a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n </a>\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n </ol>\n</div>\n');
1809 }]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'<div ng-class="{\n \'active\': active\n }" class="item text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'<div class="uib-datepicker" ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'<table class="uib-daypicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'<table class="uib-monthpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'<table class="uib-yearpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepickerPopup/popup.html",'<div>\n <ul class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n </ul>\n</div>\n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'<div class="modal-backdrop"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n <div class="modal-dialog {{size ? \'modal-\' + size : \'\'}}"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0});
2011 */angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
2012 angular.module("ui.bootstrap.tpls", ["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]);
2013 angular.module('ui.bootstrap.collapse', [])
2014
2015 .directive('uibCollapse', ['$animate', '$q', '$parse', '$injector', function($animate, $q, $parse, $injector) {
2016 var $animateCss = $injector.has('$animateCss') ? $injector.get('$animateCss') : null;
2017 return {
2018 link: function(scope, element, attrs) {
2019 var expandingExpr = $parse(attrs.expanding),
2020 expandedExpr = $parse(attrs.expanded),
2021 collapsingExpr = $parse(attrs.collapsing),
2022 collapsedExpr = $parse(attrs.collapsed);
2023
2024 if (!scope.$eval(attrs.uibCollapse)) {
2025 element.addClass('in')
2026 .addClass('collapse')
2027 .attr('aria-expanded', true)
2028 .attr('aria-hidden', false)
2029 .css({height: 'auto'});
2030 }
2031
2032 function expand() {
2033 if (element.hasClass('collapse') && element.hasClass('in')) {
2034 return;
2035 }
2036
2037 $q.resolve(expandingExpr(scope))
2038 .then(function() {
2039 element.removeClass('collapse')
2040 .addClass('collapsing')
2041 .attr('aria-expanded', true)
2042 .attr('aria-hidden', false);
2043
2044 if ($animateCss) {
2045 $animateCss(element, {
2046 addClass: 'in',
2047 easing: 'ease',
2048 to: { height: element[0].scrollHeight + 'px' }
2049 }).start()['finally'](expandDone);
2050 } else {
2051 $animate.addClass(element, 'in', {
2052 to: { height: element[0].scrollHeight + 'px' }
2053 }).then(expandDone);
2054 }
2055 });
2056 }
2057
2058 function expandDone() {
2059 element.removeClass('collapsing')
2060 .addClass('collapse')
2061 .css({height: 'auto'});
2062 expandedExpr(scope);
2063 }
2064
2065 function collapse() {
2066 if (!element.hasClass('collapse') && !element.hasClass('in')) {
2067 return collapseDone();
2068 }
2069
2070 $q.resolve(collapsingExpr(scope))
2071 .then(function() {
2072 element
2073 // IMPORTANT: The height must be set before adding "collapsing" class.
2074 // Otherwise, the browser attempts to animate from height 0 (in
2075 // collapsing class) to the given height here.
2076 .css({height: element[0].scrollHeight + 'px'})
2077 // initially all panel collapse have the collapse class, this removal
2078 // prevents the animation from jumping to collapsed state
2079 .removeClass('collapse')
2080 .addClass('collapsing')
2081 .attr('aria-expanded', false)
2082 .attr('aria-hidden', true);
2083
2084 if ($animateCss) {
2085 $animateCss(element, {
2086 removeClass: 'in',
2087 to: {height: '0'}
2088 }).start()['finally'](collapseDone);
2089 } else {
2090 $animate.removeClass(element, 'in', {
2091 to: {height: '0'}
2092 }).then(collapseDone);
2093 }
2094 });
2095 }
2096
2097 function collapseDone() {
2098 element.css({height: '0'}); // Required so that collapse works when animation is disabled
2099 element.removeClass('collapsing')
2100 .addClass('collapse');
2101 collapsedExpr(scope);
2102 }
2103
2104 scope.$watch(attrs.uibCollapse, function(shouldCollapse) {
2105 if (shouldCollapse) {
2106 collapse();
2107 } else {
2108 expand();
2109 }
2110 });
2111 }
2112 };
2113 }]);
2114
2115 angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
2116
2117 .constant('uibAccordionConfig', {
2118 closeOthers: true
2119 })
2120
2121 .controller('UibAccordionController', ['$scope', '$attrs', 'uibAccordionConfig', function($scope, $attrs, accordionConfig) {
2122 // This array keeps track of the accordion groups
2123 this.groups = [];
2124
2125 // Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to
2126 this.closeOthers = function(openGroup) {
2127 var closeOthers = angular.isDefined($attrs.closeOthers) ?
2128 $scope.$eval($attrs.closeOthers) : accordionConfig.closeOthers;
2129 if (closeOthers) {
2130 angular.forEach(this.groups, function(group) {
2131 if (group !== openGroup) {
2132 group.isOpen = false;
2133 }
2134 });
2135 }
2136 };
2137
2138 // This is called from the accordion-group directive to add itself to the accordion
2139 this.addGroup = function(groupScope) {
2140 var that = this;
2141 this.groups.push(groupScope);
2142
2143 groupScope.$on('$destroy', function(event) {
2144 that.removeGroup(groupScope);
2145 });
2146 };
2147
2148 // This is called from the accordion-group directive when to remove itself
2149 this.removeGroup = function(group) {
2150 var index = this.groups.indexOf(group);
2151 if (index !== -1) {
2152 this.groups.splice(index, 1);
2153 }
2154 };
2155 }])
2156
2157 // The accordion directive simply sets up the directive controller
2158 // and adds an accordion CSS class to itself element.
2159 .directive('uibAccordion', function() {
2160 return {
2161 controller: 'UibAccordionController',
2162 controllerAs: 'accordion',
2163 transclude: true,
2164 templateUrl: function(element, attrs) {
2165 return attrs.templateUrl || 'uib/template/accordion/accordion.html';
2166 }
2167 };
2168 })
2169
2170 // The accordion-group directive indicates a block of html that will expand and collapse in an accordion
2171 .directive('uibAccordionGroup', function() {
2172 return {
2173 require: '^uibAccordion', // We need this directive to be inside an accordion
2174 transclude: true, // It transcludes the contents of the directive into the template
2175 replace: true, // The element containing the directive will be replaced with the template
2176 templateUrl: function(element, attrs) {
2177 return attrs.templateUrl || 'uib/template/accordion/accordion-group.html';
2178 },
2179 scope: {
2180 heading: '@', // Interpolate the heading attribute onto this scope
2181 panelClass: '@?', // Ditto with panelClass
2182 isOpen: '=?',
2183 isDisabled: '=?'
2184 },
2185 controller: function() {
2186 this.setHeading = function(element) {
2187 this.heading = element;
2188 };
2189 },
2190 link: function(scope, element, attrs, accordionCtrl) {
2191 accordionCtrl.addGroup(scope);
2192
2193 scope.openClass = attrs.openClass || 'panel-open';
2194 scope.panelClass = attrs.panelClass || 'panel-default';
2195 scope.$watch('isOpen', function(value) {
2196 element.toggleClass(scope.openClass, !!value);
2197 if (value) {
2198 accordionCtrl.closeOthers(scope);
2199 }
2200 });
2201
2202 scope.toggleOpen = function($event) {
2203 if (!scope.isDisabled) {
2204 if (!$event || $event.which === 32) {
2205 scope.isOpen = !scope.isOpen;
2206 }
2207 }
2208 };
2209
2210 var id = 'accordiongroup-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
2211 scope.headingId = id + '-tab';
2212 scope.panelId = id + '-panel';
2213 }
2214 };
2215 })
2216
2217 // Use accordion-heading below an accordion-group to provide a heading containing HTML
2218 .directive('uibAccordionHeading', function() {
2219 return {
2220 transclude: true, // Grab the contents to be used as the heading
2221 template: '', // In effect remove this element!
2222 replace: true,
2223 require: '^uibAccordionGroup',
2224 link: function(scope, element, attrs, accordionGroupCtrl, transclude) {
2225 // Pass the heading to the accordion-group controller
2226 // so that it can be transcluded into the right place in the template
2227 // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
2228 accordionGroupCtrl.setHeading(transclude(scope, angular.noop));
2229 }
2230 };
2231 })
2232
2233 // Use in the accordion-group template to indicate where you want the heading to be transcluded
2234 // You must provide the property on the accordion-group controller that will hold the transcluded element
2235 .directive('uibAccordionTransclude', function() {
2236 return {
2237 require: '^uibAccordionGroup',
2238 link: function(scope, element, attrs, controller) {
2239 scope.$watch(function() { return controller[attrs.uibAccordionTransclude]; }, function(heading) {
2240 if (heading) {
2241 var elem = angular.element(element[0].querySelector('[uib-accordion-header]'));
2242 elem.html('');
2243 elem.append(heading);
2244 }
2245 });
2246 }
2247 };
2248 });
2249
2250 angular.module('ui.bootstrap.alert', [])
2251
2252 .controller('UibAlertController', ['$scope', '$attrs', '$interpolate', '$timeout', function($scope, $attrs, $interpolate, $timeout) {
2253 $scope.closeable = !!$attrs.close;
2254
2255 var dismissOnTimeout = angular.isDefined($attrs.dismissOnTimeout) ?
2256 $interpolate($attrs.dismissOnTimeout)($scope.$parent) : null;
2257
2258 if (dismissOnTimeout) {
2259 $timeout(function() {
2260 $scope.close();
2261 }, parseInt(dismissOnTimeout, 10));
2262 }
2263 }])
2264
2265 .directive('uibAlert', function() {
2266 return {
2267 controller: 'UibAlertController',
2268 controllerAs: 'alert',
2269 templateUrl: function(element, attrs) {
2270 return attrs.templateUrl || 'uib/template/alert/alert.html';
2271 },
2272 transclude: true,
2273 replace: true,
2274 scope: {
2275 type: '@',
2276 close: '&'
2277 }
2278 };
2279 });
2280
2281 angular.module('ui.bootstrap.buttons', [])
2282
2283 .constant('uibButtonConfig', {
2284 activeClass: 'active',
2285 toggleEvent: 'click'
2286 })
2287
2288 .controller('UibButtonsController', ['uibButtonConfig', function(buttonConfig) {
2289 this.activeClass = buttonConfig.activeClass || 'active';
2290 this.toggleEvent = buttonConfig.toggleEvent || 'click';
2291 }])
2292
2293 .directive('uibBtnRadio', ['$parse', function($parse) {
2294 return {
2295 require: ['uibBtnRadio', 'ngModel'],
2296 controller: 'UibButtonsController',
2297 controllerAs: 'buttons',
2298 link: function(scope, element, attrs, ctrls) {
2299 var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
2300 var uncheckableExpr = $parse(attrs.uibUncheckable);
2301
2302 element.find('input').css({display: 'none'});
2303
2304 //model -> UI
2305 ngModelCtrl.$render = function() {
2306 element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.uibBtnRadio)));
2307 };
2308
2309 //ui->model
2310 element.on(buttonsCtrl.toggleEvent, function() {
2311 if (attrs.disabled) {
2312 return;
2313 }
2314
2315 var isActive = element.hasClass(buttonsCtrl.activeClass);
2316
2317 if (!isActive || angular.isDefined(attrs.uncheckable)) {
2318 scope.$apply(function() {
2319 ngModelCtrl.$setViewValue(isActive ? null : scope.$eval(attrs.uibBtnRadio));
2320 ngModelCtrl.$render();
2321 });
2322 }
2323 });
2324
2325 if (attrs.uibUncheckable) {
2326 scope.$watch(uncheckableExpr, function(uncheckable) {
2327 attrs.$set('uncheckable', uncheckable ? '' : undefined);
2328 });
2329 }
2330 }
2331 };
2332 }])
2333
2334 .directive('uibBtnCheckbox', function() {
2335 return {
2336 require: ['uibBtnCheckbox', 'ngModel'],
2337 controller: 'UibButtonsController',
2338 controllerAs: 'button',
2339 link: function(scope, element, attrs, ctrls) {
2340 var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
2341
2342 element.find('input').css({display: 'none'});
2343
2344 function getTrueValue() {
2345 return getCheckboxValue(attrs.btnCheckboxTrue, true);
2346 }
2347
2348 function getFalseValue() {
2349 return getCheckboxValue(attrs.btnCheckboxFalse, false);
2350 }
2351
2352 function getCheckboxValue(attribute, defaultValue) {
2353 return angular.isDefined(attribute) ? scope.$eval(attribute) : defaultValue;
2354 }
2355
2356 //model -> UI
2357 ngModelCtrl.$render = function() {
2358 element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
2359 };
2360
2361 //ui->model
2362 element.on(buttonsCtrl.toggleEvent, function() {
2363 if (attrs.disabled) {
2364 return;
2365 }
2366
2367 scope.$apply(function() {
2368 ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue());
2369 ngModelCtrl.$render();
2370 });
2371 });
2372 }
2373 };
2374 });
2375
2376 angular.module('ui.bootstrap.carousel', [])
2377
2378 .controller('UibCarouselController', ['$scope', '$element', '$interval', '$timeout', '$animate', function($scope, $element, $interval, $timeout, $animate) {
2379 var self = this,
2380 slides = self.slides = $scope.slides = [],
2381 SLIDE_DIRECTION = 'uib-slideDirection',
2382 currentIndex = $scope.active,
2383 currentInterval, isPlaying, bufferedTransitions = [];
2384
2385 var destroyed = false;
2386
2387 self.addSlide = function(slide, element) {
2388 slides.push({
2389 slide: slide,
2390 element: element
2391 });
2392 slides.sort(function(a, b) {
2393 return +a.slide.index - +b.slide.index;
2394 });
2395 //if this is the first slide or the slide is set to active, select it
2396 if (slide.index === $scope.active || slides.length === 1 && !angular.isNumber($scope.active)) {
2397 if ($scope.$currentTransition) {
2398 $scope.$currentTransition = null;
2399 }
2400
2401 currentIndex = slide.index;
2402 $scope.active = slide.index;
2403 setActive(currentIndex);
2404 self.select(slides[findSlideIndex(slide)]);
2405 if (slides.length === 1) {
2406 $scope.play();
2407 }
2408 }
2409 };
2410
2411 self.getCurrentIndex = function() {
2412 for (var i = 0; i < slides.length; i++) {
2413 if (slides[i].slide.index === currentIndex) {
2414 return i;
2415 }
2416 }
2417 };
2418
2419 self.next = $scope.next = function() {
2420 var newIndex = (self.getCurrentIndex() + 1) % slides.length;
2421
2422 if (newIndex === 0 && $scope.noWrap()) {
2423 $scope.pause();
2424 return;
2425 }
2426
2427 return self.select(slides[newIndex], 'next');
2428 };
2429
2430 self.prev = $scope.prev = function() {
2431 var newIndex = self.getCurrentIndex() - 1 < 0 ? slides.length - 1 : self.getCurrentIndex() - 1;
2432
2433 if ($scope.noWrap() && newIndex === slides.length - 1) {
2434 $scope.pause();
2435 return;
2436 }
2437
2438 return self.select(slides[newIndex], 'prev');
2439 };
2440
2441 self.removeSlide = function(slide) {
2442 var index = findSlideIndex(slide);
2443
2444 var bufferedIndex = bufferedTransitions.indexOf(slides[index]);
2445 if (bufferedIndex !== -1) {
2446 bufferedTransitions.splice(bufferedIndex, 1);
2447 }
2448
2449 //get the index of the slide inside the carousel
2450 slides.splice(index, 1);
2451 if (slides.length > 0 && currentIndex === index) {
2452 if (index >= slides.length) {
2453 currentIndex = slides.length - 1;
2454 $scope.active = currentIndex;
2455 setActive(currentIndex);
2456 self.select(slides[slides.length - 1]);
2457 } else {
2458 currentIndex = index;
2459 $scope.active = currentIndex;
2460 setActive(currentIndex);
2461 self.select(slides[index]);
2462 }
2463 } else if (currentIndex > index) {
2464 currentIndex--;
2465 $scope.active = currentIndex;
2466 }
2467
2468 //clean the active value when no more slide
2469 if (slides.length === 0) {
2470 currentIndex = null;
2471 $scope.active = null;
2472 clearBufferedTransitions();
2473 }
2474 };
2475
2476 /* direction: "prev" or "next" */
2477 self.select = $scope.select = function(nextSlide, direction) {
2478 var nextIndex = findSlideIndex(nextSlide.slide);
2479 //Decide direction if it's not given
2480 if (direction === undefined) {
2481 direction = nextIndex > self.getCurrentIndex() ? 'next' : 'prev';
2482 }
2483 //Prevent this user-triggered transition from occurring if there is already one in progress
2484 if (nextSlide.slide.index !== currentIndex &&
2485 !$scope.$currentTransition) {
2486 goNext(nextSlide.slide, nextIndex, direction);
2487 } else if (nextSlide && nextSlide.slide.index !== currentIndex && $scope.$currentTransition) {
2488 bufferedTransitions.push(slides[nextIndex]);
2489 }
2490 };
2491
2492 /* Allow outside people to call indexOf on slides array */
2493 $scope.indexOfSlide = function(slide) {
2494 return +slide.slide.index;
2495 };
2496
2497 $scope.isActive = function(slide) {
2498 return $scope.active === slide.slide.index;
2499 };
2500
2501 $scope.isPrevDisabled = function() {
2502 return $scope.active === 0 && $scope.noWrap();
2503 };
2504
2505 $scope.isNextDisabled = function() {
2506 return $scope.active === slides.length - 1 && $scope.noWrap();
2507 };
2508
2509 $scope.pause = function() {
2510 if (!$scope.noPause) {
2511 isPlaying = false;
2512 resetTimer();
2513 }
2514 };
2515
2516 $scope.play = function() {
2517 if (!isPlaying) {
2518 isPlaying = true;
2519 restartTimer();
2520 }
2521 };
2522
2523 $scope.$on('$destroy', function() {
2524 destroyed = true;
2525 resetTimer();
2526 });
2527
2528 $scope.$watch('noTransition', function(noTransition) {
2529 $animate.enabled($element, !noTransition);
2530 });
2531
2532 $scope.$watch('interval', restartTimer);
2533
2534 $scope.$watchCollection('slides', resetTransition);
2535
2536 $scope.$watch('active', function(index) {
2537 if (angular.isNumber(index) && currentIndex !== index) {
2538 for (var i = 0; i < slides.length; i++) {
2539 if (slides[i].slide.index === index) {
2540 index = i;
2541 break;
2542 }
2543 }
2544
2545 var slide = slides[index];
2546 if (slide) {
2547 setActive(index);
2548 self.select(slides[index]);
2549 currentIndex = index;
2550 }
2551 }
2552 });
2553
2554 function clearBufferedTransitions() {
2555 while (bufferedTransitions.length) {
2556 bufferedTransitions.shift();
2557 }
2558 }
2559
2560 function getSlideByIndex(index) {
2561 for (var i = 0, l = slides.length; i < l; ++i) {
2562 if (slides[i].index === index) {
2563 return slides[i];
2564 }
2565 }
2566 }
2567
2568 function setActive(index) {
2569 for (var i = 0; i < slides.length; i++) {
2570 slides[i].slide.active = i === index;
2571 }
2572 }
2573
2574 function goNext(slide, index, direction) {
2575 if (destroyed) {
2576 return;
2577 }
2578
2579 angular.extend(slide, {direction: direction});
2580 angular.extend(slides[currentIndex].slide || {}, {direction: direction});
2581 if ($animate.enabled($element) && !$scope.$currentTransition &&
2582 slides[index].element && self.slides.length > 1) {
2583 slides[index].element.data(SLIDE_DIRECTION, slide.direction);
2584 var currentIdx = self.getCurrentIndex();
2585
2586 if (angular.isNumber(currentIdx) && slides[currentIdx].element) {
2587 slides[currentIdx].element.data(SLIDE_DIRECTION, slide.direction);
2588 }
2589
2590 $scope.$currentTransition = true;
2591 $animate.on('addClass', slides[index].element, function(element, phase) {
2592 if (phase === 'close') {
2593 $scope.$currentTransition = null;
2594 $animate.off('addClass', element);
2595 if (bufferedTransitions.length) {
2596 var nextSlide = bufferedTransitions.pop().slide;
2597 var nextIndex = nextSlide.index;
2598 var nextDirection = nextIndex > self.getCurrentIndex() ? 'next' : 'prev';
2599 clearBufferedTransitions();
2600
2601 goNext(nextSlide, nextIndex, nextDirection);
2602 }
2603 }
2604 });
2605 }
2606
2607 $scope.active = slide.index;
2608 currentIndex = slide.index;
2609 setActive(index);
2610
2611 //every time you change slides, reset the timer
2612 restartTimer();
2613 }
2614
2615 function findSlideIndex(slide) {
2616 for (var i = 0; i < slides.length; i++) {
2617 if (slides[i].slide === slide) {
2618 return i;
2619 }
2620 }
2621 }
2622
2623 function resetTimer() {
2624 if (currentInterval) {
2625 $interval.cancel(currentInterval);
2626 currentInterval = null;
2627 }
2628 }
2629
2630 function resetTransition(slides) {
2631 if (!slides.length) {
2632 $scope.$currentTransition = null;
2633 clearBufferedTransitions();
2634 }
2635 }
2636
2637 function restartTimer() {
2638 resetTimer();
2639 var interval = +$scope.interval;
2640 if (!isNaN(interval) && interval > 0) {
2641 currentInterval = $interval(timerFn, interval);
2642 }
2643 }
2644
2645 function timerFn() {
2646 var interval = +$scope.interval;
2647 if (isPlaying && !isNaN(interval) && interval > 0 && slides.length) {
2648 $scope.next();
2649 } else {
2650 $scope.pause();
2651 }
2652 }
2653 }])
2654
2655 .directive('uibCarousel', function() {
2656 return {
2657 transclude: true,
2658 replace: true,
2659 controller: 'UibCarouselController',
2660 controllerAs: 'carousel',
2661 templateUrl: function(element, attrs) {
2662 return attrs.templateUrl || 'uib/template/carousel/carousel.html';
2663 },
2664 scope: {
2665 active: '=',
2666 interval: '=',
2667 noTransition: '=',
2668 noPause: '=',
2669 noWrap: '&'
2670 }
2671 };
2672 })
2673
2674 .directive('uibSlide', function() {
2675 return {
2676 require: '^uibCarousel',
2677 transclude: true,
2678 replace: true,
2679 templateUrl: function(element, attrs) {
2680 return attrs.templateUrl || 'uib/template/carousel/slide.html';
2681 },
2682 scope: {
2683 actual: '=?',
2684 index: '=?'
2685 },
2686 link: function (scope, element, attrs, carouselCtrl) {
2687 carouselCtrl.addSlide(scope, element);
2688 //when the scope is destroyed then remove the slide from the current slides array
2689 scope.$on('$destroy', function() {
2690 carouselCtrl.removeSlide(scope);
2691 });
2692 }
2693 };
2694 })
2695
2696 .animation('.item', ['$animateCss',
2697 function($animateCss) {
2698 var SLIDE_DIRECTION = 'uib-slideDirection';
2699
2700 function removeClass(element, className, callback) {
2701 element.removeClass(className);
2702 if (callback) {
2703 callback();
2704 }
2705 }
2706
2707 return {
2708 beforeAddClass: function(element, className, done) {
2709 if (className === 'active') {
2710 var stopped = false;
2711 var direction = element.data(SLIDE_DIRECTION);
2712 var directionClass = direction === 'next' ? 'left' : 'right';
2713 var removeClassFn = removeClass.bind(this, element,
2714 directionClass + ' ' + direction, done);
2715 element.addClass(direction);
2716
2717 $animateCss(element, {addClass: directionClass})
2718 .start()
2719 .done(removeClassFn);
2720
2721 return function() {
2722 stopped = true;
2723 };
2724 }
2725 done();
2726 },
2727 beforeRemoveClass: function (element, className, done) {
2728 if (className === 'active') {
2729 var stopped = false;
2730 var direction = element.data(SLIDE_DIRECTION);
2731 var directionClass = direction === 'next' ? 'left' : 'right';
2732 var removeClassFn = removeClass.bind(this, element, directionClass, done);
2733
2734 $animateCss(element, {addClass: directionClass})
2735 .start()
2736 .done(removeClassFn);
2737
2738 return function() {
2739 stopped = true;
2740 };
2741 }
2742 done();
2743 }
2744 };
2745 }]);
2746
2747 angular.module('ui.bootstrap.dateparser', [])
2748
2749 .service('uibDateParser', ['$log', '$locale', 'dateFilter', 'orderByFilter', function($log, $locale, dateFilter, orderByFilter) {
2750 // Pulled from https://github.com/mbostock/d3/blob/master/src/format/requote.js
2751 var SPECIAL_CHARACTERS_REGEXP = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
2752
2753 var localeId;
2754 var formatCodeToRegex;
2755
2756 this.init = function() {
2757 localeId = $locale.id;
2758
2759 this.parsers = {};
2760 this.formatters = {};
2761
2762 formatCodeToRegex = [
2763 {
2764 key: 'yyyy',
2765 regex: '\\d{4}',
2766 apply: function(value) { this.year = +value; },
2767 formatter: function(date) {
2768 var _date = new Date();
2769 _date.setFullYear(Math.abs(date.getFullYear()));
2770 return dateFilter(_date, 'yyyy');
2771 }
2772 },
2773 {
2774 key: 'yy',
2775 regex: '\\d{2}',
2776 apply: function(value) { value = +value; this.year = value < 69 ? value + 2000 : value + 1900; },
2777 formatter: function(date) {
2778 var _date = new Date();
2779 _date.setFullYear(Math.abs(date.getFullYear()));
2780 return dateFilter(_date, 'yy');
2781 }
2782 },
2783 {
2784 key: 'y',
2785 regex: '\\d{1,4}',
2786 apply: function(value) { this.year = +value; },
2787 formatter: function(date) {
2788 var _date = new Date();
2789 _date.setFullYear(Math.abs(date.getFullYear()));
2790 return dateFilter(_date, 'y');
2791 }
2792 },
2793 {
2794 key: 'M!',
2795 regex: '0?[1-9]|1[0-2]',
2796 apply: function(value) { this.month = value - 1; },
2797 formatter: function(date) {
2798 var value = date.getMonth();
2799 if (/^[0-9]$/.test(value)) {
2800 return dateFilter(date, 'MM');
2801 }
2802
2803 return dateFilter(date, 'M');
2804 }
2805 },
2806 {
2807 key: 'MMMM',
2808 regex: $locale.DATETIME_FORMATS.MONTH.join('|'),
2809 apply: function(value) { this.month = $locale.DATETIME_FORMATS.MONTH.indexOf(value); },
2810 formatter: function(date) { return dateFilter(date, 'MMMM'); }
2811 },
2812 {
2813 key: 'MMM',
2814 regex: $locale.DATETIME_FORMATS.SHORTMONTH.join('|'),
2815 apply: function(value) { this.month = $locale.DATETIME_FORMATS.SHORTMONTH.indexOf(value); },
2816 formatter: function(date) { return dateFilter(date, 'MMM'); }
2817 },
2818 {
2819 key: 'MM',
2820 regex: '0[1-9]|1[0-2]',
2821 apply: function(value) { this.month = value - 1; },
2822 formatter: function(date) { return dateFilter(date, 'MM'); }
2823 },
2824 {
2825 key: 'M',
2826 regex: '[1-9]|1[0-2]',
2827 apply: function(value) { this.month = value - 1; },
2828 formatter: function(date) { return dateFilter(date, 'M'); }
2829 },
2830 {
2831 key: 'd!',
2832 regex: '[0-2]?[0-9]{1}|3[0-1]{1}',
2833 apply: function(value) { this.date = +value; },
2834 formatter: function(date) {
2835 var value = date.getDate();
2836 if (/^[1-9]$/.test(value)) {
2837 return dateFilter(date, 'dd');
2838 }
2839
2840 return dateFilter(date, 'd');
2841 }
2842 },
2843 {
2844 key: 'dd',
2845 regex: '[0-2][0-9]{1}|3[0-1]{1}',
2846 apply: function(value) { this.date = +value; },
2847 formatter: function(date) { return dateFilter(date, 'dd'); }
2848 },
2849 {
2850 key: 'd',
2851 regex: '[1-2]?[0-9]{1}|3[0-1]{1}',
2852 apply: function(value) { this.date = +value; },
2853 formatter: function(date) { return dateFilter(date, 'd'); }
2854 },
2855 {
2856 key: 'EEEE',
2857 regex: $locale.DATETIME_FORMATS.DAY.join('|'),
2858 formatter: function(date) { return dateFilter(date, 'EEEE'); }
2859 },
2860 {
2861 key: 'EEE',
2862 regex: $locale.DATETIME_FORMATS.SHORTDAY.join('|'),
2863 formatter: function(date) { return dateFilter(date, 'EEE'); }
2864 },
2865 {
2866 key: 'HH',
2867 regex: '(?:0|1)[0-9]|2[0-3]',
2868 apply: function(value) { this.hours = +value; },
2869 formatter: function(date) { return dateFilter(date, 'HH'); }
2870 },
2871 {
2872 key: 'hh',
2873 regex: '0[0-9]|1[0-2]',
2874 apply: function(value) { this.hours = +value; },
2875 formatter: function(date) { return dateFilter(date, 'hh'); }
2876 },
2877 {
2878 key: 'H',
2879 regex: '1?[0-9]|2[0-3]',
2880 apply: function(value) { this.hours = +value; },
2881 formatter: function(date) { return dateFilter(date, 'H'); }
2882 },
2883 {
2884 key: 'h',
2885 regex: '[0-9]|1[0-2]',
2886 apply: function(value) { this.hours = +value; },
2887 formatter: function(date) { return dateFilter(date, 'h'); }
2888 },
2889 {
2890 key: 'mm',
2891 regex: '[0-5][0-9]',
2892 apply: function(value) { this.minutes = +value; },
2893 formatter: function(date) { return dateFilter(date, 'mm'); }
2894 },
2895 {
2896 key: 'm',
2897 regex: '[0-9]|[1-5][0-9]',
2898 apply: function(value) { this.minutes = +value; },
2899 formatter: function(date) { return dateFilter(date, 'm'); }
2900 },
2901 {
2902 key: 'sss',
2903 regex: '[0-9][0-9][0-9]',
2904 apply: function(value) { this.milliseconds = +value; },
2905 formatter: function(date) { return dateFilter(date, 'sss'); }
2906 },
2907 {
2908 key: 'ss',
2909 regex: '[0-5][0-9]',
2910 apply: function(value) { this.seconds = +value; },
2911 formatter: function(date) { return dateFilter(date, 'ss'); }
2912 },
2913 {
2914 key: 's',
2915 regex: '[0-9]|[1-5][0-9]',
2916 apply: function(value) { this.seconds = +value; },
2917 formatter: function(date) { return dateFilter(date, 's'); }
2918 },
2919 {
2920 key: 'a',
2921 regex: $locale.DATETIME_FORMATS.AMPMS.join('|'),
2922 apply: function(value) {
2923 if (this.hours === 12) {
2924 this.hours = 0;
2925 }
2926
2927 if (value === 'PM') {
2928 this.hours += 12;
2929 }
2930 },
2931 formatter: function(date) { return dateFilter(date, 'a'); }
2932 },
2933 {
2934 key: 'Z',
2935 regex: '[+-]\\d{4}',
2936 apply: function(value) {
2937 var matches = value.match(/([+-])(\d{2})(\d{2})/),
2938 sign = matches[1],
2939 hours = matches[2],
2940 minutes = matches[3];
2941 this.hours += toInt(sign + hours);
2942 this.minutes += toInt(sign + minutes);
2943 },
2944 formatter: function(date) {
2945 return dateFilter(date, 'Z');
2946 }
2947 },
2948 {
2949 key: 'ww',
2950 regex: '[0-4][0-9]|5[0-3]',
2951 formatter: function(date) { return dateFilter(date, 'ww'); }
2952 },
2953 {
2954 key: 'w',
2955 regex: '[0-9]|[1-4][0-9]|5[0-3]',
2956 formatter: function(date) { return dateFilter(date, 'w'); }
2957 },
2958 {
2959 key: 'GGGG',
2960 regex: $locale.DATETIME_FORMATS.ERANAMES.join('|').replace(/\s/g, '\\s'),
2961 formatter: function(date) { return dateFilter(date, 'GGGG'); }
2962 },
2963 {
2964 key: 'GGG',
2965 regex: $locale.DATETIME_FORMATS.ERAS.join('|'),
2966 formatter: function(date) { return dateFilter(date, 'GGG'); }
2967 },
2968 {
2969 key: 'GG',
2970 regex: $locale.DATETIME_FORMATS.ERAS.join('|'),
2971 formatter: function(date) { return dateFilter(date, 'GG'); }
2972 },
2973 {
2974 key: 'G',
2975 regex: $locale.DATETIME_FORMATS.ERAS.join('|'),
2976 formatter: function(date) { return dateFilter(date, 'G'); }
2977 }
2978 ];
2979 };
2980
2981 this.init();
2982
2983 function createParser(format, func) {
2984 var map = [], regex = format.split('');
2985
2986 // check for literal values
2987 var quoteIndex = format.indexOf('\'');
2988 if (quoteIndex > -1) {
2989 var inLiteral = false;
2990 format = format.split('');
2991 for (var i = quoteIndex; i < format.length; i++) {
2992 if (inLiteral) {
2993 if (format[i] === '\'') {
2994 if (i + 1 < format.length && format[i+1] === '\'') { // escaped single quote
2995 format[i+1] = '$';
2996 regex[i+1] = '';
2997 } else { // end of literal
2998 regex[i] = '';
2999 inLiteral = false;
3000 }
3001 }
3002 format[i] = '$';
3003 } else {
3004 if (format[i] === '\'') { // start of literal
3005 format[i] = '$';
3006 regex[i] = '';
3007 inLiteral = true;
3008 }
3009 }
3010 }
3011
3012 format = format.join('');
3013 }
3014
3015 angular.forEach(formatCodeToRegex, function(data) {
3016 var index = format.indexOf(data.key);
3017
3018 if (index > -1) {
3019 format = format.split('');
3020
3021 regex[index] = '(' + data.regex + ')';
3022 format[index] = '$'; // Custom symbol to define consumed part of format
3023 for (var i = index + 1, n = index + data.key.length; i < n; i++) {
3024 regex[i] = '';
3025 format[i] = '$';
3026 }
3027 format = format.join('');
3028
3029 map.push({
3030 index: index,
3031 key: data.key,
3032 apply: data[func],
3033 matcher: data.regex
3034 });
3035 }
3036 });
3037
3038 return {
3039 regex: new RegExp('^' + regex.join('') + '$'),
3040 map: orderByFilter(map, 'index')
3041 };
3042 }
3043
3044 this.filter = function(date, format) {
3045 if (!angular.isDate(date) || isNaN(date) || !format) {
3046 return '';
3047 }
3048
3049 format = $locale.DATETIME_FORMATS[format] || format;
3050
3051 if ($locale.id !== localeId) {
3052 this.init();
3053 }
3054
3055 if (!this.formatters[format]) {
3056 this.formatters[format] = createParser(format, 'formatter');
3057 }
3058
3059 var parser = this.formatters[format],
3060 map = parser.map;
3061
3062 var _format = format;
3063
3064 return map.reduce(function(str, mapper, i) {
3065 var match = _format.match(new RegExp('(.*)' + mapper.key));
3066 if (match && angular.isString(match[1])) {
3067 str += match[1];
3068 _format = _format.replace(match[1] + mapper.key, '');
3069 }
3070
3071 var endStr = i === map.length - 1 ? _format : '';
3072
3073 if (mapper.apply) {
3074 return str + mapper.apply.call(null, date) + endStr;
3075 }
3076
3077 return str + endStr;
3078 }, '');
3079 };
3080
3081 this.parse = function(input, format, baseDate) {
3082 if (!angular.isString(input) || !format) {
3083 return input;
3084 }
3085
3086 format = $locale.DATETIME_FORMATS[format] || format;
3087 format = format.replace(SPECIAL_CHARACTERS_REGEXP, '\\$&');
3088
3089 if ($locale.id !== localeId) {
3090 this.init();
3091 }
3092
3093 if (!this.parsers[format]) {
3094 this.parsers[format] = createParser(format, 'apply');
3095 }
3096
3097 var parser = this.parsers[format],
3098 regex = parser.regex,
3099 map = parser.map,
3100 results = input.match(regex),
3101 tzOffset = false;
3102 if (results && results.length) {
3103 var fields, dt;
3104 if (angular.isDate(baseDate) && !isNaN(baseDate.getTime())) {
3105 fields = {
3106 year: baseDate.getFullYear(),
3107 month: baseDate.getMonth(),
3108 date: baseDate.getDate(),
3109 hours: baseDate.getHours(),
3110 minutes: baseDate.getMinutes(),
3111 seconds: baseDate.getSeconds(),
3112 milliseconds: baseDate.getMilliseconds()
3113 };
3114 } else {
3115 if (baseDate) {
3116 $log.warn('dateparser:', 'baseDate is not a valid date');
3117 }
3118 fields = { year: 1900, month: 0, date: 1, hours: 0, minutes: 0, seconds: 0, milliseconds: 0 };
3119 }
3120
3121 for (var i = 1, n = results.length; i < n; i++) {
3122 var mapper = map[i - 1];
3123 if (mapper.matcher === 'Z') {
3124 tzOffset = true;
3125 }
3126
3127 if (mapper.apply) {
3128 mapper.apply.call(fields, results[i]);
3129 }
3130 }
3131
3132 var datesetter = tzOffset ? Date.prototype.setUTCFullYear :
3133 Date.prototype.setFullYear;
3134 var timesetter = tzOffset ? Date.prototype.setUTCHours :
3135 Date.prototype.setHours;
3136
3137 if (isValid(fields.year, fields.month, fields.date)) {
3138 if (angular.isDate(baseDate) && !isNaN(baseDate.getTime()) && !tzOffset) {
3139 dt = new Date(baseDate);
3140 datesetter.call(dt, fields.year, fields.month, fields.date);
3141 timesetter.call(dt, fields.hours, fields.minutes,
3142 fields.seconds, fields.milliseconds);
3143 } else {
3144 dt = new Date(0);
3145 datesetter.call(dt, fields.year, fields.month, fields.date);
3146 timesetter.call(dt, fields.hours || 0, fields.minutes || 0,
3147 fields.seconds || 0, fields.milliseconds || 0);
3148 }
3149 }
3150
3151 return dt;
3152 }
3153 };
3154
3155 // Check if date is valid for specific month (and year for February).
3156 // Month: 0 = Jan, 1 = Feb, etc
3157 function isValid(year, month, date) {
3158 if (date < 1) {
3159 return false;
3160 }
3161
3162 if (month === 1 && date > 28) {
3163 return date === 29 && (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0);
3164 }
3165
3166 if (month === 3 || month === 5 || month === 8 || month === 10) {
3167 return date < 31;
3168 }
3169
3170 return true;
3171 }
3172
3173 function toInt(str) {
3174 return parseInt(str, 10);
3175 }
3176
3177 this.toTimezone = toTimezone;
3178 this.fromTimezone = fromTimezone;
3179 this.timezoneToOffset = timezoneToOffset;
3180 this.addDateMinutes = addDateMinutes;
3181 this.convertTimezoneToLocal = convertTimezoneToLocal;
3182
3183 function toTimezone(date, timezone) {
3184 return date && timezone ? convertTimezoneToLocal(date, timezone) : date;
3185 }
3186
3187 function fromTimezone(date, timezone) {
3188 return date && timezone ? convertTimezoneToLocal(date, timezone, true) : date;
3189 }
3190
3191 //https://github.com/angular/angular.js/blob/4daafd3dbe6a80d578f5a31df1bb99c77559543e/src/Angular.js#L1207
3192 function timezoneToOffset(timezone, fallback) {
3193 var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
3194 return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
3195 }
3196
3197 function addDateMinutes(date, minutes) {
3198 date = new Date(date.getTime());
3199 date.setMinutes(date.getMinutes() + minutes);
3200 return date;
3201 }
3202
3203 function convertTimezoneToLocal(date, timezone, reverse) {
3204 reverse = reverse ? -1 : 1;
3205 var timezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
3206 return addDateMinutes(date, reverse * (timezoneOffset - date.getTimezoneOffset()));
3207 }
3208 }]);
3209
3210 // Avoiding use of ng-class as it creates a lot of watchers when a class is to be applied to
3211 // at most one element.
3212 angular.module('ui.bootstrap.isClass', [])
3213 .directive('uibIsClass', [
3214 '$animate',
3215 function ($animate) {
3216 // 11111111 22222222
3217 var ON_REGEXP = /^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/;
3218 // 11111111 22222222
3219 var IS_REGEXP = /^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;
3220
3221 var dataPerTracked = {};
3222
3223 return {
3224 restrict: 'A',
3225 compile: function(tElement, tAttrs) {
3226 var linkedScopes = [];
3227 var instances = [];
3228 var expToData = {};
3229 var lastActivated = null;
3230 var onExpMatches = tAttrs.uibIsClass.match(ON_REGEXP);
3231 var onExp = onExpMatches[2];
3232 var expsStr = onExpMatches[1];
3233 var exps = expsStr.split(',');
3234
3235 return linkFn;
3236
3237 function linkFn(scope, element, attrs) {
3238 linkedScopes.push(scope);
3239 instances.push({
3240 scope: scope,
3241 element: element
3242 });
3243
3244 exps.forEach(function(exp, k) {
3245 addForExp(exp, scope);
3246 });
3247
3248 scope.$on('$destroy', removeScope);
3249 }
3250
3251 function addForExp(exp, scope) {
3252 var matches = exp.match(IS_REGEXP);
3253 var clazz = scope.$eval(matches[1]);
3254 var compareWithExp = matches[2];
3255 var data = expToData[exp];
3256 if (!data) {
3257 var watchFn = function(compareWithVal) {
3258 var newActivated = null;
3259 instances.some(function(instance) {
3260 var thisVal = instance.scope.$eval(onExp);
3261 if (thisVal === compareWithVal) {
3262 newActivated = instance;
3263 return true;
3264 }
3265 });
3266 if (data.lastActivated !== newActivated) {
3267 if (data.lastActivated) {
3268 $animate.removeClass(data.lastActivated.element, clazz);
3269 }
3270 if (newActivated) {
3271 $animate.addClass(newActivated.element, clazz);
3272 }
3273 data.lastActivated = newActivated;
3274 }
3275 };
3276 expToData[exp] = data = {
3277 lastActivated: null,
3278 scope: scope,
3279 watchFn: watchFn,
3280 compareWithExp: compareWithExp,
3281 watcher: scope.$watch(compareWithExp, watchFn)
3282 };
3283 }
3284 data.watchFn(scope.$eval(compareWithExp));
3285 }
3286
3287 function removeScope(e) {
3288 var removedScope = e.targetScope;
3289 var index = linkedScopes.indexOf(removedScope);
3290 linkedScopes.splice(index, 1);
3291 instances.splice(index, 1);
3292 if (linkedScopes.length) {
3293 var newWatchScope = linkedScopes[0];
3294 angular.forEach(expToData, function(data) {
3295 if (data.scope === removedScope) {
3296 data.watcher = newWatchScope.$watch(data.compareWithExp, data.watchFn);
3297 data.scope = newWatchScope;
3298 }
3299 });
3300 } else {
3301 expToData = {};
3302 }
3303 }
3304 }
3305 };
3306 }]);
3307 angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.isClass'])
3308
3309 .value('$datepickerSuppressError', false)
3310
3311 .value('$datepickerLiteralWarning', true)
3312
3313 .constant('uibDatepickerConfig', {
3314 datepickerMode: 'day',
3315 formatDay: 'dd',
3316 formatMonth: 'MMMM',
3317 formatYear: 'yyyy',
3318 formatDayHeader: 'EEE',
3319 formatDayTitle: 'MMMM yyyy',
3320 formatMonthTitle: 'yyyy',
3321 maxDate: null,
3322 maxMode: 'year',
3323 minDate: null,
3324 minMode: 'day',
3325 ngModelOptions: {},
3326 shortcutPropagation: false,
3327 showWeeks: true,
3328 yearColumns: 5,
3329 yearRows: 4
3330 })
3331
3332 .controller('UibDatepickerController', ['$scope', '$attrs', '$parse', '$interpolate', '$locale', '$log', 'dateFilter', 'uibDatepickerConfig', '$datepickerLiteralWarning', '$datepickerSuppressError', 'uibDateParser',
3333 function($scope, $attrs, $parse, $interpolate, $locale, $log, dateFilter, datepickerConfig, $datepickerLiteralWarning, $datepickerSuppressError, dateParser) {
3334 var self = this,
3335 ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl;
3336 ngModelOptions = {},
3337 watchListeners = [],
3338 optionsUsed = !!$attrs.datepickerOptions;
3339
3340 if (!$scope.datepickerOptions) {
3341 $scope.datepickerOptions = {};
3342 }
3343
3344 // Modes chain
3345 this.modes = ['day', 'month', 'year'];
3346
3347 [
3348 'customClass',
3349 'dateDisabled',
3350 'datepickerMode',
3351 'formatDay',
3352 'formatDayHeader',
3353 'formatDayTitle',
3354 'formatMonth',
3355 'formatMonthTitle',
3356 'formatYear',
3357 'maxDate',
3358 'maxMode',
3359 'minDate',
3360 'minMode',
3361 'showWeeks',
3362 'shortcutPropagation',
3363 'startingDay',
3364 'yearColumns',
3365 'yearRows'
3366 ].forEach(function(key) {
3367 switch (key) {
3368 case 'customClass':
3369 case 'dateDisabled':
3370 $scope[key] = $scope.datepickerOptions[key] || angular.noop;
3371 break;
3372 case 'datepickerMode':
3373 $scope.datepickerMode = angular.isDefined($scope.datepickerOptions.datepickerMode) ?
3374 $scope.datepickerOptions.datepickerMode : datepickerConfig.datepickerMode;
3375 break;
3376 case 'formatDay':
3377 case 'formatDayHeader':
3378 case 'formatDayTitle':
3379 case 'formatMonth':
3380 case 'formatMonthTitle':
3381 case 'formatYear':
3382 self[key] = angular.isDefined($scope.datepickerOptions[key]) ?
3383 $interpolate($scope.datepickerOptions[key])($scope.$parent) :
3384 datepickerConfig[key];
3385 break;
3386 case 'showWeeks':
3387 case 'shortcutPropagation':
3388 case 'yearColumns':
3389 case 'yearRows':
3390 self[key] = angular.isDefined($scope.datepickerOptions[key]) ?
3391 $scope.datepickerOptions[key] : datepickerConfig[key];
3392 break;
3393 case 'startingDay':
3394 if (angular.isDefined($scope.datepickerOptions.startingDay)) {
3395 self.startingDay = $scope.datepickerOptions.startingDay;
3396 } else if (angular.isNumber(datepickerConfig.startingDay)) {
3397 self.startingDay = datepickerConfig.startingDay;
3398 } else {
3399 self.startingDay = ($locale.DATETIME_FORMATS.FIRSTDAYOFWEEK + 8) % 7;
3400 }
3401
3402 break;
3403 case 'maxDate':
3404 case 'minDate':
3405 $scope.$watch('datepickerOptions.' + key, function(value) {
3406 if (value) {
3407 if (angular.isDate(value)) {
3408 self[key] = dateParser.fromTimezone(new Date(value), ngModelOptions.timezone);
3409 } else {
3410 if ($datepickerLiteralWarning) {
3411 $log.warn('Literal date support has been deprecated, please switch to date object usage');
3412 }
3413
3414 self[key] = new Date(dateFilter(value, 'medium'));
3415 }
3416 } else {
3417 self[key] = datepickerConfig[key] ?
3418 dateParser.fromTimezone(new Date(datepickerConfig[key]), ngModelOptions.timezone) :
3419 null;
3420 }
3421
3422 self.refreshView();
3423 });
3424
3425 break;
3426 case 'maxMode':
3427 case 'minMode':
3428 if ($scope.datepickerOptions[key]) {
3429 $scope.$watch(function() { return $scope.datepickerOptions[key]; }, function(value) {
3430 self[key] = $scope[key] = angular.isDefined(value) ? value : datepickerOptions[key];
3431 if (key === 'minMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) < self.modes.indexOf(self[key]) ||
3432 key === 'maxMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) > self.modes.indexOf(self[key])) {
3433 $scope.datepickerMode = self[key];
3434 $scope.datepickerOptions.datepickerMode = self[key];
3435 }
3436 });
3437 } else {
3438 self[key] = $scope[key] = datepickerConfig[key] || null;
3439 }
3440
3441 break;
3442 }
3443 });
3444
3445 $scope.uniqueId = 'datepicker-' + $scope.$id + '-' + Math.floor(Math.random() * 10000);
3446
3447 $scope.disabled = angular.isDefined($attrs.disabled) || false;
3448 if (angular.isDefined($attrs.ngDisabled)) {
3449 watchListeners.push($scope.$parent.$watch($attrs.ngDisabled, function(disabled) {
3450 $scope.disabled = disabled;
3451 self.refreshView();
3452 }));
3453 }
3454
3455 $scope.isActive = function(dateObject) {
3456 if (self.compare(dateObject.date, self.activeDate) === 0) {
3457 $scope.activeDateId = dateObject.uid;
3458 return true;
3459 }
3460 return false;
3461 };
3462
3463 this.init = function(ngModelCtrl_) {
3464 ngModelCtrl = ngModelCtrl_;
3465 ngModelOptions = ngModelCtrl_.$options || datepickerConfig.ngModelOptions;
3466 if ($scope.datepickerOptions.initDate) {
3467 self.activeDate = dateParser.fromTimezone($scope.datepickerOptions.initDate, ngModelOptions.timezone) || new Date();
3468 $scope.$watch('datepickerOptions.initDate', function(initDate) {
3469 if (initDate && (ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue) || ngModelCtrl.$invalid)) {
3470 self.activeDate = dateParser.fromTimezone(initDate, ngModelOptions.timezone);
3471 self.refreshView();
3472 }
3473 });
3474 } else {
3475 self.activeDate = new Date();
3476 }
3477
3478 this.activeDate = ngModelCtrl.$modelValue ?
3479 dateParser.fromTimezone(new Date(ngModelCtrl.$modelValue), ngModelOptions.timezone) :
3480 dateParser.fromTimezone(new Date(), ngModelOptions.timezone);
3481
3482 ngModelCtrl.$render = function() {
3483 self.render();
3484 };
3485 };
3486
3487 this.render = function() {
3488 if (ngModelCtrl.$viewValue) {
3489 var date = new Date(ngModelCtrl.$viewValue),
3490 isValid = !isNaN(date);
3491
3492 if (isValid) {
3493 this.activeDate = dateParser.fromTimezone(date, ngModelOptions.timezone);
3494 } else if (!$datepickerSuppressError) {
3495 $log.error('Datepicker directive: "ng-model" value must be a Date object');
3496 }
3497 }
3498 this.refreshView();
3499 };
3500
3501 this.refreshView = function() {
3502 if (this.element) {
3503 $scope.selectedDt = null;
3504 this._refreshView();
3505 if ($scope.activeDt) {
3506 $scope.activeDateId = $scope.activeDt.uid;
3507 }
3508
3509 var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
3510 date = dateParser.fromTimezone(date, ngModelOptions.timezone);
3511 ngModelCtrl.$setValidity('dateDisabled', !date ||
3512 this.element && !this.isDisabled(date));
3513 }
3514 };
3515
3516 this.createDateObject = function(date, format) {
3517 var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
3518 model = dateParser.fromTimezone(model, ngModelOptions.timezone);
3519 var today = new Date();
3520 today = dateParser.fromTimezone(today, ngModelOptions.timezone);
3521 var time = this.compare(date, today);
3522 var dt = {
3523 date: date,
3524 label: dateParser.filter(date, format),
3525 selected: model && this.compare(date, model) === 0,
3526 disabled: this.isDisabled(date),
3527 past: time < 0,
3528 current: time === 0,
3529 future: time > 0,
3530 customClass: this.customClass(date) || null
3531 };
3532
3533 if (model && this.compare(date, model) === 0) {
3534 $scope.selectedDt = dt;
3535 }
3536
3537 if (self.activeDate && this.compare(dt.date, self.activeDate) === 0) {
3538 $scope.activeDt = dt;
3539 }
3540
3541 return dt;
3542 };
3543
3544 this.isDisabled = function(date) {
3545 return $scope.disabled ||
3546 this.minDate && this.compare(date, this.minDate) < 0 ||
3547 this.maxDate && this.compare(date, this.maxDate) > 0 ||
3548 $scope.dateDisabled && $scope.dateDisabled({date: date, mode: $scope.datepickerMode});
3549 };
3550
3551 this.customClass = function(date) {
3552 return $scope.customClass({date: date, mode: $scope.datepickerMode});
3553 };
3554
3555 // Split array into smaller arrays
3556 this.split = function(arr, size) {
3557 var arrays = [];
3558 while (arr.length > 0) {
3559 arrays.push(arr.splice(0, size));
3560 }
3561 return arrays;
3562 };
3563
3564 $scope.select = function(date) {
3565 if ($scope.datepickerMode === self.minMode) {
3566 var dt = ngModelCtrl.$viewValue ? dateParser.fromTimezone(new Date(ngModelCtrl.$viewValue), ngModelOptions.timezone) : new Date(0, 0, 0, 0, 0, 0, 0);
3567 dt.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
3568 dt = dateParser.toTimezone(dt, ngModelOptions.timezone);
3569 ngModelCtrl.$setViewValue(dt);
3570 ngModelCtrl.$render();
3571 } else {
3572 self.activeDate = date;
3573 setMode(self.modes[self.modes.indexOf($scope.datepickerMode) - 1]);
3574
3575 $scope.$emit('uib:datepicker.mode');
3576 }
3577
3578 $scope.$broadcast('uib:datepicker.focus');
3579 };
3580
3581 $scope.move = function(direction) {
3582 var year = self.activeDate.getFullYear() + direction * (self.step.years || 0),
3583 month = self.activeDate.getMonth() + direction * (self.step.months || 0);
3584 self.activeDate.setFullYear(year, month, 1);
3585 self.refreshView();
3586 };
3587
3588 $scope.toggleMode = function(direction) {
3589 direction = direction || 1;
3590
3591 if ($scope.datepickerMode === self.maxMode && direction === 1 ||
3592 $scope.datepickerMode === self.minMode && direction === -1) {
3593 return;
3594 }
3595
3596 setMode(self.modes[self.modes.indexOf($scope.datepickerMode) + direction]);
3597
3598 $scope.$emit('uib:datepicker.mode');
3599 };
3600
3601 // Key event mapper
3602 $scope.keys = { 13: 'enter', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down' };
3603
3604 var focusElement = function() {
3605 self.element[0].focus();
3606 };
3607
3608 // Listen for focus requests from popup directive
3609 $scope.$on('uib:datepicker.focus', focusElement);
3610
3611 $scope.keydown = function(evt) {
3612 var key = $scope.keys[evt.which];
3613
3614 if (!key || evt.shiftKey || evt.altKey || $scope.disabled) {
3615 return;
3616 }
3617
3618 evt.preventDefault();
3619 if (!self.shortcutPropagation) {
3620 evt.stopPropagation();
3621 }
3622
3623 if (key === 'enter' || key === 'space') {
3624 if (self.isDisabled(self.activeDate)) {
3625 return; // do nothing
3626 }
3627 $scope.select(self.activeDate);
3628 } else if (evt.ctrlKey && (key === 'up' || key === 'down')) {
3629 $scope.toggleMode(key === 'up' ? 1 : -1);
3630 } else {
3631 self.handleKeyDown(key, evt);
3632 self.refreshView();
3633 }
3634 };
3635
3636 $scope.$on('$destroy', function() {
3637 //Clear all watch listeners on destroy
3638 while (watchListeners.length) {
3639 watchListeners.shift()();
3640 }
3641 });
3642
3643 function setMode(mode) {
3644 $scope.datepickerMode = mode;
3645 $scope.datepickerOptions.datepickerMode = mode;
3646 }
3647 }])
3648
3649 .controller('UibDaypickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
3650 var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
3651
3652 this.step = { months: 1 };
3653 this.element = $element;
3654 function getDaysInMonth(year, month) {
3655 return month === 1 && year % 4 === 0 &&
3656 (year % 100 !== 0 || year % 400 === 0) ? 29 : DAYS_IN_MONTH[month];
3657 }
3658
3659 this.init = function(ctrl) {
3660 angular.extend(ctrl, this);
3661 scope.showWeeks = ctrl.showWeeks;
3662 ctrl.refreshView();
3663 };
3664
3665 this.getDates = function(startDate, n) {
3666 var dates = new Array(n), current = new Date(startDate), i = 0, date;
3667 while (i < n) {
3668 date = new Date(current);
3669 dates[i++] = date;
3670 current.setDate(current.getDate() + 1);
3671 }
3672 return dates;
3673 };
3674
3675 this._refreshView = function() {
3676 var year = this.activeDate.getFullYear(),
3677 month = this.activeDate.getMonth(),
3678 firstDayOfMonth = new Date(this.activeDate);
3679
3680 firstDayOfMonth.setFullYear(year, month, 1);
3681
3682 var difference = this.startingDay - firstDayOfMonth.getDay(),
3683 numDisplayedFromPreviousMonth = difference > 0 ?
3684 7 - difference : - difference,
3685 firstDate = new Date(firstDayOfMonth);
3686
3687 if (numDisplayedFromPreviousMonth > 0) {
3688 firstDate.setDate(-numDisplayedFromPreviousMonth + 1);
3689 }
3690
3691 // 42 is the number of days on a six-week calendar
3692 var days = this.getDates(firstDate, 42);
3693 for (var i = 0; i < 42; i ++) {
3694 days[i] = angular.extend(this.createDateObject(days[i], this.formatDay), {
3695 secondary: days[i].getMonth() !== month,
3696 uid: scope.uniqueId + '-' + i
3697 });
3698 }
3699
3700 scope.labels = new Array(7);
3701 for (var j = 0; j < 7; j++) {
3702 scope.labels[j] = {
3703 abbr: dateFilter(days[j].date, this.formatDayHeader),
3704 full: dateFilter(days[j].date, 'EEEE')
3705 };
3706 }
3707
3708 scope.title = dateFilter(this.activeDate, this.formatDayTitle);
3709 scope.rows = this.split(days, 7);
3710
3711 if (scope.showWeeks) {
3712 scope.weekNumbers = [];
3713 var thursdayIndex = (4 + 7 - this.startingDay) % 7,
3714 numWeeks = scope.rows.length;
3715 for (var curWeek = 0; curWeek < numWeeks; curWeek++) {
3716 scope.weekNumbers.push(
3717 getISO8601WeekNumber(scope.rows[curWeek][thursdayIndex].date));
3718 }
3719 }
3720 };
3721
3722 this.compare = function(date1, date2) {
3723 var _date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());
3724 var _date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
3725 _date1.setFullYear(date1.getFullYear());
3726 _date2.setFullYear(date2.getFullYear());
3727 return _date1 - _date2;
3728 };
3729
3730 function getISO8601WeekNumber(date) {
3731 var checkDate = new Date(date);
3732 checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); // Thursday
3733 var time = checkDate.getTime();
3734 checkDate.setMonth(0); // Compare with Jan 1
3735 checkDate.setDate(1);
3736 return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
3737 }
3738
3739 this.handleKeyDown = function(key, evt) {
3740 var date = this.activeDate.getDate();
3741
3742 if (key === 'left') {
3743 date = date - 1;
3744 } else if (key === 'up') {
3745 date = date - 7;
3746 } else if (key === 'right') {
3747 date = date + 1;
3748 } else if (key === 'down') {
3749 date = date + 7;
3750 } else if (key === 'pageup' || key === 'pagedown') {
3751 var month = this.activeDate.getMonth() + (key === 'pageup' ? - 1 : 1);
3752 this.activeDate.setMonth(month, 1);
3753 date = Math.min(getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth()), date);
3754 } else if (key === 'home') {
3755 date = 1;
3756 } else if (key === 'end') {
3757 date = getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth());
3758 }
3759 this.activeDate.setDate(date);
3760 };
3761 }])
3762
3763 .controller('UibMonthpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
3764 this.step = { years: 1 };
3765 this.element = $element;
3766
3767 this.init = function(ctrl) {
3768 angular.extend(ctrl, this);
3769 ctrl.refreshView();
3770 };
3771
3772 this._refreshView = function() {
3773 var months = new Array(12),
3774 year = this.activeDate.getFullYear(),
3775 date;
3776
3777 for (var i = 0; i < 12; i++) {
3778 date = new Date(this.activeDate);
3779 date.setFullYear(year, i, 1);
3780 months[i] = angular.extend(this.createDateObject(date, this.formatMonth), {
3781 uid: scope.uniqueId + '-' + i
3782 });
3783 }
3784
3785 scope.title = dateFilter(this.activeDate, this.formatMonthTitle);
3786 scope.rows = this.split(months, 3);
3787 };
3788
3789 this.compare = function(date1, date2) {
3790 var _date1 = new Date(date1.getFullYear(), date1.getMonth());
3791 var _date2 = new Date(date2.getFullYear(), date2.getMonth());
3792 _date1.setFullYear(date1.getFullYear());
3793 _date2.setFullYear(date2.getFullYear());
3794 return _date1 - _date2;
3795 };
3796
3797 this.handleKeyDown = function(key, evt) {
3798 var date = this.activeDate.getMonth();
3799
3800 if (key === 'left') {
3801 date = date - 1;
3802 } else if (key === 'up') {
3803 date = date - 3;
3804 } else if (key === 'right') {
3805 date = date + 1;
3806 } else if (key === 'down') {
3807 date = date + 3;
3808 } else if (key === 'pageup' || key === 'pagedown') {
3809 var year = this.activeDate.getFullYear() + (key === 'pageup' ? - 1 : 1);
3810 this.activeDate.setFullYear(year);
3811 } else if (key === 'home') {
3812 date = 0;
3813 } else if (key === 'end') {
3814 date = 11;
3815 }
3816 this.activeDate.setMonth(date);
3817 };
3818 }])
3819
3820 .controller('UibYearpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
3821 var columns, range;
3822 this.element = $element;
3823
3824 function getStartingYear(year) {
3825 return parseInt((year - 1) / range, 10) * range + 1;
3826 }
3827
3828 this.yearpickerInit = function() {
3829 columns = this.yearColumns;
3830 range = this.yearRows * columns;
3831 this.step = { years: range };
3832 };
3833
3834 this._refreshView = function() {
3835 var years = new Array(range), date;
3836
3837 for (var i = 0, start = getStartingYear(this.activeDate.getFullYear()); i < range; i++) {
3838 date = new Date(this.activeDate);
3839 date.setFullYear(start + i, 0, 1);
3840 years[i] = angular.extend(this.createDateObject(date, this.formatYear), {
3841 uid: scope.uniqueId + '-' + i
3842 });
3843 }
3844
3845 scope.title = [years[0].label, years[range - 1].label].join(' - ');
3846 scope.rows = this.split(years, columns);
3847 scope.columns = columns;
3848 };
3849
3850 this.compare = function(date1, date2) {
3851 return date1.getFullYear() - date2.getFullYear();
3852 };
3853
3854 this.handleKeyDown = function(key, evt) {
3855 var date = this.activeDate.getFullYear();
3856
3857 if (key === 'left') {
3858 date = date - 1;
3859 } else if (key === 'up') {
3860 date = date - columns;
3861 } else if (key === 'right') {
3862 date = date + 1;
3863 } else if (key === 'down') {
3864 date = date + columns;
3865 } else if (key === 'pageup' || key === 'pagedown') {
3866 date += (key === 'pageup' ? - 1 : 1) * range;
3867 } else if (key === 'home') {
3868 date = getStartingYear(this.activeDate.getFullYear());
3869 } else if (key === 'end') {
3870 date = getStartingYear(this.activeDate.getFullYear()) + range - 1;
3871 }
3872 this.activeDate.setFullYear(date);
3873 };
3874 }])
3875
3876 .directive('uibDatepicker', function() {
3877 return {
3878 replace: true,
3879 templateUrl: function(element, attrs) {
3880 return attrs.templateUrl || 'uib/template/datepicker/datepicker.html';
3881 },
3882 scope: {
3883 datepickerOptions: '=?'
3884 },
3885 require: ['uibDatepicker', '^ngModel'],
3886 controller: 'UibDatepickerController',
3887 controllerAs: 'datepicker',
3888 link: function(scope, element, attrs, ctrls) {
3889 var datepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
3890
3891 datepickerCtrl.init(ngModelCtrl);
3892 }
3893 };
3894 })
3895
3896 .directive('uibDaypicker', function() {
3897 return {
3898 replace: true,
3899 templateUrl: function(element, attrs) {
3900 return attrs.templateUrl || 'uib/template/datepicker/day.html';
3901 },
3902 require: ['^uibDatepicker', 'uibDaypicker'],
3903 controller: 'UibDaypickerController',
3904 link: function(scope, element, attrs, ctrls) {
3905 var datepickerCtrl = ctrls[0],
3906 daypickerCtrl = ctrls[1];
3907
3908 daypickerCtrl.init(datepickerCtrl);
3909 }
3910 };
3911 })
3912
3913 .directive('uibMonthpicker', function() {
3914 return {
3915 replace: true,
3916 templateUrl: function(element, attrs) {
3917 return attrs.templateUrl || 'uib/template/datepicker/month.html';
3918 },
3919 require: ['^uibDatepicker', 'uibMonthpicker'],
3920 controller: 'UibMonthpickerController',
3921 link: function(scope, element, attrs, ctrls) {
3922 var datepickerCtrl = ctrls[0],
3923 monthpickerCtrl = ctrls[1];
3924
3925 monthpickerCtrl.init(datepickerCtrl);
3926 }
3927 };
3928 })
3929
3930 .directive('uibYearpicker', function() {
3931 return {
3932 replace: true,
3933 templateUrl: function(element, attrs) {
3934 return attrs.templateUrl || 'uib/template/datepicker/year.html';
3935 },
3936 require: ['^uibDatepicker', 'uibYearpicker'],
3937 controller: 'UibYearpickerController',
3938 link: function(scope, element, attrs, ctrls) {
3939 var ctrl = ctrls[0];
3940 angular.extend(ctrl, ctrls[1]);
3941 ctrl.yearpickerInit();
3942
3943 ctrl.refreshView();
3944 }
3945 };
3946 });
3947
3948 angular.module('ui.bootstrap.position', [])
3949
3950 /**
3951 * A set of utility methods for working with the DOM.
3952 * It is meant to be used where we need to absolute-position elements in
3953 * relation to another element (this is the case for tooltips, popovers,
3954 * typeahead suggestions etc.).
3955 */
3956 .factory('$uibPosition', ['$document', '$window', function($document, $window) {
3957 /**
3958 * Used by scrollbarWidth() function to cache scrollbar's width.
3959 * Do not access this variable directly, use scrollbarWidth() instead.
3960 */
3961 var SCROLLBAR_WIDTH;
3962 /**
3963 * scrollbar on body and html element in IE and Edge overlay
3964 * content and should be considered 0 width.
3965 */
3966 var BODY_SCROLLBAR_WIDTH;
3967 var OVERFLOW_REGEX = {
3968 normal: /(auto|scroll)/,
3969 hidden: /(auto|scroll|hidden)/
3970 };
3971 var PLACEMENT_REGEX = {
3972 auto: /\s?auto?\s?/i,
3973 primary: /^(top|bottom|left|right)$/,
3974 secondary: /^(top|bottom|left|right|center)$/,
3975 vertical: /^(top|bottom)$/
3976 };
3977 var BODY_REGEX = /(HTML|BODY)/;
3978
3979 return {
3980
3981 /**
3982 * Provides a raw DOM element from a jQuery/jQLite element.
3983 *
3984 * @param {element} elem - The element to convert.
3985 *
3986 * @returns {element} A HTML element.
3987 */
3988 getRawNode: function(elem) {
3989 return elem.nodeName ? elem : elem[0] || elem;
3990 },
3991
3992 /**
3993 * Provides a parsed number for a style property. Strips
3994 * units and casts invalid numbers to 0.
3995 *
3996 * @param {string} value - The style value to parse.
3997 *
3998 * @returns {number} A valid number.
3999 */
4000 parseStyle: function(value) {
4001 value = parseFloat(value);
4002 return isFinite(value) ? value : 0;
4003 },
4004
4005 /**
4006 * Provides the closest positioned ancestor.
4007 *
4008 * @param {element} element - The element to get the offest parent for.
4009 *
4010 * @returns {element} The closest positioned ancestor.
4011 */
4012 offsetParent: function(elem) {
4013 elem = this.getRawNode(elem);
4014
4015 var offsetParent = elem.offsetParent || $document[0].documentElement;
4016
4017 function isStaticPositioned(el) {
4018 return ($window.getComputedStyle(el).position || 'static') === 'static';
4019 }
4020
4021 while (offsetParent && offsetParent !== $document[0].documentElement && isStaticPositioned(offsetParent)) {
4022 offsetParent = offsetParent.offsetParent;
4023 }
4024
4025 return offsetParent || $document[0].documentElement;
4026 },
4027
4028 /**
4029 * Provides the scrollbar width, concept from TWBS measureScrollbar()
4030 * function in https://github.com/twbs/bootstrap/blob/master/js/modal.js
4031 * In IE and Edge, scollbar on body and html element overlay and should
4032 * return a width of 0.
4033 *
4034 * @returns {number} The width of the browser scollbar.
4035 */
4036 scrollbarWidth: function(isBody) {
4037 if (isBody) {
4038 if (angular.isUndefined(BODY_SCROLLBAR_WIDTH)) {
4039 var bodyElem = $document.find('body');
4040 bodyElem.addClass('uib-position-body-scrollbar-measure');
4041 BODY_SCROLLBAR_WIDTH = $window.innerWidth - bodyElem[0].clientWidth;
4042 BODY_SCROLLBAR_WIDTH = isFinite(BODY_SCROLLBAR_WIDTH) ? BODY_SCROLLBAR_WIDTH : 0;
4043 bodyElem.removeClass('uib-position-body-scrollbar-measure');
4044 }
4045 return BODY_SCROLLBAR_WIDTH;
4046 }
4047
4048 if (angular.isUndefined(SCROLLBAR_WIDTH)) {
4049 var scrollElem = angular.element('<div class="uib-position-scrollbar-measure"></div>');
4050 $document.find('body').append(scrollElem);
4051 SCROLLBAR_WIDTH = scrollElem[0].offsetWidth - scrollElem[0].clientWidth;
4052 SCROLLBAR_WIDTH = isFinite(SCROLLBAR_WIDTH) ? SCROLLBAR_WIDTH : 0;
4053 scrollElem.remove();
4054 }
4055
4056 return SCROLLBAR_WIDTH;
4057 },
4058
4059 /**
4060 * Provides the padding required on an element to replace the scrollbar.
4061 *
4062 * @returns {object} An object with the following properties:
4063 * <ul>
4064 * <li>**scrollbarWidth**: the width of the scrollbar</li>
4065 * <li>**widthOverflow**: whether the the width is overflowing</li>
4066 * <li>**right**: the amount of right padding on the element needed to replace the scrollbar</li>
4067 * <li>**rightOriginal**: the amount of right padding currently on the element</li>
4068 * <li>**heightOverflow**: whether the the height is overflowing</li>
4069 * <li>**bottom**: the amount of bottom padding on the element needed to replace the scrollbar</li>
4070 * <li>**bottomOriginal**: the amount of bottom padding currently on the element</li>
4071 * </ul>
4072 */
4073 scrollbarPadding: function(elem) {
4074 elem = this.getRawNode(elem);
4075
4076 var elemStyle = $window.getComputedStyle(elem);
4077 var paddingRight = this.parseStyle(elemStyle.paddingRight);
4078 var paddingBottom = this.parseStyle(elemStyle.paddingBottom);
4079 var scrollParent = this.scrollParent(elem, false, true);
4080 var scrollbarWidth = this.scrollbarWidth(scrollParent, BODY_REGEX.test(scrollParent.tagName));
4081
4082 return {
4083 scrollbarWidth: scrollbarWidth,
4084 widthOverflow: scrollParent.scrollWidth > scrollParent.clientWidth,
4085 right: paddingRight + scrollbarWidth,
4086 originalRight: paddingRight,
4087 heightOverflow: scrollParent.scrollHeight > scrollParent.clientHeight,
4088 bottom: paddingBottom + scrollbarWidth,
4089 originalBottom: paddingBottom
4090 };
4091 },
4092
4093 /**
4094 * Checks to see if the element is scrollable.
4095 *
4096 * @param {element} elem - The element to check.
4097 * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,
4098 * default is false.
4099 *
4100 * @returns {boolean} Whether the element is scrollable.
4101 */
4102 isScrollable: function(elem, includeHidden) {
4103 elem = this.getRawNode(elem);
4104
4105 var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;
4106 var elemStyle = $window.getComputedStyle(elem);
4107 return overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX);
4108 },
4109
4110 /**
4111 * Provides the closest scrollable ancestor.
4112 * A port of the jQuery UI scrollParent method:
4113 * https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
4114 *
4115 * @param {element} elem - The element to find the scroll parent of.
4116 * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,
4117 * default is false.
4118 * @param {boolean=} [includeSelf=false] - Should the element being passed be
4119 * included in the scrollable llokup.
4120 *
4121 * @returns {element} A HTML element.
4122 */
4123 scrollParent: function(elem, includeHidden, includeSelf) {
4124 elem = this.getRawNode(elem);
4125
4126 var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;
4127 var documentEl = $document[0].documentElement;
4128 var elemStyle = $window.getComputedStyle(elem);
4129 if (includeSelf && overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX)) {
4130 return elem;
4131 }
4132 var excludeStatic = elemStyle.position === 'absolute';
4133 var scrollParent = elem.parentElement || documentEl;
4134
4135 if (scrollParent === documentEl || elemStyle.position === 'fixed') {
4136 return documentEl;
4137 }
4138
4139 while (scrollParent.parentElement && scrollParent !== documentEl) {
4140 var spStyle = $window.getComputedStyle(scrollParent);
4141 if (excludeStatic && spStyle.position !== 'static') {
4142 excludeStatic = false;
4143 }
4144
4145 if (!excludeStatic && overflowRegex.test(spStyle.overflow + spStyle.overflowY + spStyle.overflowX)) {
4146 break;
4147 }
4148 scrollParent = scrollParent.parentElement;
4149 }
4150
4151 return scrollParent;
4152 },
4153
4154 /**
4155 * Provides read-only equivalent of jQuery's position function:
4156 * http://api.jquery.com/position/ - distance to closest positioned
4157 * ancestor. Does not account for margins by default like jQuery position.
4158 *
4159 * @param {element} elem - The element to caclulate the position on.
4160 * @param {boolean=} [includeMargins=false] - Should margins be accounted
4161 * for, default is false.
4162 *
4163 * @returns {object} An object with the following properties:
4164 * <ul>
4165 * <li>**width**: the width of the element</li>
4166 * <li>**height**: the height of the element</li>
4167 * <li>**top**: distance to top edge of offset parent</li>
4168 * <li>**left**: distance to left edge of offset parent</li>
4169 * </ul>
4170 */
4171 position: function(elem, includeMagins) {
4172 elem = this.getRawNode(elem);
4173
4174 var elemOffset = this.offset(elem);
4175 if (includeMagins) {
4176 var elemStyle = $window.getComputedStyle(elem);
4177 elemOffset.top -= this.parseStyle(elemStyle.marginTop);
4178 elemOffset.left -= this.parseStyle(elemStyle.marginLeft);
4179 }
4180 var parent = this.offsetParent(elem);
4181 var parentOffset = {top: 0, left: 0};
4182
4183 if (parent !== $document[0].documentElement) {
4184 parentOffset = this.offset(parent);
4185 parentOffset.top += parent.clientTop - parent.scrollTop;
4186 parentOffset.left += parent.clientLeft - parent.scrollLeft;
4187 }
4188
4189 return {
4190 width: Math.round(angular.isNumber(elemOffset.width) ? elemOffset.width : elem.offsetWidth),
4191 height: Math.round(angular.isNumber(elemOffset.height) ? elemOffset.height : elem.offsetHeight),
4192 top: Math.round(elemOffset.top - parentOffset.top),
4193 left: Math.round(elemOffset.left - parentOffset.left)
4194 };
4195 },
4196
4197 /**
4198 * Provides read-only equivalent of jQuery's offset function:
4199 * http://api.jquery.com/offset/ - distance to viewport. Does
4200 * not account for borders, margins, or padding on the body
4201 * element.
4202 *
4203 * @param {element} elem - The element to calculate the offset on.
4204 *
4205 * @returns {object} An object with the following properties:
4206 * <ul>
4207 * <li>**width**: the width of the element</li>
4208 * <li>**height**: the height of the element</li>
4209 * <li>**top**: distance to top edge of viewport</li>
4210 * <li>**right**: distance to bottom edge of viewport</li>
4211 * </ul>
4212 */
4213 offset: function(elem) {
4214 elem = this.getRawNode(elem);
4215
4216 var elemBCR = elem.getBoundingClientRect();
4217 return {
4218 width: Math.round(angular.isNumber(elemBCR.width) ? elemBCR.width : elem.offsetWidth),
4219 height: Math.round(angular.isNumber(elemBCR.height) ? elemBCR.height : elem.offsetHeight),
4220 top: Math.round(elemBCR.top + ($window.pageYOffset || $document[0].documentElement.scrollTop)),
4221 left: Math.round(elemBCR.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft))
4222 };
4223 },
4224
4225 /**
4226 * Provides offset distance to the closest scrollable ancestor
4227 * or viewport. Accounts for border and scrollbar width.
4228 *
4229 * Right and bottom dimensions represent the distance to the
4230 * respective edge of the viewport element. If the element
4231 * edge extends beyond the viewport, a negative value will be
4232 * reported.
4233 *
4234 * @param {element} elem - The element to get the viewport offset for.
4235 * @param {boolean=} [useDocument=false] - Should the viewport be the document element instead
4236 * of the first scrollable element, default is false.
4237 * @param {boolean=} [includePadding=true] - Should the padding on the offset parent element
4238 * be accounted for, default is true.
4239 *
4240 * @returns {object} An object with the following properties:
4241 * <ul>
4242 * <li>**top**: distance to the top content edge of viewport element</li>
4243 * <li>**bottom**: distance to the bottom content edge of viewport element</li>
4244 * <li>**left**: distance to the left content edge of viewport element</li>
4245 * <li>**right**: distance to the right content edge of viewport element</li>
4246 * </ul>
4247 */
4248 viewportOffset: function(elem, useDocument, includePadding) {
4249 elem = this.getRawNode(elem);
4250 includePadding = includePadding !== false ? true : false;
4251
4252 var elemBCR = elem.getBoundingClientRect();
4253 var offsetBCR = {top: 0, left: 0, bottom: 0, right: 0};
4254
4255 var offsetParent = useDocument ? $document[0].documentElement : this.scrollParent(elem);
4256 var offsetParentBCR = offsetParent.getBoundingClientRect();
4257
4258 offsetBCR.top = offsetParentBCR.top + offsetParent.clientTop;
4259 offsetBCR.left = offsetParentBCR.left + offsetParent.clientLeft;
4260 if (offsetParent === $document[0].documentElement) {
4261 offsetBCR.top += $window.pageYOffset;
4262 offsetBCR.left += $window.pageXOffset;
4263 }
4264 offsetBCR.bottom = offsetBCR.top + offsetParent.clientHeight;
4265 offsetBCR.right = offsetBCR.left + offsetParent.clientWidth;
4266
4267 if (includePadding) {
4268 var offsetParentStyle = $window.getComputedStyle(offsetParent);
4269 offsetBCR.top += this.parseStyle(offsetParentStyle.paddingTop);
4270 offsetBCR.bottom -= this.parseStyle(offsetParentStyle.paddingBottom);
4271 offsetBCR.left += this.parseStyle(offsetParentStyle.paddingLeft);
4272 offsetBCR.right -= this.parseStyle(offsetParentStyle.paddingRight);
4273 }
4274
4275 return {
4276 top: Math.round(elemBCR.top - offsetBCR.top),
4277 bottom: Math.round(offsetBCR.bottom - elemBCR.bottom),
4278 left: Math.round(elemBCR.left - offsetBCR.left),
4279 right: Math.round(offsetBCR.right - elemBCR.right)
4280 };
4281 },
4282
4283 /**
4284 * Provides an array of placement values parsed from a placement string.
4285 * Along with the 'auto' indicator, supported placement strings are:
4286 * <ul>
4287 * <li>top: element on top, horizontally centered on host element.</li>
4288 * <li>top-left: element on top, left edge aligned with host element left edge.</li>
4289 * <li>top-right: element on top, lerightft edge aligned with host element right edge.</li>
4290 * <li>bottom: element on bottom, horizontally centered on host element.</li>
4291 * <li>bottom-left: element on bottom, left edge aligned with host element left edge.</li>
4292 * <li>bottom-right: element on bottom, right edge aligned with host element right edge.</li>
4293 * <li>left: element on left, vertically centered on host element.</li>
4294 * <li>left-top: element on left, top edge aligned with host element top edge.</li>
4295 * <li>left-bottom: element on left, bottom edge aligned with host element bottom edge.</li>
4296 * <li>right: element on right, vertically centered on host element.</li>
4297 * <li>right-top: element on right, top edge aligned with host element top edge.</li>
4298 * <li>right-bottom: element on right, bottom edge aligned with host element bottom edge.</li>
4299 * </ul>
4300 * A placement string with an 'auto' indicator is expected to be
4301 * space separated from the placement, i.e: 'auto bottom-left' If
4302 * the primary and secondary placement values do not match 'top,
4303 * bottom, left, right' then 'top' will be the primary placement and
4304 * 'center' will be the secondary placement. If 'auto' is passed, true
4305 * will be returned as the 3rd value of the array.
4306 *
4307 * @param {string} placement - The placement string to parse.
4308 *
4309 * @returns {array} An array with the following values
4310 * <ul>
4311 * <li>**[0]**: The primary placement.</li>
4312 * <li>**[1]**: The secondary placement.</li>
4313 * <li>**[2]**: If auto is passed: true, else undefined.</li>
4314 * </ul>
4315 */
4316 parsePlacement: function(placement) {
4317 var autoPlace = PLACEMENT_REGEX.auto.test(placement);
4318 if (autoPlace) {
4319 placement = placement.replace(PLACEMENT_REGEX.auto, '');
4320 }
4321
4322 placement = placement.split('-');
4323
4324 placement[0] = placement[0] || 'top';
4325 if (!PLACEMENT_REGEX.primary.test(placement[0])) {
4326 placement[0] = 'top';
4327 }
4328
4329 placement[1] = placement[1] || 'center';
4330 if (!PLACEMENT_REGEX.secondary.test(placement[1])) {
4331 placement[1] = 'center';
4332 }
4333
4334 if (autoPlace) {
4335 placement[2] = true;
4336 } else {
4337 placement[2] = false;
4338 }
4339
4340 return placement;
4341 },
4342
4343 /**
4344 * Provides coordinates for an element to be positioned relative to
4345 * another element. Passing 'auto' as part of the placement parameter
4346 * will enable smart placement - where the element fits. i.e:
4347 * 'auto left-top' will check to see if there is enough space to the left
4348 * of the hostElem to fit the targetElem, if not place right (same for secondary
4349 * top placement). Available space is calculated using the viewportOffset
4350 * function.
4351 *
4352 * @param {element} hostElem - The element to position against.
4353 * @param {element} targetElem - The element to position.
4354 * @param {string=} [placement=top] - The placement for the targetElem,
4355 * default is 'top'. 'center' is assumed as secondary placement for
4356 * 'top', 'left', 'right', and 'bottom' placements. Available placements are:
4357 * <ul>
4358 * <li>top</li>
4359 * <li>top-right</li>
4360 * <li>top-left</li>
4361 * <li>bottom</li>
4362 * <li>bottom-left</li>
4363 * <li>bottom-right</li>
4364 * <li>left</li>
4365 * <li>left-top</li>
4366 * <li>left-bottom</li>
4367 * <li>right</li>
4368 * <li>right-top</li>
4369 * <li>right-bottom</li>
4370 * </ul>
4371 * @param {boolean=} [appendToBody=false] - Should the top and left values returned
4372 * be calculated from the body element, default is false.
4373 *
4374 * @returns {object} An object with the following properties:
4375 * <ul>
4376 * <li>**top**: Value for targetElem top.</li>
4377 * <li>**left**: Value for targetElem left.</li>
4378 * <li>**placement**: The resolved placement.</li>
4379 * </ul>
4380 */
4381 positionElements: function(hostElem, targetElem, placement, appendToBody) {
4382 hostElem = this.getRawNode(hostElem);
4383 targetElem = this.getRawNode(targetElem);
4384
4385 // need to read from prop to support tests.
4386 var targetWidth = angular.isDefined(targetElem.offsetWidth) ? targetElem.offsetWidth : targetElem.prop('offsetWidth');
4387 var targetHeight = angular.isDefined(targetElem.offsetHeight) ? targetElem.offsetHeight : targetElem.prop('offsetHeight');
4388
4389 placement = this.parsePlacement(placement);
4390
4391 var hostElemPos = appendToBody ? this.offset(hostElem) : this.position(hostElem);
4392 var targetElemPos = {top: 0, left: 0, placement: ''};
4393
4394 if (placement[2]) {
4395 var viewportOffset = this.viewportOffset(hostElem, appendToBody);
4396
4397 var targetElemStyle = $window.getComputedStyle(targetElem);
4398 var adjustedSize = {
4399 width: targetWidth + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginLeft) + this.parseStyle(targetElemStyle.marginRight))),
4400 height: targetHeight + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginTop) + this.parseStyle(targetElemStyle.marginBottom)))
4401 };
4402
4403 placement[0] = placement[0] === 'top' && adjustedSize.height > viewportOffset.top && adjustedSize.height <= viewportOffset.bottom ? 'bottom' :
4404 placement[0] === 'bottom' && adjustedSize.height > viewportOffset.bottom && adjustedSize.height <= viewportOffset.top ? 'top' :
4405 placement[0] === 'left' && adjustedSize.width > viewportOffset.left && adjustedSize.width <= viewportOffset.right ? 'right' :
4406 placement[0] === 'right' && adjustedSize.width > viewportOffset.right && adjustedSize.width <= viewportOffset.left ? 'left' :
4407 placement[0];
4408
4409 placement[1] = placement[1] === 'top' && adjustedSize.height - hostElemPos.height > viewportOffset.bottom && adjustedSize.height - hostElemPos.height <= viewportOffset.top ? 'bottom' :
4410 placement[1] === 'bottom' && adjustedSize.height - hostElemPos.height > viewportOffset.top && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom ? 'top' :
4411 placement[1] === 'left' && adjustedSize.width - hostElemPos.width > viewportOffset.right && adjustedSize.width - hostElemPos.width <= viewportOffset.left ? 'right' :
4412 placement[1] === 'right' && adjustedSize.width - hostElemPos.width > viewportOffset.left && adjustedSize.width - hostElemPos.width <= viewportOffset.right ? 'left' :
4413 placement[1];
4414
4415 if (placement[1] === 'center') {
4416 if (PLACEMENT_REGEX.vertical.test(placement[0])) {
4417 var xOverflow = hostElemPos.width / 2 - targetWidth / 2;
4418 if (viewportOffset.left + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.right) {
4419 placement[1] = 'left';
4420 } else if (viewportOffset.right + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.left) {
4421 placement[1] = 'right';
4422 }
4423 } else {
4424 var yOverflow = hostElemPos.height / 2 - adjustedSize.height / 2;
4425 if (viewportOffset.top + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom) {
4426 placement[1] = 'top';
4427 } else if (viewportOffset.bottom + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.top) {
4428 placement[1] = 'bottom';
4429 }
4430 }
4431 }
4432 }
4433
4434 switch (placement[0]) {
4435 case 'top':
4436 targetElemPos.top = hostElemPos.top - targetHeight;
4437 break;
4438 case 'bottom':
4439 targetElemPos.top = hostElemPos.top + hostElemPos.height;
4440 break;
4441 case 'left':
4442 targetElemPos.left = hostElemPos.left - targetWidth;
4443 break;
4444 case 'right':
4445 targetElemPos.left = hostElemPos.left + hostElemPos.width;
4446 break;
4447 }
4448
4449 switch (placement[1]) {
4450 case 'top':
4451 targetElemPos.top = hostElemPos.top;
4452 break;
4453 case 'bottom':
4454 targetElemPos.top = hostElemPos.top + hostElemPos.height - targetHeight;
4455 break;
4456 case 'left':
4457 targetElemPos.left = hostElemPos.left;
4458 break;
4459 case 'right':
4460 targetElemPos.left = hostElemPos.left + hostElemPos.width - targetWidth;
4461 break;
4462 case 'center':
4463 if (PLACEMENT_REGEX.vertical.test(placement[0])) {
4464 targetElemPos.left = hostElemPos.left + hostElemPos.width / 2 - targetWidth / 2;
4465 } else {
4466 targetElemPos.top = hostElemPos.top + hostElemPos.height / 2 - targetHeight / 2;
4467 }
4468 break;
4469 }
4470
4471 targetElemPos.top = Math.round(targetElemPos.top);
4472 targetElemPos.left = Math.round(targetElemPos.left);
4473 targetElemPos.placement = placement[1] === 'center' ? placement[0] : placement[0] + '-' + placement[1];
4474
4475 return targetElemPos;
4476 },
4477
4478 /**
4479 * Provides a way for positioning tooltip & dropdown
4480 * arrows when using placement options beyond the standard
4481 * left, right, top, or bottom.
4482 *
4483 * @param {element} elem - The tooltip/dropdown element.
4484 * @param {string} placement - The placement for the elem.
4485 */
4486 positionArrow: function(elem, placement) {
4487 elem = this.getRawNode(elem);
4488
4489 var innerElem = elem.querySelector('.tooltip-inner, .popover-inner');
4490 if (!innerElem) {
4491 return;
4492 }
4493
4494 var isTooltip = angular.element(innerElem).hasClass('tooltip-inner');
4495
4496 var arrowElem = isTooltip ? elem.querySelector('.tooltip-arrow') : elem.querySelector('.arrow');
4497 if (!arrowElem) {
4498 return;
4499 }
4500
4501 var arrowCss = {
4502 top: '',
4503 bottom: '',
4504 left: '',
4505 right: ''
4506 };
4507
4508 placement = this.parsePlacement(placement);
4509 if (placement[1] === 'center') {
4510 // no adjustment necessary - just reset styles
4511 angular.element(arrowElem).css(arrowCss);
4512 return;
4513 }
4514
4515 var borderProp = 'border-' + placement[0] + '-width';
4516 var borderWidth = $window.getComputedStyle(arrowElem)[borderProp];
4517
4518 var borderRadiusProp = 'border-';
4519 if (PLACEMENT_REGEX.vertical.test(placement[0])) {
4520 borderRadiusProp += placement[0] + '-' + placement[1];
4521 } else {
4522 borderRadiusProp += placement[1] + '-' + placement[0];
4523 }
4524 borderRadiusProp += '-radius';
4525 var borderRadius = $window.getComputedStyle(isTooltip ? innerElem : elem)[borderRadiusProp];
4526
4527 switch (placement[0]) {
4528 case 'top':
4529 arrowCss.bottom = isTooltip ? '0' : '-' + borderWidth;
4530 break;
4531 case 'bottom':
4532 arrowCss.top = isTooltip ? '0' : '-' + borderWidth;
4533 break;
4534 case 'left':
4535 arrowCss.right = isTooltip ? '0' : '-' + borderWidth;
4536 break;
4537 case 'right':
4538 arrowCss.left = isTooltip ? '0' : '-' + borderWidth;
4539 break;
4540 }
4541
4542 arrowCss[placement[1]] = borderRadius;
4543
4544 angular.element(arrowElem).css(arrowCss);
4545 }
4546 };
4547 }]);
4548
4549 angular.module('ui.bootstrap.datepickerPopup', ['ui.bootstrap.datepicker', 'ui.bootstrap.position'])
4550
4551 .value('$datepickerPopupLiteralWarning', true)
4552
4553 .constant('uibDatepickerPopupConfig', {
4554 altInputFormats: [],
4555 appendToBody: false,
4556 clearText: 'Clear',
4557 closeOnDateSelection: true,
4558 closeText: 'Done',
4559 currentText: 'Today',
4560 datepickerPopup: 'yyyy-MM-dd',
4561 datepickerPopupTemplateUrl: 'uib/template/datepickerPopup/popup.html',
4562 datepickerTemplateUrl: 'uib/template/datepicker/datepicker.html',
4563 html5Types: {
4564 date: 'yyyy-MM-dd',
4565 'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss',
4566 'month': 'yyyy-MM'
4567 },
4568 onOpenFocus: true,
4569 showButtonBar: true,
4570 placement: 'auto bottom-left'
4571 })
4572
4573 .controller('UibDatepickerPopupController', ['$scope', '$element', '$attrs', '$compile', '$log', '$parse', '$window', '$document', '$rootScope', '$uibPosition', 'dateFilter', 'uibDateParser', 'uibDatepickerPopupConfig', '$timeout', 'uibDatepickerConfig', '$datepickerPopupLiteralWarning',
4574 function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $rootScope, $position, dateFilter, dateParser, datepickerPopupConfig, $timeout, datepickerConfig, $datepickerPopupLiteralWarning) {
4575 var cache = {},
4576 isHtml5DateInput = false;
4577 var dateFormat, closeOnDateSelection, appendToBody, onOpenFocus,
4578 datepickerPopupTemplateUrl, datepickerTemplateUrl, popupEl, datepickerEl, scrollParentEl,
4579 ngModel, ngModelOptions, $popup, altInputFormats, watchListeners = [],
4580 timezone;
4581
4582 this.init = function(_ngModel_) {
4583 ngModel = _ngModel_;
4584 ngModelOptions = _ngModel_.$options;
4585 closeOnDateSelection = angular.isDefined($attrs.closeOnDateSelection) ?
4586 $scope.$parent.$eval($attrs.closeOnDateSelection) :
4587 datepickerPopupConfig.closeOnDateSelection;
4588 appendToBody = angular.isDefined($attrs.datepickerAppendToBody) ?
4589 $scope.$parent.$eval($attrs.datepickerAppendToBody) :
4590 datepickerPopupConfig.appendToBody;
4591 onOpenFocus = angular.isDefined($attrs.onOpenFocus) ?
4592 $scope.$parent.$eval($attrs.onOpenFocus) : datepickerPopupConfig.onOpenFocus;
4593 datepickerPopupTemplateUrl = angular.isDefined($attrs.datepickerPopupTemplateUrl) ?
4594 $attrs.datepickerPopupTemplateUrl :
4595 datepickerPopupConfig.datepickerPopupTemplateUrl;
4596 datepickerTemplateUrl = angular.isDefined($attrs.datepickerTemplateUrl) ?
4597 $attrs.datepickerTemplateUrl : datepickerPopupConfig.datepickerTemplateUrl;
4598 altInputFormats = angular.isDefined($attrs.altInputFormats) ?
4599 $scope.$parent.$eval($attrs.altInputFormats) :
4600 datepickerPopupConfig.altInputFormats;
4601
4602 $scope.showButtonBar = angular.isDefined($attrs.showButtonBar) ?
4603 $scope.$parent.$eval($attrs.showButtonBar) :
4604 datepickerPopupConfig.showButtonBar;
4605
4606 if (datepickerPopupConfig.html5Types[$attrs.type]) {
4607 dateFormat = datepickerPopupConfig.html5Types[$attrs.type];
4608 isHtml5DateInput = true;
4609 } else {
4610 dateFormat = $attrs.uibDatepickerPopup || datepickerPopupConfig.datepickerPopup;
4611 $attrs.$observe('uibDatepickerPopup', function(value, oldValue) {
4612 var newDateFormat = value || datepickerPopupConfig.datepickerPopup;
4613 // Invalidate the $modelValue to ensure that formatters re-run
4614 // FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764
4615 if (newDateFormat !== dateFormat) {
4616 dateFormat = newDateFormat;
4617 ngModel.$modelValue = null;
4618
4619 if (!dateFormat) {
4620 throw new Error('uibDatepickerPopup must have a date format specified.');
4621 }
4622 }
4623 });
4624 }
4625
4626 if (!dateFormat) {
4627 throw new Error('uibDatepickerPopup must have a date format specified.');
4628 }
4629
4630 if (isHtml5DateInput && $attrs.uibDatepickerPopup) {
4631 throw new Error('HTML5 date input types do not support custom formats.');
4632 }
4633
4634 // popup element used to display calendar
4635 popupEl = angular.element('<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>');
4636 if (ngModelOptions) {
4637 timezone = ngModelOptions.timezone;
4638 $scope.ngModelOptions = angular.copy(ngModelOptions);
4639 $scope.ngModelOptions.timezone = null;
4640 if ($scope.ngModelOptions.updateOnDefault === true) {
4641 $scope.ngModelOptions.updateOn = $scope.ngModelOptions.updateOn ?
4642 $scope.ngModelOptions.updateOn + ' default' : 'default';
4643 }
4644
4645 popupEl.attr('ng-model-options', 'ngModelOptions');
4646 } else {
4647 timezone = null;
4648 }
4649
4650 popupEl.attr({
4651 'ng-model': 'date',
4652 'ng-change': 'dateSelection(date)',
4653 'template-url': datepickerPopupTemplateUrl
4654 });
4655
4656 // datepicker element
4657 datepickerEl = angular.element(popupEl.children()[0]);
4658 datepickerEl.attr('template-url', datepickerTemplateUrl);
4659
4660 if (!$scope.datepickerOptions) {
4661 $scope.datepickerOptions = {};
4662 }
4663
4664 if (isHtml5DateInput) {
4665 if ($attrs.type === 'month') {
4666 $scope.datepickerOptions.datepickerMode = 'month';
4667 $scope.datepickerOptions.minMode = 'month';
4668 }
4669 }
4670
4671 datepickerEl.attr('datepicker-options', 'datepickerOptions');
4672
4673 if (!isHtml5DateInput) {
4674 // Internal API to maintain the correct ng-invalid-[key] class
4675 ngModel.$$parserName = 'date';
4676 ngModel.$validators.date = validator;
4677 ngModel.$parsers.unshift(parseDate);
4678 ngModel.$formatters.push(function(value) {
4679 if (ngModel.$isEmpty(value)) {
4680 $scope.date = value;
4681 return value;
4682 }
4683
4684 $scope.date = dateParser.fromTimezone(value, timezone);
4685
4686 if (angular.isNumber($scope.date)) {
4687 $scope.date = new Date($scope.date);
4688 }
4689
4690 return dateParser.filter($scope.date, dateFormat);
4691 });
4692 } else {
4693 ngModel.$formatters.push(function(value) {
4694 $scope.date = dateParser.fromTimezone(value, timezone);
4695 return value;
4696 });
4697 }
4698
4699 // Detect changes in the view from the text box
4700 ngModel.$viewChangeListeners.push(function() {
4701 $scope.date = parseDateString(ngModel.$viewValue);
4702 });
4703
4704 $element.on('keydown', inputKeydownBind);
4705
4706 $popup = $compile(popupEl)($scope);
4707 // Prevent jQuery cache memory leak (template is now redundant after linking)
4708 popupEl.remove();
4709
4710 if (appendToBody) {
4711 $document.find('body').append($popup);
4712 } else {
4713 $element.after($popup);
4714 }
4715
4716 $scope.$on('$destroy', function() {
4717 if ($scope.isOpen === true) {
4718 if (!$rootScope.$$phase) {
4719 $scope.$apply(function() {
4720 $scope.isOpen = false;
4721 });
4722 }
4723 }
4724
4725 $popup.remove();
4726 $element.off('keydown', inputKeydownBind);
4727 $document.off('click', documentClickBind);
4728 if (scrollParentEl) {
4729 scrollParentEl.off('scroll', positionPopup);
4730 }
4731 angular.element($window).off('resize', positionPopup);
4732
4733 //Clear all watch listeners on destroy
4734 while (watchListeners.length) {
4735 watchListeners.shift()();
4736 }
4737 });
4738 };
4739
4740 $scope.getText = function(key) {
4741 return $scope[key + 'Text'] || datepickerPopupConfig[key + 'Text'];
4742 };
4743
4744 $scope.isDisabled = function(date) {
4745 if (date === 'today') {
4746 date = dateParser.fromTimezone(new Date(), timezone);
4747 }
4748
4749 var dates = {};
4750 angular.forEach(['minDate', 'maxDate'], function(key) {
4751 if (!$scope.datepickerOptions[key]) {
4752 dates[key] = null;
4753 } else if (angular.isDate($scope.datepickerOptions[key])) {
4754 dates[key] = dateParser.fromTimezone(new Date($scope.datepickerOptions[key]), timezone);
4755 } else {
4756 if ($datepickerPopupLiteralWarning) {
4757 $log.warn('Literal date support has been deprecated, please switch to date object usage');
4758 }
4759
4760 dates[key] = new Date(dateFilter($scope.datepickerOptions[key], 'medium'));
4761 }
4762 });
4763
4764 return $scope.datepickerOptions &&
4765 dates.minDate && $scope.compare(date, dates.minDate) < 0 ||
4766 dates.maxDate && $scope.compare(date, dates.maxDate) > 0;
4767 };
4768
4769 $scope.compare = function(date1, date2) {
4770 return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
4771 };
4772
4773 // Inner change
4774 $scope.dateSelection = function(dt) {
4775 if (angular.isDefined(dt)) {
4776 $scope.date = dt;
4777 }
4778 var date = $scope.date ? dateParser.filter($scope.date, dateFormat) : null; // Setting to NULL is necessary for form validators to function
4779 $element.val(date);
4780 ngModel.$setViewValue(date);
4781
4782 if (closeOnDateSelection) {
4783 $scope.isOpen = false;
4784 $element[0].focus();
4785 }
4786 };
4787
4788 $scope.keydown = function(evt) {
4789 if (evt.which === 27) {
4790 evt.stopPropagation();
4791 $scope.isOpen = false;
4792 $element[0].focus();
4793 }
4794 };
4795
4796 $scope.select = function(date, evt) {
4797 evt.stopPropagation();
4798
4799 if (date === 'today') {
4800 var today = new Date();
4801 if (angular.isDate($scope.date)) {
4802 date = new Date($scope.date);
4803 date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());
4804 } else {
4805 date = new Date(today.setHours(0, 0, 0, 0));
4806 }
4807 }
4808 $scope.dateSelection(date);
4809 };
4810
4811 $scope.close = function(evt) {
4812 evt.stopPropagation();
4813
4814 $scope.isOpen = false;
4815 $element[0].focus();
4816 };
4817
4818 $scope.disabled = angular.isDefined($attrs.disabled) || false;
4819 if ($attrs.ngDisabled) {
4820 watchListeners.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(disabled) {
4821 $scope.disabled = disabled;
4822 }));
4823 }
4824
4825 $scope.$watch('isOpen', function(value) {
4826 if (value) {
4827 if (!$scope.disabled) {
4828 $timeout(function() {
4829 positionPopup();
4830
4831 if (onOpenFocus) {
4832 $scope.$broadcast('uib:datepicker.focus');
4833 }
4834
4835 $document.on('click', documentClickBind);
4836
4837 var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement;
4838 if (appendToBody || $position.parsePlacement(placement)[2]) {
4839 scrollParentEl = scrollParentEl || angular.element($position.scrollParent($element));
4840 if (scrollParentEl) {
4841 scrollParentEl.on('scroll', positionPopup);
4842 }
4843 } else {
4844 scrollParentEl = null;
4845 }
4846
4847 angular.element($window).on('resize', positionPopup);
4848 }, 0, false);
4849 } else {
4850 $scope.isOpen = false;
4851 }
4852 } else {
4853 $document.off('click', documentClickBind);
4854 if (scrollParentEl) {
4855 scrollParentEl.off('scroll', positionPopup);
4856 }
4857 angular.element($window).off('resize', positionPopup);
4858 }
4859 });
4860
4861 function cameltoDash(string) {
4862 return string.replace(/([A-Z])/g, function($1) { return '-' + $1.toLowerCase(); });
4863 }
4864
4865 function parseDateString(viewValue) {
4866 var date = dateParser.parse(viewValue, dateFormat, $scope.date);
4867 if (isNaN(date)) {
4868 for (var i = 0; i < altInputFormats.length; i++) {
4869 date = dateParser.parse(viewValue, altInputFormats[i], $scope.date);
4870 if (!isNaN(date)) {
4871 return date;
4872 }
4873 }
4874 }
4875 return date;
4876 }
4877
4878 function parseDate(viewValue) {
4879 if (angular.isNumber(viewValue)) {
4880 // presumably timestamp to date object
4881 viewValue = new Date(viewValue);
4882 }
4883
4884 if (!viewValue) {
4885 return null;
4886 }
4887
4888 if (angular.isDate(viewValue) && !isNaN(viewValue)) {
4889 return viewValue;
4890 }
4891
4892 if (angular.isString(viewValue)) {
4893 var date = parseDateString(viewValue);
4894 if (!isNaN(date)) {
4895 return dateParser.toTimezone(date, timezone);
4896 }
4897 }
4898
4899 return ngModel.$options && ngModel.$options.allowInvalid ? viewValue : undefined;
4900 }
4901
4902 function validator(modelValue, viewValue) {
4903 var value = modelValue || viewValue;
4904
4905 if (!$attrs.ngRequired && !value) {
4906 return true;
4907 }
4908
4909 if (angular.isNumber(value)) {
4910 value = new Date(value);
4911 }
4912
4913 if (!value) {
4914 return true;
4915 }
4916
4917 if (angular.isDate(value) && !isNaN(value)) {
4918 return true;
4919 }
4920
4921 if (angular.isString(value)) {
4922 return !isNaN(parseDateString(viewValue));
4923 }
4924
4925 return false;
4926 }
4927
4928 function documentClickBind(event) {
4929 if (!$scope.isOpen && $scope.disabled) {
4930 return;
4931 }
4932
4933 var popup = $popup[0];
4934 var dpContainsTarget = $element[0].contains(event.target);
4935 // The popup node may not be an element node
4936 // In some browsers (IE) only element nodes have the 'contains' function
4937 var popupContainsTarget = popup.contains !== undefined && popup.contains(event.target);
4938 if ($scope.isOpen && !(dpContainsTarget || popupContainsTarget)) {
4939 $scope.$apply(function() {
4940 $scope.isOpen = false;
4941 });
4942 }
4943 }
4944
4945 function inputKeydownBind(evt) {
4946 if (evt.which === 27 && $scope.isOpen) {
4947 evt.preventDefault();
4948 evt.stopPropagation();
4949 $scope.$apply(function() {
4950 $scope.isOpen = false;
4951 });
4952 $element[0].focus();
4953 } else if (evt.which === 40 && !$scope.isOpen) {
4954 evt.preventDefault();
4955 evt.stopPropagation();
4956 $scope.$apply(function() {
4957 $scope.isOpen = true;
4958 });
4959 }
4960 }
4961
4962 function positionPopup() {
4963 if ($scope.isOpen) {
4964 var dpElement = angular.element($popup[0].querySelector('.uib-datepicker-popup'));
4965 var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement;
4966 var position = $position.positionElements($element, dpElement, placement, appendToBody);
4967 dpElement.css({top: position.top + 'px', left: position.left + 'px'});
4968 if (dpElement.hasClass('uib-position-measure')) {
4969 dpElement.removeClass('uib-position-measure');
4970 }
4971 }
4972 }
4973
4974 $scope.$on('uib:datepicker.mode', function() {
4975 $timeout(positionPopup, 0, false);
4976 });
4977 }])
4978
4979 .directive('uibDatepickerPopup', function() {
4980 return {
4981 require: ['ngModel', 'uibDatepickerPopup'],
4982 controller: 'UibDatepickerPopupController',
4983 scope: {
4984 datepickerOptions: '=?',
4985 isOpen: '=?',
4986 currentText: '@',
4987 clearText: '@',
4988 closeText: '@'
4989 },
4990 link: function(scope, element, attrs, ctrls) {
4991 var ngModel = ctrls[0],
4992 ctrl = ctrls[1];
4993
4994 ctrl.init(ngModel);
4995 }
4996 };
4997 })
4998
4999 .directive('uibDatepickerPopupWrap', function() {
5000 return {
5001 replace: true,
5002 transclude: true,
5003 templateUrl: function(element, attrs) {
5004 return attrs.templateUrl || 'uib/template/datepickerPopup/popup.html';
5005 }
5006 };
5007 });
5008
5009 angular.module('ui.bootstrap.debounce', [])
5010 /**
5011 * A helper, internal service that debounces a function
5012 */
5013 .factory('$$debounce', ['$timeout', function($timeout) {
5014 return function(callback, debounceTime) {
5015 var timeoutPromise;
5016
5017 return function() {
5018 var self = this;
5019 var args = Array.prototype.slice.call(arguments);
5020 if (timeoutPromise) {
5021 $timeout.cancel(timeoutPromise);
5022 }
5023
5024 timeoutPromise = $timeout(function() {
5025 callback.apply(self, args);
5026 }, debounceTime);
5027 };
5028 };
5029 }]);
5030
5031 angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
5032
5033 .constant('uibDropdownConfig', {
5034 appendToOpenClass: 'uib-dropdown-open',
5035 openClass: 'open'
5036 })
5037
5038 .service('uibDropdownService', ['$document', '$rootScope', function($document, $rootScope) {
5039 var openScope = null;
5040
5041 this.open = function(dropdownScope, element) {
5042 if (!openScope) {
5043 $document.on('click', closeDropdown);
5044 element.on('keydown', keybindFilter);
5045 }
5046
5047 if (openScope && openScope !== dropdownScope) {
5048 openScope.isOpen = false;
5049 }
5050
5051 openScope = dropdownScope;
5052 };
5053
5054 this.close = function(dropdownScope, element) {
5055 if (openScope === dropdownScope) {
5056 openScope = null;
5057 $document.off('click', closeDropdown);
5058 element.off('keydown', keybindFilter);
5059 }
5060 };
5061
5062 var closeDropdown = function(evt) {
5063 // This method may still be called during the same mouse event that
5064 // unbound this event handler. So check openScope before proceeding.
5065 if (!openScope) { return; }
5066
5067 if (evt && openScope.getAutoClose() === 'disabled') { return; }
5068
5069 if (evt && evt.which === 3) { return; }
5070
5071 var toggleElement = openScope.getToggleElement();
5072 if (evt && toggleElement && toggleElement[0].contains(evt.target)) {
5073 return;
5074 }
5075
5076 var dropdownElement = openScope.getDropdownElement();
5077 if (evt && openScope.getAutoClose() === 'outsideClick' &&
5078 dropdownElement && dropdownElement[0].contains(evt.target)) {
5079 return;
5080 }
5081
5082 openScope.isOpen = false;
5083
5084 if (!$rootScope.$$phase) {
5085 openScope.$apply();
5086 }
5087 };
5088
5089 var keybindFilter = function(evt) {
5090 if (evt.which === 27) {
5091 evt.stopPropagation();
5092 openScope.focusToggleElement();
5093 closeDropdown();
5094 } else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen) {
5095 evt.preventDefault();
5096 evt.stopPropagation();
5097 openScope.focusDropdownEntry(evt.which);
5098 }
5099 };
5100 }])
5101
5102 .controller('UibDropdownController', ['$scope', '$element', '$attrs', '$parse', 'uibDropdownConfig', 'uibDropdownService', '$animate', '$uibPosition', '$document', '$compile', '$templateRequest', function($scope, $element, $attrs, $parse, dropdownConfig, uibDropdownService, $animate, $position, $document, $compile, $templateRequest) {
5103 var self = this,
5104 scope = $scope.$new(), // create a child scope so we are not polluting original one
5105 templateScope,
5106 appendToOpenClass = dropdownConfig.appendToOpenClass,
5107 openClass = dropdownConfig.openClass,
5108 getIsOpen,
5109 setIsOpen = angular.noop,
5110 toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop,
5111 appendToBody = false,
5112 appendTo = null,
5113 keynavEnabled = false,
5114 selectedOption = null,
5115 body = $document.find('body');
5116
5117 $element.addClass('dropdown');
5118
5119 this.init = function() {
5120 if ($attrs.isOpen) {
5121 getIsOpen = $parse($attrs.isOpen);
5122 setIsOpen = getIsOpen.assign;
5123
5124 $scope.$watch(getIsOpen, function(value) {
5125 scope.isOpen = !!value;
5126 });
5127 }
5128
5129 if (angular.isDefined($attrs.dropdownAppendTo)) {
5130 var appendToEl = $parse($attrs.dropdownAppendTo)(scope);
5131 if (appendToEl) {
5132 appendTo = angular.element(appendToEl);
5133 }
5134 }
5135
5136 appendToBody = angular.isDefined($attrs.dropdownAppendToBody);
5137 keynavEnabled = angular.isDefined($attrs.keyboardNav);
5138
5139 if (appendToBody && !appendTo) {
5140 appendTo = body;
5141 }
5142
5143 if (appendTo && self.dropdownMenu) {
5144 appendTo.append(self.dropdownMenu);
5145 $element.on('$destroy', function handleDestroyEvent() {
5146 self.dropdownMenu.remove();
5147 });
5148 }
5149 };
5150
5151 this.toggle = function(open) {
5152 scope.isOpen = arguments.length ? !!open : !scope.isOpen;
5153 if (angular.isFunction(setIsOpen)) {
5154 setIsOpen(scope, scope.isOpen);
5155 }
5156
5157 return scope.isOpen;
5158 };
5159
5160 // Allow other directives to watch status
5161 this.isOpen = function() {
5162 return scope.isOpen;
5163 };
5164
5165 scope.getToggleElement = function() {
5166 return self.toggleElement;
5167 };
5168
5169 scope.getAutoClose = function() {
5170 return $attrs.autoClose || 'always'; //or 'outsideClick' or 'disabled'
5171 };
5172
5173 scope.getElement = function() {
5174 return $element;
5175 };
5176
5177 scope.isKeynavEnabled = function() {
5178 return keynavEnabled;
5179 };
5180
5181 scope.focusDropdownEntry = function(keyCode) {
5182 var elems = self.dropdownMenu ? //If append to body is used.
5183 angular.element(self.dropdownMenu).find('a') :
5184 $element.find('ul').eq(0).find('a');
5185
5186 switch (keyCode) {
5187 case 40: {
5188 if (!angular.isNumber(self.selectedOption)) {
5189 self.selectedOption = 0;
5190 } else {
5191 self.selectedOption = self.selectedOption === elems.length - 1 ?
5192 self.selectedOption :
5193 self.selectedOption + 1;
5194 }
5195 break;
5196 }
5197 case 38: {
5198 if (!angular.isNumber(self.selectedOption)) {
5199 self.selectedOption = elems.length - 1;
5200 } else {
5201 self.selectedOption = self.selectedOption === 0 ?
5202 0 : self.selectedOption - 1;
5203 }
5204 break;
5205 }
5206 }
5207 elems[self.selectedOption].focus();
5208 };
5209
5210 scope.getDropdownElement = function() {
5211 return self.dropdownMenu;
5212 };
5213
5214 scope.focusToggleElement = function() {
5215 if (self.toggleElement) {
5216 self.toggleElement[0].focus();
5217 }
5218 };
5219
5220 scope.$watch('isOpen', function(isOpen, wasOpen) {
5221 if (appendTo && self.dropdownMenu) {
5222 var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true),
5223 css,
5224 rightalign;
5225
5226 css = {
5227 top: pos.top + 'px',
5228 display: isOpen ? 'block' : 'none'
5229 };
5230
5231 rightalign = self.dropdownMenu.hasClass('dropdown-menu-right');
5232 if (!rightalign) {
5233 css.left = pos.left + 'px';
5234 css.right = 'auto';
5235 } else {
5236 css.left = 'auto';
5237 css.right = window.innerWidth -
5238 (pos.left + $element.prop('offsetWidth')) + 'px';
5239 }
5240
5241 // Need to adjust our positioning to be relative to the appendTo container
5242 // if it's not the body element
5243 if (!appendToBody) {
5244 var appendOffset = $position.offset(appendTo);
5245
5246 css.top = pos.top - appendOffset.top + 'px';
5247
5248 if (!rightalign) {
5249 css.left = pos.left - appendOffset.left + 'px';
5250 } else {
5251 css.right = window.innerWidth -
5252 (pos.left - appendOffset.left + $element.prop('offsetWidth')) + 'px';
5253 }
5254 }
5255
5256 self.dropdownMenu.css(css);
5257 }
5258
5259 var openContainer = appendTo ? appendTo : $element;
5260 var hasOpenClass = openContainer.hasClass(appendTo ? appendToOpenClass : openClass);
5261
5262 if (hasOpenClass === !isOpen) {
5263 $animate[isOpen ? 'addClass' : 'removeClass'](openContainer, appendTo ? appendToOpenClass : openClass).then(function() {
5264 if (angular.isDefined(isOpen) && isOpen !== wasOpen) {
5265 toggleInvoker($scope, { open: !!isOpen });
5266 }
5267 });
5268 }
5269
5270 if (isOpen) {
5271 if (self.dropdownMenuTemplateUrl) {
5272 $templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent) {
5273 templateScope = scope.$new();
5274 $compile(tplContent.trim())(templateScope, function(dropdownElement) {
5275 var newEl = dropdownElement;
5276 self.dropdownMenu.replaceWith(newEl);
5277 self.dropdownMenu = newEl;
5278 });
5279 });
5280 }
5281
5282 scope.focusToggleElement();
5283 uibDropdownService.open(scope, $element);
5284 } else {
5285 if (self.dropdownMenuTemplateUrl) {
5286 if (templateScope) {
5287 templateScope.$destroy();
5288 }
5289 var newEl = angular.element('<ul class="dropdown-menu"></ul>');
5290 self.dropdownMenu.replaceWith(newEl);
5291 self.dropdownMenu = newEl;
5292 }
5293
5294 uibDropdownService.close(scope, $element);
5295 self.selectedOption = null;
5296 }
5297
5298 if (angular.isFunction(setIsOpen)) {
5299 setIsOpen($scope, isOpen);
5300 }
5301 });
5302 }])
5303
5304 .directive('uibDropdown', function() {
5305 return {
5306 controller: 'UibDropdownController',
5307 link: function(scope, element, attrs, dropdownCtrl) {
5308 dropdownCtrl.init();
5309 }
5310 };
5311 })
5312
5313 .directive('uibDropdownMenu', function() {
5314 return {
5315 restrict: 'A',
5316 require: '?^uibDropdown',
5317 link: function(scope, element, attrs, dropdownCtrl) {
5318 if (!dropdownCtrl || angular.isDefined(attrs.dropdownNested)) {
5319 return;
5320 }
5321
5322 element.addClass('dropdown-menu');
5323
5324 var tplUrl = attrs.templateUrl;
5325 if (tplUrl) {
5326 dropdownCtrl.dropdownMenuTemplateUrl = tplUrl;
5327 }
5328
5329 if (!dropdownCtrl.dropdownMenu) {
5330 dropdownCtrl.dropdownMenu = element;
5331 }
5332 }
5333 };
5334 })
5335
5336 .directive('uibDropdownToggle', function() {
5337 return {
5338 require: '?^uibDropdown',
5339 link: function(scope, element, attrs, dropdownCtrl) {
5340 if (!dropdownCtrl) {
5341 return;
5342 }
5343
5344 element.addClass('dropdown-toggle');
5345
5346 dropdownCtrl.toggleElement = element;
5347
5348 var toggleDropdown = function(event) {
5349 event.preventDefault();
5350
5351 if (!element.hasClass('disabled') && !attrs.disabled) {
5352 scope.$apply(function() {
5353 dropdownCtrl.toggle();
5354 });
5355 }
5356 };
5357
5358 element.bind('click', toggleDropdown);
5359
5360 // WAI-ARIA
5361 element.attr({ 'aria-haspopup': true, 'aria-expanded': false });
5362 scope.$watch(dropdownCtrl.isOpen, function(isOpen) {
5363 element.attr('aria-expanded', !!isOpen);
5364 });
5365
5366 scope.$on('$destroy', function() {
5367 element.unbind('click', toggleDropdown);
5368 });
5369 }
5370 };
5371 });
5372
5373 angular.module('ui.bootstrap.stackedMap', [])
5374 /**
5375 * A helper, internal data structure that acts as a map but also allows getting / removing
5376 * elements in the LIFO order
5377 */
5378 .factory('$$stackedMap', function() {
5379 return {
5380 createNew: function() {
5381 var stack = [];
5382
5383 return {
5384 add: function(key, value) {
5385 stack.push({
5386 key: key,
5387 value: value
5388 });
5389 },
5390 get: function(key) {
5391 for (var i = 0; i < stack.length; i++) {
5392 if (key === stack[i].key) {
5393 return stack[i];
5394 }
5395 }
5396 },
5397 keys: function() {
5398 var keys = [];
5399 for (var i = 0; i < stack.length; i++) {
5400 keys.push(stack[i].key);
5401 }
5402 return keys;
5403 },
5404 top: function() {
5405 return stack[stack.length - 1];
5406 },
5407 remove: function(key) {
5408 var idx = -1;
5409 for (var i = 0; i < stack.length; i++) {
5410 if (key === stack[i].key) {
5411 idx = i;
5412 break;
5413 }
5414 }
5415 return stack.splice(idx, 1)[0];
5416 },
5417 removeTop: function() {
5418 return stack.splice(stack.length - 1, 1)[0];
5419 },
5420 length: function() {
5421 return stack.length;
5422 }
5423 };
5424 }
5425 };
5426 });
5427 angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap', 'ui.bootstrap.position'])
5428 /**
5429 * A helper, internal data structure that stores all references attached to key
5430 */
5431 .factory('$$multiMap', function() {
5432 return {
5433 createNew: function() {
5434 var map = {};
5435
5436 return {
5437 entries: function() {
5438 return Object.keys(map).map(function(key) {
5439 return {
5440 key: key,
5441 value: map[key]
5442 };
5443 });
5444 },
5445 get: function(key) {
5446 return map[key];
5447 },
5448 hasKey: function(key) {
5449 return !!map[key];
5450 },
5451 keys: function() {
5452 return Object.keys(map);
5453 },
5454 put: function(key, value) {
5455 if (!map[key]) {
5456 map[key] = [];
5457 }
5458
5459 map[key].push(value);
5460 },
5461 remove: function(key, value) {
5462 var values = map[key];
5463
5464 if (!values) {
5465 return;
5466 }
5467
5468 var idx = values.indexOf(value);
5469
5470 if (idx !== -1) {
5471 values.splice(idx, 1);
5472 }
5473
5474 if (!values.length) {
5475 delete map[key];
5476 }
5477 }
5478 };
5479 }
5480 };
5481 })
5482
5483 /**
5484 * Pluggable resolve mechanism for the modal resolve resolution
5485 * Supports UI Router's $resolve service
5486 */
5487 .provider('$uibResolve', function() {
5488 var resolve = this;
5489 this.resolver = null;
5490
5491 this.setResolver = function(resolver) {
5492 this.resolver = resolver;
5493 };
5494
5495 this.$get = ['$injector', '$q', function($injector, $q) {
5496 var resolver = resolve.resolver ? $injector.get(resolve.resolver) : null;
5497 return {
5498 resolve: function(invocables, locals, parent, self) {
5499 if (resolver) {
5500 return resolver.resolve(invocables, locals, parent, self);
5501 }
5502
5503 var promises = [];
5504
5505 angular.forEach(invocables, function(value) {
5506 if (angular.isFunction(value) || angular.isArray(value)) {
5507 promises.push($q.resolve($injector.invoke(value)));
5508 } else if (angular.isString(value)) {
5509 promises.push($q.resolve($injector.get(value)));
5510 } else {
5511 promises.push($q.resolve(value));
5512 }
5513 });
5514
5515 return $q.all(promises).then(function(resolves) {
5516 var resolveObj = {};
5517 var resolveIter = 0;
5518 angular.forEach(invocables, function(value, key) {
5519 resolveObj[key] = resolves[resolveIter++];
5520 });
5521
5522 return resolveObj;
5523 });
5524 }
5525 };
5526 }];
5527 })
5528
5529 /**
5530 * A helper directive for the $modal service. It creates a backdrop element.
5531 */
5532 .directive('uibModalBackdrop', ['$animate', '$injector', '$uibModalStack',
5533 function($animate, $injector, $modalStack) {
5534 return {
5535 replace: true,
5536 templateUrl: 'uib/template/modal/backdrop.html',
5537 compile: function(tElement, tAttrs) {
5538 tElement.addClass(tAttrs.backdropClass);
5539 return linkFn;
5540 }
5541 };
5542
5543 function linkFn(scope, element, attrs) {
5544 if (attrs.modalInClass) {
5545 $animate.addClass(element, attrs.modalInClass);
5546
5547 scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
5548 var done = setIsAsync();
5549 if (scope.modalOptions.animation) {
5550 $animate.removeClass(element, attrs.modalInClass).then(done);
5551 } else {
5552 done();
5553 }
5554 });
5555 }
5556 }
5557 }])
5558
5559 .directive('uibModalWindow', ['$uibModalStack', '$q', '$animateCss', '$document',
5560 function($modalStack, $q, $animateCss, $document) {
5561 return {
5562 scope: {
5563 index: '@'
5564 },
5565 replace: true,
5566 transclude: true,
5567 templateUrl: function(tElement, tAttrs) {
5568 return tAttrs.templateUrl || 'uib/template/modal/window.html';
5569 },
5570 link: function(scope, element, attrs) {
5571 element.addClass(attrs.windowClass || '');
5572 element.addClass(attrs.windowTopClass || '');
5573 scope.size = attrs.size;
5574
5575 scope.close = function(evt) {
5576 var modal = $modalStack.getTop();
5577 if (modal && modal.value.backdrop &&
5578 modal.value.backdrop !== 'static' &&
5579 evt.target === evt.currentTarget) {
5580 evt.preventDefault();
5581 evt.stopPropagation();
5582 $modalStack.dismiss(modal.key, 'backdrop click');
5583 }
5584 };
5585
5586 // moved from template to fix issue #2280
5587 element.on('click', scope.close);
5588
5589 // This property is only added to the scope for the purpose of detecting when this directive is rendered.
5590 // We can detect that by using this property in the template associated with this directive and then use
5591 // {@link Attribute#$observe} on it. For more details please see {@link TableColumnResize}.
5592 scope.$isRendered = true;
5593
5594 // Deferred object that will be resolved when this modal is render.
5595 var modalRenderDeferObj = $q.defer();
5596 // Observe function will be called on next digest cycle after compilation, ensuring that the DOM is ready.
5597 // In order to use this way of finding whether DOM is ready, we need to observe a scope property used in modal's template.
5598 attrs.$observe('modalRender', function(value) {
5599 if (value === 'true') {
5600 modalRenderDeferObj.resolve();
5601 }
5602 });
5603
5604 modalRenderDeferObj.promise.then(function() {
5605 var animationPromise = null;
5606
5607 if (attrs.modalInClass) {
5608 animationPromise = $animateCss(element, {
5609 addClass: attrs.modalInClass
5610 }).start();
5611
5612 scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
5613 var done = setIsAsync();
5614 $animateCss(element, {
5615 removeClass: attrs.modalInClass
5616 }).start().then(done);
5617 });
5618 }
5619
5620
5621 $q.when(animationPromise).then(function() {
5622 // Notify {@link $modalStack} that modal is rendered.
5623 var modal = $modalStack.getTop();
5624 if (modal) {
5625 $modalStack.modalRendered(modal.key);
5626 }
5627
5628 /**
5629 * If something within the freshly-opened modal already has focus (perhaps via a
5630 * directive that causes focus). then no need to try and focus anything.
5631 */
5632 if (!($document[0].activeElement && element[0].contains($document[0].activeElement))) {
5633 var inputWithAutofocus = element[0].querySelector('[autofocus]');
5634 /**
5635 * Auto-focusing of a freshly-opened modal element causes any child elements
5636 * with the autofocus attribute to lose focus. This is an issue on touch
5637 * based devices which will show and then hide the onscreen keyboard.
5638 * Attempts to refocus the autofocus element via JavaScript will not reopen
5639 * the onscreen keyboard. Fixed by updated the focusing logic to only autofocus
5640 * the modal element if the modal does not contain an autofocus element.
5641 */
5642 if (inputWithAutofocus) {
5643 inputWithAutofocus.focus();
5644 } else {
5645 element[0].focus();
5646 }
5647 }
5648 });
5649 });
5650 }
5651 };
5652 }])
5653
5654 .directive('uibModalAnimationClass', function() {
5655 return {
5656 compile: function(tElement, tAttrs) {
5657 if (tAttrs.modalAnimation) {
5658 tElement.addClass(tAttrs.uibModalAnimationClass);
5659 }
5660 }
5661 };
5662 })
5663
5664 .directive('uibModalTransclude', function() {
5665 return {
5666 link: function(scope, element, attrs, controller, transclude) {
5667 transclude(scope.$parent, function(clone) {
5668 element.empty();
5669 element.append(clone);
5670 });
5671 }
5672 };
5673 })
5674
5675 .factory('$uibModalStack', ['$animate', '$animateCss', '$document',
5676 '$compile', '$rootScope', '$q', '$$multiMap', '$$stackedMap', '$uibPosition',
5677 function($animate, $animateCss, $document, $compile, $rootScope, $q, $$multiMap, $$stackedMap, $uibPosition) {
5678 var OPENED_MODAL_CLASS = 'modal-open';
5679
5680 var backdropDomEl, backdropScope;
5681 var openedWindows = $$stackedMap.createNew();
5682 var openedClasses = $$multiMap.createNew();
5683 var $modalStack = {
5684 NOW_CLOSING_EVENT: 'modal.stack.now-closing'
5685 };
5686 var topModalIndex = 0;
5687 var previousTopOpenedModal = null;
5688
5689 //Modal focus behavior
5690 var tabableSelector = 'a[href], area[href], input:not([disabled]), ' +
5691 'button:not([disabled]),select:not([disabled]), textarea:not([disabled]), ' +
5692 'iframe, object, embed, *[tabindex], *[contenteditable=true]';
5693 var scrollbarPadding;
5694
5695 function isVisible(element) {
5696 return !!(element.offsetWidth ||
5697 element.offsetHeight ||
5698 element.getClientRects().length);
5699 }
5700
5701 function backdropIndex() {
5702 var topBackdropIndex = -1;
5703 var opened = openedWindows.keys();
5704 for (var i = 0; i < opened.length; i++) {
5705 if (openedWindows.get(opened[i]).value.backdrop) {
5706 topBackdropIndex = i;
5707 }
5708 }
5709
5710 // If any backdrop exist, ensure that it's index is always
5711 // right below the top modal
5712 if (topBackdropIndex > -1 && topBackdropIndex < topModalIndex) {
5713 topBackdropIndex = topModalIndex;
5714 }
5715 return topBackdropIndex;
5716 }
5717
5718 $rootScope.$watch(backdropIndex, function(newBackdropIndex) {
5719 if (backdropScope) {
5720 backdropScope.index = newBackdropIndex;
5721 }
5722 });
5723
5724 function removeModalWindow(modalInstance, elementToReceiveFocus) {
5725 var modalWindow = openedWindows.get(modalInstance).value;
5726 var appendToElement = modalWindow.appendTo;
5727
5728 //clean up the stack
5729 openedWindows.remove(modalInstance);
5730 previousTopOpenedModal = openedWindows.top();
5731 if (previousTopOpenedModal) {
5732 topModalIndex = parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10);
5733 }
5734
5735 removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() {
5736 var modalBodyClass = modalWindow.openedClass || OPENED_MODAL_CLASS;
5737 openedClasses.remove(modalBodyClass, modalInstance);
5738 var areAnyOpen = openedClasses.hasKey(modalBodyClass);
5739 appendToElement.toggleClass(modalBodyClass, areAnyOpen);
5740 if (!areAnyOpen && scrollbarPadding && scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
5741 if (scrollbarPadding.originalRight) {
5742 appendToElement.css({paddingRight: scrollbarPadding.originalRight + 'px'});
5743 } else {
5744 appendToElement.css({paddingRight: ''});
5745 }
5746 scrollbarPadding = null;
5747 }
5748 toggleTopWindowClass(true);
5749 }, modalWindow.closedDeferred);
5750 checkRemoveBackdrop();
5751
5752 //move focus to specified element if available, or else to body
5753 if (elementToReceiveFocus && elementToReceiveFocus.focus) {
5754 elementToReceiveFocus.focus();
5755 } else if (appendToElement.focus) {
5756 appendToElement.focus();
5757 }
5758 }
5759
5760 // Add or remove "windowTopClass" from the top window in the stack
5761 function toggleTopWindowClass(toggleSwitch) {
5762 var modalWindow;
5763
5764 if (openedWindows.length() > 0) {
5765 modalWindow = openedWindows.top().value;
5766 modalWindow.modalDomEl.toggleClass(modalWindow.windowTopClass || '', toggleSwitch);
5767 }
5768 }
5769
5770 function checkRemoveBackdrop() {
5771 //remove backdrop if no longer needed
5772 if (backdropDomEl && backdropIndex() === -1) {
5773 var backdropScopeRef = backdropScope;
5774 removeAfterAnimate(backdropDomEl, backdropScope, function() {
5775 backdropScopeRef = null;
5776 });
5777 backdropDomEl = undefined;
5778 backdropScope = undefined;
5779 }
5780 }
5781
5782 function removeAfterAnimate(domEl, scope, done, closedDeferred) {
5783 var asyncDeferred;
5784 var asyncPromise = null;
5785 var setIsAsync = function() {
5786 if (!asyncDeferred) {
5787 asyncDeferred = $q.defer();
5788 asyncPromise = asyncDeferred.promise;
5789 }
5790
5791 return function asyncDone() {
5792 asyncDeferred.resolve();
5793 };
5794 };
5795 scope.$broadcast($modalStack.NOW_CLOSING_EVENT, setIsAsync);
5796
5797 // Note that it's intentional that asyncPromise might be null.
5798 // That's when setIsAsync has not been called during the
5799 // NOW_CLOSING_EVENT broadcast.
5800 return $q.when(asyncPromise).then(afterAnimating);
5801
5802 function afterAnimating() {
5803 if (afterAnimating.done) {
5804 return;
5805 }
5806 afterAnimating.done = true;
5807
5808 $animate.leave(domEl).then(function() {
5809 domEl.remove();
5810 if (closedDeferred) {
5811 closedDeferred.resolve();
5812 }
5813 });
5814
5815 scope.$destroy();
5816 if (done) {
5817 done();
5818 }
5819 }
5820 }
5821
5822 $document.on('keydown', keydownListener);
5823
5824 $rootScope.$on('$destroy', function() {
5825 $document.off('keydown', keydownListener);
5826 });
5827
5828 function keydownListener(evt) {
5829 if (evt.isDefaultPrevented()) {
5830 return evt;
5831 }
5832
5833 var modal = openedWindows.top();
5834 if (modal) {
5835 switch (evt.which) {
5836 case 27: {
5837 if (modal.value.keyboard) {
5838 evt.preventDefault();
5839 $rootScope.$apply(function() {
5840 $modalStack.dismiss(modal.key, 'escape key press');
5841 });
5842 }
5843 break;
5844 }
5845 case 9: {
5846 var list = $modalStack.loadFocusElementList(modal);
5847 var focusChanged = false;
5848 if (evt.shiftKey) {
5849 if ($modalStack.isFocusInFirstItem(evt, list) || $modalStack.isModalFocused(evt, modal)) {
5850 focusChanged = $modalStack.focusLastFocusableElement(list);
5851 }
5852 } else {
5853 if ($modalStack.isFocusInLastItem(evt, list)) {
5854 focusChanged = $modalStack.focusFirstFocusableElement(list);
5855 }
5856 }
5857
5858 if (focusChanged) {
5859 evt.preventDefault();
5860 evt.stopPropagation();
5861 }
5862
5863 break;
5864 }
5865 }
5866 }
5867 }
5868
5869 $modalStack.open = function(modalInstance, modal) {
5870 var modalOpener = $document[0].activeElement,
5871 modalBodyClass = modal.openedClass || OPENED_MODAL_CLASS;
5872
5873 toggleTopWindowClass(false);
5874
5875 // Store the current top first, to determine what index we ought to use
5876 // for the current top modal
5877 previousTopOpenedModal = openedWindows.top();
5878
5879 openedWindows.add(modalInstance, {
5880 deferred: modal.deferred,
5881 renderDeferred: modal.renderDeferred,
5882 closedDeferred: modal.closedDeferred,
5883 modalScope: modal.scope,
5884 backdrop: modal.backdrop,
5885 keyboard: modal.keyboard,
5886 openedClass: modal.openedClass,
5887 windowTopClass: modal.windowTopClass,
5888 animation: modal.animation,
5889 appendTo: modal.appendTo
5890 });
5891
5892 openedClasses.put(modalBodyClass, modalInstance);
5893
5894 var appendToElement = modal.appendTo,
5895 currBackdropIndex = backdropIndex();
5896
5897 if (!appendToElement.length) {
5898 throw new Error('appendTo element not found. Make sure that the element passed is in DOM.');
5899 }
5900
5901 if (currBackdropIndex >= 0 && !backdropDomEl) {
5902 backdropScope = $rootScope.$new(true);
5903 backdropScope.modalOptions = modal;
5904 backdropScope.index = currBackdropIndex;
5905 backdropDomEl = angular.element('<div uib-modal-backdrop="modal-backdrop"></div>');
5906 backdropDomEl.attr('backdrop-class', modal.backdropClass);
5907 if (modal.animation) {
5908 backdropDomEl.attr('modal-animation', 'true');
5909 }
5910 $compile(backdropDomEl)(backdropScope);
5911 $animate.enter(backdropDomEl, appendToElement);
5912 scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement);
5913 if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
5914 appendToElement.css({paddingRight: scrollbarPadding.right + 'px'});
5915 }
5916 }
5917
5918 // Set the top modal index based on the index of the previous top modal
5919 topModalIndex = previousTopOpenedModal ? parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10) + 1 : 0;
5920 var angularDomEl = angular.element('<div uib-modal-window="modal-window"></div>');
5921 angularDomEl.attr({
5922 'template-url': modal.windowTemplateUrl,
5923 'window-class': modal.windowClass,
5924 'window-top-class': modal.windowTopClass,
5925 'size': modal.size,
5926 'index': topModalIndex,
5927 'animate': 'animate'
5928 }).html(modal.content);
5929 if (modal.animation) {
5930 angularDomEl.attr('modal-animation', 'true');
5931 }
5932
5933 appendToElement.addClass(modalBodyClass);
5934 $animate.enter($compile(angularDomEl)(modal.scope), appendToElement);
5935
5936 openedWindows.top().value.modalDomEl = angularDomEl;
5937 openedWindows.top().value.modalOpener = modalOpener;
5938 };
5939
5940 function broadcastClosing(modalWindow, resultOrReason, closing) {
5941 return !modalWindow.value.modalScope.$broadcast('modal.closing', resultOrReason, closing).defaultPrevented;
5942 }
5943
5944 $modalStack.close = function(modalInstance, result) {
5945 var modalWindow = openedWindows.get(modalInstance);
5946 if (modalWindow && broadcastClosing(modalWindow, result, true)) {
5947 modalWindow.value.modalScope.$$uibDestructionScheduled = true;
5948 modalWindow.value.deferred.resolve(result);
5949 removeModalWindow(modalInstance, modalWindow.value.modalOpener);
5950 return true;
5951 }
5952 return !modalWindow;
5953 };
5954
5955 $modalStack.dismiss = function(modalInstance, reason) {
5956 var modalWindow = openedWindows.get(modalInstance);
5957 if (modalWindow && broadcastClosing(modalWindow, reason, false)) {
5958 modalWindow.value.modalScope.$$uibDestructionScheduled = true;
5959 modalWindow.value.deferred.reject(reason);
5960 removeModalWindow(modalInstance, modalWindow.value.modalOpener);
5961 return true;
5962 }
5963 return !modalWindow;
5964 };
5965
5966 $modalStack.dismissAll = function(reason) {
5967 var topModal = this.getTop();
5968 while (topModal && this.dismiss(topModal.key, reason)) {
5969 topModal = this.getTop();
5970 }
5971 };
5972
5973 $modalStack.getTop = function() {
5974 return openedWindows.top();
5975 };
5976
5977 $modalStack.modalRendered = function(modalInstance) {
5978 var modalWindow = openedWindows.get(modalInstance);
5979 if (modalWindow) {
5980 modalWindow.value.renderDeferred.resolve();
5981 }
5982 };
5983
5984 $modalStack.focusFirstFocusableElement = function(list) {
5985 if (list.length > 0) {
5986 list[0].focus();
5987 return true;
5988 }
5989 return false;
5990 };
5991
5992 $modalStack.focusLastFocusableElement = function(list) {
5993 if (list.length > 0) {
5994 list[list.length - 1].focus();
5995 return true;
5996 }
5997 return false;
5998 };
5999
6000 $modalStack.isModalFocused = function(evt, modalWindow) {
6001 if (evt && modalWindow) {
6002 var modalDomEl = modalWindow.value.modalDomEl;
6003 if (modalDomEl && modalDomEl.length) {
6004 return (evt.target || evt.srcElement) === modalDomEl[0];
6005 }
6006 }
6007 return false;
6008 };
6009
6010 $modalStack.isFocusInFirstItem = function(evt, list) {
6011 if (list.length > 0) {
6012 return (evt.target || evt.srcElement) === list[0];
6013 }
6014 return false;
6015 };
6016
6017 $modalStack.isFocusInLastItem = function(evt, list) {
6018 if (list.length > 0) {
6019 return (evt.target || evt.srcElement) === list[list.length - 1];
6020 }
6021 return false;
6022 };
6023
6024 $modalStack.loadFocusElementList = function(modalWindow) {
6025 if (modalWindow) {
6026 var modalDomE1 = modalWindow.value.modalDomEl;
6027 if (modalDomE1 && modalDomE1.length) {
6028 var elements = modalDomE1[0].querySelectorAll(tabableSelector);
6029 return elements ?
6030 Array.prototype.filter.call(elements, function(element) {
6031 return isVisible(element);
6032 }) : elements;
6033 }
6034 }
6035 };
6036
6037 return $modalStack;
6038 }])
6039
6040 .provider('$uibModal', function() {
6041 var $modalProvider = {
6042 options: {
6043 animation: true,
6044 backdrop: true, //can also be false or 'static'
6045 keyboard: true
6046 },
6047 $get: ['$rootScope', '$q', '$document', '$templateRequest', '$controller', '$uibResolve', '$uibModalStack',
6048 function ($rootScope, $q, $document, $templateRequest, $controller, $uibResolve, $modalStack) {
6049 var $modal = {};
6050
6051 function getTemplatePromise(options) {
6052 return options.template ? $q.when(options.template) :
6053 $templateRequest(angular.isFunction(options.templateUrl) ?
6054 options.templateUrl() : options.templateUrl);
6055 }
6056
6057 var promiseChain = null;
6058 $modal.getPromiseChain = function() {
6059 return promiseChain;
6060 };
6061
6062 $modal.open = function(modalOptions) {
6063 var modalResultDeferred = $q.defer();
6064 var modalOpenedDeferred = $q.defer();
6065 var modalClosedDeferred = $q.defer();
6066 var modalRenderDeferred = $q.defer();
6067
6068 //prepare an instance of a modal to be injected into controllers and returned to a caller
6069 var modalInstance = {
6070 result: modalResultDeferred.promise,
6071 opened: modalOpenedDeferred.promise,
6072 closed: modalClosedDeferred.promise,
6073 rendered: modalRenderDeferred.promise,
6074 close: function (result) {
6075 return $modalStack.close(modalInstance, result);
6076 },
6077 dismiss: function (reason) {
6078 return $modalStack.dismiss(modalInstance, reason);
6079 }
6080 };
6081
6082 //merge and clean up options
6083 modalOptions = angular.extend({}, $modalProvider.options, modalOptions);
6084 modalOptions.resolve = modalOptions.resolve || {};
6085 modalOptions.appendTo = modalOptions.appendTo || $document.find('body').eq(0);
6086
6087 //verify options
6088 if (!modalOptions.template && !modalOptions.templateUrl) {
6089 throw new Error('One of template or templateUrl options is required.');
6090 }
6091
6092 var templateAndResolvePromise =
6093 $q.all([getTemplatePromise(modalOptions), $uibResolve.resolve(modalOptions.resolve, {}, null, null)]);
6094
6095 function resolveWithTemplate() {
6096 return templateAndResolvePromise;
6097 }
6098
6099 // Wait for the resolution of the existing promise chain.
6100 // Then switch to our own combined promise dependency (regardless of how the previous modal fared).
6101 // Then add to $modalStack and resolve opened.
6102 // Finally clean up the chain variable if no subsequent modal has overwritten it.
6103 var samePromise;
6104 samePromise = promiseChain = $q.all([promiseChain])
6105 .then(resolveWithTemplate, resolveWithTemplate)
6106 .then(function resolveSuccess(tplAndVars) {
6107 var providedScope = modalOptions.scope || $rootScope;
6108
6109 var modalScope = providedScope.$new();
6110 modalScope.$close = modalInstance.close;
6111 modalScope.$dismiss = modalInstance.dismiss;
6112
6113 modalScope.$on('$destroy', function() {
6114 if (!modalScope.$$uibDestructionScheduled) {
6115 modalScope.$dismiss('$uibUnscheduledDestruction');
6116 }
6117 });
6118
6119 var ctrlInstance, ctrlInstantiate, ctrlLocals = {};
6120
6121 //controllers
6122 if (modalOptions.controller) {
6123 ctrlLocals.$scope = modalScope;
6124 ctrlLocals.$uibModalInstance = modalInstance;
6125 angular.forEach(tplAndVars[1], function(value, key) {
6126 ctrlLocals[key] = value;
6127 });
6128
6129 // the third param will make the controller instantiate later,private api
6130 // @see https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L126
6131 ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true);
6132 if (modalOptions.controllerAs) {
6133 ctrlInstance = ctrlInstantiate.instance;
6134
6135 if (modalOptions.bindToController) {
6136 ctrlInstance.$close = modalScope.$close;
6137 ctrlInstance.$dismiss = modalScope.$dismiss;
6138 angular.extend(ctrlInstance, providedScope);
6139 }
6140
6141 ctrlInstance = ctrlInstantiate();
6142
6143 modalScope[modalOptions.controllerAs] = ctrlInstance;
6144 } else {
6145 ctrlInstance = ctrlInstantiate();
6146 }
6147
6148 if (angular.isFunction(ctrlInstance.$onInit)) {
6149 ctrlInstance.$onInit();
6150 }
6151 }
6152
6153 $modalStack.open(modalInstance, {
6154 scope: modalScope,
6155 deferred: modalResultDeferred,
6156 renderDeferred: modalRenderDeferred,
6157 closedDeferred: modalClosedDeferred,
6158 content: tplAndVars[0],
6159 animation: modalOptions.animation,
6160 backdrop: modalOptions.backdrop,
6161 keyboard: modalOptions.keyboard,
6162 backdropClass: modalOptions.backdropClass,
6163 windowTopClass: modalOptions.windowTopClass,
6164 windowClass: modalOptions.windowClass,
6165 windowTemplateUrl: modalOptions.windowTemplateUrl,
6166 size: modalOptions.size,
6167 openedClass: modalOptions.openedClass,
6168 appendTo: modalOptions.appendTo
6169 });
6170 modalOpenedDeferred.resolve(true);
6171
6172 }, function resolveError(reason) {
6173 modalOpenedDeferred.reject(reason);
6174 modalResultDeferred.reject(reason);
6175 })['finally'](function() {
6176 if (promiseChain === samePromise) {
6177 promiseChain = null;
6178 }
6179 });
6180
6181 return modalInstance;
6182 };
6183
6184 return $modal;
6185 }
6186 ]
6187 };
6188
6189 return $modalProvider;
6190 });
6191
6192 angular.module('ui.bootstrap.paging', [])
6193 /**
6194 * Helper internal service for generating common controller code between the
6195 * pager and pagination components
6196 */
6197 .factory('uibPaging', ['$parse', function($parse) {
6198 return {
6199 create: function(ctrl, $scope, $attrs) {
6200 ctrl.setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop;
6201 ctrl.ngModelCtrl = { $setViewValue: angular.noop }; // nullModelCtrl
6202 ctrl._watchers = [];
6203
6204 ctrl.init = function(ngModelCtrl, config) {
6205 ctrl.ngModelCtrl = ngModelCtrl;
6206 ctrl.config = config;
6207
6208 ngModelCtrl.$render = function() {
6209 ctrl.render();
6210 };
6211
6212 if ($attrs.itemsPerPage) {
6213 ctrl._watchers.push($scope.$parent.$watch($attrs.itemsPerPage, function(value) {
6214 ctrl.itemsPerPage = parseInt(value, 10);
6215 $scope.totalPages = ctrl.calculateTotalPages();
6216 ctrl.updatePage();
6217 }));
6218 } else {
6219 ctrl.itemsPerPage = config.itemsPerPage;
6220 }
6221
6222 $scope.$watch('totalItems', function(newTotal, oldTotal) {
6223 if (angular.isDefined(newTotal) || newTotal !== oldTotal) {
6224 $scope.totalPages = ctrl.calculateTotalPages();
6225 ctrl.updatePage();
6226 }
6227 });
6228 };
6229
6230 ctrl.calculateTotalPages = function() {
6231 var totalPages = ctrl.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / ctrl.itemsPerPage);
6232 return Math.max(totalPages || 0, 1);
6233 };
6234
6235 ctrl.render = function() {
6236 $scope.page = parseInt(ctrl.ngModelCtrl.$viewValue, 10) || 1;
6237 };
6238
6239 $scope.selectPage = function(page, evt) {
6240 if (evt) {
6241 evt.preventDefault();
6242 }
6243
6244 var clickAllowed = !$scope.ngDisabled || !evt;
6245 if (clickAllowed && $scope.page !== page && page > 0 && page <= $scope.totalPages) {
6246 if (evt && evt.target) {
6247 evt.target.blur();
6248 }
6249 ctrl.ngModelCtrl.$setViewValue(page);
6250 ctrl.ngModelCtrl.$render();
6251 }
6252 };
6253
6254 $scope.getText = function(key) {
6255 return $scope[key + 'Text'] || ctrl.config[key + 'Text'];
6256 };
6257
6258 $scope.noPrevious = function() {
6259 return $scope.page === 1;
6260 };
6261
6262 $scope.noNext = function() {
6263 return $scope.page === $scope.totalPages;
6264 };
6265
6266 ctrl.updatePage = function() {
6267 ctrl.setNumPages($scope.$parent, $scope.totalPages); // Readonly variable
6268
6269 if ($scope.page > $scope.totalPages) {
6270 $scope.selectPage($scope.totalPages);
6271 } else {
6272 ctrl.ngModelCtrl.$render();
6273 }
6274 };
6275
6276 $scope.$on('$destroy', function() {
6277 while (ctrl._watchers.length) {
6278 ctrl._watchers.shift()();
6279 }
6280 });
6281 }
6282 };
6283 }]);
6284
6285 angular.module('ui.bootstrap.pager', ['ui.bootstrap.paging'])
6286
6287 .controller('UibPagerController', ['$scope', '$attrs', 'uibPaging', 'uibPagerConfig', function($scope, $attrs, uibPaging, uibPagerConfig) {
6288 $scope.align = angular.isDefined($attrs.align) ? $scope.$parent.$eval($attrs.align) : uibPagerConfig.align;
6289
6290 uibPaging.create(this, $scope, $attrs);
6291 }])
6292
6293 .constant('uibPagerConfig', {
6294 itemsPerPage: 10,
6295 previousText: 'Β« Previous',
6296 nextText: 'Next Β»',
6297 align: true
6298 })
6299
6300 .directive('uibPager', ['uibPagerConfig', function(uibPagerConfig) {
6301 return {
6302 scope: {
6303 totalItems: '=',
6304 previousText: '@',
6305 nextText: '@',
6306 ngDisabled: '='
6307 },
6308 require: ['uibPager', '?ngModel'],
6309 controller: 'UibPagerController',
6310 controllerAs: 'pager',
6311 templateUrl: function(element, attrs) {
6312 return attrs.templateUrl || 'uib/template/pager/pager.html';
6313 },
6314 replace: true,
6315 link: function(scope, element, attrs, ctrls) {
6316 var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
6317
6318 if (!ngModelCtrl) {
6319 return; // do nothing if no ng-model
6320 }
6321
6322 paginationCtrl.init(ngModelCtrl, uibPagerConfig);
6323 }
6324 };
6325 }]);
6326
6327 angular.module('ui.bootstrap.pagination', ['ui.bootstrap.paging'])
6328 .controller('UibPaginationController', ['$scope', '$attrs', '$parse', 'uibPaging', 'uibPaginationConfig', function($scope, $attrs, $parse, uibPaging, uibPaginationConfig) {
6329 var ctrl = this;
6330 // Setup configuration parameters
6331 var maxSize = angular.isDefined($attrs.maxSize) ? $scope.$parent.$eval($attrs.maxSize) : uibPaginationConfig.maxSize,
6332 rotate = angular.isDefined($attrs.rotate) ? $scope.$parent.$eval($attrs.rotate) : uibPaginationConfig.rotate,
6333 forceEllipses = angular.isDefined($attrs.forceEllipses) ? $scope.$parent.$eval($attrs.forceEllipses) : uibPaginationConfig.forceEllipses,
6334 boundaryLinkNumbers = angular.isDefined($attrs.boundaryLinkNumbers) ? $scope.$parent.$eval($attrs.boundaryLinkNumbers) : uibPaginationConfig.boundaryLinkNumbers,
6335 pageLabel = angular.isDefined($attrs.pageLabel) ? function(idx) { return $scope.$parent.$eval($attrs.pageLabel, {$page: idx}); } : angular.identity;
6336 $scope.boundaryLinks = angular.isDefined($attrs.boundaryLinks) ? $scope.$parent.$eval($attrs.boundaryLinks) : uibPaginationConfig.boundaryLinks;
6337 $scope.directionLinks = angular.isDefined($attrs.directionLinks) ? $scope.$parent.$eval($attrs.directionLinks) : uibPaginationConfig.directionLinks;
6338
6339 uibPaging.create(this, $scope, $attrs);
6340
6341 if ($attrs.maxSize) {
6342 ctrl._watchers.push($scope.$parent.$watch($parse($attrs.maxSize), function(value) {
6343 maxSize = parseInt(value, 10);
6344 ctrl.render();
6345 }));
6346 }
6347
6348 // Create page object used in template
6349 function makePage(number, text, isActive) {
6350 return {
6351 number: number,
6352 text: text,
6353 active: isActive
6354 };
6355 }
6356
6357 function getPages(currentPage, totalPages) {
6358 var pages = [];
6359
6360 // Default page limits
6361 var startPage = 1, endPage = totalPages;
6362 var isMaxSized = angular.isDefined(maxSize) && maxSize < totalPages;
6363
6364 // recompute if maxSize
6365 if (isMaxSized) {
6366 if (rotate) {
6367 // Current page is displayed in the middle of the visible ones
6368 startPage = Math.max(currentPage - Math.floor(maxSize / 2), 1);
6369 endPage = startPage + maxSize - 1;
6370
6371 // Adjust if limit is exceeded
6372 if (endPage > totalPages) {
6373 endPage = totalPages;
6374 startPage = endPage - maxSize + 1;
6375 }
6376 } else {
6377 // Visible pages are paginated with maxSize
6378 startPage = (Math.ceil(currentPage / maxSize) - 1) * maxSize + 1;
6379
6380 // Adjust last page if limit is exceeded
6381 endPage = Math.min(startPage + maxSize - 1, totalPages);
6382 }
6383 }
6384
6385 // Add page number links
6386 for (var number = startPage; number <= endPage; number++) {
6387 var page = makePage(number, pageLabel(number), number === currentPage);
6388 pages.push(page);
6389 }
6390
6391 // Add links to move between page sets
6392 if (isMaxSized && maxSize > 0 && (!rotate || forceEllipses || boundaryLinkNumbers)) {
6393 if (startPage > 1) {
6394 if (!boundaryLinkNumbers || startPage > 3) { //need ellipsis for all options unless range is too close to beginning
6395 var previousPageSet = makePage(startPage - 1, '...', false);
6396 pages.unshift(previousPageSet);
6397 }
6398 if (boundaryLinkNumbers) {
6399 if (startPage === 3) { //need to replace ellipsis when the buttons would be sequential
6400 var secondPageLink = makePage(2, '2', false);
6401 pages.unshift(secondPageLink);
6402 }
6403 //add the first page
6404 var firstPageLink = makePage(1, '1', false);
6405 pages.unshift(firstPageLink);
6406 }
6407 }
6408
6409 if (endPage < totalPages) {
6410 if (!boundaryLinkNumbers || endPage < totalPages - 2) { //need ellipsis for all options unless range is too close to end
6411 var nextPageSet = makePage(endPage + 1, '...', false);
6412 pages.push(nextPageSet);
6413 }
6414 if (boundaryLinkNumbers) {
6415 if (endPage === totalPages - 2) { //need to replace ellipsis when the buttons would be sequential
6416 var secondToLastPageLink = makePage(totalPages - 1, totalPages - 1, false);
6417 pages.push(secondToLastPageLink);
6418 }
6419 //add the last page
6420 var lastPageLink = makePage(totalPages, totalPages, false);
6421 pages.push(lastPageLink);
6422 }
6423 }
6424 }
6425 return pages;
6426 }
6427
6428 var originalRender = this.render;
6429 this.render = function() {
6430 originalRender();
6431 if ($scope.page > 0 && $scope.page <= $scope.totalPages) {
6432 $scope.pages = getPages($scope.page, $scope.totalPages);
6433 }
6434 };
6435 }])
6436
6437 .constant('uibPaginationConfig', {
6438 itemsPerPage: 10,
6439 boundaryLinks: false,
6440 boundaryLinkNumbers: false,
6441 directionLinks: true,
6442 firstText: 'First',
6443 previousText: 'Previous',
6444 nextText: 'Next',
6445 lastText: 'Last',
6446 rotate: true,
6447 forceEllipses: false
6448 })
6449
6450 .directive('uibPagination', ['$parse', 'uibPaginationConfig', function($parse, uibPaginationConfig) {
6451 return {
6452 scope: {
6453 totalItems: '=',
6454 firstText: '@',
6455 previousText: '@',
6456 nextText: '@',
6457 lastText: '@',
6458 ngDisabled:'='
6459 },
6460 require: ['uibPagination', '?ngModel'],
6461 controller: 'UibPaginationController',
6462 controllerAs: 'pagination',
6463 templateUrl: function(element, attrs) {
6464 return attrs.templateUrl || 'uib/template/pagination/pagination.html';
6465 },
6466 replace: true,
6467 link: function(scope, element, attrs, ctrls) {
6468 var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
6469
6470 if (!ngModelCtrl) {
6471 return; // do nothing if no ng-model
6472 }
6473
6474 paginationCtrl.init(ngModelCtrl, uibPaginationConfig);
6475 }
6476 };
6477 }]);
6478
6479 /**
6480 * The following features are still outstanding: animation as a
6481 * function, placement as a function, inside, support for more triggers than
6482 * just mouse enter/leave, html tooltips, and selector delegation.
6483 */
6484 angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.stackedMap'])
6485
6486 /**
6487 * The $tooltip service creates tooltip- and popover-like directives as well as
6488 * houses global options for them.
6489 */
6490 .provider('$uibTooltip', function() {
6491 // The default options tooltip and popover.
6492 var defaultOptions = {
6493 placement: 'top',
6494 placementClassPrefix: '',
6495 animation: true,
6496 popupDelay: 0,
6497 popupCloseDelay: 0,
6498 useContentExp: false
6499 };
6500
6501 // Default hide triggers for each show trigger
6502 var triggerMap = {
6503 'mouseenter': 'mouseleave',
6504 'click': 'click',
6505 'outsideClick': 'outsideClick',
6506 'focus': 'blur',
6507 'none': ''
6508 };
6509
6510 // The options specified to the provider globally.
6511 var globalOptions = {};
6512
6513 /**
6514 * `options({})` allows global configuration of all tooltips in the
6515 * application.
6516 *
6517 * var app = angular.module( 'App', ['ui.bootstrap.tooltip'], function( $tooltipProvider ) {
6518 * // place tooltips left instead of top by default
6519 * $tooltipProvider.options( { placement: 'left' } );
6520 * });
6521 */
6522 this.options = function(value) {
6523 angular.extend(globalOptions, value);
6524 };
6525
6526 /**
6527 * This allows you to extend the set of trigger mappings available. E.g.:
6528 *
6529 * $tooltipProvider.setTriggers( { 'openTrigger': 'closeTrigger' } );
6530 */
6531 this.setTriggers = function setTriggers(triggers) {
6532 angular.extend(triggerMap, triggers);
6533 };
6534
6535 /**
6536 * This is a helper function for translating camel-case to snake_case.
6537 */
6538 function snake_case(name) {
6539 var regexp = /[A-Z]/g;
6540 var separator = '-';
6541 return name.replace(regexp, function(letter, pos) {
6542 return (pos ? separator : '') + letter.toLowerCase();
6543 });
6544 }
6545
6546 /**
6547 * Returns the actual instance of the $tooltip service.
6548 * TODO support multiple triggers
6549 */
6550 this.$get = ['$window', '$compile', '$timeout', '$document', '$uibPosition', '$interpolate', '$rootScope', '$parse', '$$stackedMap', function($window, $compile, $timeout, $document, $position, $interpolate, $rootScope, $parse, $$stackedMap) {
6551 var openedTooltips = $$stackedMap.createNew();
6552 $document.on('keypress', keypressListener);
6553
6554 $rootScope.$on('$destroy', function() {
6555 $document.off('keypress', keypressListener);
6556 });
6557
6558 function keypressListener(e) {
6559 if (e.which === 27) {
6560 var last = openedTooltips.top();
6561 if (last) {
6562 last.value.close();
6563 openedTooltips.removeTop();
6564 last = null;
6565 }
6566 }
6567 }
6568
6569 return function $tooltip(ttType, prefix, defaultTriggerShow, options) {
6570 options = angular.extend({}, defaultOptions, globalOptions, options);
6571
6572 /**
6573 * Returns an object of show and hide triggers.
6574 *
6575 * If a trigger is supplied,
6576 * it is used to show the tooltip; otherwise, it will use the `trigger`
6577 * option passed to the `$tooltipProvider.options` method; else it will
6578 * default to the trigger supplied to this directive factory.
6579 *
6580 * The hide trigger is based on the show trigger. If the `trigger` option
6581 * was passed to the `$tooltipProvider.options` method, it will use the
6582 * mapped trigger from `triggerMap` or the passed trigger if the map is
6583 * undefined; otherwise, it uses the `triggerMap` value of the show
6584 * trigger; else it will just use the show trigger.
6585 */
6586 function getTriggers(trigger) {
6587 var show = (trigger || options.trigger || defaultTriggerShow).split(' ');
6588 var hide = show.map(function(trigger) {
6589 return triggerMap[trigger] || trigger;
6590 });
6591 return {
6592 show: show,
6593 hide: hide
6594 };
6595 }
6596
6597 var directiveName = snake_case(ttType);
6598
6599 var startSym = $interpolate.startSymbol();
6600 var endSym = $interpolate.endSymbol();
6601 var template =
6602 '<div '+ directiveName + '-popup ' +
6603 'uib-title="' + startSym + 'title' + endSym + '" ' +
6604 (options.useContentExp ?
6605 'content-exp="contentExp()" ' :
6606 'content="' + startSym + 'content' + endSym + '" ') +
6607 'placement="' + startSym + 'placement' + endSym + '" ' +
6608 'popup-class="' + startSym + 'popupClass' + endSym + '" ' +
6609 'animation="animation" ' +
6610 'is-open="isOpen" ' +
6611 'origin-scope="origScope" ' +
6612 'class="uib-position-measure"' +
6613 '>' +
6614 '</div>';
6615
6616 return {
6617 compile: function(tElem, tAttrs) {
6618 var tooltipLinker = $compile(template);
6619
6620 return function link(scope, element, attrs, tooltipCtrl) {
6621 var tooltip;
6622 var tooltipLinkedScope;
6623 var transitionTimeout;
6624 var showTimeout;
6625 var hideTimeout;
6626 var positionTimeout;
6627 var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;
6628 var triggers = getTriggers(undefined);
6629 var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);
6630 var ttScope = scope.$new(true);
6631 var repositionScheduled = false;
6632 var isOpenParse = angular.isDefined(attrs[prefix + 'IsOpen']) ? $parse(attrs[prefix + 'IsOpen']) : false;
6633 var contentParse = options.useContentExp ? $parse(attrs[ttType]) : false;
6634 var observers = [];
6635 var lastPlacement;
6636
6637 var positionTooltip = function() {
6638 // check if tooltip exists and is not empty
6639 if (!tooltip || !tooltip.html()) { return; }
6640
6641 if (!positionTimeout) {
6642 positionTimeout = $timeout(function() {
6643 var ttPosition = $position.positionElements(element, tooltip, ttScope.placement, appendToBody);
6644 tooltip.css({ top: ttPosition.top + 'px', left: ttPosition.left + 'px' });
6645
6646 if (!tooltip.hasClass(ttPosition.placement.split('-')[0])) {
6647 tooltip.removeClass(lastPlacement.split('-')[0]);
6648 tooltip.addClass(ttPosition.placement.split('-')[0]);
6649 }
6650
6651 if (!tooltip.hasClass(options.placementClassPrefix + ttPosition.placement)) {
6652 tooltip.removeClass(options.placementClassPrefix + lastPlacement);
6653 tooltip.addClass(options.placementClassPrefix + ttPosition.placement);
6654 }
6655
6656 // first time through tt element will have the
6657 // uib-position-measure class or if the placement
6658 // has changed we need to position the arrow.
6659 if (tooltip.hasClass('uib-position-measure')) {
6660 $position.positionArrow(tooltip, ttPosition.placement);
6661 tooltip.removeClass('uib-position-measure');
6662 } else if (lastPlacement !== ttPosition.placement) {
6663 $position.positionArrow(tooltip, ttPosition.placement);
6664 }
6665 lastPlacement = ttPosition.placement;
6666
6667 positionTimeout = null;
6668 }, 0, false);
6669 }
6670 };
6671
6672 // Set up the correct scope to allow transclusion later
6673 ttScope.origScope = scope;
6674
6675 // By default, the tooltip is not open.
6676 // TODO add ability to start tooltip opened
6677 ttScope.isOpen = false;
6678 openedTooltips.add(ttScope, {
6679 close: hide
6680 });
6681
6682 function toggleTooltipBind() {
6683 if (!ttScope.isOpen) {
6684 showTooltipBind();
6685 } else {
6686 hideTooltipBind();
6687 }
6688 }
6689
6690 // Show the tooltip with delay if specified, otherwise show it immediately
6691 function showTooltipBind() {
6692 if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
6693 return;
6694 }
6695
6696 cancelHide();
6697 prepareTooltip();
6698
6699 if (ttScope.popupDelay) {
6700 // Do nothing if the tooltip was already scheduled to pop-up.
6701 // This happens if show is triggered multiple times before any hide is triggered.
6702 if (!showTimeout) {
6703 showTimeout = $timeout(show, ttScope.popupDelay, false);
6704 }
6705 } else {
6706 show();
6707 }
6708 }
6709
6710 function hideTooltipBind() {
6711 cancelShow();
6712
6713 if (ttScope.popupCloseDelay) {
6714 if (!hideTimeout) {
6715 hideTimeout = $timeout(hide, ttScope.popupCloseDelay, false);
6716 }
6717 } else {
6718 hide();
6719 }
6720 }
6721
6722 // Show the tooltip popup element.
6723 function show() {
6724 cancelShow();
6725 cancelHide();
6726
6727 // Don't show empty tooltips.
6728 if (!ttScope.content) {
6729 return angular.noop;
6730 }
6731
6732 createTooltip();
6733
6734 // And show the tooltip.
6735 ttScope.$evalAsync(function() {
6736 ttScope.isOpen = true;
6737 assignIsOpen(true);
6738 positionTooltip();
6739 });
6740 }
6741
6742 function cancelShow() {
6743 if (showTimeout) {
6744 $timeout.cancel(showTimeout);
6745 showTimeout = null;
6746 }
6747
6748 if (positionTimeout) {
6749 $timeout.cancel(positionTimeout);
6750 positionTimeout = null;
6751 }
6752 }
6753
6754 // Hide the tooltip popup element.
6755 function hide() {
6756 if (!ttScope) {
6757 return;
6758 }
6759
6760 // First things first: we don't show it anymore.
6761 ttScope.$evalAsync(function() {
6762 if (ttScope) {
6763 ttScope.isOpen = false;
6764 assignIsOpen(false);
6765 // And now we remove it from the DOM. However, if we have animation, we
6766 // need to wait for it to expire beforehand.
6767 // FIXME: this is a placeholder for a port of the transitions library.
6768 // The fade transition in TWBS is 150ms.
6769 if (ttScope.animation) {
6770 if (!transitionTimeout) {
6771 transitionTimeout = $timeout(removeTooltip, 150, false);
6772 }
6773 } else {
6774 removeTooltip();
6775 }
6776 }
6777 });
6778 }
6779
6780 function cancelHide() {
6781 if (hideTimeout) {
6782 $timeout.cancel(hideTimeout);
6783 hideTimeout = null;
6784 }
6785
6786 if (transitionTimeout) {
6787 $timeout.cancel(transitionTimeout);
6788 transitionTimeout = null;
6789 }
6790 }
6791
6792 function createTooltip() {
6793 // There can only be one tooltip element per directive shown at once.
6794 if (tooltip) {
6795 return;
6796 }
6797
6798 tooltipLinkedScope = ttScope.$new();
6799 tooltip = tooltipLinker(tooltipLinkedScope, function(tooltip) {
6800 if (appendToBody) {
6801 $document.find('body').append(tooltip);
6802 } else {
6803 element.after(tooltip);
6804 }
6805 });
6806
6807 prepObservers();
6808 }
6809
6810 function removeTooltip() {
6811 cancelShow();
6812 cancelHide();
6813 unregisterObservers();
6814
6815 if (tooltip) {
6816 tooltip.remove();
6817 tooltip = null;
6818 }
6819 if (tooltipLinkedScope) {
6820 tooltipLinkedScope.$destroy();
6821 tooltipLinkedScope = null;
6822 }
6823 }
6824
6825 /**
6826 * Set the initial scope values. Once
6827 * the tooltip is created, the observers
6828 * will be added to keep things in sync.
6829 */
6830 function prepareTooltip() {
6831 ttScope.title = attrs[prefix + 'Title'];
6832 if (contentParse) {
6833 ttScope.content = contentParse(scope);
6834 } else {
6835 ttScope.content = attrs[ttType];
6836 }
6837
6838 ttScope.popupClass = attrs[prefix + 'Class'];
6839 ttScope.placement = angular.isDefined(attrs[prefix + 'Placement']) ? attrs[prefix + 'Placement'] : options.placement;
6840 var placement = $position.parsePlacement(ttScope.placement);
6841 lastPlacement = placement[1] ? placement[0] + '-' + placement[1] : placement[0];
6842
6843 var delay = parseInt(attrs[prefix + 'PopupDelay'], 10);
6844 var closeDelay = parseInt(attrs[prefix + 'PopupCloseDelay'], 10);
6845 ttScope.popupDelay = !isNaN(delay) ? delay : options.popupDelay;
6846 ttScope.popupCloseDelay = !isNaN(closeDelay) ? closeDelay : options.popupCloseDelay;
6847 }
6848
6849 function assignIsOpen(isOpen) {
6850 if (isOpenParse && angular.isFunction(isOpenParse.assign)) {
6851 isOpenParse.assign(scope, isOpen);
6852 }
6853 }
6854
6855 ttScope.contentExp = function() {
6856 return ttScope.content;
6857 };
6858
6859 /**
6860 * Observe the relevant attributes.
6861 */
6862 attrs.$observe('disabled', function(val) {
6863 if (val) {
6864 cancelShow();
6865 }
6866
6867 if (val && ttScope.isOpen) {
6868 hide();
6869 }
6870 });
6871
6872 if (isOpenParse) {
6873 scope.$watch(isOpenParse, function(val) {
6874 if (ttScope && !val === ttScope.isOpen) {
6875 toggleTooltipBind();
6876 }
6877 });
6878 }
6879
6880 function prepObservers() {
6881 observers.length = 0;
6882
6883 if (contentParse) {
6884 observers.push(
6885 scope.$watch(contentParse, function(val) {
6886 ttScope.content = val;
6887 if (!val && ttScope.isOpen) {
6888 hide();
6889 }
6890 })
6891 );
6892
6893 observers.push(
6894 tooltipLinkedScope.$watch(function() {
6895 if (!repositionScheduled) {
6896 repositionScheduled = true;
6897 tooltipLinkedScope.$$postDigest(function() {
6898 repositionScheduled = false;
6899 if (ttScope && ttScope.isOpen) {
6900 positionTooltip();
6901 }
6902 });
6903 }
6904 })
6905 );
6906 } else {
6907 observers.push(
6908 attrs.$observe(ttType, function(val) {
6909 ttScope.content = val;
6910 if (!val && ttScope.isOpen) {
6911 hide();
6912 } else {
6913 positionTooltip();
6914 }
6915 })
6916 );
6917 }
6918
6919 observers.push(
6920 attrs.$observe(prefix + 'Title', function(val) {
6921 ttScope.title = val;
6922 if (ttScope.isOpen) {
6923 positionTooltip();
6924 }
6925 })
6926 );
6927
6928 observers.push(
6929 attrs.$observe(prefix + 'Placement', function(val) {
6930 ttScope.placement = val ? val : options.placement;
6931 if (ttScope.isOpen) {
6932 positionTooltip();
6933 }
6934 })
6935 );
6936 }
6937
6938 function unregisterObservers() {
6939 if (observers.length) {
6940 angular.forEach(observers, function(observer) {
6941 observer();
6942 });
6943 observers.length = 0;
6944 }
6945 }
6946
6947 // hide tooltips/popovers for outsideClick trigger
6948 function bodyHideTooltipBind(e) {
6949 if (!ttScope || !ttScope.isOpen || !tooltip) {
6950 return;
6951 }
6952 // make sure the tooltip/popover link or tool tooltip/popover itself were not clicked
6953 if (!element[0].contains(e.target) && !tooltip[0].contains(e.target)) {
6954 hideTooltipBind();
6955 }
6956 }
6957
6958 var unregisterTriggers = function() {
6959 triggers.show.forEach(function(trigger) {
6960 if (trigger === 'outsideClick') {
6961 element.off('click', toggleTooltipBind);
6962 } else {
6963 element.off(trigger, showTooltipBind);
6964 element.off(trigger, toggleTooltipBind);
6965 }
6966 });
6967 triggers.hide.forEach(function(trigger) {
6968 if (trigger === 'outsideClick') {
6969 $document.off('click', bodyHideTooltipBind);
6970 } else {
6971 element.off(trigger, hideTooltipBind);
6972 }
6973 });
6974 };
6975
6976 function prepTriggers() {
6977 var val = attrs[prefix + 'Trigger'];
6978 unregisterTriggers();
6979
6980 triggers = getTriggers(val);
6981
6982 if (triggers.show !== 'none') {
6983 triggers.show.forEach(function(trigger, idx) {
6984 if (trigger === 'outsideClick') {
6985 element.on('click', toggleTooltipBind);
6986 $document.on('click', bodyHideTooltipBind);
6987 } else if (trigger === triggers.hide[idx]) {
6988 element.on(trigger, toggleTooltipBind);
6989 } else if (trigger) {
6990 element.on(trigger, showTooltipBind);
6991 element.on(triggers.hide[idx], hideTooltipBind);
6992 }
6993
6994 element.on('keypress', function(e) {
6995 if (e.which === 27) {
6996 hideTooltipBind();
6997 }
6998 });
6999 });
7000 }
7001 }
7002
7003 prepTriggers();
7004
7005 var animation = scope.$eval(attrs[prefix + 'Animation']);
7006 ttScope.animation = angular.isDefined(animation) ? !!animation : options.animation;
7007
7008 var appendToBodyVal;
7009 var appendKey = prefix + 'AppendToBody';
7010 if (appendKey in attrs && attrs[appendKey] === undefined) {
7011 appendToBodyVal = true;
7012 } else {
7013 appendToBodyVal = scope.$eval(attrs[appendKey]);
7014 }
7015
7016 appendToBody = angular.isDefined(appendToBodyVal) ? appendToBodyVal : appendToBody;
7017
7018 // Make sure tooltip is destroyed and removed.
7019 scope.$on('$destroy', function onDestroyTooltip() {
7020 unregisterTriggers();
7021 removeTooltip();
7022 openedTooltips.remove(ttScope);
7023 ttScope = null;
7024 });
7025 };
7026 }
7027 };
7028 };
7029 }];
7030 })
7031
7032 // This is mostly ngInclude code but with a custom scope
7033 .directive('uibTooltipTemplateTransclude', [
7034 '$animate', '$sce', '$compile', '$templateRequest',
7035 function ($animate, $sce, $compile, $templateRequest) {
7036 return {
7037 link: function(scope, elem, attrs) {
7038 var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope);
7039
7040 var changeCounter = 0,
7041 currentScope,
7042 previousElement,
7043 currentElement;
7044
7045 var cleanupLastIncludeContent = function() {
7046 if (previousElement) {
7047 previousElement.remove();
7048 previousElement = null;
7049 }
7050
7051 if (currentScope) {
7052 currentScope.$destroy();
7053 currentScope = null;
7054 }
7055
7056 if (currentElement) {
7057 $animate.leave(currentElement).then(function() {
7058 previousElement = null;
7059 });
7060 previousElement = currentElement;
7061 currentElement = null;
7062 }
7063 };
7064
7065 scope.$watch($sce.parseAsResourceUrl(attrs.uibTooltipTemplateTransclude), function(src) {
7066 var thisChangeId = ++changeCounter;
7067
7068 if (src) {
7069 //set the 2nd param to true to ignore the template request error so that the inner
7070 //contents and scope can be cleaned up.
7071 $templateRequest(src, true).then(function(response) {
7072 if (thisChangeId !== changeCounter) { return; }
7073 var newScope = origScope.$new();
7074 var template = response;
7075
7076 var clone = $compile(template)(newScope, function(clone) {
7077 cleanupLastIncludeContent();
7078 $animate.enter(clone, elem);
7079 });
7080
7081 currentScope = newScope;
7082 currentElement = clone;
7083
7084 currentScope.$emit('$includeContentLoaded', src);
7085 }, function() {
7086 if (thisChangeId === changeCounter) {
7087 cleanupLastIncludeContent();
7088 scope.$emit('$includeContentError', src);
7089 }
7090 });
7091 scope.$emit('$includeContentRequested', src);
7092 } else {
7093 cleanupLastIncludeContent();
7094 }
7095 });
7096
7097 scope.$on('$destroy', cleanupLastIncludeContent);
7098 }
7099 };
7100 }])
7101
7102 /**
7103 * Note that it's intentional that these classes are *not* applied through $animate.
7104 * They must not be animated as they're expected to be present on the tooltip on
7105 * initialization.
7106 */
7107 .directive('uibTooltipClasses', ['$uibPosition', function($uibPosition) {
7108 return {
7109 restrict: 'A',
7110 link: function(scope, element, attrs) {
7111 // need to set the primary position so the
7112 // arrow has space during position measure.
7113 // tooltip.positionTooltip()
7114 if (scope.placement) {
7115 // // There are no top-left etc... classes
7116 // // in TWBS, so we need the primary position.
7117 var position = $uibPosition.parsePlacement(scope.placement);
7118 element.addClass(position[0]);
7119 }
7120
7121 if (scope.popupClass) {
7122 element.addClass(scope.popupClass);
7123 }
7124
7125 if (scope.animation()) {
7126 element.addClass(attrs.tooltipAnimationClass);
7127 }
7128 }
7129 };
7130 }])
7131
7132 .directive('uibTooltipPopup', function() {
7133 return {
7134 replace: true,
7135 scope: { content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
7136 templateUrl: 'uib/template/tooltip/tooltip-popup.html'
7137 };
7138 })
7139
7140 .directive('uibTooltip', [ '$uibTooltip', function($uibTooltip) {
7141 return $uibTooltip('uibTooltip', 'tooltip', 'mouseenter');
7142 }])
7143
7144 .directive('uibTooltipTemplatePopup', function() {
7145 return {
7146 replace: true,
7147 scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
7148 originScope: '&' },
7149 templateUrl: 'uib/template/tooltip/tooltip-template-popup.html'
7150 };
7151 })
7152
7153 .directive('uibTooltipTemplate', ['$uibTooltip', function($uibTooltip) {
7154 return $uibTooltip('uibTooltipTemplate', 'tooltip', 'mouseenter', {
7155 useContentExp: true
7156 });
7157 }])
7158
7159 .directive('uibTooltipHtmlPopup', function() {
7160 return {
7161 replace: true,
7162 scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
7163 templateUrl: 'uib/template/tooltip/tooltip-html-popup.html'
7164 };
7165 })
7166
7167 .directive('uibTooltipHtml', ['$uibTooltip', function($uibTooltip) {
7168 return $uibTooltip('uibTooltipHtml', 'tooltip', 'mouseenter', {
7169 useContentExp: true
7170 });
7171 }]);
7172
7173 /**
7174 * The following features are still outstanding: popup delay, animation as a
7175 * function, placement as a function, inside, support for more triggers than
7176 * just mouse enter/leave, and selector delegatation.
7177 */
7178 angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip'])
7179
7180 .directive('uibPopoverTemplatePopup', function() {
7181 return {
7182 replace: true,
7183 scope: { uibTitle: '@', contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
7184 originScope: '&' },
7185 templateUrl: 'uib/template/popover/popover-template.html'
7186 };
7187 })
7188
7189 .directive('uibPopoverTemplate', ['$uibTooltip', function($uibTooltip) {
7190 return $uibTooltip('uibPopoverTemplate', 'popover', 'click', {
7191 useContentExp: true
7192 });
7193 }])
7194
7195 .directive('uibPopoverHtmlPopup', function() {
7196 return {
7197 replace: true,
7198 scope: { contentExp: '&', uibTitle: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
7199 templateUrl: 'uib/template/popover/popover-html.html'
7200 };
7201 })
7202
7203 .directive('uibPopoverHtml', ['$uibTooltip', function($uibTooltip) {
7204 return $uibTooltip('uibPopoverHtml', 'popover', 'click', {
7205 useContentExp: true
7206 });
7207 }])
7208
7209 .directive('uibPopoverPopup', function() {
7210 return {
7211 replace: true,
7212 scope: { uibTitle: '@', content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
7213 templateUrl: 'uib/template/popover/popover.html'
7214 };
7215 })
7216
7217 .directive('uibPopover', ['$uibTooltip', function($uibTooltip) {
7218 return $uibTooltip('uibPopover', 'popover', 'click');
7219 }]);
7220
7221 angular.module('ui.bootstrap.progressbar', [])
7222
7223 .constant('uibProgressConfig', {
7224 animate: true,
7225 max: 100
7226 })
7227
7228 .controller('UibProgressController', ['$scope', '$attrs', 'uibProgressConfig', function($scope, $attrs, progressConfig) {
7229 var self = this,
7230 animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate;
7231
7232 this.bars = [];
7233 $scope.max = getMaxOrDefault();
7234
7235 this.addBar = function(bar, element, attrs) {
7236 if (!animate) {
7237 element.css({'transition': 'none'});
7238 }
7239
7240 this.bars.push(bar);
7241
7242 bar.max = getMaxOrDefault();
7243 bar.title = attrs && angular.isDefined(attrs.title) ? attrs.title : 'progressbar';
7244
7245 bar.$watch('value', function(value) {
7246 bar.recalculatePercentage();
7247 });
7248
7249 bar.recalculatePercentage = function() {
7250 var totalPercentage = self.bars.reduce(function(total, bar) {
7251 bar.percent = +(100 * bar.value / bar.max).toFixed(2);
7252 return total + bar.percent;
7253 }, 0);
7254
7255 if (totalPercentage > 100) {
7256 bar.percent -= totalPercentage - 100;
7257 }
7258 };
7259
7260 bar.$on('$destroy', function() {
7261 element = null;
7262 self.removeBar(bar);
7263 });
7264 };
7265
7266 this.removeBar = function(bar) {
7267 this.bars.splice(this.bars.indexOf(bar), 1);
7268 this.bars.forEach(function (bar) {
7269 bar.recalculatePercentage();
7270 });
7271 };
7272
7273 //$attrs.$observe('maxParam', function(maxParam) {
7274 $scope.$watch('maxParam', function(maxParam) {
7275 self.bars.forEach(function(bar) {
7276 bar.max = getMaxOrDefault();
7277 bar.recalculatePercentage();
7278 });
7279 });
7280
7281 function getMaxOrDefault () {
7282 return angular.isDefined($scope.maxParam) ? $scope.maxParam : progressConfig.max;
7283 }
7284 }])
7285
7286 .directive('uibProgress', function() {
7287 return {
7288 replace: true,
7289 transclude: true,
7290 controller: 'UibProgressController',
7291 require: 'uibProgress',
7292 scope: {
7293 maxParam: '=?max'
7294 },
7295 templateUrl: 'uib/template/progressbar/progress.html'
7296 };
7297 })
7298
7299 .directive('uibBar', function() {
7300 return {
7301 replace: true,
7302 transclude: true,
7303 require: '^uibProgress',
7304 scope: {
7305 value: '=',
7306 type: '@'
7307 },
7308 templateUrl: 'uib/template/progressbar/bar.html',
7309 link: function(scope, element, attrs, progressCtrl) {
7310 progressCtrl.addBar(scope, element, attrs);
7311 }
7312 };
7313 })
7314
7315 .directive('uibProgressbar', function() {
7316 return {
7317 replace: true,
7318 transclude: true,
7319 controller: 'UibProgressController',
7320 scope: {
7321 value: '=',
7322 maxParam: '=?max',
7323 type: '@'
7324 },
7325 templateUrl: 'uib/template/progressbar/progressbar.html',
7326 link: function(scope, element, attrs, progressCtrl) {
7327 progressCtrl.addBar(scope, angular.element(element.children()[0]), {title: attrs.title});
7328 }
7329 };
7330 });
7331
7332 angular.module('ui.bootstrap.rating', [])
7333
7334 .constant('uibRatingConfig', {
7335 max: 5,
7336 stateOn: null,
7337 stateOff: null,
7338 enableReset: true,
7339 titles : ['one', 'two', 'three', 'four', 'five']
7340 })
7341
7342 .controller('UibRatingController', ['$scope', '$attrs', 'uibRatingConfig', function($scope, $attrs, ratingConfig) {
7343 var ngModelCtrl = { $setViewValue: angular.noop },
7344 self = this;
7345
7346 this.init = function(ngModelCtrl_) {
7347 ngModelCtrl = ngModelCtrl_;
7348 ngModelCtrl.$render = this.render;
7349
7350 ngModelCtrl.$formatters.push(function(value) {
7351 if (angular.isNumber(value) && value << 0 !== value) {
7352 value = Math.round(value);
7353 }
7354
7355 return value;
7356 });
7357
7358 this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;
7359 this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;
7360 this.enableReset = angular.isDefined($attrs.enableReset) ?
7361 $scope.$parent.$eval($attrs.enableReset) : ratingConfig.enableReset;
7362 var tmpTitles = angular.isDefined($attrs.titles) ? $scope.$parent.$eval($attrs.titles) : ratingConfig.titles;
7363 this.titles = angular.isArray(tmpTitles) && tmpTitles.length > 0 ?
7364 tmpTitles : ratingConfig.titles;
7365
7366 var ratingStates = angular.isDefined($attrs.ratingStates) ?
7367 $scope.$parent.$eval($attrs.ratingStates) :
7368 new Array(angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : ratingConfig.max);
7369 $scope.range = this.buildTemplateObjects(ratingStates);
7370 };
7371
7372 this.buildTemplateObjects = function(states) {
7373 for (var i = 0, n = states.length; i < n; i++) {
7374 states[i] = angular.extend({ index: i }, { stateOn: this.stateOn, stateOff: this.stateOff, title: this.getTitle(i) }, states[i]);
7375 }
7376 return states;
7377 };
7378
7379 this.getTitle = function(index) {
7380 if (index >= this.titles.length) {
7381 return index + 1;
7382 }
7383
7384 return this.titles[index];
7385 };
7386
7387 $scope.rate = function(value) {
7388 if (!$scope.readonly && value >= 0 && value <= $scope.range.length) {
7389 var newViewValue = self.enableReset && ngModelCtrl.$viewValue === value ? 0 : value;
7390 ngModelCtrl.$setViewValue(newViewValue);
7391 ngModelCtrl.$render();
7392 }
7393 };
7394
7395 $scope.enter = function(value) {
7396 if (!$scope.readonly) {
7397 $scope.value = value;
7398 }
7399 $scope.onHover({value: value});
7400 };
7401
7402 $scope.reset = function() {
7403 $scope.value = ngModelCtrl.$viewValue;
7404 $scope.onLeave();
7405 };
7406
7407 $scope.onKeydown = function(evt) {
7408 if (/(37|38|39|40)/.test(evt.which)) {
7409 evt.preventDefault();
7410 evt.stopPropagation();
7411 $scope.rate($scope.value + (evt.which === 38 || evt.which === 39 ? 1 : -1));
7412 }
7413 };
7414
7415 this.render = function() {
7416 $scope.value = ngModelCtrl.$viewValue;
7417 $scope.title = self.getTitle($scope.value - 1);
7418 };
7419 }])
7420
7421 .directive('uibRating', function() {
7422 return {
7423 require: ['uibRating', 'ngModel'],
7424 scope: {
7425 readonly: '=?readOnly',
7426 onHover: '&',
7427 onLeave: '&'
7428 },
7429 controller: 'UibRatingController',
7430 templateUrl: 'uib/template/rating/rating.html',
7431 replace: true,
7432 link: function(scope, element, attrs, ctrls) {
7433 var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1];
7434 ratingCtrl.init(ngModelCtrl);
7435 }
7436 };
7437 });
7438
7439 angular.module('ui.bootstrap.tabs', [])
7440
7441 .controller('UibTabsetController', ['$scope', function ($scope) {
7442 var ctrl = this,
7443 oldIndex;
7444 ctrl.tabs = [];
7445
7446 ctrl.select = function(index, evt) {
7447 if (!destroyed) {
7448 var previousIndex = findTabIndex(oldIndex);
7449 var previousSelected = ctrl.tabs[previousIndex];
7450 if (previousSelected) {
7451 previousSelected.tab.onDeselect({
7452 $event: evt
7453 });
7454 if (evt && evt.isDefaultPrevented()) {
7455 return;
7456 }
7457 previousSelected.tab.active = false;
7458 }
7459
7460 var selected = ctrl.tabs[index];
7461 if (selected) {
7462 selected.tab.onSelect({
7463 $event: evt
7464 });
7465 selected.tab.active = true;
7466 ctrl.active = selected.index;
7467 oldIndex = selected.index;
7468 } else if (!selected && angular.isNumber(oldIndex)) {
7469 ctrl.active = null;
7470 oldIndex = null;
7471 }
7472 }
7473 };
7474
7475 ctrl.addTab = function addTab(tab) {
7476 ctrl.tabs.push({
7477 tab: tab,
7478 index: tab.index
7479 });
7480 ctrl.tabs.sort(function(t1, t2) {
7481 if (t1.index > t2.index) {
7482 return 1;
7483 }
7484
7485 if (t1.index < t2.index) {
7486 return -1;
7487 }
7488
7489 return 0;
7490 });
7491
7492 if (tab.index === ctrl.active || !angular.isNumber(ctrl.active) && ctrl.tabs.length === 1) {
7493 var newActiveIndex = findTabIndex(tab.index);
7494 ctrl.select(newActiveIndex);
7495 }
7496 };
7497
7498 ctrl.removeTab = function removeTab(tab) {
7499 var index;
7500 for (var i = 0; i < ctrl.tabs.length; i++) {
7501 if (ctrl.tabs[i].tab === tab) {
7502 index = i;
7503 break;
7504 }
7505 }
7506
7507 if (ctrl.tabs[index].index === ctrl.active) {
7508 var newActiveTabIndex = index === ctrl.tabs.length - 1 ?
7509 index - 1 : index + 1 % ctrl.tabs.length;
7510 ctrl.select(newActiveTabIndex);
7511 }
7512
7513 ctrl.tabs.splice(index, 1);
7514 };
7515
7516 $scope.$watch('tabset.active', function(val) {
7517 if (angular.isNumber(val) && val !== oldIndex) {
7518 ctrl.select(findTabIndex(val));
7519 }
7520 });
7521
7522 var destroyed;
7523 $scope.$on('$destroy', function() {
7524 destroyed = true;
7525 });
7526
7527 function findTabIndex(index) {
7528 for (var i = 0; i < ctrl.tabs.length; i++) {
7529 if (ctrl.tabs[i].index === index) {
7530 return i;
7531 }
7532 }
7533 }
7534 }])
7535
7536 .directive('uibTabset', function() {
7537 return {
7538 transclude: true,
7539 replace: true,
7540 scope: {},
7541 bindToController: {
7542 active: '=?',
7543 type: '@'
7544 },
7545 controller: 'UibTabsetController',
7546 controllerAs: 'tabset',
7547 templateUrl: function(element, attrs) {
7548 return attrs.templateUrl || 'uib/template/tabs/tabset.html';
7549 },
7550 link: function(scope, element, attrs) {
7551 scope.vertical = angular.isDefined(attrs.vertical) ?
7552 scope.$parent.$eval(attrs.vertical) : false;
7553 scope.justified = angular.isDefined(attrs.justified) ?
7554 scope.$parent.$eval(attrs.justified) : false;
7555 if (angular.isUndefined(attrs.active)) {
7556 scope.active = 0;
7557 }
7558 }
7559 };
7560 })
7561
7562 .directive('uibTab', ['$parse', function($parse) {
7563 return {
7564 require: '^uibTabset',
7565 replace: true,
7566 templateUrl: function(element, attrs) {
7567 return attrs.templateUrl || 'uib/template/tabs/tab.html';
7568 },
7569 transclude: true,
7570 scope: {
7571 heading: '@',
7572 index: '=?',
7573 classes: '@?',
7574 onSelect: '&select', //This callback is called in contentHeadingTransclude
7575 //once it inserts the tab's content into the dom
7576 onDeselect: '&deselect'
7577 },
7578 controller: function() {
7579 //Empty controller so other directives can require being 'under' a tab
7580 },
7581 controllerAs: 'tab',
7582 link: function(scope, elm, attrs, tabsetCtrl, transclude) {
7583 scope.disabled = false;
7584 if (attrs.disable) {
7585 scope.$parent.$watch($parse(attrs.disable), function(value) {
7586 scope.disabled = !! value;
7587 });
7588 }
7589
7590 if (angular.isUndefined(attrs.index)) {
7591 if (tabsetCtrl.tabs && tabsetCtrl.tabs.length) {
7592 scope.index = Math.max.apply(null, tabsetCtrl.tabs.map(function(t) { return t.index; })) + 1;
7593 } else {
7594 scope.index = 0;
7595 }
7596 }
7597
7598 if (angular.isUndefined(attrs.classes)) {
7599 scope.classes = '';
7600 }
7601
7602 scope.select = function(evt) {
7603 if (!scope.disabled) {
7604 var index;
7605 for (var i = 0; i < tabsetCtrl.tabs.length; i++) {
7606 if (tabsetCtrl.tabs[i].tab === scope) {
7607 index = i;
7608 break;
7609 }
7610 }
7611
7612 tabsetCtrl.select(index, evt);
7613 }
7614 };
7615
7616 tabsetCtrl.addTab(scope);
7617 scope.$on('$destroy', function() {
7618 tabsetCtrl.removeTab(scope);
7619 });
7620
7621 //We need to transclude later, once the content container is ready.
7622 //when this link happens, we're inside a tab heading.
7623 scope.$transcludeFn = transclude;
7624 }
7625 };
7626 }])
7627
7628 .directive('uibTabHeadingTransclude', function() {
7629 return {
7630 restrict: 'A',
7631 require: '^uibTab',
7632 link: function(scope, elm) {
7633 scope.$watch('headingElement', function updateHeadingElement(heading) {
7634 if (heading) {
7635 elm.html('');
7636 elm.append(heading);
7637 }
7638 });
7639 }
7640 };
7641 })
7642
7643 .directive('uibTabContentTransclude', function() {
7644 return {
7645 restrict: 'A',
7646 require: '^uibTabset',
7647 link: function(scope, elm, attrs) {
7648 var tab = scope.$eval(attrs.uibTabContentTransclude).tab;
7649
7650 //Now our tab is ready to be transcluded: both the tab heading area
7651 //and the tab content area are loaded. Transclude 'em both.
7652 tab.$transcludeFn(tab.$parent, function(contents) {
7653 angular.forEach(contents, function(node) {
7654 if (isTabHeading(node)) {
7655 //Let tabHeadingTransclude know.
7656 tab.headingElement = node;
7657 } else {
7658 elm.append(node);
7659 }
7660 });
7661 });
7662 }
7663 };
7664
7665 function isTabHeading(node) {
7666 return node.tagName && (
7667 node.hasAttribute('uib-tab-heading') ||
7668 node.hasAttribute('data-uib-tab-heading') ||
7669 node.hasAttribute('x-uib-tab-heading') ||
7670 node.tagName.toLowerCase() === 'uib-tab-heading' ||
7671 node.tagName.toLowerCase() === 'data-uib-tab-heading' ||
7672 node.tagName.toLowerCase() === 'x-uib-tab-heading' ||
7673 node.tagName.toLowerCase() === 'uib:tab-heading'
7674 );
7675 }
7676 });
7677
7678 angular.module('ui.bootstrap.timepicker', [])
7679
7680 .constant('uibTimepickerConfig', {
7681 hourStep: 1,
7682 minuteStep: 1,
7683 secondStep: 1,
7684 showMeridian: true,
7685 showSeconds: false,
7686 meridians: null,
7687 readonlyInput: false,
7688 mousewheel: true,
7689 arrowkeys: true,
7690 showSpinners: true,
7691 templateUrl: 'uib/template/timepicker/timepicker.html'
7692 })
7693
7694 .controller('UibTimepickerController', ['$scope', '$element', '$attrs', '$parse', '$log', '$locale', 'uibTimepickerConfig', function($scope, $element, $attrs, $parse, $log, $locale, timepickerConfig) {
7695 var selected = new Date(),
7696 watchers = [],
7697 ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl
7698 meridians = angular.isDefined($attrs.meridians) ? $scope.$parent.$eval($attrs.meridians) : timepickerConfig.meridians || $locale.DATETIME_FORMATS.AMPMS,
7699 padHours = angular.isDefined($attrs.padHours) ? $scope.$parent.$eval($attrs.padHours) : true;
7700
7701 $scope.tabindex = angular.isDefined($attrs.tabindex) ? $attrs.tabindex : 0;
7702 $element.removeAttr('tabindex');
7703
7704 this.init = function(ngModelCtrl_, inputs) {
7705 ngModelCtrl = ngModelCtrl_;
7706 ngModelCtrl.$render = this.render;
7707
7708 ngModelCtrl.$formatters.unshift(function(modelValue) {
7709 return modelValue ? new Date(modelValue) : null;
7710 });
7711
7712 var hoursInputEl = inputs.eq(0),
7713 minutesInputEl = inputs.eq(1),
7714 secondsInputEl = inputs.eq(2);
7715
7716 var mousewheel = angular.isDefined($attrs.mousewheel) ? $scope.$parent.$eval($attrs.mousewheel) : timepickerConfig.mousewheel;
7717
7718 if (mousewheel) {
7719 this.setupMousewheelEvents(hoursInputEl, minutesInputEl, secondsInputEl);
7720 }
7721
7722 var arrowkeys = angular.isDefined($attrs.arrowkeys) ? $scope.$parent.$eval($attrs.arrowkeys) : timepickerConfig.arrowkeys;
7723 if (arrowkeys) {
7724 this.setupArrowkeyEvents(hoursInputEl, minutesInputEl, secondsInputEl);
7725 }
7726
7727 $scope.readonlyInput = angular.isDefined($attrs.readonlyInput) ? $scope.$parent.$eval($attrs.readonlyInput) : timepickerConfig.readonlyInput;
7728 this.setupInputEvents(hoursInputEl, minutesInputEl, secondsInputEl);
7729 };
7730
7731 var hourStep = timepickerConfig.hourStep;
7732 if ($attrs.hourStep) {
7733 watchers.push($scope.$parent.$watch($parse($attrs.hourStep), function(value) {
7734 hourStep = +value;
7735 }));
7736 }
7737
7738 var minuteStep = timepickerConfig.minuteStep;
7739 if ($attrs.minuteStep) {
7740 watchers.push($scope.$parent.$watch($parse($attrs.minuteStep), function(value) {
7741 minuteStep = +value;
7742 }));
7743 }
7744
7745 var min;
7746 watchers.push($scope.$parent.$watch($parse($attrs.min), function(value) {
7747 var dt = new Date(value);
7748 min = isNaN(dt) ? undefined : dt;
7749 }));
7750
7751 var max;
7752 watchers.push($scope.$parent.$watch($parse($attrs.max), function(value) {
7753 var dt = new Date(value);
7754 max = isNaN(dt) ? undefined : dt;
7755 }));
7756
7757 var disabled = false;
7758 if ($attrs.ngDisabled) {
7759 watchers.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(value) {
7760 disabled = value;
7761 }));
7762 }
7763
7764 $scope.noIncrementHours = function() {
7765 var incrementedSelected = addMinutes(selected, hourStep * 60);
7766 return disabled || incrementedSelected > max ||
7767 incrementedSelected < selected && incrementedSelected < min;
7768 };
7769
7770 $scope.noDecrementHours = function() {
7771 var decrementedSelected = addMinutes(selected, -hourStep * 60);
7772 return disabled || decrementedSelected < min ||
7773 decrementedSelected > selected && decrementedSelected > max;
7774 };
7775
7776 $scope.noIncrementMinutes = function() {
7777 var incrementedSelected = addMinutes(selected, minuteStep);
7778 return disabled || incrementedSelected > max ||
7779 incrementedSelected < selected && incrementedSelected < min;
7780 };
7781
7782 $scope.noDecrementMinutes = function() {
7783 var decrementedSelected = addMinutes(selected, -minuteStep);
7784 return disabled || decrementedSelected < min ||
7785 decrementedSelected > selected && decrementedSelected > max;
7786 };
7787
7788 $scope.noIncrementSeconds = function() {
7789 var incrementedSelected = addSeconds(selected, secondStep);
7790 return disabled || incrementedSelected > max ||
7791 incrementedSelected < selected && incrementedSelected < min;
7792 };
7793
7794 $scope.noDecrementSeconds = function() {
7795 var decrementedSelected = addSeconds(selected, -secondStep);
7796 return disabled || decrementedSelected < min ||
7797 decrementedSelected > selected && decrementedSelected > max;
7798 };
7799
7800 $scope.noToggleMeridian = function() {
7801 if (selected.getHours() < 12) {
7802 return disabled || addMinutes(selected, 12 * 60) > max;
7803 }
7804
7805 return disabled || addMinutes(selected, -12 * 60) < min;
7806 };
7807
7808 var secondStep = timepickerConfig.secondStep;
7809 if ($attrs.secondStep) {
7810 watchers.push($scope.$parent.$watch($parse($attrs.secondStep), function(value) {
7811 secondStep = +value;
7812 }));
7813 }
7814
7815 $scope.showSeconds = timepickerConfig.showSeconds;
7816 if ($attrs.showSeconds) {
7817 watchers.push($scope.$parent.$watch($parse($attrs.showSeconds), function(value) {
7818 $scope.showSeconds = !!value;
7819 }));
7820 }
7821
7822 // 12H / 24H mode
7823 $scope.showMeridian = timepickerConfig.showMeridian;
7824 if ($attrs.showMeridian) {
7825 watchers.push($scope.$parent.$watch($parse($attrs.showMeridian), function(value) {
7826 $scope.showMeridian = !!value;
7827
7828 if (ngModelCtrl.$error.time) {
7829 // Evaluate from template
7830 var hours = getHoursFromTemplate(), minutes = getMinutesFromTemplate();
7831 if (angular.isDefined(hours) && angular.isDefined(minutes)) {
7832 selected.setHours(hours);
7833 refresh();
7834 }
7835 } else {
7836 updateTemplate();
7837 }
7838 }));
7839 }
7840
7841 // Get $scope.hours in 24H mode if valid
7842 function getHoursFromTemplate() {
7843 var hours = +$scope.hours;
7844 var valid = $scope.showMeridian ? hours > 0 && hours < 13 :
7845 hours >= 0 && hours < 24;
7846 if (!valid || $scope.hours === '') {
7847 return undefined;
7848 }
7849
7850 if ($scope.showMeridian) {
7851 if (hours === 12) {
7852 hours = 0;
7853 }
7854 if ($scope.meridian === meridians[1]) {
7855 hours = hours + 12;
7856 }
7857 }
7858 return hours;
7859 }
7860
7861 function getMinutesFromTemplate() {
7862 var minutes = +$scope.minutes;
7863 var valid = minutes >= 0 && minutes < 60;
7864 if (!valid || $scope.minutes === '') {
7865 return undefined;
7866 }
7867 return minutes;
7868 }
7869
7870 function getSecondsFromTemplate() {
7871 var seconds = +$scope.seconds;
7872 return seconds >= 0 && seconds < 60 ? seconds : undefined;
7873 }
7874
7875 function pad(value, noPad) {
7876 if (value === null) {
7877 return '';
7878 }
7879
7880 return angular.isDefined(value) && value.toString().length < 2 && !noPad ?
7881 '0' + value : value.toString();
7882 }
7883
7884 // Respond on mousewheel spin
7885 this.setupMousewheelEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {
7886 var isScrollingUp = function(e) {
7887 if (e.originalEvent) {
7888 e = e.originalEvent;
7889 }
7890 //pick correct delta variable depending on event
7891 var delta = e.wheelDelta ? e.wheelDelta : -e.deltaY;
7892 return e.detail || delta > 0;
7893 };
7894
7895 hoursInputEl.bind('mousewheel wheel', function(e) {
7896 if (!disabled) {
7897 $scope.$apply(isScrollingUp(e) ? $scope.incrementHours() : $scope.decrementHours());
7898 }
7899 e.preventDefault();
7900 });
7901
7902 minutesInputEl.bind('mousewheel wheel', function(e) {
7903 if (!disabled) {
7904 $scope.$apply(isScrollingUp(e) ? $scope.incrementMinutes() : $scope.decrementMinutes());
7905 }
7906 e.preventDefault();
7907 });
7908
7909 secondsInputEl.bind('mousewheel wheel', function(e) {
7910 if (!disabled) {
7911 $scope.$apply(isScrollingUp(e) ? $scope.incrementSeconds() : $scope.decrementSeconds());
7912 }
7913 e.preventDefault();
7914 });
7915 };
7916
7917 // Respond on up/down arrowkeys
7918 this.setupArrowkeyEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {
7919 hoursInputEl.bind('keydown', function(e) {
7920 if (!disabled) {
7921 if (e.which === 38) { // up
7922 e.preventDefault();
7923 $scope.incrementHours();
7924 $scope.$apply();
7925 } else if (e.which === 40) { // down
7926 e.preventDefault();
7927 $scope.decrementHours();
7928 $scope.$apply();
7929 }
7930 }
7931 });
7932
7933 minutesInputEl.bind('keydown', function(e) {
7934 if (!disabled) {
7935 if (e.which === 38) { // up
7936 e.preventDefault();
7937 $scope.incrementMinutes();
7938 $scope.$apply();
7939 } else if (e.which === 40) { // down
7940 e.preventDefault();
7941 $scope.decrementMinutes();
7942 $scope.$apply();
7943 }
7944 }
7945 });
7946
7947 secondsInputEl.bind('keydown', function(e) {
7948 if (!disabled) {
7949 if (e.which === 38) { // up
7950 e.preventDefault();
7951 $scope.incrementSeconds();
7952 $scope.$apply();
7953 } else if (e.which === 40) { // down
7954 e.preventDefault();
7955 $scope.decrementSeconds();
7956 $scope.$apply();
7957 }
7958 }
7959 });
7960 };
7961
7962 this.setupInputEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {
7963 if ($scope.readonlyInput) {
7964 $scope.updateHours = angular.noop;
7965 $scope.updateMinutes = angular.noop;
7966 $scope.updateSeconds = angular.noop;
7967 return;
7968 }
7969
7970 var invalidate = function(invalidHours, invalidMinutes, invalidSeconds) {
7971 ngModelCtrl.$setViewValue(null);
7972 ngModelCtrl.$setValidity('time', false);
7973 if (angular.isDefined(invalidHours)) {
7974 $scope.invalidHours = invalidHours;
7975 }
7976
7977 if (angular.isDefined(invalidMinutes)) {
7978 $scope.invalidMinutes = invalidMinutes;
7979 }
7980
7981 if (angular.isDefined(invalidSeconds)) {
7982 $scope.invalidSeconds = invalidSeconds;
7983 }
7984 };
7985
7986 $scope.updateHours = function() {
7987 var hours = getHoursFromTemplate(),
7988 minutes = getMinutesFromTemplate();
7989
7990 ngModelCtrl.$setDirty();
7991
7992 if (angular.isDefined(hours) && angular.isDefined(minutes)) {
7993 selected.setHours(hours);
7994 selected.setMinutes(minutes);
7995 if (selected < min || selected > max) {
7996 invalidate(true);
7997 } else {
7998 refresh('h');
7999 }
8000 } else {
8001 invalidate(true);
8002 }
8003 };
8004
8005 hoursInputEl.bind('blur', function(e) {
8006 ngModelCtrl.$setTouched();
8007 if (modelIsEmpty()) {
8008 makeValid();
8009 } else if ($scope.hours === null || $scope.hours === '') {
8010 invalidate(true);
8011 } else if (!$scope.invalidHours && $scope.hours < 10) {
8012 $scope.$apply(function() {
8013 $scope.hours = pad($scope.hours, !padHours);
8014 });
8015 }
8016 });
8017
8018 $scope.updateMinutes = function() {
8019 var minutes = getMinutesFromTemplate(),
8020 hours = getHoursFromTemplate();
8021
8022 ngModelCtrl.$setDirty();
8023
8024 if (angular.isDefined(minutes) && angular.isDefined(hours)) {
8025 selected.setHours(hours);
8026 selected.setMinutes(minutes);
8027 if (selected < min || selected > max) {
8028 invalidate(undefined, true);
8029 } else {
8030 refresh('m');
8031 }
8032 } else {
8033 invalidate(undefined, true);
8034 }
8035 };
8036
8037 minutesInputEl.bind('blur', function(e) {
8038 ngModelCtrl.$setTouched();
8039 if (modelIsEmpty()) {
8040 makeValid();
8041 } else if ($scope.minutes === null) {
8042 invalidate(undefined, true);
8043 } else if (!$scope.invalidMinutes && $scope.minutes < 10) {
8044 $scope.$apply(function() {
8045 $scope.minutes = pad($scope.minutes);
8046 });
8047 }
8048 });
8049
8050 $scope.updateSeconds = function() {
8051 var seconds = getSecondsFromTemplate();
8052
8053 ngModelCtrl.$setDirty();
8054
8055 if (angular.isDefined(seconds)) {
8056 selected.setSeconds(seconds);
8057 refresh('s');
8058 } else {
8059 invalidate(undefined, undefined, true);
8060 }
8061 };
8062
8063 secondsInputEl.bind('blur', function(e) {
8064 if (modelIsEmpty()) {
8065 makeValid();
8066 } else if (!$scope.invalidSeconds && $scope.seconds < 10) {
8067 $scope.$apply( function() {
8068 $scope.seconds = pad($scope.seconds);
8069 });
8070 }
8071 });
8072
8073 };
8074
8075 this.render = function() {
8076 var date = ngModelCtrl.$viewValue;
8077
8078 if (isNaN(date)) {
8079 ngModelCtrl.$setValidity('time', false);
8080 $log.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.');
8081 } else {
8082 if (date) {
8083 selected = date;
8084 }
8085
8086 if (selected < min || selected > max) {
8087 ngModelCtrl.$setValidity('time', false);
8088 $scope.invalidHours = true;
8089 $scope.invalidMinutes = true;
8090 } else {
8091 makeValid();
8092 }
8093 updateTemplate();
8094 }
8095 };
8096
8097 // Call internally when we know that model is valid.
8098 function refresh(keyboardChange) {
8099 makeValid();
8100 ngModelCtrl.$setViewValue(new Date(selected));
8101 updateTemplate(keyboardChange);
8102 }
8103
8104 function makeValid() {
8105 ngModelCtrl.$setValidity('time', true);
8106 $scope.invalidHours = false;
8107 $scope.invalidMinutes = false;
8108 $scope.invalidSeconds = false;
8109 }
8110
8111 function updateTemplate(keyboardChange) {
8112 if (!ngModelCtrl.$modelValue) {
8113 $scope.hours = null;
8114 $scope.minutes = null;
8115 $scope.seconds = null;
8116 $scope.meridian = meridians[0];
8117 } else {
8118 var hours = selected.getHours(),
8119 minutes = selected.getMinutes(),
8120 seconds = selected.getSeconds();
8121
8122 if ($scope.showMeridian) {
8123 hours = hours === 0 || hours === 12 ? 12 : hours % 12; // Convert 24 to 12 hour system
8124 }
8125
8126 $scope.hours = keyboardChange === 'h' ? hours : pad(hours, !padHours);
8127 if (keyboardChange !== 'm') {
8128 $scope.minutes = pad(minutes);
8129 }
8130 $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];
8131
8132 if (keyboardChange !== 's') {
8133 $scope.seconds = pad(seconds);
8134 }
8135 $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];
8136 }
8137 }
8138
8139 function addSecondsToSelected(seconds) {
8140 selected = addSeconds(selected, seconds);
8141 refresh();
8142 }
8143
8144 function addMinutes(selected, minutes) {
8145 return addSeconds(selected, minutes*60);
8146 }
8147
8148 function addSeconds(date, seconds) {
8149 var dt = new Date(date.getTime() + seconds * 1000);
8150 var newDate = new Date(date);
8151 newDate.setHours(dt.getHours(), dt.getMinutes(), dt.getSeconds());
8152 return newDate;
8153 }
8154
8155 function modelIsEmpty() {
8156 return ($scope.hours === null || $scope.hours === '') &&
8157 ($scope.minutes === null || $scope.minutes === '') &&
8158 (!$scope.showSeconds || $scope.showSeconds && ($scope.seconds === null || $scope.seconds === ''));
8159 }
8160
8161 $scope.showSpinners = angular.isDefined($attrs.showSpinners) ?
8162 $scope.$parent.$eval($attrs.showSpinners) : timepickerConfig.showSpinners;
8163
8164 $scope.incrementHours = function() {
8165 if (!$scope.noIncrementHours()) {
8166 addSecondsToSelected(hourStep * 60 * 60);
8167 }
8168 };
8169
8170 $scope.decrementHours = function() {
8171 if (!$scope.noDecrementHours()) {
8172 addSecondsToSelected(-hourStep * 60 * 60);
8173 }
8174 };
8175
8176 $scope.incrementMinutes = function() {
8177 if (!$scope.noIncrementMinutes()) {
8178 addSecondsToSelected(minuteStep * 60);
8179 }
8180 };
8181
8182 $scope.decrementMinutes = function() {
8183 if (!$scope.noDecrementMinutes()) {
8184 addSecondsToSelected(-minuteStep * 60);
8185 }
8186 };
8187
8188 $scope.incrementSeconds = function() {
8189 if (!$scope.noIncrementSeconds()) {
8190 addSecondsToSelected(secondStep);
8191 }
8192 };
8193
8194 $scope.decrementSeconds = function() {
8195 if (!$scope.noDecrementSeconds()) {
8196 addSecondsToSelected(-secondStep);
8197 }
8198 };
8199
8200 $scope.toggleMeridian = function() {
8201 var minutes = getMinutesFromTemplate(),
8202 hours = getHoursFromTemplate();
8203
8204 if (!$scope.noToggleMeridian()) {
8205 if (angular.isDefined(minutes) && angular.isDefined(hours)) {
8206 addSecondsToSelected(12 * 60 * (selected.getHours() < 12 ? 60 : -60));
8207 } else {
8208 $scope.meridian = $scope.meridian === meridians[0] ? meridians[1] : meridians[0];
8209 }
8210 }
8211 };
8212
8213 $scope.blur = function() {
8214 ngModelCtrl.$setTouched();
8215 };
8216
8217 $scope.$on('$destroy', function() {
8218 while (watchers.length) {
8219 watchers.shift()();
8220 }
8221 });
8222 }])
8223
8224 .directive('uibTimepicker', ['uibTimepickerConfig', function(uibTimepickerConfig) {
8225 return {
8226 require: ['uibTimepicker', '?^ngModel'],
8227 controller: 'UibTimepickerController',
8228 controllerAs: 'timepicker',
8229 replace: true,
8230 scope: {},
8231 templateUrl: function(element, attrs) {
8232 return attrs.templateUrl || uibTimepickerConfig.templateUrl;
8233 },
8234 link: function(scope, element, attrs, ctrls) {
8235 var timepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
8236
8237 if (ngModelCtrl) {
8238 timepickerCtrl.init(ngModelCtrl, element.find('input'));
8239 }
8240 }
8241 };
8242 }]);
8243
8244 angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap.position'])
8245
8246 /**
8247 * A helper service that can parse typeahead's syntax (string provided by users)
8248 * Extracted to a separate service for ease of unit testing
8249 */
8250 .factory('uibTypeaheadParser', ['$parse', function($parse) {
8251 // 00000111000000000000022200000000000000003333333333333330000000000044000
8252 var TYPEAHEAD_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;
8253 return {
8254 parse: function(input) {
8255 var match = input.match(TYPEAHEAD_REGEXP);
8256 if (!match) {
8257 throw new Error(
8258 'Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_"' +
8259 ' but got "' + input + '".');
8260 }
8261
8262 return {
8263 itemName: match[3],
8264 source: $parse(match[4]),
8265 viewMapper: $parse(match[2] || match[1]),
8266 modelMapper: $parse(match[1])
8267 };
8268 }
8269 };
8270 }])
8271
8272 .controller('UibTypeaheadController', ['$scope', '$element', '$attrs', '$compile', '$parse', '$q', '$timeout', '$document', '$window', '$rootScope', '$$debounce', '$uibPosition', 'uibTypeaheadParser',
8273 function(originalScope, element, attrs, $compile, $parse, $q, $timeout, $document, $window, $rootScope, $$debounce, $position, typeaheadParser) {
8274 var HOT_KEYS = [9, 13, 27, 38, 40];
8275 var eventDebounceTime = 200;
8276 var modelCtrl, ngModelOptions;
8277 //SUPPORTED ATTRIBUTES (OPTIONS)
8278
8279 //minimal no of characters that needs to be entered before typeahead kicks-in
8280 var minLength = originalScope.$eval(attrs.typeaheadMinLength);
8281 if (!minLength && minLength !== 0) {
8282 minLength = 1;
8283 }
8284
8285 originalScope.$watch(attrs.typeaheadMinLength, function (newVal) {
8286 minLength = !newVal && newVal !== 0 ? 1 : newVal;
8287 });
8288
8289 //minimal wait time after last character typed before typeahead kicks-in
8290 var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0;
8291
8292 //should it restrict model values to the ones selected from the popup only?
8293 var isEditable = originalScope.$eval(attrs.typeaheadEditable) !== false;
8294 originalScope.$watch(attrs.typeaheadEditable, function (newVal) {
8295 isEditable = newVal !== false;
8296 });
8297
8298 //binding to a variable that indicates if matches are being retrieved asynchronously
8299 var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop;
8300
8301 //a callback executed when a match is selected
8302 var onSelectCallback = $parse(attrs.typeaheadOnSelect);
8303
8304 //should it select highlighted popup value when losing focus?
8305 var isSelectOnBlur = angular.isDefined(attrs.typeaheadSelectOnBlur) ? originalScope.$eval(attrs.typeaheadSelectOnBlur) : false;
8306
8307 //binding to a variable that indicates if there were no results after the query is completed
8308 var isNoResultsSetter = $parse(attrs.typeaheadNoResults).assign || angular.noop;
8309
8310 var inputFormatter = attrs.typeaheadInputFormatter ? $parse(attrs.typeaheadInputFormatter) : undefined;
8311
8312 var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false;
8313
8314 var appendTo = attrs.typeaheadAppendTo ?
8315 originalScope.$eval(attrs.typeaheadAppendTo) : null;
8316
8317 var focusFirst = originalScope.$eval(attrs.typeaheadFocusFirst) !== false;
8318
8319 //If input matches an item of the list exactly, select it automatically
8320 var selectOnExact = attrs.typeaheadSelectOnExact ? originalScope.$eval(attrs.typeaheadSelectOnExact) : false;
8321
8322 //binding to a variable that indicates if dropdown is open
8323 var isOpenSetter = $parse(attrs.typeaheadIsOpen).assign || angular.noop;
8324
8325 var showHint = originalScope.$eval(attrs.typeaheadShowHint) || false;
8326
8327 //INTERNAL VARIABLES
8328
8329 //model setter executed upon match selection
8330 var parsedModel = $parse(attrs.ngModel);
8331 var invokeModelSetter = $parse(attrs.ngModel + '($$$p)');
8332 var $setModelValue = function(scope, newValue) {
8333 if (angular.isFunction(parsedModel(originalScope)) &&
8334 ngModelOptions && ngModelOptions.$options && ngModelOptions.$options.getterSetter) {
8335 return invokeModelSetter(scope, {$$$p: newValue});
8336 }
8337
8338 return parsedModel.assign(scope, newValue);
8339 };
8340
8341 //expressions used by typeahead
8342 var parserResult = typeaheadParser.parse(attrs.uibTypeahead);
8343
8344 var hasFocus;
8345
8346 //Used to avoid bug in iOS webview where iOS keyboard does not fire
8347 //mousedown & mouseup events
8348 //Issue #3699
8349 var selected;
8350
8351 //create a child scope for the typeahead directive so we are not polluting original scope
8352 //with typeahead-specific data (matches, query etc.)
8353 var scope = originalScope.$new();
8354 var offDestroy = originalScope.$on('$destroy', function() {
8355 scope.$destroy();
8356 });
8357 scope.$on('$destroy', offDestroy);
8358
8359 // WAI-ARIA
8360 var popupId = 'typeahead-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
8361 element.attr({
8362 'aria-autocomplete': 'list',
8363 'aria-expanded': false,
8364 'aria-owns': popupId
8365 });
8366
8367 var inputsContainer, hintInputElem;
8368 //add read-only input to show hint
8369 if (showHint) {
8370 inputsContainer = angular.element('<div></div>');
8371 inputsContainer.css('position', 'relative');
8372 element.after(inputsContainer);
8373 hintInputElem = element.clone();
8374 hintInputElem.attr('placeholder', '');
8375 hintInputElem.attr('tabindex', '-1');
8376 hintInputElem.val('');
8377 hintInputElem.css({
8378 'position': 'absolute',
8379 'top': '0px',
8380 'left': '0px',
8381 'border-color': 'transparent',
8382 'box-shadow': 'none',
8383 'opacity': 1,
8384 'background': 'none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)',
8385 'color': '#999'
8386 });
8387 element.css({
8388 'position': 'relative',
8389 'vertical-align': 'top',
8390 'background-color': 'transparent'
8391 });
8392 inputsContainer.append(hintInputElem);
8393 hintInputElem.after(element);
8394 }
8395
8396 //pop-up element used to display matches
8397 var popUpEl = angular.element('<div uib-typeahead-popup></div>');
8398 popUpEl.attr({
8399 id: popupId,
8400 matches: 'matches',
8401 active: 'activeIdx',
8402 select: 'select(activeIdx, evt)',
8403 'move-in-progress': 'moveInProgress',
8404 query: 'query',
8405 position: 'position',
8406 'assign-is-open': 'assignIsOpen(isOpen)',
8407 debounce: 'debounceUpdate'
8408 });
8409 //custom item template
8410 if (angular.isDefined(attrs.typeaheadTemplateUrl)) {
8411 popUpEl.attr('template-url', attrs.typeaheadTemplateUrl);
8412 }
8413
8414 if (angular.isDefined(attrs.typeaheadPopupTemplateUrl)) {
8415 popUpEl.attr('popup-template-url', attrs.typeaheadPopupTemplateUrl);
8416 }
8417
8418 var resetHint = function() {
8419 if (showHint) {
8420 hintInputElem.val('');
8421 }
8422 };
8423
8424 var resetMatches = function() {
8425 scope.matches = [];
8426 scope.activeIdx = -1;
8427 element.attr('aria-expanded', false);
8428 resetHint();
8429 };
8430
8431 var getMatchId = function(index) {
8432 return popupId + '-option-' + index;
8433 };
8434
8435 // Indicate that the specified match is the active (pre-selected) item in the list owned by this typeahead.
8436 // This attribute is added or removed automatically when the `activeIdx` changes.
8437 scope.$watch('activeIdx', function(index) {
8438 if (index < 0) {
8439 element.removeAttr('aria-activedescendant');
8440 } else {
8441 element.attr('aria-activedescendant', getMatchId(index));
8442 }
8443 });
8444
8445 var inputIsExactMatch = function(inputValue, index) {
8446 if (scope.matches.length > index && inputValue) {
8447 return inputValue.toUpperCase() === scope.matches[index].label.toUpperCase();
8448 }
8449
8450 return false;
8451 };
8452
8453 var getMatchesAsync = function(inputValue, evt) {
8454 var locals = {$viewValue: inputValue};
8455 isLoadingSetter(originalScope, true);
8456 isNoResultsSetter(originalScope, false);
8457 $q.when(parserResult.source(originalScope, locals)).then(function(matches) {
8458 //it might happen that several async queries were in progress if a user were typing fast
8459 //but we are interested only in responses that correspond to the current view value
8460 var onCurrentRequest = inputValue === modelCtrl.$viewValue;
8461 if (onCurrentRequest && hasFocus) {
8462 if (matches && matches.length > 0) {
8463 scope.activeIdx = focusFirst ? 0 : -1;
8464 isNoResultsSetter(originalScope, false);
8465 scope.matches.length = 0;
8466
8467 //transform labels
8468 for (var i = 0; i < matches.length; i++) {
8469 locals[parserResult.itemName] = matches[i];
8470 scope.matches.push({
8471 id: getMatchId(i),
8472 label: parserResult.viewMapper(scope, locals),
8473 model: matches[i]
8474 });
8475 }
8476
8477 scope.query = inputValue;
8478 //position pop-up with matches - we need to re-calculate its position each time we are opening a window
8479 //with matches as a pop-up might be absolute-positioned and position of an input might have changed on a page
8480 //due to other elements being rendered
8481 recalculatePosition();
8482
8483 element.attr('aria-expanded', true);
8484
8485 //Select the single remaining option if user input matches
8486 if (selectOnExact && scope.matches.length === 1 && inputIsExactMatch(inputValue, 0)) {
8487 if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
8488 $$debounce(function() {
8489 scope.select(0, evt);
8490 }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
8491 } else {
8492 scope.select(0, evt);
8493 }
8494 }
8495
8496 if (showHint) {
8497 var firstLabel = scope.matches[0].label;
8498 if (angular.isString(inputValue) &&
8499 inputValue.length > 0 &&
8500 firstLabel.slice(0, inputValue.length).toUpperCase() === inputValue.toUpperCase()) {
8501 hintInputElem.val(inputValue + firstLabel.slice(inputValue.length));
8502 } else {
8503 hintInputElem.val('');
8504 }
8505 }
8506 } else {
8507 resetMatches();
8508 isNoResultsSetter(originalScope, true);
8509 }
8510 }
8511 if (onCurrentRequest) {
8512 isLoadingSetter(originalScope, false);
8513 }
8514 }, function() {
8515 resetMatches();
8516 isLoadingSetter(originalScope, false);
8517 isNoResultsSetter(originalScope, true);
8518 });
8519 };
8520
8521 // bind events only if appendToBody params exist - performance feature
8522 if (appendToBody) {
8523 angular.element($window).on('resize', fireRecalculating);
8524 $document.find('body').on('scroll', fireRecalculating);
8525 }
8526
8527 // Declare the debounced function outside recalculating for
8528 // proper debouncing
8529 var debouncedRecalculate = $$debounce(function() {
8530 // if popup is visible
8531 if (scope.matches.length) {
8532 recalculatePosition();
8533 }
8534
8535 scope.moveInProgress = false;
8536 }, eventDebounceTime);
8537
8538 // Default progress type
8539 scope.moveInProgress = false;
8540
8541 function fireRecalculating() {
8542 if (!scope.moveInProgress) {
8543 scope.moveInProgress = true;
8544 scope.$digest();
8545 }
8546
8547 debouncedRecalculate();
8548 }
8549
8550 // recalculate actual position and set new values to scope
8551 // after digest loop is popup in right position
8552 function recalculatePosition() {
8553 scope.position = appendToBody ? $position.offset(element) : $position.position(element);
8554 scope.position.top += element.prop('offsetHeight');
8555 }
8556
8557 //we need to propagate user's query so we can higlight matches
8558 scope.query = undefined;
8559
8560 //Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
8561 var timeoutPromise;
8562
8563 var scheduleSearchWithTimeout = function(inputValue) {
8564 timeoutPromise = $timeout(function() {
8565 getMatchesAsync(inputValue);
8566 }, waitTime);
8567 };
8568
8569 var cancelPreviousTimeout = function() {
8570 if (timeoutPromise) {
8571 $timeout.cancel(timeoutPromise);
8572 }
8573 };
8574
8575 resetMatches();
8576
8577 scope.assignIsOpen = function (isOpen) {
8578 isOpenSetter(originalScope, isOpen);
8579 };
8580
8581 scope.select = function(activeIdx, evt) {
8582 //called from within the $digest() cycle
8583 var locals = {};
8584 var model, item;
8585
8586 selected = true;
8587 locals[parserResult.itemName] = item = scope.matches[activeIdx].model;
8588 model = parserResult.modelMapper(originalScope, locals);
8589 $setModelValue(originalScope, model);
8590 modelCtrl.$setValidity('editable', true);
8591 modelCtrl.$setValidity('parse', true);
8592
8593 onSelectCallback(originalScope, {
8594 $item: item,
8595 $model: model,
8596 $label: parserResult.viewMapper(originalScope, locals),
8597 $event: evt
8598 });
8599
8600 resetMatches();
8601
8602 //return focus to the input element if a match was selected via a mouse click event
8603 // use timeout to avoid $rootScope:inprog error
8604 if (scope.$eval(attrs.typeaheadFocusOnSelect) !== false) {
8605 $timeout(function() { element[0].focus(); }, 0, false);
8606 }
8607 };
8608
8609 //bind keyboard events: arrows up(38) / down(40), enter(13) and tab(9), esc(27)
8610 element.on('keydown', function(evt) {
8611 //typeahead is open and an "interesting" key was pressed
8612 if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) {
8613 return;
8614 }
8615
8616 /**
8617 * if there's nothing selected (i.e. focusFirst) and enter or tab is hit
8618 * or
8619 * shift + tab is pressed to bring focus to the previous element
8620 * then clear the results
8621 */
8622 if (scope.activeIdx === -1 && (evt.which === 9 || evt.which === 13) || evt.which === 9 && !!evt.shiftKey) {
8623 resetMatches();
8624 scope.$digest();
8625 return;
8626 }
8627
8628 evt.preventDefault();
8629 var target;
8630 switch (evt.which) {
8631 case 9:
8632 case 13:
8633 scope.$apply(function () {
8634 if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
8635 $$debounce(function() {
8636 scope.select(scope.activeIdx, evt);
8637 }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
8638 } else {
8639 scope.select(scope.activeIdx, evt);
8640 }
8641 });
8642 break;
8643 case 27:
8644 evt.stopPropagation();
8645
8646 resetMatches();
8647 originalScope.$digest();
8648 break;
8649 case 38:
8650 scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
8651 scope.$digest();
8652 target = popUpEl.find('li')[scope.activeIdx];
8653 target.parentNode.scrollTop = target.offsetTop;
8654 break;
8655 case 40:
8656 scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;
8657 scope.$digest();
8658 target = popUpEl.find('li')[scope.activeIdx];
8659 target.parentNode.scrollTop = target.offsetTop;
8660 break;
8661 }
8662 });
8663
8664 element.bind('focus', function (evt) {
8665 hasFocus = true;
8666 if (minLength === 0 && !modelCtrl.$viewValue) {
8667 $timeout(function() {
8668 getMatchesAsync(modelCtrl.$viewValue, evt);
8669 }, 0);
8670 }
8671 });
8672
8673 element.bind('blur', function(evt) {
8674 if (isSelectOnBlur && scope.matches.length && scope.activeIdx !== -1 && !selected) {
8675 selected = true;
8676 scope.$apply(function() {
8677 if (angular.isObject(scope.debounceUpdate) && angular.isNumber(scope.debounceUpdate.blur)) {
8678 $$debounce(function() {
8679 scope.select(scope.activeIdx, evt);
8680 }, scope.debounceUpdate.blur);
8681 } else {
8682 scope.select(scope.activeIdx, evt);
8683 }
8684 });
8685 }
8686 if (!isEditable && modelCtrl.$error.editable) {
8687 modelCtrl.$setViewValue();
8688 // Reset validity as we are clearing
8689 modelCtrl.$setValidity('editable', true);
8690 modelCtrl.$setValidity('parse', true);
8691 element.val('');
8692 }
8693 hasFocus = false;
8694 selected = false;
8695 });
8696
8697 // Keep reference to click handler to unbind it.
8698 var dismissClickHandler = function(evt) {
8699 // Issue #3973
8700 // Firefox treats right click as a click on document
8701 if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) {
8702 resetMatches();
8703 if (!$rootScope.$$phase) {
8704 originalScope.$digest();
8705 }
8706 }
8707 };
8708
8709 $document.on('click', dismissClickHandler);
8710
8711 originalScope.$on('$destroy', function() {
8712 $document.off('click', dismissClickHandler);
8713 if (appendToBody || appendTo) {
8714 $popup.remove();
8715 }
8716
8717 if (appendToBody) {
8718 angular.element($window).off('resize', fireRecalculating);
8719 $document.find('body').off('scroll', fireRecalculating);
8720 }
8721 // Prevent jQuery cache memory leak
8722 popUpEl.remove();
8723
8724 if (showHint) {
8725 inputsContainer.remove();
8726 }
8727 });
8728
8729 var $popup = $compile(popUpEl)(scope);
8730
8731 if (appendToBody) {
8732 $document.find('body').append($popup);
8733 } else if (appendTo) {
8734 angular.element(appendTo).eq(0).append($popup);
8735 } else {
8736 element.after($popup);
8737 }
8738
8739 this.init = function(_modelCtrl, _ngModelOptions) {
8740 modelCtrl = _modelCtrl;
8741 ngModelOptions = _ngModelOptions;
8742
8743 scope.debounceUpdate = modelCtrl.$options && $parse(modelCtrl.$options.debounce)(originalScope);
8744
8745 //plug into $parsers pipeline to open a typeahead on view changes initiated from DOM
8746 //$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue
8747 modelCtrl.$parsers.unshift(function(inputValue) {
8748 hasFocus = true;
8749
8750 if (minLength === 0 || inputValue && inputValue.length >= minLength) {
8751 if (waitTime > 0) {
8752 cancelPreviousTimeout();
8753 scheduleSearchWithTimeout(inputValue);
8754 } else {
8755 getMatchesAsync(inputValue);
8756 }
8757 } else {
8758 isLoadingSetter(originalScope, false);
8759 cancelPreviousTimeout();
8760 resetMatches();
8761 }
8762
8763 if (isEditable) {
8764 return inputValue;
8765 }
8766
8767 if (!inputValue) {
8768 // Reset in case user had typed something previously.
8769 modelCtrl.$setValidity('editable', true);
8770 return null;
8771 }
8772
8773 modelCtrl.$setValidity('editable', false);
8774 return undefined;
8775 });
8776
8777 modelCtrl.$formatters.push(function(modelValue) {
8778 var candidateViewValue, emptyViewValue;
8779 var locals = {};
8780
8781 // The validity may be set to false via $parsers (see above) if
8782 // the model is restricted to selected values. If the model
8783 // is set manually it is considered to be valid.
8784 if (!isEditable) {
8785 modelCtrl.$setValidity('editable', true);
8786 }
8787
8788 if (inputFormatter) {
8789 locals.$model = modelValue;
8790 return inputFormatter(originalScope, locals);
8791 }
8792
8793 //it might happen that we don't have enough info to properly render input value
8794 //we need to check for this situation and simply return model value if we can't apply custom formatting
8795 locals[parserResult.itemName] = modelValue;
8796 candidateViewValue = parserResult.viewMapper(originalScope, locals);
8797 locals[parserResult.itemName] = undefined;
8798 emptyViewValue = parserResult.viewMapper(originalScope, locals);
8799
8800 return candidateViewValue !== emptyViewValue ? candidateViewValue : modelValue;
8801 });
8802 };
8803 }])
8804
8805 .directive('uibTypeahead', function() {
8806 return {
8807 controller: 'UibTypeaheadController',
8808 require: ['ngModel', '^?ngModelOptions', 'uibTypeahead'],
8809 link: function(originalScope, element, attrs, ctrls) {
8810 ctrls[2].init(ctrls[0], ctrls[1]);
8811 }
8812 };
8813 })
8814
8815 .directive('uibTypeaheadPopup', ['$$debounce', function($$debounce) {
8816 return {
8817 scope: {
8818 matches: '=',
8819 query: '=',
8820 active: '=',
8821 position: '&',
8822 moveInProgress: '=',
8823 select: '&',
8824 assignIsOpen: '&',
8825 debounce: '&'
8826 },
8827 replace: true,
8828 templateUrl: function(element, attrs) {
8829 return attrs.popupTemplateUrl || 'uib/template/typeahead/typeahead-popup.html';
8830 },
8831 link: function(scope, element, attrs) {
8832 scope.templateUrl = attrs.templateUrl;
8833
8834 scope.isOpen = function() {
8835 var isDropdownOpen = scope.matches.length > 0;
8836 scope.assignIsOpen({ isOpen: isDropdownOpen });
8837 return isDropdownOpen;
8838 };
8839
8840 scope.isActive = function(matchIdx) {
8841 return scope.active === matchIdx;
8842 };
8843
8844 scope.selectActive = function(matchIdx) {
8845 scope.active = matchIdx;
8846 };
8847
8848 scope.selectMatch = function(activeIdx, evt) {
8849 var debounce = scope.debounce();
8850 if (angular.isNumber(debounce) || angular.isObject(debounce)) {
8851 $$debounce(function() {
8852 scope.select({activeIdx: activeIdx, evt: evt});
8853 }, angular.isNumber(debounce) ? debounce : debounce['default']);
8854 } else {
8855 scope.select({activeIdx: activeIdx, evt: evt});
8856 }
8857 };
8858 }
8859 };
8860 }])
8861
8862 .directive('uibTypeaheadMatch', ['$templateRequest', '$compile', '$parse', function($templateRequest, $compile, $parse) {
8863 return {
8864 scope: {
8865 index: '=',
8866 match: '=',
8867 query: '='
8868 },
8869 link: function(scope, element, attrs) {
8870 var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'uib/template/typeahead/typeahead-match.html';
8871 $templateRequest(tplUrl).then(function(tplContent) {
8872 var tplEl = angular.element(tplContent.trim());
8873 element.replaceWith(tplEl);
8874 $compile(tplEl)(scope);
8875 });
8876 }
8877 };
8878 }])
8879
8880 .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) {
8881 var isSanitizePresent;
8882 isSanitizePresent = $injector.has('$sanitize');
8883
8884 function escapeRegexp(queryToEscape) {
8885 // Regex: capture the whole query string and replace it with the string that will be used to match
8886 // the results, for example if the capture is "a" the result will be \a
8887 return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
8888 }
8889
8890 function containsHtml(matchItem) {
8891 return /<.*>/g.test(matchItem);
8892 }
8893
8894 return function(matchItem, query) {
8895 if (!isSanitizePresent && containsHtml(matchItem)) {
8896 $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger
8897 }
8898 matchItem = query ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '<strong>$&</strong>') : matchItem; // Replaces the capture string with a the same string inside of a "strong" tag
8899 if (!isSanitizePresent) {
8900 matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive
8901 }
8902 return matchItem;
8903 };
8904 }]);
8905
8906 angular.module("uib/template/accordion/accordion-group.html", []).run(["$templateCache", function($templateCache) {
8907 $templateCache.put("uib/template/accordion/accordion-group.html",
8908 "<div class=\"panel\" ng-class=\"panelClass || 'panel-default'\">\n" +
8909 " <div role=\"tab\" id=\"{{::headingId}}\" aria-selected=\"{{isOpen}}\" class=\"panel-heading\" ng-keypress=\"toggleOpen($event)\">\n" +
8910 " <h4 class=\"panel-title\">\n" +
8911 " <a role=\"button\" data-toggle=\"collapse\" href aria-expanded=\"{{isOpen}}\" aria-controls=\"{{::panelId}}\" tabindex=\"0\" class=\"accordion-toggle\" ng-click=\"toggleOpen()\" uib-accordion-transclude=\"heading\"><span uib-accordion-header ng-class=\"{'text-muted': isDisabled}\">{{heading}}</span></a>\n" +
8912 " </h4>\n" +
8913 " </div>\n" +
8914 " <div id=\"{{::panelId}}\" aria-labelledby=\"{{::headingId}}\" aria-hidden=\"{{!isOpen}}\" role=\"tabpanel\" class=\"panel-collapse collapse\" uib-collapse=\"!isOpen\">\n" +
8915 " <div class=\"panel-body\" ng-transclude></div>\n" +
8916 " </div>\n" +
8917 "</div>\n" +
8918 "");
8919 }]);
8920
8921 angular.module("uib/template/accordion/accordion.html", []).run(["$templateCache", function($templateCache) {
8922 $templateCache.put("uib/template/accordion/accordion.html",
8923 "<div role=\"tablist\" class=\"panel-group\" ng-transclude></div>");
8924 }]);
8925
8926 angular.module("uib/template/alert/alert.html", []).run(["$templateCache", function($templateCache) {
8927 $templateCache.put("uib/template/alert/alert.html",
8928 "<div class=\"alert\" ng-class=\"['alert-' + (type || 'warning'), closeable ? 'alert-dismissible' : null]\" role=\"alert\">\n" +
8929 " <button ng-show=\"closeable\" type=\"button\" class=\"close\" ng-click=\"close({$event: $event})\">\n" +
8930 " <span aria-hidden=\"true\">&times;</span>\n" +
8931 " <span class=\"sr-only\">Close</span>\n" +
8932 " </button>\n" +
8933 " <div ng-transclude></div>\n" +
8934 "</div>\n" +
8935 "");
8936 }]);
8937
8938 angular.module("uib/template/carousel/carousel.html", []).run(["$templateCache", function($templateCache) {
8939 $templateCache.put("uib/template/carousel/carousel.html",
8940 "<div ng-mouseenter=\"pause()\" ng-mouseleave=\"play()\" class=\"carousel\" ng-swipe-right=\"prev()\" ng-swipe-left=\"next()\">\n" +
8941 " <div class=\"carousel-inner\" ng-transclude></div>\n" +
8942 " <a role=\"button\" href class=\"left carousel-control\" ng-click=\"prev()\" ng-class=\"{ disabled: isPrevDisabled() }\" ng-show=\"slides.length > 1\">\n" +
8943 " <span aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-left\"></span>\n" +
8944 " <span class=\"sr-only\">previous</span>\n" +
8945 " </a>\n" +
8946 " <a role=\"button\" href class=\"right carousel-control\" ng-click=\"next()\" ng-class=\"{ disabled: isNextDisabled() }\" ng-show=\"slides.length > 1\">\n" +
8947 " <span aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-right\"></span>\n" +
8948 " <span class=\"sr-only\">next</span>\n" +
8949 " </a>\n" +
8950 " <ol class=\"carousel-indicators\" ng-show=\"slides.length > 1\">\n" +
8951 " <li ng-repeat=\"slide in slides | orderBy:indexOfSlide track by $index\" ng-class=\"{ active: isActive(slide) }\" ng-click=\"select(slide)\">\n" +
8952 " <span class=\"sr-only\">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if=\"isActive(slide)\">, currently active</span></span>\n" +
8953 " </li>\n" +
8954 " </ol>\n" +
8955 "</div>\n" +
8956 "");
8957 }]);
8958
8959 angular.module("uib/template/carousel/slide.html", []).run(["$templateCache", function($templateCache) {
8960 $templateCache.put("uib/template/carousel/slide.html",
8961 "<div ng-class=\"{\n" +
8962 " 'active': active\n" +
8963 " }\" class=\"item text-center\" ng-transclude></div>\n" +
8964 "");
8965 }]);
8966
8967 angular.module("uib/template/datepicker/datepicker.html", []).run(["$templateCache", function($templateCache) {
8968 $templateCache.put("uib/template/datepicker/datepicker.html",
8969 "<div class=\"uib-datepicker\" ng-switch=\"datepickerMode\" role=\"application\" ng-keydown=\"keydown($event)\">\n" +
8970 " <uib-daypicker ng-switch-when=\"day\" tabindex=\"0\"></uib-daypicker>\n" +
8971 " <uib-monthpicker ng-switch-when=\"month\" tabindex=\"0\"></uib-monthpicker>\n" +
8972 " <uib-yearpicker ng-switch-when=\"year\" tabindex=\"0\"></uib-yearpicker>\n" +
8973 "</div>\n" +
8974 "");
8975 }]);
8976
8977 angular.module("uib/template/datepicker/day.html", []).run(["$templateCache", function($templateCache) {
8978 $templateCache.put("uib/template/datepicker/day.html",
8979 "<table class=\"uib-daypicker\" role=\"grid\" aria-labelledby=\"{{::uniqueId}}-title\" aria-activedescendant=\"{{activeDateId}}\">\n" +
8980 " <thead>\n" +
8981 " <tr>\n" +
8982 " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left uib-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-left\"></i></button></th>\n" +
8983 " <th colspan=\"{{::5 + showWeeks}}\"><button id=\"{{::uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm uib-title\" ng-click=\"toggleMode()\" ng-disabled=\"datepickerMode === maxMode\" tabindex=\"-1\"><strong>{{title}}</strong></button></th>\n" +
8984 " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right uib-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-right\"></i></button></th>\n" +
8985 " </tr>\n" +
8986 " <tr>\n" +
8987 " <th ng-if=\"showWeeks\" class=\"text-center\"></th>\n" +
8988 " <th ng-repeat=\"label in ::labels track by $index\" class=\"text-center\"><small aria-label=\"{{::label.full}}\">{{::label.abbr}}</small></th>\n" +
8989 " </tr>\n" +
8990 " </thead>\n" +
8991 " <tbody>\n" +
8992 " <tr class=\"uib-weeks\" ng-repeat=\"row in rows track by $index\">\n" +
8993 " <td ng-if=\"showWeeks\" class=\"text-center h6\"><em>{{ weekNumbers[$index] }}</em></td>\n" +
8994 " <td ng-repeat=\"dt in row\" class=\"uib-day text-center\" role=\"gridcell\"\n" +
8995 " id=\"{{::dt.uid}}\"\n" +
8996 " ng-class=\"::dt.customClass\">\n" +
8997 " <button type=\"button\" class=\"btn btn-default btn-sm\"\n" +
8998 " uib-is-class=\"\n" +
8999 " 'btn-info' for selectedDt,\n" +
9000 " 'active' for activeDt\n" +
9001 " on dt\"\n" +
9002 " ng-click=\"select(dt.date)\"\n" +
9003 " ng-disabled=\"::dt.disabled\"\n" +
9004 " tabindex=\"-1\"><span ng-class=\"::{'text-muted': dt.secondary, 'text-info': dt.current}\">{{::dt.label}}</span></button>\n" +
9005 " </td>\n" +
9006 " </tr>\n" +
9007 " </tbody>\n" +
9008 "</table>\n" +
9009 "");
9010 }]);
9011
9012 angular.module("uib/template/datepicker/month.html", []).run(["$templateCache", function($templateCache) {
9013 $templateCache.put("uib/template/datepicker/month.html",
9014 "<table class=\"uib-monthpicker\" role=\"grid\" aria-labelledby=\"{{::uniqueId}}-title\" aria-activedescendant=\"{{activeDateId}}\">\n" +
9015 " <thead>\n" +
9016 " <tr>\n" +
9017 " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left uib-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-left\"></i></button></th>\n" +
9018 " <th><button id=\"{{::uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm uib-title\" ng-click=\"toggleMode()\" ng-disabled=\"datepickerMode === maxMode\" tabindex=\"-1\"><strong>{{title}}</strong></button></th>\n" +
9019 " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right uib-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-right\"></i></button></th>\n" +
9020 " </tr>\n" +
9021 " </thead>\n" +
9022 " <tbody>\n" +
9023 " <tr class=\"uib-months\" ng-repeat=\"row in rows track by $index\">\n" +
9024 " <td ng-repeat=\"dt in row\" class=\"uib-month text-center\" role=\"gridcell\"\n" +
9025 " id=\"{{::dt.uid}}\"\n" +
9026 " ng-class=\"::dt.customClass\">\n" +
9027 " <button type=\"button\" class=\"btn btn-default\"\n" +
9028 " uib-is-class=\"\n" +
9029 " 'btn-info' for selectedDt,\n" +
9030 " 'active' for activeDt\n" +
9031 " on dt\"\n" +
9032 " ng-click=\"select(dt.date)\"\n" +
9033 " ng-disabled=\"::dt.disabled\"\n" +
9034 " tabindex=\"-1\"><span ng-class=\"::{'text-info': dt.current}\">{{::dt.label}}</span></button>\n" +
9035 " </td>\n" +
9036 " </tr>\n" +
9037 " </tbody>\n" +
9038 "</table>\n" +
9039 "");
9040 }]);
9041
9042 angular.module("uib/template/datepicker/year.html", []).run(["$templateCache", function($templateCache) {
9043 $templateCache.put("uib/template/datepicker/year.html",
9044 "<table class=\"uib-yearpicker\" role=\"grid\" aria-labelledby=\"{{::uniqueId}}-title\" aria-activedescendant=\"{{activeDateId}}\">\n" +
9045 " <thead>\n" +
9046 " <tr>\n" +
9047 " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left uib-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-left\"></i></button></th>\n" +
9048 " <th colspan=\"{{::columns - 2}}\"><button id=\"{{::uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm uib-title\" ng-click=\"toggleMode()\" ng-disabled=\"datepickerMode === maxMode\" tabindex=\"-1\"><strong>{{title}}</strong></button></th>\n" +
9049 " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right uib-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-right\"></i></button></th>\n" +
9050 " </tr>\n" +
9051 " </thead>\n" +
9052 " <tbody>\n" +
9053 " <tr class=\"uib-years\" ng-repeat=\"row in rows track by $index\">\n" +
9054 " <td ng-repeat=\"dt in row\" class=\"uib-year text-center\" role=\"gridcell\"\n" +
9055 " id=\"{{::dt.uid}}\"\n" +
9056 " ng-class=\"::dt.customClass\">\n" +
9057 " <button type=\"button\" class=\"btn btn-default\"\n" +
9058 " uib-is-class=\"\n" +
9059 " 'btn-info' for selectedDt,\n" +
9060 " 'active' for activeDt\n" +
9061 " on dt\"\n" +
9062 " ng-click=\"select(dt.date)\"\n" +
9063 " ng-disabled=\"::dt.disabled\"\n" +
9064 " tabindex=\"-1\"><span ng-class=\"::{'text-info': dt.current}\">{{::dt.label}}</span></button>\n" +
9065 " </td>\n" +
9066 " </tr>\n" +
9067 " </tbody>\n" +
9068 "</table>\n" +
9069 "");
9070 }]);
9071
9072 angular.module("uib/template/datepickerPopup/popup.html", []).run(["$templateCache", function($templateCache) {
9073 $templateCache.put("uib/template/datepickerPopup/popup.html",
9074 "<div>\n" +
9075 " <ul class=\"uib-datepicker-popup dropdown-menu uib-position-measure\" dropdown-nested ng-if=\"isOpen\" ng-keydown=\"keydown($event)\" ng-click=\"$event.stopPropagation()\">\n" +
9076 " <li ng-transclude></li>\n" +
9077 " <li ng-if=\"showButtonBar\" class=\"uib-button-bar\">\n" +
9078 " <span class=\"btn-group pull-left\">\n" +
9079 " <button type=\"button\" class=\"btn btn-sm btn-info uib-datepicker-current\" ng-click=\"select('today', $event)\" ng-disabled=\"isDisabled('today')\">{{ getText('current') }}</button>\n" +
9080 " <button type=\"button\" class=\"btn btn-sm btn-danger uib-clear\" ng-click=\"select(null, $event)\">{{ getText('clear') }}</button>\n" +
9081 " </span>\n" +
9082 " <button type=\"button\" class=\"btn btn-sm btn-success pull-right uib-close\" ng-click=\"close($event)\">{{ getText('close') }}</button>\n" +
9083 " </li>\n" +
9084 " </ul>\n" +
9085 "</div>\n" +
9086 "");
9087 }]);
9088
9089 angular.module("uib/template/modal/backdrop.html", []).run(["$templateCache", function($templateCache) {
9090 $templateCache.put("uib/template/modal/backdrop.html",
9091 "<div class=\"modal-backdrop\"\n" +
9092 " uib-modal-animation-class=\"fade\"\n" +
9093 " modal-in-class=\"in\"\n" +
9094 " ng-style=\"{'z-index': 1040 + (index && 1 || 0) + index*10}\"\n" +
9095 "></div>\n" +
9096 "");
9097 }]);
9098
9099 angular.module("uib/template/modal/window.html", []).run(["$templateCache", function($templateCache) {
9100 $templateCache.put("uib/template/modal/window.html",
9101 "<div modal-render=\"{{$isRendered}}\" tabindex=\"-1\" role=\"dialog\" class=\"modal\"\n" +
9102 " uib-modal-animation-class=\"fade\"\n" +
9103 " modal-in-class=\"in\"\n" +
9104 " ng-style=\"{'z-index': 1050 + index*10, display: 'block'}\">\n" +
9105 " <div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n" +
9106 "</div>\n" +
9107 "");
9108 }]);
9109
9110 angular.module("uib/template/pager/pager.html", []).run(["$templateCache", function($templateCache) {
9111 $templateCache.put("uib/template/pager/pager.html",
9112 "<ul class=\"pager\">\n" +
9113 " <li ng-class=\"{disabled: noPrevious()||ngDisabled, previous: align}\"><a href ng-click=\"selectPage(page - 1, $event)\">{{::getText('previous')}}</a></li>\n" +
9114 " <li ng-class=\"{disabled: noNext()||ngDisabled, next: align}\"><a href ng-click=\"selectPage(page + 1, $event)\">{{::getText('next')}}</a></li>\n" +
9115 "</ul>\n" +
9116 "");
9117 }]);
9118
9119 angular.module("uib/template/pagination/pagination.html", []).run(["$templateCache", function($templateCache) {
9120 $templateCache.put("uib/template/pagination/pagination.html",
9121 "<ul class=\"pagination\">\n" +
9122 " <li ng-if=\"::boundaryLinks\" ng-class=\"{disabled: noPrevious()||ngDisabled}\" class=\"pagination-first\"><a href ng-click=\"selectPage(1, $event)\">{{::getText('first')}}</a></li>\n" +
9123 " <li ng-if=\"::directionLinks\" ng-class=\"{disabled: noPrevious()||ngDisabled}\" class=\"pagination-prev\"><a href ng-click=\"selectPage(page - 1, $event)\">{{::getText('previous')}}</a></li>\n" +
9124 " <li ng-repeat=\"page in pages track by $index\" ng-class=\"{active: page.active,disabled: ngDisabled&&!page.active}\" class=\"pagination-page\"><a href ng-click=\"selectPage(page.number, $event)\">{{page.text}}</a></li>\n" +
9125 " <li ng-if=\"::directionLinks\" ng-class=\"{disabled: noNext()||ngDisabled}\" class=\"pagination-next\"><a href ng-click=\"selectPage(page + 1, $event)\">{{::getText('next')}}</a></li>\n" +
9126 " <li ng-if=\"::boundaryLinks\" ng-class=\"{disabled: noNext()||ngDisabled}\" class=\"pagination-last\"><a href ng-click=\"selectPage(totalPages, $event)\">{{::getText('last')}}</a></li>\n" +
9127 "</ul>\n" +
9128 "");
9129 }]);
9130
9131 angular.module("uib/template/tooltip/tooltip-html-popup.html", []).run(["$templateCache", function($templateCache) {
9132 $templateCache.put("uib/template/tooltip/tooltip-html-popup.html",
9133 "<div class=\"tooltip\"\n" +
9134 " tooltip-animation-class=\"fade\"\n" +
9135 " uib-tooltip-classes\n" +
9136 " ng-class=\"{ in: isOpen() }\">\n" +
9137 " <div class=\"tooltip-arrow\"></div>\n" +
9138 " <div class=\"tooltip-inner\" ng-bind-html=\"contentExp()\"></div>\n" +
9139 "</div>\n" +
9140 "");
9141 }]);
9142
9143 angular.module("uib/template/tooltip/tooltip-popup.html", []).run(["$templateCache", function($templateCache) {
9144 $templateCache.put("uib/template/tooltip/tooltip-popup.html",
9145 "<div class=\"tooltip\"\n" +
9146 " tooltip-animation-class=\"fade\"\n" +
9147 " uib-tooltip-classes\n" +
9148 " ng-class=\"{ in: isOpen() }\">\n" +
9149 " <div class=\"tooltip-arrow\"></div>\n" +
9150 " <div class=\"tooltip-inner\" ng-bind=\"content\"></div>\n" +
9151 "</div>\n" +
9152 "");
9153 }]);
9154
9155 angular.module("uib/template/tooltip/tooltip-template-popup.html", []).run(["$templateCache", function($templateCache) {
9156 $templateCache.put("uib/template/tooltip/tooltip-template-popup.html",
9157 "<div class=\"tooltip\"\n" +
9158 " tooltip-animation-class=\"fade\"\n" +
9159 " uib-tooltip-classes\n" +
9160 " ng-class=\"{ in: isOpen() }\">\n" +
9161 " <div class=\"tooltip-arrow\"></div>\n" +
9162 " <div class=\"tooltip-inner\"\n" +
9163 " uib-tooltip-template-transclude=\"contentExp()\"\n" +
9164 " tooltip-template-transclude-scope=\"originScope()\"></div>\n" +
9165 "</div>\n" +
9166 "");
9167 }]);
9168
9169 angular.module("uib/template/popover/popover-html.html", []).run(["$templateCache", function($templateCache) {
9170 $templateCache.put("uib/template/popover/popover-html.html",
9171 "<div class=\"popover\"\n" +
9172 " tooltip-animation-class=\"fade\"\n" +
9173 " uib-tooltip-classes\n" +
9174 " ng-class=\"{ in: isOpen() }\">\n" +
9175 " <div class=\"arrow\"></div>\n" +
9176 "\n" +
9177 " <div class=\"popover-inner\">\n" +
9178 " <h3 class=\"popover-title\" ng-bind=\"uibTitle\" ng-if=\"uibTitle\"></h3>\n" +
9179 " <div class=\"popover-content\" ng-bind-html=\"contentExp()\"></div>\n" +
9180 " </div>\n" +
9181 "</div>\n" +
9182 "");
9183 }]);
9184
9185 angular.module("uib/template/popover/popover-template.html", []).run(["$templateCache", function($templateCache) {
9186 $templateCache.put("uib/template/popover/popover-template.html",
9187 "<div class=\"popover\"\n" +
9188 " tooltip-animation-class=\"fade\"\n" +
9189 " uib-tooltip-classes\n" +
9190 " ng-class=\"{ in: isOpen() }\">\n" +
9191 " <div class=\"arrow\"></div>\n" +
9192 "\n" +
9193 " <div class=\"popover-inner\">\n" +
9194 " <h3 class=\"popover-title\" ng-bind=\"uibTitle\" ng-if=\"uibTitle\"></h3>\n" +
9195 " <div class=\"popover-content\"\n" +
9196 " uib-tooltip-template-transclude=\"contentExp()\"\n" +
9197 " tooltip-template-transclude-scope=\"originScope()\"></div>\n" +
9198 " </div>\n" +
9199 "</div>\n" +
9200 "");
9201 }]);
9202
9203 angular.module("uib/template/popover/popover.html", []).run(["$templateCache", function($templateCache) {
9204 $templateCache.put("uib/template/popover/popover.html",
9205 "<div class=\"popover\"\n" +
9206 " tooltip-animation-class=\"fade\"\n" +
9207 " uib-tooltip-classes\n" +
9208 " ng-class=\"{ in: isOpen() }\">\n" +
9209 " <div class=\"arrow\"></div>\n" +
9210 "\n" +
9211 " <div class=\"popover-inner\">\n" +
9212 " <h3 class=\"popover-title\" ng-bind=\"uibTitle\" ng-if=\"uibTitle\"></h3>\n" +
9213 " <div class=\"popover-content\" ng-bind=\"content\"></div>\n" +
9214 " </div>\n" +
9215 "</div>\n" +
9216 "");
9217 }]);
9218
9219 angular.module("uib/template/progressbar/bar.html", []).run(["$templateCache", function($templateCache) {
9220 $templateCache.put("uib/template/progressbar/bar.html",
9221 "<div class=\"progress-bar\" ng-class=\"type && 'progress-bar-' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: (percent < 100 ? percent : 100) + '%'}\" aria-valuetext=\"{{percent | number:0}}%\" aria-labelledby=\"{{::title}}\" ng-transclude></div>\n" +
9222 "");
9223 }]);
9224
9225 angular.module("uib/template/progressbar/progress.html", []).run(["$templateCache", function($templateCache) {
9226 $templateCache.put("uib/template/progressbar/progress.html",
9227 "<div class=\"progress\" ng-transclude aria-labelledby=\"{{::title}}\"></div>");
9228 }]);
9229
9230 angular.module("uib/template/progressbar/progressbar.html", []).run(["$templateCache", function($templateCache) {
9231 $templateCache.put("uib/template/progressbar/progressbar.html",
9232 "<div class=\"progress\">\n" +
9233 " <div class=\"progress-bar\" ng-class=\"type && 'progress-bar-' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: (percent < 100 ? percent : 100) + '%'}\" aria-valuetext=\"{{percent | number:0}}%\" aria-labelledby=\"{{::title}}\" ng-transclude></div>\n" +
9234 "</div>\n" +
9235 "");
9236 }]);
9237
9238 angular.module("uib/template/rating/rating.html", []).run(["$templateCache", function($templateCache) {
9239 $templateCache.put("uib/template/rating/rating.html",
9240 "<span ng-mouseleave=\"reset()\" ng-keydown=\"onKeydown($event)\" tabindex=\"0\" role=\"slider\" aria-valuemin=\"0\" aria-valuemax=\"{{range.length}}\" aria-valuenow=\"{{value}}\" aria-valuetext=\"{{title}}\">\n" +
9241 " <span ng-repeat-start=\"r in range track by $index\" class=\"sr-only\">({{ $index < value ? '*' : ' ' }})</span>\n" +
9242 " <i ng-repeat-end ng-mouseenter=\"enter($index + 1)\" ng-click=\"rate($index + 1)\" class=\"glyphicon\" ng-class=\"$index < value && (r.stateOn || 'glyphicon-star') || (r.stateOff || 'glyphicon-star-empty')\" ng-attr-title=\"{{r.title}}\"></i>\n" +
9243 "</span>\n" +
9244 "");
9245 }]);
9246
9247 angular.module("uib/template/tabs/tab.html", []).run(["$templateCache", function($templateCache) {
9248 $templateCache.put("uib/template/tabs/tab.html",
9249 "<li ng-class=\"[{active: active, disabled: disabled}, classes]\" class=\"uib-tab nav-item\">\n" +
9250 " <a href ng-click=\"select($event)\" class=\"nav-link\" uib-tab-heading-transclude>{{heading}}</a>\n" +
9251 "</li>\n" +
9252 "");
9253 }]);
9254
9255 angular.module("uib/template/tabs/tabset.html", []).run(["$templateCache", function($templateCache) {
9256 $templateCache.put("uib/template/tabs/tabset.html",
9257 "<div>\n" +
9258 " <ul class=\"nav nav-{{tabset.type || 'tabs'}}\" ng-class=\"{'nav-stacked': vertical, 'nav-justified': justified}\" ng-transclude></ul>\n" +
9259 " <div class=\"tab-content\">\n" +
9260 " <div class=\"tab-pane\"\n" +
9261 " ng-repeat=\"tab in tabset.tabs\"\n" +
9262 " ng-class=\"{active: tabset.active === tab.index}\"\n" +
9263 " uib-tab-content-transclude=\"tab\">\n" +
9264 " </div>\n" +
9265 " </div>\n" +
9266 "</div>\n" +
9267 "");
9268 }]);
9269
9270 angular.module("uib/template/timepicker/timepicker.html", []).run(["$templateCache", function($templateCache) {
9271 $templateCache.put("uib/template/timepicker/timepicker.html",
9272 "<table class=\"uib-timepicker\">\n" +
9273 " <tbody>\n" +
9274 " <tr class=\"text-center\" ng-show=\"::showSpinners\">\n" +
9275 " <td class=\"uib-increment hours\"><a ng-click=\"incrementHours()\" ng-class=\"{disabled: noIncrementHours()}\" class=\"btn btn-link\" ng-disabled=\"noIncrementHours()\" tabindex=\"{{::tabindex}}\"><span class=\"glyphicon glyphicon-chevron-up\"></span></a></td>\n" +
9276 " <td>&nbsp;</td>\n" +
9277 " <td class=\"uib-increment minutes\"><a ng-click=\"incrementMinutes()\" ng-class=\"{disabled: noIncrementMinutes()}\" class=\"btn btn-link\" ng-disabled=\"noIncrementMinutes()\" tabindex=\"{{::tabindex}}\"><span class=\"glyphicon glyphicon-chevron-up\"></span></a></td>\n" +
9278 " <td ng-show=\"showSeconds\">&nbsp;</td>\n" +
9279 " <td ng-show=\"showSeconds\" class=\"uib-increment seconds\"><a ng-click=\"incrementSeconds()\" ng-class=\"{disabled: noIncrementSeconds()}\" class=\"btn btn-link\" ng-disabled=\"noIncrementSeconds()\" tabindex=\"{{::tabindex}}\"><span class=\"glyphicon glyphicon-chevron-up\"></span></a></td>\n" +
9280 " <td ng-show=\"showMeridian\"></td>\n" +
9281 " </tr>\n" +
9282 " <tr>\n" +
9283 " <td class=\"form-group uib-time hours\" ng-class=\"{'has-error': invalidHours}\">\n" +
9284 " <input type=\"text\" placeholder=\"HH\" ng-model=\"hours\" ng-change=\"updateHours()\" class=\"form-control text-center\" ng-readonly=\"::readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementHours()\" ng-blur=\"blur()\">\n" +
9285 " </td>\n" +
9286 " <td class=\"uib-separator\">:</td>\n" +
9287 " <td class=\"form-group uib-time minutes\" ng-class=\"{'has-error': invalidMinutes}\">\n" +
9288 " <input type=\"text\" placeholder=\"MM\" ng-model=\"minutes\" ng-change=\"updateMinutes()\" class=\"form-control text-center\" ng-readonly=\"::readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementMinutes()\" ng-blur=\"blur()\">\n" +
9289 " </td>\n" +
9290 " <td ng-show=\"showSeconds\" class=\"uib-separator\">:</td>\n" +
9291 " <td class=\"form-group uib-time seconds\" ng-class=\"{'has-error': invalidSeconds}\" ng-show=\"showSeconds\">\n" +
9292 " <input type=\"text\" placeholder=\"SS\" ng-model=\"seconds\" ng-change=\"updateSeconds()\" class=\"form-control text-center\" ng-readonly=\"readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementSeconds()\" ng-blur=\"blur()\">\n" +
9293 " </td>\n" +
9294 " <td ng-show=\"showMeridian\" class=\"uib-time am-pm\"><button type=\"button\" ng-class=\"{disabled: noToggleMeridian()}\" class=\"btn btn-default text-center\" ng-click=\"toggleMeridian()\" ng-disabled=\"noToggleMeridian()\" tabindex=\"{{::tabindex}}\">{{meridian}}</button></td>\n" +
9295 " </tr>\n" +
9296 " <tr class=\"text-center\" ng-show=\"::showSpinners\">\n" +
9297 " <td class=\"uib-decrement hours\"><a ng-click=\"decrementHours()\" ng-class=\"{disabled: noDecrementHours()}\" class=\"btn btn-link\" ng-disabled=\"noDecrementHours()\" tabindex=\"{{::tabindex}}\"><span class=\"glyphicon glyphicon-chevron-down\"></span></a></td>\n" +
9298 " <td>&nbsp;</td>\n" +
9299 " <td class=\"uib-decrement minutes\"><a ng-click=\"decrementMinutes()\" ng-class=\"{disabled: noDecrementMinutes()}\" class=\"btn btn-link\" ng-disabled=\"noDecrementMinutes()\" tabindex=\"{{::tabindex}}\"><span class=\"glyphicon glyphicon-chevron-down\"></span></a></td>\n" +
9300 " <td ng-show=\"showSeconds\">&nbsp;</td>\n" +
9301 " <td ng-show=\"showSeconds\" class=\"uib-decrement seconds\"><a ng-click=\"decrementSeconds()\" ng-class=\"{disabled: noDecrementSeconds()}\" class=\"btn btn-link\" ng-disabled=\"noDecrementSeconds()\" tabindex=\"{{::tabindex}}\"><span class=\"glyphicon glyphicon-chevron-down\"></span></a></td>\n" +
9302 " <td ng-show=\"showMeridian\"></td>\n" +
9303 " </tr>\n" +
9304 " </tbody>\n" +
9305 "</table>\n" +
9306 "");
9307 }]);
9308
9309 angular.module("uib/template/typeahead/typeahead-match.html", []).run(["$templateCache", function($templateCache) {
9310 $templateCache.put("uib/template/typeahead/typeahead-match.html",
9311 "<a href\n" +
9312 " tabindex=\"-1\"\n" +
9313 " ng-bind-html=\"match.label | uibTypeaheadHighlight:query\"\n" +
9314 " ng-attr-title=\"{{match.label}}\"></a>\n" +
9315 "");
9316 }]);
9317
9318 angular.module("uib/template/typeahead/typeahead-popup.html", []).run(["$templateCache", function($templateCache) {
9319 $templateCache.put("uib/template/typeahead/typeahead-popup.html",
9320 "<ul class=\"dropdown-menu\" ng-show=\"isOpen() && !moveInProgress\" ng-style=\"{top: position().top+'px', left: position().left+'px'}\" role=\"listbox\" aria-hidden=\"{{!isOpen()}}\">\n" +
9321 " <li ng-repeat=\"match in matches track by $index\" ng-class=\"{active: isActive($index) }\" ng-mouseenter=\"selectActive($index)\" ng-click=\"selectMatch($index, $event)\" role=\"option\" id=\"{{::match.id}}\">\n" +
9322 " <div uib-typeahead-match index=\"$index\" match=\"match\" query=\"query\" template-url=\"templateUrl\"></div>\n" +
9323 " </li>\n" +
9324 "</ul>\n" +
9325 "");
9326 }]);
9327 angular.module('ui.bootstrap.carousel').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCarouselCss && angular.element(document).find('head').prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'); angular.$$uibCarouselCss = true; });
9328 angular.module('ui.bootstrap.datepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'); angular.$$uibDatepickerCss = true; });
9329 angular.module('ui.bootstrap.position').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibPositionCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'); angular.$$uibPositionCss = true; });
9330 angular.module('ui.bootstrap.datepickerPopup').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerpopupCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'); angular.$$uibDatepickerpopupCss = true; });
9331 angular.module('ui.bootstrap.tooltip').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTooltipCss && angular.element(document).find('head').prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'); angular.$$uibTooltipCss = true; });
9332 angular.module('ui.bootstrap.timepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTimepickerCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-time input{width:50px;}</style>'); angular.$$uibTimepickerCss = true; });
9333 angular.module('ui.bootstrap.typeahead').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTypeaheadCss && angular.element(document).find('head').prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'); angular.$$uibTypeaheadCss = true; });
1810 9334 ;/*!
1811 9335 * State-based routing for AngularJS
1812 9336 * @version v1.0.0-beta.3
1813 9337 * @link https://ui-router.github.io
1814 9338 * @license MIT License, http://www.opensource.org/licenses/MIT
1815 9339 */
1816 9340 !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("angular")):"function"==typeof define&&define.amd?define("angular-ui-router",["angular"],e):"object"==typeof exports?exports["angular-ui-router"]=e(require("angular")):t["angular-ui-router"]=e(t.angular)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(1)),n(r(53)),n(r(55)),n(r(58)),r(60),r(61),r(62),r(63),Object.defineProperty(e,"__esModule",{value:!0}),e["default"]="ui.router"},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(2)),n(r(46)),n(r(47)),n(r(48)),n(r(49)),n(r(50)),n(r(51)),n(r(52)),n(r(44));var i=r(25);e.UIRouter=i.UIRouter},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(3)),n(r(6)),n(r(7)),n(r(5)),n(r(4)),n(r(8)),n(r(9)),n(r(12))},function(t,e,r){"use strict";function n(t,e,r,n){return void 0===n&&(n=Object.keys(t)),n.filter(function(e){return"function"==typeof t[e]}).forEach(function(n){return e[n]=t[n].bind(r)})}function i(t){void 0===t&&(t={});for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=o.apply(null,[{}].concat(r));return e.extend({},i,c(t||{},Object.keys(i)))}function o(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.forEach(r,function(r){e.forEach(r,function(e,r){t.hasOwnProperty(r)||(t[r]=e)})}),t}function a(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function s(t,e,r){void 0===r&&(r=Object.keys(t));for(var n=0;n<r.length;n++){var i=r[n];if(t[i]!=e[i])return!1}return!0}function u(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={};for(var o in e)t(r,o)&&(i[o]=e[o]);return i}function c(t){return u.apply(null,[e.inArray].concat(T(arguments)))}function f(t){var r=function(t,r){return!e.inArray(t,r)};return u.apply(null,[r].concat(T(arguments)))}function l(t,e){return v(t,P.prop(e))}function p(t,r){var n=k.isArray(t),i=n?[]:{},o=n?function(t){return i.push(t)}:function(t,e){return i[e]=t};return e.forEach(t,function(t,e){r(t,e)&&o(t,e)}),i}function h(t,r){var n;return e.forEach(t,function(t,e){n||r(t,e)&&(n=t)}),n}function v(t,r){var n=k.isArray(t)?[]:{};return e.forEach(t,function(t,e){return n[e]=r(t,e)}),n}function d(t,e){return t.push(e),t}function m(t,e){return void 0===e&&(e="assert failure"),function(r){if(!t(r))throw new Error(k.isFunction(e)?e(r):e);return!0}}function g(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];if(0===t.length)return[];var r=t.reduce(function(t,e){return Math.min(e.length,t)},9007199254740991);return Array.apply(null,Array(r)).map(function(e,r){return t.map(function(t){return t[r]})})}function y(t,e){var r,n;if(k.isArray(e)&&(r=e[0],n=e[1]),!k.isString(r))throw new Error("invalid parameters to applyPairs");return t[r]=n,t}function w(t){return t.length&&t[t.length-1]||void 0}function b(t,r){return r&&Object.keys(r).forEach(function(t){return delete r[t]}),r||(r={}),e.extend(r,t)}function $(t,e,r){return k.isArray(t)?t.forEach(e,r):void Object.keys(t).forEach(function(r){return e(t[r],r)})}function R(t,e){return Object.keys(e).forEach(function(r){return t[r]=e[r]}),t}function S(t){return T(arguments,1).filter(e.identity).reduce(R,t)}function E(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!==t&&e!==e)return!0;var r=typeof t,n=typeof e;if(r!==n||"object"!==r)return!1;var i=[t,e];if(P.all(k.isArray)(i))return x(t,e);if(P.all(k.isDate)(i))return t.getTime()===e.getTime();if(P.all(k.isRegExp)(i))return t.toString()===e.toString();if(P.all(k.isFunction)(i))return!0;var o=[k.isFunction,k.isArray,k.isDate,k.isRegExp];if(o.map(P.any).reduce(function(t,e){return t||!!e(i)},!1))return!1;var a,s={};for(a in t){if(!E(t[a],e[a]))return!1;s[a]=!0}for(a in e)if(!s[a])return!1;return!0}function x(t,e){return t.length===e.length&&g(t,e).reduce(function(t,e){return t&&E(e[0],e[1])},!0)}var k=r(4),P=r(5),_=r(6),C="undefined"==typeof window?{}:window,O=C.angular||{};e.fromJson=O.fromJson||JSON.parse.bind(JSON),e.toJson=O.toJson||JSON.stringify.bind(JSON),e.copy=O.copy||b,e.forEach=O.forEach||$,e.extend=O.extend||S,e.equals=O.equals||E,e.identity=function(t){return t},e.noop=function(){},e.bindFunctions=n,e.inherit=function(t,r){return e.extend(new(e.extend(function(){},{prototype:t})),r)};var T=function(t,e){return void 0===e&&(e=0),Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(t,e))};e.inArray=function(t,e){return t.indexOf(e)!==-1},e.removeFrom=P.curry(function(t,e){var r=t.indexOf(e);return r>=0&&t.splice(r,1),t}),e.defaults=i,e.merge=o,e.mergeR=function(t,r){return e.extend(t,r)},e.ancestors=a,e.equalForKeys=s,e.pick=c,e.omit=f,e.pluck=l,e.filter=p,e.find=h,e.mapObj=v,e.map=v,e.values=function(t){return Object.keys(t).map(function(e){return t[e]})},e.allTrueR=function(t,e){return t&&e},e.anyTrueR=function(t,e){return t||e},e.unnestR=function(t,e){return t.concat(e)},e.flattenR=function(t,r){return k.isArray(r)?t.concat(r.reduce(e.flattenR,[])):d(t,r)},e.pushR=d,e.uniqR=function(t,r){return e.inArray(t,r)?t:d(t,r)},e.unnest=function(t){return t.reduce(e.unnestR,[])},e.flatten=function(t){return t.reduce(e.flattenR,[])},e.assertPredicate=m,e.pairs=function(t){return Object.keys(t).map(function(e){return[e,t[e]]})},e.arrayTuples=g,e.applyPairs=y,e.tail=w,e.silenceUncaughtInPromise=function(t){return t["catch"](function(t){return 0})&&t},e.silentRejection=function(t){return e.silenceUncaughtInPromise(_.services.$q.reject(t))}},function(t,e,r){"use strict";function n(t){if(e.isArray(t)&&t.length){var r=t.slice(0,-1),n=t.slice(-1);return!(r.filter(i.not(e.isString)).length||n.filter(i.not(e.isFunction)).length)}return e.isFunction(t)}var i=r(5),o=Object.prototype.toString,a=function(t){return function(e){return typeof e===t}};e.isUndefined=a("undefined"),e.isDefined=i.not(e.isUndefined),e.isNull=function(t){return null===t},e.isFunction=a("function"),e.isNumber=a("number"),e.isString=a("string"),e.isObject=function(t){return null!==t&&"object"==typeof t},e.isArray=Array.isArray,e.isDate=function(t){return"[object Date]"===o.call(t)},e.isRegExp=function(t){return"[object RegExp]"===o.call(t)},e.isInjectable=n,e.isPromise=i.and(e.isObject,i.pipe(i.prop("then"),e.isFunction))},function(t,e){"use strict";function r(t){function e(r){return r.length>=n?t.apply(null,r):function(){return e(r.concat([].slice.apply(arguments)))}}var r=[].slice.apply(arguments,[1]),n=t.length;return e(r)}function n(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return n.apply(null,[].slice.call(arguments).reverse())}function o(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];return t.apply(null,r)&&e.apply(null,r)}}function a(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n-0]=arguments[n];return t.apply(null,r)||e.apply(null,r)}}function s(t,e){return function(r){return r[t].apply(r,e)}}function u(t){return function(e){for(var r=0;r<t.length;r++)if(t[r][0](e))return t[r][1](e)}}e.curry=r,e.compose=n,e.pipe=i,e.prop=function(t){return function(e){return e&&e[t]}},e.propEq=r(function(t,e,r){return r&&r[t]===e}),e.parse=function(t){return i.apply(null,t.split(".").map(e.prop))},e.not=function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return!t.apply(null,e)}},e.and=o,e.or=a,e.all=function(t){return function(e){return e.reduce(function(e,r){return e&&!!t(r)},!0)}},e.any=function(t){return function(e){return e.reduce(function(e,r){return e||!!t(r)},!1)}},e.is=function(t){return function(e){return null!=e&&e.constructor===t||e instanceof t}},e.eq=function(t){return function(e){return t===e}},e.val=function(t){return function(){return t}},e.invoke=s,e.pattern=u},function(t,e){"use strict";var r=function(t){return function(){throw new Error(t+"(): No coreservices implementation for UI-Router is loaded. You should include one of: ['angular1.js']")}},n={$q:void 0,$injector:void 0,location:{},locationConfig:{},template:{}};e.services=n,["setUrl","path","search","hash","onChange"].forEach(function(t){return n.location[t]=r(t)}),["port","protocol","host","baseHref","html5Mode","hashPrefix"].forEach(function(t){return n.locationConfig[t]=r(t)})},function(t,e){"use strict";var r=function(){function t(t){this.text=t,this.glob=t.split(".");var e=this.text.split(".").map(function(t){return"**"===t?"(?:|(?:\\.[^.]*)*)":"*"===t?"\\.[^.]*":"\\."+t}).join("");this.regexp=new RegExp("^"+e+"$")}return t.prototype.matches=function(t){return this.regexp.test("."+t)},t.is=function(t){return t.indexOf("*")>-1},t.fromString=function(e){return this.is(e)?new t(e):null},t}();e.Glob=r},function(t,e){"use strict";var r=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=null),this._items=t,this._limit=e}return t.prototype.enqueue=function(t){var e=this._items;return e.push(t),this._limit&&e.length>this._limit&&e.shift(),t},t.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){if(this.size())return this._items[0]},t}();e.Queue=r},function(t,e,r){"use strict";function n(t,e){return e.length<=t?e:e.substr(0,t-3)+"..."}function i(t,e){for(;e.length<t;)e+=" ";return e}function o(t){return t.replace(/^([A-Z])/,function(t){return t.toLowerCase()}).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function a(t){var e=s(t),r=e.match(/^(function [^ ]+\([^)]*\))/),n=r?r[1]:e,i=t.name||"";return i&&n.match(/function \(/)?"function "+i+n.substr(9):n}function s(t){var e=c.isArray(t)?t.slice(-1)[0]:t;return e&&e.toString()||"undefined"}function u(t){function e(t){if(c.isObject(t)){if(r.indexOf(t)!==-1)return"[circular ref]";r.push(t)}return m(t)}var r=[];return JSON.stringify(t,function(t,r){return e(r)}).replace(/\\"/g,'"')}var c=r(4),f=r(10),l=r(3),p=r(5),h=r(11),v=r(19);e.maxLength=n,e.padString=i,e.kebobString=o,e.functionToString=a,e.fnToString=s;var d=null,m=function(t){var e=f.Rejection.isTransitionRejectionPromise;return(d=d||p.pattern([[p.not(c.isDefined),p.val("undefined")],[c.isNull,p.val("null")],[c.isPromise,p.val("[Promise]")],[e,function(t){return t._transitionRejection.toString()}],[p.is(f.Rejection),p.invoke("toString")],[p.is(h.Transition),p.invoke("toString")],[p.is(v.Resolvable),p.invoke("toString")],[c.isInjectable,a],[p.val(!0),l.identity]]))(t)};e.stringify=u,e.beforeAfterSubstr=function(t){return function(e){if(!e)return["",""];var r=e.indexOf(t);return r===-1?[e,""]:[e.substr(0,r),e.substr(r+1)]}}},function(t,e,r){"use strict";var n=r(3),i=r(9);!function(t){t[t.SUPERSEDED=2]="SUPERSEDED",t[t.ABORTED=3]="ABORTED",t[t.INVALID=4]="INVALID",t[t.IGNORED=5]="IGNORED",t[t.ERROR=6]="ERROR"}(e.RejectType||(e.RejectType={}));var o=e.RejectType,a=function(){function t(t,e,r){this.type=t,this.message=e,this.detail=r}return t.prototype.toString=function(){var t=function(t){return t&&t.toString!==Object.prototype.toString?t.toString():i.stringify(t)},e=this.type,r=this.message,n=t(this.detail);return"TransitionRejection(type: "+e+", message: "+r+", detail: "+n+")"},t.prototype.toPromise=function(){return n.extend(n.silentRejection(this),{_transitionRejection:this})},t.isTransitionRejectionPromise=function(e){return e&&"function"==typeof e.then&&e._transitionRejection instanceof t},t.superseded=function(e,r){var n="The transition has been superseded by a different transition",i=new t(o.SUPERSEDED,n,e);return r&&r.redirected&&(i.redirected=!0),i},t.redirected=function(e){return t.superseded(e,{redirected:!0})},t.invalid=function(e){var r="This transition is invalid";return new t(o.INVALID,r,e)},t.ignored=function(e){var r="The transition was ignored";return new t(o.IGNORED,r,e)},t.aborted=function(e){var r="The transition has been aborted";return new t(o.ABORTED,r,e)},t.errored=function(e){var r="The transition errored";return new t(o.ERROR,r,e)},t}();e.Rejection=a},function(t,e,r){"use strict";var n=r(9),i=r(12),o=r(6),a=r(3),s=r(4),u=r(5),c=r(13),f=r(15),l=r(16),p=r(21),h=r(20),v=r(14),d=r(22),m=r(19),g=r(10),y=r(17),w=r(25),b=0,$=u.prop("self"),R=function(){function t(e,r,n){var i=this;if(this._deferred=o.services.$q.defer(),this.promise=this._deferred.promise,this.treeChanges=function(){return i._treeChanges},this.isActive=function(){return i===i._options.current()},this.router=n,this._targetState=r,!r.valid())throw new Error(r.error());f.HookRegistry.mixin(new f.HookRegistry,this),this._options=a.extend({current:u.val(this)},r.options()),this.$id=b++;var s=h.PathFactory.buildToPath(e,r);this._treeChanges=h.PathFactory.treeChanges(e,s,this._options.reloadState);var c=this._treeChanges.entering.map(function(t){return t.state});h.PathFactory.applyViewConfigs(n.transitionService.$view,this._treeChanges.to,c);var l=[new m.Resolvable(w.UIRouter,function(){return n},[],(void 0),n),new m.Resolvable(t,function(){return i},[],(void 0),this),new m.Resolvable("$transition$",function(){return i},[],(void 0),this),new m.Resolvable("$stateParams",function(){return i.params()},[],(void 0),this.params())],p=this._treeChanges.to[0],v=new y.ResolveContext(this._treeChanges.to);v.addResolvables(l,p.state)}return t.prototype.onBefore=function(t,e,r){throw""},t.prototype.onStart=function(t,e,r){throw""},t.prototype.onExit=function(t,e,r){throw""},t.prototype.onRetain=function(t,e,r){throw""},t.prototype.onEnter=function(t,e,r){throw""},t.prototype.onFinish=function(t,e,r){throw""},t.prototype.onSuccess=function(t,e,r){throw""},t.prototype.onError=function(t,e,r){throw""},t.prototype.$from=function(){return a.tail(this._treeChanges.from).state},t.prototype.$to=function(){return a.tail(this._treeChanges.to).state},t.prototype.from=function(){return this.$from().self},t.prototype.to=function(){return this.$to().self},t.prototype.targetState=function(){return this._targetState},t.prototype.is=function(e){return e instanceof t?this.is({to:e.$to().name,from:e.$from().name}):!(e.to&&!f.matchState(this.$to(),e.to)||e.from&&!f.matchState(this.$from(),e.from))},t.prototype.params=function(t){return void 0===t&&(t="to"),this._treeChanges[t].map(u.prop("paramValues")).reduce(a.mergeR,{})},t.prototype.injector=function(t){var e=this.treeChanges().to;return t&&(e=h.PathFactory.subPath(e,function(e){return e.state===t||e.state.name===t})),new y.ResolveContext(e).injector()},t.prototype.getResolveTokens=function(){return new y.ResolveContext(this._treeChanges.to).getTokens()},t.prototype.getResolveValue=function(t){var e=new y.ResolveContext(this._treeChanges.to),r=function(t){var r=e.getResolvable(t);if(void 0===r)throw new Error("Dependency Injection token not found: "+n.stringify(t));return r.data};return s.isArray(t)?t.map(r):r(t)},t.prototype.getResolvable=function(t){return new y.ResolveContext(this._treeChanges.to).getResolvable(t)},t.prototype.addResolvable=function(t,e){void 0===e&&(e="");var r="string"==typeof e?e:e.name,n=this._treeChanges.to,i=a.find(n,function(t){return t.state.name===r}),o=new y.ResolveContext(n);o.addResolvables([t],i.state)},t.prototype.redirectedFrom=function(){return this._options.redirectedFrom||null},t.prototype.options=function(){return this._options},t.prototype.entering=function(){return a.map(this._treeChanges.entering,u.prop("state")).map($)},t.prototype.exiting=function(){return a.map(this._treeChanges.exiting,u.prop("state")).map($).reverse()},t.prototype.retained=function(){return a.map(this._treeChanges.retained,u.prop("state")).map($)},t.prototype.views=function(t,e){void 0===t&&(t="entering");var r=this._treeChanges[t];return r=e?r.filter(u.propEq("state",e)):r,r.map(u.prop("views")).filter(a.identity).reduce(a.unnestR,[])},t.prototype.redirect=function(t){var e=a.extend({},this.options(),t.options(),{redirectedFrom:this,source:"redirect"});t=new v.TargetState(t.identifier(),t.$state(),t.params(),e);var r=this.router.transitionService.create(this._treeChanges.from,t),n=this.treeChanges().entering,i=r.treeChanges().entering,o=function(t){return function(e){return t&&e.state.includes[t.name]}},s=p.PathNode.matching(i,n).filter(u.not(o(t.options().reloadState)));return s.forEach(function(t,e){t.resolvables=n[e].resolvables}),r},t.prototype._changedParams=function(){var t=this._treeChanges,e=t.to,r=t.from;if(!this._options.reload&&a.tail(e).state===a.tail(r).state){var n=e.map(function(t){return t.paramSchema}),i=[e,r].map(function(t){return t.map(function(t){return t.paramValues})}),o=i[0],s=i[1],u=a.arrayTuples(n,o,s);return u.map(function(t){var e=t[0],r=t[1],n=t[2];return d.Param.changed(e,r,n)}).reduce(a.unnestR,[])}},t.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(a.anyTrueR,!1)},t.prototype.ignored=function(){var t=this._changedParams();return!!t&&0===t.length},t.prototype.hookBuilder=function(){return new l.HookBuilder(this.router.transitionService,this,{transition:this,current:this._options.current})},t.prototype.run=function(){var t=this,e=c.TransitionHook.runSynchronousHooks,r=this.hookBuilder(),n=this.router.globals;n.transitionHistory.enqueue(this);var o=e(r.getOnBeforeHooks());if(g.Rejection.isTransitionRejectionPromise(o)){o["catch"](function(){return 0});var a=o._transitionRejection;return this._deferred.reject(a),this.promise}if(!this.valid()){var s=new Error(this.error());return this._deferred.reject(s),this.promise}if(this.ignored())return i.trace.traceTransitionIgnored(this),this._deferred.reject(g.Rejection.ignored()),this.promise;var u=function(){i.trace.traceSuccess(t.$to(),t),t.success=!0,t._deferred.resolve(t.to()),e(r.getOnSuccessHooks(),!0)},f=function(n){i.trace.traceError(n,t),t.success=!1,t._deferred.reject(n),t._error=n,e(r.getOnErrorHooks(),!0)};i.trace.traceTransitionStart(this);var l=function(t,e){return t.then(function(){return e.invokeHook()})};return r.asyncHooks().reduce(l,o).then(u,f),this.promise},t.prototype.valid=function(){return!this.error()||void 0!==this.success},t.prototype.error=function(){for(var t=this.$to(),e=0,r=this;null!=(r=r.redirectedFrom());)if(++e>20)return"Too many Transition redirects (20+)";return t.self["abstract"]?"Cannot transition to abstract state '"+t.name+"'":d.Param.validates(t.parameters(),this.params())?this.success===!1?this._error:void 0:"Param values not valid for state '"+t.name+"'"},t.prototype.toString=function(){var t=this.from(),e=this.to(),r=function(t){return null!==t["#"]&&void 0!==t["#"]?t:a.omit(t,"#")},n=this.$id,i=s.isObject(t)?t.name:t,o=a.toJson(r(this._treeChanges.from.map(u.prop("paramValues")).reduce(a.mergeR,{}))),c=this.valid()?"":"(X) ",f=s.isObject(e)?e.name:e,l=a.toJson(r(this.params()));return"Transition#"+n+"( '"+i+"'"+o+" -> "+c+"'"+f+"'"+l+" )"},t.diToken=t,t}();e.Transition=R},function(t,e,r){"use strict";function n(t){return t?"[ui-view#"+t.id+" tag "+("in template from '"+(t.creationContext&&t.creationContext.name||"(root)")+"' state]: ")+("fqn: '"+t.fqn+"', ")+("name: '"+t.name+"@"+t.creationContext+"')"):"ui-view (defunct)"}function i(t){return a.isNumber(t)?c[t]:c[c[t]]}var o=r(5),a=r(4),s=r(9),u=function(t){return"[ViewConfig#"+t.$id+" from '"+(t.viewDecl.$context.name||"(root)")+"' state]: target ui-view: '"+t.viewDecl.$uiViewName+"@"+t.viewDecl.$uiViewContextAnchor+"'"};!function(t){t[t.RESOLVE=0]="RESOLVE",t[t.TRANSITION=1]="TRANSITION",t[t.HOOK=2]="HOOK",t[t.UIVIEW=3]="UIVIEW",t[t.VIEWCONFIG=4]="VIEWCONFIG"}(e.Category||(e.Category={}));var c=e.Category,f=function(){function t(){this._enabled={},this.approximateDigests=0}return t.prototype._set=function(t,e){var r=this;e.length||(e=Object.keys(c).map(function(t){return parseInt(t,10)}).filter(function(t){return!isNaN(t)}).map(function(t){return c[t]})),e.map(i).forEach(function(e){return r._enabled[e]=t})},t.prototype.enable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!0,t)},t.prototype.disable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];this._set(!1,t)},t.prototype.enabled=function(t){return!!this._enabled[i(t)]},t.prototype.traceTransitionStart=function(t){if(this.enabled(c.TRANSITION)){var e=t.$id,r=this.approximateDigests,n=s.stringify(t);console.log("Transition #"+e+" Digest #"+r+": Started -> "+n)}},t.prototype.traceTransitionIgnored=function(t){if(this.enabled(c.TRANSITION)){var e=t&&t.$id,r=this.approximateDigests,n=s.stringify(t);console.log("Transition #"+e+" Digest #"+r+": Ignored <> "+n)}},t.prototype.traceHookInvocation=function(t,e){if(this.enabled(c.HOOK)){var r=o.parse("transition.$id")(e),n=this.approximateDigests,i=o.parse("traceData.hookType")(e)||"internal",a=o.parse("traceData.context.state.name")(e)||o.parse("traceData.context")(e)||"unknown",u=s.functionToString(t.eventHook.callback);console.log("Transition #"+r+" Digest #"+n+": Hook -> "+i+" context: "+a+", "+s.maxLength(200,u))}},t.prototype.traceHookResult=function(t,e){if(this.enabled(c.HOOK)){var r=o.parse("transition.$id")(e),n=this.approximateDigests,i=s.stringify(t);console.log("Transition #"+r+" Digest #"+n+": <- Hook returned: "+s.maxLength(200,i))}},t.prototype.traceResolvePath=function(t,e,r){if(this.enabled(c.RESOLVE)){var n=r&&r.$id,i=this.approximateDigests,o=t&&t.toString();console.log("Transition #"+n+" Digest #"+i+": Resolving "+o+" ("+e+")")}},t.prototype.traceResolvableResolved=function(t,e){if(this.enabled(c.RESOLVE)){var r=e&&e.$id,n=this.approximateDigests,i=t&&t.toString(),o=s.stringify(t.data);console.log("Transition #"+r+" Digest #"+n+": <- Resolved "+i+" to: "+s.maxLength(200,o))}},t.prototype.traceError=function(t,e){if(this.enabled(c.TRANSITION)){var r=e&&e.$id,n=this.approximateDigests,i=s.stringify(e);console.log("Transition #"+r+" Digest #"+n+": <- Rejected "+i+", reason: "+t)}},t.prototype.traceSuccess=function(t,e){if(this.enabled(c.TRANSITION)){var r=e&&e.$id,n=this.approximateDigests,i=t.name,o=s.stringify(e);console.log("Transition #"+r+" Digest #"+n+": <- Success "+o+", final state: "+i)}},t.prototype.traceUIViewEvent=function(t,e,r){void 0===r&&(r=""),this.enabled(c.UIVIEW)&&console.log("ui-view: "+s.padString(30,t)+" "+n(e)+r)},t.prototype.traceUIViewConfigUpdated=function(t,e){this.enabled(c.UIVIEW)&&this.traceUIViewEvent("Updating",t," with ViewConfig from context='"+e+"'")},t.prototype.traceUIViewFill=function(t,e){this.enabled(c.UIVIEW)&&this.traceUIViewEvent("Fill",t," with: "+s.maxLength(200,e))},t.prototype.traceViewServiceEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+u(e))},t.prototype.traceViewServiceUIViewEvent=function(t,e){this.enabled(c.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+n(e))},t}();e.Trace=f;var l=new f;e.trace=l},function(t,e,r){"use strict";var n=r(3),i=r(9),o=r(4),a=r(5),s=r(12),u=r(6),c=r(10),f=r(14),l={async:!0,rejectIfSuperseded:!0,current:n.noop,transition:null,traceData:{},bind:null},p=function(){function t(t,e,r,i){var o=this;this.transition=t,this.stateContext=e,this.eventHook=r,this.options=i,this.isSuperseded=function(){return o.options.current()!==o.options.transition},this.options=n.defaults(i,l)}return t.prototype.invokeHook=function(){var t=this,e=t.options,r=t.eventHook;if(s.trace.traceHookInvocation(this,e),e.rejectIfSuperseded&&this.isSuperseded())return c.Rejection.superseded(e.current()).toPromise();var n=r._deregistered?void 0:r.callback.call(e.bind,this.transition,this.stateContext);return this.handleHookResult(n)},t.prototype.handleHookResult=function(t){if(this.isSuperseded())return c.Rejection.superseded(this.options.current()).toPromise();if(o.isPromise(t))return t.then(this.handleHookResult.bind(this));if(s.trace.traceHookResult(t,this.options),t===!1)return c.Rejection.aborted("Hook aborted transition").toPromise();var e=a.is(f.TargetState);return e(t)?c.Rejection.redirected(t).toPromise():void 0},t.prototype.toString=function(){var t=this,e=t.options,r=t.eventHook,n=a.parse("traceData.hookType")(e)||"internal",o=a.parse("traceData.context.state.name")(e)||a.parse("traceData.context")(e)||"unknown",s=i.fnToString(r.callback);return n+" context: "+o+", "+i.maxLength(200,s)},t.runSynchronousHooks=function(t,e){void 0===e&&(e=!1);for(var r=[],n=0;n<t.length;n++){var i=t[n];try{r.push(i.invokeHook())}catch(s){if(!e)return c.Rejection.errored(s).toPromise();var f=i.transition.router.stateService.defaultErrorHandler();f(s)}}var l=r.filter(c.Rejection.isTransitionRejectionPromise);return l.length?l[0]:r.filter(o.isPromise).reduce(function(t,e){return t.then(a.val(e))},u.services.$q.when())},t}();e.TransitionHook=p},function(t,e,r){"use strict";var n=r(3),i=function(){function t(t,e,r,n){void 0===r&&(r={}),void 0===n&&(n={}),this._identifier=t,this._definition=e,this._options=n,this._params=r||{}}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t.prototype.toString=function(){return"'"+this.name()+"'"+n.toJson(this.params())},t}();e.TargetState=i},function(t,e,r){"use strict";function n(t,e){function r(t){for(var e=n,r=0;r<e.length;r++){var i=s.Glob.fromString(e[r]);if(i&&i.matches(t.name)||!i&&e[r]===t.name)return!0}return!1}var n=a.isString(e)?[e]:e,i=a.isFunction(n)?n:r;return!!i(t)}function i(t,e){return function(r,n,i){void 0===i&&(i={});var a=new u(r,n,i);return t[e].push(a),function(){a._deregistered=!0,o.removeFrom(t[e])(a)}}}var o=r(3),a=r(4),s=r(7);e.matchState=n;var u=function(){function t(t,e,r){void 0===r&&(r={}),this.callback=e,this.matchCriteria=o.extend({to:!0,from:!0,exiting:!0,retained:!0,entering:!0},t),this.priority=r.priority||0,this.bind=r.bind||null,this._deregistered=!1}return t._matchingNodes=function(t,e){if(e===!0)return t;var r=t.filter(function(t){return n(t.state,e)});return r.length?r:null},t.prototype.matches=function(e){var r=this.matchCriteria,n=t._matchingNodes,i={to:n([o.tail(e.to)],r.to),from:n([o.tail(e.from)],r.from),exiting:n(e.exiting,r.exiting),retained:n(e.retained,r.retained),entering:n(e.entering,r.entering)},a=["to","from","exiting","retained","entering"].map(function(t){return i[t]}).reduce(o.allTrueR,!0);return a?i:null},t}();e.EventHook=u;var c=function(){function t(){var t=this;this._transitionEvents={onBefore:[],onStart:[],onEnter:[],onRetain:[],onExit:[],onFinish:[],onSuccess:[],onError:[]},this.getHooks=function(e){return t._transitionEvents[e]},this.onBefore=i(this._transitionEvents,"onBefore"),this.onStart=i(this._transitionEvents,"onStart"),this.onEnter=i(this._transitionEvents,"onEnter"),this.onRetain=i(this._transitionEvents,"onRetain"),this.onExit=i(this._transitionEvents,"onExit"),this.onFinish=i(this._transitionEvents,"onFinish"),this.onSuccess=i(this._transitionEvents,"onSuccess"),this.onError=i(this._transitionEvents,"onError")}return t.mixin=function(t,e){Object.keys(t._transitionEvents).concat(["getHooks"]).forEach(function(r){return e[r]=t[r]})},t}();e.HookRegistry=c},function(t,e,r){"use strict";function n(t){return void 0===t&&(t=!1),function(e,r){var n=t?-1:1,i=(e.node.state.path.length-r.node.state.path.length)*n;return 0!==i?i:r.hook.priority-e.hook.priority}}var i=r(3),o=r(4),a=r(13),s=r(17),u=function(){function t(t,e,r){var o=this;this.$transitions=t,this.transition=e,this.baseHookOptions=r,this.getOnBeforeHooks=function(){return o._buildNodeHooks("onBefore","to",n(),{async:!1})},this.getOnStartHooks=function(){return o._buildNodeHooks("onStart","to",n())},this.getOnExitHooks=function(){return o._buildNodeHooks("onExit","exiting",n(!0),{stateHook:!0})},this.getOnRetainHooks=function(){return o._buildNodeHooks("onRetain","retained",n(!1),{stateHook:!0})},this.getOnEnterHooks=function(){return o._buildNodeHooks("onEnter","entering",n(!1),{stateHook:!0})},this.getOnFinishHooks=function(){return o._buildNodeHooks("onFinish","to",n())},this.getOnSuccessHooks=function(){return o._buildNodeHooks("onSuccess","to",n(),{async:!1,rejectIfSuperseded:!1})},this.getOnErrorHooks=function(){return o._buildNodeHooks("onError","to",n(),{async:!1,rejectIfSuperseded:!1})},this.treeChanges=e.treeChanges(),this.toState=i.tail(this.treeChanges.to).state,this.fromState=i.tail(this.treeChanges.from).state,this.transitionOptions=e.options()}return t.prototype.asyncHooks=function(){var t=this.getOnStartHooks(),e=this.getOnExitHooks(),r=this.getOnRetainHooks(),n=this.getOnEnterHooks(),o=this.getOnFinishHooks(),a=[t,e,r,n,o];return a.reduce(i.unnestR,[]).filter(i.identity)},t.prototype._buildNodeHooks=function(t,e,r,n){var o=this,u=this._matchingHooks(t,this.treeChanges);if(!u)return[];var c=function(r){var u=r.matches(o.treeChanges),c=u[e],f="exiting"===e?o.treeChanges.from:o.treeChanges.to;new s.ResolveContext(f);return c.map(function(e){var s=i.extend({bind:r.bind,traceData:{hookType:t,context:e}},o.baseHookOptions,n),u=s.stateHook?e.state:null,c=new a.TransitionHook(o.transition,u,r,s);return{hook:r,node:e,transitionHook:c}})};return u.map(c).reduce(i.unnestR,[]).sort(r).map(function(t){return t.transitionHook})},t.prototype._matchingHooks=function(t,e){return[this.transition,this.$transitions].map(function(e){return e.getHooks(t)}).filter(i.assertPredicate(o.isArray,"broken event named: "+t)).reduce(i.unnestR,[]).filter(function(t){return t.matches(e)})},t}();e.HookBuilder=u},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(12),a=r(6),s=r(18),u=r(19),c=r(20),f=r(9),l=s.resolvePolicies.when,p=[l.EAGER,l.LAZY],h=[l.EAGER];e.NATIVE_INJECTOR_TOKEN="Native Injector";var v=function(){function t(t){this._path=t}return t.prototype.getTokens=function(){return this._path.reduce(function(t,e){return t.concat(e.resolvables.map(function(t){return t.token}))},[]).reduce(n.uniqR,[])},t.prototype.getResolvable=function(t){var e=this._path.map(function(t){return t.resolvables}).reduce(n.unnestR,[]).filter(function(e){return e.token===t});return n.tail(e)},t.prototype.subContext=function(e){return new t(c.PathFactory.subPath(this._path,function(t){return t.state===e}))},t.prototype.addResolvables=function(t,e){var r=n.find(this._path,i.propEq("state",e)),o=t.map(function(t){return t.token});r.resolvables=r.resolvables.filter(function(t){return o.indexOf(t.token)===-1}).concat(t)},t.prototype.resolvePath=function(t,e){var r=this;void 0===t&&(t="LAZY");var i=n.inArray(p,t)?t:"LAZY",u=i===s.resolvePolicies.when.EAGER?h:p;o.trace.traceResolvePath(this._path,t,e);var c=this._path.reduce(function(t,i){var o=function(t){return n.inArray(u,t.getPolicy(i.state).when)},a=i.resolvables.filter(o),s=r.subContext(i.state),c=function(t){return t.get(s,e).then(function(e){return{token:t.token,value:e}})};return t.concat(a.map(c))},[]);return a.services.$q.all(c)},t.prototype.injector=function(){
1817 9341 return this._injector||(this._injector=new d(this))},t.prototype.findNode=function(t){return n.find(this._path,function(e){return n.inArray(e.resolvables,t)})},t.prototype.getDependencies=function(t){var e=this,r=this.findNode(t),i=c.PathFactory.subPath(this._path,function(t){return t===r})||this._path,o=i.reduce(function(t,e){return t.concat(e.resolvables)},[]).filter(function(e){return e!==t}),a=function(t){var r=o.filter(function(e){return e.token===t});if(r.length)return n.tail(r);var i=e.injector().getNative(t);if(!i)throw new Error("Could not find Dependency Injection token: "+f.stringify(t));return new u.Resolvable(t,function(){return i},[],i)};return t.deps.map(a)},t}();e.ResolveContext=v;var d=function(){function t(t){this.context=t,this["native"]=this.get(e.NATIVE_INJECTOR_TOKEN)||a.services.$injector}return t.prototype.get=function(t){var e=this.context.getResolvable(t);if(e){if(!e.resolved)throw new Error("Resolvable async .get() not complete:"+f.stringify(e.token));return e.data}return this["native"]&&this["native"].get(t)},t.prototype.getAsync=function(t){var e=this.context.getResolvable(t);return e?e.get(this.context):a.services.$q.when(this["native"].get(t))},t.prototype.getNative=function(t){return this["native"].get(t)},t}()},function(t,e){"use strict";e.resolvePolicies={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT",RXWAIT:"RXWAIT"}}},function(t,e,r){"use strict";var n=r(3),i=r(6),o=r(12),a=r(9),s=r(4);e.defaultResolvePolicy={when:"LAZY",async:"WAIT"};var u=function(){function t(e,r,o,a,u){if(this.resolved=!1,this.promise=void 0,e instanceof t)n.extend(this,e);else if(s.isFunction(r)){if(null==e||void 0==e)throw new Error("new Resolvable(): token argument is required");if(!s.isFunction(r))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=e,this.policy=a,this.resolveFn=r,this.deps=o||[],this.data=u,this.resolved=void 0!==u,this.promise=this.resolved?i.services.$q.when(this.data):void 0}else if(s.isObject(e)&&e.token&&s.isFunction(e.resolveFn)){var c=e;return new t(c.token,c.resolveFn,c.deps,c.policy,c.data)}}return t.prototype.getPolicy=function(t){var r=this.policy||{},n=t&&t.resolvePolicy||{};return{when:r.when||n.when||e.defaultResolvePolicy.when,async:r.async||n.async||e.defaultResolvePolicy.async}},t.prototype.resolve=function(t,e){var r=this,a=i.services.$q,s=function(){return a.all(t.getDependencies(r).map(function(r){return r.get(t,e)}))},u=function(t){return r.resolveFn.apply(null,t)},c=function(t){var e=t.cache(1);return e.take(1).toPromise().then(function(){return e})},f=t.findNode(this),l=f&&f.state,p="RXWAIT"===this.getPolicy(l).async?c:n.identity,h=function(t){return r.data=t,r.resolved=!0,o.trace.traceResolvableResolved(r,e),r.data};return this.promise=a.when().then(s).then(u).then(p).then(h)},t.prototype.get=function(t,e){return this.promise||this.resolve(t,e)},t.prototype.toString=function(){return"Resolvable(token: "+a.stringify(this.token)+", requires: ["+this.deps.map(a.stringify)+"])"},t.prototype.clone=function(){return new t(this)},t.fromData=function(e,r){return new t(e,function(){return r},null,null,r)},t}();e.Resolvable=u},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(14),a=r(21),s=function(){function t(){}return t.makeTargetState=function(t){var e=n.tail(t).state;return new o.TargetState(e,e,t.map(i.prop("paramValues")).reduce(n.mergeR,{}))},t.buildPath=function(t){var e=t.params();return t.$state().path.map(function(t){return new a.PathNode(t).applyRawParams(e)})},t.buildToPath=function(e,r){var n=t.buildPath(r);return r.options().inherit?t.inheritParams(e,n,Object.keys(r.params())):n},t.applyViewConfigs=function(e,r,i){r.filter(function(t){return n.inArray(i,t.state)}).forEach(function(i){var o=n.values(i.state.views||{}),a=t.subPath(r,function(t){return t===i}),s=o.map(function(t){return e.createViewConfig(a,t)});i.views=s.reduce(n.unnestR,[])})},t.inheritParams=function(t,e,r){function o(t,e){var r=n.find(t,i.propEq("state",e));return n.extend({},r&&r.paramValues)}function s(e){var i=n.extend({},e&&e.paramValues),s=n.pick(i,r);i=n.omit(i,r);var u=o(t,e.state)||{},c=n.extend(i,u,s);return new a.PathNode(e.state).applyRawParams(c)}return void 0===r&&(r=[]),e.map(s)},t.treeChanges=function(t,e,r){function n(t,r){var n=a.PathNode.clone(t);return n.paramValues=e[r].paramValues,n}for(var o=0,s=Math.min(t.length,e.length),u=function(t){return t.parameters({inherit:!1}).filter(i.not(i.prop("dynamic"))).map(i.prop("id"))},c=function(t,e){return t.equals(e,u(t.state))};o<s&&t[o].state!==r&&c(t[o],e[o]);)o++;var f,l,p,h,v;f=t,l=f.slice(0,o),p=f.slice(o);var d=l.map(n);return h=e.slice(o),v=d.concat(h),{from:f,to:v,retained:l,exiting:p,entering:h}},t.subPath=function(t,e){var r=n.find(t,e),i=t.indexOf(r);return i===-1?void 0:t.slice(0,i+1)},t.paramValues=function(t){return t.reduce(function(t,e){return n.extend(t,e.paramValues)},{})},t}();e.PathFactory=s},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(22),a=function(){function t(e){if(e instanceof t){var r=e;this.state=r.state,this.paramSchema=r.paramSchema.slice(),this.paramValues=n.extend({},r.paramValues),this.resolvables=r.resolvables.slice(),this.views=r.views&&r.views.slice()}else{var i=e;this.state=i,this.paramSchema=i.parameters({inherit:!1}),this.paramValues={},this.resolvables=i.resolvables.map(function(t){return t.clone()})}}return t.prototype.applyRawParams=function(t){var e=function(e){return[e.id,e.value(t[e.id])]};return this.paramValues=this.paramSchema.reduce(function(t,r){return n.applyPairs(t,e(r))},{}),this},t.prototype.parameter=function(t){return n.find(this.paramSchema,i.propEq("id",t))},t.prototype.equals=function(t,e){var r=this;void 0===e&&(e=this.paramSchema.map(function(t){return t.id}));var i=function(e){return r.parameter(e).type.equals(r.paramValues[e],t.paramValues[e])};return this.state===t.state&&e.map(i).reduce(n.allTrueR,!0)},t.clone=function(e){return new t(e)},t.matching=function(t,e,r){void 0===r&&(r=!0);for(var n=[],i=0;i<t.length&&i<e.length;i++){var a=t[i],s=e[i];if(a.state!==s.state)break;var u=o.Param.changed(a.paramSchema,a.paramValues,s.paramValues).filter(function(t){return!(r&&t.dynamic)});if(u.length)break;n.push(a)}return n},t}();e.PathNode=a},function(t,e,r){"use strict";function n(t){return t=v(t)&&{value:t}||t,s.extend(t,{$$fn:c.isInjectable(t.value)?t.value:function(){return t.value}})}function i(t,e,r,n,i){if(t.type&&e&&"string"!==e.name)throw new Error("Param '"+n+"' has two type configurations.");return t.type&&e&&"string"===e.name&&i.type(t.type)?i.type(t.type):e?e:t.type?t.type instanceof p.ParamType?t.type:i.type(t.type):r===d.CONFIG?i.type("any"):i.type("string")}function o(t,e){var r=t.squash;if(!e||r===!1)return!1;if(!c.isDefined(r)||null==r)return l.matcherConfig.defaultSquashPolicy();if(r===!0||c.isString(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}function a(t,e,r,n){var i,o,a=[{from:"",to:r||e?void 0:""},{from:null,to:r||e?void 0:""}];return i=c.isArray(t.replace)?t.replace:[],c.isString(n)&&i.push({from:n,to:void 0}),o=s.map(i,u.prop("from")),s.filter(a,function(t){return o.indexOf(t.from)===-1}).concat(i)}var s=r(3),u=r(5),c=r(4),f=r(6),l=r(23),p=r(24),h=Object.prototype.hasOwnProperty,v=function(t){return 0===["value","type","squash","array","dynamic"].filter(h.bind(t||{})).length};!function(t){t[t.PATH=0]="PATH",t[t.SEARCH=1]="SEARCH",t[t.CONFIG=2]="CONFIG"}(e.DefType||(e.DefType={}));var d=e.DefType,m=function(){function t(t,e,r,u,f){function l(){var e={array:u===d.SEARCH&&"auto"},n=t.match(/\[\]$/)?{array:!0}:{};return s.extend(e,n,r).array}r=n(r),e=i(r,e,u,t,f);var p=l();e=p?e.$asArray(p,u===d.SEARCH):e;var h=void 0!==r.value,v=c.isDefined(r.dynamic)?!!r.dynamic:!!e.dynamic,m=o(r,h),g=a(r,p,h,m);s.extend(this,{id:t,type:e,location:u,squash:m,replace:g,isOptional:h,dynamic:v,config:r,array:p})}return t.prototype.isDefaultValue=function(t){return this.isOptional&&this.type.equals(this.value(),t)},t.prototype.value=function(t){var e=this,r=function(){if(!f.services.$injector)throw new Error("Injectable functions cannot be called at configuration time");var t=f.services.$injector.invoke(e.config.$$fn);if(null!==t&&void 0!==t&&!e.type.is(t))throw new Error("Default value ("+t+") for parameter '"+e.id+"' is not an instance of ParamType ("+e.type.name+")");return t},n=function(t){var r=s.map(s.filter(e.replace,u.propEq("from",t)),u.prop("to"));return r.length?r[0]:t};return t=n(t),c.isDefined(t)?this.type.$normalize(t):r()},t.prototype.isSearch=function(){return this.location===d.SEARCH},t.prototype.validates=function(t){if((!c.isDefined(t)||null===t)&&this.isOptional)return!0;var e=this.type.$normalize(t);if(!this.type.is(e))return!1;var r=this.type.encode(e);return!(c.isString(r)&&!this.type.pattern.exec(r))},t.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},t.fromConfig=function(e,r,n,i){return new t(e,r,n,d.CONFIG,i)},t.fromPath=function(e,r,n,i){return new t(e,r,n,d.PATH,i)},t.fromSearch=function(e,r,n,i){return new t(e,r,n,d.SEARCH,i)},t.values=function(t,e){return void 0===e&&(e={}),t.map(function(t){return[t.id,t.value(e[t.id])]}).reduce(s.applyPairs,{})},t.changed=function(t,e,r){return void 0===e&&(e={}),void 0===r&&(r={}),t.filter(function(t){return!t.type.equals(e[t.id],r[t.id])})},t.equals=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),0===t.changed(e,r,n).length},t.validates=function(t,e){return void 0===e&&(e={}),t.map(function(t){return t.validates(e[t.id])}).reduce(s.allTrueR,!0)},t}();e.Param=m},function(t,e,r){"use strict";var n=r(4),i=function(){function t(){this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1}return t.prototype.caseInsensitive=function(t){return this._isCaseInsensitive=n.isDefined(t)?t:this._isCaseInsensitive},t.prototype.strictMode=function(t){return this._isStrictMode=n.isDefined(t)?t:this._isStrictMode},t.prototype.defaultSquashPolicy=function(t){if(n.isDefined(t)&&t!==!0&&t!==!1&&!n.isString(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=n.isDefined(t)?t:this._defaultSquashPolicy},t}();e.MatcherConfig=i,e.matcherConfig=new i},function(t,e,r){"use strict";function n(t,e){function r(t){return o.isArray(t)?t:o.isDefined(t)?[t]:[]}function n(t){switch(t.length){case 0:return;case 1:return"auto"===e?t[0]:t;default:return t}}function a(t,e){return function(a){if(o.isArray(a)&&0===a.length)return a;var s=r(a),u=i.map(s,t);return e===!0?0===i.filter(u,function(t){return!t}).length:n(u)}}function s(t){return function(e,n){var i=r(e),o=r(n);if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(!t(i[a],o[a]))return!1;return!0}}var u=this;["encode","decode","equals","$normalize"].forEach(function(e){var r=t[e].bind(t),n="equals"===e?s:a;u[e]=n(r)}),i.extend(this,{dynamic:t.dynamic,name:t.name,pattern:t.pattern,is:a(t.is.bind(t),!0),$arrayMode:e})}var i=r(3),o=r(4),a=function(){function t(t){this.pattern=/.*/,i.extend(this,t)}return t.prototype.is=function(t,e){return!0},t.prototype.encode=function(t,e){return t},t.prototype.decode=function(t,e){return t},t.prototype.equals=function(t,e){return t==e},t.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},t.prototype.toString=function(){return"{ParamType:"+this.name+"}"},t.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},t.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new n(this,t)},t}();e.ParamType=a},function(t,e,r){"use strict";var n=r(26),i=r(29),o=r(29),a=r(30),s=r(37),u=r(38),c=r(43),f=r(44),l=function(){function t(){this.viewService=new s.ViewService,this.transitionService=new a.TransitionService(this),this.globals=new f.Globals(this.transitionService),this.urlMatcherFactory=new n.UrlMatcherFactory,this.urlRouterProvider=new i.UrlRouterProvider(this.urlMatcherFactory,this.globals.params),this.urlRouter=new o.UrlRouter(this.urlRouterProvider),this.stateRegistry=new u.StateRegistry(this.urlMatcherFactory,this.urlRouterProvider),this.stateService=new c.StateService(this),this.viewService.rootContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self}return t}();e.UIRouter=l},function(t,e,r){"use strict";function n(){return{strict:s.matcherConfig.strictMode(),caseInsensitive:s.matcherConfig.caseInsensitive()}}var i=r(3),o=r(4),a=r(27),s=r(23),u=r(22),c=r(28),f=function(){function t(){this.paramTypes=new c.ParamTypes,i.extend(this,{UrlMatcher:a.UrlMatcher,Param:u.Param})}return t.prototype.caseInsensitive=function(t){return s.matcherConfig.caseInsensitive(t)},t.prototype.strictMode=function(t){return s.matcherConfig.strictMode(t)},t.prototype.defaultSquashPolicy=function(t){return s.matcherConfig.defaultSquashPolicy(t)},t.prototype.compile=function(t,e){return new a.UrlMatcher(t,this.paramTypes,i.extend(n(),e))},t.prototype.isMatcher=function(t){if(!o.isObject(t))return!1;var e=!0;return i.forEach(a.UrlMatcher.prototype,function(r,n){o.isFunction(r)&&(e=e&&o.isDefined(t[n])&&o.isFunction(t[n]))}),e},t.prototype.type=function(t,e,r){var n=this.paramTypes.type(t,e,r);return o.isDefined(e)?this:n},t.prototype.$get=function(){return this.paramTypes.enqueue=!1,this.paramTypes._flushTypeQueue(),this},t}();e.UrlMatcherFactory=f},function(t,e,r){"use strict";function n(t,e){var r=["",""],n=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return n;switch(e.squash){case!1:r=["(",")"+(e.isOptional?"?":"")];break;case!0:n=n.replace(/\/$/,""),r=["(?:/(",")|/)?"];break;default:r=["("+e.squash+"|",")?"]}return n+r[0]+e.type.pattern.source+r[1]}var i=r(3),o=r(5),a=r(4),s=r(22),u=r(4),c=r(22),f=r(3),l=r(3),p=function(t,e,r){return t[e]=t[e]||r()},h=function(){function t(e,r,a){var u=this;this.config=a,this._cache={path:[],pattern:null},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.pattern=e,this.config=i.defaults(this.config,{params:{},strict:!0,caseInsensitive:!1,paramMap:i.identity});for(var c,f,l,p=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,h=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,v=0,d=[],m=function(r){if(!t.nameValidator.test(r))throw new Error("Invalid parameter name '"+r+"' in pattern '"+e+"'");if(i.find(u._params,o.propEq("id",r)))throw new Error("Duplicate parameter name '"+r+"' in pattern '"+e+"'")},g=function(t,n){var o=t[2]||t[3],a=n?t[4]:t[4]||("*"===t[1]?".*":null);return{id:o,regexp:a,cfg:u.config.params[o],segment:e.substring(v,t.index),type:a?r.type(a||"string")||i.inherit(r.type("string"),{pattern:new RegExp(a,u.config.caseInsensitive?"i":void 0)}):null}};(c=p.exec(e))&&(f=g(c,!1),!(f.segment.indexOf("?")>=0));)m(f.id),this._params.push(s.Param.fromPath(f.id,f.type,this.config.paramMap(f.cfg,!1),r)),this._segments.push(f.segment),d.push([f.segment,i.tail(this._params)]),v=p.lastIndex;l=e.substring(v);var y=l.indexOf("?");if(y>=0){var w=l.substring(y);if(l=l.substring(0,y),w.length>0)for(v=0;c=h.exec(w);)f=g(c,!0),m(f.id),this._params.push(s.Param.fromSearch(f.id,f.type,this.config.paramMap(f.cfg,!0),r)),v=p.lastIndex}this._segments.push(l),i.extend(this,{_compiled:d.map(function(t){return n.apply(null,t)}).concat(n(l)),prefix:this._segments[0]}),Object.freeze(this)}return t.prototype.append=function(t){return this._children.push(t),i.forEach(t._cache,function(e,r){return t._cache[r]=a.isArray(e)?[]:null}),t._cache.path=this._cache.path.concat(this),t},t.prototype.isRoot=function(){return 0===this._cache.path.length},t.prototype.toString=function(){return this.pattern},t.prototype.exec=function(t,e,r,n){function a(t){var e=function(t){return t.split("").reverse().join("")},r=function(t){return t.replace(/\\-/g,"-")},n=e(t).split(/-(?!\\)/),o=i.map(n,e);return i.map(o,r).reverse()}var s=this;void 0===e&&(e={}),void 0===n&&(n={});var c=p(this._cache,"pattern",function(){return new RegExp(["^",i.unnest(s._cache.path.concat(s).map(o.prop("_compiled"))).join(""),s.config.strict===!1?"/?":"","$"].join(""),s.config.caseInsensitive?"i":void 0)}).exec(t);if(!c)return null;var f=this.parameters(),l=f.filter(function(t){return!t.isSearch()}),h=f.filter(function(t){return t.isSearch()}),v=this._cache.path.concat(this).map(function(t){return t._segments.length-1}).reduce(function(t,e){return t+e}),d={};if(v!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(var m=0;m<v;m++){for(var g=l[m],y=c[m+1],w=0;w<g.replace.length;w++)g.replace[w].from===y&&(y=g.replace[w].to);y&&g.array===!0&&(y=a(y)),u.isDefined(y)&&(y=g.type.decode(y)),d[g.id]=g.value(y)}return h.forEach(function(t){for(var r=e[t.id],n=0;n<t.replace.length;n++)t.replace[n].from===r&&(r=t.replace[n].to);u.isDefined(r)&&(r=t.type.decode(r)),d[t.id]=t.value(r)}),r&&(d["#"]=r),d},t.prototype.parameters=function(t){return void 0===t&&(t={}),t.inherit===!1?this._params:i.unnest(this._cache.path.concat(this).map(o.prop("_params")))},t.prototype.parameter=function(t,e){void 0===e&&(e={});var r=i.tail(this._cache.path);return i.find(this._params,o.propEq("id",t))||e.inherit!==!1&&r&&r.parameter(t)||null},t.prototype.validates=function(t){var e=this,r=function(t,e){return!t||t.validates(e)};return i.pairs(t||{}).map(function(t){var n=t[0],i=t[1];return r(e.parameter(n),i)}).reduce(i.allTrueR,!0)},t.prototype.format=function(e){function r(t){var r=t.value(e[t.id]),n=t.isDefaultValue(r),i=!!n&&t.squash,o=t.type.encode(r);return{param:t,value:r,isDefaultValue:n,squash:i,encoded:o}}if(void 0===e&&(e={}),!this.validates(e))return null;var n=this._cache.path.slice().concat(this),o=n.map(t.pathSegmentsAndParams).reduce(f.unnestR,[]),s=n.map(t.queryParams).reduce(f.unnestR,[]),u=o.reduce(function(e,n){if(a.isString(n))return e+n;var o=r(n),s=o.squash,u=o.encoded,c=o.param;return s===!0?e.match(/\/$/)?e.slice(0,-1):e:a.isString(s)?e+s:s!==!1?e:null==u?e:a.isArray(u)?e+i.map(u,t.encodeDashes).join("-"):c.type.raw?e+u:e+encodeURIComponent(u)},""),c=s.map(function(t){var e=r(t),n=e.squash,o=e.encoded,s=e.isDefaultValue;if(!(null==o||s&&n!==!1)&&(a.isArray(o)||(o=[o]),0!==o.length))return t.type.raw||(o=i.map(o,encodeURIComponent)),o.map(function(e){return t.id+"="+e})}).filter(i.identity).reduce(f.unnestR,[]).join("&");return u+(c?"?"+c:"")+(e["#"]?"#"+e["#"]:"")},t.encodeDashes=function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})},t.pathSegmentsAndParams=function(t){var e=t._segments,r=t._params.filter(function(t){return t.location===c.DefType.PATH});return l.arrayTuples(e,r.concat(void 0)).reduce(f.unnestR,[]).filter(function(t){return""!==t&&u.isDefined(t)})},t.queryParams=function(t){return t._params.filter(function(t){return t.location===c.DefType.SEARCH})},t.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,t}();e.UrlMatcher=h},function(t,e,r){"use strict";function n(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t}function i(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}var o=r(3),a=r(4),s=r(5),u=r(6),c=r(24),f=function(){function t(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes={hash:{encode:n,decode:i,is:s.is(String),pattern:/.*/,equals:function(t,e){return t==e}},string:{encode:n,decode:i,is:s.is(String),pattern:/[^\/]*/},"int":{encode:n,decode:function(t){return parseInt(t,10)},is:function(t){return a.isDefined(t)&&this.decode(t.toString())===t},pattern:/-?\d+/},bool:{encode:function(t){return t&&1||0},decode:function(t){return 0!==parseInt(t,10)},is:s.is(Boolean),pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):void 0},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):void 0},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return["getFullYear","getMonth","getDate"].reduce(function(r,n){return r&&t[n]()===e[n]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:o.toJson,decode:o.fromJson,is:s.is(Object),equals:o.equals,pattern:/[^\/]*/},any:{encode:o.identity,decode:o.identity,equals:o.equals,pattern:/.*/}};var t=function(t,e){return new c.ParamType(o.extend({name:e},t))};this.types=o.inherit(o.map(this.defaultTypes,t),{})}return t.prototype.type=function(t,e,r){if(!a.isDefined(e))return this.types[t];if(this.types.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return this.types[t]=new c.ParamType(o.extend({name:t},e)),r&&(this.typeQueue.push({name:t,def:r}),this.enqueue||this._flushTypeQueue()),this},t.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var t=this.typeQueue.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");o.extend(this.types[t.name],u.services.$injector.invoke(t.def))}},t}();e.ParamTypes=f},function(t,e,r){"use strict";function n(t){var e=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=e?e[1].replace(/\\(.)/g,"$1"):""}function i(t,e){return t.replace(/\$(\$|\d{1,2})/,function(t,r){return e["$"===r?0:Number(r)]})}function o(t,e,r,n){if(!n)return!1;var i=t.invoke(r,r,{$match:n,$stateParams:e});return!c.isDefined(i)||i}function a(t,e,r){var n=f.services.locationConfig.baseHref();return"/"===n?t:e?n.slice(0,-1)+t:r?n.slice(1)+t:t}function s(t,e,r){function n(t){var e=t(f.services.$injector,l);return!!e&&(c.isString(e)&&l.setUrl(e,!0),!0)}if(!r||!r.defaultPrevented){for(var i=t.length,o=0;o<i;o++)if(n(t[o]))return;e&&n(e)}}var u=r(3),c=r(4),f=r(6),l=f.services.location,p=function(){function t(t,e){this.rules=[],this.interceptDeferred=!1,this.$urlMatcherFactory=t,this.$stateParams=e}return t.prototype.rule=function(t){if(!c.isFunction(t))throw new Error("'rule' must be a function");return this.rules.push(t),this},t.prototype.removeRule=function(t){return this.rules.length!==u.removeFrom(this.rules,t).length},t.prototype.otherwise=function(t){if(!c.isFunction(t)&&!c.isString(t))throw new Error("'rule' must be a string or function");return this.otherwiseFn=c.isString(t)?function(){return t}:t,this},t.prototype.when=function(t,e,r){void 0===r&&(r=function(t){});var a,s=this,p=s.$urlMatcherFactory,h=s.$stateParams,v=c.isString(e);if(c.isString(t)&&(t=p.compile(t)),!v&&!c.isFunction(e)&&!c.isArray(e))throw new Error("invalid 'handler' in when()");var d={matcher:function(t,e){return v&&(a=p.compile(e),e=["$match",a.format.bind(a)]),u.extend(function(){return o(f.services.$injector,h,e,t.exec(l.path(),l.search(),l.hash()))},{prefix:c.isString(t.prefix)?t.prefix:""})},regex:function(t,e){if(t.global||t.sticky)throw new Error("when() RegExp must not be global or sticky");return v&&(a=e,e=["$match",function(t){return i(a,t)}]),u.extend(function(){return o(f.services.$injector,h,e,t.exec(l.path()))},{prefix:n(t)})}},m={matcher:p.isMatcher(t),regex:t instanceof RegExp};for(var g in m)if(m[g]){var y=d[g](t,e);return r(y),this.rule(y)}throw new Error("invalid 'what' in when()")},t.prototype.deferIntercept=function(t){void 0===t&&(t=!0),this.interceptDeferred=t},t}();e.UrlRouterProvider=p;var h=function(){function t(e){this.urlRouterProvider=e,u.bindFunctions(t.prototype,this,this)}return t.prototype.sync=function(){s(this.urlRouterProvider.rules,this.urlRouterProvider.otherwiseFn)},t.prototype.listen=function(){var t=this;return this.listener=this.listener||l.onChange(function(e){return s(t.urlRouterProvider.rules,t.urlRouterProvider.otherwiseFn,e)})},t.prototype.update=function(t){return t?void(this.location=l.path()):void(l.path()!==this.location&&l.setUrl(this.location,!0))},t.prototype.push=function(t,e,r){var n=r&&!!r.replace;l.setUrl(t.format(e||{}),n)},t.prototype.href=function(t,e,r){if(!t.validates(e))return null;var n=t.format(e);r=r||{absolute:!1};var i=f.services.locationConfig,o=i.html5Mode();if(o||null===n||(n="#"+i.hashPrefix()+n),n=a(n,o,r.absolute),!r.absolute||!n)return n;var s=!o&&n?"/":"",u=i.port();return u=80===u||443===u?"":":"+u,[i.protocol(),"://",i.host(),u,s,n].join("")},t}();e.UrlRouter=h},function(t,e,r){"use strict";var n=r(11),i=r(15),o=r(31),a=r(32),s=r(33),u=r(34),c=r(35),f=r(36);e.defaultTransOpts={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"};var l=function(){function t(t){this._router=t,this.$view=t.viewService,i.HookRegistry.mixin(new i.HookRegistry,this),this._deregisterHookFns={},this.registerTransitionHooks()}return t.prototype.registerTransitionHooks=function(){var t=this._deregisterHookFns;t.redirectTo=u.registerRedirectToHook(this),t.onExit=c.registerOnExitHook(this),t.onRetain=c.registerOnRetainHook(this),t.onEnter=c.registerOnEnterHook(this),t.eagerResolve=o.registerEagerResolvePath(this),t.lazyResolve=o.registerLazyResolveState(this),t.loadViews=a.registerLoadEnteringViews(this),t.activateViews=a.registerActivateViews(this),t.updateUrl=s.registerUpdateUrl(this),t.lazyLoad=f.registerLazyLoadHook(this)},t.prototype.onBefore=function(t,e,r){throw""},t.prototype.onStart=function(t,e,r){throw""},t.prototype.onExit=function(t,e,r){throw""},t.prototype.onRetain=function(t,e,r){throw""},t.prototype.onEnter=function(t,e,r){throw""},t.prototype.onFinish=function(t,e,r){throw""},t.prototype.onSuccess=function(t,e,r){throw""},t.prototype.onError=function(t,e,r){throw""},t.prototype.create=function(t,e){return new n.Transition(t,e,this._router)},t}();e.TransitionService=l},function(t,e,r){"use strict";var n=r(3),i=r(17),o=r(5),a=function(t){return new i.ResolveContext(t.treeChanges().to).resolvePath("EAGER",t).then(n.noop)};e.registerEagerResolvePath=function(t){return t.onStart({},a,{priority:1e3})};var s=function(t,e){return new i.ResolveContext(t.treeChanges().to).subContext(e).resolvePath("LAZY",t).then(n.noop)};e.registerLazyResolveState=function(t){return t.onEnter({entering:o.val(!0)},s,{priority:1e3})}},function(t,e,r){"use strict";var n=r(3),i=r(6),o=function(t){var e=t.views("entering");if(e.length)return i.services.$q.all(e.map(function(t){return t.load()})).then(n.noop)};e.registerLoadEnteringViews=function(t){return t.onStart({},o)};var a=function(t){var e=t.views("entering"),r=t.views("exiting");if(e.length||r.length){var n=t.router.viewService;r.forEach(function(t){return n.deactivateViewConfig(t)}),e.forEach(function(t){return n.activateViewConfig(t)}),n.sync()}};e.registerActivateViews=function(t){return t.onSuccess({},a)}},function(t,e){"use strict";var r=function(t){var e=t.options(),r=t.router.stateService,n=t.router.urlRouter;if("url"!==e.source&&e.location&&r.$current.navigable){var i={replace:"replace"===e.location};n.push(r.$current.navigable.url,r.params,i)}n.update(!0)};e.registerUpdateUrl=function(t){return t.onSuccess({},r,{priority:9999})}},function(t,e,r){"use strict";var n=r(4),i=r(6),o=r(14),a=function(t){function e(e){var r=t.router.stateService;return e instanceof o.TargetState?e:n.isString(e)?r.target(e,t.params(),t.options()):e.state||e.params?r.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}var r=t.to().redirectTo;if(r)return n.isFunction(r)?i.services.$q.when(r(t)).then(e):e(r)};e.registerRedirectToHook=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},a)}},function(t,e){"use strict";function r(t){return function(e,r){var n=r[t];return n(e,r)}}var n=r("onExit");e.registerOnExitHook=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},n)};var i=r("onRetain");e.registerOnRetainHook=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},i)};var o=r("onEnter");e.registerOnEnterHook=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},o)}},function(t,e,r){"use strict";var n=r(6),i=function(t){function e(){if("url"===t.options().source){var e=n.services.location,r=e.path(),i=e.search(),a=e.hash(),s=function(t){return[t,t.url&&t.url.exec(r,i,a)]},u=o.get().map(function(t){return t.$$state()}).map(s).filter(function(t){var e=(t[0],t[1]);return!!e});if(u.length){var c=u[0],f=c[0],l=c[1];return t.router.stateService.target(f,l,t.options())}t.router.urlRouter.sync()}var p=t.targetState();return t.router.stateService.target(p.identifier(),p.params(),p.options())}function r(e){o.deregister(t.$to()),e&&Array.isArray(e.states)&&e.states.forEach(function(t){return o.register(t)})}var i=t.to(),o=t.router.stateRegistry,a=i.lazyLoad,s=a._promise;if(!s){s=a._promise=a(t).then(r);var u=function(){return delete a._promise};s.then(u,u)}return s.then(e)};e.registerLazyLoadHook=function(t){return t.onBefore({to:function(t){return!!t.lazyLoad}},i)}},function(t,e,r){"use strict";var n=r(3),i=r(5),o=r(4),a=r(12),s=function(){function t(){var t=this;this.uiViews=[],this.viewConfigs=[],this._viewConfigFactories={},this.sync=function(){function e(t){return t.fqn.split(".").length}function r(t){for(var e=t.viewDecl.$context,r=0;++r&&e.parent;)e=e.parent;return r}var o=t.uiViews.map(function(t){return[t.fqn,t]}).reduce(n.applyPairs,{}),a=function(t){return function(e){if(t.$type!==e.viewDecl.$type)return!1;var r=e.viewDecl,i=r.$uiViewName.split("."),a=t.fqn.split(".");if(!n.equals(i,a.slice(0-i.length)))return!1;var s=1-i.length||void 0,u=a.slice(0,s).join("."),c=o[u].creationContext;return r.$uiViewContextAnchor===(c&&c.name)}},s=i.curry(function(t,e,r,n){return e*(t(r)-t(n))}),u=function(e){var n=t.viewConfigs.filter(a(e));return n.length>1&&n.sort(s(r,-1)),[e,n[0]]},c=function(e){var r=e[0],n=e[1];t.uiViews.indexOf(r)!==-1&&r.configUpdated(n)};t.uiViews.sort(s(e,1)).map(u).forEach(c)}}return t.prototype.rootContext=function(t){return this._rootContext=t||this._rootContext},t.prototype.viewConfigFactory=function(t,e){this._viewConfigFactories[t]=e},t.prototype.createViewConfig=function(t,e){var r=this._viewConfigFactories[e.$type];if(!r)throw new Error("ViewService: No view config factory registered for type "+e.$type);var n=r(t,e);return o.isArray(n)?n:[n]},t.prototype.deactivateViewConfig=function(t){a.trace.traceViewServiceEvent("<- Removing",t),n.removeFrom(this.viewConfigs,t)},t.prototype.activateViewConfig=function(t){a.trace.traceViewServiceEvent("-> Registering",t),this.viewConfigs.push(t)},t.prototype.registerUIView=function(t){a.trace.traceViewServiceUIViewEvent("-> Registering",t);var e=this.uiViews,r=function(e){return e.fqn===t.fqn};return e.filter(r).length&&a.trace.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){var r=e.indexOf(t);return r===-1?void a.trace.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t):(a.trace.traceViewServiceUIViewEvent("<- Deregistering",t),void n.removeFrom(e)(t))}},t.prototype.available=function(){return this.uiViews.map(i.prop("fqn"))},t.prototype.active=function(){return this.uiViews.filter(i.prop("$config")).map(i.prop("name"))},t.normalizeUIViewTarget=function(t,e){void 0===e&&(e="");var r=e.split("@"),n=r[0]||"$default",i=o.isString(r[1])?r[1]:"^",a=/^(\^(?:\.\^)*)\.(.*$)/.exec(n);a&&(i=a[1],n=a[2]),"!"===n.charAt(0)&&(n=n.substr(1),i="");var s=/^(\^(?:\.\^)*)$/;if(s.exec(i)){var u=i.split(".").reduce(function(t,e){return t.parent},t);i=u.name}return{uiViewName:n,uiViewContextAnchor:i}},t}();e.ViewService=s},function(t,e,r){"use strict";var n=r(39),i=r(40),o=r(41),a=r(3),s=function(){function t(t,e){this.urlRouterProvider=e,this.states={},this.listeners=[],this.matcher=new n.StateMatcher(this.states),this.builder=new i.StateBuilder(this.matcher,t),this.stateQueue=new o.StateQueueManager(this.states,this.builder,e,this.listeners);
1818 9342 var r={name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},"abstract":!0},a=this._root=this.stateQueue.register(r);a.navigable=null}return t.prototype.onStatesChanged=function(t){return this.listeners.push(t),function(){a.removeFrom(this.listeners)(t)}.bind(this)},t.prototype.root=function(){return this._root},t.prototype.register=function(t){return this.stateQueue.register(t)},t.prototype._deregisterTree=function(t){var e=this,r=this.get().map(function(t){return t.$$state()}),n=function(t){var e=r.filter(function(e){return t.indexOf(e.parent)!==-1});return 0===e.length?e:e.concat(n(e))},i=n([t]),o=[t].concat(i).reverse();return o.forEach(function(t){e.urlRouterProvider.removeRule(t._urlRule),delete e.states[t.name]}),o},t.prototype.deregister=function(t){var e=this.get(t);if(!e)throw new Error("Can't deregister state; not found: "+t);var r=this._deregisterTree(e.$$state());return this.listeners.forEach(function(t){return t("deregistered",r.map(function(t){return t.self}))}),r},t.prototype.get=function(t,e){var r=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return r.states[t].self});var n=this.matcher.find(t,e);return n&&n.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}();e.StateRegistry=s},function(t,e,r){"use strict";var n=r(4),i=r(7),o=r(3),a=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return t=t||"",0===t.indexOf(".")||0===t.indexOf("^")},t.prototype.find=function(t,e){if(t||""===t){var r=n.isString(t),a=r?t:t.name;this.isRelative(a)&&(a=this.resolvePath(a,e));var s=this._states[a];if(s&&(r||!(r||s!==t&&s.self!==t)))return s;if(r){var u=o.values(this._states).filter(function(t){return new i.Glob(t.name).matches(a)});return u.length>1&&console.log("stateMatcher.find: Found multiple matches for "+a+" using glob: ",u.map(function(t){return t.name})),u[0]}}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var r=this.find(e),n=t.split("."),i=0,o=n.length,a=r;i<o;i++)if(""!==n[i]||0!==i){if("^"!==n[i])break;if(!a.parent)throw new Error("Path '"+t+"' not valid for state '"+r.name+"'");a=a.parent}else a=r;var s=n.slice(i).join(".");return a.name+(a.name&&s?".":"")+s},t}();e.StateMatcher=a},function(t,e,r){"use strict";function n(t){return t.lazyLoad&&(t.name=t.self.name+".**"),t.name}function i(t){return t.self.$$state=function(){return t},t.self}function o(t){return t.parent&&t.parent.data&&(t.data=t.self.data=c.inherit(t.parent.data,t.data)),t.data}function a(t){return t.parent?t.parent.path.concat(t):[t]}function s(t){var e=t.parent?c.extend({},t.parent.includes):{};return e[t.name]=!0,e}function u(t){var e=function(t,e){return Object.keys(t||{}).map(function(r){return{token:r,val:t[r],deps:void 0,policy:e[r]}})},r=function(t){return t.$inject||d.services.$injector.annotate(t,d.services.$injector.strictDi)},n=function(t){return!(!t.token||!t.resolveFn)},i=function(t){return!(!t.provide&&!t.token||!(t.useValue||t.useFactory||t.useExisting||t.useClass))},o=function(t){return!!(t&&t.val&&(f.isString(t.val)||f.isArray(t.val)||f.isFunction(t.val)))},a=function(t){return t.provide||t.token},s=p.pattern([[p.prop("resolveFn"),function(t){return new v.Resolvable(a(t),t.resolveFn,t.deps,t.policy)}],[p.prop("useFactory"),function(t){return new v.Resolvable(a(t),t.useFactory,t.deps||t.dependencies,t.policy)}],[p.prop("useClass"),function(t){return new v.Resolvable(a(t),function(){return new t.useClass},[],t.policy)}],[p.prop("useValue"),function(t){return new v.Resolvable(a(t),function(){return t.useValue},[],t.policy,t.useValue)}],[p.prop("useExisting"),function(t){return new v.Resolvable(a(t),c.identity,[t.useExisting],t.policy)}]]),u=p.pattern([[p.pipe(p.prop("val"),f.isString),function(t){return new v.Resolvable(t.token,c.identity,[t.val],t.policy)}],[p.pipe(p.prop("val"),f.isArray),function(t){return new v.Resolvable(t.token,c.tail(t.val),t.val.slice(0,-1),t.policy)}],[p.pipe(p.prop("val"),f.isFunction),function(t){return new v.Resolvable(t.token,t.val,r(t.val),t.policy)}]]),h=p.pattern([[p.is(v.Resolvable),function(t){return t}],[n,s],[i,s],[o,u],[p.val(!0),function(t){throw new Error("Invalid resolve value: "+l.stringify(t))}]]),m=t.resolve,g=f.isArray(m)?m:e(m,t.resolvePolicy||{});return g.map(h)}var c=r(3),f=r(4),l=r(9),p=r(5),h=r(22),v=r(19),d=r(6),m=function(t){if(!f.isString(t))return!1;var e="^"===t.charAt(0);return{val:e?t.substring(1):t,root:e}},g=function(t,e){return function(r){var n=r;n&&n.url&&n.lazyLoad&&(n.url+="{remainder:any}");var i=m(n.url),o=r.parent,a=i?t.compile(i.val,{params:r.params||{},paramMap:function(t,e){return n.reloadOnSearch===!1&&e&&(t=c.extend(t||{},{dynamic:!0})),t}}):n.url;if(!a)return null;if(!t.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+r+"'");return i&&i.root?a:(o&&o.navigable||e()).url.append(a)}},y=function(t){return function(e){return!t(e)&&e.url?e:e.parent?e.parent.navigable:null}},w=function(t){return function(e){var r=function(e,r){return h.Param.fromConfig(r,null,e,t)},n=e.url&&e.url.parameters({inherit:!1})||[],i=c.values(c.mapObj(c.omit(e.params||{},n.map(p.prop("id"))),r));return n.concat(i).map(function(t){return[t.id,t]}).reduce(c.applyPairs,{})}};e.resolvablesBuilder=u;var b=function(){function t(t,e){function r(e){return l(e)?null:t.find(c.parentName(e))||f()}this.matcher=t;var c=this,f=function(){return t.find("")},l=function(t){return""===t.name};this.builders={name:[n],self:[i],parent:[r],data:[o],url:[g(e,f)],navigable:[y(l)],params:[w(e.paramTypes)],views:[],path:[a],includes:[s],resolvables:[u]}}return t.prototype.builder=function(t,e){var r=this.builders,n=r[t]||[];return f.isString(t)&&!f.isDefined(e)?n.length>1?n:n[0]:f.isString(t)&&f.isFunction(e)?(r[t]=n,r[t].push(e),function(){return r[t].splice(r[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this,r=e.matcher,n=e.builders,i=this.parentName(t);if(i&&!r.find(i))return null;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o].reduce(function(t,e){return function(r){return e(r,t)}},c.noop);t[o]=a(t)}return t},t.prototype.parentName=function(t){var e=t.name||"",r=e.split(".");if(r.length>1){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");var n=r.pop();return"**"===n&&r.pop(),r.join(".")}return t.parent?f.isString(t.parent)?t.parent:t.parent.name:""},t.prototype.name=function(t){var e=t.name;if(e.indexOf(".")!==-1||!t.parent)return e;var r=f.isString(t.parent)?t.parent:t.parent.name;return r?r+"."+e:e},t}();e.StateBuilder=b},function(t,e,r){"use strict";var n=r(3),i=r(4),o=r(42),a=function(){function t(t,e,r,n){this.states=t,this.builder=e,this.$urlRouterProvider=r,this.listeners=n,this.queue=[]}return t.prototype.register=function(t){var e=this,r=e.states,a=e.queue,s=e.$state,u=n.inherit(new o.State,n.extend({},t,{self:t,resolve:t.resolve||[],toString:function(){return t.name}}));if(!i.isString(u.name))throw new Error("State must have a valid name");if(r.hasOwnProperty(u.name)||n.pluck(a,"name").indexOf(u.name)!==-1)throw new Error("State '"+u.name+"' is already defined");return a.push(u),this.$state&&this.flush(s),u},t.prototype.flush=function(t){for(var e=this,r=e.queue,n=e.states,i=e.builder,o=[],a=[],s={};r.length>0;){var u=r.shift(),c=i.build(u),f=a.indexOf(u);if(c){if(n.hasOwnProperty(u.name))throw new Error("State '"+name+"' is already defined");n[u.name]=u,this.attachRoute(t,u),f>=0&&a.splice(f,1),o.push(u)}else{var l=s[u.name];if(s[u.name]=r.length,f>=0&&l===r.length)return r.push(u),n;f<0&&a.push(u),r.push(u)}}return o.length&&this.listeners.forEach(function(t){return t("registered",o.map(function(t){return t.self}))}),n},t.prototype.autoFlush=function(t){this.$state=t,this.flush(t)},t.prototype.attachRoute=function(t,e){var r=this.$urlRouterProvider;!e["abstract"]&&e.url&&r.when(e.url,["$match","$stateParams",function(r,i){t.$current.navigable===e&&n.equalForKeys(r,i)||t.transitionTo(e,r,{inherit:!0,source:"url"})}],function(t){return e._urlRule=t})},t}();e.StateQueueManager=a},function(t,e,r){"use strict";var n=r(3),i=r(5),o=function(){function t(t){n.extend(this,t)}return t.prototype.is=function(t){return this===t||this.self===t||this.fqn()===t},t.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var t=this.parent.fqn();return t?t+"."+this.name:this.name},t.prototype.root=function(){return this.parent&&this.parent.root()||this},t.prototype.parameters=function(t){t=n.defaults(t,{inherit:!0});var e=t.inherit&&this.parent&&this.parent.parameters()||[];return e.concat(n.values(this.params))},t.prototype.parameter=function(t,e){return void 0===e&&(e={}),this.url&&this.url.parameter(t,e)||n.find(n.values(this.params),i.propEq("id",t))||e.inherit&&this.parent&&this.parent.parameter(t)},t.prototype.toString=function(){return this.fqn()},t}();e.State=o},function(t,e,r){"use strict";var n=r(3),i=r(4),o=r(8),a=r(6),s=r(20),u=r(21),c=r(30),f=r(10),l=r(14),p=r(22),h=r(7),v=r(3),d=r(3),m=r(17),g=function(){function t(e){this.router=e,this.invalidCallbacks=[],this._defaultErrorHandler=function(t){t instanceof Error&&t.stack?(console.error(t),console.error(t.stack)):t instanceof f.Rejection?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var r=["current","$current","params","transition"],n=Object.keys(t.prototype).filter(function(t){return r.indexOf(t)===-1});d.bindFunctions(t.prototype,this,this,n)}return Object.defineProperty(t.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),t.prototype._handleInvalidTargetState=function(t,e){function r(){var t=h.dequeue();if(void 0===t)return f.Rejection.invalid(e.error()).toPromise();var n=a.services.$q.when(t(e,i,v));return n.then(d).then(function(t){return t||r()})}var n=this,i=s.PathFactory.makeTargetState(t),u=this.router.globals,c=function(){return u.transitionHistory.peekTail()},p=c(),h=new o.Queue(this.invalidCallbacks.slice()),v=new m.ResolveContext(t).injector(),d=function(t){if(t instanceof l.TargetState){var e=t;return e=n.target(e.identifier(),e.params(),e.options()),e.valid()?c()!==p?f.Rejection.superseded().toPromise():n.transitionTo(e.identifier(),e.params(),e.options()):f.Rejection.invalid(e.error()).toPromise()}};return r()},t.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){n.removeFrom(this.invalidCallbacks)(t)}.bind(this)},t.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!i.isDefined(t)||t,inherit:!1,notify:!1})},t.prototype.go=function(t,e,r){var i={relative:this.$current,inherit:!0},o=n.defaults(r,i,c.defaultTransOpts);return this.transitionTo(t,e,o)},t.prototype.target=function(t,e,r){if(void 0===r&&(r={}),i.isObject(r.reload)&&!r.reload.name)throw new Error("Invalid reload state object");var n=this.router.stateRegistry;if(r.reloadState=r.reload===!0?n.root():n.matcher.find(r.reload,r.relative),r.reload&&!r.reloadState)throw new Error("No such reload state '"+(i.isString(r.reload)?r.reload:r.reload.name)+"'");var o=n.matcher.find(t,r.relative);return new l.TargetState(t,o,e,r)},t.prototype.transitionTo=function(t,e,r){var i=this;void 0===e&&(e={}),void 0===r&&(r={});var o=this.router,s=o.globals,p=s.transitionHistory;r=n.defaults(r,c.defaultTransOpts),r=n.extend(r,{current:p.peekTail.bind(p)});var h=this.target(t,e,r),v=s.successfulTransitions.peekTail(),d=function(){return[new u.PathNode(i.router.stateRegistry.root())]},m=v?v.treeChanges().to:d();if(!h.exists())return this._handleInvalidTargetState(m,h);if(!h.valid())return n.silentRejection(h.error());var g=function(t){return function(e){if(e instanceof f.Rejection){if(e.type===f.RejectType.IGNORED)return o.urlRouter.update(),a.services.$q.when(s.current);var r=e.detail;if(e.type===f.RejectType.SUPERSEDED&&e.redirected&&r instanceof l.TargetState){var n=t.redirect(r);return n.run()["catch"](g(n))}e.type===f.RejectType.ABORTED&&o.urlRouter.update()}var u=i.defaultErrorHandler();return u(e),a.services.$q.reject(e)}},y=this.router.transitionService.create(m,h),w=y.run()["catch"](g(y));return n.silenceUncaughtInPromise(w),n.extend(w,{transition:y})},t.prototype.is=function(t,e,r){r=n.defaults(r,{relative:this.$current});var o=this.router.stateRegistry.matcher.find(t,r.relative);if(i.isDefined(o))return this.$current===o&&(!i.isDefined(e)||null===e||p.Param.equals(o.parameters(),this.params,e))},t.prototype.includes=function(t,e,r){r=n.defaults(r,{relative:this.$current});var o=i.isString(t)&&h.Glob.fromString(t);if(o){if(!o.matches(this.$current.name))return!1;t=this.$current.name}var a=this.router.stateRegistry.matcher.find(t,r.relative),s=this.$current.includes;if(i.isDefined(a))return!!i.isDefined(s[a.name])&&(!e||v.equalForKeys(p.Param.values(a.parameters(),e),this.params,Object.keys(e)))},t.prototype.href=function(t,e,r){var o={lossy:!0,inherit:!0,absolute:!1,relative:this.$current};r=n.defaults(r,o),e=e||{};var a=this.router.stateRegistry.matcher.find(t,r.relative);if(!i.isDefined(a))return null;r.inherit&&(e=this.params.$inherit(e,this.$current,a));var s=a&&r.lossy?a.navigable:a;return s&&void 0!==s.url&&null!==s.url?this.router.urlRouter.href(s.url,p.Param.values(a.parameters(),e),{absolute:r.absolute}):null},t.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},t.prototype.get=function(t,e){var r=this.router.stateRegistry;return 0===arguments.length?r.get():r.get(t,e||this.$current)},t}();e.StateService=g},function(t,e,r){"use strict";var n=r(45),i=r(8),o=r(3),a=function(){function t(t){var e=this;this.params=new n.StateParams,this.transitionHistory=new i.Queue([],1),this.successfulTransitions=new i.Queue([],1);var r=function(t){e.transition=t,e.transitionHistory.enqueue(t);var r=function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,o.copy(t.params(),e.params)};t.onSuccess({},r,{priority:1e4});var n=function(){e.transition===t&&(e.transition=null)};t.promise.then(n,n)};t.onBefore({},r)}return t}();e.Globals=a},function(t,e,r){"use strict";var n=r(3),i=function(){function t(t){void 0===t&&(t={}),n.extend(this,t)}return t.prototype.$inherit=function(t,e,r){var i,o=n.ancestors(e,r),a={},s=[];for(var u in o)if(o[u]&&o[u].params&&(i=Object.keys(o[u].params),i.length))for(var c in i)s.indexOf(i[c])>=0||(s.push(i[c]),a[i[c]]=this[i[c]]);return n.extend({},a,t)},t}();e.StateParams=i},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(22)),n(r(28)),n(r(45)),n(r(24))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(21)),n(r(20))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(18)),n(r(19)),n(r(17))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(40)),n(r(42)),n(r(39)),n(r(41)),n(r(38)),n(r(43)),n(r(14))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(16)),n(r(15)),n(r(10)),n(r(11)),n(r(13)),n(r(30))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(27)),n(r(23)),n(r(26)),n(r(29))},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}n(r(37))},function(t,e,r){"use strict";function n(t){var e=l.services.$injector,r=e.get("$controller"),n=e.instantiate;try{var i;return e.instantiate=function(t){e.instantiate=n,i=e.annotate(t)},r(t,{$scope:{}}),i}finally{e.instantiate=n}}function i(t){function e(e,n,i,o,a,s){return o.$on("$locationChangeSuccess",function(t){return r.forEach(function(e){return e(t)})}),l.services.locationConfig.html5Mode=function(){var e=t.html5Mode();return e=v.isObject(e)?e.enabled:e,e&&i.history},l.services.location.setUrl=function(t,r){void 0===r&&(r=!1),e.url(t),r&&e.replace()},l.services.template.get=function(t){return a.get(t,{cache:s,headers:{Accept:"text/html"}}).then(h.prop("data"))},p.bindFunctions(e,l.services.location,e,["replace","url","path","search","hash"]),p.bindFunctions(e,l.services.locationConfig,e,["port","protocol","host"]),p.bindFunctions(n,l.services.locationConfig,n,["baseHref"]),R}R=new f.UIRouter,R.stateProvider=new w.StateProvider(R.stateRegistry,R.stateService),R.stateRegistry.decorator("views",g.ng1ViewsBuilder),R.stateRegistry.decorator("onExit",b.getStateHookBuilder("onExit")),R.stateRegistry.decorator("onRetain",b.getStateHookBuilder("onRetain")),R.stateRegistry.decorator("onEnter",b.getStateHookBuilder("onEnter")),R.viewService.viewConfigFactory("ng1",g.ng1ViewConfigFactory),p.bindFunctions(t,l.services.locationConfig,t,["hashPrefix"]);var r=[];l.services.location.onChange=function(t){return r.push(t),function(){return p.removeFrom(r)(t)}},this.$get=e,e.$inject=["$location","$browser","$sniffer","$rootScope","$http","$templateCache"]}function o(t,e){l.services.$injector=t,l.services.$q=e}function a(){return R.urlRouterProvider.$get=function(){return R.urlRouter.update(!0),this.interceptDeferred||R.urlRouter.listen(),R.urlRouter},R.urlRouterProvider}function s(){return R.stateProvider.$get=function(){return R.stateRegistry.stateQueue.autoFlush(R.stateService),R.stateService},R.stateProvider}function u(){return R.transitionService.$get=function(){return R.transitionService},R.transitionService}function c(t){t.$watch(function(){m.trace.approximateDigests++})}var f=r(25),l=r(6),p=r(3),h=r(5),v=r(4),d=r(54),m=r(12),g=r(55),y=r(56),w=r(58),b=r(59),$=r(57);$.module("ui.router.angular1",[]);$.module("ui.router.util",["ng","ui.router.init"]),$.module("ui.router.router",["ui.router.util"]),$.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),$.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),$.module("ui.router.compat",["ui.router"]),e.annotateController=n;var R=null;i.$inject=["$locationProvider"],$.module("ui.router.init",[]).provider("$uiRouter",i),o.$inject=["$injector","$q"],$.module("ui.router.init").run(o),$.module("ui.router.init").run(["$uiRouter",function(t){}]),$.module("ui.router.util").provider("$urlMatcherFactory",["$uiRouterProvider",function(){return R.urlMatcherFactory}]),$.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),$.module("ui.router.router").provider("$urlRouter",["$uiRouterProvider",a]),$.module("ui.router.router").run(["$urlRouter",function(t){}]),$.module("ui.router.state").provider("$state",["$uiRouterProvider",s]),$.module("ui.router.state").run(["$state",function(t){}]),$.module("ui.router.state").factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),$.module("ui.router.state").provider("$transitions",["$uiRouterProvider",u]),$.module("ui.router.util").factory("$templateFactory",["$uiRouter",function(){return new y.TemplateFactory}]),$.module("ui.router").factory("$view",function(){return R.viewService}),$.module("ui.router").factory("$resolve",d.resolveFactory),$.module("ui.router").service("$trace",function(){return m.trace}),c.$inject=["$rootScope"],e.watchDigests=c,$.module("ui.router").run(c),e.getLocals=function(t){var e=t.getTokens().filter(v.isString),r=e.map(function(e){return[e,t.getResolvable(e).data]});return r.reduce(p.applyPairs,{})}},function(t,e,r){"use strict";var n=r(42),i=r(21),o=r(17),a=r(3),s=r(40),u={resolve:function(t,e,r){void 0===e&&(e={});var u=new i.PathNode(new n.State({params:{},resolvables:[]})),c=new i.PathNode(new n.State({params:{},resolvables:[]})),f=new o.ResolveContext([u,c]);f.addResolvables(s.resolvablesBuilder({resolve:t}),c.state);var l=function(t){var r=function(t){return s.resolvablesBuilder({resolve:a.mapObj(t,function(t){return function(){return t}})})};f.addResolvables(r(t),u.state),f.addResolvables(r(e),c.state);var n=function(t,e){return t[e.token]=e.value,t};return f.resolvePath().then(function(t){return t.reduce(n,{})})};return r?r.then(l):l({})}};e.resolveFactory=function(){return u}},function(t,e,r){"use strict";function n(t){var e=["templateProvider","templateUrl","template","notify","async"],r=["controller","controllerProvider","controllerAs","resolveAs"],n=["component","bindings"],c=e.concat(r),f=n.concat(c),l={},p=t.views||{$default:o.pick(t,f)};return o.forEach(p,function(e,r){if(r=r||"$default",u.isString(e)&&(e={component:e}),Object.keys(e).length){if(e.component){if(c.map(function(t){return u.isDefined(e[t])}).reduce(o.anyTrueR,!1))throw new Error("Cannot combine: "+n.join("|")+" with: "+c.join("|")+" in stateview: 'name@"+t.name+"'");e.templateProvider=["$injector",function(t){var r=function(t){return e.bindings&&e.bindings[t]||t},n=v.version.minor>=3?"::":"",o=function(t){var e=a.kebobString(t.name),i=r(t.name);return"@"===t.type?e+"='{{"+n+"$resolve."+i+"}}'":e+"='"+n+"$resolve."+i+"'"},s=i(t,e.component).map(o).join(" "),u=a.kebobString(e.component);return"<"+u+" "+s+"></"+u+">"}]}e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=t,e.$name=r;var f=s.ViewService.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=f.uiViewName,e.$uiViewContextAnchor=f.uiViewContextAnchor,l[r]=e}}),l}function i(t,e){var r=t.get(e+"Directive");if(!r||!r.length)throw new Error("Unable to find component named '"+e+"'");return r.map(m).reduce(o.unnestR,[])}var o=r(3),a=r(9),s=r(37),u=r(4),c=r(6),f=r(12),l=r(56),p=r(17),h=r(19),v=r(57);e.ng1ViewConfigFactory=function(t,e){return[new y(t,e)]},e.ng1ViewsBuilder=n;var d=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@])[?]?(.*)/.exec(t[e])]}).filter(function(t){return u.isDefined(t)&&u.isDefined(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},m=function(t){return d(u.isObject(t.bindToController)?t.bindToController:t.scope)},g=0,y=function(){function t(t,e){this.path=t,this.viewDecl=e,this.$id=g++,this.loaded=!1}return t.prototype.load=function(){var t=this,e=c.services.$q;if(!this.hasTemplate())throw new Error("No template configuration specified for '"+this.viewDecl.$uiViewName+"@"+this.viewDecl.$uiViewContextAnchor+"'");var r=new p.ResolveContext(this.path),n=this.path.reduce(function(t,e){return o.extend(t,e.paramValues)},{}),i={template:e.when(this.getTemplate(n,new l.TemplateFactory,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return f.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,t.template=e.template,t})},t.prototype.hasTemplate=function(){return!!(this.viewDecl.template||this.viewDecl.templateUrl||this.viewDecl.templateProvider)},t.prototype.getTemplate=function(t,e,r){return e.fromConfig(this.viewDecl,t,r)},t.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;if(!u.isInjectable(e))return this.viewDecl.controller;var r=c.services.$injector.annotate(e),n=u.isArray(e)?o.tail(e):e,i=new h.Resolvable("",n,r);return i.get(t)},t}();e.Ng1ViewConfig=y},function(t,e,r){"use strict";var n=r(4),i=r(6),o=r(3),a=r(19),s=function(){function t(){}return t.prototype.fromConfig=function(t,e,r){return n.isDefined(t.template)?this.fromString(t.template,e):n.isDefined(t.templateUrl)?this.fromUrl(t.templateUrl,e):n.isDefined(t.templateProvider)?this.fromProvider(t.templateProvider,e,r):null},t.prototype.fromString=function(t,e){return n.isFunction(t)?t(e):t},t.prototype.fromUrl=function(t,e){return n.isFunction(t)&&(t=t(e)),null==t?null:i.services.template.get(t)},t.prototype.fromProvider=function(t,e,r){var s=i.services.$injector.annotate(t),u=n.isArray(t)?o.tail(t):t,c=new a.Resolvable("",u,s);return c.get(r)},t}();e.TemplateFactory=s},function(e,r){e.exports=t},function(t,e,r){"use strict";var n=r(4),i=r(3),o=function(){function t(e,r){this.stateRegistry=e,this.stateService=r,i.bindFunctions(t.prototype,this,this)}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return n.isObject(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},t}();e.StateProvider=o},function(t,e,r){"use strict";var n=r(6),i=r(53),o=r(17),a=r(3);e.getStateHookBuilder=function(t){return function(e,r){function s(t,e){var r=new o.ResolveContext(t.treeChanges().to);return n.services.$injector.invoke(u,this,a.extend({$state$:e},i.getLocals(r)))}var u=e[t];return u?s:void 0}}},function(t,e,r){"use strict";function n(t,e){var r,n=t.match(/^\s*({[^}]*})\s*$/);if(n&&(t=e+"("+n[1]+")"),r=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!r||4!==r.length)throw new Error("Invalid state ref '"+t+"'");return{state:r[1],paramExpr:r[3]||null}}function i(t){var e=t.parent().inheritedData("$uiView"),r=l.parse("$cfg.path")(e);return r?c.tail(r).state.name:void 0}function o(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),r="FORM"===t[0].nodeName;return{attr:r?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!r}}function a(t,e,r,n,i){return function(o){var a=o.which||o.button,s=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var u=r(function(){e.go(s.state,s.params,s.options)});o.preventDefault();var c=n.isAnchor&&!s.href?1:0;o.preventDefault=function(){c--<=0&&r.cancel(u)}}}}function s(t,e){return{relative:i(t)||e.$current,inherit:!0,source:"sref"}}var u=r(57),c=r(3),f=r(4),l=r(5),p=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,i,f,l){var p,h=n(f.uiSref,t.current.name),v={state:h.state,href:null,params:null,options:null},d=o(i),m=l[1]||l[0],g=null;v.options=c.extend(s(i,t),f.uiSrefOpts?r.$eval(f.uiSrefOpts):{});var y=function(e){e&&(v.params=u.copy(e)),v.href=t.href(h.state,v.params,v.options),g&&g(),m&&(g=m.$$addStateInfo(h.state,v.params)),null!==v.href&&f.$set(d.attr,v.href)};h.paramExpr&&(r.$watch(h.paramExpr,function(t){t!==v.params&&y(t)},!0),v.params=u.copy(r.$eval(h.paramExpr))),y(),d.clickable&&(p=a(i,t,e,d,function(){return v}),i.on("click",p),r.$on("$destroy",function(){i.off("click",p)}))}}}],h=["$state","$timeout",function(t,e){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,n,i,s){function u(e){v.state=e[0],v.params=e[1],v.options=e[2],v.href=t.href(v.state,v.params,v.options),d&&d(),l&&(d=l.$$addStateInfo(v.state,v.params)),v.href&&i.$set(f.attr,v.href)}var c,f=o(n),l=s[1]||s[0],p=[i.uiState,i.uiStateParams||null,i.uiStateOpts||null],h="["+p.map(function(t){return t||"null"}).join(", ")+"]",v={state:null,params:null,options:null,href:null},d=null;r.$watch(h,u,!0),u(r.$eval(h)),f.clickable&&(c=a(n,t,e,f,function(){return v}),n.on("click",c),r.$on("$destroy",function(){n.off("click",c)}))}}}],v=["$state","$stateParams","$interpolate","$transitions","$uiRouter",function(t,e,r,o,a){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(e,s,u,l){function p(t){t.promise.then(d)}function h(e,r,n){var o=t.get(e,i(s)),a=v(e,r),u={state:o||{name:e},params:r,hash:a};return R.push(u),S[a]=n,function(){var t=R.indexOf(u);t!==-1&&R.splice(t,1)}}function v(t,r){if(!f.isString(t))throw new Error("state should be a string");return f.isObject(r)?t+c.toJson(r):(r=e.$eval(r),f.isObject(r)?t+c.toJson(r):t)}function d(){for(var t=0;t<R.length;t++)y(R[t].state,R[t].params)?m(s,S[R[t].hash]):g(s,S[R[t].hash]),w(R[t].state,R[t].params)?m(s,b):g(s,b)}function m(t,e){l(function(){t.addClass(e)})}function g(t,e){t.removeClass(e)}function y(e,r){return t.includes(e.name,r)}function w(e,r){return t.is(e.name,r)}var b,$,R=[],S={};b=r(u.uiSrefActiveEq||"",!1)(e);try{$=e.$eval(u.uiSrefActive)}catch(E){}$=$||r(u.uiSrefActive||"",!1)(e),f.isObject($)&&c.forEach($,function(r,i){if(f.isString(r)){var o=n(r,t.current.name);h(o.state,e.$eval(o.paramExpr),i)}}),this.$$addStateInfo=function(t,e){if(!(f.isObject($)&&R.length>0)){var r=h(t,e,$);return d(),r}},e.$on("$stateChangeSuccess",d),e.$on("$destroy",o.onStart({},p)),a.globals.transition&&p(a.globals.transition),d()}]}}];u.module("ui.router.state").directive("uiSref",p).directive("uiSrefActive",v).directive("uiSrefActiveEq",v).directive("uiState",h)},function(t,e,r){"use strict";function n(t){var e=function(e,r,n){return t.is(e,r,n)};return e.$stateful=!0,e}function i(t){var e=function(e,r,n){return t.includes(e,r,n)};return e.$stateful=!0,e}var o=r(57);n.$inject=["$state"],e.$IsStateFilter=n,i.$inject=["$state"],e.$IncludedByStateFilter=i,o.module("ui.router.state").filter("isState",n).filter("includedByState",i)},function(t,e,r){"use strict";function n(t,e,r,n,u){var v=c.parse("viewDecl.controllerAs"),d=c.parse("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(n){var u=n.html();return function(n,c){var m=c.data("$uiView");if(m){var g=m.$cfg||{viewDecl:{}};c.html(g.template||u),s.trace.traceUIViewFill(m.$uiView,c.html());var y=t(c.contents()),w=g.controller,b=v(g),$=d(g),R=g.path&&new f.ResolveContext(g.path),S=R&&p.getLocals(R);if(n[$]=S,w){var E=e(w,o.extend({},S,{$scope:n,$element:c}));b&&(n[b]=E,n[b][$]=S),c.data("$ngControllerController",E),c.children().data("$ngControllerController",E),i(r,E,n,g)}if(a.isString(g.viewDecl.component))var x=g.viewDecl.component,k=l.kebobString(x),P=function(){var t=[].slice.call(c[0].children).filter(function(t){return t&&t.tagName&&t.tagName.toLowerCase()===k});return t&&h.element(t).data("$"+x+"Controller")},_=n.$watch(P,function(t){t&&(i(r,t,n,g),_())});y(n)}}}}}function i(t,e,r,n){!a.isFunction(e.$onInit)||n.viewDecl.component&&d||e.$onInit();var i=o.tail(n.path).state.self,s={bind:e};if(a.isFunction(e.uiOnParamsChanged)){var u=new f.ResolveContext(n.path),c=u.getResolvable("$transition$").data,l=function(t){if(t!==c&&t.exiting().indexOf(i)===-1){var r=t.params("to"),n=t.params("from"),a=t.treeChanges().to.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),s=t.treeChanges().from.map(function(t){return t.paramSchema}).reduce(o.unnestR,[]),u=a.filter(function(t){var e=s.indexOf(t);return e===-1||!s[e].type.equals(r[t.id],n[t.id])});if(u.length){var f=u.map(function(t){return t.id});e.uiOnParamsChanged(o.filter(r,function(t,e){return f.indexOf(e)!==-1}),t)}}};r.$on("$destroy",t.onSuccess({},l,s))}if(a.isFunction(e.uiCanExit)){var p={exiting:i.name};r.$on("$destroy",t.onBefore(p,e.uiCanExit,s))}}var o=r(3),a=r(4),s=r(12),u=r(55),c=r(5),f=r(17),l=r(9),p=r(53),h=r(57),v=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,r,n,i){function o(t,r){return{enter:function(t,r,n){h.version.minor>2?e.enter(t,null,r).then(n):e.enter(t,null,r,n)},leave:function(t,r){h.version.minor>2?e.leave(t).then(r):e.leave(t,r)}}}function f(t,e){return t===e}var l={$cfg:{viewDecl:{$context:t.rootContext()}},$uiView:{}},p={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,h,v){return function(e,h,d){function m(t){(!t||t instanceof u.Ng1ViewConfig)&&(f(k,t)||(s.trace.traceUIViewConfigUpdated(C,t&&t.viewDecl&&t.viewDecl.$context),k=t,y(t)))}function g(){if(w&&(s.trace.traceUIViewEvent("Removing (previous) el",w.data("$uiView")),w.remove(),w=null),$&&(s.trace.traceUIViewEvent("Destroying scope",C),$.$destroy(),$=null),b){var t=b.data("$uiViewAnim");s.trace.traceUIViewEvent("Animate out",t),x.leave(b,function(){t.$$animLeave.resolve(),w=null}),w=b,b=null}}function y(t){var n=e.$new(),o=i.defer(),s=i.defer(),u={$cfg:t,$uiView:C},c={$animEnter:o.promise,$animLeave:s.promise,$$animLeave:s},f=v(n,function(t){t.data("$uiViewAnim",c),t.data("$uiView",u),
1819 9343 x.enter(t,h,function(){o.resolve(),$&&$.$emit("$viewContentAnimationEnded"),(a.isDefined(E)&&!E||e.$eval(E))&&r(t)}),g()});b=f,$=n,$.$emit("$viewContentLoaded",t||k),$.$eval(S)}var w,b,$,R,S=d.onload||"",E=d.autoscroll,x=o(d,e),k=void 0,P=h.inheritedData("$uiView")||l,_=n(d.uiView||d.name||"")(e)||"$default",C={$type:"ng1",id:p.count++,name:_,fqn:P.$uiView.fqn?P.$uiView.fqn+"."+_:_,config:null,configUpdated:m,get creationContext(){return c.parse("$cfg.viewDecl.$context")(P)}};s.trace.traceUIViewEvent("Linking",C),h.data("$uiView",{$uiView:C}),y(),R=t.registerUIView(C),e.$on("$destroy",function(){s.trace.traceUIViewEvent("Destroying/Unregistering",C),R()})}}};return p}];n.$inject=["$compile","$controller","$transitions","$view","$timeout"];var d="function"==typeof h.module("ui.router").component;h.module("ui.router.state").directive("uiView",v),h.module("ui.router.state").directive("uiView",n)},function(t,e,r){"use strict";function n(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,r){return t?e:function(t){return r(function(){t[0].scrollIntoView()},0,!1)}}]}var i=r(57);i.module("ui.router.state").provider("$uiViewScroll",n)}])});
1820 9344 //# sourceMappingURL=angular-ui-router.min.js.map
1821 9345 ;angular.module('angular-toArrayFilter', [])
1822 9346
1823 9347 .filter('toArray', function () {
1824 9348 return function (obj, addKey) {
1825 9349 if (!angular.isObject(obj)) return obj;
1826 9350 if ( addKey === false ) {
1827 9351 return Object.keys(obj).map(function(key) {
1828 9352 return obj[key];
1829 9353 });
1830 9354 } else {
1831 9355 return Object.keys(obj).map(function (key) {
1832 9356 var value = obj[key];
1833 9357 return angular.isObject(value) ?
1834 9358 Object.defineProperty(value, '$key', { enumerable: false, value: key}) :
1835 9359 { $key: key, $value: value };
1836 9360 });
1837 9361 }
1838 9362 };
1839 9363 });
1840 9364 ;//Copyright (C) 2012 Kory Nunn
1841 9365
1842 9366 //Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1843 9367
1844 9368 //The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1845 9369
1846 9370 //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1847 9371
1848 9372 /*
1849 9373
1850 9374 This code is not formatted for readability, but rather run-speed and to assist compilers.
1851 9375
1852 9376 However, the code's intention should be transparent.
1853 9377
1854 9378 *** IE SUPPORT ***
1855 9379
1856 9380 If you require this library to work in IE7, add the following after declaring crel.
1857 9381
1858 9382 var testDiv = document.createElement('div'),
1859 9383 testLabel = document.createElement('label');
1860 9384
1861 9385 testDiv.setAttribute('class', 'a');
1862 9386 testDiv['className'] !== 'a' ? crel.attrMap['class'] = 'className':undefined;
1863 9387 testDiv.setAttribute('name','a');
1864 9388 testDiv['name'] !== 'a' ? crel.attrMap['name'] = function(element, value){
1865 9389 element.id = value;
1866 9390 }:undefined;
1867 9391
1868 9392
1869 9393 testLabel.setAttribute('for', 'a');
1870 9394 testLabel['htmlFor'] !== 'a' ? crel.attrMap['for'] = 'htmlFor':undefined;
1871 9395
1872 9396
1873 9397
1874 9398 */
1875 9399
1876 9400 (function (root, factory) {
1877 9401 if (typeof exports === 'object') {
1878 9402 if (!root.window) {
1879 9403 var jsdom = require('jsdom').jsdom;
1880 9404 root.window = jsdom().parentWindow;
1881 9405 }
1882 9406 module.exports = factory(root.window);
1883 9407 } else if (typeof define === 'function' && define.amd) {
1884 9408 define(factory.bind(null, window));
1885 9409 } else {
1886 9410 root.crel = factory(root.window);
1887 9411 }
1888 9412 }(this, function (window) {
1889 9413 // based on http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
1890 9414 var isNode = typeof Node === 'object'
1891 9415 ? function (object) { return object instanceof Node }
1892 9416 : function (object) {
1893 9417 return object
1894 9418 && typeof object === 'object'
1895 9419 && typeof object.nodeType === 'number'
1896 9420 && typeof object.nodeName === 'string';
1897 9421 };
1898 9422
1899 9423 function crel(){
1900 9424 var document = window.document,
1901 9425 args = arguments, //Note: assigned to a variable to assist compilers. Saves about 40 bytes in closure compiler. Has negligable effect on performance.
1902 9426 element = document.createElement(args[0]),
1903 9427 child,
1904 9428 settings = args[1],
1905 9429 childIndex = 2,
1906 9430 argumentsLength = args.length,
1907 9431 attributeMap = crel.attrMap;
1908 9432
1909 9433 // shortcut
1910 9434 if(argumentsLength === 1){
1911 9435 return element;
1912 9436 }
1913 9437
1914 9438 if(typeof settings !== 'object' || isNode(settings)) {
1915 9439 --childIndex;
1916 9440 settings = null;
1917 9441 }
1918 9442
1919 9443 // shortcut if there is only one child that is a string
1920 9444 if((argumentsLength - childIndex) === 1 && typeof args[childIndex] === 'string' && element.textContent !== undefined){
1921 9445 element.textContent = args[childIndex];
1922 9446 }else{
1923 9447 for(; childIndex < argumentsLength; ++childIndex){
1924 9448 child = args[childIndex];
1925 9449
1926 9450 if(child == null){
1927 9451 continue;
1928 9452 }
1929 9453
1930 9454 if(!isNode(child)){
1931 9455 child = document.createTextNode(child);
1932 9456 }
1933 9457
1934 9458 element.appendChild(child);
1935 9459 }
1936 9460 }
1937 9461
1938 9462 for(var key in settings){
1939 9463 if(!attributeMap[key]){
1940 9464 element.setAttribute(key, settings[key]);
1941 9465 }else{
1942 9466 var attr = crel.attrMap[key];
1943 9467 if(typeof attr === 'function'){
1944 9468 attr(element, settings[key]);
1945 9469 }else{
1946 9470 element.setAttribute(attr, settings[key]);
1947 9471 }
1948 9472 }
1949 9473 }
1950 9474
1951 9475 return element;
1952 9476 }
1953 9477
1954 9478 // Used for mapping one kind of attribute to the supported version of that in bad browsers.
1955 9479 // String referenced so that compilers maintain the property name.
1956 9480 crel['attrMap'] = {};
1957 9481
1958 9482 // String referenced so that compilers maintain the property name.
1959 9483 crel["isNode"] = isNode;
1960 9484
1961 9485 return crel;
1962 9486 }));
1963 9487
1964 9488 ;/*globals define, module, require, document*/
1965 9489 (function (root, factory) {
1966 9490 "use strict";
1967 9491 if (typeof define === 'function' && define.amd) {
1968 9492 define([], factory);
1969 9493 } else if (typeof module !== 'undefined' && module.exports) {
1970 9494 module.exports = factory();
1971 9495 } else {
1972 9496 root.JsonHuman = factory();
1973 9497 }
1974 9498 }(this, function () {
1975 9499 "use strict";
1976 9500
1977 9501 var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
1978 9502
1979 9503 function makePrefixer(prefix) {
1980 9504 return function (name) {
1981 9505 return prefix + "-" + name;
1982 9506 };
1983 9507 }
1984 9508
1985 9509 function isArray(obj) {
1986 9510 return toString.call(obj) === '[object Array]';
1987 9511 }
1988 9512
1989 9513 function sn(tagName, className, data) {
1990 9514 var result = document.createElement(tagName);
1991 9515
1992 9516 result.className = className;
1993 9517 result.appendChild(document.createTextNode("" + data));
1994 9518
1995 9519 return result;
1996 9520 }
1997 9521
1998 9522 function scn(tagName, className, child) {
1999 9523 var result = document.createElement(tagName),
2000 9524 i, len;
2001 9525
2002 9526 result.className = className;
2003 9527
2004 9528 if (isArray(child)) {
2005 9529 for (i = 0, len = child.length; i < len; i += 1) {
2006 9530 result.appendChild(child[i]);
2007 9531 }
2008 9532 } else {
2009 9533 result.appendChild(child);
2010 9534 }
2011 9535
2012 9536 return result;
2013 9537 }
2014 9538
2015 9539 function linkNode(child, href, target){
2016 9540 var a = scn("a", HYPERLINK_CLASS_NAME, child);
2017 9541 a.setAttribute('href', href);
2018 9542 a.setAttribute('target', target);
2019 9543 return a;
2020 9544 }
2021 9545
2022 9546 var toString = Object.prototype.toString,
2023 9547 prefixer = makePrefixer("jh"),
2024 9548 p = prefixer,
2025 9549 ARRAY = 2,
2026 9550 BOOL = 4,
2027 9551 INT = 8,
2028 9552 FLOAT = 16,
2029 9553 STRING = 32,
2030 9554 OBJECT = 64,
2031 9555 SPECIAL_OBJECT = 128,
2032 9556 FUNCTION = 256,
2033 9557 UNK = 1,
2034 9558
2035 9559 STRING_CLASS_NAME = p("type-string"),
2036 9560 STRING_EMPTY_CLASS_NAME = p("type-string") + " " + p("empty"),
2037 9561
2038 9562 BOOL_TRUE_CLASS_NAME = p("type-bool-true"),
2039 9563 BOOL_FALSE_CLASS_NAME = p("type-bool-false"),
2040 9564 BOOL_IMAGE = p("type-bool-image"),
2041 9565 INT_CLASS_NAME = p("type-int") + " " + p("type-number"),
2042 9566 FLOAT_CLASS_NAME = p("type-float") + " " + p("type-number"),
2043 9567
2044 9568 OBJECT_CLASS_NAME = p("type-object"),
2045 9569 OBJ_KEY_CLASS_NAME = p("key") + " " + p("object-key"),
2046 9570 OBJ_VAL_CLASS_NAME = p("value") + " " + p("object-value"),
2047 9571 OBJ_EMPTY_CLASS_NAME = p("type-object") + " " + p("empty"),
2048 9572
2049 9573 FUNCTION_CLASS_NAME = p("type-function"),
2050 9574
2051 9575 ARRAY_KEY_CLASS_NAME = p("key") + " " + p("array-key"),
2052 9576 ARRAY_VAL_CLASS_NAME = p("value") + " " + p("array-value"),
2053 9577 ARRAY_CLASS_NAME = p("type-array"),
2054 9578 ARRAY_EMPTY_CLASS_NAME = p("type-array") + " " + p("empty"),
2055 9579
2056 9580 HYPERLINK_CLASS_NAME = p('a'),
2057 9581
2058 9582 UNKNOWN_CLASS_NAME = p("type-unk");
2059 9583
2060 9584 function getType(obj) {
2061 9585 var type = typeof obj;
2062 9586
2063 9587 switch (type) {
2064 9588 case "boolean":
2065 9589 return BOOL;
2066 9590 case "string":
2067 9591 return STRING;
2068 9592 case "number":
2069 9593 return (obj % 1 === 0) ? INT : FLOAT;
2070 9594 case "function":
2071 9595 return FUNCTION;
2072 9596 default:
2073 9597 if (isArray(obj)) {
2074 9598 return ARRAY;
2075 9599 } else if (obj === Object(obj)) {
2076 9600 if (obj.constructor === Object) {
2077 9601 return OBJECT;
2078 9602 }
2079 9603 return OBJECT | SPECIAL_OBJECT
2080 9604 } else {
2081 9605 return UNK;
2082 9606 }
2083 9607 }
2084 9608 }
2085 9609
2086 9610 function _format(data, options, parentKey) {
2087 9611
2088 9612 var result, container, key, keyNode, valNode, len, childs, tr, value,
2089 9613 isEmpty = true,
2090 9614 isSpecial = false,
2091 9615 accum = [],
2092 9616 type = getType(data);
2093 9617
2094 9618 // Initialized & used only in case of objects & arrays
2095 9619 var hyperlinksEnabled, aTarget, hyperlinkKeys ;
2096 9620
2097 9621 if (type === BOOL) {
2098 9622 var boolOpt = options.bool;
2099 9623 container = document.createElement('div');
2100 9624
2101 9625 if (boolOpt.showImage) {
2102 9626 var img = document.createElement('img');
2103 9627 img.setAttribute('class', BOOL_IMAGE);
2104 9628
2105 9629 img.setAttribute('src',
2106 9630 '' + (data ? boolOpt.img.true : boolOpt.img.false));
2107 9631
2108 9632 container.appendChild(img);
2109 9633 }
2110 9634
2111 9635 if (boolOpt.showText) {
2112 9636 container.appendChild(data ?
2113 9637 sn("span", BOOL_TRUE_CLASS_NAME, boolOpt.text.true) :
2114 9638 sn("span", BOOL_FALSE_CLASS_NAME, boolOpt.text.false));
2115 9639 }
2116 9640
2117 9641 result = container;
2118 9642
2119 9643 } else if (type === STRING) {
2120 9644 if (data === "") {
2121 9645 result = sn("span", STRING_EMPTY_CLASS_NAME, "(Empty Text)");
2122 9646 } else {
2123 9647 result = sn("span", STRING_CLASS_NAME, data);
2124 9648 }
2125 9649 } else if (type === INT) {
2126 9650 result = sn("span", INT_CLASS_NAME, data);
2127 9651 } else if (type === FLOAT) {
2128 9652 result = sn("span", FLOAT_CLASS_NAME, data);
2129 9653 } else if (type & OBJECT) {
2130 9654 if (type & SPECIAL_OBJECT) {
2131 9655 isSpecial = true;
2132 9656 }
2133 9657 childs = [];
2134 9658
2135 9659 aTarget = options.hyperlinks.target;
2136 9660 hyperlinkKeys = options.hyperlinks.keys;
2137 9661
2138 9662 // Is Hyperlink Key
2139 9663 hyperlinksEnabled =
2140 9664 options.hyperlinks.enable &&
2141 9665 hyperlinkKeys &&
2142 9666 hyperlinkKeys.length > 0;
2143 9667
2144 9668 for (key in data) {
2145 9669 isEmpty = false;
2146 9670
2147 9671 value = data[key];
2148 9672
2149 9673 valNode = _format(value, options, key);
2150 9674 keyNode = sn("th", OBJ_KEY_CLASS_NAME, key);
2151 9675
2152 9676 if( hyperlinksEnabled &&
2153 9677 typeof(value) === 'string' &&
2154 9678 indexOf.call(hyperlinkKeys, key) >= 0){
2155 9679
2156 9680 valNode = scn("td", OBJ_VAL_CLASS_NAME, linkNode(valNode, value, aTarget));
2157 9681 } else {
2158 9682 valNode = scn("td", OBJ_VAL_CLASS_NAME, valNode);
2159 9683 }
2160 9684
2161 9685 tr = document.createElement("tr");
2162 9686 tr.appendChild(keyNode);
2163 9687 tr.appendChild(valNode);
2164 9688
2165 9689 childs.push(tr);
2166 9690 }
2167 9691
2168 9692 if (isSpecial) {
2169 9693 result = sn('span', STRING_CLASS_NAME, data.toString())
2170 9694 } else if (isEmpty) {
2171 9695 result = sn("span", OBJ_EMPTY_CLASS_NAME, "(Empty Object)");
2172 9696 } else {
2173 9697 result = scn("table", OBJECT_CLASS_NAME, scn("tbody", '', childs));
2174 9698 }
2175 9699 } else if (type === FUNCTION) {
2176 9700 result = sn("span", FUNCTION_CLASS_NAME, data);
2177 9701 } else if (type === ARRAY) {
2178 9702 if (data.length > 0) {
2179 9703 childs = [];
2180 9704 var showArrayIndices = options.showArrayIndex;
2181 9705
2182 9706 aTarget = options.hyperlinks.target;
2183 9707 hyperlinkKeys = options.hyperlinks.keys;
2184 9708
2185 9709 // Hyperlink of arrays?
2186 9710 hyperlinksEnabled = parentKey && options.hyperlinks.enable &&
2187 9711 hyperlinkKeys &&
2188 9712 hyperlinkKeys.length > 0 &&
2189 9713 indexOf.call(hyperlinkKeys, parentKey) >= 0;
2190 9714
2191 9715 for (key = 0, len = data.length; key < len; key += 1) {
2192 9716
2193 9717 keyNode = sn("th", ARRAY_KEY_CLASS_NAME, key);
2194 9718 value = data[key];
2195 9719
2196 9720 if (hyperlinksEnabled && typeof(value) === "string") {
2197 9721 valNode = _format(value, options, key);
2198 9722 valNode = scn("td", ARRAY_VAL_CLASS_NAME,
2199 9723 linkNode(valNode, value, aTarget));
2200 9724 } else {
2201 9725 valNode = scn("td", ARRAY_VAL_CLASS_NAME,
2202 9726 _format(value, options, key));
2203 9727 }
2204 9728
2205 9729 tr = document.createElement("tr");
2206 9730
2207 9731 if (showArrayIndices) {
2208 9732 tr.appendChild(keyNode);
2209 9733 }
2210 9734 tr.appendChild(valNode);
2211 9735
2212 9736 childs.push(tr);
2213 9737 }
2214 9738
2215 9739 result = scn("table", ARRAY_CLASS_NAME, scn("tbody", '', childs));
2216 9740 } else {
2217 9741 result = sn("span", ARRAY_EMPTY_CLASS_NAME, "(Empty List)");
2218 9742 }
2219 9743 } else {
2220 9744 result = sn("span", UNKNOWN_CLASS_NAME, data);
2221 9745 }
2222 9746
2223 9747 return result;
2224 9748 }
2225 9749
2226 9750 function format(data, options) {
2227 9751 options = validateOptions(options || {});
2228 9752
2229 9753 var result;
2230 9754
2231 9755 result = _format(data, options);
2232 9756 result.className = result.className + " " + prefixer("root");
2233 9757
2234 9758 return result;
2235 9759 }
2236 9760
2237 9761 function validateOptions(options){
2238 9762 options = validateArrayIndexOption(options);
2239 9763 options = validateHyperlinkOptions(options);
2240 9764 options = validateBoolOptions(options);
2241 9765
2242 9766 // Add any more option validators here
2243 9767
2244 9768 return options;
2245 9769 }
2246 9770
2247 9771
2248 9772 function validateArrayIndexOption(options) {
2249 9773 if(options.showArrayIndex === undefined){
2250 9774 options.showArrayIndex = true;
2251 9775 } else {
2252 9776 // Force to boolean just in case
2253 9777 options.showArrayIndex = options.showArrayIndex ? true: false;
2254 9778 }
2255 9779
2256 9780 return options;
2257 9781 }
2258 9782
2259 9783 function validateHyperlinkOptions(options){
2260 9784 var hyperlinks = {
2261 9785 enable : false,
2262 9786 keys : null,
2263 9787 target : ''
2264 9788 };
2265 9789
2266 9790 if(options.hyperlinks && options.hyperlinks.enable) {
2267 9791 hyperlinks.enable = true;
2268 9792
2269 9793 hyperlinks.keys = isArray(options.hyperlinks.keys) ? options.hyperlinks.keys : [];
2270 9794
2271 9795 if(options.hyperlinks.target) {
2272 9796 hyperlinks.target = '' + options.hyperlinks.target;
2273 9797 } else {
2274 9798 hyperlinks.target = '_blank';
2275 9799 }
2276 9800 }
2277 9801
2278 9802 options.hyperlinks = hyperlinks;
2279 9803
2280 9804 return options;
2281 9805 }
2282 9806
2283 9807 function validateBoolOptions(options){
2284 9808 if(!options.bool){
2285 9809 options.bool = {
2286 9810 text: {
2287 9811 true : "true",
2288 9812 false : "false"
2289 9813 },
2290 9814 img : {
2291 9815 true: "",
2292 9816 false: ""
2293 9817 },
2294 9818 showImage : false,
2295 9819 showText : true
2296 9820 };
2297 9821 } else {
2298 9822 var boolOptions = options.bool;
2299 9823
2300 9824 // Show text if no option
2301 9825 if(!boolOptions.showText && !boolOptions.showImage){
2302 9826 boolOptions.showImage = false;
2303 9827 boolOptions.showText = true;
2304 9828 }
2305 9829
2306 9830 if(boolOptions.showText){
2307 9831 if(!boolOptions.text){
2308 9832 boolOptions.text = {
2309 9833 true : "true",
2310 9834 false : "false"
2311 9835 };
2312 9836 } else {
2313 9837 var t = boolOptions.text.true, f = boolOptions.text.false;
2314 9838
2315 9839 if(getType(t) != STRING || t === ''){
2316 9840 boolOptions.text.true = 'true';
2317 9841 }
2318 9842
2319 9843 if(getType(f) != STRING || f === ''){
2320 9844 boolOptions.text.false = 'false';
2321 9845 }
2322 9846 }
2323 9847 }
2324 9848
2325 9849 if(boolOptions.showImage){
2326 9850 if(!boolOptions.img.true && !boolOptions.img.false){
2327 9851 boolOptions.showImage = false;
2328 9852 }
2329 9853 }
2330 9854 }
2331 9855
2332 9856 return options;
2333 9857 }
2334 9858
2335 9859 return {
2336 9860 format: format
2337 9861 };
2338 9862 }));
2339 9863
2340 9864 ;//! moment.js
2341 9865 //! version : 2.8.4
2342 9866 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
2343 9867 //! license : MIT
2344 9868 //! momentjs.com
2345 9869 (function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return zb.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){tb.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return m(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){qc[a]||(e(b),qc[a]=!0)}function h(a,b){return function(c){return p(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(){}function k(a,b){b!==!1&&F(a),n(this,a),this._d=new Date(+a._d)}function l(a){var b=y(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=tb.localeData(),this._bubble()}function m(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function n(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ib.length>0)for(c in Ib)d=Ib[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function o(a){return 0>a?Math.ceil(a):Math.floor(a)}function p(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.length<b;)d="0"+d;return(e?c?"+":"":"-")+d}function q(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function r(a,b){var c;return b=K(b,a),a.isBefore(b)?c=q(a,b):(c=q(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function s(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(g(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=tb.duration(c,d),t(this,e,a),this}}function t(a,b,c,d){var e=b._milliseconds,f=b._days,g=b._months;d=null==d?!0:d,e&&a._d.setTime(+a._d+e*c),f&&nb(a,"Date",mb(a,"Date")+f*c),g&&lb(a,mb(a,"Month")+g*c),d&&tb.updateOffset(a,f||g)}function u(a){return"[object Array]"===Object.prototype.toString.call(a)}function v(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function w(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&A(a[d])!==A(b[d]))&&g++;return g+f}function x(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=jc[a]||kc[b]||b}return a}function y(a){var b,d,e={};for(d in a)c(a,d)&&(b=x(d),b&&(e[b]=a[d]));return e}function z(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}tb[b]=function(e,f){var g,h,i=tb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=tb().utc().set(d,a);return i.call(tb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function A(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function B(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function C(a,b,c){return hb(tb([a,11,31+b-c]),b,c).week}function D(a){return E(a)?366:365}function E(a){return a%4===0&&a%100!==0||a%400===0}function F(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Bb]<0||a._a[Bb]>11?Bb:a._a[Cb]<1||a._a[Cb]>B(a._a[Ab],a._a[Bb])?Cb:a._a[Db]<0||a._a[Db]>24||24===a._a[Db]&&(0!==a._a[Eb]||0!==a._a[Fb]||0!==a._a[Gb])?Db:a._a[Eb]<0||a._a[Eb]>59?Eb:a._a[Fb]<0||a._a[Fb]>59?Fb:a._a[Gb]<0||a._a[Gb]>999?Gb:-1,a._pf._overflowDayOfYear&&(Ab>b||b>Cb)&&(b=Cb),a._pf.overflow=b)}function G(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function H(a){return a?a.toLowerCase().replace("_","-"):a}function I(a){for(var b,c,d,e,f=0;f<a.length;){for(e=H(a[f]).split("-"),b=e.length,c=H(a[f+1]),c=c?c.split("-"):null;b>0;){if(d=J(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&w(e,c,!0)>=b-1)break;b--}f++}return null}function J(a){var b=null;if(!Hb[a]&&Jb)try{b=tb.locale(),require("./locale/"+a),tb.locale(b)}catch(c){}return Hb[a]}function K(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(tb.isMoment(a)||v(a)?+a:+tb(a))-+c,c._d.setTime(+c._d+d),tb.updateOffset(c,!1),c):tb(a).local()}function L(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function M(a){var b,c,d=a.match(Nb);for(b=0,c=d.length;c>b;b++)d[b]=pc[d[b]]?pc[d[b]]:L(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function N(a,b){return a.isValid()?(b=O(b,a.localeData()),lc[b]||(lc[b]=M(b)),lc[b](a)):a.localeData().invalidDate()}function O(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Ob.lastIndex=0;d>=0&&Ob.test(a);)a=a.replace(Ob,c),Ob.lastIndex=0,d-=1;return a}function P(a,b){var c,d=b._strict;switch(a){case"Q":return Zb;case"DDDD":return _b;case"YYYY":case"GGGG":case"gggg":return d?ac:Rb;case"Y":case"G":case"g":return cc;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?bc:Sb;case"S":if(d)return Zb;case"SS":if(d)return $b;case"SSS":if(d)return _b;case"DDD":return Qb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ub;case"a":case"A":return b._locale._meridiemParse;case"x":return Xb;case"X":return Yb;case"Z":case"ZZ":return Vb;case"T":return Wb;case"SSSS":return Tb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?$b:Pb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Pb;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp(Y(X(a.replace("\\","")),"i"))}}function Q(a){a=a||"";var b=a.match(Vb)||[],c=b[b.length-1]||[],d=(c+"").match(hc)||["-",0,0],e=+(60*d[1])+A(d[2]);return"+"===d[0]?-e:e}function R(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Bb]=3*(A(b)-1));break;case"M":case"MM":null!=b&&(e[Bb]=A(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Bb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Cb]=A(b));break;case"Do":null!=b&&(e[Cb]=A(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=A(b));break;case"YY":e[Ab]=tb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Ab]=A(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Db]=A(b);break;case"m":case"mm":e[Eb]=A(b);break;case"s":case"ss":e[Fb]=A(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Gb]=A(1e3*("0."+b));break;case"x":c._d=new Date(A(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=Q(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=A(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=tb.parseTwoDigitYear(b)}}function S(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Ab],hb(tb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Ab],hb(tb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ib(d,e,f,h,g),a._a[Ab]=i.year,a._dayOfYear=i.dayOfYear}function T(a){var c,d,e,f,g=[];if(!a._d){for(e=V(a),a._w&&null==a._a[Cb]&&null==a._a[Bb]&&S(a),a._dayOfYear&&(f=b(a._a[Ab],e[Ab]),a._dayOfYear>D(f)&&(a._pf._overflowDayOfYear=!0),d=db(f,0,a._dayOfYear),a._a[Bb]=d.getUTCMonth(),a._a[Cb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Db]&&0===a._a[Eb]&&0===a._a[Fb]&&0===a._a[Gb]&&(a._nextDay=!0,a._a[Db]=0),a._d=(a._useUTC?db:cb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm),a._nextDay&&(a._a[Db]=24)}}function U(a){var b;a._d||(b=y(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],T(a))}function V(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function W(b){if(b._f===tb.ISO_8601)return void $(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=O(b._f,b._locale).match(Nb)||[],c=0;c<e.length;c++)f=e[c],d=(h.match(P(f,b))||[])[0],d&&(g=h.substr(0,h.indexOf(d)),g.length>0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),pc[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),R(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Db]<=12&&(b._pf.bigHour=a),b._isPm&&b._a[Db]<12&&(b._a[Db]+=12),b._isPm===!1&&12===b._a[Db]&&(b._a[Db]=0),T(b),F(b)}function X(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function Y(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;f<a._f.length;f++)g=0,b=n({},a),null!=a._useUTC&&(b._useUTC=a._useUTC),b._pf=d(),b._f=a._f[f],W(b),G(b)&&(g+=b._pf.charsLeftOver,g+=10*b._pf.unusedTokens.length,b._pf.score=g,(null==e||e>g)&&(e=g,c=b));m(a,c||b)}function $(a){var b,c,d=a._i,e=dc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=fc.length;c>b;b++)if(fc[b][1].exec(d)){a._f=fc[b][0]+(e[6]||" ");break}for(b=0,c=gc.length;c>b;b++)if(gc[b][1].exec(d)){a._f+=gc[b][0];break}d.match(Vb)&&(a._f+="Z"),W(a)}else a._isValid=!1}function _(a){$(a),a._isValid===!1&&(delete a._isValid,tb.createFromInputFallback(a))}function ab(a,b){var c,d=[];for(c=0;c<a.length;++c)d.push(b(a[c],c));return d}function bb(b){var c,d=b._i;d===a?b._d=new Date:v(d)?b._d=new Date(+d):null!==(c=Kb.exec(d))?b._d=new Date(+c[1]):"string"==typeof d?_(b):u(d)?(b._a=ab(d.slice(0),function(a){return parseInt(a,10)}),T(b)):"object"==typeof d?U(b):"number"==typeof d?b._d=new Date(d):tb.createFromInputFallback(b)}function cb(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function db(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function eb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function fb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function gb(a,b,c){var d=tb.duration(a).abs(),e=yb(d.as("s")),f=yb(d.as("m")),g=yb(d.as("h")),h=yb(d.as("d")),i=yb(d.as("M")),j=yb(d.as("y")),k=e<mc.s&&["s",e]||1===f&&["m"]||f<mc.m&&["mm",f]||1===g&&["h"]||g<mc.h&&["hh",g]||1===h&&["d"]||h<mc.d&&["dd",h]||1===i&&["M"]||i<mc.M&&["MM",i]||1===j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,fb.apply({},k)}function hb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=tb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ib(a,b,c,d,e){var f,g,h=db(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:D(a-1)+g}}function jb(b){var c,d=b._i,e=b._f;return b._locale=b._locale||tb.localeData(b._l),null===d||e===a&&""===d?tb.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),tb.isMoment(d)?new k(d,!0):(e?u(e)?Z(b):W(b):bb(b),c=new k(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function kb(a,b){var c,d;if(1===b.length&&u(b[0])&&(b=b[0]),!b.length)return tb();for(c=b[0],d=1;d<b.length;++d)b[d][a](c)&&(c=b[d]);return c}function lb(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),B(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function mb(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function nb(a,b,c){return"Month"===b?lb(a,c):a._d["set"+(a._isUTC?"UTC":"")+b](c)}function ob(a,b){return function(c){return null!=c?(nb(this,a,c),tb.updateOffset(this,b),this):mb(this,a)}}function pb(a){return 400*a/146097}function qb(a){return 146097*a/400}function rb(a){tb.duration.fn[a]=function(){return this._data[a]}}function sb(a){"undefined"==typeof ender&&(ub=xb.moment,xb.moment=a?f("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",tb):tb)}for(var tb,ub,vb,wb="2.8.4",xb="undefined"!=typeof global?global:this,yb=Math.round,zb=Object.prototype.hasOwnProperty,Ab=0,Bb=1,Cb=2,Db=3,Eb=4,Fb=5,Gb=6,Hb={},Ib=[],Jb="undefined"!=typeof module&&module&&module.exports,Kb=/^\/?Date\((\-?\d+)/i,Lb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Mb=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Nb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ob=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pb=/\d\d?/,Qb=/\d{1,3}/,Rb=/\d{1,4}/,Sb=/[+\-]?\d{1,6}/,Tb=/\d+/,Ub=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Vb=/Z|[\+\-]\d\d:?\d\d/gi,Wb=/T/i,Xb=/[\+\-]?\d+/,Yb=/[\+\-]?\d+(\.\d{1,3})?/,Zb=/\d/,$b=/\d\d/,_b=/\d{3}/,ac=/\d{4}/,bc=/[+-]?\d{6}/,cc=/[+-]?\d+/,dc=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ec="YYYY-MM-DDTHH:mm:ssZ",fc=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],gc=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],hc=/([\+\-]|\d\d)/gi,ic=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),jc={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},kc={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},lc={},mc={s:45,m:45,h:22,d:26,M:11},nc="DDD w W M D d".split(" "),oc="M D H h m s w W".split(" "),pc={M:function(){return this.month()+1},MMM:function(a){return this.localeData().monthsShort(this,a)},MMMM:function(a){return this.localeData().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.localeData().weekdaysMin(this,a)},ddd:function(a){return this.localeData().weekdaysShort(this,a)},dddd:function(a){return this.localeData().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return p(this.year()%100,2)},YYYY:function(){return p(this.year(),4)},YYYYY:function(){return p(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+p(Math.abs(a),6)},gg:function(){return p(this.weekYear()%100,2)},gggg:function(){return p(this.weekYear(),4)},ggggg:function(){return p(this.weekYear(),5)},GG:function(){return p(this.isoWeekYear()%100,2)},GGGG:function(){return p(this.isoWeekYear(),4)},GGGGG:function(){return p(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return p(A(this.milliseconds()/10),2)},SSS:function(){return p(this.milliseconds(),3)},SSSS:function(){return p(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+":"+p(A(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+p(A(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},qc={},rc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];nc.length;)vb=nc.pop(),pc[vb+"o"]=i(pc[vb],vb);for(;oc.length;)vb=oc.pop(),pc[vb+vb]=h(pc[vb],2);pc.DDDD=h(pc.DDD,3),m(j.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=tb.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=tb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return hb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),tb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),jb(g)},tb.suppressDeprecationWarnings=!1,tb.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),tb.min=function(){var a=[].slice.call(arguments,0);return kb("isBefore",a)},tb.max=function(){var a=[].slice.call(arguments,0);return kb("isAfter",a)},tb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),jb(g).utc()},tb.unix=function(a){return tb(1e3*a)},tb.duration=function(a,b){var d,e,f,g,h=a,i=null;return tb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Lb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:A(i[Cb])*d,h:A(i[Db])*d,m:A(i[Eb])*d,s:A(i[Fb])*d,ms:A(i[Gb])*d}):(i=Mb.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):"object"==typeof h&&("from"in h||"to"in h)&&(g=r(tb(h.from),tb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new l(h),tb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},tb.version=wb,tb.defaultFormat=ec,tb.ISO_8601=function(){},tb.momentProperties=Ib,tb.updateOffset=function(){},tb.relativeTimeThreshold=function(b,c){return mc[b]===a?!1:c===a?mc[b]:(mc[b]=c,!0)},tb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return tb.locale(a,b)}),tb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?tb.defineLocale(a,b):tb.localeData(a),c&&(tb.duration._locale=tb._locale=c)),tb._locale._abbr},tb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Hb[a]||(Hb[a]=new j),Hb[a].set(b),tb.locale(a),Hb[a]):(delete Hb[a],null)},tb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return tb.localeData(a)}),tb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return tb._locale;if(!u(a)){if(b=J(a))return b;a=[a]}return I(a)},tb.isMoment=function(a){return a instanceof k||null!=a&&c(a,"_isAMomentObject")},tb.isDuration=function(a){return a instanceof l};for(vb=rc.length-1;vb>=0;--vb)z(rc[vb]);tb.normalizeUnits=function(a){return x(a)},tb.invalid=function(a){var b=tb.utc(0/0);return null!=a?m(b._pf,a):b._pf.userInvalidated=!0,b},tb.parseZone=function(){return tb.apply(null,arguments).parseZone()},tb.parseTwoDigitYear=function(a){return A(a)+(A(a)>68?1900:2e3)},m(tb.fn=k.prototype,{clone:function(){return tb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=tb(this).utc();return 0<a.year()&&a.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():N(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):N(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return G(this)},isDSTShifted:function(){return this._a?this.isValid()&&w(this._a,(this._isUTC?tb.utc(this._a):tb(this._a)).toArray())>0:!1},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._dateTzOffset(),"m")),this},format:function(a){var b=N(this,a||tb.defaultFormat);return this.localeData().postformat(b)},add:s(1,"add"),subtract:s(-1,"subtract"),diff:function(a,b,c){var d,e,f,g=K(a,this),h=6e4*(this.zone()-g.zone());return b=x(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+g.daysInMonth()),e=12*(this.year()-g.year())+(this.month()-g.month()),f=this-tb(this).startOf("month")-(g-tb(g).startOf("month")),f-=6e4*(this.zone()-tb(this).startOf("month").zone()-(g.zone()-tb(g).startOf("month").zone())),e+=f/d,"year"===b&&(e/=12)):(d=this-g,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-h)/864e5:"week"===b?(d-h)/6048e5:d),c?e:o(e)},from:function(a,b){return tb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(tb(),a)},calendar:function(a){var b=a||tb(),c=K(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,tb(b)))},isLeapYear:function(){return E(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=eb(a,this.localeData()),this.add(a-b,"d")):b},month:ob("Month",!0),startOf:function(a){switch(a=x(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=x(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+this>+a):(c=tb.isMoment(a)?+a:+tb(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+a>+this):(c=tb.isMoment(a)?+a:+tb(a),+this.clone().endOf(b)<c)},isSame:function(a,b){var c;return b=x(b||"millisecond"),"millisecond"===b?(a=tb.isMoment(a)?a:tb(a),+this===+a):(c=+tb(a),+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))},min:f("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),this>a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=tb.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._dateTzOffset():("string"==typeof a&&(a=Q(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateTzOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?t(this,tb.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,tb.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?tb(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return B(this.year(),this.month())},dayOfYear:function(a){var b=yb((tb(this).startOf("day")-tb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=hb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=hb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=hb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return C(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return C(this.year(),a.dow,a.doy)},get:function(a){return a=x(a),this[a]()},set:function(a,b){return a=x(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){var c;return b===a?this._locale._abbr:(c=tb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),tb.fn.millisecond=tb.fn.milliseconds=ob("Milliseconds",!1),tb.fn.second=tb.fn.seconds=ob("Seconds",!1),tb.fn.minute=tb.fn.minutes=ob("Minutes",!1),tb.fn.hour=tb.fn.hours=ob("Hours",!0),tb.fn.date=ob("Date",!0),tb.fn.dates=f("dates accessor is deprecated. Use date instead.",ob("Date",!0)),tb.fn.year=ob("FullYear",!0),tb.fn.years=f("years accessor is deprecated. Use year instead.",ob("FullYear",!0)),tb.fn.days=tb.fn.day,tb.fn.months=tb.fn.month,tb.fn.weeks=tb.fn.week,tb.fn.isoWeeks=tb.fn.isoWeek,tb.fn.quarters=tb.fn.quarter,tb.fn.toJSON=tb.fn.toISOString,m(tb.duration.fn=l.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=o(d/1e3),g.seconds=a%60,b=o(a/60),g.minutes=b%60,c=o(b/60),g.hours=c%24,e+=o(c/24),h=o(pb(e)),e-=o(qb(h)),f+=o(e/30),e%=30,h+=o(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)},humanize:function(a){var b=gb(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=tb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=tb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=x(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=x(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*pb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(qb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;
2346 9870 case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:tb.fn.lang,locale:tb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}}),tb.duration.fn.toString=tb.duration.fn.toISOString;for(vb in ic)c(ic,vb)&&rb(vb.toLowerCase());tb.duration.fn.asMilliseconds=function(){return this.as("ms")},tb.duration.fn.asSeconds=function(){return this.as("s")},tb.duration.fn.asMinutes=function(){return this.as("m")},tb.duration.fn.asHours=function(){return this.as("h")},tb.duration.fn.asDays=function(){return this.as("d")},tb.duration.fn.asWeeks=function(){return this.as("weeks")},tb.duration.fn.asMonths=function(){return this.as("M")},tb.duration.fn.asYears=function(){return this.as("y")},tb.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===A(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Jb?module.exports=tb:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(xb.moment=ub),tb}),sb(!0)):sb()}).call(this);
2347 ;!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null===n?0/0:+n}function e(n){return!isNaN(n)}function r(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function u(n){return n.length}function i(n){for(var t=1;n*t%1;)t*=10;return t}function o(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function a(){this._=Object.create(null)}function c(n){return(n+="")===da||n[0]===ma?ma+n:n}function l(n){return(n+="")[0]===ma?n.slice(1):n}function s(n){return c(n)in this._}function f(n){return(n=c(n))in this._&&delete this._[n]}function h(){var n=[];for(var t in this._)n.push(l(t));return n}function g(){var n=0;for(var t in this._)++n;return n}function p(){for(var n in this._)return!1;return!0}function v(){this._=Object.create(null)}function d(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function m(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=ya.length;r>e;++e){var u=ya[e]+t;if(u in n)return u}}function y(){}function M(){}function x(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new a;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function b(){ta.event.preventDefault()}function _(){for(var n,t=ta.event;n=t.sourceEvent;)t=n;return t}function w(n){for(var t=new M,e=0,r=arguments.length;++e<r;)t[arguments[e]]=x(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=ta.event;u.target=n,ta.event=u,t[u.type].apply(e,r)}finally{ta.event=i}}},t}function S(n){return xa(n,ka),n}function k(n){return"function"==typeof n?n:function(){return ba(n,this)}}function E(n){return"function"==typeof n?n:function(){return _a(n,this)}}function A(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ta.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function N(n){return n.trim().replace(/\s+/g," ")}function C(n){return new RegExp("(?:^|\\s+)"+ta.requote(n)+"(?:\\s+|$)","g")}function z(n){return(n+"").trim().split(/^|\s+/)}function q(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=z(n).map(L);var u=n.length;return"function"==typeof t?r:e}function L(n){var t=C(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",N(u+" "+n))):e.setAttribute("class",N(u.replace(t," ")))}}function T(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function R(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function D(n){return"function"==typeof n?n:(n=ta.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function P(){var n=this.parentNode;n&&n.removeChild(this)}function U(n){return{__data__:n}}function j(n){return function(){return Sa(this,n)}}function F(t){return arguments.length||(t=n),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function H(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function O(n){return xa(n,Aa),n}function Y(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function I(n){var t=n.__transition__;t&&++t.active}function Z(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,ra(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+ta.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=V;a>0&&(n=n.slice(0,a));var l=Ca.get(n);return l&&(n=l,c=X),a?t?u:r:t?y:i}function V(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function X(n,t){var e=V(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function $(){var n=".dragsuppress-"+ ++qa,t="click"+n,e=ta.select(oa).on("touchmove"+n,b).on("dragstart"+n,b).on("selectstart"+n,b);if(za){var r=ia.style,u=r[za];r[za]="none"}return function(i){if(e.on(n,null),za&&(r[za]=u),i){var o=function(){e.on(t,null)};e.on(t,function(){b(),o()},!0),setTimeout(o,0)}}}function B(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>La&&(oa.scrollX||oa.scrollY)){e=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();La=!(u.f||u.e),e.remove()}return La?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function W(){return ta.event.changedTouches[0].identifier}function J(){return ta.event.target}function G(){return oa}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?Da:Math.acos(n)}function tt(n){return n>1?ja:-1>n?-ja:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Fa)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Ja,r=pt(r)*Ga,i=pt(i)*Ka,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Ha,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,255&n>>8,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=tc.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Ja),u=vt((.2126729*n+.7151522*t+.072175*e)/Ga),i=vt((.0193339*n+.119192*t+.9503041*e)/Ka);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return n}function Nt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Ct(t,e,n,r)}}function Ct(n,t,e,r){function u(){var n,t=c.status;if(!t&&qt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!oa.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(zt(r))}function zt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function qt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Lt(){var n=Tt(),t=Rt()-n;t>24?(isFinite(t)&&(clearTimeout(ic),ic=setTimeout(Lt,t)),uc=0):(uc=1,ac(Lt))}function Tt(){var n=Date.now();for(oc=ec;oc;)n>=oc.t&&(oc.f=oc.c(n-oc.t)),oc=oc.n;return n}function Rt(){for(var n,t=ec,e=1/0;t;)t.f?t=n?n.n=t.n:ec=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return rc=n,e}function Dt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Pt(n,t){var e=Math.pow(10,3*va(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Ut(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:At;return function(n){var e=lc.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=sc.get(g)||jt;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function jt(n){return n+""}function Ft(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new hc(e-1)),1),e}function i(n,e){return t(n=new hc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{hc=Ft;var r=new Ft;return r._=n,o(r,t,e)}finally{hc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ot(n);return c.floor=c,c.round=Ot(r),c.ceil=Ot(u),c.offset=Ot(i),c.range=a,n}function Ot(n){return function(t,e){try{hc=Ft;var r=new Ft;return r._=t,n(r,e)._}finally{hc=Date}}}function Yt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(c,a)),null!=(u=pc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=N[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.slice(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&hc!==Ft,o=new(i?Ft:hc);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(0|r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,l=e.length;c>a;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in pc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{hc=Ft;var t=new hc;return t._=n,r(t)}finally{hc=Date}}var r=t(n);return e.parse=function(n){try{hc=Ft;var t=r.parse(n);return t&&t._}finally{hc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ce;var M=ta.map(),x=Zt(v),b=Vt(v),_=Zt(d),w=Vt(d),S=Zt(m),k=Vt(m),E=Zt(y),A=Vt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+fc.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(fc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(fc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:oe,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:ne,e:ne,H:ee,I:ee,j:te,L:ie,m:Qt,M:re,p:s,S:ue,U:$t,w:Xt,W:Bt,x:c,X:l,y:Jt,Y:Wt,Z:Gt,"%":ae};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Zt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Vt(n){for(var t=new a,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Xt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function $t(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Bt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Wt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Jt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.y=Kt(+r[0]),e+r[0].length):-1}function Gt(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Kt(n){return n+(n>68?1900:2e3)}function Qt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function ne(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function te(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function ee(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function re(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ue(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ie(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function oe(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=0|va(t)/60,u=va(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function ae(n,t,e){dc.lastIndex=0;var r=dc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ce(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function le(){}function se(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function fe(n,t){n&&xc.hasOwnProperty(n.type)&&xc[n.type](n,t)}function he(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ge(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)he(n[e],t,1);t.polygonEnd()}function pe(){function n(n,t){n*=Fa,t=t*Fa/2+Da/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);_c.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;wc.point=function(o,a){wc.point=n,r=(t=o)*Fa,u=Math.cos(a=(e=a)*Fa/2+Da/4),i=Math.sin(a)},wc.lineEnd=function(){n(t,e)}}function ve(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function de(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function me(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function ye(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Me(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function be(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function _e(n,t){return va(n[0]-t[0])<Ta&&va(n[1]-t[1])<Ta}function we(n,t){n*=Fa;var e=Math.cos(t*=Fa);Se(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Se(n,t,e){++Sc,Ec+=(n-Ec)/Sc,Ac+=(t-Ac)/Sc,Nc+=(e-Nc)/Sc}function ke(){function n(n,u){n*=Fa;var i=Math.cos(u*=Fa),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),l=Math.atan2(Math.sqrt((l=e*c-r*a)*l+(l=r*o-t*c)*l+(l=t*a-e*o)*l),t*o+e*a+r*c);kc+=l,Cc+=l*(t+(t=o)),zc+=l*(e+(e=a)),qc+=l*(r+(r=c)),Se(t,e,r)}var t,e,r;Dc.point=function(u,i){u*=Fa;var o=Math.cos(i*=Fa);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),Dc.point=n,Se(t,e,r)}}function Ee(){Dc.point=we}function Ae(){function n(n,t){n*=Fa;var e=Math.cos(t*=Fa),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),l=u*c-i*a,s=i*o-r*c,f=r*a-u*o,h=Math.sqrt(l*l+s*s+f*f),g=r*o+u*a+i*c,p=h&&-nt(g)/h,v=Math.atan2(h,g);Lc+=p*l,Tc+=p*s,Rc+=p*f,kc+=v,Cc+=v*(r+(r=o)),zc+=v*(u+(u=a)),qc+=v*(i+(i=c)),Se(r,u,i)}var t,e,r,u,i;Dc.point=function(o,a){t=o,e=a,Dc.point=n,o*=Fa;var c=Math.cos(a*=Fa);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),Se(r,u,i)},Dc.lineEnd=function(){n(t,e),Dc.lineEnd=Ee,Dc.point=we}}function Ne(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ce(){return!0}function ze(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(_e(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new Le(e,n,null,!0),l=new Le(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new Le(r,n,null,!1),l=new Le(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),qe(i),qe(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qe(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Le(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Te(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function l(){y.point=o,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,o=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Re))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=He(m,p);g.length?(b||(i.polygonStart(),b=!0),ze(g,Pe,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=De(),x=t(M),b=!1;return y}}function Re(n){return n.length>1}function De(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:y,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Pe(n,t){return((n=n.x)[0]<0?n[1]-ja-Ta:ja-n[1])-((t=t.x)[0]<0?t[1]-ja-Ta:ja-t[1])}function Ue(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Da:-Da,c=va(i-e);va(c-Da)<Ta?(n.point(e,r=(r+o)/2>0?ja:-ja),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Da&&(va(e-u)<Ta&&(e-=u*Ta),va(i-a)<Ta&&(i-=a*Ta),r=je(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function je(n,t,e,r){var u,i,o=Math.sin(n-e);return va(o)>Ta?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function Fe(n,t,e,r){var u;if(null==n)u=e*ja,r.point(-Da,u),r.point(0,u),r.point(Da,u),r.point(Da,0),r.point(Da,-u),r.point(0,-u),r.point(-Da,-u),r.point(-Da,0),r.point(-Da,u);else if(va(n[0]-t[0])>Ta){var i=n[0]<t[0]?Da:-Da;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function He(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;_c.reset();for(var a=0,c=t.length;c>a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+Da/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+Da/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>Da,k=p*M;if(_c.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Pa:b,S^h>=e^m>=e){var E=me(ve(f),ve(n));xe(E);var A=me(u,E);xe(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ta>i||Ta>i&&0>_c)^1&o}function Oe(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Da:-Da),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(_e(e,g)||_e(p,g))&&(p[0]+=Ta,p[1]+=Ta,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&_e(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=ve(n),u=ve(t),o=[1,0,0],a=me(r,u),c=de(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=me(o,a),p=Me(o,f),v=Me(a,h);ye(p,v);var d=g,m=de(p,d),y=de(d,d),M=m*m-y*(de(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=Me(d,(-m-x)/y);if(ye(b,p),b=be(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=va(A-Da)<Ta,C=N||Ta>A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(va(b[0]-w)<Ta?k:E):k<=b[1]&&b[1]<=E:A>Da^(w<=b[0]&&b[0]<=S)){var z=Me(d,(-m+x)/y);return ye(z,p),[b,be(z)]}}}function u(t,e){var r=o?n:Da-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=va(i)>Ta,c=pr(n,6*Fa);return Te(t,e,c,o?[0,-n]:[-Da,n-Da])}function Ye(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return va(r[0]-n)<Ta?u>0?0:3:va(r[0]-e)<Ta?u>0?2:1:va(r[1]-t)<Ta?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Uc,Math.min(Uc,n)),t=Math.max(-Uc,Math.min(Uc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=De(),N=Ye(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&ze(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ze(n){var t=0,e=Da/3,r=or(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Da/180,e=n[1]*Da/180):[180*(t/Da),180*(e/Da)]},u}function Ve(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Xe(){function n(n,t){Fc+=u*n-r*t,r=n,u=t}var t,e,r,u;Zc.point=function(i,o){Zc.point=n,t=r=i,e=u=o},Zc.lineEnd=function(){n(t,e)}}function $e(n,t){Hc>n&&(Hc=n),n>Yc&&(Yc=n),Oc>t&&(Oc=t),t>Ic&&(Ic=t)}function Be(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=We(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=We(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function We(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Je(n,t){Ec+=n,Ac+=t,++Nc}function Ge(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);Cc+=o*(t+n)/2,zc+=o*(e+r)/2,qc+=o,Je(t=n,e=r)}var t,e;Xc.point=function(r,u){Xc.point=n,Je(t=r,e=u)}}function Ke(){Xc.point=Je}function Qe(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);Cc+=o*(r+n)/2,zc+=o*(u+t)/2,qc+=o,o=u*n-r*t,Lc+=o*(r+n),Tc+=o*(u+t),Rc+=3*o,Je(r=n,u=t)}var t,e,r,u;Xc.point=function(i,o){Xc.point=n,Je(t=r=i,e=u=o)},Xc.lineEnd=function(){n(t,e)}}function nr(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Pa)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:y};return a}function tr(n){function t(n){return(a?r:e)(n)}function e(t){return ur(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=ve([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=va(va(w)-1)<Ta||va(r-h)<Ta?(r+h)/2:Math.atan2(_,b),A=n(E,k),N=A[0],C=A[1],z=N-t,q=C-e,L=M*z-y*q;
2348 (L*L/x>i||va((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Fa),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function er(n){var t=tr(function(t,e){return n([t*Ha,e*Ha])});return function(n){return ar(t(n))}}function rr(n){this.stream=n}function ur(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ir(n){return or(function(){return n})()}function or(n){function t(n){return n=a(n[0]*Fa,n[1]*Fa),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Ha,n[1]*Ha]}function r(){a=Ne(o=sr(m,y,M),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=tr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,M=0,x=Pc,b=At,_=null,w=null;return t.stream=function(n){return s&&(s.valid=!1),s=ar(x(o,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(x=null==n?(_=n,Pc):Oe((_=+n)*Fa),u()):_},t.clipExtent=function(n){return arguments.length?(w=n,b=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):At,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Fa,d=n[1]%360*Fa,r()):[v*Ha,d*Ha]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Fa,y=n[1]%360*Fa,M=n.length>2?n[2]%360*Fa:0,r()):[m*Ha,y*Ha,M*Ha]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function ar(n){return ur(n,function(t,e){n.point(t*Fa,e*Fa)})}function cr(n,t){return[n,t]}function lr(n,t){return[n>Da?n-Pa:-Da>n?n+Pa:n,t]}function sr(n,t,e){return n?t||e?Ne(hr(n),gr(t,e)):hr(n):t||e?gr(t,e):lr}function fr(n){return function(t,e){return t+=n,[t>Da?t-Pa:-Da>t?t+Pa:t,e]}}function hr(n){var t=fr(n);return t.invert=fr(-n),t}function gr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function pr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=vr(e,u),i=vr(e,i),(o>0?i>u:u>i)&&(u+=o*Pa)):(u=n+o*Pa,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=be([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function vr(n,t){var e=ve(t);e[0]-=n,xe(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ta)%(2*Math.PI)}function dr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function mr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function yr(n){return n.source}function Mr(n){return n.target}function xr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Ha,Math.atan2(o,Math.sqrt(r*r+u*u))*Ha]}:function(){return[n*Ha,t*Ha]};return p.distance=h,p}function br(){function n(n,u){var i=Math.sin(u*=Fa),o=Math.cos(u),a=va((n*=Fa)-t),c=Math.cos(a);$c+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Bc.point=function(u,i){t=u*Fa,e=Math.sin(i*=Fa),r=Math.cos(i),Bc.point=n},Bc.lineEnd=function(){Bc.point=Bc.lineEnd=y}}function _r(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function wr(n,t){function e(n,t){o>0?-ja+Ta>t&&(t=-ja+Ta):t>ja-Ta&&(t=ja-Ta);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Da/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-ja]},e):kr}function Sr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return va(u)<Ta?cr:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function kr(n,t){return[n,Math.log(Math.tan(Da/4+t/2))]}function Er(n){var t,e=ir(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Da*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Ar(n,t){return[Math.log(Math.tan(Da/4+t/2)),-n]}function Nr(n){return n[0]}function Cr(n){return n[1]}function zr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qr(n,t){return n[0]-t[0]||n[1]-t[1]}function Lr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Tr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Rr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Dr(){eu(this),this.edge=this.site=this.circle=null}function Pr(n){var t=ol.pop()||new Dr;return t.site=n,t}function Ur(n){$r(n),rl.remove(n),ol.push(n),eu(n)}function jr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Ur(n);for(var c=i;c.circle&&va(e-c.circle.x)<Ta&&va(r-c.circle.cy)<Ta;)i=c.P,a.unshift(c),Ur(c),c=i;a.unshift(c),$r(c);for(var l=o;l.circle&&va(e-l.circle.x)<Ta&&va(r-l.circle.cy)<Ta;)o=l.N,a.push(l),Ur(l),l=o;a.push(l),$r(l);var s,f=a.length;for(s=1;f>s;++s)l=a[s],c=a[s-1],Qr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Gr(c.site,l.site,null,u),Xr(c),Xr(l)}function Fr(n){for(var t,e,r,u,i=n.x,o=n.y,a=rl._;a;)if(r=Hr(a,o)-i,r>Ta)a=a.L;else{if(u=i-Or(a,o),!(u>Ta)){r>-Ta?(t=a.P,e=a):u>-Ta?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Pr(n);if(rl.insert(t,c),t||e){if(t===e)return $r(t),e=Pr(t.site),rl.insert(c,e),c.edge=e.edge=Gr(t.site,c.site),Xr(t),Xr(e),void 0;if(!e)return c.edge=Gr(t.site,c.site),void 0;$r(t),$r(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Qr(e.edge,l,p,x),c.edge=Gr(l,n,null,x),e.edge=Gr(n,p,null,x),Xr(t),Xr(e)}}function Hr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Or(n,t){var e=n.N;if(e)return Hr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Yr(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=el,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(va(r-t)>Ta||va(u-e)>Ta)&&(a.splice(o,0,new nu(Kr(i.site,s,va(r-f)<Ta&&p-u>Ta?{x:f,y:va(t-f)<Ta?e:p}:va(u-p)<Ta&&h-r>Ta?{x:va(e-p)<Ta?t:h,y:p}:va(r-h)<Ta&&u-g>Ta?{x:h,y:va(t-h)<Ta?e:g}:va(u-g)<Ta&&r-f>Ta?{x:va(e-g)<Ta?t:f,y:g}:null),i.site,null)),++c)}function Zr(n,t){return t.angle-n.angle}function Vr(){eu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,l=r.y-a,s=i.x-o,f=i.y-a,h=2*(c*f-l*s);if(!(h>=-Ra)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=al.pop()||new Vr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=il._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}il.insert(y,m),y||(ul=m)}}}}function $r(n){var t=n.circle;t&&(t.P||(ul=t.N),il.remove(t),al.push(t),eu(t),n.circle=null)}function Br(n){for(var t,e=tl,r=Ye(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Wr(t,n)||!r(t)||va(t.a.x-t.b.x)<Ta&&va(t.a.y-t.b.y)<Ta)&&(t.a=t.b=null,e.splice(u,1))}function Wr(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],l=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.y<c)return}else i={x:d,y:l};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.y<c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Jr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Gr(n,t,e,r){var u=new Jr(n,t);return tl.push(u),e&&Qr(u,n,t,e),r&&Qr(u,t,n,r),el[n.i].edges.push(new nu(u,n,t)),el[t.i].edges.push(new nu(u,t,n)),u}function Kr(n,t,e){var r=new Jr(n,null);return r.a=t,r.b=e,tl.push(r),r}function Qr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function nu(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function tu(){this._=null}function eu(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ru(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function uu(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function iu(n){for(;n.L;)n=n.L;return n}function ou(n,t){var e,r,u,i=n.sort(au).pop();for(tl=[],el=new Array(n.length),rl=new tu,il=new tu;;)if(u=ul,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(el[i.i]=new Yr(i),Fr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;jr(u.arc)}t&&(Br(t),Ir(t));var o={cells:el,edges:tl};return rl=il=tl=el=null,o}function au(n,t){return t.y-n.y||t.x-n.x}function cu(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function lu(n){return n.x}function su(n){return n.y}function fu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hu(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&hu(n,c[0],e,r,o,a),c[1]&&hu(n,c[1],o,r,u,a),c[2]&&hu(n,c[2],e,a,o,i),c[3]&&hu(n,c[3],o,a,u,i)}}function gu(n,t,e,r,u,i,o){var a,c=1/0;return function l(n,s,f,h,g){if(!(s>i||f>o||r>h||u>g)){if(p=n.point){var p,v=t-p[0],d=e-p[1],m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function pu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function vu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=yu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function du(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mu(n,t){var e,r,u,i=ll.lastIndex=sl.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=ll.exec(n))&&(r=sl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:du(e,r)})),i=sl.lastIndex;return i<t.length&&(u=t.slice(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var e,r=0;t>r;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function yu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function Mu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(yu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function xu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function bu(n){return function(t){return 1-n(1-t)}}function _u(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function wu(n){return n*n}function Su(n){return n*n*n}function ku(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Eu(n){return function(t){return Math.pow(t,n)}}function Au(n){return 1-Math.cos(n*ja)}function Nu(n){return Math.pow(2,10*(n-1))}function Cu(n){return 1-Math.sqrt(1-n*n)}function zu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Pa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Pa/t)}}function qu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Lu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Tu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Pu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Uu(n){var t=[n.a,n.b],e=[n.c,n.d],r=Fu(t),u=ju(t,e),i=Fu(Hu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ha,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ha:0}function ju(n,t){return n[0]*t[0]+n[1]*t[1]}function Fu(n){var t=Math.sqrt(ju(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Hu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ou(n,t){var e,r=[],u=[],i=ta.transform(n),o=ta.transform(t),a=i.translate,c=o.translate,l=i.rotate,s=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:du(a[0],c[0])},{i:3,x:du(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:du(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:du(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:du(g[0],p[0])},{i:e-2,x:du(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Yu(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Iu(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Zu(n){for(var t=n.source,e=n.target,r=Xu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Vu(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Xu(n,t){if(n===t)return n;for(var e=Vu(n),r=Vu(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function $u(n){n.fixed|=2}function Bu(n){n.fixed&=-7}function Wu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Ju(n){n.fixed&=-5}function Gu(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Gu(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*e[n.point.index];n.charge+=n.pointCharge=l,r+=l*n.point.x,u+=l*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Ku(n,t){return ta.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=ui,n}function Qu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function ni(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++o<u;)e.push(i[o]);for(;null!=(n=r.pop());)t(n)}function ti(n){return n.children}function ei(n){return n.value}function ri(n,t){return t.value-n.value}function ui(n){return ta.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ii(n){return n.x}function oi(n){return n.y}function ai(n,t,e){n.y0=t,n.y=e}function ci(n){return ta.range(n.length)}function li(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function si(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function fi(n){return n.reduce(hi,0)}function hi(n,t){return n+t[1]}function gi(n,t){return pi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function pi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function vi(n){return[ta.min(n),ta.max(n)]}function di(n,t){return n.value-t.value}function mi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function yi(n,t){n._pack_next=t,t._pack_prev=n}function Mi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function xi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(bi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],Si(r,u,i),t(i),mi(r,i),r._pack_prev=i,mi(i,u),u=r._pack_next,o=3;l>o;o++){Si(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(Mi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!Mi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?yi(r,u=a):yi(r=c,u),o--):(mi(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(o=0;l>o;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(_i)}}function bi(n){n._pack_next=n._pack_prev=n}function _i(n){delete n._pack_next,delete n._pack_prev}function wi(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)wi(u[i],t,e,r)}function Si(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),l=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+l*i,e.y=n.y+c*i-l*u}else e.x=n.x+r,e.y=n.y}function ki(n,t){return n.parent==t.parent?1:2}function Ei(n){var t=n.children;return t.length?t[0]:n.t}function Ai(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ni(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Ci(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function zi(n,t,e){return n.a.parent===t.parent?n.a:e}function qi(n){return 1+ta.max(n,function(n){return n.y})}function Li(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ti(n){var t=n.children;return t&&t.length?Ti(t[0]):n}function Ri(n){var t,e=n.children;return e&&(t=e.length)?Ri(e[t-1]):n}function Di(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Pi(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Ui(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function ji(n){return n.rangeExtent?n.rangeExtent():Ui(n.range())}function Fi(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Hi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Oi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:bl}function Yi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=ta.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Ii(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Yi:Fi,c=r?Iu:Yu;return o=u(n,t,c,e),a=u(t,n,c,yu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Pu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return $i(n,t)},i.tickFormat=function(t,e){return Bi(n,t,e)},i.nice=function(t){return Vi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Zi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Vi(n,t){return Hi(n,Oi(Xi(n,t)[2]))}function Xi(n,t){null==t&&(t=10);var e=Ui(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function $i(n,t){return ta.range.apply(ta,Xi(n,t))}function Bi(n,t,e){var r=Xi(n,t);if(e){var u=lc.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(va(r[0]),va(r[1])));return u[7]||(u[7]="."+Wi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Ji(u[8],r)),e=u.join("")}else e=",."+Wi(r[2])+"f";return ta.format(e)}function Wi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Ji(n,t){var e=Wi(t[2]);return n in _l?Math.abs(e-Wi(Math.max(va(t[0]),va(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Gi(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Hi(r.map(u),e?Math:Sl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Ui(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++<s;)for(var h=f-1;h>0;h--)o.push(i(l)*h);for(l=0;o[l]<a;l++);for(s=o.length;o[s-1]>c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return wl;arguments.length<2?t=wl:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Gi(n.copy(),t,e,r)},Zi(o,n)}function Ki(n,t,e){function r(t){return n(u(t))}var u=Qi(t),i=Qi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return $i(e,n)},r.tickFormat=function(n,t){return Bi(e,n,t)},r.nice=function(n){return r.domain(Vi(e,n))},r.exponent=function(o){return arguments.length?(u=Qi(t=o),i=Qi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Ki(n.copy(),t,e)},Zi(r,n)}function Qi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function no(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new a;for(var i,o=-1,c=r.length;++o<c;)u.has(i=r[o])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,o=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=(c+l)/2,0):(l-c)/(n.length-1+a);return i=r(c+s*a/2,s),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=l=Math.round((c+l)/2),0):0|(l-c)/(n.length-1+a);return i=r(c+Math.round(s*a/2+(l-c-(n.length-1+a)*s)/2),s),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=(f-s)/(n.length-a+2*c);return i=r(s+h*c,h),l&&i.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=Math.floor((f-s)/(n.length-a+2*c));return i=r(s+Math.round((f-s-(n.length-a)*h)/2),h),l&&i.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Ui(t.a[0])},e.copy=function(){return no(n,t)},e.domain(n)}function to(r,u){function i(){var n=0,t=u.length;for(a=[];++n<t;)a[n-1]=ta.quantile(r,n/t);return o}function o(n){return isNaN(n=+n)?void 0:u[ta.bisect(a,n)]}var a;return o.domain=function(u){return arguments.length?(r=u.map(t).filter(e).sort(n),i()):r},o.range=function(n){return arguments.length?(u=n,i()):u},o.quantiles=function(){return a},o.invertExtent=function(n){return n=u.indexOf(n),0>n?[0/0,0/0]:[n>0?a[n-1]:r[0],n<a.length?a[n]:r[r.length-1]]},o.copy=function(){return to(r,u)},i()}function eo(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return eo(n,t,e)},u()}function ro(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ro(n,t)},e}function uo(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return $i(n,t)},t.tickFormat=function(t,e){return Bi(n,t,e)},t.copy=function(){return uo(n)},t}function io(){return 0}function oo(n){return n.innerRadius}function ao(n){return n.outerRadius}function co(n){return n.startAngle}function lo(n){return n.endAngle}function so(n){return n&&n.padAngle}function fo(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function ho(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function go(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f<h;)u.call(this,c=t[f],f)?s.push([+g.call(this,c,f),+p.call(this,c,f)]):s.length&&(o(),s=[]);return s.length&&o(),l.length?l.join(""):null}var e=Nr,r=Cr,u=Ce,i=po,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=zl.get(n)||po).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function po(n){return n.join("L")}function vo(n){return po(n)+"Z"}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function yo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function xo(n,t){return n.length<4?po(n):n[1]+wo(n.slice(1,-1),So(n,t))}function bo(n,t){return n.length<3?po(n):n[0]+wo((n.push(n[0]),n),So([n[n.length-2]].concat(n,[n[1]]),t))}function _o(n,t){return n.length<3?po(n):n[0]+wo(n,So(n,t))}function wo(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return po(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l<t.length;l++,c++)i=n[c],a=t[l],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var s=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function So(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function ko(n){if(n.length<3)return po(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",Co(Tl,o),",",Co(Tl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),zo(c,o,a);return n.pop(),c.push("L",r),c.join("")}function Eo(n){if(n.length<4)return po(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(Co(Tl,i)+","+Co(Tl,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),zo(e,i,o);return e.join("")}function Ao(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[Co(Tl,o),",",Co(Tl,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),zo(t,o,a);return t.join("")}function No(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,l=-1;++l<=e;)r=n[l],u=l/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return ko(n)}function Co(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function zo(n,t,e){n.push("C",Co(ql,t),",",Co(ql,e),",",Co(Ll,t),",",Co(Ll,e),",",Co(Tl,t),",",Co(Tl,e))}function qo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Lo(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=qo(u,i);++t<e;)r[t]=(o+(o=qo(u=i,i=n[t+1])))/2;return r[t]=o,r}function To(n){for(var t,e,r,u,i=[],o=Lo(n),a=-1,c=n.length-1;++a<c;)t=qo(n[a],n[a+1]),va(t)<Ta?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Ro(n){return n.length<3?po(n):n[0]+wo(n,To(n))}function Do(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-ja,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Po(n){function t(t){function c(){v.push("M",a(n(m),f),s,l(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=Et(e),b=Et(u),_=e===r?function(){return g}:Et(r),w=u===i?function(){return p}:Et(i);++y<M;)o.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=Nr,r=Nr,u=0,i=Cr,o=Ce,a=po,c=a.key,l=a,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=zl.get(n)||po).key,l=a.reverse||a,s=a.closed?"M":"L",t):c
2349 },t.tension=function(n){return arguments.length?(f=n,t):f},t}function Uo(n){return n.radius}function jo(n){return[n.x,n.y]}function Fo(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-ja;return[e*Math.cos(r),e*Math.sin(r)]}}function Ho(){return 64}function Oo(){return"circle"}function Yo(n){var t=Math.sqrt(n/Da);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Io(n,t,e){return xa(n,Fl),n.namespace=t,n.id=e,n}function Zo(n,t,e,r){var u=n.id,i=n.namespace;return H(n,"function"==typeof e?function(n,o,a){n[i][u].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Vo(n){return null==n&&(n=""),function(){this.textContent=n}}function Xo(n){return null==n?"__transition__":"__transition_"+n+"__"}function $o(n,t,e,r,u){var i=n[e]||(n[e]={active:0,count:0}),o=i[r];if(!o){var c=u.time;o=i[r]={tween:new a,time:c,delay:u.delay,duration:u.duration,ease:u.ease},u=null,++i.count,ta.timer(function(u){function a(e){return i.active>r?s(!1):(i.active=r,o.event&&o.event.start.call(n,g,t),o.tween.forEach(function(e,r){(r=r.call(n,g,t))&&d.push(r)}),h=o.ease,f=o.duration,ta.timer(function(){return v.c=l(e||1)?Ce:l,1},0,c),void 0)}function l(t){if(i.active!==r)return s(!1);for(var e=t/f,u=h(e),o=d.length;o>0;)d[--o].call(n,u);return e>=1?s(!0):void 0}function s(u){return o.event&&o.event[u?"end":"interrupt"].call(n,g,t),--i.count?delete i[r]:delete n[e],1}var f,h,g=n.__data__,p=o.delay,v=oc,d=[];return v.t=p+c,u>=p?a(u-p):(v.c=a,void 0)},0,c)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Bl,u);return i==Bl.length?[t.year,Xi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Bl[i-1]<Bl[i]/u?i-1:i]:[Gl,Xi(n,e)[2]]}return r.invert=function(t){return Ko(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Ko)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Ko(+e+1),t).length}var i=r.domain(),o=Ui(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Hi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Ui(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Zi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.0"};Date.now||(Date.now=function(){return+new Date});var ea=[].slice,ra=function(n){return ea.call(n)},ua=document,ia=ua.documentElement,oa=window;try{ra(ia.childNodes)[0].nodeType}catch(aa){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{ua.createElement("div").style.setProperty("opacity",0,"")}catch(ca){var la=oa.Element.prototype,sa=la.setAttribute,fa=la.setAttributeNS,ha=oa.CSSStyleDeclaration.prototype,ga=ha.setProperty;la.setAttribute=function(n,t){sa.call(this,n,t+"")},la.setAttributeNS=function(n,t,e){fa.call(this,n,t,e+"")},ha.setProperty=function(n,t,e){ga.call(this,n,t+"",e)}}ta.ascending=n,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var r,u=0,i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)e(r=+n[o])&&(u+=r);else for(;++o<i;)e(r=+t.call(n,n[o],o))&&(u+=r);return u},ta.mean=function(n,r){var u,i=0,o=n.length,a=-1,c=o;if(1===arguments.length)for(;++a<o;)e(u=t(n[a]))?i+=u:--c;else for(;++a<o;)e(u=t(r.call(n,n[a],a)))?i+=u:--c;return c?i/c:void 0},ta.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},ta.median=function(r,u){var i,o=[],a=r.length,c=-1;if(1===arguments.length)for(;++c<a;)e(i=t(r[c]))&&o.push(i);else for(;++c<a;)e(i=t(u.call(r,r[c],c)))&&o.push(i);return o.length?ta.quantile(o.sort(n),.5):void 0};var pa=r(n);ta.bisectLeft=pa.left,ta.bisect=ta.bisectRight=pa.right,ta.bisector=function(t){return r(1===t.length?function(e,r){return n(t(e),r)}:t)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=0|Math.random()*i--,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,u),e=new Array(t);++n<t;)for(var r,i=-1,o=e[n]=new Array(r);++i<r;)o[i]=arguments[i][n];return e},ta.transpose=function(n){return ta.zip.apply(ta,n)},ta.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ta.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ta.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ta.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var va=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/e)throw new Error("infinite range");var r,u=[],o=i(va(e)),a=-1;if(n*=o,t*=o,e*=o,0>e)for(;(r=n+e*++a)>t;)u.push(r/o);else for(;(r=n+e*++a)<t;)u.push(r/o);return u},ta.map=function(n,t){var e=new a;if(n instanceof a)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var o in n)e.set(o,n[o]);return e};var da="__proto__",ma="\x00";o(a,{has:s,get:function(n){return this._[c(n)]},set:function(n,t){return this._[c(n)]=t},remove:f,keys:h,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:l(t),value:this._[t]});return n},size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t),this._[t])}}),ta.nest=function(){function n(t,o,c){if(c>=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var l,s,f,h,g=-1,p=o.length,v=i[c++],d=new a;++g<p;)(h=d.get(l=v(s=o[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,c))}):(s={},f=function(e,r){s[e]=n(t,r,c)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new v;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},o(v,{has:s,add:function(n){return this._[c(n+="")]=!0,n},remove:f,values:h,size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=d(n,t,t[e]);return n};var ya=["webkit","ms","moz","Moz","o","O"];ta.dispatch=function(){for(var n=new M,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=x(n);return n},M.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(Ma,"\\$&")};var Ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,xa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ba=function(n,t){return t.querySelector(n)},_a=function(n,t){return t.querySelectorAll(n)},wa=ia.matches||ia[m(ia,"matchesSelector")],Sa=function(n,t){return wa.call(n,t)};"function"==typeof Sizzle&&(ba=function(n,t){return Sizzle(n,t)[0]||null},_a=Sizzle,Sa=Sizzle.matchesSelector),ta.selection=function(){return Na};var ka=ta.selection.prototype=[];ka.select=function(n){var t,e,r,u,i=[];n=k(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,l=r.length;++c<l;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return S(i)},ka.selectAll=function(n){var t,e,r=[];n=E(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=ra(n.call(e,e.__data__,a,u))),t.parentNode=e);return S(r)};var Ea={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ta.ns={prefix:Ea,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.slice(0,t),n=n.slice(t+1)),Ea.hasOwnProperty(e)?{space:Ea[e],local:n}:n}},ka.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(A(t,n[t]));return this}return this.each(A(n,t))},ka.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=z(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!C(n[u]).test(t))return!1;return!0}for(t in n)this.each(q(t,n[t]));return this}return this.each(q(n,t))},ka.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(T(e,n[e],t));return this}if(2>r)return oa.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(T(n,t,e))},ka.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},ka.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},ka.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},ka.append=function(n){return n=D(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},ka.insert=function(n,t){return n=D(n),t=k(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},ka.remove=function(){return this.each(P)},ka.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new a,y=new Array(o);for(r=-1;++r<o;)m.has(d=t.call(u=n[r],u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d;for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=U(i),m.set(d,!0);for(r=-1;++r<o;)m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=U(i);for(;f>r;++r)p[r]=U(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),l.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++i<o;)(u=r[i])&&(n[i]=u.__data__);return n}var c=O([]),l=S([]),s=S([]);if("function"==typeof n)for(;++i<o;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<o;)e(r=this[i],n);return l.enter=function(){return c},l.exit=function(){return s},l},ka.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},ka.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return S(u)},ka.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},ka.sort=function(n){n=F.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},ka.each=function(n){return H(this,function(t,e,r){n.call(t,t.__data__,e,r)})},ka.call=function(n){var t=ra(arguments);return n.apply(t[0]=this,t),this},ka.empty=function(){return!this.node()},ka.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},ka.size=function(){var n=0;return H(this,function(){++n}),n};var Aa=[];ta.selection.enter=O,ta.selection.enter.prototype=Aa,Aa.append=ka.append,Aa.empty=ka.empty,Aa.node=ka.node,Aa.call=ka.call,Aa.size=ka.size,Aa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var l=-1,s=u.length;++l<s;)(i=u[l])?(t.push(r[l]=e=n.call(u.parentNode,i.__data__,l,a)),e.__data__=i.__data__):t.push(null)}return S(o)},Aa.insert=function(n,t){return arguments.length<2&&(t=Y(this)),ka.insert.call(this,n,t)},ka.transition=function(n){for(var t,e,r=Dl||++Hl,u=Xo(n),i=[],o=Pl||{time:Date.now(),ease:ku,delay:0,duration:250},a=-1,c=this.length;++a<c;){i.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(e=l[s])&&$o(e,s,u,r,o),t.push(e)}return Io(i,u,r)},ka.interrupt=function(n){var t=Xo(n);return this.each(function(){var n=this[t];n&&++n.active})},ta.select=function(n){var t=["string"==typeof n?ba(n,ua):n];return t.parentNode=ia,S([t])},ta.selectAll=function(n){var t=ra("string"==typeof n?_a(n,ua):n);return t.parentNode=ia,S([t])};var Na=ta.select(ia);ka.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(Z(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(Z(n,t,e))};var Ca=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ca.forEach(function(n){"on"+n in ua&&Ca.remove(n)});var za="onselectstart"in ua?null:m(ia.style,"userSelect"),qa=0;ta.mouse=function(n){return B(n,_())};var La=/WebKit/.test(oa.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=_().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return B(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",i)}function t(n,t,u,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=e.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(u()).on(i+d,a).on(o+d,c),y=$(),M=t(h,v);r?(l=r.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var e=w(n,"drag","dragstart","dragend"),r=null,u=t(y,ta.mouse,G,"mousemove","mouseup"),i=t(W,ta.touch,J,"touchmove","touchend");return n.origin=function(t){return arguments.length?(r=t,n):r},ta.rebind(n,e,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=_().touches),t?ra(t).map(function(t){var e=B(n,t);return e.identifier=t.identifier,e}):[]};var Ta=1e-6,Ra=Ta*Ta,Da=Math.PI,Pa=2*Da,Ua=Pa-Ta,ja=Da/2,Fa=Da/180,Ha=180/Da,Oa=Math.SQRT2,Ya=2,Ia=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(Ya*h)*(e*ut(Oa*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Oa*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Oa*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Ia*f)/(2*i*Ya*h),p=(c*c-i*i-Ia*f)/(2*c*Ya*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Oa;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(z,s).on(Xa+".zoom",h).on("dblclick.zoom",g).on(T,f)}function t(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function e(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function r(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=e(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function i(t,e,i,o){t.__chart__={x:k.x,y:k.y,k:k.k},r(Math.pow(2,o)),u(v=e,i),t=ta.select(t),N>0&&(t=t.transition().duration(N)),t.call(n.event)}function o(){x&&x.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),S&&S.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function a(n){C++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(n){--C||n({type:"zoomend"}),v=null}function s(){function n(){s=1,u(ta.mouse(r),h),c(o)}function e(){f.on(q,null).on(L,null),g(s&&ta.event.target===i),l(o)}var r=this,i=ta.event.target,o=R.of(r,arguments),s=0,f=ta.select(oa).on(q,n).on(L,e),h=t(ta.mouse(r)),g=$();I(r),a(o)}function f(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=t(n))}),n}function e(){var t=ta.event.target;ta.select(t).on(x,o).on(_,h),w.push(t);for(var e=ta.event.changedTouches,r=0,u=e.length;u>r;++r)d[e[r].identifier]=null;var a=n(),c=Date.now();if(1===a.length){if(500>c-y){var l=a[0];i(p,l,d[l.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),b()}y=c}else if(a.length>1){var l=a[0],s=a[1],f=l[0]-s[0],g=l[1]-s[1];m=f*f+g*g}}function o(){var n,t,e,i,o=ta.touches(p);I(p);for(var a=0,l=o.length;l>a;++a,i=null)if(e=o[a],i=d[e.identifier]){if(t)break;n=e,t=i}if(i){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*g)}y=null,u(n,t),c(v)}function h(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(w).on(M,null),S.on(z,s).on(T,f),E(),l(v)}var g,p=this,v=R.of(p,arguments),d={},m=0,M=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+M,_="touchend"+M,w=[],S=ta.select(p),E=$();e(),a(v),S.on(z,null).on(T,e)}function h(){var n=R.of(this,arguments);m?clearTimeout(m):(p=t(v=d||ta.mouse(this)),I(this),a(n)),m=setTimeout(function(){m=null,l(n)},50),b(),r(Math.pow(2,.002*Za())*k.k),u(v,p),c(n)}function g(){var n=ta.mouse(this),e=Math.log(k.k)/Math.LN2;i(this,n,t(n),ta.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var p,v,d,m,y,M,x,_,S,k={x:0,y:0,k:1},E=[960,500],A=Va,N=250,C=0,z="mousedown.zoom",q="mousemove.zoom",L="mouseup.zoom",T="touchstart.zoom",R=w(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=R.of(this,arguments),t=k;Dl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},a(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=v?v[0]:e/2,i=v?v[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){l(n)}).each("end.zoom",function(){l(n)}):(this.__chart__=k,a(n),c(n),l(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Va:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],n):d},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(N=+t,n):N},n.x=function(t){return arguments.length?(x=t,M=t.copy(),k={x:0,y:0,k:1},n):x},n.y=function(t){return arguments.length?(S=t,_=t.copy(),k={x:0,y:0,k:1},n):S},ta.rebind(n,R,"on")};var Za,Va=[0,1/0],Xa="onwheel"in ua?(Za=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Za=function(){return ta.event.wheelDelta},"mousewheel"):(Za=function(){return-ta.event.detail},"MozMousePixelScroll");ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var $a=at.prototype=new ot;$a.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},$a.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},$a.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Ba=lt.prototype=new ot;Ba.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Wa*(arguments.length?n:1)))},Ba.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Wa*(arguments.length?n:1)))},Ba.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Wa=18,Ja=.95047,Ga=1,Ka=1.08883,Qa=ft.prototype=new ot;Qa.brighter=function(n){return new ft(Math.min(100,this.l+Wa*(arguments.length?n:1)),this.a,this.b)},Qa.darker=function(n){return new ft(Math.max(0,this.l-Wa*(arguments.length?n:1)),this.a,this.b)},Qa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var nc=mt.prototype=new ot;nc.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},nc.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},nc.hsl=function(){return _t(this.r,this.g,this.b)},nc.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var tc=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});tc.forEach(function(n,t){tc.set(n,yt(t))}),ta.functor=Et,ta.xhr=Nt(At),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Ct(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<l;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;l>s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new v,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var ec,rc,uc,ic,oc,ac=oa[m(oa,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};rc?rc.n=i:ec=i,rc=i,uc||(ic=clearTimeout(ic),uc=1,ac(Lt))},ta.timer.flush=function(){Tt(),Rt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var cc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Pt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Dt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),cc[8+e/3]};var lc=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Dt(n,t))).toFixed(Math.max(0,Math.min(20,Dt(n*(1+1e-15),t))))}}),fc=ta.time={},hc=Date;Ft.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){gc.setUTCDate.apply(this._,arguments)},setDay:function(){gc.setUTCDay.apply(this._,arguments)},setFullYear:function(){gc.setUTCFullYear.apply(this._,arguments)},setHours:function(){gc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){gc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){gc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){gc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){gc.setUTCSeconds.apply(this._,arguments)},setTime:function(){gc.setTime.apply(this._,arguments)}};var gc=Date.prototype;fc.year=Ht(function(n){return n=fc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),fc.years=fc.year.range,fc.years.utc=fc.year.utc.range,fc.day=Ht(function(n){var t=new hc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),fc.days=fc.day.range,fc.days.utc=fc.day.utc.range,fc.dayOfYear=function(n){var t=fc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=fc[n]=Ht(function(n){return(n=fc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});fc[n+"s"]=e.range,fc[n+"s"].utc=e.utc.range,fc[n+"OfYear"]=function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)}}),fc.week=fc.sunday,fc.weeks=fc.sunday.range,fc.weeks.utc=fc.sunday.utc.range,fc.weekOfYear=fc.sundayOfYear;var pc={"-":"",_:" ",0:"0"},vc=/^\s*\d+/,dc=/^%/;ta.locale=function(n){return{numberFormat:Ut(n),timeFormat:Yt(n)}};var mc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=mc.numberFormat,ta.geo={},le.prototype={s:0,t:0,add:function(n){se(n,this.t,yc),se(yc.s,this.s,this),this.s?this.t+=yc.t:this.s=yc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yc=new le;ta.geo.stream=function(n,t){n&&Mc.hasOwnProperty(n.type)?Mc[n.type](n,t):fe(n,t)};var Mc={Feature:function(n,t){fe(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)fe(e[r].geometry,t)}},xc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){he(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)he(e[r],t,0)},Polygon:function(n,t){ge(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)ge(e[r],t)
2350 },GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)fe(e[r],t)}};ta.geo.area=function(n){return bc=0,ta.geo.stream(n,wc),bc};var bc,_c=new le,wc={sphere:function(){bc+=4*Da},point:y,lineStart:y,lineEnd:y,polygonStart:function(){_c.reset(),wc.lineStart=pe},polygonEnd:function(){var n=2*_c;bc+=0>n?4*Da+n:n,wc.lineStart=wc.lineEnd=wc.point=y}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=ve([t*Fa,e*Fa]);if(m){var u=me(m,r),i=[u[1],-u[0],0],o=me(i,u);xe(o),o=be(o);var c=t-p,l=c>0?1:-1,v=o[0]*Ha*l,d=va(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Ha;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Ha;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=va(r)>180?r+(r>0?360:-360):r}else v=n,d=e;wc.point(n,e),t(n,e)}function i(){wc.lineStart()}function o(){u(v,d),wc.lineEnd(),va(y)>Ta&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=o,y=0,wc.polygonStart()},polygonEnd:function(){wc.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>_c?(s=-(h=180),f=-(g=90)):y>Ta?g=90:-Ta>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){Sc=kc=Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,Dc);var t=Lc,e=Tc,r=Rc,u=t*t+e*e+r*r;return Ra>u&&(t=Cc,e=zc,r=qc,Ta>kc&&(t=Ec,e=Ac,r=Nc),u=t*t+e*e+r*r,Ra>u)?[0/0,0/0]:[Math.atan2(e,t)*Ha,tt(r/Math.sqrt(u))*Ha]};var Sc,kc,Ec,Ac,Nc,Cc,zc,qc,Lc,Tc,Rc,Dc={sphere:y,point:we,lineStart:ke,lineEnd:Ee,polygonStart:function(){Dc.lineStart=Ae},polygonEnd:function(){Dc.lineStart=ke}},Pc=Te(Ce,Ue,Fe,[-Da,-Da/2]),Uc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ze(Ve)}).raw=Ve,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ta,f+.12*l+Ta],[s-.214*l-Ta,f+.234*l-Ta]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ta,f+.166*l+Ta],[s-.115*l-Ta,f+.234*l-Ta]]).stream(c).point,n},n.scale(1070)};var jc,Fc,Hc,Oc,Yc,Ic,Zc={point:y,lineStart:y,lineEnd:y,polygonStart:function(){Fc=0,Zc.lineStart=Xe},polygonEnd:function(){Zc.lineStart=Zc.lineEnd=Zc.point=y,jc+=va(Fc/2)}},Vc={point:$e,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Xc={point:Je,lineStart:Ge,lineEnd:Ke,polygonStart:function(){Xc.lineStart=Qe},polygonEnd:function(){Xc.point=Je,Xc.lineStart=Ge,Xc.lineEnd=Ke}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return jc=0,ta.geo.stream(n,u(Zc)),jc},n.centroid=function(n){return Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,u(Xc)),Rc?[Lc/Rc,Tc/Rc]:qc?[Cc/qc,zc/qc]:Nc?[Ec/Nc,Ac/Nc]:[0/0,0/0]},n.bounds=function(n){return Yc=Ic=-(Hc=Oc=1/0),ta.geo.stream(n,u(Vc)),[[Hc,Oc],[Yc,Ic]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||er(n):At,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Be:new nr(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new rr(t);for(var r in n)e[r]=n[r];return e}}},rr.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ir,ta.geo.projectionMutator=or,(ta.geo.equirectangular=function(){return ir(cr)}).raw=cr.invert=cr,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t}return n=sr(n[0]%360*Fa,n[1]*Fa,n.length>2?n[2]*Fa:0),t.invert=function(t){return t=n.invert(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t},t},lr.invert=cr,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=sr(-n[0]*Fa,-n[1]*Fa,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ha,n[1]*=Ha}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=pr((t=+r)*Fa,u*Fa),n):t},n.precision=function(r){return arguments.length?(e=pr(t*Fa,(u=+r)*Fa),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Fa,u=n[1]*Fa,i=t[1]*Fa,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return va(n%d)>Ta}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return va(n%m)>Ta}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=dr(a,o,90),f=mr(r,e,y),h=dr(l,c,90),g=mr(i,u,y),n):y},n.majorExtent([[-180,-90+Ta],[180,90-Ta]]).minorExtent([[-180,-80-Ta],[180,80+Ta]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=yr,u=Mr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return xr(n[0]*Fa,n[1]*Fa,t[0]*Fa,t[1]*Fa)},ta.geo.length=function(n){return $c=0,ta.geo.stream(n,Bc),$c};var $c,Bc={sphere:y,point:y,lineStart:br,lineEnd:y,polygonStart:y,polygonEnd:y},Wc=_r(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ir(Wc)}).raw=Wc;var Jc=_r(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},At);(ta.geo.azimuthalEquidistant=function(){return ir(Jc)}).raw=Jc,(ta.geo.conicConformal=function(){return Ze(wr)}).raw=wr,(ta.geo.conicEquidistant=function(){return Ze(Sr)}).raw=Sr;var Gc=_r(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ir(Gc)}).raw=Gc,kr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-ja]},(ta.geo.mercator=function(){return Er(kr)}).raw=kr;var Kc=_r(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ir(Kc)}).raw=Kc;var Qc=_r(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ir(Qc)}).raw=Qc,Ar.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-ja]},(ta.geo.transverseMercator=function(){var n=Er(Ar),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ar,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(qr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=zr(a),s=zr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[a[s[t]][2]]);return g}var e=Nr,r=Cr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ta.geom.polygon=function(n){return xa(n,nl),n};var nl=ta.geom.polygon.prototype=[];nl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},nl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},nl.clip=function(n){for(var t,e,r,u,i,o,a=Rr(n),c=-1,l=this.length-Rr(this),s=this[l-1];++c<l;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Lr(o,s,u)?(Lr(i,s,u)||n.push(Tr(i,o,s,u)),n.push(o)):Lr(i,s,u)&&n.push(Tr(i,o,s,u)),i=o;a&&n.push(n[0]),s=u}return n};var tl,el,rl,ul,il,ol=[],al=[];Yr.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Zr),t.length},nu.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tu.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=iu(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ru(this,e),n=e,e=n.U),e.C=!1,r.C=!0,uu(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(uu(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ru(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?iu(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ru(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,uu(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ru(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,uu(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ru(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,uu(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},ta.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return ou(e(n),a).cells.forEach(function(e,a){var c=e.edges,l=e.site,s=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ta)*Ta,y:Math.round(o(n,t)/Ta)*Ta,i:t}})}var r=Nr,u=Cr,i=r,o=u,a=cl;return n?t(n):(t.links=function(n){return ou(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ou(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Zr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c<l;)u=s,i=f,s=a[c].edge,f=s.l===o?s.r:s.l,r<i.i&&r<f.i&&cu(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=Et(r=n),t):r},t.y=function(n){return arguments.length?(o=Et(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?cl:n,t):a===cl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===cl?null:a&&a[1]},t)};var cl=[[-1e6,-1e6],[1e6,1e6]];ta.geom.delaunay=function(n){return ta.geom.voronoi().triangles(n)},ta.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,s=n.y;if(null!=c)if(va(c-e)+va(s-r)<.01)l(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,l(n,f,c,s,u,i,o,a),l(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else l(n,t,e,r,u,i,o,a)}function l(n,t,e,r,u,o,a,c){var l=.5*(u+a),s=.5*(o+c),f=e>=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=fu()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=fu();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){hu(n,k,v,d,m,y)},k.find=function(n){return gu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var o,a=Nr,c=Cr;return(o=arguments.length)?(a=lu,c=su,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},ta.interpolateRgb=pu,ta.interpolateObject=vu,ta.interpolateNumber=du,ta.interpolateString=mu;var ll=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(ll.source,"g");ta.interpolate=yu,ta.interpolators=[function(n,t){var e=typeof t;return("string"===e?tc.has(t)||/^(#|rgb\(|hsl\()/.test(t)?pu:mu:t instanceof ot?pu:Array.isArray(t)?Mu:"object"===e&&isNaN(t)?vu:du)(n,t)}],ta.interpolateArray=Mu;var fl=function(){return At},hl=ta.map({linear:fl,poly:Eu,quad:function(){return wu},cubic:function(){return Su},sin:function(){return Au},exp:function(){return Nu},circle:function(){return Cu},elastic:zu,back:qu,bounce:function(){return Lu}}),gl=ta.map({"in":At,out:bu,"in-out":_u,"out-in":function(n){return _u(bu(n))}});ta.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=hl.get(e)||fl,r=gl.get(r)||At,xu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Tu,ta.interpolateHsl=Ru,ta.interpolateLab=Du,ta.interpolateRound=Pu,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Uu(e?e.matrix:pl)})(n)},Uu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Ou,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Zu(n[e]));return t}},ta.layout.chord=function(){function n(){var n,l,f,h,g,p={},v=[],d=ta.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(l=0,g=-1;++g<i;)l+=u[h][g];v.push(l),m.push(ta.range(i)),n+=l}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(Pa-s*i)/n,l=0,h=-1;++h<i;){for(f=l,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=l,_=l+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/n},l+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,l={},s=0;return l.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,l):u},l.padding=function(n){return arguments.length?(s=n,e=r=null,l):s},l.sortGroups=function(n){return arguments.length?(o=n,e=r=null,l):o},l.sortSubgroups=function(n){return arguments.length?(a=n,e=null,l):a},l.sortChords=function(n){return arguments.length?(c=n,e&&t(),l):c},l.chords=function(){return e||n(),e},l.groups=function(){return r||n(),r},l},ta.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=vl,h=dl,g=-30,p=ml,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,M,x,b=m.length,_=y.length;for(e=0;_>e;++e)a=y[e],f=a.source,h=a.target,M=h.x-f.x,x=h.y-f.y,(p=M*M+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,M*=p,x*=p,h.x-=M*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=M*(d=1-d),f.y+=x*d);if((d=r*v)&&(M=l[0]/2,x=l[1]/2,e=-1,d))for(;++e<b;)a=m[e],a.x+=(M-a.x)*d,a.y+=(x-a.y)*d;if(g)for(Gu(t=ta.geom.quadtree(m),r,o),e=-1;++e<b;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<b;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*s,a.y-=(a.py-(a.py=a.y))*s);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(l=n,a):l},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(s=+n,a):s},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;l>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++a<l;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,s=y.length,p=l[0],v=l[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(At).on("dragstart.force",$u).on("drag.force",t).on("dragend.force",Bu)),arguments.length?(this.on("mouseover.force",Wu).on("mouseout.force",Ju).call(e),void 0):e},ta.rebind(a,c,"on")};var vl=20,dl=1,ml=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return ni(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ri,e=ti,r=ei;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Qu(t,function(n){n.children&&(n.value=0)}),ni(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++l<o;)n(a=i[l],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=ta.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Ku(e,r)},ta.layout.pie=function(){function n(o){var a,c=o.length,l=o.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===yl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=yl,r=0,u=Pa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var yl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=At,e=ci,r=li,u=ai,i=ii,o=oi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:Ml.get(t)||ci,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:xl.get(t)||li,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var Ml=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(si),i=n.map(fi),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ci}),xl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:li});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=l[i],a>=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=vi,u=gi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return pi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,ni(a,function(n){n.r=+s(n.value)}),ni(a,xi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;ni(a,function(n){n.r+=f}),ni(a,xi),ni(a,function(n){n.r-=f})}return wi(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(di),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Ku(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(ni(h,e),h.parent.m=-h.z,Qu(h,r),l)Qu(f,i);else{var g=f,p=f,v=f;Qu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Qu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ci(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ai(o),u=Ei(u),o&&u;)c=Ei(c),i=Ai(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ni(zi(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ai(i)&&(i.t=o,i.m+=f-s),u&&!Ei(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=ki,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Ku(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;ni(c,function(n){var t=n.children;t&&t.length?(n.x=Li(t),n.y=qi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Ti(c),f=Ri(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return ni(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=ki,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Ku(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<o;)u=n[i],u.x=a,u.y=l,u.dy=s,a+=u.dx=Math.min(e.x+e.dx-a,s?c(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<o;)u=n[i],u.x=a,u.y=l,u.dx=s,l+=u.dy=Math.min(e.y+e.dy-l,s?c(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=l[0],i.dy=l[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=ta.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Di,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(l=n,i):l},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Di(t):Pi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Pi(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Di:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Ku(i,a)},ta.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;
2351 do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var bl={floor:At,ceil:At};ta.scale.linear=function(){return Ii([0,1],[0,1],yu,!1)};var _l={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Gi(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var wl=ta.format(".0e"),Sl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Ki(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return no([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(kl)},ta.scale.category20=function(){return ta.scale.ordinal().range(El)},ta.scale.category20b=function(){return ta.scale.ordinal().range(Al)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Nl)};var kl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),El=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),Al=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Nl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return to([],[])},ta.scale.quantize=function(){return eo(0,1,[0,1])},ta.scale.threshold=function(){return ro([.5],[0,1])},ta.scale.identity=function(){return uo([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-ja,f=a.apply(this,arguments)-ja,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ua)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===Cl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=Da?0:1;if(A&&fo(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=Da?0:1;if(E&&fo(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Tr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=ho(null==S?[_,w]:[S,k],[y,M],l,H,g),Y=ho([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^fo(O[1][0],O[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",H,",",H," 0 0,",v," ",Y[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",Y[0])}else N.push("M",y,",",M);if(null!=S){var I=Math.min(p,(n-F)/(j-1)),Z=ho([y,M],[S,k],n,-I,g),V=ho([_,w],null==x?[y,M]:[x,b],n,-I,g);p===I?N.push("L",V[0],"A",I,",",I," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^fo(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",I,",",I," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",I,",",I," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=oo,r=ao,u=io,i=Cl,o=co,a=lo,c=so;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==Cl?Cl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ja;return[Math.cos(t)*n,Math.sin(t)*n]},n};var Cl="auto";ta.svg.line=function(){return go(At)};var zl=ta.map({linear:po,"linear-closed":vo,step:mo,"step-before":yo,"step-after":Mo,basis:ko,"basis-open":Eo,"basis-closed":Ao,bundle:No,cardinal:_o,"cardinal-open":xo,"cardinal-closed":bo,monotone:Ro});zl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var ql=[0,2/3,1/3,0],Ll=[0,1/3,2/3,0],Tl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=go(Do);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},yo.reverse=Mo,Mo.reverse=yo,ta.svg.area=function(){return Po(At)},ta.svg.area.radial=function(){var n=Po(Do);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-ja,s=l.call(n,u,r)-ja;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Da)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=yr,o=Mr,a=Uo,c=co,l=lo;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=yr,e=Mr,r=jo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=jo,e=n.projection;return n.projection=function(n){return arguments.length?e(Fo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(Rl.get(t.call(this,n,r))||Yo)(e.call(this,n,r))}var t=Oo,e=Ho;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var Rl=ta.map({circle:Yo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*jl)),e=t*jl;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=Rl.keys();var Dl,Pl,Ul=Math.sqrt(3),jl=Math.tan(30*Fa),Fl=[],Hl=0;Fl.call=ka.call,Fl.empty=ka.empty,Fl.node=ka.node,Fl.size=ka.size,ta.transition=function(n){return arguments.length?Dl?n.transition():n:Na.transition()},ta.transition.prototype=Fl,Fl.select=function(n){var t,e,r,u=this.id,i=this.namespace,o=[];n=k(n);for(var a=-1,c=this.length;++a<c;){o.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(r=l[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),$o(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Io(o,i,u)},Fl.selectAll=function(n){var t,e,r,u,i,o=this.id,a=this.namespace,c=[];n=E(n);for(var l=-1,s=this.length;++l<s;)for(var f=this[l],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[a][o],e=n.call(r,r.__data__,h,l),c.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&$o(u,p,a,o,i),t.push(u)}return Io(c,a,o)},Fl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Io(u,this.namespace,this.id)},Fl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):H(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Fl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Ou:yu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Fl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Fl.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=oa.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=yu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Zo(this,"style."+n,t,u)},Fl.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,oa.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Fl.text=function(n){return Zo(this,"text",n,Vo)},Fl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Fl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),H(this,function(r){r[e][t].ease=n}))},Fl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:H(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Fl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:H(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Fl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Pl,i=Dl;Dl=e,H(this,function(t,u,i){Pl=t[r][e],n.call(t,t.__data__,u,i)}),Pl=u,Dl=i}else H(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Fl.transition=function(){for(var n,t,e,r,u=this.id,i=++Hl,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Io(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):At:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ta),d=ta.transition(p.exit()).style("opacity",Ta).remove(),m=ta.transition(p.order()).style("opacity",1),y=Math.max(u,0)+o,M=ji(f),x=l.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),ta.transition(x));v.append("line"),v.append("text");var _,w,S,k,E=v.select("line"),A=m.select("line"),N=p.select("text").text(g),C=v.select("text"),z=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,_="x",S="y",w="x2",k="y2",N.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),b.attr("d","M"+M[0]+","+q*i+"V0H"+M[1]+"V"+q*i)):(n=Wo,_="y",S="x",w="y2",k="x2",N.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),b.attr("d","M"+q*i+","+M[0]+"H0V"+M[1]+"H"+q*i)),E.attr(k,q*u),C.attr(S,q*y),A.attr(w,0).attr(k,q*u),z.attr(_,0).attr(S,q*y),f.rangeBand){var L=f,T=L.rangeBand()/2;s=f=function(n){return L(n)+T}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=Ol,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Yl?t+"":Ol,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ol="bottom",Yl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(i){i.each(function(){var i=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,At);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Il[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var s,f=ta.transition(i),h=ta.transition(o);c&&(s=ji(c),h.attr("x",s[0]).attr("width",s[1]-s[0]),e(f)),l&&(s=ji(l),h.attr("y",s[0]).attr("height",s[1]-s[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==ta.event.keyCode&&(N||(y=null,z[0]-=s[1],z[1]-=f[1],N=2),b())}function p(){32==ta.event.keyCode&&2==N&&(z[0]+=s[1],z[1]+=f[1],N=0,b())}function v(){var n=ta.mouse(x),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),N||(ta.event.altKey?(y||(y=[(s[0]+s[1])/2,(f[0]+f[1])/2]),z[0]=s[+(n[0]<y[0])],z[1]=f[+(n[1]<y[1])]):y=null),E&&d(n,c,0)&&(e(S),u=!0),A&&d(n,l,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:N?"move":"resize"}))}function d(n,t,e){var r,u,a=ji(t),c=a[0],l=a[1],p=z[e],v=e?f:s,d=v[1]-v[0];return N&&(c-=p,l-=d+p),r=(e?g:h)?Math.max(c,Math.min(l,n[e])):n[e],N?u=(r+=p)+d:(y&&(p=Math.max(c,Math.min(l,2*y[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function m(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),w({type:"brushend"})}var y,M,x=this,_=ta.select(ta.event.target),w=a.of(x,arguments),S=ta.select(x),k=_.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&l,N=_.classed("extent"),C=$(),z=ta.mouse(x),q=ta.select(oa).on("keydown.brush",u).on("keyup.brush",p);if(ta.event.changedTouches?q.on("touchmove.brush",v).on("touchend.brush",m):q.on("mousemove.brush",v).on("mouseup.brush",m),S.interrupt().selectAll("*").interrupt(),N)z[0]=s[0]-z[0],z[1]=f[0]-z[1];else if(k){var L=+/w$/.test(k),T=+/^n/.test(k);M=[s[1-L]-z[0],f[1-T]-z[1]],z[0]=s[L],z[1]=f[T]}else ta.event.altKey&&(y=z.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=w(n,"brushstart","brush","brushend"),c=null,l=null,s=[0,0],f=[0,0],h=!0,g=!0,p=Zl[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:s,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,Dl?ta.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,s=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=Mu(s,t.x),r=Mu(f,t.y);return i=o=null,function(u){s=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Zl[!c<<1|!l],n):c},n.y=function(t){return arguments.length?(l=t,p=Zl[!c<<1|!l],n):l},n.clamp=function(t){return arguments.length?(c&&l?(h=!!t[0],g=!!t[1]):c?h=!!t:l&&(g=!!t),n):c&&l?[h,g]:c?h:l?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],l&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=s[0]||r!=s[1])&&(s=[e,r])),l&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],l.invert&&(u=l(u),a=l(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),l&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],l.invert&&(u=l.invert(u),a=l.invert(a)),u>a&&(h=u,u=a,a=h))),c&&l?[[e,u],[r,a]]:c?[e,r]:l&&[u,a])},n.clear=function(){return n.empty()||(s=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!l&&f[0]==f[1]},ta.rebind(n,a,"on")};var Il={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Vl=fc.format=mc.timeFormat,Xl=Vl.utc,$l=Xl("%Y-%m-%dT%H:%M:%S.%LZ");Vl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:$l,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=$l.toString,fc.second=Ht(function(n){return new hc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),fc.seconds=fc.second.range,fc.seconds.utc=fc.second.utc.range,fc.minute=Ht(function(n){return new hc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),fc.minutes=fc.minute.range,fc.minutes.utc=fc.minute.utc.range,fc.hour=Ht(function(n){var t=n.getTimezoneOffset()/60;return new hc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),fc.hours=fc.hour.range,fc.hours.utc=fc.hour.utc.range,fc.month=Ht(function(n){return n=fc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),fc.months=fc.month.range,fc.months.utc=fc.month.utc.range;var Bl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Wl=[[fc.second,1],[fc.second,5],[fc.second,15],[fc.second,30],[fc.minute,1],[fc.minute,5],[fc.minute,15],[fc.minute,30],[fc.hour,1],[fc.hour,3],[fc.hour,6],[fc.hour,12],[fc.day,1],[fc.day,2],[fc.week,1],[fc.month,1],[fc.month,3],[fc.year,1]],Jl=Vl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ce]]),Gl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:At,ceil:At};Wl.year=fc.year,fc.scale=function(){return Go(ta.scale.linear(),Wl,Jl)};var Kl=Wl.map(function(n){return[n[0].utc,n[1]]}),Ql=Xl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ce]]);Kl.year=fc.year.utc,fc.scale.utc=function(){return Go(ta.scale.linear(),Kl,Ql)},ta.text=Nt(function(n){return n.responseText}),ta.json=function(n,t){return Ct(n,"application/json",Qo,t)},ta.html=function(n,t){return Ct(n,"text/html",na,t)},ta.xml=Nt(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}();
9871 ;!function(){function n(n){return n&&(n.ownerDocument||n.document).documentElement}function t(n){return n&&n.ownerDocument?n.ownerDocument.defaultView:n}function e(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function r(n){return null===n?0/0:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function c(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function l(){this._=Object.create(null)}function s(n){return(n+="")===pa||n[0]===va?va+n:n}function f(n){return(n+="")[0]===va?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=da.length;r>e;++e){var u=da[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new l;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function S(){ta.event.preventDefault()}function k(){for(var n,t=ta.event;n=t.sourceEvent;)t=n;return t}function E(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=ta.event;u.target=n,ta.event=u,t[u.type].apply(e,r)}finally{ta.event=i}}},t}function A(n){return ya(n,_a),n}function N(n){return"function"==typeof n?n:function(){return Ma(n,this)}}function C(n){return"function"==typeof n?n:function(){return xa(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ta.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function q(n){return n.trim().replace(/\s+/g," ")}function L(n){return new RegExp("(?:^|\\s+)"+ta.requote(n)+"(?:\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\s+/)}function R(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=T(n).map(D);var u=n.length;return"function"==typeof t?r:e}function D(n){var t=L(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",q(u+" "+n))):e.setAttribute("class",q(u.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e?t.createElementNS(e,n):t.createElement(n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=ta.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return ba(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function Z(n){return ya(n,Sa),n}function V(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function X(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,ra(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+ta.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=$;a>0&&(n=n.slice(0,a));var l=ka.get(n);return l&&(n=l,c=B),a?t?u:r:t?b:i}function $(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Aa,u="click"+r,i=ta.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ea&&(Ea="onselectstart"in e?!1:x(e.style,"userSelect")),Ea){var o=n(e).style,a=o[Ea];o[Ea]="none"}return function(n){if(i.on(r,null),Ea&&(o[Ea]=a),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Na){var i=t(n);if(i.scrollX||i.scrollY){r=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Na=!(o.f||o.e),r.remove()}}return Na?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ta.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?qa:Math.acos(n)}function tt(n){return n>1?Ra:-1>n?-Ra:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Da)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Xa,r=pt(r)*$a,i=pt(i)*Ba,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Pa,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,n>>8&255,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=Ga.get(n.toLowerCase()))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Xa),u=vt((.2126729*n+.7151522*t+.072175*e)/$a),i=vt((.0193339*n+.119192*t+.9503041*e)/Ba);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Nt(t,e,n,r)}}function Nt(n,t,e,r){function u(){var n,t=c.status;if(!t&&zt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return void o.error.call(i,r)}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(Ct(r))}function Ct(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function zt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qt(){var n=Lt(),t=Tt()-n;t>24?(isFinite(t)&&(clearTimeout(tc),tc=setTimeout(qt,t)),nc=0):(nc=1,rc(qt))}function Lt(){var n=Date.now();for(ec=Ka;ec;)n>=ec.t&&(ec.f=ec.c(n-ec.t)),ec=ec.n;return n}function Tt(){for(var n,t=Ka,e=1/0;t;)t.f?t=n?n.n=t.n:Ka=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return Qa=n,e}function Rt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Dt(n,t){var e=Math.pow(10,3*ga(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Pt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=ic.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=oc.get(g)||Ut;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Ut(n){return n+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ft(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new cc(e-1)),1),e}function i(n,e){return t(n=new cc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{cc=jt;var r=new jt;return r._=n,o(r,t,e)}finally{cc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ht(n);return c.floor=c,c.round=Ht(r),c.ceil=Ht(u),c.offset=Ht(i),c.range=a,n}function Ht(n){return function(t,e){try{cc=jt;var r=new jt;return r._=t,n(r,e)._}finally{cc=Date}}}function Ot(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(c,a)),null!=(u=sc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=N[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.slice(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&cc!==jt,o=new(i?jt:cc);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,l=e.length;c>a;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in sc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{cc=jt;var t=new cc;return t._=n,r(t)}finally{cc=Date}}var r=t(n);return e.parse=function(n){try{cc=jt;var t=r.parse(n);return t&&t._}finally{cc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ae;var M=ta.map(),x=Yt(v),b=Zt(v),_=Yt(d),w=Zt(d),S=Yt(m),k=Zt(m),E=Yt(y),A=Zt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+ac.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(ac.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(ac.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:ie,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:Qt,e:Qt,H:te,I:te,j:ne,L:ue,m:Kt,M:ee,p:s,S:re,U:Xt,w:Vt,W:$t,x:c,X:l,y:Wt,Y:Bt,Z:Jt,"%":oe};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Yt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Zt(n){for(var t=new l,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Vt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Xt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function $t(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Bt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Wt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.y=Gt(+r[0]),e+r[0].length):-1}function Jt(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Gt(n){return n+(n>68?1900:2e3)}function Kt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Qt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function ne(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function te(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ee(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function re(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ue(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ie(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=ga(t)/60|0,u=ga(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function oe(n,t,e){hc.lastIndex=0;var r=hc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ae(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function ce(){}function le(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function se(n,t){n&&dc.hasOwnProperty(n.type)&&dc[n.type](n,t)}function fe(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function he(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)fe(n[e],t,1);t.polygonEnd()}function ge(){function n(n,t){n*=Da,t=t*Da/2+qa/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);yc.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;Mc.point=function(o,a){Mc.point=n,r=(t=o)*Da,u=Math.cos(a=(e=a)*Da/2+qa/4),i=Math.sin(a)},Mc.lineEnd=function(){n(t,e)}}function pe(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function ve(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function de(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function me(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ye(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Me(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function xe(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function be(n,t){return ga(n[0]-t[0])<Ca&&ga(n[1]-t[1])<Ca}function _e(n,t){n*=Da;var e=Math.cos(t*=Da);we(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function we(n,t,e){++xc,_c+=(n-_c)/xc,wc+=(t-wc)/xc,Sc+=(e-Sc)/xc}function Se(){function n(n,u){n*=Da;var i=Math.cos(u*=Da),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),l=Math.atan2(Math.sqrt((l=e*c-r*a)*l+(l=r*o-t*c)*l+(l=t*a-e*o)*l),t*o+e*a+r*c);bc+=l,kc+=l*(t+(t=o)),Ec+=l*(e+(e=a)),Ac+=l*(r+(r=c)),we(t,e,r)}var t,e,r;qc.point=function(u,i){u*=Da;var o=Math.cos(i*=Da);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),qc.point=n,we(t,e,r)}}function ke(){qc.point=_e}function Ee(){function n(n,t){n*=Da;var e=Math.cos(t*=Da),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),l=u*c-i*a,s=i*o-r*c,f=r*a-u*o,h=Math.sqrt(l*l+s*s+f*f),g=r*o+u*a+i*c,p=h&&-nt(g)/h,v=Math.atan2(h,g);Nc+=p*l,Cc+=p*s,zc+=p*f,bc+=v,kc+=v*(r+(r=o)),Ec+=v*(u+(u=a)),Ac+=v*(i+(i=c)),we(r,u,i)}var t,e,r,u,i;qc.point=function(o,a){t=o,e=a,qc.point=n,o*=Da;var c=Math.cos(a*=Da);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),we(r,u,i)},qc.lineEnd=function(){n(t,e),qc.lineEnd=ke,qc.point=_e}}function Ae(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ne(){return!0}function Ce(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(be(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return void u.lineEnd()}var c=new qe(e,n,null,!0),l=new qe(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new qe(r,n,null,!1),l=new qe(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),ze(i),ze(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function ze(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function qe(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Le(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function l(){y.point=o,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,o=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Te))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=Fe(m,p);g.length?(b||(i.polygonStart(),b=!0),Ce(g,De,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Re(),x=t(M),b=!1;return y}}function Te(n){return n.length>1}function Re(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function De(n,t){return((n=n.x)[0]<0?n[1]-Ra-Ca:Ra-n[1])-((t=t.x)[0]<0?t[1]-Ra-Ca:Ra-t[1])}function Pe(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?qa:-qa,c=ga(i-e);ga(c-qa)<Ca?(n.point(e,r=(r+o)/2>0?Ra:-Ra),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=qa&&(ga(e-u)<Ca&&(e-=u*Ca),ga(i-a)<Ca&&(i-=a*Ca),r=Ue(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function Ue(n,t,e,r){var u,i,o=Math.sin(n-e);return ga(o)>Ca?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function je(n,t,e,r){var u;if(null==n)u=e*Ra,r.point(-qa,u),r.point(0,u),r.point(qa,u),r.point(qa,0),r.point(qa,-u),r.point(0,-u),r.point(-qa,-u),r.point(-qa,0),r.point(-qa,u);else if(ga(n[0]-t[0])>Ca){var i=n[0]<t[0]?qa:-qa;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Fe(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;yc.reset();for(var a=0,c=t.length;c>a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+qa/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+qa/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>qa,k=p*M;if(yc.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*La:b,S^h>=e^m>=e){var E=de(pe(f),pe(n));Me(E);var A=de(u,E);Me(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ca>i||Ca>i&&0>yc)^1&o}function He(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?qa:-qa),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(be(e,g)||be(p,g))&&(p[0]+=Ca,p[1]+=Ca,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&be(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=pe(n),u=pe(t),o=[1,0,0],a=de(r,u),c=ve(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=de(o,a),p=ye(o,f),v=ye(a,h);me(p,v);var d=g,m=ve(p,d),y=ve(d,d),M=m*m-y*(ve(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=ye(d,(-m-x)/y);if(me(b,p),b=xe(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=ga(A-qa)<Ca,C=N||Ca>A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(ga(b[0]-w)<Ca?k:E):k<=b[1]&&b[1]<=E:A>qa^(w<=b[0]&&b[0]<=S)){var z=ye(d,(-m+x)/y);return me(z,p),[b,xe(z)]}}}function u(t,e){var r=o?n:qa-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=ga(i)>Ca,c=gr(n,6*Da);return Le(t,e,c,o?[0,-n]:[-qa,n-qa])}function Oe(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return ga(r[0]-n)<Ca?u>0?0:3:ga(r[0]-e)<Ca?u>0?2:1:ga(r[1]-t)<Ca?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Tc,Math.min(Tc,n)),t=Math.max(-Tc,Math.min(Tc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=Re(),N=Oe(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&Ce(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ye(n){var t=0,e=qa/3,r=ir(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*qa/180,e=n[1]*qa/180):[t/qa*180,e/qa*180]},u}function Ze(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Ve(){function n(n,t){Dc+=u*n-r*t,r=n,u=t}var t,e,r,u;Hc.point=function(i,o){Hc.point=n,t=r=i,e=u=o},Hc.lineEnd=function(){n(t,e)}}function Xe(n,t){Pc>n&&(Pc=n),n>jc&&(jc=n),Uc>t&&(Uc=t),t>Fc&&(Fc=t)}function $e(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Be(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Be(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Be(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function We(n,t){_c+=n,wc+=t,++Sc}function Je(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);kc+=o*(t+n)/2,Ec+=o*(e+r)/2,Ac+=o,We(t=n,e=r)}var t,e;Ic.point=function(r,u){Ic.point=n,We(t=r,e=u)}}function Ge(){Ic.point=We}function Ke(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);kc+=o*(r+n)/2,Ec+=o*(u+t)/2,Ac+=o,o=u*n-r*t,Nc+=o*(r+n),Cc+=o*(u+t),zc+=3*o,We(r=n,u=t)}var t,e,r,u;Ic.point=function(i,o){Ic.point=n,We(t=r=i,e=u=o)},Ic.lineEnd=function(){n(t,e)}}function Qe(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,La)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function nr(n){function t(n){return(a?r:e)(n)}function e(t){return rr(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=pe([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c
9872 },polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=ga(ga(w)-1)<Ca||ga(r-h)<Ca?(r+h)/2:Math.atan2(_,b),A=n(E,k),N=A[0],C=A[1],z=N-t,q=C-e,L=M*z-y*q;(L*L/x>i||ga((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Da),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function tr(n){var t=nr(function(t,e){return n([t*Pa,e*Pa])});return function(n){return or(t(n))}}function er(n){this.stream=n}function rr(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ur(n){return ir(function(){return n})()}function ir(n){function t(n){return n=a(n[0]*Da,n[1]*Da),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Pa,n[1]*Pa]}function r(){a=Ae(o=lr(m,M,x),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=nr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Lc,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=or(b(o,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Lc):He((w=+n)*Da),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Da,d=n[1]%360*Da,r()):[v*Pa,d*Pa]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Da,M=n[1]%360*Da,x=n.length>2?n[2]%360*Da:0,r()):[m*Pa,M*Pa,x*Pa]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function or(n){return rr(n,function(t,e){n.point(t*Da,e*Da)})}function ar(n,t){return[n,t]}function cr(n,t){return[n>qa?n-La:-qa>n?n+La:n,t]}function lr(n,t,e){return n?t||e?Ae(fr(n),hr(t,e)):fr(n):t||e?hr(t,e):cr}function sr(n){return function(t,e){return t+=n,[t>qa?t-La:-qa>t?t+La:t,e]}}function fr(n){var t=sr(n);return t.invert=sr(-n),t}function hr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function gr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=pr(e,u),i=pr(e,i),(o>0?i>u:u>i)&&(u+=o*La)):(u=n+o*La,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=xe([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function pr(n,t){var e=pe(t);e[0]-=n,Me(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ca)%(2*Math.PI)}function vr(n,t,e){var r=ta.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function dr(n,t,e){var r=ta.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function mr(n){return n.source}function yr(n){return n.target}function Mr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Pa,Math.atan2(o,Math.sqrt(r*r+u*u))*Pa]}:function(){return[n*Pa,t*Pa]};return p.distance=h,p}function xr(){function n(n,u){var i=Math.sin(u*=Da),o=Math.cos(u),a=ga((n*=Da)-t),c=Math.cos(a);Yc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Zc.point=function(u,i){t=u*Da,e=Math.sin(i*=Da),r=Math.cos(i),Zc.point=n},Zc.lineEnd=function(){Zc.point=Zc.lineEnd=b}}function br(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function _r(n,t){function e(n,t){o>0?-Ra+Ca>t&&(t=-Ra+Ca):t>Ra-Ca&&(t=Ra-Ca);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(qa/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Ra]},e):Sr}function wr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return ga(u)<Ca?ar:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function Sr(n,t){return[n,Math.log(Math.tan(qa/4+t/2))]}function kr(n){var t,e=ur(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=qa*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Er(n,t){return[Math.log(Math.tan(qa/4+t/2)),-n]}function Ar(n){return n[0]}function Nr(n){return n[1]}function Cr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function zr(n,t){return n[0]-t[0]||n[1]-t[1]}function qr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Lr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Tr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Rr(){tu(this),this.edge=this.site=this.circle=null}function Dr(n){var t=el.pop()||new Rr;return t.site=n,t}function Pr(n){Xr(n),Qc.remove(n),el.push(n),tu(n)}function Ur(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Pr(n);for(var c=i;c.circle&&ga(e-c.circle.x)<Ca&&ga(r-c.circle.cy)<Ca;)i=c.P,a.unshift(c),Pr(c),c=i;a.unshift(c),Xr(c);for(var l=o;l.circle&&ga(e-l.circle.x)<Ca&&ga(r-l.circle.cy)<Ca;)o=l.N,a.push(l),Pr(l),l=o;a.push(l),Xr(l);var s,f=a.length;for(s=1;f>s;++s)l=a[s],c=a[s-1],Kr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Jr(c.site,l.site,null,u),Vr(c),Vr(l)}function jr(n){for(var t,e,r,u,i=n.x,o=n.y,a=Qc._;a;)if(r=Fr(a,o)-i,r>Ca)a=a.L;else{if(u=i-Hr(a,o),!(u>Ca)){r>-Ca?(t=a.P,e=a):u>-Ca?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Dr(n);if(Qc.insert(t,c),t||e){if(t===e)return Xr(t),e=Dr(t.site),Qc.insert(c,e),c.edge=e.edge=Jr(t.site,c.site),Vr(t),void Vr(e);if(!e)return void(c.edge=Jr(t.site,c.site));Xr(t),Xr(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Kr(e.edge,l,p,x),c.edge=Jr(l,n,null,x),e.edge=Jr(n,p,null,x),Vr(t),Vr(e)}}function Fr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Hr(n,t){var e=n.N;if(e)return Fr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Or(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Kc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(ga(r-t)>Ca||ga(u-e)>Ca)&&(a.splice(o,0,new Qr(Gr(i.site,s,ga(r-f)<Ca&&p-u>Ca?{x:f,y:ga(t-f)<Ca?e:p}:ga(u-p)<Ca&&h-r>Ca?{x:ga(e-p)<Ca?t:h,y:p}:ga(r-h)<Ca&&u-g>Ca?{x:h,y:ga(t-h)<Ca?e:g}:ga(u-g)<Ca&&r-f>Ca?{x:ga(e-g)<Ca?t:f,y:g}:null),i.site,null)),++c)}function Yr(n,t){return t.angle-n.angle}function Zr(){tu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Vr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,l=r.y-a,s=i.x-o,f=i.y-a,h=2*(c*f-l*s);if(!(h>=-za)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=rl.pop()||new Zr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=tl._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}tl.insert(y,m),y||(nl=m)}}}}function Xr(n){var t=n.circle;t&&(t.P||(nl=t.N),tl.remove(t),rl.push(t),tu(t),n.circle=null)}function $r(n){for(var t,e=Gc,r=Oe(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Br(t,n)||!r(t)||ga(t.a.x-t.b.x)<Ca&&ga(t.a.y-t.b.y)<Ca)&&(t.a=t.b=null,e.splice(u,1))}function Br(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],l=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.y<c)return}else i={x:d,y:l};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.y<c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Wr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Jr(n,t,e,r){var u=new Wr(n,t);return Gc.push(u),e&&Kr(u,n,t,e),r&&Kr(u,t,n,r),Kc[n.i].edges.push(new Qr(u,n,t)),Kc[t.i].edges.push(new Qr(u,t,n)),u}function Gr(n,t,e){var r=new Wr(n,null);return r.a=t,r.b=e,Gc.push(r),r}function Kr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function Qr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function nu(){this._=null}function tu(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function eu(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ru(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function uu(n){for(;n.L;)n=n.L;return n}function iu(n,t){var e,r,u,i=n.sort(ou).pop();for(Gc=[],Kc=new Array(n.length),Qc=new nu,tl=new nu;;)if(u=nl,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(Kc[i.i]=new Or(i),jr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Ur(u.arc)}t&&($r(t),Ir(t));var o={cells:Kc,edges:Gc};return Qc=tl=Gc=Kc=null,o}function ou(n,t){return t.y-n.y||t.x-n.x}function au(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function cu(n){return n.x}function lu(n){return n.y}function su(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function fu(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&fu(n,c[0],e,r,o,a),c[1]&&fu(n,c[1],o,r,u,a),c[2]&&fu(n,c[2],e,a,o,i),c[3]&&fu(n,c[3],o,a,u,i)}}function hu(n,t,e,r,u,i,o){var a,c=1/0;return function l(n,s,f,h,g){if(!(s>i||f>o||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function gu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function pu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=mu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function vu(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function du(n,t){var e,r,u,i=il.lastIndex=ol.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=il.exec(n))&&(r=ol.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:vu(e,r)})),i=ol.lastIndex;return i<t.length&&(u=t.slice(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var e,r=0;t>r;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function mu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function yu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(mu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function Mu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function xu(n){return function(t){return 1-n(1-t)}}function bu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function _u(n){return n*n}function wu(n){return n*n*n}function Su(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function ku(n){return function(t){return Math.pow(t,n)}}function Eu(n){return 1-Math.cos(n*Ra)}function Au(n){return Math.pow(2,10*(n-1))}function Nu(n){return 1-Math.sqrt(1-n*n)}function Cu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/La*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*La/t)}}function zu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function qu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Lu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Tu(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Pu(n){var t=[n.a,n.b],e=[n.c,n.d],r=ju(t),u=Uu(t,e),i=ju(Fu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Pa,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Pa:0}function Uu(n,t){return n[0]*t[0]+n[1]*t[1]}function ju(n){var t=Math.sqrt(Uu(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Fu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Hu(n,t){var e,r=[],u=[],i=ta.transform(n),o=ta.transform(t),a=i.translate,c=o.translate,l=i.rotate,s=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:vu(a[0],c[0])},{i:3,x:vu(a[1],c[1])})):r.push(c[0]||c[1]?"translate("+c+")":""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:vu(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:vu(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:vu(g[0],p[0])},{i:e-2,x:vu(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Ou(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Iu(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Yu(n){for(var t=n.source,e=n.target,r=Vu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Zu(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Vu(n,t){if(n===t)return n;for(var e=Zu(n),r=Zu(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function Xu(n){n.fixed|=2}function $u(n){n.fixed&=-7}function Bu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Wu(n){n.fixed&=-5}function Ju(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Ju(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*e[n.point.index];n.charge+=n.pointCharge=l,r+=l*n.point.x,u+=l*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Gu(n,t){return ta.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=ri,n}function Ku(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function Qu(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++o<u;)e.push(i[o]);for(;null!=(n=r.pop());)t(n)}function ni(n){return n.children}function ti(n){return n.value}function ei(n,t){return t.value-n.value}function ri(n){return ta.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ui(n){return n.x}function ii(n){return n.y}function oi(n,t,e){n.y0=t,n.y=e}function ai(n){return ta.range(n.length)}function ci(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function li(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function si(n){return n.reduce(fi,0)}function fi(n,t){return n+t[1]}function hi(n,t){return gi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function gi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function pi(n){return[ta.min(n),ta.max(n)]}function vi(n,t){return n.value-t.value}function di(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function mi(n,t){n._pack_next=t,t._pack_prev=n}function yi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Mi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(xi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],wi(r,u,i),t(i),di(r,i),r._pack_prev=i,di(i,u),u=r._pack_next,o=3;l>o;o++){wi(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(yi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!yi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?mi(r,u=a):mi(r=c,u),o--):(di(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(o=0;l>o;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(bi)}}function xi(n){n._pack_next=n._pack_prev=n}function bi(n){delete n._pack_next,delete n._pack_prev}function _i(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)_i(u[i],t,e,r)}function wi(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),l=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+l*i,e.y=n.y+c*i-l*u}else e.x=n.x+r,e.y=n.y}function Si(n,t){return n.parent==t.parent?1:2}function ki(n){var t=n.children;return t.length?t[0]:n.t}function Ei(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ai(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Ni(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Ci(n,t,e){return n.a.parent===t.parent?n.a:e}function zi(n){return 1+ta.max(n,function(n){return n.y})}function qi(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Li(n){var t=n.children;return t&&t.length?Li(t[0]):n}function Ti(n){var t,e=n.children;return e&&(t=e.length)?Ti(e[t-1]):n}function Ri(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Di(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Pi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Ui(n){return n.rangeExtent?n.rangeExtent():Pi(n.range())}function ji(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Fi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Hi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ml}function Oi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=ta.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Ii(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Oi:ji,c=r?Iu:Ou;return o=u(n,t,c,e),a=u(t,n,c,mu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Du)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Xi(n,t)},i.tickFormat=function(t,e){return $i(n,t,e)},i.nice=function(t){return Zi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Yi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Zi(n,t){return Fi(n,Hi(Vi(n,t)[2]))}function Vi(n,t){null==t&&(t=10);var e=Pi(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Xi(n,t){return ta.range.apply(ta,Vi(n,t))}function $i(n,t,e){var r=Vi(n,t);if(e){var u=ic.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(ga(r[0]),ga(r[1])));return u[7]||(u[7]="."+Bi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Wi(u[8],r)),e=u.join("")}else e=",."+Bi(r[2])+"f";return ta.format(e)}function Bi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Wi(n,t){var e=Bi(t[2]);return n in yl?Math.abs(e-Bi(Math.max(ga(t[0]),ga(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Ji(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Fi(r.map(u),e?Math:xl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Pi(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++<s;)for(var h=f-1;h>0;h--)o.push(i(l)*h);for(l=0;o[l]<a;l++);for(s=o.length;o[s-1]>c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return Ml;arguments.length<2?t=Ml:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Ji(n.copy(),t,e,r)},Yi(o,n)}function Gi(n,t,e){function r(t){return n(u(t))}var u=Ki(t),i=Ki(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Xi(e,n)},r.tickFormat=function(n,t){return $i(e,n,t)},r.nice=function(n){return r.domain(Zi(e,n))},r.exponent=function(o){return arguments.length?(u=Ki(t=o),i=Ki(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Gi(n.copy(),t,e)},Yi(r,n)}function Ki(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Qi(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new l;for(var i,o=-1,a=r.length;++o<a;)u.has(i=r[o])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,o=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=(c+l)/2,0):(l-c)/(n.length-1+a);return i=r(c+s*a/2,s),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=l=Math.round((c+l)/2),0):(l-c)/(n.length-1+a)|0;return i=r(c+Math.round(s*a/2+(l-c-(n.length-1+a)*s)/2),s),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=(f-s)/(n.length-a+2*c);return i=r(s+h*c,h),l&&i.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=Math.floor((f-s)/(n.length-a+2*c));return i=r(s+Math.round((f-s-(n.length-a)*h)/2),h),l&&i.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Pi(t.a[0])},e.copy=function(){return Qi(n,t)},e.domain(n)}function no(n,t){function i(){var e=0,r=t.length;for(a=[];++e<r;)a[e-1]=ta.quantile(n,e/r);return o}function o(n){return isNaN(n=+n)?void 0:t[ta.bisect(a,n)]}var a;return o.domain=function(t){return arguments.length?(n=t.map(r).filter(u).sort(e),i()):n},o.range=function(n){return arguments.length?(t=n,i()):t},o.quantiles=function(){return a},o.invertExtent=function(e){return e=t.indexOf(e),0>e?[0/0,0/0]:[e>0?a[e-1]:n[0],e<a.length?a[e]:n[n.length-1]]},o.copy=function(){return no(n,t)},i()}function to(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return to(n,t,e)},u()}function eo(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return eo(n,t)},e}function ro(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Xi(n,t)},t.tickFormat=function(t,e){return $i(n,t,e)},t.copy=function(){return ro(n)},t}function uo(){return 0}function io(n){return n.innerRadius}function oo(n){return n.outerRadius}function ao(n){return n.startAngle}function co(n){return n.endAngle}function lo(n){return n&&n.padAngle}function so(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function fo(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function ho(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f<h;)u.call(this,c=t[f],f)?s.push([+g.call(this,c,f),+p.call(this,c,f)]):s.length&&(o(),s=[]);return s.length&&o(),l.length?l.join(""):null}var e=Ar,r=Nr,u=Ne,i=go,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=El.get(n)||go).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function go(n){return n.join("L")}function po(n){return go(n)+"Z"}function vo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function yo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function Mo(n,t){return n.length<4?go(n):n[1]+_o(n.slice(1,-1),wo(n,t))}function xo(n,t){return n.length<3?go(n):n[0]+_o((n.push(n[0]),n),wo([n[n.length-2]].concat(n,[n[1]]),t))}function bo(n,t){return n.length<3?go(n):n[0]+_o(n,wo(n,t))}function _o(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return go(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l<t.length;l++,c++)i=n[c],a=t[l],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var s=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function wo(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function So(n){if(n.length<3)return go(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",No(Cl,o),",",No(Cl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),Co(c,o,a);return n.pop(),c.push("L",r),c.join("")}function ko(n){if(n.length<4)return go(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(No(Cl,i)+","+No(Cl,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),Co(e,i,o);return e.join("")}function Eo(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[No(Cl,o),",",No(Cl,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),Co(t,o,a);return t.join("")}function Ao(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,l=-1;++l<=e;)r=n[l],u=l/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return So(n)}function No(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Co(n,t,e){n.push("C",No(Al,t),",",No(Al,e),",",No(Nl,t),",",No(Nl,e),",",No(Cl,t),",",No(Cl,e))}function zo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function qo(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=zo(u,i);++t<e;)r[t]=(o+(o=zo(u=i,i=n[t+1])))/2;return r[t]=o,r}function Lo(n){for(var t,e,r,u,i=[],o=qo(n),a=-1,c=n.length-1;++a<c;)t=zo(n[a],n[a+1]),ga(t)<Ca?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function To(n){return n.length<3?go(n):n[0]+_o(n,Lo(n))}function Ro(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-Ra,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Do(n){function t(t){function c(){v.push("M",a(n(m),f),s,l(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=Et(e),b=Et(u),_=e===r?function(){return g}:Et(r),w=u===i?function(){return p}:Et(i);++y<M;)o.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=Ar,r=Ar,u=0,i=Nr,o=Ne,a=go,c=a.key,l=a,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r
9873 },t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=El.get(n)||go).key,l=a.reverse||a,s=a.closed?"M":"L",t):c},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Po(n){return n.radius}function Uo(n){return[n.x,n.y]}function jo(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Ra;return[e*Math.cos(r),e*Math.sin(r)]}}function Fo(){return 64}function Ho(){return"circle"}function Oo(n){var t=Math.sqrt(n/qa);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Io(n){return function(){var t,e;(t=this[n])&&(e=t[t.active])&&(--t.count?delete t[t.active]:delete this[n],t.active+=.5,e.event&&e.event.interrupt.call(this,this.__data__,e.index))}}function Yo(n,t,e){return ya(n,Pl),n.namespace=t,n.id=e,n}function Zo(n,t,e,r){var u=n.id,i=n.namespace;return Y(n,"function"==typeof e?function(n,o,a){n[i][u].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Vo(n){return null==n&&(n=""),function(){this.textContent=n}}function Xo(n){return null==n?"__transition__":"__transition_"+n+"__"}function $o(n,t,e,r,u){var i=n[e]||(n[e]={active:0,count:0}),o=i[r];if(!o){var a=u.time;o=i[r]={tween:new l,time:a,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++i.count,ta.timer(function(u){function c(e){if(i.active>r)return s();var u=i[i.active];u&&(--i.count,delete i[i.active],u.event&&u.event.interrupt.call(n,n.__data__,u.index)),i.active=r,o.event&&o.event.start.call(n,n.__data__,t),o.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&v.push(r)}),h=o.ease,f=o.duration,ta.timer(function(){return p.c=l(e||1)?Ne:l,1},0,a)}function l(e){if(i.active!==r)return 1;for(var u=e/f,a=h(u),c=v.length;c>0;)v[--c].call(n,a);return u>=1?(o.event&&o.event.end.call(n,n.__data__,t),s()):void 0}function s(){return--i.count?delete i[r]:delete n[e],1}var f,h,g=o.delay,p=ec,v=[];return p.t=g+a,u>=g?c(u-g):void(p.c=c)},0,a)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Vl,u);return i==Vl.length?[t.year,Vi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Vl[i-1]<Vl[i]/u?i-1:i]:[Bl,Vi(n,e)[2]]}return r.invert=function(t){return Ko(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Ko)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Ko(+e+1),t).length}var i=r.domain(),o=Pi(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Fi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Pi(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Yi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.4"},ea=[].slice,ra=function(n){return ea.call(n)},ua=this.document;if(ua)try{ra(ua.documentElement.childNodes)[0].nodeType}catch(ia){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),ua)try{ua.createElement("DIV").style.setProperty("opacity",0,"")}catch(oa){var aa=this.Element.prototype,ca=aa.setAttribute,la=aa.setAttributeNS,sa=this.CSSStyleDeclaration.prototype,fa=sa.setProperty;aa.setAttribute=function(n,t){ca.call(this,n,t+"")},aa.setAttributeNS=function(n,t,e){la.call(this,n,t,e+"")},sa.setProperty=function(n,t,e){fa.call(this,n,t+"",e)}}ta.ascending=e,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var e,r=0,i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)u(e=+n[o])&&(r+=e);else for(;++o<i;)u(e=+t.call(n,n[o],o))&&(r+=e);return r},ta.mean=function(n,t){var e,i=0,o=n.length,a=-1,c=o;if(1===arguments.length)for(;++a<o;)u(e=r(n[a]))?i+=e:--c;else for(;++a<o;)u(e=r(t.call(n,n[a],a)))?i+=e:--c;return c?i/c:void 0},ta.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},ta.median=function(n,t){var i,o=[],a=n.length,c=-1;if(1===arguments.length)for(;++c<a;)u(i=r(n[c]))&&o.push(i);else for(;++c<a;)u(i=r(t.call(n,n[c],c)))&&o.push(i);return o.length?ta.quantile(o.sort(e),.5):void 0},ta.variance=function(n,t){var e,i,o=n.length,a=0,c=0,l=-1,s=0;if(1===arguments.length)for(;++l<o;)u(e=r(n[l]))&&(i=e-a,a+=i/++s,c+=i*(e-a));else for(;++l<o;)u(e=r(t.call(n,n[l],l)))&&(i=e-a,a+=i/++s,c+=i*(e-a));return s>1?c/(s-1):void 0},ta.deviation=function(){var n=ta.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ha=i(e);ta.bisectLeft=ha.left,ta.bisect=ta.bisectRight=ha.right,ta.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,o),e=new Array(t);++n<t;)for(var r,u=-1,i=e[n]=new Array(r);++u<r;)i[u]=arguments[u][n];return e},ta.transpose=function(n){return ta.zip.apply(ta,n)},ta.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ta.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ta.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ta.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var ga=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=a(ga(e)),o=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++o)>t;)u.push(r/i);else for(;(r=n+e*++o)<t;)u.push(r/i);return u},ta.map=function(n,t){var e=new l;if(n instanceof l)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var o in n)e.set(o,n[o]);return e};var pa="__proto__",va="\x00";c(l,{has:h,get:function(n){return this._[s(n)]},set:function(n,t){return this._[s(n)]=t},remove:g,keys:p,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:f(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t),this._[t])}}),ta.nest=function(){function n(t,o,a){if(a>=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var c,s,f,h,g=-1,p=o.length,v=i[a++],d=new l;++g<p;)(h=d.get(c=v(s=o[g])))?h.push(s):d.set(c,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,a))}):(s={},f=function(e,r){s[e]=n(t,r,a)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},c(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=M(n,t,t[e]);return n};var da=["webkit","ms","moz","Moz","o","O"];ta.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(ma,"\\$&")};var ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ya={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},Ma=function(n,t){return t.querySelector(n)},xa=function(n,t){return t.querySelectorAll(n)},ba=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(ba=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(Ma=function(n,t){return Sizzle(n,t)[0]||null},xa=Sizzle,ba=Sizzle.matchesSelector),ta.selection=function(){return ta.select(ua.documentElement)};var _a=ta.selection.prototype=[];_a.select=function(n){var t,e,r,u,i=[];n=N(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,l=r.length;++c<l;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return A(i)},_a.selectAll=function(n){var t,e,r=[];n=C(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=ra(n.call(e,e.__data__,a,u))),t.parentNode=e);return A(r)};var wa={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ta.ns={prefix:wa,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.slice(0,t),n=n.slice(t+1)),wa.hasOwnProperty(e)?{space:wa[e],local:n}:n}},_a.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},_a.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!L(n[u]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},_a.style=function(n,e,r){var u=arguments.length;if(3>u){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},_a.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},_a.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},_a.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},_a.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},_a.insert=function(n,t){return n=j(n),t=N(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},_a.remove=function(){return this.each(F)},_a.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new l,y=new Array(o);for(r=-1;++r<o;)m.has(d=t.call(u=n[r],u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d;for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=H(i),m.set(d,!0);for(r=-1;++r<o;)m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=H(i);for(;f>r;++r)p[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,a.push(p),c.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++i<o;)(u=r[i])&&(n[i]=u.__data__);return n}var a=Z([]),c=A([]),s=A([]);if("function"==typeof n)for(;++i<o;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<o;)e(r=this[i],n);return c.enter=function(){return a},c.exit=function(){return s},c},_a.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},_a.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return A(u)},_a.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},_a.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},_a.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},_a.call=function(n){var t=ra(arguments);return n.apply(t[0]=this,t),this},_a.empty=function(){return!this.node()},_a.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},_a.size=function(){var n=0;return Y(this,function(){++n}),n};var Sa=[];ta.selection.enter=Z,ta.selection.enter.prototype=Sa,Sa.append=_a.append,Sa.empty=_a.empty,Sa.node=_a.node,Sa.call=_a.call,Sa.size=_a.size,Sa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var l=-1,s=u.length;++l<s;)(i=u[l])?(t.push(r[l]=e=n.call(u.parentNode,i.__data__,l,a)),e.__data__=i.__data__):t.push(null)}return A(o)},Sa.insert=function(n,t){return arguments.length<2&&(t=V(this)),_a.insert.call(this,n,t)},ta.select=function(t){var e;return"string"==typeof t?(e=[Ma(t,ua)],e.parentNode=ua.documentElement):(e=[t],e.parentNode=n(t)),A([e])},ta.selectAll=function(n){var t;return"string"==typeof n?(t=ra(xa(n,ua)),t.parentNode=ua.documentElement):(t=n,t.parentNode=null),A([t])},_a.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var ka=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});ua&&ka.forEach(function(n){"on"+n in ua&&ka.remove(n)});var Ea,Aa=0;ta.mouse=function(n){return J(n,k())};var Na=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function e(n,t,e,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(e(f)).on(i+d,a).on(o+d,c),y=W(f),M=t(h,v);u?(l=u.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var r=E(n,"drag","dragstart","dragend"),u=null,i=e(b,ta.mouse,t,"mousemove","mouseup"),o=e(G,ta.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},ta.rebind(n,r,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ra(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Ca=1e-6,za=Ca*Ca,qa=Math.PI,La=2*qa,Ta=La-Ca,Ra=qa/2,Da=qa/180,Pa=180/qa,Ua=Math.SQRT2,ja=2,Fa=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(ja*h)*(e*ut(Ua*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Ua*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Ua*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Fa*f)/(2*i*ja*h),p=(c*c-i*i-Fa*f)/(2*c*ja*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Ua;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(q,f).on(Oa+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(N[0],Math.min(N[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,o)),i(d=e,r),t=ta.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function c(n){z++||n({type:"zoomstart"})}function l(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||n({type:"zoomend"}),d=null}function f(){function n(){f=1,i(ta.mouse(u),g),l(a)}function r(){h.on(L,null).on(T,null),p(f&&ta.event.target===o),s(a)}var u=this,o=ta.event.target,a=D.of(u,arguments),f=0,h=ta.select(t(u)).on(L,n).on(T,r),g=e(ta.mouse(u)),p=W(u);Dl.call(u),c(a)}function h(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ta.event.target;ta.select(t).on(x,r).on(b,a),_.push(t);for(var e=ta.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var c=n(),l=Date.now();if(1===c.length){if(500>l-M){var s=c[0];o(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=l}else if(c.length>1){var s=c[0],f=c[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,o=ta.touches(p);Dl.call(p);for(var a=0,c=o.length;c>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),l(v)}function a(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(_).on(y,null),w.on(q,f).on(R,h),E(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=ta.select(p),E=W(p);t(),c(v),w.on(q,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(v=e(d=m||ta.mouse(this)),Dl.call(this),c(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*Ha())*k.k),i(d,v),l(n)}function p(){var n=ta.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),ta.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},A=[960,500],N=Ia,C=250,z=0,q="mousedown.zoom",L="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=E(n,"zoomstart","zoom","zoomend");return Oa||(Oa="onwheel"in ua?(Ha=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Ha=function(){return ta.event.wheelDelta},"mousewheel"):(Ha=function(){return-ta.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Tl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},c(n)}).tween("zoom:zoom",function(){var e=A[0],r=A[1],u=d?d[0]:e/2,i=d?d[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},l(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,c(n),l(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(N=null==t?Ia:[+t[0],+t[1]],n):N},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(A=t&&[+t[0],+t[1]],n):A},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},ta.rebind(n,D,"on")};var Ha,Oa,Ia=[0,1/0];ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var Ya=at.prototype=new ot;Ya.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},Ya.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},Ya.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Za=lt.prototype=new ot;Za.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Va*(arguments.length?n:1)))},Za.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Va*(arguments.length?n:1)))},Za.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Va=18,Xa=.95047,$a=1,Ba=1.08883,Wa=ft.prototype=new ot;Wa.brighter=function(n){return new ft(Math.min(100,this.l+Va*(arguments.length?n:1)),this.a,this.b)},Wa.darker=function(n){return new ft(Math.max(0,this.l-Va*(arguments.length?n:1)),this.a,this.b)},Wa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var Ja=mt.prototype=new ot;Ja.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},Ja.hsl=function(){return _t(this.r,this.g,this.b)},Ja.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var Ga=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ga.forEach(function(n,t){Ga.set(n,yt(t))}),ta.functor=Et,ta.xhr=At(y),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Nt(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<l;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;l>s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var Ka,Qa,nc,tc,ec,rc=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};Qa?Qa.n=i:Ka=i,Qa=i,nc||(tc=clearTimeout(tc),nc=1,rc(qt))},ta.timer.flush=function(){Lt(),Tt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var uc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Dt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Rt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),uc[8+e/3]};var ic=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,oc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Rt(n,t))).toFixed(Math.max(0,Math.min(20,Rt(n*(1+1e-15),t))))}}),ac=ta.time={},cc=Date;jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){lc.setUTCDate.apply(this._,arguments)},setDay:function(){lc.setUTCDay.apply(this._,arguments)},setFullYear:function(){lc.setUTCFullYear.apply(this._,arguments)},setHours:function(){lc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){lc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){lc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){lc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){lc.setUTCSeconds.apply(this._,arguments)},setTime:function(){lc.setTime.apply(this._,arguments)}};var lc=Date.prototype;ac.year=Ft(function(n){return n=ac.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ac.years=ac.year.range,ac.years.utc=ac.year.utc.range,ac.day=Ft(function(n){var t=new cc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ac.days=ac.day.range,ac.days.utc=ac.day.utc.range,ac.dayOfYear=function(n){var t=ac.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ac[n]=Ft(function(n){return(n=ac.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ac.year(n).getDay();return Math.floor((ac.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ac[n+"s"]=e.range,ac[n+"s"].utc=e.utc.range,ac[n+"OfYear"]=function(n){var e=ac.year(n).getDay();return Math.floor((ac.dayOfYear(n)+(e+t)%7)/7)}}),ac.week=ac.sunday,ac.weeks=ac.sunday.range,ac.weeks.utc=ac.sunday.utc.range,ac.weekOfYear=ac.sundayOfYear;var sc={"-":"",_:" ",0:"0"},fc=/^\s*\d+/,hc=/^%/;ta.locale=function(n){return{numberFormat:Pt(n),timeFormat:Ot(n)}};var gc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=gc.numberFormat,ta.geo={},ce.prototype={s:0,t:0,add:function(n){le(n,this.t,pc),le(pc.s,this.s,this),this.s?this.t+=pc.t:this.s=pc.t
9874 },reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var pc=new ce;ta.geo.stream=function(n,t){n&&vc.hasOwnProperty(n.type)?vc[n.type](n,t):se(n,t)};var vc={Feature:function(n,t){se(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)se(e[r].geometry,t)}},dc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){fe(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)fe(e[r],t,0)},Polygon:function(n,t){he(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)he(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)se(e[r],t)}};ta.geo.area=function(n){return mc=0,ta.geo.stream(n,Mc),mc};var mc,yc=new ce,Mc={sphere:function(){mc+=4*qa},point:b,lineStart:b,lineEnd:b,polygonStart:function(){yc.reset(),Mc.lineStart=ge},polygonEnd:function(){var n=2*yc;mc+=0>n?4*qa+n:n,Mc.lineStart=Mc.lineEnd=Mc.point=b}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=pe([t*Da,e*Da]);if(m){var u=de(m,r),i=[u[1],-u[0],0],o=de(i,u);Me(o),o=xe(o);var c=t-p,l=c>0?1:-1,v=o[0]*Pa*l,d=ga(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Pa;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Pa;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=ga(r)>180?r+(r>0?360:-360):r}else v=n,d=e;Mc.point(n,e),t(n,e)}function i(){Mc.lineStart()}function o(){u(v,d),Mc.lineEnd(),ga(y)>Ca&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=o,y=0,Mc.polygonStart()},polygonEnd:function(){Mc.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>yc?(s=-(h=180),f=-(g=90)):y>Ca?g=90:-Ca>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){xc=bc=_c=wc=Sc=kc=Ec=Ac=Nc=Cc=zc=0,ta.geo.stream(n,qc);var t=Nc,e=Cc,r=zc,u=t*t+e*e+r*r;return za>u&&(t=kc,e=Ec,r=Ac,Ca>bc&&(t=_c,e=wc,r=Sc),u=t*t+e*e+r*r,za>u)?[0/0,0/0]:[Math.atan2(e,t)*Pa,tt(r/Math.sqrt(u))*Pa]};var xc,bc,_c,wc,Sc,kc,Ec,Ac,Nc,Cc,zc,qc={sphere:b,point:_e,lineStart:Se,lineEnd:ke,polygonStart:function(){qc.lineStart=Ee},polygonEnd:function(){qc.lineStart=Se}},Lc=Le(Ne,Pe,je,[-qa,-qa/2]),Tc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ye(Ze)}).raw=Ze,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ca,f+.12*l+Ca],[s-.214*l-Ca,f+.234*l-Ca]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ca,f+.166*l+Ca],[s-.115*l-Ca,f+.234*l-Ca]]).stream(c).point,n},n.scale(1070)};var Rc,Dc,Pc,Uc,jc,Fc,Hc={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Dc=0,Hc.lineStart=Ve},polygonEnd:function(){Hc.lineStart=Hc.lineEnd=Hc.point=b,Rc+=ga(Dc/2)}},Oc={point:Xe,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Ic={point:We,lineStart:Je,lineEnd:Ge,polygonStart:function(){Ic.lineStart=Ke},polygonEnd:function(){Ic.point=We,Ic.lineStart=Je,Ic.lineEnd=Ge}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return Rc=0,ta.geo.stream(n,u(Hc)),Rc},n.centroid=function(n){return _c=wc=Sc=kc=Ec=Ac=Nc=Cc=zc=0,ta.geo.stream(n,u(Ic)),zc?[Nc/zc,Cc/zc]:Ac?[kc/Ac,Ec/Ac]:Sc?[_c/Sc,wc/Sc]:[0/0,0/0]},n.bounds=function(n){return jc=Fc=-(Pc=Uc=1/0),ta.geo.stream(n,u(Oc)),[[Pc,Uc],[jc,Fc]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||tr(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new $e:new Qe(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new er(t);for(var r in n)e[r]=n[r];return e}}},er.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ur,ta.geo.projectionMutator=ir,(ta.geo.equirectangular=function(){return ur(ar)}).raw=ar.invert=ar,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Da,t[1]*Da),t[0]*=Pa,t[1]*=Pa,t}return n=lr(n[0]%360*Da,n[1]*Da,n.length>2?n[2]*Da:0),t.invert=function(t){return t=n.invert(t[0]*Da,t[1]*Da),t[0]*=Pa,t[1]*=Pa,t},t},cr.invert=ar,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=lr(-n[0]*Da,-n[1]*Da,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Pa,n[1]*=Pa}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=gr((t=+r)*Da,u*Da),n):t},n.precision=function(r){return arguments.length?(e=gr(t*Da,(u=+r)*Da),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Da,u=n[1]*Da,i=t[1]*Da,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return ga(n%d)>Ca}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return ga(n%m)>Ca}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=vr(a,o,90),f=dr(r,e,y),h=vr(l,c,90),g=dr(i,u,y),n):y},n.majorExtent([[-180,-90+Ca],[180,90-Ca]]).minorExtent([[-180,-80-Ca],[180,80+Ca]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=mr,u=yr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return Mr(n[0]*Da,n[1]*Da,t[0]*Da,t[1]*Da)},ta.geo.length=function(n){return Yc=0,ta.geo.stream(n,Zc),Yc};var Yc,Zc={sphere:b,point:b,lineStart:xr,lineEnd:b,polygonStart:b,polygonEnd:b},Vc=br(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ur(Vc)}).raw=Vc;var Xc=br(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(ta.geo.azimuthalEquidistant=function(){return ur(Xc)}).raw=Xc,(ta.geo.conicConformal=function(){return Ye(_r)}).raw=_r,(ta.geo.conicEquidistant=function(){return Ye(wr)}).raw=wr;var $c=br(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ur($c)}).raw=$c,Sr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ra]},(ta.geo.mercator=function(){return kr(Sr)}).raw=Sr;var Bc=br(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ur(Bc)}).raw=Bc;var Wc=br(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ur(Wc)}).raw=Wc,Er.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ra]},(ta.geo.transverseMercator=function(){var n=kr(Er),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Er,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(zr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=Cr(a),s=Cr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[a[s[t]][2]]);return g}var e=Ar,r=Nr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ta.geom.polygon=function(n){return ya(n,Jc),n};var Jc=ta.geom.polygon.prototype=[];Jc.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},Jc.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},Jc.clip=function(n){for(var t,e,r,u,i,o,a=Tr(n),c=-1,l=this.length-Tr(this),s=this[l-1];++c<l;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],qr(o,s,u)?(qr(i,s,u)||n.push(Lr(i,o,s,u)),n.push(o)):qr(i,s,u)&&n.push(Lr(i,o,s,u)),i=o;a&&n.push(n[0]),s=u}return n};var Gc,Kc,Qc,nl,tl,el=[],rl=[];Or.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Yr),t.length},Qr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},nu.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=uu(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(eu(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ru(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ru(this,e),n=e,e=n.U),e.C=!1,r.C=!0,eu(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?uu(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,eu(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ru(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,eu(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ru(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,eu(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ru(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},ta.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return iu(e(n),a).cells.forEach(function(e,a){var c=e.edges,l=e.site,s=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ca)*Ca,y:Math.round(o(n,t)/Ca)*Ca,i:t}})}var r=Ar,u=Nr,i=r,o=u,a=ul;return n?t(n):(t.links=function(n){return iu(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return iu(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Yr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c<l;)u=s,i=f,s=a[c].edge,f=s.l===o?s.r:s.l,r<i.i&&r<f.i&&au(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=Et(r=n),t):r},t.y=function(n){return arguments.length?(o=Et(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?ul:n,t):a===ul?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===ul?null:a&&a[1]},t)};var ul=[[-1e6,-1e6],[1e6,1e6]];ta.geom.delaunay=function(n){return ta.geom.voronoi().triangles(n)},ta.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,s=n.y;if(null!=c)if(ga(c-e)+ga(s-r)<.01)l(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,l(n,f,c,s,u,i,o,a),l(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else l(n,t,e,r,u,i,o,a)}function l(n,t,e,r,u,o,a,c){var l=.5*(u+a),s=.5*(o+c),f=e>=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=su()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=su();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){fu(n,k,v,d,m,y)},k.find=function(n){return hu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var o,a=Ar,c=Nr;return(o=arguments.length)?(a=cu,c=lu,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},ta.interpolateRgb=gu,ta.interpolateObject=pu,ta.interpolateNumber=vu,ta.interpolateString=du;var il=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ol=new RegExp(il.source,"g");ta.interpolate=mu,ta.interpolators=[function(n,t){var e=typeof t;return("string"===e?Ga.has(t)||/^(#|rgb\(|hsl\()/.test(t)?gu:du:t instanceof ot?gu:Array.isArray(t)?yu:"object"===e&&isNaN(t)?pu:vu)(n,t)}],ta.interpolateArray=yu;var al=function(){return y},cl=ta.map({linear:al,poly:ku,quad:function(){return _u},cubic:function(){return wu},sin:function(){return Eu},exp:function(){return Au},circle:function(){return Nu},elastic:Cu,back:zu,bounce:function(){return qu}}),ll=ta.map({"in":y,out:xu,"in-out":bu,"out-in":function(n){return bu(xu(n))}});ta.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=cl.get(e)||al,r=ll.get(r)||y,Mu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Lu,ta.interpolateHsl=Tu,ta.interpolateLab=Ru,ta.interpolateRound=Du,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Pu(e?e.matrix:sl)})(n)},Pu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var sl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Hu,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Yu(n[e]));return t}},ta.layout.chord=function(){function n(){var n,l,f,h,g,p={},v=[],d=ta.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(l=0,g=-1;++g<i;)l+=u[h][g];v.push(l),m.push(ta.range(i)),n+=l}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(La-s*i)/n,l=0,h=-1;++h<i;){for(f=l,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=l,_=l+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/n},l+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,l={},s=0;return l.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,l):u},l.padding=function(n){return arguments.length?(s=n,e=r=null,l):s},l.sortGroups=function(n){return arguments.length?(o=n,e=r=null,l):o},l.sortSubgroups=function(n){return arguments.length?(a=n,e=null,l):a},l.sortChords=function(n){return arguments.length?(c=n,e&&t(),l):c},l.chords=function(){return e||n(),e},l.groups=function(){return r||n(),r},l},ta.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=fl,h=hl,g=-30,p=gl,v=.1,d=.64,m=[],M=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,y,x,b=m.length,_=M.length;for(e=0;_>e;++e)a=M[e],f=a.source,h=a.target,y=h.x-f.x,x=h.y-f.y,(p=y*y+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,y*=p,x*=p,h.x-=y*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=y*(d=1-d),f.y+=x*d);if((d=r*v)&&(y=l[0]/2,x=l[1]/2,e=-1,d))for(;++e<b;)a=m[e],a.x+=(y-a.x)*d,a.y+=(x-a.y)*d;if(g)for(Ju(t=ta.geom.quadtree(m),r,o),e=-1;++e<b;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<b;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*s,a.y-=(a.py-(a.py=a.y))*s);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(M=n,a):M},a.size=function(n){return arguments.length?(l=n,a):l},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(s=+n,a):s},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;s>a;++a){var u=M[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++a<l;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,s=M.length,p=l[0],v=l[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=M[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,M[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,M[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(y).on("dragstart.force",Xu).on("drag.force",t).on("dragend.force",$u)),arguments.length?void this.on("mouseover.force",Bu).on("mouseout.force",Wu).call(e):e},ta.rebind(a,c,"on")};var fl=20,hl=1,gl=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return Qu(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ei,e=ni,r=ti;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ku(t,function(n){n.children&&(n.value=0)}),Qu(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++l<o;)n(a=i[l],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=ta.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Gu(e,r)},ta.layout.pie=function(){function n(o){var a,c=o.length,l=o.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===pl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=pl,r=0,u=La,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var pl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=y,e=ai,r=ci,u=oi,i=ui,o=ii;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:vl.get(t)||ai,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:dl.get(t)||ci,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var vl=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(li),i=n.map(si),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ai}),dl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:ci});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=l[i],a>=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=pi,u=hi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return gi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Qu(a,function(n){n.r=+s(n.value)}),Qu(a,Mi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;Qu(a,function(n){n.r+=f}),Qu(a,Mi),Qu(a,function(n){n.r-=f})}return _i(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(vi),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Gu(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(Qu(h,e),h.parent.m=-h.z,Ku(h,r),l)Ku(f,i);else{var g=f,p=f,v=f;Ku(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Ku(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ni(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ei(o),u=ki(u),o&&u;)c=ki(c),i=Ei(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ai(Ci(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ei(i)&&(i.t=o,i.m+=f-s),u&&!ki(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=Si,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Gu(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;Qu(c,function(n){var t=n.children;t&&t.length?(n.x=qi(t),n.y=zi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Li(c),f=Ti(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return Qu(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=Si,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Gu(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<o;)u=n[i],u.x=a,u.y=l,u.dy=s,a+=u.dx=Math.min(e.x+e.dx-a,s?c(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<o;)u=n[i],u.x=a,u.y=l,u.dx=s,l+=u.dy=Math.min(e.y+e.dy-l,s?c(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=l[0],i.dy=l[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=ta.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Ri,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));
9875 return i.size=function(n){return arguments.length?(l=n,i):l},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ri(t):Di(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Di(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ri:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Gu(i,a)},ta.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var ml={floor:y,ceil:y};ta.scale.linear=function(){return Ii([0,1],[0,1],mu,!1)};var yl={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Ji(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var Ml=ta.format(".0e"),xl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Gi(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return Qi([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(bl)},ta.scale.category20=function(){return ta.scale.ordinal().range(_l)},ta.scale.category20b=function(){return ta.scale.ordinal().range(wl)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Sl)};var bl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),_l=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),wl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Sl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return no([],[])},ta.scale.quantize=function(){return to(0,1,[0,1])},ta.scale.threshold=function(){return eo([.5],[0,1])},ta.scale.identity=function(){return ro([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-Ra,f=a.apply(this,arguments)-Ra,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ta)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===kl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=qa?0:1;if(A&&so(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=qa?0:1;if(E&&so(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Lr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=fo(null==S?[_,w]:[S,k],[y,M],l,H,g),I=fo([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^so(O[1][0],O[1][1],I[1][0],I[1][1]),",",g," ",I[1],"A",H,",",H," 0 0,",v," ",I[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",I[0])}else N.push("M",y,",",M);if(null!=S){var Y=Math.min(p,(n-F)/(j-1)),Z=fo([y,M],[S,k],n,-Y,g),V=fo([_,w],null==x?[y,M]:[x,b],n,-Y,g);p===Y?N.push("L",V[0],"A",Y,",",Y," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^so(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",Y,",",Y," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",Y,",",Y," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=io,r=oo,u=uo,i=kl,o=ao,a=co,c=lo;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==kl?kl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Ra;return[Math.cos(t)*n,Math.sin(t)*n]},n};var kl="auto";ta.svg.line=function(){return ho(y)};var El=ta.map({linear:go,"linear-closed":po,step:vo,"step-before":mo,"step-after":yo,basis:So,"basis-open":ko,"basis-closed":Eo,bundle:Ao,cardinal:bo,"cardinal-open":Mo,"cardinal-closed":xo,monotone:To});El.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Al=[0,2/3,1/3,0],Nl=[0,1/3,2/3,0],Cl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=ho(Ro);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},mo.reverse=yo,yo.reverse=mo,ta.svg.area=function(){return Do(y)},ta.svg.area.radial=function(){var n=Do(Ro);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-Ra,s=l.call(n,u,r)-Ra;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>qa)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=mr,o=yr,a=Po,c=ao,l=co;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=mr,e=yr,r=Uo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=Uo,e=n.projection;return n.projection=function(n){return arguments.length?e(jo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(zl.get(t.call(this,n,r))||Oo)(e.call(this,n,r))}var t=Ho,e=Fo;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var zl=ta.map({circle:Oo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Ll)),e=t*Ll;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/ql),e=t*ql/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/ql),e=t*ql/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=zl.keys();var ql=Math.sqrt(3),Ll=Math.tan(30*Da);_a.transition=function(n){for(var t,e,r=Tl||++Ul,u=Xo(n),i=[],o=Rl||{time:Date.now(),ease:Su,delay:0,duration:250},a=-1,c=this.length;++a<c;){i.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(e=l[s])&&$o(e,s,u,r,o),t.push(e)}return Yo(i,u,r)},_a.interrupt=function(n){return this.each(null==n?Dl:Io(Xo(n)))};var Tl,Rl,Dl=Io(Xo()),Pl=[],Ul=0;Pl.call=_a.call,Pl.empty=_a.empty,Pl.node=_a.node,Pl.size=_a.size,ta.transition=function(n,t){return n&&n.transition?Tl?n.transition(t):n:ta.selection().transition(n)},ta.transition.prototype=Pl,Pl.select=function(n){var t,e,r,u=this.id,i=this.namespace,o=[];n=N(n);for(var a=-1,c=this.length;++a<c;){o.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(r=l[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),$o(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Yo(o,i,u)},Pl.selectAll=function(n){var t,e,r,u,i,o=this.id,a=this.namespace,c=[];n=C(n);for(var l=-1,s=this.length;++l<s;)for(var f=this[l],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[a][o],e=n.call(r,r.__data__,h,l),c.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&$o(u,p,a,o,i),t.push(u)}return Yo(c,a,o)},Pl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=O(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Yo(u,this.namespace,this.id)},Pl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Pl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Hu:mu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Pl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Pl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=mu(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof n){2>o&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Zo(this,"style."+n,e,i)},Pl.styleTween=function(n,e,r){function u(u,i){var o=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Pl.text=function(n){return Zo(this,"text",n,Vo)},Pl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Pl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),Y(this,function(r){r[e][t].ease=n}))},Pl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Pl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Pl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Rl,i=Tl;try{Tl=e,Y(this,function(t,u,i){Rl=t[r][e],n.call(t,t.__data__,u,i)})}finally{Rl=u,Tl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Pl.transition=function(){for(var n,t,e,r,u=this.id,i=++Ul,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Yo(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):y:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ca),d=ta.transition(p.exit()).style("opacity",Ca).remove(),m=ta.transition(p.order()).style("opacity",1),M=Math.max(u,0)+o,x=Ui(f),b=l.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),ta.transition(b));v.append("line"),v.append("text");var w,S,k,E,A=v.select("line"),N=m.select("line"),C=p.select("text").text(g),z=v.select("text"),q=m.select("text"),L="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,w="x",k="y",S="x2",E="y2",C.attr("dy",0>L?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+L*i+"V0H"+x[1]+"V"+L*i)):(n=Wo,w="y",k="x",S="y2",E="x2",C.attr("dy",".32em").style("text-anchor",0>L?"end":"start"),_.attr("d","M"+L*i+","+x[0]+"H0V"+x[1]+"H"+L*i)),A.attr(E,L*u),z.attr(k,L*M),N.attr(S,0).attr(E,L*u),q.attr(w,0).attr(k,L*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=jl,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Fl?t+"":jl,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var jl="bottom",Fl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(t){t.each(function(){var t=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=t.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=t.selectAll(".resize").data(v,y);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Hl[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var c,f=ta.transition(t),h=ta.transition(o);l&&(c=Ui(l),h.attr("x",c[0]).attr("width",c[1]-c[0]),r(f)),s&&(c=Ui(s),h.attr("y",c[0]).attr("height",c[1]-c[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==ta.event.keyCode&&(C||(M=null,q[0]-=f[1],q[1]-=h[1],C=2),S())}function v(){32==ta.event.keyCode&&2==C&&(q[0]+=f[1],q[1]+=h[1],C=0,S())}function d(){var n=ta.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ta.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),q[0]=f[+(n[0]<M[0])],q[1]=h[+(n[1]<M[1])]):M=null),A&&m(n,l,0)&&(r(k),t=!0),N&&m(n,s,1)&&(u(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function m(n,t,e){var r,u,i=Ui(t),c=i[0],l=i[1],s=q[e],v=e?h:f,d=v[1]-v[0];return C&&(c-=s,l-=d+s),r=(e?p:g)?Math.max(c,Math.min(l,n[e])):n[e],C?u=(r+=s)+d:(M&&(s=Math.max(c,Math.min(l,2*M[e]-r))),r>s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?a=null:o=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=ta.select(ta.event.target),w=c.of(b,arguments),k=ta.select(b),E=_.datum(),A=!/^(n|s)$/.test(E)&&l,N=!/^(e|w)$/.test(E)&&s,C=_.classed("extent"),z=W(b),q=ta.mouse(b),L=ta.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(ta.event.changedTouches?L.on("touchmove.brush",d).on("touchend.brush",y):L.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)q[0]=f[0]-q[0],q[1]=h[0]-q[1];else if(E){var T=+/w$/.test(E),R=+/^n/.test(E);x=[f[1-T]-q[0],h[1-R]-q[1]],q[0]=f[T],q[1]=h[R]}else ta.event.altKey&&(M=q.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var o,a,c=E(n,"brushstart","brush","brushend"),l=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Ol[0];return n.event=function(n){n.each(function(){var n=c.of(this,arguments),t={x:f,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Tl?ta.select(this).transition().each("start.brush",function(){o=e.i,a=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=yu(f,t.x),r=yu(h,t.y);return o=a=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(l=t,v=Ol[!l<<1|!s],n):l},n.y=function(t){return arguments.length?(s=t,v=Ol[!l<<1|!s],n):s},n.clamp=function(t){return arguments.length?(l&&s?(g=!!t[0],p=!!t[1]):l?g=!!t:s&&(p=!!t),n):l&&s?[g,p]:l?g:s?p:null},n.extent=function(t){var e,r,u,i,c;return arguments.length?(l&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),o=[e,r],l.invert&&(e=l(e),r=l(r)),e>r&&(c=e,e=r,r=c),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],l&&(u=u[1],i=i[1]),a=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(c=u,u=i,i=c),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(l&&(o?(e=o[0],r=o[1]):(e=f[0],r=f[1],l.invert&&(e=l.invert(e),r=l.invert(r)),e>r&&(c=e,e=r,r=c))),s&&(a?(u=a[0],i=a[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(c=u,u=i,i=c))),l&&s?[[e,u],[r,i]]:l?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!l&&f[0]==f[1]||!!s&&h[0]==h[1]},ta.rebind(n,c,"on")};var Hl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ol=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Il=ac.format=gc.timeFormat,Yl=Il.utc,Zl=Yl("%Y-%m-%dT%H:%M:%S.%LZ");Il.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:Zl,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=Zl.toString,ac.second=Ft(function(n){return new cc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ac.seconds=ac.second.range,ac.seconds.utc=ac.second.utc.range,ac.minute=Ft(function(n){return new cc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ac.minutes=ac.minute.range,ac.minutes.utc=ac.minute.utc.range,ac.hour=Ft(function(n){var t=n.getTimezoneOffset()/60;return new cc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ac.hours=ac.hour.range,ac.hours.utc=ac.hour.utc.range,ac.month=Ft(function(n){return n=ac.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ac.months=ac.month.range,ac.months.utc=ac.month.utc.range;var Vl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Xl=[[ac.second,1],[ac.second,5],[ac.second,15],[ac.second,30],[ac.minute,1],[ac.minute,5],[ac.minute,15],[ac.minute,30],[ac.hour,1],[ac.hour,3],[ac.hour,6],[ac.hour,12],[ac.day,1],[ac.day,2],[ac.week,1],[ac.month,1],[ac.month,3],[ac.year,1]],$l=Il.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ne]]),Bl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:y,ceil:y};Xl.year=ac.year,ac.scale=function(){return Go(ta.scale.linear(),Xl,$l)};var Wl=Xl.map(function(n){return[n[0].utc,n[1]]}),Jl=Yl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ne]]);Wl.year=ac.year.utc,ac.scale.utc=function(){return Go(ta.scale.linear(),Wl,Jl)},ta.text=At(function(n){return n.responseText}),ta.json=function(n,t){return Nt(n,"application/json",Qo,t)},ta.html=function(n,t){return Nt(n,"text/html",na,t)},ta.xml=At(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}();
2352 9876 ;!function(a){"use strict";function b(a){this.owner=a}function c(a,b){if(Object.create)b.prototype=Object.create(a.prototype);else{var c=function(){};c.prototype=a.prototype,b.prototype=new c}return b.prototype.constructor=b,b}function d(a){var b=this.internal=new e(this);b.loadConfig(a),b.beforeInit(a),b.init(),b.afterInit(a),function c(a,b,d){Object.keys(a).forEach(function(e){b[e]=a[e].bind(d),Object.keys(a[e]).length>0&&c(a[e],b[e],d)})}(h,this,this)}function e(b){var c=this;c.d3=a.d3?a.d3:"undefined"!=typeof require?require("d3"):void 0,c.api=b,c.config=c.getDefaultConfig(),c.data={},c.cache={},c.axes={}}function f(a){b.call(this,a)}function g(a,b){function c(a,b){a.attr("transform",function(a){return"translate("+Math.ceil(b(a)+u)+", 0)"})}function d(a,b){a.attr("transform",function(a){return"translate(0,"+Math.ceil(b(a))+")"})}function e(a){var b=a[0],c=a[a.length-1];return c>b?[b,c]:[c,b]}function f(a){var b,c,d=[];if(a.ticks)return a.ticks.apply(a,n);for(c=a.domain(),b=Math.ceil(c[0]);b<c[1];b++)d.push(b);return d.length>0&&d[0]>0&&d.unshift(d[0]-(d[1]-d[0])),d}function g(){var a,c=p.copy();return b.isCategory&&(a=p.domain(),c.domain([a[0],a[1]-1])),c}function h(a){var b=m?m(a):a;return"undefined"!=typeof b?b:""}function i(a){if(A)return A;var b={h:11.5,w:5.5};return a.select("text").text(h).each(function(a){var c=this.getBoundingClientRect(),d=h(a),e=c.height,f=d?c.width/d.length:void 0;e&&f&&(b.h=e,b.w=f)}).text(""),A=b,b}function j(c){return b.withoutTransition?c:a.transition(c)}function k(m){m.each(function(){function m(a,c){function d(a,b){f=void 0;for(var h=1;h<b.length;h++)if(" "===b.charAt(h)&&(f=h),e=b.substr(0,h+1),g=U.w*e.length,g>c)return d(a.concat(b.substr(0,f?f:h)),b.slice(f?f+1:h));return a.concat(b)}var e,f,g,i=h(a),j=[];return"[object Array]"===Object.prototype.toString.call(i)?i:((!c||0>=c)&&(c=X?95:b.isCategory?Math.ceil(F(G[1])-F(G[0]))-12:110),d(j,i+""))}function n(a,b){var c=U.h;return 0===b&&(c="left"===q||"right"===q?-((V[a.index]-1)*(U.h/2)-3):".71em"),c}function v(a){var b=p(a)+(o?0:u);return L[0]<b&&b<L[1]?r:0}function w(a){return a?a>0?"start":"end":"middle"}function x(a){return a?"rotate("+a+")":""}function y(a){return a?8*Math.sin(Math.PI*(a/180)):0}function z(a){return a?11.5-2.5*(a/15)*(a>0?1:-1):W}var A,B,C,D=k.g=a.select(this),E=this.__chart__||p,F=this.__chart__=g(),G=t?t:f(F),H=D.selectAll(".tick").data(G,F),I=H.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),J=H.exit().remove(),K=j(H).style("opacity",1),L=p.rangeExtent?p.rangeExtent():e(p.range()),M=D.selectAll(".domain").data([0]),N=(M.enter().append("path").attr("class","domain"),j(M));I.append("line"),I.append("text");var O=I.select("line"),P=K.select("line"),Q=I.select("text"),R=K.select("text");b.isCategory?(u=Math.ceil((F(1)-F(0))/2),B=o?0:u,C=o?u:0):u=B=0;var S,T,U=i(D.select(".tick")),V=[],W=Math.max(r,0)+s,X="left"===q||"right"===q;S=H.select("text"),T=S.selectAll("tspan").data(function(a,c){var d=b.tickMultiline?m(a,b.tickWidth):[].concat(h(a));return V[c]=d.length,d.map(function(a){return{index:c,splitted:a}})}),T.enter().append("tspan"),T.exit().remove(),T.text(function(a){return a.splitted});var Y=b.tickTextRotate;switch(q){case"bottom":A=c,O.attr("y2",r),Q.attr("y",W),P.attr("x1",B).attr("x2",B).attr("y2",v),R.attr("x",0).attr("y",z(Y)).style("text-anchor",w(Y)).attr("transform",x(Y)),T.attr("x",0).attr("dy",n).attr("dx",y(Y)),N.attr("d","M"+L[0]+","+l+"V0H"+L[1]+"V"+l);break;case"top":A=c,O.attr("y2",-r),Q.attr("y",-W),P.attr("x2",0).attr("y2",-r),R.attr("x",0).attr("y",-W),S.style("text-anchor","middle"),T.attr("x",0).attr("dy","0em"),N.attr("d","M"+L[0]+","+-l+"V0H"+L[1]+"V"+-l);break;case"left":A=d,O.attr("x2",-r),Q.attr("x",-W),P.attr("x2",-r).attr("y1",C).attr("y2",C),R.attr("x",-W).attr("y",u),S.style("text-anchor","end"),T.attr("x",-W).attr("dy",n),N.attr("d","M"+-l+","+L[0]+"H0V"+L[1]+"H"+-l);break;case"right":A=d,O.attr("x2",r),Q.attr("x",W),P.attr("x2",r).attr("y2",0),R.attr("x",W).attr("y",0),S.style("text-anchor","start"),T.attr("x",W).attr("dy",n),N.attr("d","M"+l+","+L[0]+"H0V"+L[1]+"H"+l)}if(F.rangeBand){var Z=F,$=Z.rangeBand()/2;E=F=function(a){return Z(a)+$}}else E.rangeBand?E=F:J.call(A,F);I.call(A,E),K.call(A,F)})}var l,m,n,o,p=a.scale.linear(),q="bottom",r=6,s=3,t=null,u=0,v=!0;return b=b||{},l=b.withOuterTick?6:0,k.scale=function(a){return arguments.length?(p=a,k):p},k.orient=function(a){return arguments.length?(q=a in{top:1,right:1,bottom:1,left:1}?a+"":"bottom",k):q},k.tickFormat=function(a){return arguments.length?(m=a,k):m},k.tickCentered=function(a){return arguments.length?(o=a,k):o},k.tickOffset=function(){return u},k.tickInterval=function(){var a,c;return b.isCategory?a=2*u:(c=k.g.select("path.domain").node().getTotalLength()-2*l,a=c/k.g.selectAll("line").size()),a===1/0?0:a},k.ticks=function(){return arguments.length?(n=arguments,k):n},k.tickCulling=function(a){return arguments.length?(v=a,k):v},k.tickValues=function(a){if("function"==typeof a)t=function(){return a(p.domain())};else{if(!arguments.length)return t;t=a}return k},k}var h,i,j,k={version:"0.4.11"};k.generate=function(a){return new d(a)},k.chart={fn:d.prototype,internal:{fn:e.prototype,axis:{fn:f.prototype}}},h=k.chart.fn,i=k.chart.internal.fn,j=k.chart.internal.axis.fn,i.beforeInit=function(){},i.afterInit=function(){},i.init=function(){var a=this,b=a.config;if(a.initParams(),b.data_url)a.convertUrlToData(b.data_url,b.data_mimeType,b.data_headers,b.data_keys,a.initWithData);else if(b.data_json)a.initWithData(a.convertJsonToData(b.data_json,b.data_keys));else if(b.data_rows)a.initWithData(a.convertRowsToData(b.data_rows));else{if(!b.data_columns)throw Error("url or json or rows or columns is required.");a.initWithData(a.convertColumnsToData(b.data_columns))}},i.initParams=function(){var a=this,b=a.d3,c=a.config;a.clipId="c3-"+ +new Date+"-clip",a.clipIdForXAxis=a.clipId+"-xaxis",a.clipIdForYAxis=a.clipId+"-yaxis",a.clipIdForGrid=a.clipId+"-grid",a.clipIdForSubchart=a.clipId+"-subchart",a.clipPath=a.getClipPath(a.clipId),a.clipPathForXAxis=a.getClipPath(a.clipIdForXAxis),a.clipPathForYAxis=a.getClipPath(a.clipIdForYAxis),a.clipPathForGrid=a.getClipPath(a.clipIdForGrid),a.clipPathForSubchart=a.getClipPath(a.clipIdForSubchart),a.dragStart=null,a.dragging=!1,a.flowing=!1,a.cancelClick=!1,a.mouseover=!1,a.transiting=!1,a.color=a.generateColor(),a.levelColor=a.generateLevelColor(),a.dataTimeFormat=c.data_xLocaltime?b.time.format:b.time.format.utc,a.axisTimeFormat=c.axis_x_localtime?b.time.format:b.time.format.utc,a.defaultAxisTimeFormat=a.axisTimeFormat.multi([[".%L",function(a){return a.getMilliseconds()}],[":%S",function(a){return a.getSeconds()}],["%I:%M",function(a){return a.getMinutes()}],["%I %p",function(a){return a.getHours()}],["%-m/%-d",function(a){return a.getDay()&&1!==a.getDate()}],["%-m/%-d",function(a){return 1!==a.getDate()}],["%-m/%-d",function(a){return a.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),a.hiddenTargetIds=[],a.hiddenLegendIds=[],a.focusedTargetIds=[],a.defocusedTargetIds=[],a.xOrient=c.axis_rotated?"left":"bottom",a.yOrient=c.axis_rotated?c.axis_y_inner?"top":"bottom":c.axis_y_inner?"right":"left",a.y2Orient=c.axis_rotated?c.axis_y2_inner?"bottom":"top":c.axis_y2_inner?"left":"right",a.subXOrient=c.axis_rotated?"left":"bottom",a.isLegendRight="right"===c.legend_position,a.isLegendInset="inset"===c.legend_position,a.isLegendTop="top-left"===c.legend_inset_anchor||"top-right"===c.legend_inset_anchor,a.isLegendLeft="top-left"===c.legend_inset_anchor||"bottom-left"===c.legend_inset_anchor,a.legendStep=0,a.legendItemWidth=0,a.legendItemHeight=0,a.currentMaxTickWidths={x:0,y:0,y2:0},a.rotated_padding_left=30,a.rotated_padding_right=c.axis_rotated&&!c.axis_x_show?0:30,a.rotated_padding_top=5,a.withoutFadeIn={},a.intervalForObserveInserted=void 0,a.axes.subx=b.selectAll([])},i.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},i.initWithData=function(a){var b,c,d=this,e=d.d3,g=d.config,h=!0;d.axis=new f(d),d.initPie&&d.initPie(),d.initBrush&&d.initBrush(),d.initZoom&&d.initZoom(),g.bindto?"function"==typeof g.bindto.node?d.selectChart=g.bindto:d.selectChart=e.select(g.bindto):d.selectChart=e.selectAll([]),d.selectChart.empty()&&(d.selectChart=e.select(document.createElement("div")).style("opacity",0),d.observeInserted(d.selectChart),h=!1),d.selectChart.html("").classed("c3",!0),d.data.xs={},d.data.targets=d.convertDataToTargets(a),g.data_filter&&(d.data.targets=d.data.targets.filter(g.data_filter)),g.data_hide&&d.addHiddenTargetIds(g.data_hide===!0?d.mapToIds(d.data.targets):g.data_hide),g.legend_hide&&d.addHiddenLegendIds(g.legend_hide===!0?d.mapToIds(d.data.targets):g.legend_hide),d.hasType("gauge")&&(g.legend_show=!1),d.updateSizes(),d.updateScales(),d.x.domain(e.extent(d.getXDomain(d.data.targets))),d.y.domain(d.getYDomain(d.data.targets,"y")),d.y2.domain(d.getYDomain(d.data.targets,"y2")),d.subX.domain(d.x.domain()),d.subY.domain(d.y.domain()),d.subY2.domain(d.y2.domain()),d.orgXDomain=d.x.domain(),d.brush&&d.brush.scale(d.subX),g.zoom_enabled&&d.zoom.scale(d.x),d.svg=d.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return g.onmouseover.call(d)}).on("mouseleave",function(){return g.onmouseout.call(d)}),d.config.svg_classname&&d.svg.attr("class",d.config.svg_classname),b=d.svg.append("defs"),d.clipChart=d.appendClip(b,d.clipId),d.clipXAxis=d.appendClip(b,d.clipIdForXAxis),d.clipYAxis=d.appendClip(b,d.clipIdForYAxis),d.clipGrid=d.appendClip(b,d.clipIdForGrid),d.clipSubchart=d.appendClip(b,d.clipIdForSubchart),d.updateSvgSize(),c=d.main=d.svg.append("g").attr("transform",d.getTranslate("main")),d.initSubchart&&d.initSubchart(),d.initTooltip&&d.initTooltip(),d.initLegend&&d.initLegend(),d.initTitle&&d.initTitle(),c.append("text").attr("class",l.text+" "+l.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),d.initRegion(),d.initGrid(),c.append("g").attr("clip-path",d.clipPath).attr("class",l.chart),g.grid_lines_front&&d.initGridLines(),d.initEventRect(),d.initChartElements(),c.insert("rect",g.zoom_privileged?null:"g."+l.regions).attr("class",l.zoomRect).attr("width",d.width).attr("height",d.height).style("opacity",0).on("dblclick.zoom",null),g.axis_x_extent&&d.brush.extent(d.getDefaultExtent()),d.axis.init(),d.updateTargets(d.data.targets),h&&(d.updateDimension(),d.config.oninit.call(d),d.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),d.bindResize(),d.api.element=d.selectChart.node()},i.smoothLines=function(a,b){var c=this;"grid"===b&&a.each(function(){var a=c.d3.select(this),b=a.attr("x1"),d=a.attr("x2"),e=a.attr("y1"),f=a.attr("y2");a.attr({x1:Math.ceil(b),x2:Math.ceil(d),y1:Math.ceil(e),y2:Math.ceil(f)})})},i.updateSizes=function(){var a=this,b=a.config,c=a.legend?a.getLegendHeight():0,d=a.legend?a.getLegendWidth():0,e=a.isLegendRight||a.isLegendInset?0:c,f=a.hasArcType(),g=b.axis_rotated||f?0:a.getHorizontalAxisHeight("x"),h=b.subchart_show&&!f?b.subchart_size_height+g:0;a.currentWidth=a.getCurrentWidth(),a.currentHeight=a.getCurrentHeight(),a.margin=b.axis_rotated?{top:a.getHorizontalAxisHeight("y2")+a.getCurrentPaddingTop(),right:f?0:a.getCurrentPaddingRight(),bottom:a.getHorizontalAxisHeight("y")+e+a.getCurrentPaddingBottom(),left:h+(f?0:a.getCurrentPaddingLeft())}:{top:4+a.getCurrentPaddingTop(),right:f?0:a.getCurrentPaddingRight(),bottom:g+h+e+a.getCurrentPaddingBottom(),left:f?0:a.getCurrentPaddingLeft()},a.margin2=b.axis_rotated?{top:a.margin.top,right:NaN,bottom:20+e,left:a.rotated_padding_left}:{top:a.currentHeight-h-e,right:NaN,bottom:g+e,left:a.margin.left},a.margin3={top:0,right:NaN,bottom:0,left:0},a.updateSizeForLegend&&a.updateSizeForLegend(c,d),a.width=a.currentWidth-a.margin.left-a.margin.right,a.height=a.currentHeight-a.margin.top-a.margin.bottom,a.width<0&&(a.width=0),a.height<0&&(a.height=0),a.width2=b.axis_rotated?a.margin.left-a.rotated_padding_left-a.rotated_padding_right:a.width,a.height2=b.axis_rotated?a.height:a.currentHeight-a.margin2.top-a.margin2.bottom,a.width2<0&&(a.width2=0),a.height2<0&&(a.height2=0),a.arcWidth=a.width-(a.isLegendRight?d+10:0),a.arcHeight=a.height-(a.isLegendRight?0:10),a.hasType("gauge")&&!b.gauge_fullCircle&&(a.arcHeight+=a.height-a.getGaugeLabelHeight()),a.updateRadius&&a.updateRadius(),a.isLegendRight&&f&&(a.margin3.left=a.arcWidth/2+1.1*a.radiusExpanded)},i.updateTargets=function(a){var b=this;b.updateTargetsForText(a),b.updateTargetsForBar(a),b.updateTargetsForLine(a),b.hasArcType()&&b.updateTargetsForArc&&b.updateTargetsForArc(a),b.updateTargetsForSubchart&&b.updateTargetsForSubchart(a),b.showTargets()},i.showTargets=function(){var a=this;a.svg.selectAll("."+l.target).filter(function(b){return a.isTargetToShow(b.id)}).transition().duration(a.config.transition_duration).style("opacity",1)},i.redraw=function(a,b){var c,d,e,f,g,h,i,j,k,m,n,o,p,q,r,s,t,u,v,x,y,z,A,B,C,D,E,F,G,H=this,I=H.main,J=H.d3,K=H.config,L=H.getShapeIndices(H.isAreaType),M=H.getShapeIndices(H.isBarType),N=H.getShapeIndices(H.isLineType),O=H.hasArcType(),P=H.filterTargetsToShow(H.data.targets),Q=H.xv.bind(H);if(a=a||{},c=w(a,"withY",!0),d=w(a,"withSubchart",!0),e=w(a,"withTransition",!0),h=w(a,"withTransform",!1),i=w(a,"withUpdateXDomain",!1),j=w(a,"withUpdateOrgXDomain",!1),k=w(a,"withTrimXDomain",!0),p=w(a,"withUpdateXAxis",i),m=w(a,"withLegend",!1),n=w(a,"withEventRect",!0),o=w(a,"withDimension",!0),f=w(a,"withTransitionForExit",e),g=w(a,"withTransitionForAxis",e),v=e?K.transition_duration:0,x=f?v:0,y=g?v:0,b=b||H.axis.generateTransitions(y),m&&K.legend_show?H.updateLegend(H.mapToIds(H.data.targets),a,b):o&&H.updateDimension(!0),H.isCategorized()&&0===P.length&&H.x.domain([0,H.axes.x.selectAll(".tick").size()]),P.length?(H.updateXDomain(P,i,j,k),K.axis_x_tick_values||(B=H.axis.updateXAxisTickValues(P))):(H.xAxis.tickValues([]),H.subXAxis.tickValues([])),K.zoom_rescale&&!a.flow&&(E=H.x.orgDomain()),H.y.domain(H.getYDomain(P,"y",E)),H.y2.domain(H.getYDomain(P,"y2",E)),!K.axis_y_tick_values&&K.axis_y_tick_count&&H.yAxis.tickValues(H.axis.generateTickValues(H.y.domain(),K.axis_y_tick_count)),!K.axis_y2_tick_values&&K.axis_y2_tick_count&&H.y2Axis.tickValues(H.axis.generateTickValues(H.y2.domain(),K.axis_y2_tick_count)),H.axis.redraw(b,O),H.axis.updateLabels(e),(i||p)&&P.length)if(K.axis_x_tick_culling&&B){for(C=1;C<B.length;C++)if(B.length/C<K.axis_x_tick_culling_max){D=C;break}H.svg.selectAll("."+l.axisX+" .tick text").each(function(a){var b=B.indexOf(a);b>=0&&J.select(this).style("display",b%D?"none":"block")})}else H.svg.selectAll("."+l.axisX+" .tick text").style("display","block");q=H.generateDrawArea?H.generateDrawArea(L,!1):void 0,r=H.generateDrawBar?H.generateDrawBar(M):void 0,s=H.generateDrawLine?H.generateDrawLine(N,!1):void 0,t=H.generateXYForText(L,M,N,!0),u=H.generateXYForText(L,M,N,!1),c&&(H.subY.domain(H.getYDomain(P,"y")),H.subY2.domain(H.getYDomain(P,"y2"))),H.updateXgridFocus(),I.select("text."+l.text+"."+l.empty).attr("x",H.width/2).attr("y",H.height/2).text(K.data_empty_label_text).transition().style("opacity",P.length?0:1),H.updateGrid(v),H.updateRegion(v),H.updateBar(x),H.updateLine(x),H.updateArea(x),H.updateCircle(),H.hasDataLabel()&&H.updateText(x),H.redrawTitle&&H.redrawTitle(),H.redrawArc&&H.redrawArc(v,x,h),H.redrawSubchart&&H.redrawSubchart(d,b,v,x,L,M,N),I.selectAll("."+l.selectedCircles).filter(H.isBarType.bind(H)).selectAll("circle").remove(),K.interaction_enabled&&!a.flow&&n&&(H.redrawEventRect(),H.updateZoom&&H.updateZoom()),H.updateCircleY(),F=(H.config.axis_rotated?H.circleY:H.circleX).bind(H),G=(H.config.axis_rotated?H.circleX:H.circleY).bind(H),a.flow&&(A=H.generateFlow({targets:P,flow:a.flow,duration:a.flow.duration,drawBar:r,drawLine:s,drawArea:q,cx:F,cy:G,xv:Q,xForText:t,yForText:u})),(v||A)&&H.isTabVisible()?J.transition().duration(v).each(function(){var b=[];[H.redrawBar(r,!0),H.redrawLine(s,!0),H.redrawArea(q,!0),H.redrawCircle(F,G,!0),H.redrawText(t,u,a.flow,!0),H.redrawRegion(!0),H.redrawGrid(!0)].forEach(function(a){a.forEach(function(a){b.push(a)})}),z=H.generateWait(),b.forEach(function(a){z.add(a)})}).call(z,function(){A&&A(),K.onrendered&&K.onrendered.call(H)}):(H.redrawBar(r),H.redrawLine(s),H.redrawArea(q),H.redrawCircle(F,G),H.redrawText(t,u,a.flow),H.redrawRegion(),H.redrawGrid(),K.onrendered&&K.onrendered.call(H)),H.mapToIds(H.data.targets).forEach(function(a){H.withoutFadeIn[a]=!0})},i.updateAndRedraw=function(a){var b,c=this,d=c.config;a=a||{},a.withTransition=w(a,"withTransition",!0),a.withTransform=w(a,"withTransform",!1),a.withLegend=w(a,"withLegend",!1),a.withUpdateXDomain=!0,a.withUpdateOrgXDomain=!0,a.withTransitionForExit=!1,a.withTransitionForTransform=w(a,"withTransitionForTransform",a.withTransition),c.updateSizes(),a.withLegend&&d.legend_show||(b=c.axis.generateTransitions(a.withTransitionForAxis?d.transition_duration:0),c.updateScales(),c.updateSvgSize(),c.transformAll(a.withTransitionForTransform,b)),c.redraw(a,b)},i.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},i.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},i.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},i.isCustomX=function(){var a=this,b=a.config;return!a.isTimeSeries()&&(b.data_x||v(b.data_xs))},i.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},i.getTranslate=function(a){var b,c,d=this,e=d.config;return"main"===a?(b=s(d.margin.left),c=s(d.margin.top)):"context"===a?(b=s(d.margin2.left),c=s(d.margin2.top)):"legend"===a?(b=d.margin3.left,c=d.margin3.top):"x"===a?(b=0,c=e.axis_rotated?0:d.height):"y"===a?(b=0,c=e.axis_rotated?d.height:0):"y2"===a?(b=e.axis_rotated?0:d.width,c=e.axis_rotated?1:0):"subx"===a?(b=0,c=e.axis_rotated?0:d.height2):"arc"===a&&(b=d.arcWidth/2,c=d.arcHeight/2),"translate("+b+","+c+")"},i.initialOpacity=function(a){return null!==a.value&&this.withoutFadeIn[a.id]?1:0},i.initialOpacityForCircle=function(a){return null!==a.value&&this.withoutFadeIn[a.id]?this.opacityForCircle(a):0},i.opacityForCircle=function(a){var b=this.config.point_show?1:0;return m(a.value)?this.isScatterType(a)?.5:b:0},i.opacityForText=function(){return this.hasDataLabel()?1:0},i.xx=function(a){return a?this.x(a.x):null},i.xv=function(a){var b=this,c=a.value;return b.isTimeSeries()?c=b.parseDate(a.value):b.isCategorized()&&"string"==typeof a.value&&(c=b.config.axis_x_categories.indexOf(a.value)),Math.ceil(b.x(c))},i.yv=function(a){var b=this,c=a.axis&&"y2"===a.axis?b.y2:b.y;return Math.ceil(c(a.value))},i.subxx=function(a){return a?this.subX(a.x):null},i.transformMain=function(a,b){var c,d,e,f=this;b&&b.axisX?c=b.axisX:(c=f.main.select("."+l.axisX),a&&(c=c.transition())),b&&b.axisY?d=b.axisY:(d=f.main.select("."+l.axisY),a&&(d=d.transition())),b&&b.axisY2?e=b.axisY2:(e=f.main.select("."+l.axisY2),a&&(e=e.transition())),(a?f.main.transition():f.main).attr("transform",f.getTranslate("main")),c.attr("transform",f.getTranslate("x")),d.attr("transform",f.getTranslate("y")),e.attr("transform",f.getTranslate("y2")),f.main.select("."+l.chartArcs).attr("transform",f.getTranslate("arc"))},i.transformAll=function(a,b){var c=this;c.transformMain(a,b),c.config.subchart_show&&c.transformContext(a,b),c.legend&&c.transformLegend(a)},i.updateSvgSize=function(){var a=this,b=a.svg.select(".c3-brush .background");a.svg.attr("width",a.currentWidth).attr("height",a.currentHeight),a.svg.selectAll(["#"+a.clipId,"#"+a.clipIdForGrid]).select("rect").attr("width",a.width).attr("height",a.height),a.svg.select("#"+a.clipIdForXAxis).select("rect").attr("x",a.getXAxisClipX.bind(a)).attr("y",a.getXAxisClipY.bind(a)).attr("width",a.getXAxisClipWidth.bind(a)).attr("height",a.getXAxisClipHeight.bind(a)),a.svg.select("#"+a.clipIdForYAxis).select("rect").attr("x",a.getYAxisClipX.bind(a)).attr("y",a.getYAxisClipY.bind(a)).attr("width",a.getYAxisClipWidth.bind(a)).attr("height",a.getYAxisClipHeight.bind(a)),a.svg.select("#"+a.clipIdForSubchart).select("rect").attr("width",a.width).attr("height",b.size()?b.attr("height"):0),a.svg.select("."+l.zoomRect).attr("width",a.width).attr("height",a.height),a.selectChart.style("max-height",a.currentHeight+"px")},i.updateDimension=function(a){var b=this;a||(b.config.axis_rotated?(b.axes.x.call(b.xAxis),b.axes.subx.call(b.subXAxis)):(b.axes.y.call(b.yAxis),b.axes.y2.call(b.y2Axis))),b.updateSizes(),b.updateScales(),b.updateSvgSize(),b.transformAll(!1)},i.observeInserted=function(b){var c,d=this;return"undefined"==typeof MutationObserver?void a.console.error("MutationObserver not defined."):(c=new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type&&e.previousSibling&&(c.disconnect(),d.intervalForObserveInserted=a.setInterval(function(){b.node().parentNode&&(a.clearInterval(d.intervalForObserveInserted),d.updateDimension(),d.brush&&d.brush.update(),d.config.oninit.call(d),d.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),b.transition().style("opacity",1))},10))})}),void c.observe(b.node(),{attributes:!0,childList:!0,characterData:!0}))},i.bindResize=function(){var b=this,c=b.config;if(b.resizeFunction=b.generateResize(),b.resizeFunction.add(function(){c.onresize.call(b)}),c.resize_auto&&b.resizeFunction.add(function(){void 0!==b.resizeTimeout&&a.clearTimeout(b.resizeTimeout),b.resizeTimeout=a.setTimeout(function(){delete b.resizeTimeout,b.api.flush()},100)}),b.resizeFunction.add(function(){c.onresized.call(b)}),a.attachEvent)a.attachEvent("onresize",b.resizeFunction);else if(a.addEventListener)a.addEventListener("resize",b.resizeFunction,!1);else{var d=a.onresize;d?d.add&&d.remove||(d=b.generateResize(),d.add(a.onresize)):d=b.generateResize(),d.add(b.resizeFunction),a.onresize=d}},i.generateResize=function(){function a(){b.forEach(function(a){a()})}var b=[];return a.add=function(a){b.push(a)},a.remove=function(a){for(var c=0;c<b.length;c++)if(b[c]===a){b.splice(c,1);break}},a},i.endall=function(a,b){var c=0;a.each(function(){++c}).each("end",function(){--c||b.apply(this,arguments)})},i.generateWait=function(){var a=[],b=function(b,c){var d=setInterval(function(){var b=0;a.forEach(function(a){if(a.empty())return void(b+=1);try{a.transition()}catch(c){b+=1}}),b===a.length&&(clearInterval(d),c&&c())},10)};return b.add=function(b){a.push(b)},b},i.parseDate=function(b){var c,d=this;return b instanceof Date?c=b:"string"==typeof b?c=d.dataTimeFormat(d.config.data_xFormat).parse(b):"number"!=typeof b||isNaN(b)||(c=new Date(+b)),c&&!isNaN(+c)||a.console.error("Failed to parse x '"+b+"' to Date object"),c},i.isTabVisible=function(){var a;return"undefined"!=typeof document.hidden?a="hidden":"undefined"!=typeof document.mozHidden?a="mozHidden":"undefined"!=typeof document.msHidden?a="msHidden":"undefined"!=typeof document.webkitHidden&&(a="webkitHidden"),!document[a]},i.getDefaultConfig=function(){var a={bindto:"#chart",svg_classname:void 0,size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,zoom_enabled:!1,zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:function(){},zoom_onzoomstart:function(){},zoom_onzoomend:function(){},zoom_x_min:void 0,zoom_x_max:void 0,interaction_brighten:!0,interaction_enabled:!0,onmouseover:function(){},onmouseout:function(){},onresize:function(){},onresized:function(){},oninit:function(){},onrendered:function(){},transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(a){return a},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onmouseover:function(){},data_onmouseout:function(){},data_onselected:function(){},data_onunselected:function(){},data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_onbrush:function(){},color_pattern:[],color_threshold:{},legend_show:!0,legend_hide:!1,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onmouseover:void 0,legend_item_onmouseout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,axis_rotated:!1,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:void 0,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_time_value:void 0,axis_y_tick_time_interval:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y2_show:!1,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:void 0,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_padding:{},axis_y2_default:void 0,grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_select_r:void 0,line_connectNull:!1,line_step_type:"step",bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,area_zerobased:!0,area_above:!1,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_duration:50,gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_format:void 0,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_units:void 0,gauge_width:void 0,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_duration:50,spline_interpolation_type:"cardinal",regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:function(a,b,c,d){return this.getTooltipContent?this.getTooltipContent(a,b,c,d):""},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_onshow:function(){},tooltip_onhide:function(){},title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"top-center"};return Object.keys(this.additionalConfig).forEach(function(b){a[b]=this.additionalConfig[b]},this),a},i.additionalConfig={},i.loadConfig=function(a){function b(){var a=d.shift();return a&&c&&"object"==typeof c&&a in c?(c=c[a],b()):a?void 0:c}var c,d,e,f=this.config;Object.keys(f).forEach(function(g){c=a,d=g.split("_"),e=b(),q(e)&&(f[g]=e)})},i.getScale=function(a,b,c){return(c?this.d3.time.scale():this.d3.scale.linear()).range([a,b])},i.getX=function(a,b,c,d){var e,f=this,g=f.getScale(a,b,f.isTimeSeries()),h=c?g.domain(c):g;f.isCategorized()?(d=d||function(){return 0},g=function(a,b){var c=h(a)+d(a);return b?c:Math.ceil(c)}):g=function(a,b){var c=h(a);return b?c:Math.ceil(c)};for(e in h)g[e]=h[e];return g.orgDomain=function(){return h.domain()},f.isCategorized()&&(g.domain=function(a){return arguments.length?(h.domain(a),g):(a=this.orgDomain(),[a[0],a[1]+1])}),g},i.getY=function(a,b,c){var d=this.getScale(a,b,this.isTimeSeriesY());return c&&d.domain(c),d},i.getYScale=function(a){return"y2"===this.axis.getId(a)?this.y2:this.y},i.getSubYScale=function(a){return"y2"===this.axis.getId(a)?this.subY2:this.subY},i.updateScales=function(){var a=this,b=a.config,c=!a.x;a.xMin=b.axis_rotated?1:0,a.xMax=b.axis_rotated?a.height:a.width,a.yMin=b.axis_rotated?0:a.height,a.yMax=b.axis_rotated?a.width:1,a.subXMin=a.xMin,a.subXMax=a.xMax,a.subYMin=b.axis_rotated?0:a.height2,a.subYMax=b.axis_rotated?a.width2:1,a.x=a.getX(a.xMin,a.xMax,c?void 0:a.x.orgDomain(),function(){return a.xAxis.tickOffset()}),a.y=a.getY(a.yMin,a.yMax,c?b.axis_y_default:a.y.domain()),a.y2=a.getY(a.yMin,a.yMax,c?b.axis_y2_default:a.y2.domain()),a.subX=a.getX(a.xMin,a.xMax,a.orgXDomain,function(b){return b%1?0:a.subXAxis.tickOffset()}),a.subY=a.getY(a.subYMin,a.subYMax,c?b.axis_y_default:a.subY.domain()),a.subY2=a.getY(a.subYMin,a.subYMax,c?b.axis_y2_default:a.subY2.domain()),a.xAxisTickFormat=a.axis.getXAxisTickFormat(),a.xAxisTickValues=a.axis.getXAxisTickValues(),a.yAxisTickValues=a.axis.getYAxisTickValues(),a.y2AxisTickValues=a.axis.getY2AxisTickValues(),a.xAxis=a.axis.getXAxis(a.x,a.xOrient,a.xAxisTickFormat,a.xAxisTickValues,b.axis_x_tick_outer),a.subXAxis=a.axis.getXAxis(a.subX,a.subXOrient,a.xAxisTickFormat,a.xAxisTickValues,b.axis_x_tick_outer),a.yAxis=a.axis.getYAxis(a.y,a.yOrient,b.axis_y_tick_format,a.yAxisTickValues,b.axis_y_tick_outer),a.y2Axis=a.axis.getYAxis(a.y2,a.y2Orient,b.axis_y2_tick_format,a.y2AxisTickValues,b.axis_y2_tick_outer),c||(a.brush&&a.brush.scale(a.subX),b.zoom_enabled&&a.zoom.scale(a.x)),a.updateArc&&a.updateArc()},i.getYDomainMin=function(a){var b,c,d,e,f,g,h=this,i=h.config,j=h.mapToIds(a),k=h.getValuesAsIdKeyed(a);if(i.data_groups.length>0)for(g=h.hasNegativeValueInTargets(a),b=0;b<i.data_groups.length;b++)if(e=i.data_groups[b].filter(function(a){return j.indexOf(a)>=0}),0!==e.length)for(d=e[0],g&&k[d]&&k[d].forEach(function(a,b){k[d][b]=0>a?a:0}),c=1;c<e.length;c++)f=e[c],k[f]&&k[f].forEach(function(a,b){h.axis.getId(f)!==h.axis.getId(d)||!k[d]||g&&+a>0||(k[d][b]+=+a)});return h.d3.min(Object.keys(k).map(function(a){return h.d3.min(k[a])}))},i.getYDomainMax=function(a){var b,c,d,e,f,g,h=this,i=h.config,j=h.mapToIds(a),k=h.getValuesAsIdKeyed(a);if(i.data_groups.length>0)for(g=h.hasPositiveValueInTargets(a),b=0;b<i.data_groups.length;b++)if(e=i.data_groups[b].filter(function(a){return j.indexOf(a)>=0}),0!==e.length)for(d=e[0],g&&k[d]&&k[d].forEach(function(a,b){k[d][b]=a>0?a:0}),c=1;c<e.length;c++)f=e[c],k[f]&&k[f].forEach(function(a,b){h.axis.getId(f)!==h.axis.getId(d)||!k[d]||g&&0>+a||(k[d][b]+=+a)});return h.d3.max(Object.keys(k).map(function(a){return h.d3.max(k[a])}))},i.getYDomain=function(a,b,c){var d,e,f,g,h,i,j,k,l,n,o,p=this,q=p.config,r=a.filter(function(a){return p.axis.getId(a.id)===b}),s=c?p.filterByXDomain(r,c):r,u="y2"===b?q.axis_y2_min:q.axis_y_min,w="y2"===b?q.axis_y2_max:q.axis_y_max,x=p.getYDomainMin(s),y=p.getYDomainMax(s),z="y2"===b?q.axis_y2_center:q.axis_y_center,A=p.hasType("bar",s)&&q.bar_zerobased||p.hasType("area",s)&&q.area_zerobased,B="y2"===b?q.axis_y2_inverted:q.axis_y_inverted,C=p.hasDataLabel()&&q.axis_rotated,D=p.hasDataLabel()&&!q.axis_rotated;return x=m(u)?u:m(w)?w>x?x:w-10:x,y=m(w)?w:m(u)?y>u?y:u+10:y,0===s.length?"y2"===b?p.y2.domain():p.y.domain():(isNaN(x)&&(x=0),isNaN(y)&&(y=x),x===y&&(0>x?y=0:x=0),n=x>=0&&y>=0,o=0>=x&&0>=y,(m(u)&&n||m(w)&&o)&&(A=!1),A&&(n&&(x=0),o&&(y=0)),e=Math.abs(y-x),f=g=h=.1*e,"undefined"!=typeof z&&(i=Math.max(Math.abs(x),Math.abs(y)),y=z+i,x=z-i),C?(j=p.getDataLabelLength(x,y,"width"),k=t(p.y.range()),l=[j[0]/k,j[1]/k],
2353 9877 g+=e*(l[1]/(1-l[0]-l[1])),h+=e*(l[0]/(1-l[0]-l[1]))):D&&(j=p.getDataLabelLength(x,y,"height"),g+=p.axis.convertPixelsToAxisPadding(j[1],e),h+=p.axis.convertPixelsToAxisPadding(j[0],e)),"y"===b&&v(q.axis_y_padding)&&(g=p.axis.getPadding(q.axis_y_padding,"top",g,e),h=p.axis.getPadding(q.axis_y_padding,"bottom",h,e)),"y2"===b&&v(q.axis_y2_padding)&&(g=p.axis.getPadding(q.axis_y2_padding,"top",g,e),h=p.axis.getPadding(q.axis_y2_padding,"bottom",h,e)),A&&(n&&(h=x),o&&(g=-y)),d=[x-h,y+g],B?d.reverse():d)},i.getXDomainMin=function(a){var b=this,c=b.config;return q(c.axis_x_min)?b.isTimeSeries()?this.parseDate(c.axis_x_min):c.axis_x_min:b.d3.min(a,function(a){return b.d3.min(a.values,function(a){return a.x})})},i.getXDomainMax=function(a){var b=this,c=b.config;return q(c.axis_x_max)?b.isTimeSeries()?this.parseDate(c.axis_x_max):c.axis_x_max:b.d3.max(a,function(a){return b.d3.max(a.values,function(a){return a.x})})},i.getXDomainPadding=function(a){var b,c,d,e,f=this,g=f.config,h=a[1]-a[0];return f.isCategorized()?c=0:f.hasType("bar")?(b=f.getMaxDataCount(),c=b>1?h/(b-1)/2:.5):c=.01*h,"object"==typeof g.axis_x_padding&&v(g.axis_x_padding)?(d=m(g.axis_x_padding.left)?g.axis_x_padding.left:c,e=m(g.axis_x_padding.right)?g.axis_x_padding.right:c):d=e="number"==typeof g.axis_x_padding?g.axis_x_padding:c,{left:d,right:e}},i.getXDomain=function(a){var b=this,c=[b.getXDomainMin(a),b.getXDomainMax(a)],d=c[0],e=c[1],f=b.getXDomainPadding(c),g=0,h=0;return d-e!==0||b.isCategorized()||(b.isTimeSeries()?(d=new Date(.5*d.getTime()),e=new Date(1.5*e.getTime())):(d=0===d?1:.5*d,e=0===e?-1:1.5*e)),(d||0===d)&&(g=b.isTimeSeries()?new Date(d.getTime()-f.left):d-f.left),(e||0===e)&&(h=b.isTimeSeries()?new Date(e.getTime()+f.right):e+f.right),[g,h]},i.updateXDomain=function(a,b,c,d,e){var f=this,g=f.config;return c&&(f.x.domain(e?e:f.d3.extent(f.getXDomain(a))),f.orgXDomain=f.x.domain(),g.zoom_enabled&&f.zoom.scale(f.x).updateScaleExtent(),f.subX.domain(f.x.domain()),f.brush&&f.brush.scale(f.subX)),b&&(f.x.domain(e?e:!f.brush||f.brush.empty()?f.orgXDomain:f.brush.extent()),g.zoom_enabled&&f.zoom.scale(f.x).updateScaleExtent()),d&&f.x.domain(f.trimXDomain(f.x.orgDomain())),f.x.domain()},i.trimXDomain=function(a){var b=this.getZoomDomain(),c=b[0],d=b[1];return a[0]<=c&&(a[1]=+a[1]+(c-a[0]),a[0]=c),d<=a[1]&&(a[0]=+a[0]-(a[1]-d),a[1]=d),a},i.isX=function(a){var b=this,c=b.config;return c.data_x&&a===c.data_x||v(c.data_xs)&&x(c.data_xs,a)},i.isNotX=function(a){return!this.isX(a)},i.getXKey=function(a){var b=this,c=b.config;return c.data_x?c.data_x:v(c.data_xs)?c.data_xs[a]:null},i.getXValuesOfXKey=function(a,b){var c,d=this,e=b&&v(b)?d.mapToIds(b):[];return e.forEach(function(b){d.getXKey(b)===a&&(c=d.data.xs[b])}),c},i.getIndexByX=function(a){var b=this,c=b.filterByX(b.data.targets,a);return c.length?c[0].index:null},i.getXValue=function(a,b){var c=this;return a in c.data.xs&&c.data.xs[a]&&m(c.data.xs[a][b])?c.data.xs[a][b]:b},i.getOtherTargetXs=function(){var a=this,b=Object.keys(a.data.xs);return b.length?a.data.xs[b[0]]:null},i.getOtherTargetX=function(a){var b=this.getOtherTargetXs();return b&&a<b.length?b[a]:null},i.addXs=function(a){var b=this;Object.keys(a).forEach(function(c){b.config.data_xs[c]=a[c]})},i.hasMultipleX=function(a){return this.d3.set(Object.keys(a).map(function(b){return a[b]})).size()>1},i.isMultipleX=function(){return v(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},i.addName=function(a){var b,c=this;return a&&(b=c.config.data_names[a.id],a.name=void 0!==b?b:a.id),a},i.getValueOnIndex=function(a,b){var c=a.filter(function(a){return a.index===b});return c.length?c[0]:null},i.updateTargetX=function(a,b){var c=this;a.forEach(function(a){a.values.forEach(function(d,e){d.x=c.generateTargetX(b[e],a.id,e)}),c.data.xs[a.id]=b})},i.updateTargetXs=function(a,b){var c=this;a.forEach(function(a){b[a.id]&&c.updateTargetX([a],b[a.id])})},i.generateTargetX=function(a,b,c){var d,e=this;return d=e.isTimeSeries()?a?e.parseDate(a):e.parseDate(e.getXValue(b,c)):e.isCustomX()&&!e.isCategorized()?m(a)?+a:e.getXValue(b,c):c},i.cloneTarget=function(a){return{id:a.id,id_org:a.id_org,values:a.values.map(function(a){return{x:a.x,value:a.value,id:a.id}})}},i.updateXs=function(){var a=this;a.data.targets.length&&(a.xs=[],a.data.targets[0].values.forEach(function(b){a.xs[b.index]=b.x}))},i.getPrevX=function(a){var b=this.xs[a-1];return"undefined"!=typeof b?b:null},i.getNextX=function(a){var b=this.xs[a+1];return"undefined"!=typeof b?b:null},i.getMaxDataCount=function(){var a=this;return a.d3.max(a.data.targets,function(a){return a.values.length})},i.getMaxDataCountTarget=function(a){var b,c=a.length,d=0;return c>1?a.forEach(function(a){a.values.length>d&&(b=a,d=a.values.length)}):b=c?a[0]:null,b},i.getEdgeX=function(a){var b=this;return a.length?[b.d3.min(a,function(a){return a.values[0].x}),b.d3.max(a,function(a){return a.values[a.values.length-1].x})]:[0,0]},i.mapToIds=function(a){return a.map(function(a){return a.id})},i.mapToTargetIds=function(a){var b=this;return a?[].concat(a):b.mapToIds(b.data.targets)},i.hasTarget=function(a,b){var c,d=this.mapToIds(a);for(c=0;c<d.length;c++)if(d[c]===b)return!0;return!1},i.isTargetToShow=function(a){return this.hiddenTargetIds.indexOf(a)<0},i.isLegendToShow=function(a){return this.hiddenLegendIds.indexOf(a)<0},i.filterTargetsToShow=function(a){var b=this;return a.filter(function(a){return b.isTargetToShow(a.id)})},i.mapTargetsToUniqueXs=function(a){var b=this,c=b.d3.set(b.d3.merge(a.map(function(a){return a.values.map(function(a){return+a.x})}))).values();return c=b.isTimeSeries()?c.map(function(a){return new Date(+a)}):c.map(function(a){return+a}),c.sort(function(a,b){return b>a?-1:a>b?1:a>=b?0:NaN})},i.addHiddenTargetIds=function(a){this.hiddenTargetIds=this.hiddenTargetIds.concat(a)},i.removeHiddenTargetIds=function(a){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(b){return a.indexOf(b)<0})},i.addHiddenLegendIds=function(a){this.hiddenLegendIds=this.hiddenLegendIds.concat(a)},i.removeHiddenLegendIds=function(a){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(b){return a.indexOf(b)<0})},i.getValuesAsIdKeyed=function(a){var b={};return a.forEach(function(a){b[a.id]=[],a.values.forEach(function(c){b[a.id].push(c.value)})}),b},i.checkValueInTargets=function(a,b){var c,d,e,f=Object.keys(a);for(c=0;c<f.length;c++)for(e=a[f[c]].values,d=0;d<e.length;d++)if(b(e[d].value))return!0;return!1},i.hasNegativeValueInTargets=function(a){return this.checkValueInTargets(a,function(a){return 0>a})},i.hasPositiveValueInTargets=function(a){return this.checkValueInTargets(a,function(a){return a>0})},i.isOrderDesc=function(){var a=this.config;return"string"==typeof a.data_order&&"desc"===a.data_order.toLowerCase()},i.isOrderAsc=function(){var a=this.config;return"string"==typeof a.data_order&&"asc"===a.data_order.toLowerCase()},i.orderTargets=function(a){var b=this,c=b.config,d=b.isOrderAsc(),e=b.isOrderDesc();return d||e?a.sort(function(a,b){var c=function(a,b){return a+Math.abs(b.value)},e=a.values.reduce(c,0),f=b.values.reduce(c,0);return d?f-e:e-f}):n(c.data_order)&&a.sort(c.data_order),a},i.filterByX=function(a,b){return this.d3.merge(a.map(function(a){return a.values})).filter(function(a){return a.x-b===0})},i.filterRemoveNull=function(a){return a.filter(function(a){return m(a.value)})},i.filterByXDomain=function(a,b){return a.map(function(a){return{id:a.id,id_org:a.id_org,values:a.values.filter(function(a){return b[0]<=a.x&&a.x<=b[1]})}})},i.hasDataLabel=function(){var a=this.config;return"boolean"==typeof a.data_labels&&a.data_labels?!0:!("object"!=typeof a.data_labels||!v(a.data_labels))},i.getDataLabelLength=function(a,b,c){var d=this,e=[0,0],f=1.3;return d.selectChart.select("svg").selectAll(".dummy").data([a,b]).enter().append("text").text(function(a){return d.dataLabelFormat(a.id)(a)}).each(function(a,b){e[b]=this.getBoundingClientRect()[c]*f}).remove(),e},i.isNoneArc=function(a){return this.hasTarget(this.data.targets,a.id)},i.isArc=function(a){return"data"in a&&this.hasTarget(this.data.targets,a.data.id)},i.findSameXOfValues=function(a,b){var c,d=a[b].x,e=[];for(c=b-1;c>=0&&d===a[c].x;c--)e.push(a[c]);for(c=b;c<a.length&&d===a[c].x;c++)e.push(a[c]);return e},i.findClosestFromTargets=function(a,b){var c,d=this;return c=a.map(function(a){return d.findClosest(a.values,b)}),d.findClosest(c,b)},i.findClosest=function(a,b){var c,d=this,e=d.config.point_sensitivity;return a.filter(function(a){return a&&d.isBarType(a.id)}).forEach(function(a){var b=d.main.select("."+l.bars+d.getTargetSelectorSuffix(a.id)+" ."+l.bar+"-"+a.index).node();!c&&d.isWithinBar(b)&&(c=a)}),a.filter(function(a){return a&&!d.isBarType(a.id)}).forEach(function(a){var f=d.dist(a,b);e>f&&(e=f,c=a)}),c},i.dist=function(a,b){var c=this,d=c.config,e=d.axis_rotated?1:0,f=d.axis_rotated?0:1,g=c.circleY(a,a.index),h=c.x(a.x);return Math.sqrt(Math.pow(h-b[e],2)+Math.pow(g-b[f],2))},i.convertValuesToStep=function(a){var b,c=[].concat(a);if(!this.isCategorized())return a;for(b=a.length+1;b>0;b--)c[b]=c[b-1];return c[0]={x:c[0].x-1,value:c[0].value,id:c[0].id},c[a.length+1]={x:c[a.length].x+1,value:c[a.length].value,id:c[a.length].id},c},i.updateDataAttributes=function(a,b){var c=this,d=c.config,e=d["data_"+a];return"undefined"==typeof b?e:(Object.keys(b).forEach(function(a){e[a]=b[a]}),c.redraw({withLegend:!0}),e)},i.convertUrlToData=function(a,b,c,d,e){var f=this,g=b?b:"csv",h=f.d3.xhr(a);c&&Object.keys(c).forEach(function(a){h.header(a,c[a])}),h.get(function(a,b){var c;if(!b)throw new Error(a.responseURL+" "+a.status+" ("+a.statusText+")");c="json"===g?f.convertJsonToData(JSON.parse(b.response),d):"tsv"===g?f.convertTsvToData(b.response):f.convertCsvToData(b.response),e.call(f,c)})},i.convertXsvToData=function(a,b){var c,d=b.parseRows(a);return 1===d.length?(c=[{}],d[0].forEach(function(a){c[0][a]=null})):c=b.parse(a),c},i.convertCsvToData=function(a){return this.convertXsvToData(a,this.d3.csv)},i.convertTsvToData=function(a){return this.convertXsvToData(a,this.d3.tsv)},i.convertJsonToData=function(a,b){var c,d,e=this,f=[];return b?(b.x?(c=b.value.concat(b.x),e.config.data_x=b.x):c=b.value,f.push(c),a.forEach(function(a){var b=[];c.forEach(function(c){var d=e.findValueInJson(a,c);p(d)&&(d=null),b.push(d)}),f.push(b)}),d=e.convertRowsToData(f)):(Object.keys(a).forEach(function(b){f.push([b].concat(a[b]))}),d=e.convertColumnsToData(f)),d},i.findValueInJson=function(a,b){b=b.replace(/\[(\w+)\]/g,".$1"),b=b.replace(/^\./,"");for(var c=b.split("."),d=0;d<c.length;++d){var e=c[d];if(!(e in a))return;a=a[e]}return a},i.convertRowsToData=function(a){var b,c,d=a[0],e={},f=[];for(b=1;b<a.length;b++){for(e={},c=0;c<a[b].length;c++){if(p(a[b][c]))throw new Error("Source data is missing a component at ("+b+","+c+")!");e[d[c]]=a[b][c]}f.push(e)}return f},i.convertColumnsToData=function(a){var b,c,d,e=[];for(b=0;b<a.length;b++)for(d=a[b][0],c=1;c<a[b].length;c++){if(p(e[c-1])&&(e[c-1]={}),p(a[b][c]))throw new Error("Source data is missing a component at ("+b+","+c+")!");e[c-1][d]=a[b][c]}return e},i.convertDataToTargets=function(a,b){var c,d=this,e=d.config,f=d.d3.keys(a[0]).filter(d.isNotX,d),g=d.d3.keys(a[0]).filter(d.isX,d);return f.forEach(function(c){var f=d.getXKey(c);d.isCustomX()||d.isTimeSeries()?g.indexOf(f)>=0?d.data.xs[c]=(b&&d.data.xs[c]?d.data.xs[c]:[]).concat(a.map(function(a){return a[f]}).filter(m).map(function(a,b){return d.generateTargetX(a,c,b)})):e.data_x?d.data.xs[c]=d.getOtherTargetXs():v(e.data_xs)&&(d.data.xs[c]=d.getXValuesOfXKey(f,d.data.targets)):d.data.xs[c]=a.map(function(a,b){return b})}),f.forEach(function(a){if(!d.data.xs[a])throw new Error('x is not defined for id = "'+a+'".')}),c=f.map(function(b,c){var f=e.data_idConverter(b);return{id:f,id_org:b,values:a.map(function(a,g){var h,i=d.getXKey(b),j=a[i],k=null===a[b]||isNaN(a[b])?null:+a[b];return d.isCustomX()&&d.isCategorized()&&0===c&&!p(j)?(0===c&&0===g&&(e.axis_x_categories=[]),h=e.axis_x_categories.indexOf(j),-1===h&&(h=e.axis_x_categories.length,e.axis_x_categories.push(j))):h=d.generateTargetX(j,b,g),(p(a[b])||d.data.xs[b].length<=g)&&(h=void 0),{x:h,value:k,id:f}}).filter(function(a){return q(a.x)})}}),c.forEach(function(a){var b;e.data_xSort&&(a.values=a.values.sort(function(a,b){var c=a.x||0===a.x?a.x:1/0,d=b.x||0===b.x?b.x:1/0;return c-d})),b=0,a.values.forEach(function(a){a.index=b++}),d.data.xs[a.id].sort(function(a,b){return a-b})}),d.hasNegativeValue=d.hasNegativeValueInTargets(c),d.hasPositiveValue=d.hasPositiveValueInTargets(c),e.data_type&&d.setTargetType(d.mapToIds(c).filter(function(a){return!(a in e.data_types)}),e.data_type),c.forEach(function(a){d.addCache(a.id_org,a)}),c},i.load=function(a,b){var c=this;a&&(b.filter&&(a=a.filter(b.filter)),(b.type||b.types)&&a.forEach(function(a){var d=b.types&&b.types[a.id]?b.types[a.id]:b.type;c.setTargetType(a.id,d)}),c.data.targets.forEach(function(b){for(var c=0;c<a.length;c++)if(b.id===a[c].id){b.values=a[c].values,a.splice(c,1);break}}),c.data.targets=c.data.targets.concat(a)),c.updateTargets(c.data.targets),c.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),b.done&&b.done()},i.loadFromArgs=function(a){var b=this;a.data?b.load(b.convertDataToTargets(a.data),a):a.url?b.convertUrlToData(a.url,a.mimeType,a.headers,a.keys,function(c){b.load(b.convertDataToTargets(c),a)}):a.json?b.load(b.convertDataToTargets(b.convertJsonToData(a.json,a.keys)),a):a.rows?b.load(b.convertDataToTargets(b.convertRowsToData(a.rows)),a):a.columns?b.load(b.convertDataToTargets(b.convertColumnsToData(a.columns)),a):b.load(null,a)},i.unload=function(a,b){var c=this;return b||(b=function(){}),a=a.filter(function(a){return c.hasTarget(c.data.targets,a)}),a&&0!==a.length?(c.svg.selectAll(a.map(function(a){return c.selectorTarget(a)})).transition().style("opacity",0).remove().call(c.endall,b),void a.forEach(function(a){c.withoutFadeIn[a]=!1,c.legend&&c.legend.selectAll("."+l.legendItem+c.getTargetSelectorSuffix(a)).remove(),c.data.targets=c.data.targets.filter(function(b){return b.id!==a})})):void b()},i.categoryName=function(a){var b=this.config;return a<b.axis_x_categories.length?b.axis_x_categories[a]:a},i.initEventRect=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.eventRects).style("fill-opacity",0)},i.redrawEventRect=function(){var a,b,c=this,d=c.config,e=c.isMultipleX(),f=c.main.select("."+l.eventRects).style("cursor",d.zoom_enabled?d.axis_rotated?"ns-resize":"ew-resize":null).classed(l.eventRectsMultiple,e).classed(l.eventRectsSingle,!e);f.selectAll("."+l.eventRect).remove(),c.eventRect=f.selectAll("."+l.eventRect),e?(a=c.eventRect.data([0]),c.generateEventRectsForMultipleXs(a.enter()),c.updateEventRect(a)):(b=c.getMaxDataCountTarget(c.data.targets),f.datum(b?b.values:[]),c.eventRect=f.selectAll("."+l.eventRect),a=c.eventRect.data(function(a){return a}),c.generateEventRectsForSingleX(a.enter()),c.updateEventRect(a),a.exit().remove())},i.updateEventRect=function(a){var b,c,d,e,f,g,h=this,i=h.config;a=a||h.eventRect.data(function(a){return a}),h.isMultipleX()?(b=0,c=0,d=h.width,e=h.height):(!h.isCustomX()&&!h.isTimeSeries()||h.isCategorized()?(f=h.getEventRectWidth(),g=function(a){return h.x(a.x)-f/2}):(h.updateXs(),f=function(a){var b=h.getPrevX(a.index),c=h.getNextX(a.index);return null===b&&null===c?i.axis_rotated?h.height:h.width:(null===b&&(b=h.x.domain()[0]),null===c&&(c=h.x.domain()[1]),Math.max(0,(h.x(c)-h.x(b))/2))},g=function(a){var b=h.getPrevX(a.index),c=h.getNextX(a.index),d=h.data.xs[a.id][a.index];return null===b&&null===c?0:(null===b&&(b=h.x.domain()[0]),(h.x(d)+h.x(b))/2)}),b=i.axis_rotated?0:g,c=i.axis_rotated?g:0,d=i.axis_rotated?h.width:f,e=i.axis_rotated?f:h.height),a.attr("class",h.classEvent.bind(h)).attr("x",b).attr("y",c).attr("width",d).attr("height",e)},i.generateEventRectsForSingleX=function(a){var b=this,c=b.d3,d=b.config;a.append("rect").attr("class",b.classEvent.bind(b)).style("cursor",d.data_selection_enabled&&d.data_selection_grouped?"pointer":null).on("mouseover",function(a){var c=a.index;b.dragging||b.flowing||b.hasArcType()||(d.point_focus_expand_enabled&&b.expandCircles(c,null,!0),b.expandBars(c,null,!0),b.main.selectAll("."+l.shape+"-"+c).each(function(a){d.data_onmouseover.call(b.api,a)}))}).on("mouseout",function(a){var c=a.index;b.config&&(b.hasArcType()||(b.hideXGridFocus(),b.hideTooltip(),b.unexpandCircles(),b.unexpandBars(),b.main.selectAll("."+l.shape+"-"+c).each(function(a){d.data_onmouseout.call(b.api,a)})))}).on("mousemove",function(a){var e,f=a.index,g=b.svg.select("."+l.eventRect+"-"+f);b.dragging||b.flowing||b.hasArcType()||(b.isStepType(a)&&"step-after"===b.config.line_step_type&&c.mouse(this)[0]<b.x(b.getXValue(a.id,f))&&(f-=1),e=b.filterTargetsToShow(b.data.targets).map(function(a){return b.addName(b.getValueOnIndex(a.values,f))}),d.tooltip_grouped&&(b.showTooltip(e,this),b.showXGridFocus(e)),(!d.tooltip_grouped||d.data_selection_enabled&&!d.data_selection_grouped)&&b.main.selectAll("."+l.shape+"-"+f).each(function(){c.select(this).classed(l.EXPANDED,!0),d.data_selection_enabled&&g.style("cursor",d.data_selection_grouped?"pointer":null),d.tooltip_grouped||(b.hideXGridFocus(),b.hideTooltip(),d.data_selection_grouped||(b.unexpandCircles(f),b.unexpandBars(f)))}).filter(function(a){return b.isWithinShape(this,a)}).each(function(a){d.data_selection_enabled&&(d.data_selection_grouped||d.data_selection_isselectable(a))&&g.style("cursor","pointer"),d.tooltip_grouped||(b.showTooltip([a],this),b.showXGridFocus([a]),d.point_focus_expand_enabled&&b.expandCircles(f,a.id,!0),b.expandBars(f,a.id,!0))}))}).on("click",function(a){var e=a.index;if(!b.hasArcType()&&b.toggleShape){if(b.cancelClick)return void(b.cancelClick=!1);b.isStepType(a)&&"step-after"===d.line_step_type&&c.mouse(this)[0]<b.x(b.getXValue(a.id,e))&&(e-=1),b.main.selectAll("."+l.shape+"-"+e).each(function(a){(d.data_selection_grouped||b.isWithinShape(this,a))&&(b.toggleShape(this,a,e),b.config.data_onclick.call(b.api,a,this))})}}).call(d.data_selection_draggable&&b.drag?c.behavior.drag().origin(Object).on("drag",function(){b.drag(c.mouse(this))}).on("dragstart",function(){b.dragstart(c.mouse(this))}).on("dragend",function(){b.dragend()}):function(){})},i.generateEventRectsForMultipleXs=function(a){function b(){c.svg.select("."+l.eventRect).style("cursor",null),c.hideXGridFocus(),c.hideTooltip(),c.unexpandCircles(),c.unexpandBars()}var c=this,d=c.d3,e=c.config;a.append("rect").attr("x",0).attr("y",0).attr("width",c.width).attr("height",c.height).attr("class",l.eventRect).on("mouseout",function(){c.config&&(c.hasArcType()||b())}).on("mousemove",function(){var a,f,g,h,i=c.filterTargetsToShow(c.data.targets);if(!c.dragging&&!c.hasArcType(i)){if(a=d.mouse(this),f=c.findClosestFromTargets(i,a),!c.mouseover||f&&f.id===c.mouseover.id||(e.data_onmouseout.call(c.api,c.mouseover),c.mouseover=void 0),!f)return void b();g=c.isScatterType(f)||!e.tooltip_grouped?[f]:c.filterByX(i,f.x),h=g.map(function(a){return c.addName(a)}),c.showTooltip(h,this),e.point_focus_expand_enabled&&c.expandCircles(f.index,f.id,!0),c.expandBars(f.index,f.id,!0),c.showXGridFocus(h),(c.isBarType(f.id)||c.dist(f,a)<e.point_sensitivity)&&(c.svg.select("."+l.eventRect).style("cursor","pointer"),c.mouseover||(e.data_onmouseover.call(c.api,f),c.mouseover=f))}}).on("click",function(){var a,b,f=c.filterTargetsToShow(c.data.targets);c.hasArcType(f)||(a=d.mouse(this),b=c.findClosestFromTargets(f,a),b&&(c.isBarType(b.id)||c.dist(b,a)<e.point_sensitivity)&&c.main.selectAll("."+l.shapes+c.getTargetSelectorSuffix(b.id)).selectAll("."+l.shape+"-"+b.index).each(function(){(e.data_selection_grouped||c.isWithinShape(this,b))&&(c.toggleShape(this,b,b.index),c.config.data_onclick.call(c.api,b,this))}))}).call(e.data_selection_draggable&&c.drag?d.behavior.drag().origin(Object).on("drag",function(){c.drag(d.mouse(this))}).on("dragstart",function(){c.dragstart(d.mouse(this))}).on("dragend",function(){c.dragend()}):function(){})},i.dispatchEvent=function(b,c,d){var e=this,f="."+l.eventRect+(e.isMultipleX()?"":"-"+c),g=e.main.select(f).node(),h=g.getBoundingClientRect(),i=h.left+(d?d[0]:0),j=h.top+(d?d[1]:0),k=document.createEvent("MouseEvents");k.initMouseEvent(b,!0,!0,a,0,i,j,i,j,!1,!1,!1,!1,0,null),g.dispatchEvent(k)},i.getCurrentWidth=function(){var a=this,b=a.config;return b.size_width?b.size_width:a.getParentWidth()},i.getCurrentHeight=function(){var a=this,b=a.config,c=b.size_height?b.size_height:a.getParentHeight();return c>0?c:320/(a.hasType("gauge")&&!b.gauge_fullCircle?2:1)},i.getCurrentPaddingTop=function(){var a=this,b=a.config,c=m(b.padding_top)?b.padding_top:0;return a.title&&a.title.node()&&(c+=a.getTitlePadding()),c},i.getCurrentPaddingBottom=function(){var a=this.config;return m(a.padding_bottom)?a.padding_bottom:0},i.getCurrentPaddingLeft=function(a){var b=this,c=b.config;return m(c.padding_left)?c.padding_left:c.axis_rotated?c.axis_x_show?Math.max(r(b.getAxisWidthByAxisId("x",a)),40):1:!c.axis_y_show||c.axis_y_inner?b.axis.getYAxisLabelPosition().isOuter?30:1:r(b.getAxisWidthByAxisId("y",a))},i.getCurrentPaddingRight=function(){var a=this,b=a.config,c=10,d=a.isLegendRight?a.getLegendWidth()+20:0;return m(b.padding_right)?b.padding_right+1:b.axis_rotated?c+d:!b.axis_y2_show||b.axis_y2_inner?2+d+(a.axis.getY2AxisLabelPosition().isOuter?20:0):r(a.getAxisWidthByAxisId("y2"))+d},i.getParentRectValue=function(a){for(var b,c=this.selectChart.node();c&&"BODY"!==c.tagName;){try{b=c.getBoundingClientRect()[a]}catch(d){"width"===a&&(b=c.offsetWidth)}if(b)break;c=c.parentNode}return b},i.getParentWidth=function(){return this.getParentRectValue("width")},i.getParentHeight=function(){var a=this.selectChart.style("height");return a.indexOf("px")>0?+a.replace("px",""):0},i.getSvgLeft=function(a){var b=this,c=b.config,d=c.axis_rotated||!c.axis_rotated&&!c.axis_y_inner,e=c.axis_rotated?l.axisX:l.axisY,f=b.main.select("."+e).node(),g=f&&d?f.getBoundingClientRect():{right:0},h=b.selectChart.node().getBoundingClientRect(),i=b.hasArcType(),j=g.right-h.left-(i?0:b.getCurrentPaddingLeft(a));return j>0?j:0},i.getAxisWidthByAxisId=function(a,b){var c=this,d=c.axis.getLabelPositionById(a);return c.axis.getMaxTickWidth(a,b)+(d.isInner?20:40)},i.getHorizontalAxisHeight=function(a){var b=this,c=b.config,d=30;return"x"!==a||c.axis_x_show?"x"===a&&c.axis_x_height?c.axis_x_height:"y"!==a||c.axis_y_show?"y2"!==a||c.axis_y2_show?("x"===a&&!c.axis_rotated&&c.axis_x_tick_rotate&&(d=30+b.axis.getMaxTickWidth(a)*Math.cos(Math.PI*(90-c.axis_x_tick_rotate)/180)),"y"===a&&c.axis_rotated&&c.axis_y_tick_rotate&&(d=30+b.axis.getMaxTickWidth(a)*Math.cos(Math.PI*(90-c.axis_y_tick_rotate)/180)),d+(b.axis.getLabelPositionById(a).isInner?0:10)+("y2"===a?-10:0)):b.rotated_padding_top:!c.legend_show||b.isLegendRight||b.isLegendInset?1:10:8},i.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},i.getShapeIndices=function(a){var b,c,d=this,e=d.config,f={},g=0;return d.filterTargetsToShow(d.data.targets.filter(a,d)).forEach(function(a){for(b=0;b<e.data_groups.length;b++)if(!(e.data_groups[b].indexOf(a.id)<0))for(c=0;c<e.data_groups[b].length;c++)if(e.data_groups[b][c]in f){f[a.id]=f[e.data_groups[b][c]];break}p(f[a.id])&&(f[a.id]=g++)}),f.__max__=g-1,f},i.getShapeX=function(a,b,c,d){var e=this,f=d?e.subX:e.x;return function(d){var e=d.id in c?c[d.id]:0;return d.x||0===d.x?f(d.x)-a*(b/2-e):0}},i.getShapeY=function(a){var b=this;return function(c){var d=a?b.getSubYScale(c.id):b.getYScale(c.id);return d(c.value)}},i.getShapeOffset=function(a,b,c){var d=this,e=d.orderTargets(d.filterTargetsToShow(d.data.targets.filter(a,d))),f=e.map(function(a){return a.id});return function(a,g){var h=c?d.getSubYScale(a.id):d.getYScale(a.id),i=h(0),j=i;return e.forEach(function(c){var e=d.isStepType(a)?d.convertValuesToStep(c.values):c.values;c.id!==a.id&&b[c.id]===b[a.id]&&f.indexOf(c.id)<f.indexOf(a.id)&&("undefined"!=typeof e[g]&&+e[g].x===+a.x||(g=-1,e.forEach(function(b,c){b.x===a.x&&(g=c)})),g in e&&e[g].value*a.value>=0&&(j+=h(e[g].value)-i))}),j}},i.isWithinShape=function(a,b){var c,d=this,e=d.d3.select(a);return d.isTargetToShow(b.id)?"circle"===a.nodeName?c=d.isStepType(b)?d.isWithinStep(a,d.getYScale(b.id)(b.value)):d.isWithinCircle(a,1.5*d.pointSelectR(b)):"path"===a.nodeName&&(c=e.classed(l.bar)?d.isWithinBar(a):!0):c=!1,c},i.getInterpolate=function(a){var b=this,c=b.isInterpolationType(b.config.spline_interpolation_type)?b.config.spline_interpolation_type:"cardinal";return b.isSplineType(a)?c:b.isStepType(a)?b.config.line_step_type:"linear"},i.initLine=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.chartLines)},i.updateTargetsForLine=function(a){var b,c,d=this,e=d.config,f=d.classChartLine.bind(d),g=d.classLines.bind(d),h=d.classAreas.bind(d),i=d.classCircles.bind(d),j=d.classFocus.bind(d);b=d.main.select("."+l.chartLines).selectAll("."+l.chartLine).data(a).attr("class",function(a){return f(a)+j(a)}),c=b.enter().append("g").attr("class",f).style("opacity",0).style("pointer-events","none"),c.append("g").attr("class",g),c.append("g").attr("class",h),c.append("g").attr("class",function(a){return d.generateClass(l.selectedCircles,a.id)}),c.append("g").attr("class",i).style("cursor",function(a){return e.data_selection_isselectable(a)?"pointer":null}),a.forEach(function(a){d.main.selectAll("."+l.selectedCircles+d.getTargetSelectorSuffix(a.id)).selectAll("."+l.selectedCircle).each(function(b){b.value=a.values[b.index].value})})},i.updateLine=function(a){var b=this;b.mainLine=b.main.selectAll("."+l.lines).selectAll("."+l.line).data(b.lineData.bind(b)),b.mainLine.enter().append("path").attr("class",b.classLine.bind(b)).style("stroke",b.color),b.mainLine.style("opacity",b.initialOpacity.bind(b)).style("shape-rendering",function(a){return b.isStepType(a)?"crispEdges":""}).attr("transform",null),b.mainLine.exit().transition().duration(a).style("opacity",0).remove()},i.redrawLine=function(a,b){return[(b?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",a).style("stroke",this.color).style("opacity",1)]},i.generateDrawLine=function(a,b){var c=this,d=c.config,e=c.d3.svg.line(),f=c.generateGetLinePoints(a,b),g=b?c.getSubYScale:c.getYScale,h=function(a){return(b?c.subxx:c.xx).call(c,a)},i=function(a,b){return d.data_groups.length>0?f(a,b)[0][1]:g.call(c,a.id)(a.value)};return e=d.axis_rotated?e.x(i).y(h):e.x(h).y(i),d.line_connectNull||(e=e.defined(function(a){return null!=a.value})),function(a){var f,h=d.line_connectNull?c.filterRemoveNull(a.values):a.values,i=b?c.x:c.subX,j=g.call(c,a.id),k=0,l=0;return c.isLineType(a)?d.data_regions[a.id]?f=c.lineWithRegions(h,i,j,d.data_regions[a.id]):(c.isStepType(a)&&(h=c.convertValuesToStep(h)),f=e.interpolate(c.getInterpolate(a))(h)):(h[0]&&(k=i(h[0].x),l=j(h[0].value)),f=d.axis_rotated?"M "+l+" "+k:"M "+k+" "+l),f?f:"M 0 0"}},i.generateGetLinePoints=function(a,b){var c=this,d=c.config,e=a.__max__+1,f=c.getShapeX(0,e,a,!!b),g=c.getShapeY(!!b),h=c.getShapeOffset(c.isLineType,a,!!b),i=b?c.getSubYScale:c.getYScale;return function(a,b){var e=i.call(c,a.id)(0),j=h(a,b)||e,k=f(a),l=g(a);return d.axis_rotated&&(0<a.value&&e>l||a.value<0&&l>e)&&(l=e),[[k,l-(e-j)],[k,l-(e-j)],[k,l-(e-j)],[k,l-(e-j)]]}},i.lineWithRegions=function(a,b,c,d){function e(a,b){var c;for(c=0;c<b.length;c++)if(b[c].start<a&&a<=b[c].end)return!0;return!1}function f(a){return"M"+a[0][0]+" "+a[0][1]+" "+a[1][0]+" "+a[1][1]}var g,h,i,j,k,l,m,n,o,r,s,t,u=this,v=u.config,w=-1,x="M",y=u.isCategorized()?.5:0,z=[];if(q(d))for(g=0;g<d.length;g++)z[g]={},p(d[g].start)?z[g].start=a[0].x:z[g].start=u.isTimeSeries()?u.parseDate(d[g].start):d[g].start,p(d[g].end)?z[g].end=a[a.length-1].x:z[g].end=u.isTimeSeries()?u.parseDate(d[g].end):d[g].end;for(s=v.axis_rotated?function(a){return c(a.value)}:function(a){return b(a.x)},t=v.axis_rotated?function(a){return b(a.x)}:function(a){return c(a.value)},i=u.isTimeSeries()?function(a,d,e,g){var h,i=a.x.getTime(),j=d.x-a.x,l=new Date(i+j*e),m=new Date(i+j*(e+g));return h=v.axis_rotated?[[c(k(e)),b(l)],[c(k(e+g)),b(m)]]:[[b(l),c(k(e))],[b(m),c(k(e+g))]],f(h)}:function(a,d,e,g){var h;return h=v.axis_rotated?[[c(k(e),!0),b(j(e))],[c(k(e+g),!0),b(j(e+g))]]:[[b(j(e),!0),c(k(e))],[b(j(e+g),!0),c(k(e+g))]],f(h)},g=0;g<a.length;g++){if(p(z)||!e(a[g].x,z))x+=" "+s(a[g])+" "+t(a[g]);else for(j=u.getScale(a[g-1].x+y,a[g].x+y,u.isTimeSeries()),k=u.getScale(a[g-1].value,a[g].value),l=b(a[g].x)-b(a[g-1].x),m=c(a[g].value)-c(a[g-1].value),n=Math.sqrt(Math.pow(l,2)+Math.pow(m,2)),o=2/n,r=2*o,h=o;1>=h;h+=r)x+=i(a[g-1],a[g],h,o);w=a[g].x}return x},i.updateArea=function(a){var b=this,c=b.d3;b.mainArea=b.main.selectAll("."+l.areas).selectAll("."+l.area).data(b.lineData.bind(b)),b.mainArea.enter().append("path").attr("class",b.classArea.bind(b)).style("fill",b.color).style("opacity",function(){return b.orgAreaOpacity=+c.select(this).style("opacity"),0}),b.mainArea.style("opacity",b.orgAreaOpacity),b.mainArea.exit().transition().duration(a).style("opacity",0).remove()},i.redrawArea=function(a,b){return[(b?this.mainArea.transition(Math.random().toString()):this.mainArea).attr("d",a).style("fill",this.color).style("opacity",this.orgAreaOpacity)]},i.generateDrawArea=function(a,b){var c=this,d=c.config,e=c.d3.svg.area(),f=c.generateGetAreaPoints(a,b),g=b?c.getSubYScale:c.getYScale,h=function(a){return(b?c.subxx:c.xx).call(c,a)},i=function(a,b){return d.data_groups.length>0?f(a,b)[0][1]:g.call(c,a.id)(c.getAreaBaseValue(a.id))},j=function(a,b){return d.data_groups.length>0?f(a,b)[1][1]:g.call(c,a.id)(a.value)};return e=d.axis_rotated?e.x0(i).x1(j).y(h):e.x(h).y0(d.area_above?0:i).y1(j),d.line_connectNull||(e=e.defined(function(a){return null!==a.value})),function(a){var b,f=d.line_connectNull?c.filterRemoveNull(a.values):a.values,g=0,h=0;return c.isAreaType(a)?(c.isStepType(a)&&(f=c.convertValuesToStep(f)),b=e.interpolate(c.getInterpolate(a))(f)):(f[0]&&(g=c.x(f[0].x),h=c.getYScale(a.id)(f[0].value)),b=d.axis_rotated?"M "+h+" "+g:"M "+g+" "+h),b?b:"M 0 0"}},i.getAreaBaseValue=function(){return 0},i.generateGetAreaPoints=function(a,b){var c=this,d=c.config,e=a.__max__+1,f=c.getShapeX(0,e,a,!!b),g=c.getShapeY(!!b),h=c.getShapeOffset(c.isAreaType,a,!!b),i=b?c.getSubYScale:c.getYScale;return function(a,b){var e=i.call(c,a.id)(0),j=h(a,b)||e,k=f(a),l=g(a);return d.axis_rotated&&(0<a.value&&e>l||a.value<0&&l>e)&&(l=e),[[k,j],[k,l-(e-j)],[k,l-(e-j)],[k,j]]}},i.updateCircle=function(){var a=this;a.mainCircle=a.main.selectAll("."+l.circles).selectAll("."+l.circle).data(a.lineOrScatterData.bind(a)),a.mainCircle.enter().append("circle").attr("class",a.classCircle.bind(a)).attr("r",a.pointR.bind(a)).style("fill",a.color),a.mainCircle.style("opacity",a.initialOpacityForCircle.bind(a)),a.mainCircle.exit().remove()},i.redrawCircle=function(a,b,c){var d=this.main.selectAll("."+l.selectedCircle);return[(c?this.mainCircle.transition(Math.random().toString()):this.mainCircle).style("opacity",this.opacityForCircle.bind(this)).style("fill",this.color).attr("cx",a).attr("cy",b),(c?d.transition(Math.random().toString()):d).attr("cx",a).attr("cy",b)]},i.circleX=function(a){return a.x||0===a.x?this.x(a.x):null},i.updateCircleY=function(){var a,b,c=this;c.config.data_groups.length>0?(a=c.getShapeIndices(c.isLineType),b=c.generateGetLinePoints(a),c.circleY=function(a,c){return b(a,c)[0][1]}):c.circleY=function(a){return c.getYScale(a.id)(a.value)}},i.getCircles=function(a,b){var c=this;return(b?c.main.selectAll("."+l.circles+c.getTargetSelectorSuffix(b)):c.main).selectAll("."+l.circle+(m(a)?"-"+a:""))},i.expandCircles=function(a,b,c){var d=this,e=d.pointExpandedR.bind(d);c&&d.unexpandCircles(),d.getCircles(a,b).classed(l.EXPANDED,!0).attr("r",e)},i.unexpandCircles=function(a){var b=this,c=b.pointR.bind(b);b.getCircles(a).filter(function(){return b.d3.select(this).classed(l.EXPANDED)}).classed(l.EXPANDED,!1).attr("r",c)},i.pointR=function(a){var b=this,c=b.config;return b.isStepType(a)?0:n(c.point_r)?c.point_r(a):c.point_r;
2354 9878 },i.pointExpandedR=function(a){var b=this,c=b.config;return c.point_focus_expand_enabled?c.point_focus_expand_r?c.point_focus_expand_r:1.75*b.pointR(a):b.pointR(a)},i.pointSelectR=function(a){var b=this,c=b.config;return n(c.point_select_r)?c.point_select_r(a):c.point_select_r?c.point_select_r:4*b.pointR(a)},i.isWithinCircle=function(a,b){var c=this.d3,d=c.mouse(a),e=c.select(a),f=+e.attr("cx"),g=+e.attr("cy");return Math.sqrt(Math.pow(f-d[0],2)+Math.pow(g-d[1],2))<b},i.isWithinStep=function(a,b){return Math.abs(b-this.d3.mouse(a)[1])<30},i.initBar=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.chartBars)},i.updateTargetsForBar=function(a){var b,c,d=this,e=d.config,f=d.classChartBar.bind(d),g=d.classBars.bind(d),h=d.classFocus.bind(d);b=d.main.select("."+l.chartBars).selectAll("."+l.chartBar).data(a).attr("class",function(a){return f(a)+h(a)}),c=b.enter().append("g").attr("class",f).style("opacity",0).style("pointer-events","none"),c.append("g").attr("class",g).style("cursor",function(a){return e.data_selection_isselectable(a)?"pointer":null})},i.updateBar=function(a){var b=this,c=b.barData.bind(b),d=b.classBar.bind(b),e=b.initialOpacity.bind(b),f=function(a){return b.color(a.id)};b.mainBar=b.main.selectAll("."+l.bars).selectAll("."+l.bar).data(c),b.mainBar.enter().append("path").attr("class",d).style("stroke",f).style("fill",f),b.mainBar.style("opacity",e),b.mainBar.exit().transition().duration(a).style("opacity",0).remove()},i.redrawBar=function(a,b){return[(b?this.mainBar.transition(Math.random().toString()):this.mainBar).attr("d",a).style("fill",this.color).style("opacity",1)]},i.getBarW=function(a,b){var c=this,d=c.config,e="number"==typeof d.bar_width?d.bar_width:b?a.tickInterval()*d.bar_width_ratio/b:0;return d.bar_width_max&&e>d.bar_width_max?d.bar_width_max:e},i.getBars=function(a,b){var c=this;return(b?c.main.selectAll("."+l.bars+c.getTargetSelectorSuffix(b)):c.main).selectAll("."+l.bar+(m(a)?"-"+a:""))},i.expandBars=function(a,b,c){var d=this;c&&d.unexpandBars(),d.getBars(a,b).classed(l.EXPANDED,!0)},i.unexpandBars=function(a){var b=this;b.getBars(a).classed(l.EXPANDED,!1)},i.generateDrawBar=function(a,b){var c=this,d=c.config,e=c.generateGetBarPoints(a,b);return function(a,b){var c=e(a,b),f=d.axis_rotated?1:0,g=d.axis_rotated?0:1,h="M "+c[0][f]+","+c[0][g]+" L"+c[1][f]+","+c[1][g]+" L"+c[2][f]+","+c[2][g]+" L"+c[3][f]+","+c[3][g]+" z";return h}},i.generateGetBarPoints=function(a,b){var c=this,d=b?c.subXAxis:c.xAxis,e=a.__max__+1,f=c.getBarW(d,e),g=c.getShapeX(f,e,a,!!b),h=c.getShapeY(!!b),i=c.getShapeOffset(c.isBarType,a,!!b),j=b?c.getSubYScale:c.getYScale;return function(a,b){var d=j.call(c,a.id)(0),e=i(a,b)||d,k=g(a),l=h(a);return c.config.axis_rotated&&(0<a.value&&d>l||a.value<0&&l>d)&&(l=d),[[k,e],[k,l-(d-e)],[k+f,l-(d-e)],[k+f,e]]}},i.isWithinBar=function(a){var b=this.d3.mouse(a),c=a.getBoundingClientRect(),d=a.pathSegList.getItem(0),e=a.pathSegList.getItem(1),f=Math.min(d.x,e.x),g=Math.min(d.y,e.y),h=c.width,i=c.height,j=2,k=f-j,l=f+h+j,m=g+i+j,n=g-j;return k<b[0]&&b[0]<l&&n<b[1]&&b[1]<m},i.initText=function(){var a=this;a.main.select("."+l.chart).append("g").attr("class",l.chartTexts),a.mainText=a.d3.selectAll([])},i.updateTargetsForText=function(a){var b,c,d=this,e=d.classChartText.bind(d),f=d.classTexts.bind(d),g=d.classFocus.bind(d);b=d.main.select("."+l.chartTexts).selectAll("."+l.chartText).data(a).attr("class",function(a){return e(a)+g(a)}),c=b.enter().append("g").attr("class",e).style("opacity",0).style("pointer-events","none"),c.append("g").attr("class",f)},i.updateText=function(a){var b=this,c=b.config,d=b.barOrLineData.bind(b),e=b.classText.bind(b);b.mainText=b.main.selectAll("."+l.texts).selectAll("."+l.text).data(d),b.mainText.enter().append("text").attr("class",e).attr("text-anchor",function(a){return c.axis_rotated?a.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(a){return b.color(a)}).style("fill-opacity",0),b.mainText.text(function(a,c,d){return b.dataLabelFormat(a.id)(a.value,a.id,c,d)}),b.mainText.exit().transition().duration(a).style("fill-opacity",0).remove()},i.redrawText=function(a,b,c,d){return[(d?this.mainText.transition():this.mainText).attr("x",a).attr("y",b).style("fill",this.color).style("fill-opacity",c?0:this.opacityForText.bind(this))]},i.getTextRect=function(a,b,c){var d,e=this.d3.select("body").append("div").classed("c3",!0),f=e.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),g=this.d3.select(c).style("font");return f.selectAll(".dummy").data([a]).enter().append("text").classed(b?b:"",!0).style("font",g).text(a).each(function(){d=this.getBoundingClientRect()}),e.remove(),d},i.generateXYForText=function(a,b,c,d){var e=this,f=e.generateGetAreaPoints(a,!1),g=e.generateGetBarPoints(b,!1),h=e.generateGetLinePoints(c,!1),i=d?e.getXForText:e.getYForText;return function(a,b){var c=e.isAreaType(a)?f:e.isBarType(a)?g:h;return i.call(e,c(a,b),a,this)}},i.getXForText=function(a,b,c){var d,e,f=this,g=c.getBoundingClientRect();return f.config.axis_rotated?(e=f.isBarType(b)?4:6,d=a[2][1]+e*(b.value<0?-1:1)):d=f.hasType("bar")?(a[2][0]+a[0][0])/2:a[0][0],null===b.value&&(d>f.width?d=f.width-g.width:0>d&&(d=4)),d},i.getYForText=function(a,b,c){var d,e=this,f=c.getBoundingClientRect();return e.config.axis_rotated?d=(a[0][0]+a[2][0]+.6*f.height)/2:(d=a[2][1],b.value<0||0===b.value&&!e.hasPositiveValue?(d+=f.height,e.isBarType(b)&&e.isSafari()?d-=3:!e.isBarType(b)&&e.isChrome()&&(d+=3)):d+=e.isBarType(b)?-3:-6),null!==b.value||e.config.axis_rotated||(d<f.height?d=f.height:d>this.height&&(d=this.height-4)),d},i.setTargetType=function(a,b){var c=this,d=c.config;c.mapToTargetIds(a).forEach(function(a){c.withoutFadeIn[a]=b===d.data_types[a],d.data_types[a]=b}),a||(d.data_type=b)},i.hasType=function(a,b){var c=this,d=c.config.data_types,e=!1;return b=b||c.data.targets,b&&b.length?b.forEach(function(b){var c=d[b.id];(c&&c.indexOf(a)>=0||!c&&"line"===a)&&(e=!0)}):Object.keys(d).length?Object.keys(d).forEach(function(b){d[b]===a&&(e=!0)}):e=c.config.data_type===a,e},i.hasArcType=function(a){return this.hasType("pie",a)||this.hasType("donut",a)||this.hasType("gauge",a)},i.isLineType=function(a){var b=this.config,c=o(a)?a:a.id;return!b.data_types[c]||["line","spline","area","area-spline","step","area-step"].indexOf(b.data_types[c])>=0},i.isStepType=function(a){var b=o(a)?a:a.id;return["step","area-step"].indexOf(this.config.data_types[b])>=0},i.isSplineType=function(a){var b=o(a)?a:a.id;return["spline","area-spline"].indexOf(this.config.data_types[b])>=0},i.isAreaType=function(a){var b=o(a)?a:a.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[b])>=0},i.isBarType=function(a){var b=o(a)?a:a.id;return"bar"===this.config.data_types[b]},i.isScatterType=function(a){var b=o(a)?a:a.id;return"scatter"===this.config.data_types[b]},i.isPieType=function(a){var b=o(a)?a:a.id;return"pie"===this.config.data_types[b]},i.isGaugeType=function(a){var b=o(a)?a:a.id;return"gauge"===this.config.data_types[b]},i.isDonutType=function(a){var b=o(a)?a:a.id;return"donut"===this.config.data_types[b]},i.isArcType=function(a){return this.isPieType(a)||this.isDonutType(a)||this.isGaugeType(a)},i.lineData=function(a){return this.isLineType(a)?[a]:[]},i.arcData=function(a){return this.isArcType(a.data)?[a]:[]},i.barData=function(a){return this.isBarType(a)?a.values:[]},i.lineOrScatterData=function(a){return this.isLineType(a)||this.isScatterType(a)?a.values:[]},i.barOrLineData=function(a){return this.isBarType(a)||this.isLineType(a)?a.values:[]},i.isInterpolationType=function(a){return["linear","linear-closed","basis","basis-open","basis-closed","bundle","cardinal","cardinal-open","cardinal-closed","monotone"].indexOf(a)>=0},i.initGrid=function(){var a=this,b=a.config,c=a.d3;a.grid=a.main.append("g").attr("clip-path",a.clipPathForGrid).attr("class",l.grid),b.grid_x_show&&a.grid.append("g").attr("class",l.xgrids),b.grid_y_show&&a.grid.append("g").attr("class",l.ygrids),b.grid_focus_show&&a.grid.append("g").attr("class",l.xgridFocus).append("line").attr("class",l.xgridFocus),a.xgrid=c.selectAll([]),b.grid_lines_front||a.initGridLines()},i.initGridLines=function(){var a=this,b=a.d3;a.gridLines=a.main.append("g").attr("clip-path",a.clipPathForGrid).attr("class",l.grid+" "+l.gridLines),a.gridLines.append("g").attr("class",l.xgridLines),a.gridLines.append("g").attr("class",l.ygridLines),a.xgridLines=b.selectAll([])},i.updateXGrid=function(a){var b=this,c=b.config,d=b.d3,e=b.generateGridData(c.grid_x_type,b.x),f=b.isCategorized()?b.xAxis.tickOffset():0;b.xgridAttr=c.axis_rotated?{x1:0,x2:b.width,y1:function(a){return b.x(a)-f},y2:function(a){return b.x(a)-f}}:{x1:function(a){return b.x(a)+f},x2:function(a){return b.x(a)+f},y1:0,y2:b.height},b.xgrid=b.main.select("."+l.xgrids).selectAll("."+l.xgrid).data(e),b.xgrid.enter().append("line").attr("class",l.xgrid),a||b.xgrid.attr(b.xgridAttr).style("opacity",function(){return+d.select(this).attr(c.axis_rotated?"y1":"x1")===(c.axis_rotated?b.height:0)?0:1}),b.xgrid.exit().remove()},i.updateYGrid=function(){var a=this,b=a.config,c=a.yAxis.tickValues()||a.y.ticks(b.grid_y_ticks);a.ygrid=a.main.select("."+l.ygrids).selectAll("."+l.ygrid).data(c),a.ygrid.enter().append("line").attr("class",l.ygrid),a.ygrid.attr("x1",b.axis_rotated?a.y:0).attr("x2",b.axis_rotated?a.y:a.width).attr("y1",b.axis_rotated?0:a.y).attr("y2",b.axis_rotated?a.height:a.y),a.ygrid.exit().remove(),a.smoothLines(a.ygrid,"grid")},i.gridTextAnchor=function(a){return a.position?a.position:"end"},i.gridTextDx=function(a){return"start"===a.position?4:"middle"===a.position?0:-4},i.xGridTextX=function(a){return"start"===a.position?-this.height:"middle"===a.position?-this.height/2:0},i.yGridTextX=function(a){return"start"===a.position?0:"middle"===a.position?this.width/2:this.width},i.updateGrid=function(a){var b,c,d,e=this,f=e.main,g=e.config;e.grid.style("visibility",e.hasArcType()?"hidden":"visible"),f.select("line."+l.xgridFocus).style("visibility","hidden"),g.grid_x_show&&e.updateXGrid(),e.xgridLines=f.select("."+l.xgridLines).selectAll("."+l.xgridLine).data(g.grid_x_lines),b=e.xgridLines.enter().append("g").attr("class",function(a){return l.xgridLine+(a["class"]?" "+a["class"]:"")}),b.append("line").style("opacity",0),b.append("text").attr("text-anchor",e.gridTextAnchor).attr("transform",g.axis_rotated?"":"rotate(-90)").attr("dx",e.gridTextDx).attr("dy",-5).style("opacity",0),e.xgridLines.exit().transition().duration(a).style("opacity",0).remove(),g.grid_y_show&&e.updateYGrid(),e.ygridLines=f.select("."+l.ygridLines).selectAll("."+l.ygridLine).data(g.grid_y_lines),c=e.ygridLines.enter().append("g").attr("class",function(a){return l.ygridLine+(a["class"]?" "+a["class"]:"")}),c.append("line").style("opacity",0),c.append("text").attr("text-anchor",e.gridTextAnchor).attr("transform",g.axis_rotated?"rotate(-90)":"").attr("dx",e.gridTextDx).attr("dy",-5).style("opacity",0),d=e.yv.bind(e),e.ygridLines.select("line").transition().duration(a).attr("x1",g.axis_rotated?d:0).attr("x2",g.axis_rotated?d:e.width).attr("y1",g.axis_rotated?0:d).attr("y2",g.axis_rotated?e.height:d).style("opacity",1),e.ygridLines.select("text").transition().duration(a).attr("x",g.axis_rotated?e.xGridTextX.bind(e):e.yGridTextX.bind(e)).attr("y",d).text(function(a){return a.text}).style("opacity",1),e.ygridLines.exit().transition().duration(a).style("opacity",0).remove()},i.redrawGrid=function(a){var b=this,c=b.config,d=b.xv.bind(b),e=b.xgridLines.select("line"),f=b.xgridLines.select("text");return[(a?e.transition():e).attr("x1",c.axis_rotated?0:d).attr("x2",c.axis_rotated?b.width:d).attr("y1",c.axis_rotated?d:0).attr("y2",c.axis_rotated?d:b.height).style("opacity",1),(a?f.transition():f).attr("x",c.axis_rotated?b.yGridTextX.bind(b):b.xGridTextX.bind(b)).attr("y",d).text(function(a){return a.text}).style("opacity",1)]},i.showXGridFocus=function(a){var b=this,c=b.config,d=a.filter(function(a){return a&&m(a.value)}),e=b.main.selectAll("line."+l.xgridFocus),f=b.xx.bind(b);c.tooltip_show&&(b.hasType("scatter")||b.hasArcType()||(e.style("visibility","visible").data([d[0]]).attr(c.axis_rotated?"y1":"x1",f).attr(c.axis_rotated?"y2":"x2",f),b.smoothLines(e,"grid")))},i.hideXGridFocus=function(){this.main.select("line."+l.xgridFocus).style("visibility","hidden")},i.updateXgridFocus=function(){var a=this,b=a.config;a.main.select("line."+l.xgridFocus).attr("x1",b.axis_rotated?0:-10).attr("x2",b.axis_rotated?a.width:-10).attr("y1",b.axis_rotated?-10:0).attr("y2",b.axis_rotated?-10:a.height)},i.generateGridData=function(a,b){var c,d,e,f,g=this,h=[],i=g.main.select("."+l.axisX).selectAll(".tick").size();if("year"===a)for(c=g.getXDomain(),d=c[0].getFullYear(),e=c[1].getFullYear(),f=d;e>=f;f++)h.push(new Date(f+"-01-01 00:00:00"));else h=b.ticks(10),h.length>i&&(h=h.filter(function(a){return(""+a).indexOf(".")<0}));return h},i.getGridFilterToRemove=function(a){return a?function(b){var c=!1;return[].concat(a).forEach(function(a){("value"in a&&b.value===a.value||"class"in a&&b["class"]===a["class"])&&(c=!0)}),c}:function(){return!0}},i.removeGridLines=function(a,b){var c=this,d=c.config,e=c.getGridFilterToRemove(a),f=function(a){return!e(a)},g=b?l.xgridLines:l.ygridLines,h=b?l.xgridLine:l.ygridLine;c.main.select("."+g).selectAll("."+h).filter(e).transition().duration(d.transition_duration).style("opacity",0).remove(),b?d.grid_x_lines=d.grid_x_lines.filter(f):d.grid_y_lines=d.grid_y_lines.filter(f)},i.initTooltip=function(){var a,b=this,c=b.config;if(b.tooltip=b.selectChart.style("position","relative").append("div").attr("class",l.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),c.tooltip_init_show){if(b.isTimeSeries()&&o(c.tooltip_init_x)){for(c.tooltip_init_x=b.parseDate(c.tooltip_init_x),a=0;a<b.data.targets[0].values.length&&b.data.targets[0].values[a].x-c.tooltip_init_x!==0;a++);c.tooltip_init_x=a}b.tooltip.html(c.tooltip_contents.call(b,b.data.targets.map(function(a){return b.addName(a.values[c.tooltip_init_x])}),b.axis.getXAxisTickFormat(),b.getYFormat(b.hasArcType()),b.color)),b.tooltip.style("top",c.tooltip_init_position.top).style("left",c.tooltip_init_position.left).style("display","block")}},i.getTooltipContent=function(a,b,c,d){var e,f,g,h,i,j,k=this,l=k.config,m=l.tooltip_format_title||b,n=l.tooltip_format_name||function(a){return a},o=l.tooltip_format_value||c,p=k.isOrderAsc();if(0===l.data_groups.length)a.sort(function(a,b){var c=a?a.value:null,d=b?b.value:null;return p?c-d:d-c});else{var q=k.orderTargets(k.data.targets).map(function(a){return a.id});a.sort(function(a,b){var c=a?a.value:null,d=b?b.value:null;return c>0&&d>0&&(c=a?q.indexOf(a.id):null,d=b?q.indexOf(b.id):null),p?c-d:d-c})}for(f=0;f<a.length;f++)if(a[f]&&(a[f].value||0===a[f].value)&&(e||(g=y(m?m(a[f].x):a[f].x),e="<table class='"+k.CLASS.tooltip+"'>"+(g||0===g?"<tr><th colspan='2'>"+g+"</th></tr>":"")),h=y(o(a[f].value,a[f].ratio,a[f].id,a[f].index,a)),void 0!==h)){if(null===a[f].name)continue;i=y(n(a[f].name,a[f].ratio,a[f].id,a[f].index)),j=k.levelColor?k.levelColor(a[f].value):d(a[f].id),e+="<tr class='"+k.CLASS.tooltipName+"-"+k.getTargetSelectorSuffix(a[f].id)+"'>",e+="<td class='name'><span style='background-color:"+j+"'></span>"+i+"</td>",e+="<td class='value'>"+h+"</td>",e+="</tr>"}return e+"</table>"},i.tooltipPosition=function(a,b,c,d){var e,f,g,h,i,j=this,k=j.config,l=j.d3,m=j.hasArcType(),n=l.mouse(d);return m?(f=(j.width-(j.isLegendRight?j.getLegendWidth():0))/2+n[0],h=j.height/2+n[1]+20):(e=j.getSvgLeft(!0),k.axis_rotated?(f=e+n[0]+100,g=f+b,i=j.currentWidth-j.getCurrentPaddingRight(),h=j.x(a[0].x)+20):(f=e+j.getCurrentPaddingLeft(!0)+j.x(a[0].x)+20,g=f+b,i=e+j.currentWidth-j.getCurrentPaddingRight(),h=n[1]+15),g>i&&(f-=g-i+20),h+c>j.currentHeight&&(h-=c+30)),0>h&&(h=0),{top:h,left:f}},i.showTooltip=function(a,b){var c,d,e,f=this,g=f.config,h=f.hasArcType(),j=a.filter(function(a){return a&&m(a.value)}),k=g.tooltip_position||i.tooltipPosition;0!==j.length&&g.tooltip_show&&(f.tooltip.html(g.tooltip_contents.call(f,a,f.axis.getXAxisTickFormat(),f.getYFormat(h),f.color)).style("display","block"),c=f.tooltip.property("offsetWidth"),d=f.tooltip.property("offsetHeight"),e=k.call(this,j,c,d,b),f.tooltip.style("top",e.top+"px").style("left",e.left+"px"))},i.hideTooltip=function(){this.tooltip.style("display","none")},i.initLegend=function(){var a=this;return a.legendItemTextBox={},a.legendHasRendered=!1,a.legend=a.svg.append("g").attr("transform",a.getTranslate("legend")),a.config.legend_show?void a.updateLegendWithDefaults():(a.legend.style("visibility","hidden"),void(a.hiddenLegendIds=a.mapToIds(a.data.targets)))},i.updateLegendWithDefaults=function(){var a=this;a.updateLegend(a.mapToIds(a.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},i.updateSizeForLegend=function(a,b){var c=this,d=c.config,e={top:c.isLegendTop?c.getCurrentPaddingTop()+d.legend_inset_y+5.5:c.currentHeight-a-c.getCurrentPaddingBottom()-d.legend_inset_y,left:c.isLegendLeft?c.getCurrentPaddingLeft()+d.legend_inset_x+.5:c.currentWidth-b-c.getCurrentPaddingRight()-d.legend_inset_x+.5};c.margin3={top:c.isLegendRight?0:c.isLegendInset?e.top:c.currentHeight-a,right:NaN,bottom:0,left:c.isLegendRight?c.currentWidth-b:c.isLegendInset?e.left:0}},i.transformLegend=function(a){var b=this;(a?b.legend.transition():b.legend).attr("transform",b.getTranslate("legend"))},i.updateLegendStep=function(a){this.legendStep=a},i.updateLegendItemWidth=function(a){this.legendItemWidth=a},i.updateLegendItemHeight=function(a){this.legendItemHeight=a},i.getLegendWidth=function(){var a=this;return a.config.legend_show?a.isLegendRight||a.isLegendInset?a.legendItemWidth*(a.legendStep+1):a.currentWidth:0},i.getLegendHeight=function(){var a=this,b=0;return a.config.legend_show&&(b=a.isLegendRight?a.currentHeight:Math.max(20,a.legendItemHeight)*(a.legendStep+1)),b},i.opacityForLegend=function(a){return a.classed(l.legendItemHidden)?null:1},i.opacityForUnfocusedLegend=function(a){return a.classed(l.legendItemHidden)?null:.3},i.toggleFocusLegend=function(a,b){var c=this;a=c.mapToTargetIds(a),c.legend.selectAll("."+l.legendItem).filter(function(b){return a.indexOf(b)>=0}).classed(l.legendItemFocused,b).transition().duration(100).style("opacity",function(){var a=b?c.opacityForLegend:c.opacityForUnfocusedLegend;return a.call(c,c.d3.select(this))})},i.revertLegend=function(){var a=this,b=a.d3;a.legend.selectAll("."+l.legendItem).classed(l.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return a.opacityForLegend(b.select(this))})},i.showLegend=function(a){var b=this,c=b.config;c.legend_show||(c.legend_show=!0,b.legend.style("visibility","visible"),b.legendHasRendered||b.updateLegendWithDefaults()),b.removeHiddenLegendIds(a),b.legend.selectAll(b.selectorLegends(a)).style("visibility","visible").transition().style("opacity",function(){return b.opacityForLegend(b.d3.select(this))})},i.hideLegend=function(a){var b=this,c=b.config;c.legend_show&&u(a)&&(c.legend_show=!1,b.legend.style("visibility","hidden")),b.addHiddenLegendIds(a),b.legend.selectAll(b.selectorLegends(a)).style("opacity",0).style("visibility","hidden")},i.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},i.updateLegend=function(a,b,c){function d(a,b){return y.legendItemTextBox[b]||(y.legendItemTextBox[b]=y.getTextRect(a.textContent,l.legendItem,a)),y.legendItemTextBox[b]}function e(b,c,e){function f(a,b){b||(g=(o-G-n)/2,E>g&&(g=(o-n)/2,G=0,M++)),L[a]=M,K[M]=y.isLegendInset?10:g,H[a]=G,G+=n}var g,h,i=0===e,j=e===a.length-1,k=d(b,c),l=k.width+F+(!j||y.isLegendRight||y.isLegendInset?B:0)+z.legend_padding,m=k.height+A,n=y.isLegendRight||y.isLegendInset?m:l,o=y.isLegendRight||y.isLegendInset?y.getLegendHeight():y.getLegendWidth();return i&&(G=0,M=0,C=0,D=0),z.legend_show&&!y.isLegendToShow(c)?void(I[c]=J[c]=L[c]=H[c]=0):(I[c]=l,J[c]=m,(!C||l>=C)&&(C=l),(!D||m>=D)&&(D=m),h=y.isLegendRight||y.isLegendInset?D:C,void(z.legend_equally?(Object.keys(I).forEach(function(a){I[a]=C}),Object.keys(J).forEach(function(a){J[a]=D}),g=(o-h*a.length)/2,E>g?(G=0,M=0,a.forEach(function(a){f(a)})):f(c,!0)):f(c)))}var f,g,h,i,j,k,m,n,o,p,r,s,t,u,v,x,y=this,z=y.config,A=4,B=10,C=0,D=0,E=10,F=z.legend_item_tile_width+5,G=0,H={},I={},J={},K=[0],L={},M=0;a=a.filter(function(a){return!q(z.data_names[a])||null!==z.data_names[a]}),b=b||{},r=w(b,"withTransition",!0),s=w(b,"withTransitionForTransform",!0),y.isLegendInset&&(M=z.legend_inset_step?z.legend_inset_step:a.length,y.updateLegendStep(M)),y.isLegendRight?(f=function(a){return C*L[a]},i=function(a){return K[L[a]]+H[a]}):y.isLegendInset?(f=function(a){return C*L[a]+10},i=function(a){return K[L[a]]+H[a]}):(f=function(a){return K[L[a]]+H[a]},i=function(a){return D*L[a]}),g=function(a,b){return f(a,b)+4+z.legend_item_tile_width},j=function(a,b){return i(a,b)+9},h=function(a,b){return f(a,b)},k=function(a,b){return i(a,b)-5},m=function(a,b){return f(a,b)-2},n=function(a,b){return f(a,b)-2+z.legend_item_tile_width},o=function(a,b){return i(a,b)+4},p=y.legend.selectAll("."+l.legendItem).data(a).enter().append("g").attr("class",function(a){return y.generateClass(l.legendItem,a)}).style("visibility",function(a){return y.isLegendToShow(a)?"visible":"hidden"}).style("cursor","pointer").on("click",function(a){z.legend_item_onclick?z.legend_item_onclick.call(y,a):y.d3.event.altKey?(y.api.hide(),y.api.show(a)):(y.api.toggle(a),y.isTargetToShow(a)?y.api.focus(a):y.api.revert())}).on("mouseover",function(a){z.legend_item_onmouseover?z.legend_item_onmouseover.call(y,a):(y.d3.select(this).classed(l.legendItemFocused,!0),!y.transiting&&y.isTargetToShow(a)&&y.api.focus(a))}).on("mouseout",function(a){z.legend_item_onmouseout?z.legend_item_onmouseout.call(y,a):(y.d3.select(this).classed(l.legendItemFocused,!1),y.api.revert())}),p.append("text").text(function(a){return q(z.data_names[a])?z.data_names[a]:a}).each(function(a,b){e(this,a,b)}).style("pointer-events","none").attr("x",y.isLegendRight||y.isLegendInset?g:-200).attr("y",y.isLegendRight||y.isLegendInset?-200:j),p.append("rect").attr("class",l.legendItemEvent).style("fill-opacity",0).attr("x",y.isLegendRight||y.isLegendInset?h:-200).attr("y",y.isLegendRight||y.isLegendInset?-200:k),p.append("line").attr("class",l.legendItemTile).style("stroke",y.color).style("pointer-events","none").attr("x1",y.isLegendRight||y.isLegendInset?m:-200).attr("y1",y.isLegendRight||y.isLegendInset?-200:o).attr("x2",y.isLegendRight||y.isLegendInset?n:-200).attr("y2",y.isLegendRight||y.isLegendInset?-200:o).attr("stroke-width",z.legend_item_tile_height),x=y.legend.select("."+l.legendBackground+" rect"),y.isLegendInset&&C>0&&0===x.size()&&(x=y.legend.insert("g","."+l.legendItem).attr("class",l.legendBackground).append("rect")),t=y.legend.selectAll("text").data(a).text(function(a){return q(z.data_names[a])?z.data_names[a]:a}).each(function(a,b){e(this,a,b)}),(r?t.transition():t).attr("x",g).attr("y",j),u=y.legend.selectAll("rect."+l.legendItemEvent).data(a),(r?u.transition():u).attr("width",function(a){return I[a]}).attr("height",function(a){return J[a]}).attr("x",h).attr("y",k),v=y.legend.selectAll("line."+l.legendItemTile).data(a),(r?v.transition():v).style("stroke",y.color).attr("x1",m).attr("y1",o).attr("x2",n).attr("y2",o),x&&(r?x.transition():x).attr("height",y.getLegendHeight()-12).attr("width",C*(M+1)+10),y.legend.selectAll("."+l.legendItem).classed(l.legendItemHidden,function(a){return!y.isTargetToShow(a)}),y.updateLegendItemWidth(C),y.updateLegendItemHeight(D),y.updateLegendStep(M),y.updateSizes(),y.updateScales(),y.updateSvgSize(),y.transformAll(s,c),y.legendHasRendered=!0},i.initTitle=function(){var a=this;a.title=a.svg.append("text").text(a.config.title_text).attr("class",a.CLASS.title)},i.redrawTitle=function(){var a=this;a.title.attr("x",a.xForTitle.bind(a)).attr("y",a.yForTitle.bind(a))},i.xForTitle=function(){var a,b=this,c=b.config,d=c.title_position||"left";return a=d.indexOf("right")>=0?b.currentWidth-b.getTextRect(b.title.node().textContent,b.CLASS.title,b.title.node()).width-c.title_padding.right:d.indexOf("center")>=0?(b.currentWidth-b.getTextRect(b.title.node().textContent,b.CLASS.title,b.title.node()).width)/2:c.title_padding.left},i.yForTitle=function(){var a=this;return a.config.title_padding.top+a.getTextRect(a.title.node().textContent,a.CLASS.title,a.title.node()).height},i.getTitlePadding=function(){var a=this;return a.yForTitle()+a.config.title_padding.bottom},c(b,f),f.prototype.init=function(){var a=this.owner,b=a.config,c=a.main;a.axes.x=c.append("g").attr("class",l.axis+" "+l.axisX).attr("clip-path",a.clipPathForXAxis).attr("transform",a.getTranslate("x")).style("visibility",b.axis_x_show?"visible":"hidden"),a.axes.x.append("text").attr("class",l.axisXLabel).attr("transform",b.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),a.axes.y=c.append("g").attr("class",l.axis+" "+l.axisY).attr("clip-path",b.axis_y_inner?"":a.clipPathForYAxis).attr("transform",a.getTranslate("y")).style("visibility",b.axis_y_show?"visible":"hidden"),a.axes.y.append("text").attr("class",l.axisYLabel).attr("transform",b.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),a.axes.y2=c.append("g").attr("class",l.axis+" "+l.axisY2).attr("transform",a.getTranslate("y2")).style("visibility",b.axis_y2_show?"visible":"hidden"),a.axes.y2.append("text").attr("class",l.axisY2Label).attr("transform",b.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},f.prototype.getXAxis=function(a,b,c,d,e,f,h){var i=this.owner,j=i.config,k={isCategory:i.isCategorized(),withOuterTick:e,tickMultiline:j.axis_x_tick_multiline,tickWidth:j.axis_x_tick_width,tickTextRotate:h?0:j.axis_x_tick_rotate,withoutTransition:f},l=g(i.d3,k).scale(a).orient(b);return i.isTimeSeries()&&d&&"function"!=typeof d&&(d=d.map(function(a){return i.parseDate(a)})),l.tickFormat(c).tickValues(d),i.isCategorized()&&(l.tickCentered(j.axis_x_tick_centered),u(j.axis_x_tick_culling)&&(j.axis_x_tick_culling=!1)),l},f.prototype.updateXAxisTickValues=function(a,b){var c,d=this.owner,e=d.config;return(e.axis_x_tick_fit||e.axis_x_tick_count)&&(c=this.generateTickValues(d.mapTargetsToUniqueXs(a),e.axis_x_tick_count,d.isTimeSeries())),b?b.tickValues(c):(d.xAxis.tickValues(c),d.subXAxis.tickValues(c)),c},f.prototype.getYAxis=function(a,b,c,d,e,f,h){var i=this.owner,j=i.config,k={withOuterTick:e,withoutTransition:f,tickTextRotate:h?0:j.axis_y_tick_rotate},l=g(i.d3,k).scale(a).orient(b).tickFormat(c);return i.isTimeSeriesY()?l.ticks(i.d3.time[j.axis_y_tick_time_value],j.axis_y_tick_time_interval):l.tickValues(d),l},f.prototype.getId=function(a){var b=this.owner.config;return a in b.data_axes?b.data_axes[a]:"y"},f.prototype.getXAxisTickFormat=function(){var a=this.owner,b=a.config,c=a.isTimeSeries()?a.defaultAxisTimeFormat:a.isCategorized()?a.categoryName:function(a){return 0>a?a.toFixed(0):a};return b.axis_x_tick_format&&(n(b.axis_x_tick_format)?c=b.axis_x_tick_format:a.isTimeSeries()&&(c=function(c){return c?a.axisTimeFormat(b.axis_x_tick_format)(c):""})),n(c)?function(b){return c.call(a,b)}:c},f.prototype.getTickValues=function(a,b){return a?a:b?b.tickValues():void 0},f.prototype.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},f.prototype.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},f.prototype.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},f.prototype.getLabelOptionByAxisId=function(a){var b,c=this.owner,d=c.config;return"y"===a?b=d.axis_y_label:"y2"===a?b=d.axis_y2_label:"x"===a&&(b=d.axis_x_label),b},f.prototype.getLabelText=function(a){var b=this.getLabelOptionByAxisId(a);return o(b)?b:b?b.text:null},f.prototype.setLabelText=function(a,b){var c=this.owner,d=c.config,e=this.getLabelOptionByAxisId(a);o(e)?"y"===a?d.axis_y_label=b:"y2"===a?d.axis_y2_label=b:"x"===a&&(d.axis_x_label=b):e&&(e.text=b)},f.prototype.getLabelPosition=function(a,b){var c=this.getLabelOptionByAxisId(a),d=c&&"object"==typeof c&&c.position?c.position:b;return{isInner:d.indexOf("inner")>=0,isOuter:d.indexOf("outer")>=0,isLeft:d.indexOf("left")>=0,isCenter:d.indexOf("center")>=0,isRight:d.indexOf("right")>=0,isTop:d.indexOf("top")>=0,isMiddle:d.indexOf("middle")>=0,isBottom:d.indexOf("bottom")>=0}},f.prototype.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},f.prototype.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},f.prototype.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},f.prototype.getLabelPositionById=function(a){return"y2"===a?this.getY2AxisLabelPosition():"y"===a?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},f.prototype.textForXAxisLabel=function(){return this.getLabelText("x")},f.prototype.textForYAxisLabel=function(){return this.getLabelText("y")},f.prototype.textForY2AxisLabel=function(){return this.getLabelText("y2")},f.prototype.xForAxisLabel=function(a,b){var c=this.owner;return a?b.isLeft?0:b.isCenter?c.width/2:c.width:b.isBottom?-c.height:b.isMiddle?-c.height/2:0},f.prototype.dxForAxisLabel=function(a,b){return a?b.isLeft?"0.5em":b.isRight?"-0.5em":"0":b.isTop?"-0.5em":b.isBottom?"0.5em":"0"},f.prototype.textAnchorForAxisLabel=function(a,b){return a?b.isLeft?"start":b.isCenter?"middle":"end":b.isBottom?"start":b.isMiddle?"middle":"end"},f.prototype.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.dyForXAxisLabel=function(){var a=this.owner,b=a.config,c=this.getXAxisLabelPosition();return b.axis_rotated?c.isInner?"1.2em":-25-this.getMaxTickWidth("x"):c.isInner?"-0.5em":b.axis_x_height?b.axis_x_height-10:"3em"},f.prototype.dyForYAxisLabel=function(){var a=this.owner,b=this.getYAxisLabelPosition();return a.config.axis_rotated?b.isInner?"-0.5em":"3em":b.isInner?"1.2em":-10-(a.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},f.prototype.dyForY2AxisLabel=function(){var a=this.owner,b=this.getY2AxisLabelPosition();return a.config.axis_rotated?b.isInner?"1.2em":"-2.2em":b.isInner?"-0.5em":15+(a.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},f.prototype.textAnchorForXAxisLabel=function(){var a=this.owner;return this.textAnchorForAxisLabel(!a.config.axis_rotated,this.getXAxisLabelPosition())},f.prototype.textAnchorForYAxisLabel=function(){var a=this.owner;return this.textAnchorForAxisLabel(a.config.axis_rotated,this.getYAxisLabelPosition())},f.prototype.textAnchorForY2AxisLabel=function(){var a=this.owner;return this.textAnchorForAxisLabel(a.config.axis_rotated,this.getY2AxisLabelPosition())},f.prototype.getMaxTickWidth=function(a,b){var c,d,e,f,g,h=this.owner,i=h.config,j=0;return b&&h.currentMaxTickWidths[a]?h.currentMaxTickWidths[a]:(h.svg&&(c=h.filterTargetsToShow(h.data.targets),"y"===a?(d=h.y.copy().domain(h.getYDomain(c,"y")),e=this.getYAxis(d,h.yOrient,i.axis_y_tick_format,h.yAxisTickValues,!1,!0,!0)):"y2"===a?(d=h.y2.copy().domain(h.getYDomain(c,"y2")),
2355 9879 e=this.getYAxis(d,h.y2Orient,i.axis_y2_tick_format,h.y2AxisTickValues,!1,!0,!0)):(d=h.x.copy().domain(h.getXDomain(c)),e=this.getXAxis(d,h.xOrient,h.xAxisTickFormat,h.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(c,e)),f=h.d3.select("body").append("div").classed("c3",!0),g=f.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),g.append("g").call(e).each(function(){h.d3.select(this).selectAll("text").each(function(){var a=this.getBoundingClientRect();j<a.width&&(j=a.width)}),f.remove()})),h.currentMaxTickWidths[a]=0>=j?h.currentMaxTickWidths[a]:j,h.currentMaxTickWidths[a])},f.prototype.updateLabels=function(a){var b=this.owner,c=b.main.select("."+l.axisX+" ."+l.axisXLabel),d=b.main.select("."+l.axisY+" ."+l.axisYLabel),e=b.main.select("."+l.axisY2+" ."+l.axisY2Label);(a?c.transition():c).attr("x",this.xForXAxisLabel.bind(this)).attr("dx",this.dxForXAxisLabel.bind(this)).attr("dy",this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this)),(a?d.transition():d).attr("x",this.xForYAxisLabel.bind(this)).attr("dx",this.dxForYAxisLabel.bind(this)).attr("dy",this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this)),(a?e.transition():e).attr("x",this.xForY2AxisLabel.bind(this)).attr("dx",this.dxForY2AxisLabel.bind(this)).attr("dy",this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this))},f.prototype.getPadding=function(a,b,c,d){var e="number"==typeof a?a:a[b];return m(e)?"ratio"===a.unit?a[b]*d:this.convertPixelsToAxisPadding(e,d):c},f.prototype.convertPixelsToAxisPadding=function(a,b){var c=this.owner,d=c.config.axis_rotated?c.width:c.height;return b*(a/d)},f.prototype.generateTickValues=function(a,b,c){var d,e,f,g,h,i,j,k=a;if(b)if(d=n(b)?b():b,1===d)k=[a[0]];else if(2===d)k=[a[0],a[a.length-1]];else if(d>2){for(g=d-2,e=a[0],f=a[a.length-1],h=(f-e)/(g+1),k=[e],i=0;g>i;i++)j=+e+h*(i+1),k.push(c?new Date(j):j);k.push(f)}return c||(k=k.sort(function(a,b){return a-b})),k},f.prototype.generateTransitions=function(a){var b=this.owner,c=b.axes;return{axisX:a?c.x.transition().duration(a):c.x,axisY:a?c.y.transition().duration(a):c.y,axisY2:a?c.y2.transition().duration(a):c.y2,axisSubX:a?c.subx.transition().duration(a):c.subx}},f.prototype.redraw=function(a,b){var c=this.owner;c.axes.x.style("opacity",b?0:1),c.axes.y.style("opacity",b?0:1),c.axes.y2.style("opacity",b?0:1),c.axes.subx.style("opacity",b?0:1),a.axisX.call(c.xAxis),a.axisY.call(c.yAxis),a.axisY2.call(c.y2Axis),a.axisSubX.call(c.subXAxis)},i.getClipPath=function(b){var c=a.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0;return"url("+(c?"":document.URL.split("#")[0])+"#"+b+")"},i.appendClip=function(a,b){return a.append("clipPath").attr("id",b).append("rect")},i.getAxisClipX=function(a){var b=Math.max(30,this.margin.left);return a?-(1+b):-(b-1)},i.getAxisClipY=function(a){return a?-20:-this.margin.top},i.getXAxisClipX=function(){var a=this;return a.getAxisClipX(!a.config.axis_rotated)},i.getXAxisClipY=function(){var a=this;return a.getAxisClipY(!a.config.axis_rotated)},i.getYAxisClipX=function(){var a=this;return a.config.axis_y_inner?-1:a.getAxisClipX(a.config.axis_rotated)},i.getYAxisClipY=function(){var a=this;return a.getAxisClipY(a.config.axis_rotated)},i.getAxisClipWidth=function(a){var b=this,c=Math.max(30,b.margin.left),d=Math.max(30,b.margin.right);return a?b.width+2+c+d:b.margin.left+20},i.getAxisClipHeight=function(a){return(a?this.margin.bottom:this.margin.top+this.height)+20},i.getXAxisClipWidth=function(){var a=this;return a.getAxisClipWidth(!a.config.axis_rotated)},i.getXAxisClipHeight=function(){var a=this;return a.getAxisClipHeight(!a.config.axis_rotated)},i.getYAxisClipWidth=function(){var a=this;return a.getAxisClipWidth(a.config.axis_rotated)+(a.config.axis_y_inner?20:0)},i.getYAxisClipHeight=function(){var a=this;return a.getAxisClipHeight(a.config.axis_rotated)},i.initPie=function(){var a=this,b=a.d3,c=a.config;a.pie=b.layout.pie().value(function(a){return a.values.reduce(function(a,b){return a+b.value},0)}),c.data_order||a.pie.sort(null)},i.updateRadius=function(){var a=this,b=a.config,c=b.gauge_width||b.donut_width;a.radiusExpanded=Math.min(a.arcWidth,a.arcHeight)/2,a.radius=.95*a.radiusExpanded,a.innerRadiusRatio=c?(a.radius-c)/a.radius:.6,a.innerRadius=a.hasType("donut")||a.hasType("gauge")?a.radius*a.innerRadiusRatio:0},i.updateArc=function(){var a=this;a.svgArc=a.getSvgArc(),a.svgArcExpanded=a.getSvgArcExpanded(),a.svgArcExpandedSub=a.getSvgArcExpanded(.98)},i.updateAngle=function(a){var b,c,d,e,f=this,g=f.config,h=!1,i=0;return g?(f.pie(f.filterTargetsToShow(f.data.targets)).forEach(function(b){h||b.data.id!==a.data.id||(h=!0,a=b,a.index=i),i++}),isNaN(a.startAngle)&&(a.startAngle=0),isNaN(a.endAngle)&&(a.endAngle=a.startAngle),f.isGaugeType(a.data)&&(b=g.gauge_min,c=g.gauge_max,d=Math.PI*(g.gauge_fullCircle?2:1)/(c-b),e=a.value<b?0:a.value<c?a.value-b:c-b,a.startAngle=g.gauge_startingAngle,a.endAngle=a.startAngle+d*e),h?a:null):null},i.getSvgArc=function(){var a=this,b=a.d3.svg.arc().outerRadius(a.radius).innerRadius(a.innerRadius),c=function(c,d){var e;return d?b(c):(e=a.updateAngle(c),e?b(e):"M 0 0")};return c.centroid=b.centroid,c},i.getSvgArcExpanded=function(a){var b=this,c=b.d3.svg.arc().outerRadius(b.radiusExpanded*(a?a:1)).innerRadius(b.innerRadius);return function(a){var d=b.updateAngle(a);return d?c(d):"M 0 0"}},i.getArc=function(a,b,c){return c||this.isArcType(a.data)?this.svgArc(a,b):"M 0 0"},i.transformForArcLabel=function(a){var b,c,d,e,f,g=this,h=g.config,i=g.updateAngle(a),j="";return i&&!g.hasType("gauge")&&(b=this.svgArc.centroid(i),c=isNaN(b[0])?0:b[0],d=isNaN(b[1])?0:b[1],e=Math.sqrt(c*c+d*d),f=g.hasType("donut")&&h.donut_label_ratio?n(h.donut_label_ratio)?h.donut_label_ratio(a,g.radius,e):h.donut_label_ratio:g.hasType("pie")&&h.pie_label_ratio?n(h.pie_label_ratio)?h.pie_label_ratio(a,g.radius,e):h.pie_label_ratio:g.radius&&e?(36/g.radius>.375?1.175-36/g.radius:.8)*g.radius/e:0,j="translate("+c*f+","+d*f+")"),j},i.getArcRatio=function(a){var b=this,c=b.config,d=Math.PI*(b.hasType("gauge")&&!c.gauge_fullCircle?1:2);return a?(a.endAngle-a.startAngle)/d:null},i.convertToArcData=function(a){return this.addName({id:a.data.id,value:a.value,ratio:this.getArcRatio(a),index:a.index})},i.textForArcLabel=function(a){var b,c,d,e,f,g=this;return g.shouldShowArcLabel()?(b=g.updateAngle(a),c=b?b.value:null,d=g.getArcRatio(b),e=a.data.id,g.hasType("gauge")||g.meetsArcLabelThreshold(d)?(f=g.getArcLabelFormat(),f?f(c,d,e):g.defaultArcValueFormat(c,d)):""):""},i.expandArc=function(b){var c,d=this;return d.transiting?void(c=a.setInterval(function(){d.transiting||(a.clearInterval(c),d.legend.selectAll(".c3-legend-item-focused").size()>0&&d.expandArc(b))},10)):(b=d.mapToTargetIds(b),void d.svg.selectAll(d.selectorTargets(b,"."+l.chartArc)).each(function(a){d.shouldExpand(a.data.id)&&d.d3.select(this).selectAll("path").transition().duration(d.expandDuration(a.data.id)).attr("d",d.svgArcExpanded).transition().duration(2*d.expandDuration(a.data.id)).attr("d",d.svgArcExpandedSub).each(function(a){d.isDonutType(a.data)})}))},i.unexpandArc=function(a){var b=this;b.transiting||(a=b.mapToTargetIds(a),b.svg.selectAll(b.selectorTargets(a,"."+l.chartArc)).selectAll("path").transition().duration(function(a){return b.expandDuration(a.data.id)}).attr("d",b.svgArc),b.svg.selectAll("."+l.arc).style("opacity",1))},i.expandDuration=function(a){var b=this,c=b.config;return b.isDonutType(a)?c.donut_expand_duration:b.isGaugeType(a)?c.gauge_expand_duration:b.isPieType(a)?c.pie_expand_duration:50},i.shouldExpand=function(a){var b=this,c=b.config;return b.isDonutType(a)&&c.donut_expand||b.isGaugeType(a)&&c.gauge_expand||b.isPieType(a)&&c.pie_expand},i.shouldShowArcLabel=function(){var a=this,b=a.config,c=!0;return a.hasType("donut")?c=b.donut_label_show:a.hasType("pie")&&(c=b.pie_label_show),c},i.meetsArcLabelThreshold=function(a){var b=this,c=b.config,d=b.hasType("donut")?c.donut_label_threshold:c.pie_label_threshold;return a>=d},i.getArcLabelFormat=function(){var a=this,b=a.config,c=b.pie_label_format;return a.hasType("gauge")?c=b.gauge_label_format:a.hasType("donut")&&(c=b.donut_label_format),c},i.getArcTitle=function(){var a=this;return a.hasType("donut")?a.config.donut_title:""},i.updateTargetsForArc=function(a){var b,c,d=this,e=d.main,f=d.classChartArc.bind(d),g=d.classArcs.bind(d),h=d.classFocus.bind(d);b=e.select("."+l.chartArcs).selectAll("."+l.chartArc).data(d.pie(a)).attr("class",function(a){return f(a)+h(a.data)}),c=b.enter().append("g").attr("class",f),c.append("g").attr("class",g),c.append("text").attr("dy",d.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},i.initArc=function(){var a=this;a.arcs=a.main.select("."+l.chart).append("g").attr("class",l.chartArcs).attr("transform",a.getTranslate("arc")),a.arcs.append("text").attr("class",l.chartArcsTitle).style("text-anchor","middle").text(a.getArcTitle())},i.redrawArc=function(a,b,c){var d,e=this,f=e.d3,g=e.config,h=e.main;d=h.selectAll("."+l.arcs).selectAll("."+l.arc).data(e.arcData.bind(e)),d.enter().append("path").attr("class",e.classArc.bind(e)).style("fill",function(a){return e.color(a.data)}).style("cursor",function(a){return g.interaction_enabled&&g.data_selection_isselectable(a)?"pointer":null}).style("opacity",0).each(function(a){e.isGaugeType(a.data)&&(a.startAngle=a.endAngle=g.gauge_startingAngle),this._current=a}),d.attr("transform",function(a){return!e.isGaugeType(a.data)&&c?"scale(0)":""}).style("opacity",function(a){return a===this._current?0:1}).on("mouseover",g.interaction_enabled?function(a){var b,c;e.transiting||(b=e.updateAngle(a),b&&(c=e.convertToArcData(b),e.expandArc(b.data.id),e.api.focus(b.data.id),e.toggleFocusLegend(b.data.id,!0),e.config.data_onmouseover(c,this)))}:null).on("mousemove",g.interaction_enabled?function(a){var b,c,d=e.updateAngle(a);d&&(b=e.convertToArcData(d),c=[b],e.showTooltip(c,this))}:null).on("mouseout",g.interaction_enabled?function(a){var b,c;e.transiting||(b=e.updateAngle(a),b&&(c=e.convertToArcData(b),e.unexpandArc(b.data.id),e.api.revert(),e.revertLegend(),e.hideTooltip(),e.config.data_onmouseout(c,this)))}:null).on("click",g.interaction_enabled?function(a,b){var c,d=e.updateAngle(a);d&&(c=e.convertToArcData(d),e.toggleShape&&e.toggleShape(this,c,b),e.config.data_onclick.call(e.api,c,this))}:null).each(function(){e.transiting=!0}).transition().duration(a).attrTween("d",function(a){var b,c=e.updateAngle(a);return c?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),b=f.interpolate(this._current,c),this._current=b(0),function(c){var d=b(c);return d.data=a.data,e.getArc(d,!0)}):function(){return"M 0 0"}}).attr("transform",c?"scale(1)":"").style("fill",function(a){return e.levelColor?e.levelColor(a.data.values[0].value):e.color(a.data.id)}).style("opacity",1).call(e.endall,function(){e.transiting=!1}),d.exit().transition().duration(b).style("opacity",0).remove(),h.selectAll("."+l.chartArc).select("text").style("opacity",0).attr("class",function(a){return e.isGaugeType(a.data)?l.gaugeValue:""}).text(e.textForArcLabel.bind(e)).attr("transform",e.transformForArcLabel.bind(e)).style("font-size",function(a){return e.isGaugeType(a.data)?Math.round(e.radius/5)+"px":""}).transition().duration(a).style("opacity",function(a){return e.isTargetToShow(a.data.id)&&e.isArcType(a.data)?1:0}),h.select("."+l.chartArcsTitle).style("opacity",e.hasType("donut")||e.hasType("gauge")?1:0),e.hasType("gauge")&&(e.arcs.select("."+l.chartArcsBackground).attr("d",function(){var a={data:[{value:g.gauge_max}],startAngle:g.gauge_startingAngle,endAngle:-1*g.gauge_startingAngle};return e.getArc(a,!0,!0)}),e.arcs.select("."+l.chartArcsGaugeUnit).attr("dy",".75em").text(g.gauge_label_show?g.gauge_units:""),e.arcs.select("."+l.chartArcsGaugeMin).attr("dx",-1*(e.innerRadius+(e.radius-e.innerRadius)/(g.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(g.gauge_label_show?g.gauge_min:""),e.arcs.select("."+l.chartArcsGaugeMax).attr("dx",e.innerRadius+(e.radius-e.innerRadius)/(g.gauge_fullCircle?1:2)+"px").attr("dy","1.2em").text(g.gauge_label_show?g.gauge_max:""))},i.initGauge=function(){var a=this.arcs;this.hasType("gauge")&&(a.append("path").attr("class",l.chartArcsBackground),a.append("text").attr("class",l.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),a.append("text").attr("class",l.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),a.append("text").attr("class",l.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},i.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},i.initRegion=function(){var a=this;a.region=a.main.append("g").attr("clip-path",a.clipPath).attr("class",l.regions)},i.updateRegion=function(a){var b=this,c=b.config;b.region.style("visibility",b.hasArcType()?"hidden":"visible"),b.mainRegion=b.main.select("."+l.regions).selectAll("."+l.region).data(c.regions),b.mainRegion.enter().append("g").append("rect").style("fill-opacity",0),b.mainRegion.attr("class",b.classRegion.bind(b)),b.mainRegion.exit().transition().duration(a).style("opacity",0).remove()},i.redrawRegion=function(a){var b=this,c=b.mainRegion.selectAll("rect").each(function(){var a=b.d3.select(this.parentNode).datum();b.d3.select(this).datum(a)}),d=b.regionX.bind(b),e=b.regionY.bind(b),f=b.regionWidth.bind(b),g=b.regionHeight.bind(b);return[(a?c.transition():c).attr("x",d).attr("y",e).attr("width",f).attr("height",g).style("fill-opacity",function(a){return m(a.opacity)?a.opacity:.1})]},i.regionX=function(a){var b,c=this,d=c.config,e="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated&&"start"in a?e(a.start):0:d.axis_rotated?0:"start"in a?c.x(c.isTimeSeries()?c.parseDate(a.start):a.start):0},i.regionY=function(a){var b,c=this,d=c.config,e="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated?0:"end"in a?e(a.end):0:d.axis_rotated&&"start"in a?c.x(c.isTimeSeries()?c.parseDate(a.start):a.start):0},i.regionWidth=function(a){var b,c=this,d=c.config,e=c.regionX(a),f="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated&&"end"in a?f(a.end):c.width:d.axis_rotated?c.width:"end"in a?c.x(c.isTimeSeries()?c.parseDate(a.end):a.end):c.width,e>b?0:b-e},i.regionHeight=function(a){var b,c=this,d=c.config,e=this.regionY(a),f="y"===a.axis?c.y:c.y2;return b="y"===a.axis||"y2"===a.axis?d.axis_rotated?c.height:"start"in a?f(a.start):c.height:d.axis_rotated&&"end"in a?c.x(c.isTimeSeries()?c.parseDate(a.end):a.end):c.height,e>b?0:b-e},i.isRegionOnX=function(a){return!a.axis||"x"===a.axis},i.drag=function(a){var b,c,d,e,f,g,h,i,j=this,k=j.config,m=j.main,n=j.d3;j.hasArcType()||k.data_selection_enabled&&(k.zoom_enabled&&!j.zoom.altDomain||k.data_selection_multiple&&(b=j.dragStart[0],c=j.dragStart[1],d=a[0],e=a[1],f=Math.min(b,d),g=Math.max(b,d),h=k.data_selection_grouped?j.margin.top:Math.min(c,e),i=k.data_selection_grouped?j.height:Math.max(c,e),m.select("."+l.dragarea).attr("x",f).attr("y",h).attr("width",g-f).attr("height",i-h),m.selectAll("."+l.shapes).selectAll("."+l.shape).filter(function(a){return k.data_selection_isselectable(a)}).each(function(a,b){var c,d,e,k,m,o,p=n.select(this),q=p.classed(l.SELECTED),r=p.classed(l.INCLUDED),s=!1;if(p.classed(l.circle))c=1*p.attr("cx"),d=1*p.attr("cy"),m=j.togglePoint,s=c>f&&g>c&&d>h&&i>d;else{if(!p.classed(l.bar))return;o=z(this),c=o.x,d=o.y,e=o.width,k=o.height,m=j.togglePath,s=!(c>g||f>c+e||d>i||h>d+k)}s^r&&(p.classed(l.INCLUDED,!r),p.classed(l.SELECTED,!q),m.call(j,!q,p,a,b))})))},i.dragstart=function(a){var b=this,c=b.config;b.hasArcType()||c.data_selection_enabled&&(b.dragStart=a,b.main.select("."+l.chart).append("rect").attr("class",l.dragarea).style("opacity",.1),b.dragging=!0)},i.dragend=function(){var a=this,b=a.config;a.hasArcType()||b.data_selection_enabled&&(a.main.select("."+l.dragarea).transition().duration(100).style("opacity",0).remove(),a.main.selectAll("."+l.shape).classed(l.INCLUDED,!1),a.dragging=!1)},i.selectPoint=function(a,b,c){var d=this,e=d.config,f=(e.axis_rotated?d.circleY:d.circleX).bind(d),g=(e.axis_rotated?d.circleX:d.circleY).bind(d),h=d.pointSelectR.bind(d);e.data_onselected.call(d.api,b,a.node()),d.main.select("."+l.selectedCircles+d.getTargetSelectorSuffix(b.id)).selectAll("."+l.selectedCircle+"-"+c).data([b]).enter().append("circle").attr("class",function(){return d.generateClass(l.selectedCircle,c)}).attr("cx",f).attr("cy",g).attr("stroke",function(){return d.color(b)}).attr("r",function(a){return 1.4*d.pointSelectR(a)}).transition().duration(100).attr("r",h)},i.unselectPoint=function(a,b,c){var d=this;d.config.data_onunselected.call(d.api,b,a.node()),d.main.select("."+l.selectedCircles+d.getTargetSelectorSuffix(b.id)).selectAll("."+l.selectedCircle+"-"+c).transition().duration(100).attr("r",0).remove()},i.togglePoint=function(a,b,c,d){a?this.selectPoint(b,c,d):this.unselectPoint(b,c,d)},i.selectPath=function(a,b){var c=this;c.config.data_onselected.call(c,b,a.node()),c.config.interaction_brighten&&a.transition().duration(100).style("fill",function(){return c.d3.rgb(c.color(b)).brighter(.75)})},i.unselectPath=function(a,b){var c=this;c.config.data_onunselected.call(c,b,a.node()),c.config.interaction_brighten&&a.transition().duration(100).style("fill",function(){return c.color(b)})},i.togglePath=function(a,b,c,d){a?this.selectPath(b,c,d):this.unselectPath(b,c,d)},i.getToggle=function(a,b){var c,d=this;return"circle"===a.nodeName?c=d.isStepType(b)?function(){}:d.togglePoint:"path"===a.nodeName&&(c=d.togglePath),c},i.toggleShape=function(a,b,c){var d=this,e=d.d3,f=d.config,g=e.select(a),h=g.classed(l.SELECTED),i=d.getToggle(a,b).bind(d);f.data_selection_enabled&&f.data_selection_isselectable(b)&&(f.data_selection_multiple||d.main.selectAll("."+l.shapes+(f.data_selection_grouped?d.getTargetSelectorSuffix(b.id):"")).selectAll("."+l.shape).each(function(a,b){var c=e.select(this);c.classed(l.SELECTED)&&i(!1,c.classed(l.SELECTED,!1),a,b)}),g.classed(l.SELECTED,!h),i(!h,g,b,c))},i.initBrush=function(){var a=this,b=a.d3;a.brush=b.svg.brush().on("brush",function(){a.redrawForBrush()}),a.brush.update=function(){return a.context&&a.context.select("."+l.brush).call(this),this},a.brush.scale=function(b){return a.config.axis_rotated?this.y(b):this.x(b)}},i.initSubchart=function(){var a=this,b=a.config,c=a.context=a.svg.append("g").attr("transform",a.getTranslate("context")),d=b.subchart_show?"visible":"hidden";c.style("visibility",d),c.append("g").attr("clip-path",a.clipPathForSubchart).attr("class",l.chart),c.select("."+l.chart).append("g").attr("class",l.chartBars),c.select("."+l.chart).append("g").attr("class",l.chartLines),c.append("g").attr("clip-path",a.clipPath).attr("class",l.brush).call(a.brush),a.axes.subx=c.append("g").attr("class",l.axisX).attr("transform",a.getTranslate("subx")).attr("clip-path",b.axis_rotated?"":a.clipPathForXAxis).style("visibility",b.subchart_axis_x_show?d:"hidden")},i.updateTargetsForSubchart=function(a){var b,c,d,e,f=this,g=f.context,h=f.config,i=f.classChartBar.bind(f),j=f.classBars.bind(f),k=f.classChartLine.bind(f),m=f.classLines.bind(f),n=f.classAreas.bind(f);h.subchart_show&&(e=g.select("."+l.chartBars).selectAll("."+l.chartBar).data(a).attr("class",i),d=e.enter().append("g").style("opacity",0).attr("class",i),d.append("g").attr("class",j),c=g.select("."+l.chartLines).selectAll("."+l.chartLine).data(a).attr("class",k),b=c.enter().append("g").style("opacity",0).attr("class",k),b.append("g").attr("class",m),b.append("g").attr("class",n),g.selectAll("."+l.brush+" rect").attr(h.axis_rotated?"width":"height",h.axis_rotated?f.width2:f.height2))},i.updateBarForSubchart=function(a){var b=this;b.contextBar=b.context.selectAll("."+l.bars).selectAll("."+l.bar).data(b.barData.bind(b)),b.contextBar.enter().append("path").attr("class",b.classBar.bind(b)).style("stroke","none").style("fill",b.color),b.contextBar.style("opacity",b.initialOpacity.bind(b)),b.contextBar.exit().transition().duration(a).style("opacity",0).remove()},i.redrawBarForSubchart=function(a,b,c){(b?this.contextBar.transition(Math.random().toString()).duration(c):this.contextBar).attr("d",a).style("opacity",1)},i.updateLineForSubchart=function(a){var b=this;b.contextLine=b.context.selectAll("."+l.lines).selectAll("."+l.line).data(b.lineData.bind(b)),b.contextLine.enter().append("path").attr("class",b.classLine.bind(b)).style("stroke",b.color),b.contextLine.style("opacity",b.initialOpacity.bind(b)),b.contextLine.exit().transition().duration(a).style("opacity",0).remove()},i.redrawLineForSubchart=function(a,b,c){(b?this.contextLine.transition(Math.random().toString()).duration(c):this.contextLine).attr("d",a).style("opacity",1)},i.updateAreaForSubchart=function(a){var b=this,c=b.d3;b.contextArea=b.context.selectAll("."+l.areas).selectAll("."+l.area).data(b.lineData.bind(b)),b.contextArea.enter().append("path").attr("class",b.classArea.bind(b)).style("fill",b.color).style("opacity",function(){return b.orgAreaOpacity=+c.select(this).style("opacity"),0}),b.contextArea.style("opacity",0),b.contextArea.exit().transition().duration(a).style("opacity",0).remove()},i.redrawAreaForSubchart=function(a,b,c){(b?this.contextArea.transition(Math.random().toString()).duration(c):this.contextArea).attr("d",a).style("fill",this.color).style("opacity",this.orgAreaOpacity)},i.redrawSubchart=function(a,b,c,d,e,f,g){var h,i,j,k=this,l=k.d3,m=k.config;k.context.style("visibility",m.subchart_show?"visible":"hidden"),m.subchart_show&&(l.event&&"zoom"===l.event.type&&k.brush.extent(k.x.orgDomain()).update(),a&&(k.brush.empty()||k.brush.extent(k.x.orgDomain()).update(),h=k.generateDrawArea(e,!0),i=k.generateDrawBar(f,!0),j=k.generateDrawLine(g,!0),k.updateBarForSubchart(c),k.updateLineForSubchart(c),k.updateAreaForSubchart(c),k.redrawBarForSubchart(i,c,c),k.redrawLineForSubchart(j,c,c),k.redrawAreaForSubchart(h,c,c)))},i.redrawForBrush=function(){var a=this,b=a.x;a.redraw({withTransition:!1,withY:a.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),a.config.subchart_onbrush.call(a.api,b.orgDomain())},i.transformContext=function(a,b){var c,d=this;b&&b.axisSubX?c=b.axisSubX:(c=d.context.select("."+l.axisX),a&&(c=c.transition())),d.context.attr("transform",d.getTranslate("context")),c.attr("transform",d.getTranslate("subx"))},i.getDefaultExtent=function(){var a=this,b=a.config,c=n(b.axis_x_extent)?b.axis_x_extent(a.getXDomain(a.data.targets)):b.axis_x_extent;return a.isTimeSeries()&&(c=[a.parseDate(c[0]),a.parseDate(c[1])]),c},i.initZoom=function(){var a,b=this,c=b.d3,d=b.config;b.zoom=c.behavior.zoom().on("zoomstart",function(){a=c.event.sourceEvent,b.zoom.altDomain=c.event.sourceEvent.altKey?b.x.orgDomain():null,d.zoom_onzoomstart.call(b.api,c.event.sourceEvent)}).on("zoom",function(){b.redrawForZoom.call(b)}).on("zoomend",function(){var e=c.event.sourceEvent;e&&a.clientX===e.clientX&&a.clientY===e.clientY||(b.redrawEventRect(),b.updateZoom(),d.zoom_onzoomend.call(b.api,b.x.orgDomain()))}),b.zoom.scale=function(a){return d.axis_rotated?this.y(a):this.x(a)},b.zoom.orgScaleExtent=function(){var a=d.zoom_extent?d.zoom_extent:[1,10];return[a[0],Math.max(b.getMaxDataCount()/a[1],a[1])]},b.zoom.updateScaleExtent=function(){var a=t(b.x.orgDomain())/t(b.getZoomDomain()),c=this.orgScaleExtent();return this.scaleExtent([c[0]*a,c[1]*a]),this}},i.getZoomDomain=function(){var a=this,b=a.config,c=a.d3,d=c.min([a.orgXDomain[0],b.zoom_x_min]),e=c.max([a.orgXDomain[1],b.zoom_x_max]);return[d,e]},i.updateZoom=function(){var a=this,b=a.config.zoom_enabled?a.zoom:function(){};a.main.select("."+l.zoomRect).call(b).on("dblclick.zoom",null),a.main.selectAll("."+l.eventRect).call(b).on("dblclick.zoom",null)},i.redrawForZoom=function(){var a=this,b=a.d3,c=a.config,d=a.zoom,e=a.x;if(c.zoom_enabled&&0!==a.filterTargetsToShow(a.data.targets).length){if("mousemove"===b.event.sourceEvent.type&&d.altDomain)return e.domain(d.altDomain),void d.scale(e).updateScaleExtent();a.isCategorized()&&e.orgDomain()[0]===a.orgXDomain[0]&&e.domain([a.orgXDomain[0]-1e-10,e.orgDomain()[1]]),a.redraw({withTransition:!1,withY:c.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),"mousemove"===b.event.sourceEvent.type&&(a.cancelClick=!0),c.zoom_onzoom.call(a.api,e.orgDomain())}},i.generateColor=function(){var a=this,b=a.config,c=a.d3,d=b.data_colors,e=v(b.color_pattern)?b.color_pattern:c.scale.category10().range(),f=b.data_color,g=[];return function(a){var b,c=a.id||a.data&&a.data.id||a;return d[c]instanceof Function?b=d[c](a):d[c]?b=d[c]:(g.indexOf(c)<0&&g.push(c),b=e[g.indexOf(c)%e.length],d[c]=b),f instanceof Function?f(b,a):b}},i.generateLevelColor=function(){var a=this,b=a.config,c=b.color_pattern,d=b.color_threshold,e="value"===d.unit,f=d.values&&d.values.length?d.values:[],g=d.max||100;return v(b.color_threshold)?function(a){var b,d,h=c[c.length-1];for(b=0;b<f.length;b++)if(d=e?a:100*a/g,d<f[b]){h=c[b];break}return h}:null},i.getYFormat=function(a){var b=this,c=a&&!b.hasType("gauge")?b.defaultArcValueFormat:b.yFormat,d=a&&!b.hasType("gauge")?b.defaultArcValueFormat:b.y2Format;return function(a,e,f){var g="y2"===b.axis.getId(f)?d:c;return g.call(b,a,e)}},i.yFormat=function(a){var b=this,c=b.config,d=c.axis_y_tick_format?c.axis_y_tick_format:b.defaultValueFormat;return d(a)},i.y2Format=function(a){var b=this,c=b.config,d=c.axis_y2_tick_format?c.axis_y2_tick_format:b.defaultValueFormat;return d(a)},i.defaultValueFormat=function(a){return m(a)?+a:""},i.defaultArcValueFormat=function(a,b){return(100*b).toFixed(1)+"%"},i.dataLabelFormat=function(a){var b,c=this,d=c.config.data_labels,e=function(a){return m(a)?+a:""};return b="function"==typeof d.format?d.format:"object"==typeof d.format?d.format[a]?d.format[a]===!0?e:d.format[a]:function(){return""}:e},i.hasCaches=function(a){for(var b=0;b<a.length;b++)if(!(a[b]in this.cache))return!1;return!0},i.addCache=function(a,b){this.cache[a]=this.cloneTarget(b)},i.getCaches=function(a){var b,c=[];for(b=0;b<a.length;b++)a[b]in this.cache&&c.push(this.cloneTarget(this.cache[a[b]]));return c};var l=i.CLASS={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",chartArcsBackground:"c3-chart-arcs-background",chartArcsGaugeUnit:"c3-chart-arcs-gauge-unit",chartArcsGaugeMax:"c3-chart-arcs-gauge-max",chartArcsGaugeMin:"c3-chart-arcs-gauge-min",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",defocused:"c3-defocused",region:"c3-region",regions:"c3-regions",title:"c3-title",tooltipContainer:"c3-tooltip-container",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",empty:"c3-empty",text:"c3-text",texts:"c3-texts",gaugeValue:"c3-gauge-value",grid:"c3-grid",gridLines:"c3-grid-lines",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axis:"c3-axis",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendBackground:"c3-legend-background",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"};i.generateClass=function(a,b){return" "+a+" "+a+this.getTargetSelectorSuffix(b)},i.classText=function(a){return this.generateClass(l.text,a.index)},i.classTexts=function(a){return this.generateClass(l.texts,a.id)},i.classShape=function(a){return this.generateClass(l.shape,a.index)},i.classShapes=function(a){return this.generateClass(l.shapes,a.id)},i.classLine=function(a){return this.classShape(a)+this.generateClass(l.line,a.id)},i.classLines=function(a){return this.classShapes(a)+this.generateClass(l.lines,a.id)},i.classCircle=function(a){return this.classShape(a)+this.generateClass(l.circle,a.index)},i.classCircles=function(a){return this.classShapes(a)+this.generateClass(l.circles,a.id)},i.classBar=function(a){return this.classShape(a)+this.generateClass(l.bar,a.index)},i.classBars=function(a){return this.classShapes(a)+this.generateClass(l.bars,a.id)},i.classArc=function(a){return this.classShape(a.data)+this.generateClass(l.arc,a.data.id)},i.classArcs=function(a){return this.classShapes(a.data)+this.generateClass(l.arcs,a.data.id)},i.classArea=function(a){return this.classShape(a)+this.generateClass(l.area,a.id)},i.classAreas=function(a){return this.classShapes(a)+this.generateClass(l.areas,a.id)},i.classRegion=function(a,b){return this.generateClass(l.region,b)+" "+("class"in a?a["class"]:"")},i.classEvent=function(a){return this.generateClass(l.eventRect,a.index)},i.classTarget=function(a){var b=this,c=b.config.data_classes[a],d="";return c&&(d=" "+l.target+"-"+c),b.generateClass(l.target,a)+d},i.classFocus=function(a){return this.classFocused(a)+this.classDefocused(a)},i.classFocused=function(a){return" "+(this.focusedTargetIds.indexOf(a.id)>=0?l.focused:"")},i.classDefocused=function(a){return" "+(this.defocusedTargetIds.indexOf(a.id)>=0?l.defocused:"")},i.classChartText=function(a){return l.chartText+this.classTarget(a.id)},i.classChartLine=function(a){return l.chartLine+this.classTarget(a.id)},i.classChartBar=function(a){return l.chartBar+this.classTarget(a.id)},i.classChartArc=function(a){return l.chartArc+this.classTarget(a.data.id)},i.getTargetSelectorSuffix=function(a){return a||0===a?("-"+a).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},i.selectorTarget=function(a,b){return(b||"")+"."+l.target+this.getTargetSelectorSuffix(a)},i.selectorTargets=function(a,b){var c=this;return a=a||[],a.length?a.map(function(a){return c.selectorTarget(a,b)}):null},i.selectorLegend=function(a){return"."+l.legendItem+this.getTargetSelectorSuffix(a)},i.selectorLegends=function(a){var b=this;return a&&a.length?a.map(function(a){return b.selectorLegend(a)}):null};var m=i.isValue=function(a){return a||0===a},n=i.isFunction=function(a){return"function"==typeof a},o=i.isString=function(a){return"string"==typeof a},p=i.isUndefined=function(a){return"undefined"==typeof a},q=i.isDefined=function(a){return"undefined"!=typeof a},r=i.ceil10=function(a){return 10*Math.ceil(a/10)},s=i.asHalfPixel=function(a){return Math.ceil(a)+.5},t=i.diffDomain=function(a){return a[1]-a[0]},u=i.isEmpty=function(a){return"undefined"==typeof a||null===a||o(a)&&0===a.length||"object"==typeof a&&0===Object.keys(a).length},v=i.notEmpty=function(a){return!i.isEmpty(a)},w=i.getOption=function(a,b,c){return q(a[b])?a[b]:c},x=i.hasValue=function(a,b){var c=!1;return Object.keys(a).forEach(function(d){a[d]===b&&(c=!0)}),c},y=i.sanitise=function(a){return"string"==typeof a?a.replace(/</g,"&lt;").replace(/>/g,"&gt;"):a},z=i.getPathBox=function(a){var b=a.getBoundingClientRect(),c=[a.pathSegList.getItem(0),a.pathSegList.getItem(1)],d=c[0].x,e=Math.min(c[0].y,c[1].y);return{x:d,y:e,width:b.width,height:b.height}};h.focus=function(a){var b,c=this.internal;a=c.mapToTargetIds(a),b=c.svg.selectAll(c.selectorTargets(a.filter(c.isTargetToShow,c))),this.revert(),this.defocus(),b.classed(l.focused,!0).classed(l.defocused,!1),
2356 9880 c.hasArcType()&&c.expandArc(a),c.toggleFocusLegend(a,!0),c.focusedTargetIds=a,c.defocusedTargetIds=c.defocusedTargetIds.filter(function(b){return a.indexOf(b)<0})},h.defocus=function(a){var b,c=this.internal;a=c.mapToTargetIds(a),b=c.svg.selectAll(c.selectorTargets(a.filter(c.isTargetToShow,c))),b.classed(l.focused,!1).classed(l.defocused,!0),c.hasArcType()&&c.unexpandArc(a),c.toggleFocusLegend(a,!1),c.focusedTargetIds=c.focusedTargetIds.filter(function(b){return a.indexOf(b)<0}),c.defocusedTargetIds=a},h.revert=function(a){var b,c=this.internal;a=c.mapToTargetIds(a),b=c.svg.selectAll(c.selectorTargets(a)),b.classed(l.focused,!1).classed(l.defocused,!1),c.hasArcType()&&c.unexpandArc(a),c.config.legend_show&&(c.showLegend(a.filter(c.isLegendToShow.bind(c))),c.legend.selectAll(c.selectorLegends(a)).filter(function(){return c.d3.select(this).classed(l.legendItemFocused)}).classed(l.legendItemFocused,!1)),c.focusedTargetIds=[],c.defocusedTargetIds=[]},h.show=function(a,b){var c,d=this.internal;a=d.mapToTargetIds(a),b=b||{},d.removeHiddenTargetIds(a),c=d.svg.selectAll(d.selectorTargets(a)),c.transition().style("opacity",1,"important").call(d.endall,function(){c.style("opacity",null).style("opacity",1)}),b.withLegend&&d.showLegend(a),d.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},h.hide=function(a,b){var c,d=this.internal;a=d.mapToTargetIds(a),b=b||{},d.addHiddenTargetIds(a),c=d.svg.selectAll(d.selectorTargets(a)),c.transition().style("opacity",0,"important").call(d.endall,function(){c.style("opacity",null).style("opacity",0)}),b.withLegend&&d.hideLegend(a),d.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},h.toggle=function(a,b){var c=this,d=this.internal;d.mapToTargetIds(a).forEach(function(a){d.isTargetToShow(a)?c.hide(a,b):c.show(a,b)})},h.zoom=function(a){var b=this.internal;return a&&(b.isTimeSeries()&&(a=a.map(function(a){return b.parseDate(a)})),b.brush.extent(a),b.redraw({withUpdateXDomain:!0,withY:b.config.zoom_rescale}),b.config.zoom_onzoom.call(this,b.x.orgDomain())),b.brush.extent()},h.zoom.enable=function(a){var b=this.internal;b.config.zoom_enabled=a,b.updateAndRedraw()},h.unzoom=function(){var a=this.internal;a.brush.clear().update(),a.redraw({withUpdateXDomain:!0})},h.zoom.max=function(a){var b=this.internal,c=b.config,d=b.d3;return 0===a||a?void(c.zoom_x_max=d.max([b.orgXDomain[1],a])):c.zoom_x_max},h.zoom.min=function(a){var b=this.internal,c=b.config,d=b.d3;return 0===a||a?void(c.zoom_x_min=d.min([b.orgXDomain[0],a])):c.zoom_x_min},h.zoom.range=function(a){return arguments.length?(q(a.max)&&this.domain.max(a.max),void(q(a.min)&&this.domain.min(a.min))):{max:this.domain.max(),min:this.domain.min()}},h.load=function(a){var b=this.internal,c=b.config;return a.xs&&b.addXs(a.xs),"names"in a&&h.data.names.bind(this)(a.names),"classes"in a&&Object.keys(a.classes).forEach(function(b){c.data_classes[b]=a.classes[b]}),"categories"in a&&b.isCategorized()&&(c.axis_x_categories=a.categories),"axes"in a&&Object.keys(a.axes).forEach(function(b){c.data_axes[b]=a.axes[b]}),"colors"in a&&Object.keys(a.colors).forEach(function(b){c.data_colors[b]=a.colors[b]}),"cacheIds"in a&&b.hasCaches(a.cacheIds)?void b.load(b.getCaches(a.cacheIds),a.done):void("unload"in a?b.unload(b.mapToTargetIds("boolean"==typeof a.unload&&a.unload?null:a.unload),function(){b.loadFromArgs(a)}):b.loadFromArgs(a))},h.unload=function(a){var b=this.internal;a=a||{},a instanceof Array?a={ids:a}:"string"==typeof a&&(a={ids:[a]}),b.unload(b.mapToTargetIds(a.ids),function(){b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),a.done&&a.done()})},h.flow=function(a){var b,c,d,e,f,g,h,i,j=this.internal,k=[],l=j.getMaxDataCount(),n=0,o=0;if(a.json)c=j.convertJsonToData(a.json,a.keys);else if(a.rows)c=j.convertRowsToData(a.rows);else{if(!a.columns)return;c=j.convertColumnsToData(a.columns)}b=j.convertDataToTargets(c,!0),j.data.targets.forEach(function(a){var c,d,e=!1;for(c=0;c<b.length;c++)if(a.id===b[c].id){for(e=!0,a.values[a.values.length-1]&&(o=a.values[a.values.length-1].index+1),n=b[c].values.length,d=0;n>d;d++)b[c].values[d].index=o+d,j.isTimeSeries()||(b[c].values[d].x=o+d);a.values=a.values.concat(b[c].values),b.splice(c,1);break}e||k.push(a.id)}),j.data.targets.forEach(function(a){var b,c;for(b=0;b<k.length;b++)if(a.id===k[b])for(o=a.values[a.values.length-1].index+1,c=0;n>c;c++)a.values.push({id:a.id,index:o+c,x:j.isTimeSeries()?j.getOtherTargetX(o+c):o+c,value:null})}),j.data.targets.length&&b.forEach(function(a){var b,c=[];for(b=j.data.targets[0].values[0].index;o>b;b++)c.push({id:a.id,index:b,x:j.isTimeSeries()?j.getOtherTargetX(b):b,value:null});a.values.forEach(function(a){a.index+=o,j.isTimeSeries()||(a.x+=o)}),a.values=c.concat(a.values)}),j.data.targets=j.data.targets.concat(b),d=j.getMaxDataCount(),f=j.data.targets[0],g=f.values[0],q(a.to)?(n=0,i=j.isTimeSeries()?j.parseDate(a.to):a.to,f.values.forEach(function(a){a.x<i&&n++})):q(a.length)&&(n=a.length),l?1===l&&j.isTimeSeries()&&(h=(f.values[f.values.length-1].x-g.x)/2,e=[new Date(+g.x-h),new Date(+g.x+h)],j.updateXDomain(null,!0,!0,!1,e)):(h=j.isTimeSeries()?f.values.length>1?f.values[f.values.length-1].x-g.x:g.x-j.getXDomain(j.data.targets)[0]:1,e=[g.x-h,g.x],j.updateXDomain(null,!0,!0,!1,e)),j.updateTargets(j.data.targets),j.redraw({flow:{index:g.index,length:n,duration:m(a.duration)?a.duration:j.config.transition_duration,done:a.done,orgDataCount:l},withLegend:!0,withTransition:l>1,withTrimXDomain:!1,withUpdateXAxis:!0})},i.generateFlow=function(a){var b=this,c=b.config,d=b.d3;return function(){var e,f,g,h=a.targets,i=a.flow,j=a.drawBar,k=a.drawLine,m=a.drawArea,n=a.cx,o=a.cy,p=a.xv,q=a.xForText,r=a.yForText,s=a.duration,u=1,v=i.index,w=i.length,x=b.getValueOnIndex(b.data.targets[0].values,v),y=b.getValueOnIndex(b.data.targets[0].values,v+w),z=b.x.domain(),A=i.duration||s,B=i.done||function(){},C=b.generateWait(),D=b.xgrid||d.selectAll([]),E=b.xgridLines||d.selectAll([]),F=b.mainRegion||d.selectAll([]),G=b.mainText||d.selectAll([]),H=b.mainBar||d.selectAll([]),I=b.mainLine||d.selectAll([]),J=b.mainArea||d.selectAll([]),K=b.mainCircle||d.selectAll([]);b.flowing=!0,b.data.targets.forEach(function(a){a.values.splice(0,w)}),g=b.updateXDomain(h,!0,!0),b.updateXGrid&&b.updateXGrid(!0),i.orgDataCount?e=1===i.orgDataCount||(x&&x.x)===(y&&y.x)?b.x(z[0])-b.x(g[0]):b.isTimeSeries()?b.x(z[0])-b.x(g[0]):b.x(x.x)-b.x(y.x):1!==b.data.targets[0].values.length?e=b.x(z[0])-b.x(g[0]):b.isTimeSeries()?(x=b.getValueOnIndex(b.data.targets[0].values,0),y=b.getValueOnIndex(b.data.targets[0].values,b.data.targets[0].values.length-1),e=b.x(x.x)-b.x(y.x)):e=t(g)/2,u=t(z)/t(g),f="translate("+e+",0) scale("+u+",1)",b.hideXGridFocus(),d.transition().ease("linear").duration(A).each(function(){C.add(b.axes.x.transition().call(b.xAxis)),C.add(H.transition().attr("transform",f)),C.add(I.transition().attr("transform",f)),C.add(J.transition().attr("transform",f)),C.add(K.transition().attr("transform",f)),C.add(G.transition().attr("transform",f)),C.add(F.filter(b.isRegionOnX).transition().attr("transform",f)),C.add(D.transition().attr("transform",f)),C.add(E.transition().attr("transform",f))}).call(C,function(){var a,d=[],e=[],f=[];if(w){for(a=0;w>a;a++)d.push("."+l.shape+"-"+(v+a)),e.push("."+l.text+"-"+(v+a)),f.push("."+l.eventRect+"-"+(v+a));b.svg.selectAll("."+l.shapes).selectAll(d).remove(),b.svg.selectAll("."+l.texts).selectAll(e).remove(),b.svg.selectAll("."+l.eventRects).selectAll(f).remove(),b.svg.select("."+l.xgrid).remove()}D.attr("transform",null).attr(b.xgridAttr),E.attr("transform",null),E.select("line").attr("x1",c.axis_rotated?0:p).attr("x2",c.axis_rotated?b.width:p),E.select("text").attr("x",c.axis_rotated?b.width:0).attr("y",p),H.attr("transform",null).attr("d",j),I.attr("transform",null).attr("d",k),J.attr("transform",null).attr("d",m),K.attr("transform",null).attr("cx",n).attr("cy",o),G.attr("transform",null).attr("x",q).attr("y",r).style("fill-opacity",b.opacityForText.bind(b)),F.attr("transform",null),F.select("rect").filter(b.isRegionOnX).attr("x",b.regionX.bind(b)).attr("width",b.regionWidth.bind(b)),c.interaction_enabled&&b.redrawEventRect(),B(),b.flowing=!1})}},h.selected=function(a){var b=this.internal,c=b.d3;return c.merge(b.main.selectAll("."+l.shapes+b.getTargetSelectorSuffix(a)).selectAll("."+l.shape).filter(function(){return c.select(this).classed(l.SELECTED)}).map(function(a){return a.map(function(a){var b=a.__data__;return b.data?b.data:b})}))},h.select=function(a,b,c){var d=this.internal,e=d.d3,f=d.config;f.data_selection_enabled&&d.main.selectAll("."+l.shapes).selectAll("."+l.shape).each(function(g,h){var i=e.select(this),j=g.data?g.data.id:g.id,k=d.getToggle(this,g).bind(d),m=f.data_selection_grouped||!a||a.indexOf(j)>=0,n=!b||b.indexOf(h)>=0,o=i.classed(l.SELECTED);i.classed(l.line)||i.classed(l.area)||(m&&n?f.data_selection_isselectable(g)&&!o&&k(!0,i.classed(l.SELECTED,!0),g,h):q(c)&&c&&o&&k(!1,i.classed(l.SELECTED,!1),g,h))})},h.unselect=function(a,b){var c=this.internal,d=c.d3,e=c.config;e.data_selection_enabled&&c.main.selectAll("."+l.shapes).selectAll("."+l.shape).each(function(f,g){var h=d.select(this),i=f.data?f.data.id:f.id,j=c.getToggle(this,f).bind(c),k=e.data_selection_grouped||!a||a.indexOf(i)>=0,m=!b||b.indexOf(g)>=0,n=h.classed(l.SELECTED);h.classed(l.line)||h.classed(l.area)||k&&m&&e.data_selection_isselectable(f)&&n&&j(!1,h.classed(l.SELECTED,!1),f,g)})},h.transform=function(a,b){var c=this.internal,d=["pie","donut"].indexOf(a)>=0?{withTransform:!0}:null;c.transformTo(b,a,d)},i.transformTo=function(a,b,c){var d=this,e=!d.hasArcType(),f=c||{withTransitionForAxis:e};f.withTransitionForTransform=!1,d.transiting=!1,d.setTargetType(a,b),d.updateTargets(d.data.targets),d.updateAndRedraw(f)},h.groups=function(a){var b=this.internal,c=b.config;return p(a)?c.data_groups:(c.data_groups=a,b.redraw(),c.data_groups)},h.xgrids=function(a){var b=this.internal,c=b.config;return a?(c.grid_x_lines=a,b.redrawWithoutRescale(),c.grid_x_lines):c.grid_x_lines},h.xgrids.add=function(a){var b=this.internal;return this.xgrids(b.config.grid_x_lines.concat(a?a:[]))},h.xgrids.remove=function(a){var b=this.internal;b.removeGridLines(a,!0)},h.ygrids=function(a){var b=this.internal,c=b.config;return a?(c.grid_y_lines=a,b.redrawWithoutRescale(),c.grid_y_lines):c.grid_y_lines},h.ygrids.add=function(a){var b=this.internal;return this.ygrids(b.config.grid_y_lines.concat(a?a:[]))},h.ygrids.remove=function(a){var b=this.internal;b.removeGridLines(a,!1)},h.regions=function(a){var b=this.internal,c=b.config;return a?(c.regions=a,b.redrawWithoutRescale(),c.regions):c.regions},h.regions.add=function(a){var b=this.internal,c=b.config;return a?(c.regions=c.regions.concat(a),b.redrawWithoutRescale(),c.regions):c.regions},h.regions.remove=function(a){var b,c,d,e=this.internal,f=e.config;return a=a||{},b=e.getOption(a,"duration",f.transition_duration),c=e.getOption(a,"classes",[l.region]),d=e.main.select("."+l.regions).selectAll(c.map(function(a){return"."+a})),(b?d.transition().duration(b):d).style("opacity",0).remove(),f.regions=f.regions.filter(function(a){var b=!1;return a["class"]?(a["class"].split(" ").forEach(function(a){c.indexOf(a)>=0&&(b=!0)}),!b):!0}),f.regions},h.data=function(a){var b=this.internal.data.targets;return"undefined"==typeof a?b:b.filter(function(b){return[].concat(a).indexOf(b.id)>=0})},h.data.shown=function(a){return this.internal.filterTargetsToShow(this.data(a))},h.data.values=function(a){var b,c=null;return a&&(b=this.data(a),c=b[0]?b[0].values.map(function(a){return a.value}):null),c},h.data.names=function(a){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",a)},h.data.colors=function(a){return this.internal.updateDataAttributes("colors",a)},h.data.axes=function(a){return this.internal.updateDataAttributes("axes",a)},h.category=function(a,b){var c=this.internal,d=c.config;return arguments.length>1&&(d.axis_x_categories[a]=b,c.redraw()),d.axis_x_categories[a]},h.categories=function(a){var b=this.internal,c=b.config;return arguments.length?(c.axis_x_categories=a,b.redraw(),c.axis_x_categories):c.axis_x_categories},h.color=function(a){var b=this.internal;return b.color(a)},h.x=function(a){var b=this.internal;return arguments.length&&(b.updateTargetX(b.data.targets,a),b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),b.data.xs},h.xs=function(a){var b=this.internal;return arguments.length&&(b.updateTargetXs(b.data.targets,a),b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),b.data.xs},h.axis=function(){},h.axis.labels=function(a){var b=this.internal;arguments.length&&(Object.keys(a).forEach(function(c){b.axis.setLabelText(c,a[c])}),b.axis.updateLabels())},h.axis.max=function(a){var b=this.internal,c=b.config;return arguments.length?("object"==typeof a?(m(a.x)&&(c.axis_x_max=a.x),m(a.y)&&(c.axis_y_max=a.y),m(a.y2)&&(c.axis_y2_max=a.y2)):c.axis_y_max=c.axis_y2_max=a,void b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:c.axis_x_max,y:c.axis_y_max,y2:c.axis_y2_max}},h.axis.min=function(a){var b=this.internal,c=b.config;return arguments.length?("object"==typeof a?(m(a.x)&&(c.axis_x_min=a.x),m(a.y)&&(c.axis_y_min=a.y),m(a.y2)&&(c.axis_y2_min=a.y2)):c.axis_y_min=c.axis_y2_min=a,void b.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})):{x:c.axis_x_min,y:c.axis_y_min,y2:c.axis_y2_min}},h.axis.range=function(a){return arguments.length?(q(a.max)&&this.axis.max(a.max),void(q(a.min)&&this.axis.min(a.min))):{max:this.axis.max(),min:this.axis.min()}},h.legend=function(){},h.legend.show=function(a){var b=this.internal;b.showLegend(b.mapToTargetIds(a)),b.updateAndRedraw({withLegend:!0})},h.legend.hide=function(a){var b=this.internal;b.hideLegend(b.mapToTargetIds(a)),b.updateAndRedraw({withLegend:!0})},h.resize=function(a){var b=this.internal,c=b.config;c.size_width=a?a.width:null,c.size_height=a?a.height:null,this.flush()},h.flush=function(){var a=this.internal;a.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},h.destroy=function(){var b=this.internal;if(a.clearInterval(b.intervalForObserveInserted),void 0!==b.resizeTimeout&&a.clearTimeout(b.resizeTimeout),a.detachEvent)a.detachEvent("onresize",b.resizeFunction);else if(a.removeEventListener)a.removeEventListener("resize",b.resizeFunction);else{var c=a.onresize;c&&c.add&&c.remove&&c.remove(b.resizeFunction)}return b.selectChart.classed("c3",!1).html(""),Object.keys(b).forEach(function(a){b[a]=null}),null},h.tooltip=function(){},h.tooltip.show=function(a){var b,c,d=this.internal;a.mouse&&(c=a.mouse),a.data?d.isMultipleX()?(c=[d.x(a.data.x),d.getYScale(a.data.id)(a.data.value)],b=null):b=m(a.data.index)?a.data.index:d.getIndexByX(a.data.x):"undefined"!=typeof a.x?b=d.getIndexByX(a.x):"undefined"!=typeof a.index&&(b=a.index),d.dispatchEvent("mouseover",b,c),d.dispatchEvent("mousemove",b,c),d.config.tooltip_onshow.call(d,a.data)},h.tooltip.hide=function(){this.internal.dispatchEvent("mouseout",0),this.internal.config.tooltip_onhide.call(this)};var A;i.isSafari=function(){var b=a.navigator.userAgent;return b.indexOf("Safari")>=0&&b.indexOf("Chrome")<0},i.isChrome=function(){var b=a.navigator.userAgent;return b.indexOf("Chrome")>=0},Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),function(){"SVGPathSeg"in a||(a.SVGPathSeg=function(a,b,c){this.pathSegType=a,this.pathSegTypeAsLetter=b,this._owningPathSegList=c},SVGPathSeg.PATHSEG_UNKNOWN=0,SVGPathSeg.PATHSEG_CLOSEPATH=1,SVGPathSeg.PATHSEG_MOVETO_ABS=2,SVGPathSeg.PATHSEG_MOVETO_REL=3,SVGPathSeg.PATHSEG_LINETO_ABS=4,SVGPathSeg.PATHSEG_LINETO_REL=5,SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,SVGPathSeg.PATHSEG_ARC_ABS=10,SVGPathSeg.PATHSEG_ARC_REL=11,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},a.SVGPathSegClosePath=function(a){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CLOSEPATH,"z",a)},SVGPathSegClosePath.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},SVGPathSegClosePath.prototype.clone=function(){return new SVGPathSegClosePath(void 0)},a.SVGPathSegMovetoAbs=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_MOVETO_ABS,"M",a),this._x=b,this._y=c},SVGPathSegMovetoAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegMovetoAbs.prototype.clone=function(){return new SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegMovetoRel=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_MOVETO_REL,"m",a),this._x=b,this._y=c},SVGPathSegMovetoRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegMovetoRel.prototype.clone=function(){return new SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoAbs=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_ABS,"L",a),this._x=b,this._y=c},SVGPathSegLinetoAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegLinetoAbs.prototype.clone=function(){return new SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoRel=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_REL,"l",a),this._x=b,this._y=c},SVGPathSegLinetoRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegLinetoRel.prototype.clone=function(){return new SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicAbs=function(a,b,c,d,e,f,g){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",a),this._x=b,this._y=c,this._x1=d,this._y1=e,this._x2=f,this._y2=g},SVGPathSegCurvetoCubicAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicRel=function(a,b,c,d,e,f,g){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",a),this._x=b,this._y=c,this._x1=d,this._y1=e,this._x2=f,this._y2=g},SVGPathSegCurvetoCubicRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticAbs=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",a),this._x=b,this._y=c,this._x1=d,this._y1=e},SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticRel=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",a),this._x=b,this._y=c,this._x1=d,this._y1=e},SVGPathSegCurvetoQuadraticRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(a){this._x1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(a){this._y1=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegArcAbs=function(a,b,c,d,e,f,g,h){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_ARC_ABS,"A",a),this._x=b,this._y=c,this._r1=d,this._r2=e,this._angle=f,this._largeArcFlag=g,this._sweepFlag=h},SVGPathSegArcAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},SVGPathSegArcAbs.prototype.clone=function(){return new SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(a){this._r1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(a){this._r2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(a){this._angle=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(a){this._largeArcFlag=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(a){this._sweepFlag=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegArcRel=function(a,b,c,d,e,f,g,h){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_ARC_REL,"a",a),this._x=b,this._y=c,this._r1=d,this._r2=e,this._angle=f,this._largeArcFlag=g,this._sweepFlag=h},SVGPathSegArcRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._r1+" "+this._r2+" "+this._angle+" "+(this._largeArcFlag?"1":"0")+" "+(this._sweepFlag?"1":"0")+" "+this._x+" "+this._y},SVGPathSegArcRel.prototype.clone=function(){return new SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(a){this._r1=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(a){this._r2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(a){this._angle=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(a){this._largeArcFlag=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(a){this._sweepFlag=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoHorizontalAbs=function(a,b){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",a),this._x=b},SVGPathSegLinetoHorizontalAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoHorizontalRel=function(a,b){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",a),this._x=b},SVGPathSegLinetoHorizontalRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x},SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoVerticalAbs=function(a,b){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",a),this._y=b},SVGPathSegLinetoVerticalAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegLinetoVerticalRel=function(a,b){
2357 9881 SVGPathSeg.call(this,SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",a),this._y=b},SVGPathSegLinetoVerticalRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._y},SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicSmoothAbs=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",a),this._x=b,this._y=c,this._x2=d,this._y2=e},SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoCubicSmoothRel=function(a,b,c,d,e){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",a),this._x=b,this._y=c,this._x2=d,this._y2=e},SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(a){this._x2=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(a){this._y2=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticSmoothAbs=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",a),this._x=b,this._y=c},SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),a.SVGPathSegCurvetoQuadraticSmoothRel=function(a,b,c){SVGPathSeg.call(this,SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",a),this._x=b,this._y=c},SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(SVGPathSeg.prototype),SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(a){this._x=a,this._segmentChanged()},enumerable:!0}),Object.defineProperty(SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(a){this._y=a,this._segmentChanged()},enumerable:!0}),SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new SVGPathSegClosePath(void 0)},SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(a,b){return new SVGPathSegMovetoAbs(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegMovetoRel=function(a,b){return new SVGPathSegMovetoRel(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(a,b){return new SVGPathSegLinetoAbs(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegLinetoRel=function(a,b){return new SVGPathSegLinetoRel(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(a,b,c,d,e,f){return new SVGPathSegCurvetoCubicAbs(void 0,a,b,c,d,e,f)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(a,b,c,d,e,f){return new SVGPathSegCurvetoCubicRel(void 0,a,b,c,d,e,f)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(a,b,c,d){return new SVGPathSegCurvetoQuadraticAbs(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(a,b,c,d){return new SVGPathSegCurvetoQuadraticRel(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegArcAbs=function(a,b,c,d,e,f,g){return new SVGPathSegArcAbs(void 0,a,b,c,d,e,f,g)},SVGPathElement.prototype.createSVGPathSegArcRel=function(a,b,c,d,e,f,g){return new SVGPathSegArcRel(void 0,a,b,c,d,e,f,g)},SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(a){return new SVGPathSegLinetoHorizontalAbs(void 0,a)},SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(a){return new SVGPathSegLinetoHorizontalRel(void 0,a)},SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(a){return new SVGPathSegLinetoVerticalAbs(void 0,a)},SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(a){return new SVGPathSegLinetoVerticalRel(void 0,a)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(a,b,c,d){return new SVGPathSegCurvetoCubicSmoothAbs(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(a,b,c,d){return new SVGPathSegCurvetoCubicSmoothRel(void 0,a,b,c,d)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(a,b){return new SVGPathSegCurvetoQuadraticSmoothAbs(void 0,a,b)},SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(a,b){return new SVGPathSegCurvetoQuadraticSmoothRel(void 0,a,b)}),"SVGPathSegList"in a||(a.SVGPathSegList=function(a){this._pathElement=a,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},Object.defineProperty(SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},SVGPathSegList.prototype._updateListFromPathMutations=function(a){if(this._pathElement){var b=!1;a.forEach(function(a){"d"==a.attributeName&&(b=!0)}),b&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))}},SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},SVGPathSegList.prototype.segmentChanged=function(a){this._writeListToPath()},SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(a){a._owningPathSegList=null}),this._list=[],this._writeListToPath()},SVGPathSegList.prototype.initialize=function(a){return this._checkPathSynchronizedToList(),this._list=[a],a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList.prototype._checkValidIndex=function(a){if(isNaN(a)||0>a||a>=this.numberOfItems)throw"INDEX_SIZE_ERR"},SVGPathSegList.prototype.getItem=function(a){return this._checkPathSynchronizedToList(),this._checkValidIndex(a),this._list[a]},SVGPathSegList.prototype.insertItemBefore=function(a,b){return this._checkPathSynchronizedToList(),b>this.numberOfItems&&(b=this.numberOfItems),a._owningPathSegList&&(a=a.clone()),this._list.splice(b,0,a),a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList.prototype.replaceItem=function(a,b){return this._checkPathSynchronizedToList(),a._owningPathSegList&&(a=a.clone()),this._checkValidIndex(b),this._list[b]=a,a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList.prototype.removeItem=function(a){this._checkPathSynchronizedToList(),this._checkValidIndex(a);var b=this._list[a];return this._list.splice(a,1),this._writeListToPath(),b},SVGPathSegList.prototype.appendItem=function(a){return this._checkPathSynchronizedToList(),a._owningPathSegList&&(a=a.clone()),this._list.push(a),a._owningPathSegList=this,this._writeListToPath(),a},SVGPathSegList._pathSegArrayAsString=function(a){var b="",c=!0;return a.forEach(function(a){c?(c=!1,b+=a._asPathString()):b+=" "+a._asPathString()}),b},SVGPathSegList.prototype._parsePath=function(a){if(!a||0==a.length)return[];var b=this,c=function(){this.pathSegList=[]};c.prototype.appendSegment=function(a){this.pathSegList.push(a)};var d=function(a){this._string=a,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};d.prototype._isCurrentSpace=function(){var a=this._string[this._currentIndex];return" ">=a&&(" "==a||"\n"==a||" "==a||"\r"==a||"\f"==a)},d.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},d.prototype._skipOptionalSpacesOrDelimiter=function(){return this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex)?!1:(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},d.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},d.prototype.peekSegmentType=function(){var a=this._string[this._currentIndex];return this._pathSegTypeFromChar(a)},d.prototype._pathSegTypeFromChar=function(a){switch(a){case"Z":case"z":return SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return SVGPathSeg.PATHSEG_LINETO_REL;case"C":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return SVGPathSeg.PATHSEG_ARC_ABS;case"a":return SVGPathSeg.PATHSEG_ARC_REL;case"H":return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return SVGPathSeg.PATHSEG_UNKNOWN}},d.prototype._nextCommandHelper=function(a,b){return("+"==a||"-"==a||"."==a||a>="0"&&"9">=a)&&b!=SVGPathSeg.PATHSEG_CLOSEPATH?b==SVGPathSeg.PATHSEG_MOVETO_ABS?SVGPathSeg.PATHSEG_LINETO_ABS:b==SVGPathSeg.PATHSEG_MOVETO_REL?SVGPathSeg.PATHSEG_LINETO_REL:b:SVGPathSeg.PATHSEG_UNKNOWN},d.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var a=this.peekSegmentType();return a==SVGPathSeg.PATHSEG_MOVETO_ABS||a==SVGPathSeg.PATHSEG_MOVETO_REL},d.prototype._parseNumber=function(){var a=0,b=0,c=1,d=0,e=1,f=1,g=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,e=-1),!(this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))){for(var h=this._currentIndex;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=h)for(var i=this._currentIndex-1,j=1;i>=h;)b+=j*(this._string.charAt(i--)-"0"),j*=10;if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)d+=(this._string.charAt(this._currentIndex++)-"0")*(c*=.1)}if(this._currentIndex!=g&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,f=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)a*=10,a+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}var k=b+d;if(k*=e,a&&(k*=Math.pow(10,f*a)),g!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),k}},d.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var a=!1,b=this._string.charAt(this._currentIndex++);if("0"==b)a=!1;else{if("1"!=b)return;a=!0}return this._skipOptionalSpacesOrDelimiter(),a}},d.prototype.parseSegment=function(){var a=this._string[this._currentIndex],c=this._pathSegTypeFromChar(a);if(c==SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==SVGPathSeg.PATHSEG_UNKNOWN)return null;if(c=this._nextCommandHelper(a,this._previousCommand),c==SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=c,c){case SVGPathSeg.PATHSEG_MOVETO_REL:return new SVGPathSegMovetoRel(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_MOVETO_ABS:return new SVGPathSegMovetoAbs(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_REL:return new SVGPathSegLinetoRel(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_ABS:return new SVGPathSegLinetoAbs(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new SVGPathSegLinetoHorizontalRel(b,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new SVGPathSegLinetoHorizontalAbs(b,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new SVGPathSegLinetoVerticalRel(b,this._parseNumber());case SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new SVGPathSegLinetoVerticalAbs(b,this._parseNumber());case SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new SVGPathSegClosePath(b);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var d={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicRel(b,d.x,d.y,d.x1,d.y1,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:var d={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicAbs(b,d.x,d.y,d.x1,d.y1,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:var d={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothRel(b,d.x,d.y,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:var d={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoCubicSmoothAbs(b,d.x,d.y,d.x2,d.y2);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:var d={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticRel(b,d.x,d.y,d.x1,d.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:var d={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegCurvetoQuadraticAbs(b,d.x,d.y,d.x1,d.y1);case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new SVGPathSegCurvetoQuadraticSmoothRel(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new SVGPathSegCurvetoQuadraticSmoothAbs(b,this._parseNumber(),this._parseNumber());case SVGPathSeg.PATHSEG_ARC_REL:var d={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcRel(b,d.x,d.y,d.x1,d.y1,d.arcAngle,d.arcLarge,d.arcSweep);case SVGPathSeg.PATHSEG_ARC_ABS:var d={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()};return new SVGPathSegArcAbs(b,d.x,d.y,d.x1,d.y1,d.arcAngle,d.arcLarge,d.arcSweep);default:throw"Unknown path seg type."}};var e=new c,f=new d(a);if(!f.initialCommandIsMoveTo())return[];for(;f.hasMoreData();){var g=f.parseSegment();if(!g)return[];e.appendSegment(g)}return e.pathSegList})}(),"function"==typeof define&&define.amd?define("c3",["d3"],function(){return k}):"undefined"!=typeof exports&&"undefined"!=typeof module?module.exports=k:a.c3=k}(window);
2358 9882 ;/**
2359 9883 * @version 2.1.8
2360 9884 * @license MIT
2361 9885 */
2362 9886 !function(t,e){"use strict";t.module("smart-table",[]).run(["$templateCache",function(t){t.put("template/smart-table/pagination.html",'<nav ng-if="numPages && pages.length >= 2"><ul class="pagination"><li ng-repeat="page in pages" ng-class="{active: page==currentPage}"><a href="javascript: void(0);" ng-click="selectPage(page)">{{page}}</a></li></ul></nav>')}]),t.module("smart-table").constant("stConfig",{pagination:{template:"template/smart-table/pagination.html",itemsByPage:10,displayedPages:5},search:{delay:400,inputEvent:"input"},select:{mode:"single",selectedClass:"st-selected"},sort:{ascentClass:"st-sort-ascent",descentClass:"st-sort-descent",descendingFirst:!1,skipNatural:!1,delay:300},pipe:{delay:100}}),t.module("smart-table").controller("stTableController",["$scope","$parse","$filter","$attrs",function(a,n,s,i){function r(t){return t?[].concat(t):[]}function l(){b=r(o(a)),v===!0&&S.pipe()}function c(t,e){if(-1!=e.indexOf(".")){var a=e.split("."),s=a.pop(),i=a.join("."),r=n(i)(t);delete r[s],0==Object.keys(r).length&&c(t,i)}else delete t[e]}var o,u,p,g=i.stTable,d=n(g),f=d.assign,m=s("orderBy"),h=s("filter"),b=r(d(a)),P={sort:{},search:{},pagination:{start:0,totalItemCount:0}},v=!0,S=this;i.stSafeSrc&&(o=n(i.stSafeSrc),a.$watch(function(){var t=o(a);return t&&t.length?t[0]:e},function(t,e){t!==e&&l()}),a.$watch(function(){var t=o(a);return t?t.length:0},function(t){t!==b.length&&l()}),a.$watch(function(){return o(a)},function(t,e){t!==e&&(P.pagination.start=0,l())})),this.sortBy=function(e,a){return P.sort.predicate=e,P.sort.reverse=a===!0,t.isFunction(e)?P.sort.functionName=e.name:delete P.sort.functionName,P.pagination.start=0,this.pipe()},this.search=function(e,a){var s=P.search.predicateObject||{},i=a?a:"$";return e=t.isString(e)?e.trim():e,n(i).assign(s,e),e||c(s,i),P.search.predicateObject=s,P.pagination.start=0,this.pipe()},this.pipe=function(){var t,n=P.pagination;u=P.search.predicateObject?h(b,P.search.predicateObject):b,P.sort.predicate&&(u=m(u,P.sort.predicate,P.sort.reverse)),n.totalItemCount=u.length,n.number!==e&&(n.numberOfPages=u.length>0?Math.ceil(u.length/n.number):1,n.start=n.start>=u.length?(n.numberOfPages-1)*n.number:n.start,t=u.slice(n.start,n.start+parseInt(n.number))),f(a,t||u)},this.select=function(t,n){var s=r(d(a)),i=s.indexOf(t);-1!==i&&("single"===n?(t.isSelected=t.isSelected!==!0,p&&(p.isSelected=!1),p=t.isSelected===!0?t:e):s[i].isSelected=!s[i].isSelected)},this.slice=function(t,e){return P.pagination.start=t,P.pagination.number=e,this.pipe()},this.tableState=function(){return P},this.getFilteredCollection=function(){return u||b},this.setFilterFunction=function(t){h=s(t)},this.setSortFunction=function(t){m=s(t)},this.preventPipeOnWatch=function(){v=!1}}]).directive("stTable",function(){return{restrict:"A",controller:"stTableController",link:function(t,e,a,n){a.stSetFilter&&n.setFilterFunction(a.stSetFilter),a.stSetSort&&n.setSortFunction(a.stSetSort)}}}),t.module("smart-table").directive("stSearch",["stConfig","$timeout","$parse",function(t,e,a){return{require:"^stTable",link:function(n,s,i,r){var l=r,c=null,o=i.stDelay||t.search.delay,u=i.stInputEvent||t.search.inputEvent;i.$observe("stSearch",function(t,e){var a=s[0].value;t!==e&&a&&(r.tableState().search={},l.search(a,t))}),n.$watch(function(){return r.tableState().search},function(t){var e=i.stSearch||"$";t.predicateObject&&a(e)(t.predicateObject)!==s[0].value&&(s[0].value=a(e)(t.predicateObject)||"")},!0),s.bind(u,function(t){t=t.originalEvent||t,null!==c&&e.cancel(c),c=e(function(){l.search(t.target.value,i.stSearch||""),c=null},o)})}}}]),t.module("smart-table").directive("stSelectRow",["stConfig",function(t){return{restrict:"A",require:"^stTable",scope:{row:"=stSelectRow"},link:function(e,a,n,s){var i=n.stSelectMode||t.select.mode;a.bind("click",function(){e.$apply(function(){s.select(e.row,i)})}),e.$watch("row.isSelected",function(e){e===!0?a.addClass(t.select.selectedClass):a.removeClass(t.select.selectedClass)})}}}]),t.module("smart-table").directive("stSort",["stConfig","$parse","$timeout",function(a,n,s){return{restrict:"A",require:"^stTable",link:function(i,r,l,c){function o(){P?d=0===d?2:d-1:d++;var e;p=t.isFunction(g(i))||t.isArray(g(i))?g(i):l.stSort,d%3===0&&!!b!=!0?(d=0,c.tableState().sort={},c.tableState().pagination.start=0,e=c.pipe.bind(c)):e=c.sortBy.bind(c,p,d%2===0),null!==v&&s.cancel(v),0>S?e():v=s(e,S)}var u,p=l.stSort,g=n(p),d=0,f=l.stClassAscent||a.sort.ascentClass,m=l.stClassDescent||a.sort.descentClass,h=[f,m],b=l.stSkipNatural!==e?l.stSkipNatural:a.sort.skipNatural,P=l.stDescendingFirst!==e?l.stDescendingFirst:a.sort.descendingFirst,v=null,S=l.stDelay||a.sort.delay;l.stSortDefault&&(u=i.$eval(l.stSortDefault)!==e?i.$eval(l.stSortDefault):l.stSortDefault),r.bind("click",function(){p&&i.$apply(o)}),u&&(d="reverse"===u?1:0,o()),i.$watch(function(){return c.tableState().sort},function(t){t.predicate!==p?(d=0,r.removeClass(f).removeClass(m)):(d=t.reverse===!0?2:1,r.removeClass(h[d%2]).addClass(h[d-1]))},!0)}}}]),t.module("smart-table").directive("stPagination",["stConfig",function(t){return{restrict:"EA",require:"^stTable",scope:{stItemsByPage:"=?",stDisplayedPages:"=?",stPageChange:"&"},templateUrl:function(e,a){return a.stTemplate?a.stTemplate:t.pagination.template},link:function(e,a,n,s){function i(){var t,a,n=s.tableState().pagination,i=1,r=e.currentPage;for(e.totalItemCount=n.totalItemCount,e.currentPage=Math.floor(n.start/n.number)+1,i=Math.max(i,e.currentPage-Math.abs(Math.floor(e.stDisplayedPages/2))),t=i+e.stDisplayedPages,t>n.numberOfPages&&(t=n.numberOfPages+1,i=Math.max(1,t-e.stDisplayedPages)),e.pages=[],e.numPages=n.numberOfPages,a=i;t>a;a++)e.pages.push(a);r!==e.currentPage&&e.stPageChange({newPage:e.currentPage})}e.stItemsByPage=e.stItemsByPage?+e.stItemsByPage:t.pagination.itemsByPage,e.stDisplayedPages=e.stDisplayedPages?+e.stDisplayedPages:t.pagination.displayedPages,e.currentPage=1,e.pages=[],e.$watch(function(){return s.tableState().pagination},i,!0),e.$watch("stItemsByPage",function(t,a){t!==a&&e.selectPage(1)}),e.$watch("stDisplayedPages",i),e.selectPage=function(t){t>0&&t<=e.numPages&&s.slice((t-1)*e.stItemsByPage,e.stItemsByPage)},s.tableState().pagination.number||s.slice(0,e.stItemsByPage)}}}]),t.module("smart-table").directive("stPipe",["stConfig","$timeout",function(e,a){return{require:"stTable",scope:{stPipe:"="},link:{pre:function(n,s,i,r){var l=null;t.isFunction(n.stPipe)&&(r.preventPipeOnWatch(),r.pipe=function(){return null!==l&&a.cancel(l),l=a(function(){n.stPipe(r.tableState(),r)},e.pipe.delay)})},post:function(t,e,a,n){n.pipe()}}}}])}(angular);
2363 9887 //# sourceMappingURL=smart-table.min.js.map
2364 9888
2365 ;"use strict";angular.module("mentio",[]).directive("mentio",["mentioUtil","$document","$compile","$log","$timeout",function(e,t,n,r,i){return{restrict:"A",scope:{macros:"=mentioMacros",search:"&mentioSearch",select:"&mentioSelect",items:"=mentioItems",typedTerm:"=mentioTypedTerm",altId:"=mentioId",iframeElement:"=mentioIframeElement",requireLeadingSpace:"=mentioRequireLeadingSpace",selectNotFound:"=mentioSelectNotFound",trimTerm:"=mentioTrimTerm",ngModel:"="},controller:["$scope","$timeout","$attrs",function(n,r,i){n.query=function(e,t){var r=n.triggerCharMap[e];(void 0===n.trimTerm||n.trimTerm)&&(t=t.trim()),r.showMenu(),r.search({term:t}),r.typedTerm=t},n.defaultSearch=function(e){var t=[];angular.forEach(n.items,function(n){n.label.toUpperCase().indexOf(e.term.toUpperCase())>=0&&t.push(n)}),n.localItems=t},n.bridgeSearch=function(e){var t=i.mentioSearch?n.search:n.defaultSearch;t({term:e})},n.defaultSelect=function(e){return n.defaultTriggerChar+e.item.label},n.bridgeSelect=function(e){var t=i.mentioSelect?n.select:n.defaultSelect;return t({item:e})},n.setTriggerText=function(e){n.syncTriggerText&&(n.typedTerm=void 0===n.trimTerm||n.trimTerm?e.trim():e)},n.context=function(){return n.iframeElement?{iframe:n.iframeElement}:void 0},n.replaceText=function(t,i){if(n.hideAll(),e.replaceTriggerText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.triggerCharSet,t,n.requireLeadingSpace,i),!i&&(n.setTriggerText(""),angular.element(n.targetElement).triggerHandler("change"),n.isContentEditable())){n.contentEditableMenuPasted=!0;var o=r(function(){n.contentEditableMenuPasted=!1},200);n.$on("$destroy",function(){r.cancel(o)})}},n.hideAll=function(){for(var e in n.triggerCharMap)n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].hideMenu()},n.getActiveMenuScope=function(){for(var e in n.triggerCharMap)if(n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible)return n.triggerCharMap[e];return null},n.selectActive=function(){for(var e in n.triggerCharMap)n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible&&n.triggerCharMap[e].selectActive()},n.isActive=function(){for(var e in n.triggerCharMap)if(n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible)return!0;return!1},n.isContentEditable=function(){return"INPUT"!==n.targetElement.nodeName&&"TEXTAREA"!==n.targetElement.nodeName},n.replaceMacro=function(t,i){i?e.replaceMacroText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.macros,n.macros[t]):(n.replacingMacro=!0,n.timer=r(function(){e.replaceMacroText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.macros,n.macros[t]),angular.element(n.targetElement).triggerHandler("change"),n.replacingMacro=!1},300),n.$on("$destroy",function(){r.cancel(n.timer)}))},n.addMenu=function(e){e.parentScope&&n.triggerCharMap.hasOwnProperty(e.triggerChar)||(n.triggerCharMap[e.triggerChar]=e,void 0===n.triggerCharSet&&(n.triggerCharSet=[]),n.triggerCharSet.push(e.triggerChar),e.setParent(n))},n.$on("menuCreated",function(e,t){(void 0!==i.id||void 0!==i.mentioId)&&(i.id===t.targetElement||void 0!==i.mentioId&&n.altId===t.targetElement)&&n.addMenu(t.scope)}),t.on("click",function(){n.isActive()&&n.$apply(function(){n.hideAll()})}),t.on("keydown keypress paste",function(e){var t=n.getActiveMenuScope();t&&((9===e.which||13===e.which)&&(e.preventDefault(),t.selectActive()),27===e.which&&(e.preventDefault(),t.$apply(function(){t.hideMenu()})),40===e.which&&(e.preventDefault(),t.$apply(function(){t.activateNextItem()}),t.adjustScroll(1)),38===e.which&&(e.preventDefault(),t.$apply(function(){t.activatePreviousItem()}),t.adjustScroll(-1)),(37===e.which||39===e.which)&&e.preventDefault())})}],link:function(t,o,a){function c(e){function n(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}var r=t.getActiveMenuScope();if(r){if(9===e.which||13===e.which)return n(e),r.selectActive(),!1;if(27===e.which)return n(e),r.$apply(function(){r.hideMenu()}),!1;if(40===e.which)return n(e),r.$apply(function(){r.activateNextItem()}),r.adjustScroll(1),!1;if(38===e.which)return n(e),r.$apply(function(){r.activatePreviousItem()}),r.adjustScroll(-1),!1;if(37===e.which||39===e.which)return n(e),!1}}if(t.triggerCharMap={},t.targetElement=o,a.$set("autocomplete","off"),a.mentioItems){t.localItems=[],t.parentScope=t;var l=a.mentioSearch?' mentio-items="items"':' mentio-items="localItems"';t.defaultTriggerChar=a.mentioTriggerChar?t.$eval(a.mentioTriggerChar):"@";var s='<mentio-menu mentio-search="bridgeSearch(term)" mentio-select="bridgeSelect(item)"'+l;a.mentioTemplateUrl&&(s=s+' mentio-template-url="'+a.mentioTemplateUrl+'"'),s=s+" mentio-trigger-char=\"'"+t.defaultTriggerChar+'\'" mentio-parent-scope="parentScope"/>';var m=n(s),u=m(t);o.parent().append(u),t.$on("$destroy",function(){u.remove()})}a.mentioTypedTerm&&(t.syncTriggerText=!0),t.$watch("iframeElement",function(e){if(e){var n=e.contentWindow.document;n.addEventListener("click",function(){t.isActive()&&t.$apply(function(){t.hideAll()})}),n.addEventListener("keydown",c,!0),t.$on("$destroy",function(){n.removeEventListener("keydown",c)})}}),t.$watch("ngModel",function(n){if(n&&""!==n||t.isActive()){if(void 0===t.triggerCharSet)return void r.error("Error, no mentio-items attribute was provided, and no separate mentio-menus were specified. Nothing to do.");if(t.contentEditableMenuPasted)return void(t.contentEditableMenuPasted=!1);t.replacingMacro&&(i.cancel(t.timer),t.replacingMacro=!1);var o=t.isActive(),a=t.isContentEditable(),c=e.getTriggerInfo(t.context(),t.triggerCharSet,t.requireLeadingSpace,o);if(void 0!==c&&(!o||o&&(a&&c.mentionTriggerChar===t.currentMentionTriggerChar||!a&&c.mentionPosition===t.currentMentionPosition)))c.mentionSelectedElement&&(t.targetElement=c.mentionSelectedElement,t.targetElementPath=c.mentionSelectedPath,t.targetElementSelectedOffset=c.mentionSelectedOffset),t.setTriggerText(c.mentionText),t.currentMentionPosition=c.mentionPosition,t.currentMentionTriggerChar=c.mentionTriggerChar,t.query(c.mentionTriggerChar,c.mentionText);else{var l=t.typedTerm;t.setTriggerText(""),t.hideAll();var s=e.getMacroMatch(t.context(),t.macros);if(void 0!==s)t.targetElement=s.macroSelectedElement,t.targetElementPath=s.macroSelectedPath,t.targetElementSelectedOffset=s.macroSelectedOffset,t.replaceMacro(s.macroText,s.macroHasTrailingSpace);else if(t.selectNotFound&&l&&""!==l){var m=t.triggerCharMap[t.currentMentionTriggerChar];if(m){var u=m.select({item:{label:l}});"function"==typeof u.then?u.then(t.replaceText):t.replaceText(u,!0)}}}}})}}}]).directive("mentioMenu",["mentioUtil","$rootScope","$log","$window","$document",function(e,t,n,r,i){return{restrict:"E",scope:{search:"&mentioSearch",select:"&mentioSelect",items:"=mentioItems",triggerChar:"=mentioTriggerChar",forElem:"=mentioFor",parentScope:"=mentioParentScope"},templateUrl:function(e,t){return void 0!==t.mentioTemplateUrl?t.mentioTemplateUrl:"mentio-menu.tpl.html"},controller:["$scope",function(e){e.visible=!1,this.activate=e.activate=function(t){e.activeItem=t},this.isActive=e.isActive=function(t){return e.activeItem===t},this.selectItem=e.selectItem=function(t){var n=e.select({item:t});"function"==typeof n.then?n.then(e.parentMentio.replaceText):e.parentMentio.replaceText(n)},e.activateNextItem=function(){var t=e.items.indexOf(e.activeItem);this.activate(e.items[(t+1)%e.items.length])},e.activatePreviousItem=function(){var t=e.items.indexOf(e.activeItem);this.activate(e.items[0===t?e.items.length-1:t-1])},e.isFirstItemActive=function(){var t=e.items.indexOf(e.activeItem);return 0===t},e.isLastItemActive=function(){var t=e.items.indexOf(e.activeItem);return t===e.items.length-1},e.selectActive=function(){e.selectItem(e.activeItem)},e.isVisible=function(){return e.visible},e.showMenu=function(){e.visible||(e.requestVisiblePendingSearch=!0)},e.setParent=function(t){e.parentMentio=t,e.targetElement=t.targetElement}}],link:function(o,a){if(a[0].parentNode.removeChild(a[0]),i[0].body.appendChild(a[0]),o.menuElement=a,o.parentScope)o.parentScope.addMenu(o);else{if(!o.forElem)return void n.error("mentio-menu requires a target element in tbe mentio-for attribute");if(!o.triggerChar)return void n.error("mentio-menu requires a trigger char");t.$broadcast("menuCreated",{targetElement:o.forElem,scope:o})}angular.element(r).bind("resize",function(){if(o.isVisible()){var t=[];t.push(o.triggerChar),e.popUnderMention(o.parentMentio.context(),t,a,o.requireLeadingSpace)}}),o.$watch("items",function(e){e&&e.length>0?(o.activate(e[0]),!o.visible&&o.requestVisiblePendingSearch&&(o.visible=!0,o.requestVisiblePendingSearch=!1)):o.hideMenu()}),o.$watch("isVisible()",function(t){if(t){var n=[];n.push(o.triggerChar),e.popUnderMention(o.parentMentio.context(),n,a,o.requireLeadingSpace)}}),o.parentMentio.$on("$destroy",function(){a.remove()}),o.hideMenu=function(){o.visible=!1,a.css("display","none")},o.adjustScroll=function(e){var t=a[0],n=t.querySelector("ul"),r=t.querySelector("[mentio-menu-item].active")||t.querySelector("[data-mentio-menu-item].active");return o.isFirstItemActive()?n.scrollTop=0:o.isLastItemActive()?n.scrollTop=n.scrollHeight:void(1===e?n.scrollTop+=r.offsetHeight:n.scrollTop-=r.offsetHeight)}}}}]).directive("mentioMenuItem",function(){return{restrict:"A",scope:{item:"=mentioMenuItem"},require:"^mentioMenu",link:function(e,t,n,r){e.$watch(function(){return r.isActive(e.item)},function(e){e?t.addClass("active"):t.removeClass("active")}),t.bind("mouseenter",function(){e.$apply(function(){r.activate(e.item)})}),t.bind("click",function(){return r.selectItem(e.item),!1})}}}).filter("unsafe",["$sce",function(e){return function(t){return e.trustAsHtml(t)}}]).filter("mentioHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n,r){if(n){var i=r?'<span class="'+r+'">$&</span>':"<strong>$&</strong>";return(""+t).replace(new RegExp(e(n),"gi"),i)}return t}}),angular.module("mentio").factory("mentioUtil",["$window","$location","$anchorScroll","$timeout",function(e,t,n,r){function i(e,t,n,i){var c,l=h(e,t,i,!1);void 0!==l?(c=a(e)?b(e,v(e).activeElement,l.mentionPosition):S(e,l.mentionPosition),n.css({top:c.top+"px",left:c.left+"px",position:"absolute",zIndex:1e4,display:"block"}),r(function(){o(e,n)},0)):n.css({display:"none"})}function o(t,n){for(var r,i=20,o=100,a=n[0];void 0===r||0===r.height;)if(r=a.getBoundingClientRect(),0===r.height&&(a=a.childNodes[0],void 0===a||!a.getBoundingClientRect))return;var c=r.top,l=c+r.height;if(0>c)e.scrollTo(0,e.pageYOffset+r.top-i);else if(l>e.innerHeight){var s=e.pageYOffset+r.top-i;s-e.pageYOffset>o&&(s=e.pageYOffset+o);var m=e.pageYOffset-(e.innerHeight-l);m>s&&(m=s),e.scrollTo(0,m)}}function a(e){var t=v(e).activeElement;if(null!==t){var n=t.nodeName,r=t.getAttribute("type");return"INPUT"===n&&"text"===r||"TEXTAREA"===n}return!1}function c(e,t,n,r){var i,o=t;if(n)for(var a=0;a<n.length;a++){if(o=o.childNodes[n[a]],void 0===o)return;for(;o.length<r;)r-=o.length,o=o.nextSibling;0!==o.childNodes.length||o.length||(o=o.previousSibling)}var c=p(e);i=v(e).createRange(),i.setStart(o,r),i.setEnd(o,r),i.collapse(!0);try{c.removeAllRanges()}catch(l){}c.addRange(i),t.focus()}function l(e,t,n,r){var i,o;o=p(e),i=v(e).createRange(),i.setStart(o.anchorNode,n),i.setEnd(o.anchorNode,r),i.deleteContents();var a=v(e).createElement("div");a.innerHTML=t;for(var c,l,s=v(e).createDocumentFragment();c=a.firstChild;)l=s.appendChild(c);i.insertNode(s),l&&(i=i.cloneRange(),i.setStartAfter(l),i.collapse(!0),o.removeAllRanges(),o.addRange(i))}function s(e,t,n,r){var i=t.nodeName;"INPUT"===i||"TEXTAREA"===i?t!==v(e).activeElement&&t.focus():c(e,t,n,r)}function m(e,t,n,r,i,o){s(e,t,n,r);var c=d(e,i);if(c.macroHasTrailingSpace&&(c.macroText=c.macroText+"Β ",o+="Β "),void 0!==c){var m=v(e).activeElement;if(a(e)){var u=c.macroPosition,g=c.macroPosition+c.macroText.length;m.value=m.value.substring(0,u)+o+m.value.substring(g,m.value.length),m.selectionStart=u+o.length,m.selectionEnd=u+o.length}else l(e,o,c.macroPosition,c.macroPosition+c.macroText.length)}}function u(e,t,n,r,i,o,c,m){s(e,t,n,r);var u=h(e,i,c,!0,m);if(void 0!==u)if(a()){var g=v(e).activeElement;o+=" ";var d=u.mentionPosition,f=u.mentionPosition+u.mentionText.length+1;g.value=g.value.substring(0,d)+o+g.value.substring(f,g.value.length),g.selectionStart=d+o.length,g.selectionEnd=d+o.length}else o+="Β ",l(e,o,u.mentionPosition,u.mentionPosition+u.mentionText.length+1)}function g(e,t){if(null===t.parentNode)return 0;for(var n=0;n<t.parentNode.childNodes.length;n++){var r=t.parentNode.childNodes[n];if(r===t)return n}}function d(e,t){var n,r,i=[];if(a(e))n=v(e).activeElement;else{var o=f(e);o&&(n=o.selected,i=o.path,r=o.offset)}var c=T(e);if(void 0!==c&&null!==c){var l,s=!1;if(c.length>0&&("Β "===c.charAt(c.length-1)||" "===c.charAt(c.length-1))&&(s=!0,c=c.substring(0,c.length-1)),angular.forEach(t,function(e,t){var o=c.toUpperCase().lastIndexOf(t.toUpperCase());if(o>=0&&t.length+o===c.length){var a=o-1;(0===o||"Β "===c.charAt(a)||" "===c.charAt(a))&&(l={macroPosition:o,macroText:t,macroSelectedElement:n,macroSelectedPath:i,macroSelectedOffset:r,macroHasTrailingSpace:s})}}),l)return l}}function f(e){var t,n=p(e),r=n.anchorNode,i=[];if(null!=r){for(var o,a=r.contentEditable;null!==r&&"true"!==a;)o=g(e,r),i.push(o),r=r.parentNode,null!==r&&(a=r.contentEditable);return i.reverse(),t=n.getRangeAt(0).startOffset,{selected:r,path:i,offset:t}}}function h(e,t,n,r,i){var o,c,l;if(a(e))o=v(e).activeElement;else{var s=f(e);s&&(o=s.selected,c=s.path,l=s.offset)}var m=T(e);if(void 0!==m&&null!==m){var u,g=-1;if(t.forEach(function(e){var t=m.lastIndexOf(e);t>g&&(g=t,u=e)}),g>=0&&(0===g||!n||/[\xA0\s]/g.test(m.substring(g-1,g)))){var d=m.substring(g+1,m.length);u=m.substring(g,g+1);var h=d.substring(0,1),p=d.length>0&&(" "===h||"Β "===h);if(i&&(d=d.trim()),!p&&(r||!/[\xA0\s]/g.test(d)))return{mentionPosition:g,mentionText:d,mentionSelectedElement:o,mentionSelectedPath:c,mentionSelectedOffset:l,mentionTriggerChar:u}}}}function p(e){return e?e.iframe.contentWindow.getSelection():window.getSelection()}function v(e){return e?e.iframe.contentWindow.document:document}function T(e){var t;if(a(e)){var n=v(e).activeElement,r=n.selectionStart;t=n.value.substring(0,r)}else{var i=p(e).anchorNode;if(null!=i){var o=i.textContent,c=p(e).getRangeAt(0).startOffset;c>=0&&(t=o.substring(0,c))}}return t}function S(e,t){var n,r,i="ο»Ώ",o="sel_"+(new Date).getTime()+"_"+Math.random().toString().substr(2),a=p(e),c=a.getRangeAt(0);r=v(e).createRange(),r.setStart(a.anchorNode,t),r.setEnd(a.anchorNode,t),r.collapse(!1),n=v(e).createElement("span"),n.id=o,n.appendChild(v(e).createTextNode(i)),r.insertNode(n),a.removeAllRanges(),a.addRange(c);var l={left:0,top:n.offsetHeight};return E(e,n,l),n.parentNode.removeChild(n),l}function E(e,t,n){for(var r=t,i=e?e.iframe:null;r;)n.left+=r.offsetLeft+r.clientLeft,n.top+=r.offsetTop+r.clientTop,r=r.offsetParent,!r&&i&&(r=i,i=null);for(r=t,i=e?e.iframe:null;r!==v().body;)r.scrollTop&&r.scrollTop>0&&(n.top-=r.scrollTop),r.scrollLeft&&r.scrollLeft>0&&(n.left-=r.scrollLeft),r=r.parentNode,!r&&i&&(r=i,i=null)}function b(e,t,n){var r=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing"],i=null!==window.mozInnerScreenX,o=v(e).createElement("div");o.id="input-textarea-caret-position-mirror-div",v(e).body.appendChild(o);var a=o.style,c=window.getComputedStyle?getComputedStyle(t):t.currentStyle;a.whiteSpace="pre-wrap","INPUT"!==t.nodeName&&(a.wordWrap="break-word"),a.position="absolute",a.visibility="hidden",r.forEach(function(e){a[e]=c[e]}),i?(a.width=parseInt(c.width)-2+"px",t.scrollHeight>parseInt(c.height)&&(a.overflowY="scroll")):a.overflow="hidden",o.textContent=t.value.substring(0,n),"INPUT"===t.nodeName&&(o.textContent=o.textContent.replace(/\s/g,"Β "));var l=v(e).createElement("span");l.textContent=t.value.substring(n)||".",o.appendChild(l);var s={top:l.offsetTop+parseInt(c.borderTopWidth)+parseInt(c.fontSize),left:l.offsetLeft+parseInt(c.borderLeftWidth)};return E(e,t,s),v(e).body.removeChild(o),s}return{popUnderMention:i,replaceMacroText:m,replaceTriggerText:u,getMacroMatch:d,getTriggerInfo:h,selectElement:c,getTextAreaOrInputUnderlinePosition:b,getTextPrecedingCurrentSelection:T,getContentEditableSelectedPath:f,getNodePositionInParent:g,getContentEditableCaretPosition:S,pasteHtml:l,resetSelection:s,scrollIntoView:o}}]),angular.module("mentio").run(["$templateCache",function(e){e.put("mentio-menu.tpl.html",'<style>\n.scrollable-menu {\n height: auto;\n max-height: 300px;\n overflow: auto;\n}\n\n.menu-highlighted {\n font-weight: bold;\n}\n</style>\n<ul class="dropdown-menu scrollable-menu" style="display:block">\n <li mentio-menu-item="item" ng-repeat="item in items track by $index">\n <a class="text-primary" ng-bind-html="item.label | mentioHighlight:typedTerm:\'menu-highlighted\' | unsafe"></a>\n </li>\n</ul>')}]);
9889 ;"use strict";angular.module("mentio",[]).directive("mentio",["mentioUtil","$document","$compile","$log","$timeout",function(e,t,n,r,i){return{restrict:"A",scope:{macros:"=mentioMacros",search:"&mentioSearch",select:"&mentioSelect",items:"=mentioItems",typedTerm:"=mentioTypedTerm",altId:"=mentioId",iframeElement:"=mentioIframeElement",requireLeadingSpace:"=mentioRequireLeadingSpace",selectNotFound:"=mentioSelectNotFound",trimTerm:"=mentioTrimTerm",ngModel:"="},controller:["$scope","$timeout","$attrs",function(n,r,i){n.query=function(e,t){var r=n.triggerCharMap[e];(void 0===n.trimTerm||n.trimTerm)&&(t=t.trim()),r.showMenu(),r.search({term:t}),r.typedTerm=t},n.defaultSearch=function(e){var t=[];angular.forEach(n.items,function(n){n.label.toUpperCase().indexOf(e.term.toUpperCase())>=0&&t.push(n)}),n.localItems=t},n.bridgeSearch=function(e){var t=i.mentioSearch?n.search:n.defaultSearch;t({term:e})},n.defaultSelect=function(e){return n.defaultTriggerChar+e.item.label},n.bridgeSelect=function(e){var t=i.mentioSelect?n.select:n.defaultSelect;return t({item:e})},n.setTriggerText=function(e){n.syncTriggerText&&(n.typedTerm=void 0===n.trimTerm||n.trimTerm?e.trim():e)},n.context=function(){return n.iframeElement?{iframe:n.iframeElement}:void 0},n.replaceText=function(t,i){if(n.hideAll(),e.replaceTriggerText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.triggerCharSet,t,n.requireLeadingSpace,i),!i&&(n.setTriggerText(""),angular.element(n.targetElement).triggerHandler("change"),n.isContentEditable())){n.contentEditableMenuPasted=!0;var o=r(function(){n.contentEditableMenuPasted=!1},200);n.$on("$destroy",function(){r.cancel(o)})}},n.hideAll=function(){for(var e in n.triggerCharMap)n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].hideMenu()},n.getActiveMenuScope=function(){for(var e in n.triggerCharMap)if(n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible)return n.triggerCharMap[e];return null},n.selectActive=function(){for(var e in n.triggerCharMap)n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible&&n.triggerCharMap[e].selectActive()},n.isActive=function(){for(var e in n.triggerCharMap)if(n.triggerCharMap.hasOwnProperty(e)&&n.triggerCharMap[e].visible)return!0;return!1},n.isContentEditable=function(){return"INPUT"!==n.targetElement.nodeName&&"TEXTAREA"!==n.targetElement.nodeName},n.replaceMacro=function(t,i){i?e.replaceMacroText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.macros,n.macros[t]):(n.replacingMacro=!0,n.timer=r(function(){e.replaceMacroText(n.context(),n.targetElement,n.targetElementPath,n.targetElementSelectedOffset,n.macros,n.macros[t]),angular.element(n.targetElement).triggerHandler("change"),n.replacingMacro=!1},300),n.$on("$destroy",function(){r.cancel(n.timer)}))},n.addMenu=function(e){e.parentScope&&n.triggerCharMap.hasOwnProperty(e.triggerChar)||(n.triggerCharMap[e.triggerChar]=e,void 0===n.triggerCharSet&&(n.triggerCharSet=[]),n.triggerCharSet.push(e.triggerChar),e.setParent(n))},n.$on("menuCreated",function(e,t){(void 0!==i.id||void 0!==i.mentioId)&&(i.id===t.targetElement||void 0!==i.mentioId&&n.altId===t.targetElement)&&n.addMenu(t.scope)}),t.on("click",function(){n.isActive()&&n.$apply(function(){n.hideAll()})}),t.on("keydown keypress paste",function(e){var t=n.getActiveMenuScope();t&&((9===e.which||13===e.which)&&(e.preventDefault(),t.selectActive()),27===e.which&&(e.preventDefault(),t.$apply(function(){t.hideMenu()})),40===e.which&&(e.preventDefault(),t.$apply(function(){t.activateNextItem()}),t.adjustScroll(1)),38===e.which&&(e.preventDefault(),t.$apply(function(){t.activatePreviousItem()}),t.adjustScroll(-1)),(37===e.which||39===e.which)&&e.preventDefault())})}],link:function(t,o,a){function c(e){function n(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}var r=t.getActiveMenuScope();if(r){if(9===e.which||13===e.which)return n(e),r.selectActive(),!1;if(27===e.which)return n(e),r.$apply(function(){r.hideMenu()}),!1;if(40===e.which)return n(e),r.$apply(function(){r.activateNextItem()}),r.adjustScroll(1),!1;if(38===e.which)return n(e),r.$apply(function(){r.activatePreviousItem()}),r.adjustScroll(-1),!1;if(37===e.which||39===e.which)return n(e),!1}}if(t.triggerCharMap={},t.targetElement=o,a.$set("autocomplete","off"),a.mentioItems){t.localItems=[],t.parentScope=t;var l=a.mentioSearch?' mentio-items="items"':' mentio-items="localItems"';t.defaultTriggerChar=a.mentioTriggerChar?t.$eval(a.mentioTriggerChar):"@";var s='<mentio-menu mentio-search="bridgeSearch(term)" mentio-select="bridgeSelect(item)"'+l;a.mentioTemplateUrl&&(s=s+' mentio-template-url="'+a.mentioTemplateUrl+'"'),s=s+" mentio-trigger-char=\"'"+t.defaultTriggerChar+'\'" mentio-parent-scope="parentScope"/>';var m=n(s),u=m(t);o.parent().append(u),t.$on("$destroy",function(){u.remove()})}a.mentioTypedTerm&&(t.syncTriggerText=!0),t.$watch("iframeElement",function(e){if(e){var n=e.contentWindow.document;n.addEventListener("click",function(){t.isActive()&&t.$apply(function(){t.hideAll()})}),n.addEventListener("keydown",c,!0),t.$on("$destroy",function(){n.removeEventListener("keydown",c)})}}),t.$watch("ngModel",function(n){if(n&&""!==n||t.isActive()){if(void 0===t.triggerCharSet)return r.error("Error, no mentio-items attribute was provided, and no separate mentio-menus were specified. Nothing to do."),void 0;if(t.contentEditableMenuPasted)return t.contentEditableMenuPasted=!1,void 0;t.replacingMacro&&(i.cancel(t.timer),t.replacingMacro=!1);var o=t.isActive(),a=t.isContentEditable(),c=e.getTriggerInfo(t.context(),t.triggerCharSet,t.requireLeadingSpace,o);if(void 0!==c&&(!o||o&&(a&&c.mentionTriggerChar===t.currentMentionTriggerChar||!a&&c.mentionPosition===t.currentMentionPosition)))c.mentionSelectedElement&&(t.targetElement=c.mentionSelectedElement,t.targetElementPath=c.mentionSelectedPath,t.targetElementSelectedOffset=c.mentionSelectedOffset),t.setTriggerText(c.mentionText),t.currentMentionPosition=c.mentionPosition,t.currentMentionTriggerChar=c.mentionTriggerChar,t.query(c.mentionTriggerChar,c.mentionText);else{var l=t.typedTerm;t.setTriggerText(""),t.hideAll();var s=e.getMacroMatch(t.context(),t.macros);if(void 0!==s)t.targetElement=s.macroSelectedElement,t.targetElementPath=s.macroSelectedPath,t.targetElementSelectedOffset=s.macroSelectedOffset,t.replaceMacro(s.macroText,s.macroHasTrailingSpace);else if(t.selectNotFound&&l&&""!==l){var m=t.triggerCharMap[t.currentMentionTriggerChar];if(m){var u=m.select({item:{label:l}});"function"==typeof u.then?u.then(t.replaceText):t.replaceText(u,!0)}}}}})}}}]).directive("mentioMenu",["mentioUtil","$rootScope","$log","$window","$document",function(e,t,n,r,i){return{restrict:"E",scope:{search:"&mentioSearch",select:"&mentioSelect",items:"=mentioItems",triggerChar:"=mentioTriggerChar",forElem:"=mentioFor",parentScope:"=mentioParentScope"},templateUrl:function(e,t){return void 0!==t.mentioTemplateUrl?t.mentioTemplateUrl:"mentio-menu.tpl.html"},controller:["$scope",function(e){e.visible=!1,this.activate=e.activate=function(t){e.activeItem=t},this.isActive=e.isActive=function(t){return e.activeItem===t},this.selectItem=e.selectItem=function(t){var n=e.select({item:t});"function"==typeof n.then?n.then(e.parentMentio.replaceText):e.parentMentio.replaceText(n)},e.activateNextItem=function(){var t=e.items.indexOf(e.activeItem);this.activate(e.items[(t+1)%e.items.length])},e.activatePreviousItem=function(){var t=e.items.indexOf(e.activeItem);this.activate(e.items[0===t?e.items.length-1:t-1])},e.isFirstItemActive=function(){var t=e.items.indexOf(e.activeItem);return 0===t},e.isLastItemActive=function(){var t=e.items.indexOf(e.activeItem);return t===e.items.length-1},e.selectActive=function(){e.selectItem(e.activeItem)},e.isVisible=function(){return e.visible},e.showMenu=function(){e.visible||(e.requestVisiblePendingSearch=!0)},e.setParent=function(t){e.parentMentio=t,e.targetElement=t.targetElement}}],link:function(o,a){if(a[0].parentNode.removeChild(a[0]),i[0].body.appendChild(a[0]),o.menuElement=a,o.parentScope)o.parentScope.addMenu(o);else{if(!o.forElem)return n.error("mentio-menu requires a target element in tbe mentio-for attribute"),void 0;if(!o.triggerChar)return n.error("mentio-menu requires a trigger char"),void 0;t.$broadcast("menuCreated",{targetElement:o.forElem,scope:o})}angular.element(r).bind("resize",function(){if(o.isVisible()){var t=[];t.push(o.triggerChar),e.popUnderMention(o.parentMentio.context(),t,a,o.requireLeadingSpace)}}),o.$watch("items",function(e){e&&e.length>0?(o.activate(e[0]),!o.visible&&o.requestVisiblePendingSearch&&(o.visible=!0,o.requestVisiblePendingSearch=!1)):o.hideMenu()}),o.$watch("isVisible()",function(t){if(t){var n=[];n.push(o.triggerChar),e.popUnderMention(o.parentMentio.context(),n,a,o.requireLeadingSpace)}}),o.parentMentio.$on("$destroy",function(){a.remove()}),o.hideMenu=function(){o.visible=!1,a.css("display","none")},o.adjustScroll=function(e){var t=a[0],n=t.querySelector("ul"),r=t.querySelector("[mentio-menu-item].active");return o.isFirstItemActive()?n.scrollTop=0:o.isLastItemActive()?n.scrollTop=n.scrollHeight:(1===e?n.scrollTop+=r.offsetHeight:n.scrollTop-=r.offsetHeight,void 0)}}}}]).directive("mentioMenuItem",function(){return{restrict:"A",scope:{item:"=mentioMenuItem"},require:"^mentioMenu",link:function(e,t,n,r){e.$watch(function(){return r.isActive(e.item)},function(e){e?t.addClass("active"):t.removeClass("active")}),t.bind("mouseenter",function(){e.$apply(function(){r.activate(e.item)})}),t.bind("click",function(){return r.selectItem(e.item),!1})}}}).filter("unsafe",["$sce",function(e){return function(t){return e.trustAsHtml(t)}}]).filter("mentioHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n,r){if(n){var i=r?'<span class="'+r+'">$&</span>':"<strong>$&</strong>";return(""+t).replace(new RegExp(e(n),"gi"),i)}return t}}),angular.module("mentio").factory("mentioUtil",["$window","$location","$anchorScroll","$timeout",function(e,t,n,r){function i(e,t,n,i){var c,l=h(e,t,i,!1);void 0!==l?(c=a(e)?b(e,v(e).activeElement,l.mentionPosition):S(e,l.mentionPosition),n.css({top:c.top+"px",left:c.left+"px",position:"absolute",zIndex:100,display:"block"}),r(function(){o(e,n)},0)):n.css({display:"none"})}function o(t,n){for(var r,i=20,o=100,a=n[0];void 0===r||0===r.height;)if(r=a.getBoundingClientRect(),0===r.height&&(a=a.childNodes[0],void 0===a||!a.getBoundingClientRect))return;var c=r.top,l=c+r.height;if(0>c)e.scrollTo(0,e.pageYOffset+r.top-i);else if(l>e.innerHeight){var s=e.pageYOffset+r.top-i;s-e.pageYOffset>o&&(s=e.pageYOffset+o);var m=e.pageYOffset-(e.innerHeight-l);m>s&&(m=s),e.scrollTo(0,m)}}function a(e){var t=v(e).activeElement;if(null!==t){var n=t.nodeName,r=t.getAttribute("type");return"INPUT"===n&&"text"===r||"TEXTAREA"===n}return!1}function c(e,t,n,r){var i,o=t;if(n)for(var a=0;a<n.length;a++){if(o=o.childNodes[n[a]],void 0===o)return;for(;o.length<r;)r-=o.length,o=o.nextSibling;0!==o.childNodes.length||o.length||(o=o.previousSibling)}var c=p(e);i=v(e).createRange(),i.setStart(o,r),i.setEnd(o,r),i.collapse(!0);try{c.removeAllRanges()}catch(l){}c.addRange(i),t.focus()}function l(e,t,n,r){var i,o;o=p(e),i=v(e).createRange(),i.setStart(o.anchorNode,n),i.setEnd(o.anchorNode,r),i.deleteContents();var a=v(e).createElement("div");a.innerHTML=t;for(var c,l,s=v(e).createDocumentFragment();c=a.firstChild;)l=s.appendChild(c);i.insertNode(s),l&&(i=i.cloneRange(),i.setStartAfter(l),i.collapse(!0),o.removeAllRanges(),o.addRange(i))}function s(e,t,n,r){var i=t.nodeName;"INPUT"===i||"TEXTAREA"===i?t!==v(e).activeElement&&t.focus():c(e,t,n,r)}function m(e,t,n,r,i,o){s(e,t,n,r);var c=d(e,i);if(c.macroHasTrailingSpace&&(c.macroText=c.macroText+"Β ",o+="Β "),void 0!==c){var m=v(e).activeElement;if(a(e)){var u=c.macroPosition,g=c.macroPosition+c.macroText.length;m.value=m.value.substring(0,u)+o+m.value.substring(g,m.value.length),m.selectionStart=u+o.length,m.selectionEnd=u+o.length}else l(e,o,c.macroPosition,c.macroPosition+c.macroText.length)}}function u(e,t,n,r,i,o,c,m){s(e,t,n,r);var u=h(e,i,c,!0,m);if(void 0!==u)if(a()){var g=v(e).activeElement;o+=" ";var d=u.mentionPosition,f=u.mentionPosition+u.mentionText.length+1;g.value=g.value.substring(0,d)+o+g.value.substring(f,g.value.length),g.selectionStart=d+o.length,g.selectionEnd=d+o.length}else o+="Β ",l(e,o,u.mentionPosition,u.mentionPosition+u.mentionText.length+1)}function g(e,t){if(null===t.parentNode)return 0;for(var n=0;n<t.parentNode.childNodes.length;n++){var r=t.parentNode.childNodes[n];if(r===t)return n}}function d(e,t){var n,r,i=[];if(a(e))n=v(e).activeElement;else{var o=f(e);o&&(n=o.selected,i=o.path,r=o.offset)}var c=T(e);if(void 0!==c&&null!==c){var l,s=!1;if(c.length>0&&("Β "===c.charAt(c.length-1)||" "===c.charAt(c.length-1))&&(s=!0,c=c.substring(0,c.length-1)),angular.forEach(t,function(e,t){var o=c.toUpperCase().lastIndexOf(t.toUpperCase());if(o>=0&&t.length+o===c.length){var a=o-1;(0===o||"Β "===c.charAt(a)||" "===c.charAt(a))&&(l={macroPosition:o,macroText:t,macroSelectedElement:n,macroSelectedPath:i,macroSelectedOffset:r,macroHasTrailingSpace:s})}}),l)return l}}function f(e){var t,n=p(e),r=n.anchorNode,i=[];if(null!=r){for(var o,a=r.contentEditable;null!==r&&"true"!==a;)o=g(e,r),i.push(o),r=r.parentNode,null!==r&&(a=r.contentEditable);return i.reverse(),t=n.getRangeAt(0).startOffset,{selected:r,path:i,offset:t}}}function h(e,t,n,r,i){var o,c,l;if(a(e))o=v(e).activeElement;else{var s=f(e);s&&(o=s.selected,c=s.path,l=s.offset)}var m=T(e);if(void 0!==m&&null!==m){var u,g=-1;if(t.forEach(function(e){var t=m.lastIndexOf(e);t>g&&(g=t,u=e)}),g>=0&&(0===g||!n||/[\xA0\s]/g.test(m.substring(g-1,g)))){var d=m.substring(g+1,m.length);u=m.substring(g,g+1);var h=d.substring(0,1),p=d.length>0&&(" "===h||"Β "===h);if(i&&(d=d.trim()),!p&&(r||!/[\xA0\s]/g.test(d)))return{mentionPosition:g,mentionText:d,mentionSelectedElement:o,mentionSelectedPath:c,mentionSelectedOffset:l,mentionTriggerChar:u}}}}function p(e){return e?e.iframe.contentWindow.getSelection():window.getSelection()}function v(e){return e?e.iframe.contentWindow.document:document}function T(e){var t;if(a(e)){var n=v(e).activeElement,r=n.selectionStart;t=n.value.substring(0,r)}else{var i=p(e).anchorNode;if(null!=i){var o=i.textContent,c=p(e).getRangeAt(0).startOffset;c>=0&&(t=o.substring(0,c))}}return t}function S(e,t){var n,r,i="ο»Ώ",o="sel_"+(new Date).getTime()+"_"+Math.random().toString().substr(2),a=p(e),c=a.getRangeAt(0);r=v(e).createRange(),r.setStart(a.anchorNode,t),r.setEnd(a.anchorNode,t),r.collapse(!1),n=v(e).createElement("span"),n.id=o,n.appendChild(v(e).createTextNode(i)),r.insertNode(n),a.removeAllRanges(),a.addRange(c);var l={left:0,top:n.offsetHeight};return E(e,n,l),n.parentNode.removeChild(n),l}function E(e,t,n){for(var r=t,i=e?e.iframe:null;r;)n.left+=r.offsetLeft,n.top+=r.offsetTop,r!==v().body&&(n.top-=r.scrollTop,n.left-=r.scrollLeft),r=r.offsetParent,!r&&i&&(r=i,i=null)}function b(e,t,n){var r=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing"],i=null!==window.mozInnerScreenX,o=v(e).createElement("div");o.id="input-textarea-caret-position-mirror-div",v(e).body.appendChild(o);var a=o.style,c=window.getComputedStyle?getComputedStyle(t):t.currentStyle;a.whiteSpace="pre-wrap","INPUT"!==t.nodeName&&(a.wordWrap="break-word"),a.position="absolute",a.visibility="hidden",r.forEach(function(e){a[e]=c[e]}),i?(a.width=parseInt(c.width)-2+"px",t.scrollHeight>parseInt(c.height)&&(a.overflowY="scroll")):a.overflow="hidden",o.textContent=t.value.substring(0,n),"INPUT"===t.nodeName&&(o.textContent=o.textContent.replace(/\s/g,"Β "));var l=v(e).createElement("span");l.textContent=t.value.substring(n)||".",o.appendChild(l);var s={top:l.offsetTop+parseInt(c.borderTopWidth)+parseInt(c.fontSize),left:l.offsetLeft+parseInt(c.borderLeftWidth)};return E(e,t,s),v(e).body.removeChild(o),s}return{popUnderMention:i,replaceMacroText:m,replaceTriggerText:u,getMacroMatch:d,getTriggerInfo:h,selectElement:c,getTextAreaOrInputUnderlinePosition:b,getTextPrecedingCurrentSelection:T,getContentEditableSelectedPath:f,getNodePositionInParent:g,getContentEditableCaretPosition:S,pasteHtml:l,resetSelection:s,scrollIntoView:o}}]),angular.module("mentio").run(["$templateCache",function(e){e.put("mentio-menu.tpl.html",'<style>\n.scrollable-menu {\n height: auto;\n max-height: 300px;\n overflow: auto;\n}\n\n.menu-highlighted {\n font-weight: bold;\n}\n</style>\n<ul class="dropdown-menu scrollable-menu" style="display:block">\n <li mentio-menu-item="item" ng-repeat="item in items track by $index">\n <a class="text-primary" ng-bind-html="item.label | mentioHighlight:typedTerm:\'menu-highlighted\' | unsafe"></a>\n </li>\n</ul>')}]);
2366 9890 ;moment.defaultFormat = 'YYYY-MM-DDTHH:mm';
2367 9891
2368 9892 ;// MIT License:
2369 9893 //
2370 9894 // Copyright (c) 2010-2012, Joe Walnes
2371 9895 //
2372 9896 // Permission is hereby granted, free of charge, to any person obtaining a copy
2373 9897 // of this software and associated documentation files (the "Software"), to deal
2374 9898 // in the Software without restriction, including without limitation the rights
2375 9899 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2376 9900 // copies of the Software, and to permit persons to whom the Software is
2377 9901 // furnished to do so, subject to the following conditions:
2378 9902 //
2379 9903 // The above copyright notice and this permission notice shall be included in
2380 9904 // all copies or substantial portions of the Software.
2381 9905 //
2382 9906 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2383 9907 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2384 9908 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2385 9909 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2386 9910 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2387 9911 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2388 9912 // THE SOFTWARE.
2389 9913
2390 9914 /**
2391 9915 * This behaves like a WebSocket in every way, except if it fails to connect,
2392 9916 * or it gets disconnected, it will repeatedly poll until it succesfully connects
2393 9917 * again.
2394 9918 *
2395 9919 * It is API compatible, so when you have:
2396 9920 * ws = new WebSocket('ws://....');
2397 9921 * you can replace with:
2398 9922 * ws = new ReconnectingWebSocket('ws://....');
2399 9923 *
2400 9924 * The event stream will typically look like:
2401 9925 * onconnecting
2402 9926 * onopen
2403 9927 * onmessage
2404 9928 * onmessage
2405 9929 * onclose // lost connection
2406 9930 * onconnecting
2407 9931 * onopen // sometime later...
2408 9932 * onmessage
2409 9933 * onmessage
2410 9934 * etc...
2411 9935 *
2412 9936 * It is API compatible with the standard WebSocket API.
2413 9937 *
2414 9938 * Latest version: https://github.com/joewalnes/reconnecting-websocket/
2415 9939 * - Joe Walnes
2416 9940 */
2417 9941 function ReconnectingWebSocket(url, protocols) {
2418 9942 protocols = protocols || [];
2419 9943
2420 9944 // These can be altered by calling code.
2421 9945 this.debug = false;
2422 9946 this.reconnectInterval = 1000;
2423 9947 this.timeoutInterval = 2000;
2424 9948
2425 9949 var self = this;
2426 9950 var ws;
2427 9951 var forcedClose = false;
2428 9952 var timedOut = false;
2429 9953
2430 9954 this.url = url;
2431 9955 this.protocols = protocols;
2432 9956 this.readyState = WebSocket.CONNECTING;
2433 9957 this.URL = url; // Public API
2434 9958
2435 9959 this.onopen = function(event) {
2436 9960 };
2437 9961
2438 9962 this.onclose = function(event) {
2439 9963 };
2440 9964
2441 9965 this.onconnecting = function(event) {
2442 9966 };
2443 9967
2444 9968 this.onmessage = function(event) {
2445 9969 };
2446 9970
2447 9971 this.onerror = function(event) {
2448 9972 };
2449 9973
2450 9974 function connect(reconnectAttempt) {
2451 9975 ws = new WebSocket(url, protocols);
2452 9976
2453 9977 self.onconnecting();
2454 9978 if (self.debug || ReconnectingWebSocket.debugAll) {
2455 9979 console.debug('ReconnectingWebSocket', 'attempt-connect', url);
2456 9980 }
2457 9981
2458 9982 var localWs = ws;
2459 9983 var timeout = setTimeout(function() {
2460 9984 if (self.debug || ReconnectingWebSocket.debugAll) {
2461 9985 console.debug('ReconnectingWebSocket', 'connection-timeout', url);
2462 9986 }
2463 9987 timedOut = true;
2464 9988 localWs.close();
2465 9989 timedOut = false;
2466 9990 }, self.timeoutInterval);
2467 9991
2468 9992 ws.onopen = function(event) {
2469 9993 clearTimeout(timeout);
2470 9994 if (self.debug || ReconnectingWebSocket.debugAll) {
2471 9995 console.debug('ReconnectingWebSocket', 'onopen', url);
2472 9996 }
2473 9997 self.readyState = WebSocket.OPEN;
2474 9998 reconnectAttempt = false;
2475 9999 self.onopen(event);
2476 10000 };
2477 10001
2478 10002 ws.onclose = function(event) {
2479 10003 clearTimeout(timeout);
2480 10004 ws = null;
2481 10005 if (forcedClose) {
2482 10006 self.readyState = WebSocket.CLOSED;
2483 10007 self.onclose(event);
2484 10008 } else {
2485 10009 self.readyState = WebSocket.CONNECTING;
2486 10010 self.onconnecting();
2487 10011 if (!reconnectAttempt && !timedOut) {
2488 10012 if (self.debug || ReconnectingWebSocket.debugAll) {
2489 10013 console.debug('ReconnectingWebSocket', 'onclose', url);
2490 10014 }
2491 10015 self.onclose(event);
2492 10016 }
2493 10017 setTimeout(function() {
2494 10018 connect(true);
2495 10019 }, self.reconnectInterval);
2496 10020 }
2497 10021 };
2498 10022 ws.onmessage = function(event) {
2499 10023 if (self.debug || ReconnectingWebSocket.debugAll) {
2500 10024 console.debug('ReconnectingWebSocket', 'onmessage', url, event.data);
2501 10025 }
2502 10026 self.onmessage(event);
2503 10027 };
2504 10028 ws.onerror = function(event) {
2505 10029 if (self.debug || ReconnectingWebSocket.debugAll) {
2506 10030 console.debug('ReconnectingWebSocket', 'onerror', url, event);
2507 10031 }
2508 10032 self.onerror(event);
2509 10033 };
2510 10034 }
2511 10035 connect(url);
2512 10036
2513 10037 this.send = function(data) {
2514 10038 if (ws) {
2515 10039 if (self.debug || ReconnectingWebSocket.debugAll) {
2516 10040 console.debug('ReconnectingWebSocket', 'send', url, data);
2517 10041 }
2518 10042 return ws.send(data);
2519 10043 } else {
2520 10044 throw 'INVALID_STATE_ERR : Pausing to reconnect websocket';
2521 10045 }
2522 10046 };
2523 10047
2524 10048 this.close = function() {
2525 10049 if (ws) {
2526 10050 forcedClose = true;
2527 10051 ws.close();
2528 10052 }
2529 10053 };
2530 10054
2531 10055 /**
2532 10056 * Additional public API method to refresh the connection if still open (close, re-open).
2533 10057 * For example, if the app suspects bad data / missed heart beats, it can try to refresh.
2534 10058 */
2535 10059 this.refresh = function() {
2536 10060 if (ws) {
2537 10061 ws.close();
2538 10062 }
2539 10063 };
2540 10064 }
2541 10065
2542 10066 /**
2543 10067 * Setting this to true is the equivalent of setting all instances of ReconnectingWebSocket.debug to true.
2544 10068 */
2545 10069 ReconnectingWebSocket.debugAll = false;
2546 10070
2547 10071
2548 10072 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
2549 10073 //
2550 10074 // Licensed under the Apache License, Version 2.0 (the "License");
2551 10075 // you may not use this file except in compliance with the License.
2552 10076 // You may obtain a copy of the License at
2553 10077 //
2554 10078 // http://www.apache.org/licenses/LICENSE-2.0
2555 10079 //
2556 10080 // Unless required by applicable law or agreed to in writing, software
2557 10081 // distributed under the License is distributed on an "AS IS" BASIS,
2558 10082 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2559 10083 // See the License for the specific language governing permissions and
2560 10084 // limitations under the License.
2561 10085
2562 10086 if (!String.prototype.trim) {
2563 10087 String.prototype.trim = function () {
2564 10088 return this.replace(/^\s+|\s+$/g, '');
2565 10089 };
2566 10090
2567 10091 String.prototype.ltrim = function () {
2568 10092 return this.replace(/^\s+/, '');
2569 10093 };
2570 10094
2571 10095 String.prototype.rtrim = function () {
2572 10096 return this.replace(/\s+$/, '');
2573 10097 };
2574 10098
2575 10099 String.prototype.fulltrim = function () {
2576 10100 return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g, '').replace(/\s+/g, ' ');
2577 10101 };
2578 10102 }
2579 10103
2580 10104 function decodeEncodedJSON (input){
2581 10105 try{
2582 10106 var val = JSON.parse(input);
2583 10107 delete doc;
2584 10108 return val;
2585 10109 }catch(exc){
2586 10110
2587 10111 delete doc;
2588 10112 }
2589 10113 }
2590 10114
2591 10115 function parseTagsToSearch(searchParams) {
2592 10116 var params = {};
2593 10117 _.each(searchParams.tags, function (t) {
2594 10118 if (!_.has(params, t.type)) {
2595 10119 params[t.type] = [];
2596 10120 }
2597 10121 params[t.type].push(t.value);
2598 10122 });
2599 10123 if (searchParams.page > 1){
2600 10124 params.page = searchParams.page;
2601 10125 }
2602 10126 return params;
2603 10127 }
2604 10128
2605 10129 function parseSearchToTags(search) {
2606 10130 var config = {page: 1, tags: [], type:''};
2607 10131 _.each(_.pairs(search), function (obj) {
2608 10132 if (_.isArray(obj[1])) {
2609 10133 _.each(obj[1], function (obj2) {
2610 10134 config.tags.push({type: obj[0], value: obj2});
2611 10135 })
2612 10136 } else {
2613 10137 if (obj[0] == 'page') {
2614 10138 config.page = obj[1];
2615 10139 }
2616 10140 else if (obj[0] == 'type') {
2617 10141 config.type = obj[1];
2618 10142 }
2619 10143 else {
2620 10144 config.tags.push({type: obj[0], value: obj[1]});
2621 10145 }
2622 10146
2623 10147 }
2624 10148 });
2625 10149 return config;
2626 10150 }
2627 10151
2628 10152
2629 10153 /* returns ISO date string from UTC now - timespan */
2630 10154 function timeSpanToStartDate(timeSpan){
2631 10155 var amount = Number(timeSpan.slice(0,-1));
2632 10156 var unit = timeSpan.slice(-1);
2633 10157 return moment.utc().subtract(amount, unit).format();
2634 10158 }
2635 10159
2636 10160 /* Sets server validation messages on form using angular machinery +
2637 10161 * custom key holding actual error messages */
2638 10162 function setServerValidation(form, errors){
2639 10163
2640 10164 if (typeof form.ae_validation === 'undefined'){
2641 10165 form.ae_validation = {};
2642 10166
2643 10167 }
2644 10168 for (var key in form.ae_validation){
2645 10169 form.ae_validation[key] = [];
2646 10170
2647 10171 }
2648 10172
2649 10173
2650 10174 for (var key in form){
2651 10175 if (key[0] !== '$' && key !== 'ae_validation'){
2652 10176 form[key].$setValidity('ae_validation', true);
2653 10177 }
2654 10178 }
2655 10179 if (typeof errors !== undefined){
2656 10180 for (var key in errors){
2657 10181 if (typeof form[key] !== 'undefined'){
2658 10182 form[key].$setValidity('ae_validation', false);
2659 10183 }
2660 10184 // handle wtforms and colander errors based on
2661 10185 // whether we have list of erors or a single error in a key
2662 10186 if (angular.isArray(errors[key])){
2663 10187 form.ae_validation[key] = errors[key];
2664 10188 }
2665 10189 else{
2666 10190 form.ae_validation[key] = [errors[key]];
2667 10191 }
2668 10192 }
2669 10193 }
2670 10194 return form;
2671 10195 }
2672 10196
2673 10197 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
2674 10198 //
2675 10199 // Licensed under the Apache License, Version 2.0 (the "License");
2676 10200 // you may not use this file except in compliance with the License.
2677 10201 // You may obtain a copy of the License at
2678 10202 //
2679 10203 // http://www.apache.org/licenses/LICENSE-2.0
2680 10204 //
2681 10205 // Unless required by applicable law or agreed to in writing, software
2682 10206 // distributed under the License is distributed on an "AS IS" BASIS,
2683 10207 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2684 10208 // See the License for the specific language governing permissions and
2685 10209 // limitations under the License.
2686 10210
2687 10211 'use strict';
2688 10212
2689 10213 // Declare app level module which depends on filters, and services
2690 10214 angular.module('appenlight.base', [
2691 10215 'ngRoute',
2692 10216 'ui.router',
2693 10217 'ui.router.router',
2694 10218 'underscore',
2695 10219 'ui.bootstrap',
2696 10220 'ngResource',
2697 10221 'ngAnimate',
2698 10222 'ngCookies',
2699 10223 'smart-table',
2700 10224 'angular-toArrayFilter',
2701 10225 'mentio'
2702 10226 ]);
2703 10227
2704 10228 angular.module('appenlight.filters', []);
2705 10229 angular.module('appenlight.templates', []);
2706 10230 angular.module('appenlight.controllers', [
2707 10231 'appenlight.base'
2708 10232 ]);
2709 10233 angular.module('appenlight.components', [
2710 10234 'appenlight.components.channelstream',
2711 10235 'appenlight.components.appenlightApp',
2712 10236 'appenlight.components.appenlightHeader',
2713 10237 'appenlight.components.indexDashboardView',
2714 10238 'appenlight.components.logsBrowserView',
2715 10239 'appenlight.components.reportView',
2716 10240 'appenlight.components.reportsBrowserView',
2717 10241 'appenlight.components.reportsSlowBrowserView',
2718 10242 'appenlight.components.eventBrowserView',
2719 10243 'appenlight.components.userProfileView',
2720 10244 'appenlight.components.userIdentitiesView',
2721 10245 'appenlight.components.userPasswordView',
2722 10246 'appenlight.components.userAuthTokensView',
2723 10247 'appenlight.components.userAlertChannelsListView',
2724 10248 'appenlight.components.userAlertChannelsEmailNewView',
2725 10249 'appenlight.components.applicationsListView',
2726 10250 'appenlight.components.applicationsPurgeLogsView',
2727 10251 'appenlight.components.applicationsUpdateView',
2728 10252 'appenlight.components.integrationsListView',
2729 10253 'appenlight.components.bitbucketIntegrationConfigView',
2730 10254 'appenlight.components.campfireIntegrationConfigView',
2731 10255 'appenlight.components.flowdockIntegrationConfigView',
2732 10256 'appenlight.components.githubIntegrationConfigView',
2733 10257 'appenlight.components.hipchatIntegrationConfigView',
2734 10258 'appenlight.components.jiraIntegrationConfigView',
2735 10259 'appenlight.components.slackIntegrationConfigView',
2736 10260 'appenlight.components.webhooksIntegrationConfigView',
2737 10261 'appenlight.components.adminView',
2738 10262 'appenlight.components.adminApplicationsListView',
2739 10263 'appenlight.components.adminUsersListView',
2740 10264 'appenlight.components.adminUsersCreateView',
2741 10265 'appenlight.components.adminGroupsListView',
2742 10266 'appenlight.components.adminGroupsCreateView',
2743 10267 'appenlight.components.adminConfigurationView',
2744 10268 'appenlight.components.adminSystemView',
2745 10269 'appenlight.components.adminPartitionsView',
2746 10270 'appenlight.components.settingsView'
2747 10271 ]);
2748 10272 angular.module('appenlight.directives', [
2749 10273 'appenlight.directives.c3chart',
2750 10274 'appenlight.directives.confirmValidate',
2751 10275 'appenlight.directives.focus',
2752 10276 'appenlight.directives.formErrors',
2753 10277 'appenlight.directives.humanFormat',
2754 10278 'appenlight.directives.isoToRelativeTime',
2755 10279 'appenlight.directives.permissionsForm',
2756 10280 'appenlight.directives.smallReportGroupList',
2757 10281 'appenlight.directives.smallReportList',
2758 10282 'appenlight.directives.pluginConfig',
2759 10283 'appenlight.directives.recursive',
2760 10284 'appenlight.directives.reportAlertAction',
2761 10285 'appenlight.directives.postProcessAction',
2762 10286 'appenlight.directives.rule',
2763 10287 'appenlight.directives.ruleReadOnly'
2764 10288 ]);
2765 10289 angular.module('appenlight.services', [
2766 10290 'appenlight.services.chartResultParser',
2767 10291 'appenlight.services.resources',
2768 10292 'appenlight.services.stateHolder',
2769 10293 'appenlight.services.typeAheadTagHelper',
2770 10294 'appenlight.services.UUIDProvider'
2771 10295 ]).value('version', '0.1');
2772 10296
2773 10297
2774 10298 var pluginsToLoad = _.map(decodeEncodedJSON(window.AE.plugins),
2775 10299 function(item){
2776 10300 return item.config.javascript.angular_module
2777 10301 });
2778 10302 console.info(pluginsToLoad);
2779 10303
2780 10304 angular.module('appenlight.plugins', pluginsToLoad);
2781 10305
2782 10306 var app = angular.module('appenlight', [
2783 10307 'appenlight.base',
2784 10308 'appenlight.config',
2785 10309 'appenlight.templates',
2786 10310 'appenlight.filters',
2787 10311 'appenlight.services',
2788 10312 'appenlight.directives',
2789 10313 'appenlight.controllers',
2790 10314 'appenlight.components',
2791 10315 'appenlight.plugins'
2792 10316 ]);
2793 10317
2794 10318 // needs manual execution because of plugin files
2795 10319 function kickstartAE(initialUserData) {
2796 10320 app.config(['$httpProvider', '$uibTooltipProvider', '$locationProvider', function ($httpProvider, $uibTooltipProvider, $locationProvider) {
2797 10321 $locationProvider.html5Mode(true);
2798 10322 $httpProvider.interceptors.push(['$q', '$rootScope', '$timeout', 'stateHolder', function ($q, $rootScope, $timeout, stateHolder) {
2799 10323 return {
2800 10324 'response': function (response) {
2801 10325 var flashMessages = angular.fromJson(response.headers('x-flash-messages'));
2802 10326 if (flashMessages && flashMessages.length > 0) {
2803 10327 stateHolder.flashMessages.extend(flashMessages);
2804 10328 }
2805 10329 return response;
2806 10330 },
2807 10331 'responseError': function (rejection) {
2808 10332 if (rejection.status > 299 && rejection.status !== 422) {
2809 10333 stateHolder.flashMessages.extend([{
2810 10334 msg: 'Response status code: ' + rejection.status + ', "' + rejection.statusText + '", url: ' + rejection.config.url,
2811 10335 type: 'error'
2812 10336 }]);
2813 10337 }
2814 10338 if (rejection.status == 0) {
2815 10339 stateHolder.flashMessages.extend([{
2816 10340 msg: 'Response timeout',
2817 10341 type: 'error'
2818 10342 }]);
2819 10343 }
2820 10344 var flashMessages = angular.fromJson(rejection.headers('x-flash-messages'));
2821 10345 if (flashMessages && flashMessages.length > 0) {
2822 10346 stateHolder.flashMessages.extend(flashMessages);
2823 10347 }
2824 10348
2825 10349 return $q.reject(rejection);
2826 10350 }
2827 10351 }
2828 10352 }]);
2829 10353
2830 10354 $uibTooltipProvider.options({appendToBody: true});
2831 10355
2832 10356 }]);
2833 10357
2834 10358
2835 10359 app.config(function ($provide) {
2836 10360 $provide.decorator("$exceptionHandler", function ($delegate) {
2837 10361 return function (exception, cause) {
2838 10362 $delegate(exception, cause);
2839 10363 if (typeof AppEnlight !== 'undefined') {
2840 10364 AppEnlight.grabError(exception);
2841 10365 }
2842 10366 };
2843 10367 });
2844 10368 });
2845 10369
2846 10370 app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig',
2847 10371 function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) {
2848 10372
2849 10373 if (initialUserData){
2850 10374 stateHolder.AeUser.update(initialUserData);
2851 10375
2852 10376 if (stateHolder.AeUser.hasAppPermission('root_administration'
2853 10377 )){
2854 10378 AeConfig.topNav.menuAdminItems.push(
2855 10379 {'sref': 'admin', 'label': 'Admin Settings'}
2856 10380 )
2857 10381 }
2858 10382
2859 10383 }
2860 10384 $rootScope.$state = $state;
2861 10385 $rootScope.stateHolder = stateHolder;
2862 10386 $rootScope.flash = stateHolder.flashMessages.list;
2863 10387 $rootScope.closeAlert = stateHolder.flashMessages.closeAlert;
2864 10388 $rootScope.AeConfig = AeConfig;
2865 10389
2866 10390 var transitionApp = function($transition$, $state) {
2867 10391 // redirect user to /register unless its one of open views
2868 10392 var isGuestState = [
2869 10393 'report.view_detail',
2870 10394 'report.view_group',
2871 10395 'dashboard.view'
2872 10396 ].indexOf($transition$.to().name) !== -1;
2873 10397
2874 10398 var path = $window.location.pathname;
2875 10399 // strip trailing slash
2876 10400 if (path.substr(path.length - 1) === '/') {
2877 10401 path = path.substr(0, path.length - 1);
2878 10402 }
2879 10403 var isOpenView = false;
2880 10404 var openViews = [
2881 10405 AeConfig.urls.otherRoutes.lostPassword,
2882 10406 AeConfig.urls.otherRoutes.lostPasswordGenerate
2883 10407 ];
2884 10408
2885 10409 _.each(openViews, function (url) {
2886 10410 var url = '/' + url.split('/').slice(3).join('/');
2887 10411 if (url === path) {
2888 10412 isOpenView = true;
2889 10413 }
2890 10414 });
2891 10415 if (stateHolder.AeUser.id === null && !isGuestState && !isOpenView) {
2892 10416 if (window.location.toString().indexOf(AeConfig.urls.otherRoutes.register) === -1) {
2893 10417
2894 10418 var newLocation = AeConfig.urls.otherRoutes.register + '?came_from=' + encodeURIComponent(window.location);
2895 10419 // fix infinite digest here
2896 10420 $rootScope.$on('$locationChangeStart',
2897 10421 function(event, toState, toParams, fromState, fromParams, options){
2898 10422 event.preventDefault();
2899 10423 $window.location = newLocation;
2900 10424 });
2901 10425 $window.location = newLocation;
2902 10426 return false;
2903 10427 }
2904 10428 return false;
2905 10429 }
2906 10430 return true;
2907 10431 };
2908 10432
2909 10433 for (var i=0; i < stateHolder.plugins.callables.length; i++){
2910 10434 stateHolder.plugins.callables[i]();
2911 10435 }
2912 10436
2913 10437 $transitions.onBefore({}, transitionApp);
2914 10438 }]);
2915 10439 }
2916 10440
2917 10441 ;angular.module('appenlight.templates').run(['$templateCache', function($templateCache) {
2918 10442 'use strict';
2919 10443
2920 10444 $templateCache.put('components/appenlight-app/appenlight-app.html',
2921 10445 "<channelstream config=\"AeConfig\"></channelstream>\n" +
2922 10446 "<appenlight-header></appenlight-header>\n" +
2923 10447 "<div class=\"container\" data-ng-if=\"flash.length\">\n" +
2924 10448 " <div class=\"row\" style=\"margin-bottom: 10px\">\n" +
2925 10449 " <div class=\"col-xs-12\">\n" +
2926 10450 " <uib-alert data-ng-repeat=\"message in flash\"\n" +
2927 10451 " type=\"{{ message.type }}\"\n" +
2928 10452 " close=\"closeAlert($index)\" class=\"animate-repeat\">\n" +
2929 10453 " {{ message.msg }}</uib-alert>\n" +
2930 10454 " </div>\n" +
2931 10455 " </div>\n" +
2932 10456 "</div>\n" +
2933 10457 "\n" +
2934 10458 "<div id=\"outer-content\">\n" +
2935 10459 " <div ui-view class=\"container\"></div>\n" +
2936 10460 "</div>\n"
2937 10461 );
2938 10462
2939 10463
2940 10464 $templateCache.put('components/appenlight-header/appenlight-header.html',
2941 10465 "<!-- Fixed navbar -->\n" +
2942 10466 "<div id=\"top-navbar\" class=\"navbar navbar-default navbar-fixed-top\" role=\"navigation\">\n" +
2943 10467 " <div class=\"pattern\">\n" +
2944 10468 " <div class=\"container\">\n" +
2945 10469 " <div class=\"navbar-header pull-left\">\n" +
2946 10470 " <a data-ui-sref=\"front_dashboard\" class=\"navbar-brand\">\n" +
2947 10471 " <div id=\"logo-normal\" class=\"hidden-sm hidden-xs\"></div>\n" +
2948 10472 " <div id=\"logo-icon\" class=\"visible-sm visible-xs\"></div>\n" +
2949 10473 " </a>\n" +
2950 10474 " </div>\n" +
2951 10475 "\n" +
2952 10476 " <div class=\"container-fluid\">\n" +
2953 10477 " <div>\n" +
2954 10478 " <ul class=\"nav navbar-nav navbar-right\" ng-if=\"$ctrl.stateHolder.AeUser.id !== null\">\n" +
2955 10479 " <li id=\"user-notifications\" class=\"dropdown ng-cloak\" data-uib-dropdown>\n" +
2956 10480 "\n" +
2957 10481 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle>\n" +
2958 10482 " <span class=\"badge\">{{$ctrl.assignedReports.length}}</span>\n" +
2959 10483 " <span class=\"fa fa-envelope-o\"></span>\n" +
2960 10484 " </a>\n" +
2961 10485 " <ul class=\"dropdown-menu\">\n" +
2962 10486 " <li role=\"presentation\" class=\"dropdown-header\">Assigned reports</li>\n" +
2963 10487 " <li data-ng-repeat=\"report in $ctrl.assignedReports\" role=\"presentation\">\n" +
2964 10488 " <a href=\"{{report.front_url}}\" role=\"menuitem\" tabindex=\"-1\">\n" +
2965 10489 " <small>{{ report.error || 'Slow Report: ' + report.view_name |truncate:65}}</small>\n" +
2966 10490 " </a>\n" +
2967 10491 "\n" +
2968 10492 " </li>\n" +
2969 10493 " <li data-ng-if=\"$ctrl.assignedReports.length == 0\"><a><small>No reports</small></a></li>\n" +
2970 10494 " </ul>\n" +
2971 10495 " </li>\n" +
2972 10496 " <li id=\"alert-notifications\" class=\"dropdown ng-cloak\" data-uib-dropdown auto-close=\"outsideClick\">\n" +
2973 10497 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle>\n" +
2974 10498 " <span class=\"badge {{ activeEvents ? 'danger' : '' }}\">{{$ctrl.activeEvents}}</span>\n" +
2975 10499 " <span class=\"fa fa-bell-o\"></span></a>\n" +
2976 10500 " <ul class=\"dropdown-menu\">\n" +
2977 10501 " <li role=\"presentation\" class=\"dropdown-header\">\n" +
2978 10502 " <a data-ui-sref=\"events\" class=\"btn btn-xs btn-default\">Show me more</a></li>\n" +
2979 10503 " <li role=\"presentation\" class=\"dropdown-header\">Latest events</li>\n" +
2980 10504 " <li data-ng-repeat=\"event in $ctrl.latestEvents\" role=\"presentation\">\n" +
2981 10505 " <a data-ng-click=\"$ctrl.clickedEvent(event)\"><small class=\"resource-name\">For {{ event.resource_name }}</small><br/>\n" +
2982 10506 " <small>{{ event.text |truncate:65}}</small><br/>\n" +
2983 10507 " <small class=\"date\" data-uib-tooltip=\"{{event.start_date}}\">created: <iso-to-relative-time time=\"{{event.start_date}}\"/></small>\n" +
2984 10508 " <small class=\"date\" data-ng-show=\"event.end_date\" data-uib-tooltip=\"{{event.end_date}}\">closed: <iso-to-relative-time time=\"{{event.end_date}}\"/></small>\n" +
2985 10509 " </a>\n" +
2986 10510 " </li>\n" +
2987 10511 " <li data-ng-if=\"$ctrl.latestEvents.length == 0\"><a><small>No events</small></a></li>\n" +
2988 10512 " </ul>\n" +
2989 10513 " </li>\n" +
2990 10514 "\n" +
2991 10515 " <li id=\"dashboards\" class=\"dropdown\" data-uib-dropdown>\n" +
2992 10516 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Dashboards\">\n" +
2993 10517 " <span class=\"fa fa-bar-chart-o \"></span></a>\n" +
2994 10518 " <ul class=\"dropdown-menu\">\n" +
2995 10519 " <li role=\"presentation\"><a data-ui-sref=\"front_dashboard\">Main dashboard</a></li>\n" +
2996 10520 " <li role=\"presentation\" ng-repeat=\"item in $ctrl.AeConfig.topNav.menuDashboardsItems\">\n" +
2997 10521 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
2998 10522 " </li>\n" +
2999 10523 " </ul>\n" +
3000 10524 " </li>\n" +
3001 10525 "\n" +
3002 10526 " <li class=\"dropdown\" data-uib-dropdown>\n" +
3003 10527 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Reports\">\n" +
3004 10528 " <span class=\"fa fa-exclamation-triangle\"></span></a>\n" +
3005 10529 " <ul class=\"dropdown-menu\">\n" +
3006 10530 " <li role=\"presentation\">\n" +
3007 10531 " <a data-ui-sref=\"report.list({resource:$ctrl.stateHolder.resource})\">Error Reports</a>\n" +
3008 10532 " </li>\n" +
3009 10533 " <li role=\"presentation\">\n" +
3010 10534 " <a data-ui-sref=\"report.list_slow({resource:$ctrl.stateHolder.resource})\">Slowness Reports</a>\n" +
3011 10535 " </li>\n" +
3012 10536 "\n" +
3013 10537 " </ul>\n" +
3014 10538 " </li>\n" +
3015 10539 "\n" +
3016 10540 " <li>\n" +
3017 10541 " <a data-ui-sref=\"logs({resource:$ctrl.stateHolder.resource})\" data-uib-tooltip=\"Logs\" tooltip-placement=\"bottom\"><span class=\"fa fa-list-alt \"></span></a></li>\n" +
3018 10542 " <li>\n" +
3019 10543 " <a data-ui-sref=\"user\" data-uib-tooltip=\"Settings\" tooltip-placement=\"bottom\"><span class=\"fa fa-cog \"></span></a>\n" +
3020 10544 " </li>\n" +
3021 10545 " <li class=\"dropdown\" data-uib-dropdown data-ng-if=\"$ctrl.AeConfig.topNav.menuAdminItems.length\">\n" +
3022 10546 " <a class=\"dropdown-toggle\" data-uib-dropdown-toggle tooltip-placement=\"bottom\" data-uib-tooltip=\"Admin Settings\">\n" +
3023 10547 " <span class=\"fa fa-wrench\"></span></a>\n" +
3024 10548 " <ul class=\"dropdown-menu\">\n" +
3025 10549 " <li role=\"presentation\" ng-repeat=\"item in $ctrl.AeConfig.topNav.menuAdminItems\">\n" +
3026 10550 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3027 10551 " </li>\n" +
3028 10552 " </ul>\n" +
3029 10553 " </li>\n" +
3030 10554 " <li><a href=\"{{ $ctrl.AeConfig.urls.otherRoutes.signOut }}\" target=\"_self\"\n" +
3031 10555 " data-uib-tooltip=\"Sign out\" tooltip-placement=\"bottom\">\n" +
3032 10556 " <span class=\"fa fa-power-off \"></span></a></li>\n" +
3033 10557 " </ul>\n" +
3034 10558 " <ul class=\"nav navbar-nav pull-right\" ng-if=\"$ctrl.stateHolder.AeUser.id === null\">\n" +
3035 10559 " <li><a href=\"{{ $ctrl.AeConfig.urls.otherRoutes.register }}\" target=\"_self\" class=\"btn btn-orange\">Sign In</a></li>\n" +
3036 10560 " </ul>\n" +
3037 10561 " </div><!-- /.navbar-collapse -->\n" +
3038 10562 " </div><!-- /.container-fluid -->\n" +
3039 10563 " </div>\n" +
3040 10564 " </div>\n" +
3041 10565 "</div>\n"
3042 10566 );
3043 10567
3044 10568
3045 10569 $templateCache.put('components/views/admin-applications-list-view/admin-applications-list-view.html',
3046 10570 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
3047 10571 "\n" +
3048 10572 "<div class=\"panel panel-default\" ng-if=\"!$ctrl.loading.applications\">\n" +
3049 10573 " <div class=\"panel-heading\">\n" +
3050 10574 "\n" +
3051 10575 " Currently active applications: {{$ctrl.applications.length}}\n" +
3052 10576 "\n" +
3053 10577 " </div>\n" +
3054 10578 "\n" +
3055 10579 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.applications\" class=\"table table-striped\">\n" +
3056 10580 " <thead>\n" +
3057 10581 " <tr>\n" +
3058 10582 " <th st-sort=\"resource_name\"><a>Application name</a></th>\n" +
3059 10583 " <th st-sort=\"owner_user_name\"><a>Owner User</a></th>\n" +
3060 10584 " <th st-sort=\"owner_group_name\"><a>Owner Group</a></th>\n" +
3061 10585 " <th class=\"options\"></th>\n" +
3062 10586 " </tr>\n" +
3063 10587 " <tr>\n" +
3064 10588 " <th><input st-search=\"resource_name\" placeholder=\"search for application\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3065 10589 " <th><input st-search=\"owner_user_name\" placeholder=\"search for user\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3066 10590 " <th><input st-search=\"owner_group_name\" placeholder=\"search for group\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3067 10591 " <th></th>\n" +
3068 10592 " </tr>\n" +
3069 10593 " </thead>\n" +
3070 10594 " <tbody>\n" +
3071 10595 "\n" +
3072 10596 " <tr ng-repeat=\"resource in displayedCollection track by resource.resource_id\">\n" +
3073 10597 " <td> {{resource.resource_name}}</td>\n" +
3074 10598 " <td>{{resource.owner_user_name}}</td>\n" +
3075 10599 " <td>{{resource.owner_group_name}}</td>\n" +
3076 10600 " <td>\n" +
3077 10601 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"applications.update({resourceId:resource.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span></a>\n" +
3078 10602 " </td>\n" +
3079 10603 " </tr>\n" +
3080 10604 " <tfoot>\n" +
3081 10605 " <tr>\n" +
3082 10606 " <td colspan=\"4\" class=\"text-center\">\n" +
3083 10607 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3084 10608 " </td>\n" +
3085 10609 " </tr>\n" +
3086 10610 " </tfoot>\n" +
3087 10611 " </tbody>\n" +
3088 10612 " </table>\n" +
3089 10613 "\n" +
3090 10614 "</div>\n"
3091 10615 );
3092 10616
3093 10617
3094 10618 $templateCache.put('components/views/admin-configuration-view/admin-configuration-view.html',
3095 10619 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.config\"></ng-include>\n" +
3096 10620 "\n" +
3097 10621 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.config\">\n" +
3098 10622 " <div class=\"panel-heading\">\n" +
3099 10623 " <h3 class=\"panel-title\">Basic Configuration</h3>\n" +
3100 10624 " </div>\n" +
3101 10625 " <div class=\"panel-body\">\n" +
3102 10626 " <h2>Visual</h2>\n" +
3103 10627 " <form class=\"form-horizontal\">\n" +
3104 10628 " <div class=\"form-group\">\n" +
3105 10629 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3106 10630 " Footer HTML\n" +
3107 10631 " </label>\n" +
3108 10632 " <div class=\"col-sm-8 col-lg-9\">\n" +
3109 10633 " <textarea class=\"form-control\" type=\"text\" ng-model=\"$ctrl.configs.global.template_footer_html.value\" style=\"min-height: 150px\"></textarea>\n" +
3110 10634 " </div>\n" +
3111 10635 " </div>\n" +
3112 10636 " </form>\n" +
3113 10637 "\n" +
3114 10638 " <h2>Functional</h2>\n" +
3115 10639 "\n" +
3116 10640 " <form class=\"form-horizontal\">\n" +
3117 10641 " <div class=\"form-group\">\n" +
3118 10642 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3119 10643 " Show user groups to non-admin users\n" +
3120 10644 " </label>\n" +
3121 10645 " <div class=\"col-sm-8 col-lg-9\">\n" +
3122 10646 " <button type=\"button\" class=\"btn btn-default\" ng-model=\"$ctrl.configs.global.list_groups_to_non_admins.value\" uib-btn-checkbox>\n" +
3123 10647 " Enable\n" +
3124 10648 " </button>\n" +
3125 10649 " </div>\n" +
3126 10650 " </div>\n" +
3127 10651 " </form>\n" +
3128 10652 "\n" +
3129 10653 " <h2>Global Rate Limiting</h2>\n" +
3130 10654 "\n" +
3131 10655 " <form class=\"form-horizontal\">\n" +
3132 10656 " <div class=\"form-group\">\n" +
3133 10657 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3134 10658 " Ignore reports per minute/per application\n" +
3135 10659 " </label>\n" +
3136 10660 " <div class=\"col-sm-8 col-lg-9\">\n" +
3137 10661 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_reports_rate_limit.value\" />\n" +
3138 10662 " </div>\n" +
3139 10663 " </div>\n" +
3140 10664 "\n" +
3141 10665 " <div class=\"form-group\">\n" +
3142 10666 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3143 10667 " Ignore logs per minute/per application\n" +
3144 10668 " </label>\n" +
3145 10669 " <div class=\"col-sm-8 col-lg-9\">\n" +
3146 10670 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_logs_rate_limit.value\" />\n" +
3147 10671 " </div>\n" +
3148 10672 " </div>\n" +
3149 10673 "\n" +
3150 10674 " <div class=\"form-group\">\n" +
3151 10675 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
3152 10676 " Ignore metrics per minute/per application\n" +
3153 10677 " </label>\n" +
3154 10678 " <div class=\"col-sm-8 col-lg-9\">\n" +
3155 10679 " <input class=\"form-control\" type=\"number\" ng-model=\"$ctrl.configs.global.per_application_metrics_rate_limit.value\" />\n" +
3156 10680 " </div>\n" +
3157 10681 " </div>\n" +
3158 10682 "\n" +
3159 10683 " </form>\n" +
3160 10684 "\n" +
3161 10685 " <hr/>\n" +
3162 10686 "\n" +
3163 10687 " <a class=\"btn btn-primary\" ng-click=\"$ctrl.save()\">Save configuration</a>\n" +
3164 10688 " </div>\n" +
3165 10689 "\n" +
3166 10690 "</div>\n" +
3167 10691 "\n" +
3168 10692 "\n" +
3169 10693 "<div class=\"panel panel-default\">\n" +
3170 10694 " <div class=\"panel-heading\">\n" +
3171 10695 " <h3 class=\"panel-title\">Plugin Configuration</h3>\n" +
3172 10696 " </div>\n" +
3173 10697 " <div class=\"panel-body\">\n" +
3174 10698 " <plugin-config section=\"'admin.config'\">\n" +
3175 10699 " </plugin-config>\n" +
3176 10700 " </div>\n" +
3177 10701 "</div>\n"
3178 10702 );
3179 10703
3180 10704
3181 10705 $templateCache.put('components/views/admin-groups-create-view/admin-groups-create-view.html',
3182 10706 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.group\"></ng-include>\n" +
3183 10707 "\n" +
3184 10708 "<div ng-show=\"!$ctrl.loading.group\">\n" +
3185 10709 "\n" +
3186 10710 " <div class=\"panel panel-default\">\n" +
3187 10711 " <div class=\"panel-body\">\n" +
3188 10712 " <form name=\"$ctrl.groupForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.createGroup()\">\n" +
3189 10713 " <div class=\"form-group\" id=\"row-group_name\">\n" +
3190 10714 " <data-form-errors errors=\"$ctrl.groupForm.ae_validation.group_name\"></data-form-errors>\n" +
3191 10715 " <label for=\"group_name\" id=\"label-group_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3192 10716 " Group name\n" +
3193 10717 " <span class=\"required\">*</span>\n" +
3194 10718 " </label>\n" +
3195 10719 " <div class=\"col-sm-8 col-lg-9\">\n" +
3196 10720 " <input class=\"form-control\" id=\"group_name\" name=\"group_name\" type=\"text\" ng-model=\"$ctrl.group.group_name\">\n" +
3197 10721 " </div>\n" +
3198 10722 " </div>\n" +
3199 10723 "\n" +
3200 10724 " <div class=\"form-group\" id=\"row-description\">\n" +
3201 10725 " <data-form-errors errors=\"$ctrl.groupForm.ae_validation.description\"></data-form-errors>\n" +
3202 10726 " <label for=\"description\" id=\"label-description\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3203 10727 " Description\n" +
3204 10728 " <span class=\"required\">*</span>\n" +
3205 10729 " </label>\n" +
3206 10730 " <div class=\"col-sm-8 col-lg-9\">\n" +
3207 10731 " <input class=\"form-control\" id=\"description\" name=\"description\" type=\"text\" ng-model=\"$ctrl.group.description\">\n" +
3208 10732 " </div>\n" +
3209 10733 " </div>\n" +
3210 10734 "\n" +
3211 10735 "\n" +
3212 10736 " <div class=\"form-group\" id=\"row-submit\">\n" +
3213 10737 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3214 10738 " </label>\n" +
3215 10739 " <div class=\"col-sm-8 col-lg-9\">\n" +
3216 10740 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.$state.params.groupId ? 'Update' : 'Add'}} Group\">\n" +
3217 10741 " </div>\n" +
3218 10742 " </div>\n" +
3219 10743 " </form>\n" +
3220 10744 " </div>\n" +
3221 10745 " </div>\n" +
3222 10746 "\n" +
3223 10747 "\n" +
3224 10748 " <div class=\"panel panel-default\" ng-if=\"$ctrl.group.id\">\n" +
3225 10749 " <div class=\"panel-heading\">\n" +
3226 10750 " <h3 class=\"panel-title\">Permissions summary</h3>\n" +
3227 10751 " </div>\n" +
3228 10752 " <div class=\"panel-body\">\n" +
3229 10753 " <h3>Direct application permissions</h3>\n" +
3230 10754 "\n" +
3231 10755 " <ul class=\"list-group\">\n" +
3232 10756 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.group.application\" class=\"animate-repeat list-group-item\">\n" +
3233 10757 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3234 10758 "\n" +
3235 10759 " <div class=\"pull-right\">\n" +
3236 10760 "\n" +
3237 10761 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3238 10762 "\n" +
3239 10763 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
3240 10764 " <span class=\"fa fa-cog\"></span>\n" +
3241 10765 " </a>\n" +
3242 10766 " </div>\n" +
3243 10767 " </li>\n" +
3244 10768 " </ul>\n" +
3245 10769 "\n" +
3246 10770 " <h3>Direct dashboard permissions</h3>\n" +
3247 10771 "\n" +
3248 10772 " <ul class=\"list-group\">\n" +
3249 10773 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.group.dashboard\" class=\"animate-repeat list-group-item\">\n" +
3250 10774 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3251 10775 "\n" +
3252 10776 " <div class=\"pull-right\">\n" +
3253 10777 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3254 10778 "\n" +
3255 10779 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
3256 10780 " <span class=\"fa fa-cog\"></span>\n" +
3257 10781 " </a>\n" +
3258 10782 " </div>\n" +
3259 10783 " </li>\n" +
3260 10784 " </ul>\n" +
3261 10785 "\n" +
3262 10786 " </div>\n" +
3263 10787 "\n" +
3264 10788 " </div>\n" +
3265 10789 "\n" +
3266 10790 "\n" +
3267 10791 " <div class=\"panel panel-default\" ng-if=\"$ctrl.group.id\">\n" +
3268 10792 " <div class=\"panel-heading\">\n" +
3269 10793 " <h3 class=\"panel-title\">User list</h3>\n" +
3270 10794 " </div>\n" +
3271 10795 " <div class=\"panel-body\">\n" +
3272 10796 "\n" +
3273 10797 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"$ctrl.addUser()\">\n" +
3274 10798 " <div class=\"form-group\">\n" +
3275 10799 " <input placeholder=\"Username or email\" type=\"text\" class=\"autocomplete form-control\" ng-model=\"$ctrl.form.autocompleteUser\" uib-typeahead=\"u for u in $ctrl.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"searchingUsers\" typeahead-wait-ms=\"250\"/>\n" +
3276 10800 " </div>\n" +
3277 10801 " <div class=\"form-group\">\n" +
3278 10802 " <button class=\"btn btn-info\" ng-disabled=\"!$ctrl.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Add user</button>\n" +
3279 10803 " </div>\n" +
3280 10804 " </form>\n" +
3281 10805 "\n" +
3282 10806 " </div>\n" +
3283 10807 "\n" +
3284 10808 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.users\" class=\"table table-striped\">\n" +
3285 10809 " <thead>\n" +
3286 10810 " <tr>\n" +
3287 10811 " <th st-sort=\"user_name\"><a>Username</a></th>\n" +
3288 10812 " <th st-sort=\"email\"><a>Email</a></th>\n" +
3289 10813 " <th st-sort=\"status\"><a>Status</a></th>\n" +
3290 10814 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
3291 10815 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
3292 10816 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
3293 10817 " <th class=\"options\" style=\"width: 130px\"></th>\n" +
3294 10818 " </tr>\n" +
3295 10819 " <tr>\n" +
3296 10820 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3297 10821 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3298 10822 " <th></th>\n" +
3299 10823 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3300 10824 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3301 10825 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3302 10826 " <th></th>\n" +
3303 10827 " </tr>\n" +
3304 10828 " </thead>\n" +
3305 10829 " <tbody>\n" +
3306 10830 "\n" +
3307 10831 " <tr ng-repeat=\"user in displayedCollection\">\n" +
3308 10832 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
3309 10833 " <td>{{user.email}}</td>\n" +
3310 10834 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
3311 10835 " <td>{{user.first_name}}</td>\n" +
3312 10836 " <td>{{user.last_name}}</td>\n" +
3313 10837 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
3314 10838 " <td>\n" +
3315 10839 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3316 10840 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3317 10841 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3318 10842 " <ul class=\"dropdown-menu\">\n" +
3319 10843 " <li><a>No</a></li>\n" +
3320 10844 " <li><a ng-click=\"$ctrl.removeUser(user)\">Yes</a></li>\n" +
3321 10845 " </ul>\n" +
3322 10846 " </span>\n" +
3323 10847 " </tr>\n" +
3324 10848 " <tfoot>\n" +
3325 10849 " <tr>\n" +
3326 10850 " <td colspan=\"7\" class=\"text-center\">\n" +
3327 10851 " <div st-pagination=\"\" st-items-by-page=\"50\" st-displayed-pages=\"7\"></div>\n" +
3328 10852 " </td>\n" +
3329 10853 " </tr>\n" +
3330 10854 " </tfoot>\n" +
3331 10855 " </tbody>\n" +
3332 10856 " </table>\n" +
3333 10857 "\n" +
3334 10858 " </div>\n" +
3335 10859 "\n" +
3336 10860 "\n" +
3337 10861 "</div>\n"
3338 10862 );
3339 10863
3340 10864
3341 10865 $templateCache.put('components/views/admin-groups-list-view/admin-groups-list-view.html',
3342 10866 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.groups\"></ng-include>\n" +
3343 10867 "\n" +
3344 10868 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.groups\">\n" +
3345 10869 "\n" +
3346 10870 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.groups\" class=\"table table-striped\">\n" +
3347 10871 " <thead>\n" +
3348 10872 " <tr>\n" +
3349 10873 " <th st-sort=\"group_name\"><a>Group name</a></th>\n" +
3350 10874 " <th st-sort=\"description\"><a>Description</a></th>\n" +
3351 10875 " <th st-sort=\"members\"><a>Member count</a></th>\n" +
3352 10876 " <th class=\"options\"></th>\n" +
3353 10877 " </tr>\n" +
3354 10878 " <tr>\n" +
3355 10879 " <th><input st-search=\"group_name\" placeholder=\"search for group name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3356 10880 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3357 10881 " <th></th>\n" +
3358 10882 " <th></th>\n" +
3359 10883 " </tr>\n" +
3360 10884 " </thead>\n" +
3361 10885 " <tbody>\n" +
3362 10886 "\n" +
3363 10887 " <tr ng-repeat=\"group in displayedCollection track by group.id\">\n" +
3364 10888 " <td>{{group.group_name}}</td>\n" +
3365 10889 " <td>{{group.description}}</td>\n" +
3366 10890 " <td>{{group.member_count}}</td>\n" +
3367 10891 " <td>\n" +
3368 10892 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.group.update({groupId:group.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3369 10893 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3370 10894 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3371 10895 " <ul class=\"dropdown-menu\">\n" +
3372 10896 " <li><a>No</a></li>\n" +
3373 10897 " <li><a ng-click=\"$ctrl.removeGroup(group)\">Yes</a></li>\n" +
3374 10898 " </ul>\n" +
3375 10899 " </span>\n" +
3376 10900 " </tr>\n" +
3377 10901 " <tfoot>\n" +
3378 10902 " <tr>\n" +
3379 10903 " <td colspan=\"4\" class=\"text-center\">\n" +
3380 10904 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3381 10905 " </td>\n" +
3382 10906 " </tr>\n" +
3383 10907 " </tfoot>\n" +
3384 10908 " </tbody>\n" +
3385 10909 " </table>\n" +
3386 10910 "\n" +
3387 10911 "</div>\n" +
3388 10912 "\n"
3389 10913 );
3390 10914
3391 10915
3392 10916 $templateCache.put('components/views/admin-partitions-view/admin-partitions-view.html',
3393 10917 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.partitions\"></ng-include>\n" +
3394 10918 "\n" +
3395 10919 "<div ng-show=\"!$ctrl.loading.partitions\">\n" +
3396 10920 "\n" +
3397 10921 " <div class=\"panel panel-default\">\n" +
3398 10922 " <div class=\"panel-heading\">\n" +
3399 10923 " DELETE Daily Partitions\n" +
3400 10924 " </div>\n" +
3401 10925 "\n" +
3402 10926 " <form name=\"$ctrl.dailyPartitionsForm\"\n" +
3403 10927 " novalidate ng-submit=\"$ctrl.partitionsDelete('dailyPartitions')\"\n" +
3404 10928 " class=\"form-inline\"\n" +
3405 10929 " ng-class=\"{'has-error':$ctrl.dailyPartitionsForm.$invalid}\">\n" +
3406 10930 "\n" +
3407 10931 " <div class=\"panel-body\">\n" +
3408 10932 "\n" +
3409 10933 " <input type=\"text\" name=\"confirm\"\n" +
3410 10934 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control input-autosize\" confirm-validate required ng-model=\"$ctrl.dailyConfirm\">\n" +
3411 10935 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"$ctrl.dailyPartitionsForm.$invalid\">\n" +
3412 10936 " <input type=\"checkbox\" ng-model=\"$ctrl.dailyChecked\" ng-change=\"$ctrl.setCheckedList('dailyPartitions')\"> Check All\n" +
3413 10937 "\n" +
3414 10938 " </div>\n" +
3415 10939 "\n" +
3416 10940 " <table class=\"table table-striped\">\n" +
3417 10941 " <tr>\n" +
3418 10942 " <th class=\"c1 date\">Date</th>\n" +
3419 10943 " <th class=\"c2 indices\">Indices</th>\n" +
3420 10944 " </tr>\n" +
3421 10945 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.dailyPartitions\">\n" +
3422 10946 " <td class=\"c1\">{{row[0]}}</td>\n" +
3423 10947 " <td class=\"c2\">\n" +
3424 10948 " <ul class=\"list-group\">\n" +
3425 10949 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
3426 10950 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
3427 10951 " </li>\n" +
3428 10952 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
3429 10953 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
3430 10954 " </li>\n" +
3431 10955 " </ul>\n" +
3432 10956 " </td>\n" +
3433 10957 " </tr>\n" +
3434 10958 " </table>\n" +
3435 10959 " </form>\n" +
3436 10960 "\n" +
3437 10961 " </div>\n" +
3438 10962 "\n" +
3439 10963 " <div class=\"panel panel-default\">\n" +
3440 10964 " <div class=\"panel-heading\">\n" +
3441 10965 " DELETE Permanent Partitions\n" +
3442 10966 " </div>\n" +
3443 10967 "\n" +
3444 10968 " <form name=\"$ctrl.permanentPartitionsForm\" novalidate\n" +
3445 10969 " ng-submit=\"$ctrl.partitionsDelete('permanentPartitions')\"\n" +
3446 10970 " class=\"form-inline\"\n" +
3447 10971 " ng-class=\"{'has-error':$ctrl.permanentPartitionsForm.$invalid}\">\n" +
3448 10972 "\n" +
3449 10973 "\n" +
3450 10974 " <div class=\"panel-body\">\n" +
3451 10975 "\n" +
3452 10976 " <div class=\"form-group\">\n" +
3453 10977 " <input type=\"text\" name=\"confirm\"\n" +
3454 10978 " placeholder=\"Enter CONFIRM to proceed\" class=\"form-control\" confirm-validate required ng-model=\"$ctrl.permConfirm\">\n" +
3455 10979 " <input type=\"submit\" class=\"btn btn-danger\" ng-disabled=\"$ctrl.permanentPartitionsForm.$invalid\">\n" +
3456 10980 " <input type=\"checkbox\" ng-model=\"$ctrl.permChecked\" ng-change=\"$ctrl.setCheckedList('permanentPartitions')\"> Check All\n" +
3457 10981 " </div>\n" +
3458 10982 "\n" +
3459 10983 " </div>\n" +
3460 10984 "\n" +
3461 10985 " <table class=\"table table-striped\">\n" +
3462 10986 " <tr>\n" +
3463 10987 " <th class=\"c1 date\">Date</th>\n" +
3464 10988 " <th class=\"c2 indices\">Indices</th>\n" +
3465 10989 " </tr>\n" +
3466 10990 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.permanentPartitions\">\n" +
3467 10991 " <td class=\"c1\">{{row[0]}}</td>\n" +
3468 10992 " <td class=\"c2\">\n" +
3469 10993 " <ul class=\"list-group\">\n" +
3470 10994 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].elasticsearch\">\n" +
3471 10995 " <input name=\"es_index\" type=\"checkbox\" ng-model=\"partition.checked\"> ES: {{partition.name}}\n" +
3472 10996 " </li>\n" +
3473 10997 " <li class=\"list-group-item\" ng-repeat=\"partition in row[1].pg\">\n" +
3474 10998 " <input name=\"pg_index\" type=\"checkbox\" ng-model=\"partition.checked\"> PG: {{partition.name}}\n" +
3475 10999 " </li>\n" +
3476 11000 " </ul>\n" +
3477 11001 " </td>\n" +
3478 11002 " </tr>\n" +
3479 11003 " </table>\n" +
3480 11004 " </form>\n" +
3481 11005 "\n" +
3482 11006 " </div>\n" +
3483 11007 "\n" +
3484 11008 "</div>\n"
3485 11009 );
3486 11010
3487 11011
3488 11012 $templateCache.put('components/views/admin-system-view/admin-system-view.html',
3489 11013 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.system\"></ng-include>\n" +
3490 11014 "\n" +
3491 11015 "<div ng-if=\"$ctrl.loading.system == false\">\n" +
3492 11016 " <div class=\"row\">\n" +
3493 11017 " <div class=\"col-sm-12\">\n" +
3494 11018 " <div class=\"panel panel-default\">\n" +
3495 11019 " <div class=\"panel-heading\">\n" +
3496 11020 " <h3 class=\"panel-title\">\n" +
3497 11021 " System Info\n" +
3498 11022 " </h3>\n" +
3499 11023 " </div>\n" +
3500 11024 " <div class=\"panel-body\">\n" +
3501 11025 "\n" +
3502 11026 " <p><strong>System Load:</strong>\n" +
3503 11027 " 1min: {{$ctrl.systemLoad[0]}}, 5min: {{$ctrl.systemLoad[1]}}, 15min: {{$ctrl.systemLoad[2]}}\n" +
3504 11028 " </p>\n" +
3505 11029 " <p><strong>Awaiting tasks:</strong>\n" +
3506 11030 " <ul>\n" +
3507 11031 " <li>reports: {{$ctrl.queueStats.waiting_reports}}</li>\n" +
3508 11032 " <li>logs: {{$ctrl.queueStats.waiting_logs}}</li>\n" +
3509 11033 " <li>metrics: {{$ctrl.queueStats.waiting_metrics}}</li>\n" +
3510 11034 " <li>other: {{$ctrl.queueStats.waiting_other}}</li>\n" +
3511 11035 " </ul>\n" +
3512 11036 " </p>\n" +
3513 11037 " <p><strong>Queue stats from last minute:</strong>\n" +
3514 11038 " <ul>\n" +
3515 11039 " <li>Processed reports: {{$ctrl.queueStats.processed_reports}}</li>\n" +
3516 11040 " <li>Processed logs: {{$ctrl.queueStats.processed_logs}}</li>\n" +
3517 11041 " <li>Processed metrics: {{$ctrl.queueStats.processed_metrics}}</li>\n" +
3518 11042 " </ul>\n" +
3519 11043 " </p>\n" +
3520 11044 "\n" +
3521 11045 " <p><strong>Disks:</strong>\n" +
3522 11046 " <ul>\n" +
3523 11047 " <li ng-repeat=\"disk in $ctrl.disks\">\n" +
3524 11048 " <strong>{{disk.device}}</strong> {{disk.free}}/{{disk.total}}, {{disk.percentage}}% used\n" +
3525 11049 " </li>\n" +
3526 11050 " </ul>\n" +
3527 11051 " </p>\n" +
3528 11052 "\n" +
3529 11053 " <p><strong>Process stats:</strong>\n" +
3530 11054 " <ul>\n" +
3531 11055 " <li>FD soft limits: {{$ctrl.selfInfo.fds.soft}}</li>\n" +
3532 11056 " <li>FD hard limits: {{$ctrl.selfInfo.fds.hard}}</li>\n" +
3533 11057 " <li>Memlock soft limits: {{$ctrl.selfInfo.memlock.soft}}</li>\n" +
3534 11058 " <li>Memlock hard limits: {{$ctrl.selfInfo.memlock.hard}}</li>\n" +
3535 11059 " </ul>\n" +
3536 11060 " </p>\n" +
3537 11061 "\n" +
3538 11062 " </div>\n" +
3539 11063 " </div>\n" +
3540 11064 " </div>\n" +
3541 11065 " </div>\n" +
3542 11066 " <div class=\"row\">\n" +
3543 11067 " <div class=\"col-sm-12\">\n" +
3544 11068 "\n" +
3545 11069 " <div class=\"panel panel-default\">\n" +
3546 11070 " <div class=\"panel-body\">\n" +
3547 11071 "\n" +
3548 11072 " <uib-tabset>\n" +
3549 11073 " <uib-tab>\n" +
3550 11074 " <uib-tab-heading>\n" +
3551 11075 " Postgresql Tables\n" +
3552 11076 " </uib-tab-heading>\n" +
3553 11077 "\n" +
3554 11078 " <table class=\"table table-striped\">\n" +
3555 11079 " <thead>\n" +
3556 11080 " <tr>\n" +
3557 11081 " <th class=\"c1 tablename\">Table name</th>\n" +
3558 11082 " <th class=\"c2 size_human\">Size</th>\n" +
3559 11083 " </tr>\n" +
3560 11084 " </thead>\n" +
3561 11085 " <tbody>\n" +
3562 11086 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.DBtables\">\n" +
3563 11087 " <td class=\"c1\">{{row.table_name}}</td>\n" +
3564 11088 " <td class=\"c2\">{{row.size_human}}</td>\n" +
3565 11089 " </tr>\n" +
3566 11090 " </tbody>\n" +
3567 11091 " </table>\n" +
3568 11092 "\n" +
3569 11093 " </uib-tab>\n" +
3570 11094 "\n" +
3571 11095 " <uib-tab>\n" +
3572 11096 " <uib-tab-heading>\n" +
3573 11097 " Elasticsearch Indices\n" +
3574 11098 " </uib-tab-heading>\n" +
3575 11099 "\n" +
3576 11100 " <table class=\"table table-striped\">\n" +
3577 11101 " <thead>\n" +
3578 11102 " <tr>\n" +
3579 11103 " <th class=\"c1 tablename\">Index name</th>\n" +
3580 11104 " <th class=\"c2 size_human\">Size</th>\n" +
3581 11105 " </tr>\n" +
3582 11106 " </thead>\n" +
3583 11107 " <tbody>\n" +
3584 11108 " <tr class=\"r{{$index}}\" ng-repeat=\"row in $ctrl.ESIndices\">\n" +
3585 11109 " <td class=\"c1\">{{row.name}}</td>\n" +
3586 11110 " <td class=\"c2\">{{row.size_human}}</td>\n" +
3587 11111 " </tr>\n" +
3588 11112 " </tbody>\n" +
3589 11113 " </table>\n" +
3590 11114 "\n" +
3591 11115 " </uib-tab>\n" +
3592 11116 "\n" +
3593 11117 " <uib-tab>\n" +
3594 11118 " <uib-tab-heading>\n" +
3595 11119 " Processes\n" +
3596 11120 " </uib-tab-heading>\n" +
3597 11121 "\n" +
3598 11122 " <table class=\"table table-striped\">\n" +
3599 11123 " <thead>\n" +
3600 11124 " <tr>\n" +
3601 11125 " <th class=\"c1 tablename\">Owner</th>\n" +
3602 11126 " <th class=\"c2 tablename\">PID</th>\n" +
3603 11127 " <th class=\"c3 tablename\">CPU</th>\n" +
3604 11128 " <th class=\"c4 tablename\">MEM</th>\n" +
3605 11129 " <th class=\"c4 tablename\">Name</th>\n" +
3606 11130 " </tr>\n" +
3607 11131 " </thead>\n" +
3608 11132 " <tbody>\n" +
3609 11133 " <tr class=\"r{{$index}}\" ng-repeat-start=\"row in $ctrl.processInfo\">\n" +
3610 11134 " <td class=\"c1\">{{row.owner}}</td>\n" +
3611 11135 " <td class=\"c2\">{{row.pid}}</td>\n" +
3612 11136 " <td class=\"c3\">{{row.cpu}}</td>\n" +
3613 11137 " <td class=\"c4\">{{row.mem_usage}} ({{row.mem_percentage}}%)</td>\n" +
3614 11138 " <td class=\"c5\"><strong>{{row.name}}</strong></td>\n" +
3615 11139 " </tr>\n" +
3616 11140 " <tr ng-repeat-end>\n" +
3617 11141 " <td colspan=\"5\" class=\"word-wrap\">{{row.command}}</td>\n" +
3618 11142 " </tr>\n" +
3619 11143 " </tbody>\n" +
3620 11144 " </table>\n" +
3621 11145 "\n" +
3622 11146 " </uib-tab>\n" +
3623 11147 "\n" +
3624 11148 " <uib-tab>\n" +
3625 11149 " <uib-tab-heading>\n" +
3626 11150 " Python packages\n" +
3627 11151 " </uib-tab-heading>\n" +
3628 11152 "\n" +
3629 11153 " <table class=\"table\">\n" +
3630 11154 " <tr ng-repeat=\"package in $ctrl.packages\">\n" +
3631 11155 " <td>{{package.name}}</td>\n" +
3632 11156 " <td>{{package.version}}</td>\n" +
3633 11157 " </tr>\n" +
3634 11158 " </table>\n" +
3635 11159 " </p>\n" +
3636 11160 "\n" +
3637 11161 " </uib-tab>\n" +
3638 11162 "\n" +
3639 11163 " </uib-tabset>\n" +
3640 11164 " </div>\n" +
3641 11165 " </div>\n" +
3642 11166 " </div>\n" +
3643 11167 " </div>\n" +
3644 11168 "</div>\n"
3645 11169 );
3646 11170
3647 11171
3648 11172 $templateCache.put('components/views/admin-users-create-view/admin-users-create-view.html',
3649 11173 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.user\"></ng-include>\n" +
3650 11174 "\n" +
3651 11175 "<div ng-show=\"!$ctrl.loading.user\">\n" +
3652 11176 "\n" +
3653 11177 " <div class=\"panel panel-default\">\n" +
3654 11178 " <div class=\"panel-body\">\n" +
3655 11179 "\n" +
3656 11180 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"$ctrl.user.id\">\n" +
3657 11181 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-user-secret\"></span> Re-login to user</a>\n" +
3658 11182 " <ul class=\"dropdown-menu\">\n" +
3659 11183 " <li><a>No</a></li>\n" +
3660 11184 " <li><a ng-click=\"$ctrl.reloginUser(user)\">Yes</a></li>\n" +
3661 11185 " </ul>\n" +
3662 11186 " </span>\n" +
3663 11187 "\n" +
3664 11188 " <form name=\"$ctrl.profileForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.createUser()\">\n" +
3665 11189 " <div class=\"form-group\" id=\"row-user_name\">\n" +
3666 11190 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.user_name\"></data-form-errors>\n" +
3667 11191 " <label for=\"user_name\" id=\"label-user_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3668 11192 " User name\n" +
3669 11193 " <span class=\"required\">*</span>\n" +
3670 11194 " </label>\n" +
3671 11195 " <div class=\"col-sm-8 col-lg-9\">\n" +
3672 11196 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.user.user_name\">\n" +
3673 11197 " </div>\n" +
3674 11198 " </div>\n" +
3675 11199 "\n" +
3676 11200 " <div class=\"form-group\" id=\"row-user_password\">\n" +
3677 11201 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.user_password\"></data-form-errors>\n" +
3678 11202 " <label for=\"user_password\" id=\"label-user_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3679 11203 " Password\n" +
3680 11204 " <span class=\"required\">*</span>\n" +
3681 11205 " </label>\n" +
3682 11206 " <div class=\"col-sm-8 col-lg-9\">\n" +
3683 11207 " <input class=\"form-control\" id=\"user_password\" name=\"user_password\" type=\"password\" ng-model=\"$ctrl.user.user_password\">\n" +
3684 11208 "\n" +
3685 11209 " <p class=\"m-t-1\"><a class=\"btn btn-info btn-sm\" ng-click=\"$ctrl.generatePassword()\"><span class=\"fa fa-lock\"></span> Generate password</a>\n" +
3686 11210 " <span ng-show=\"$ctrl.gen_pass.length > 0\">(generated password: {{$ctrl.gen_pass}})</span>\n" +
3687 11211 " </p>\n" +
3688 11212 "\n" +
3689 11213 " </div>\n" +
3690 11214 " </div>\n" +
3691 11215 "\n" +
3692 11216 "\n" +
3693 11217 " <div class=\"form-group\" id=\"row-email\">\n" +
3694 11218 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.email\"></data-form-errors>\n" +
3695 11219 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3696 11220 " Email Address\n" +
3697 11221 " <span class=\"required\">*</span>\n" +
3698 11222 " </label>\n" +
3699 11223 " <div class=\"col-sm-8 col-lg-9\">\n" +
3700 11224 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"$ctrl.user.email\">\n" +
3701 11225 " </div>\n" +
3702 11226 " </div>\n" +
3703 11227 "\n" +
3704 11228 " <div class=\"form-group\" id=\"row-first_name\">\n" +
3705 11229 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
3706 11230 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3707 11231 " First Name\n" +
3708 11232 " </label>\n" +
3709 11233 " <div class=\"col-sm-8 col-lg-9\">\n" +
3710 11234 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"$ctrl.user.first_name\">\n" +
3711 11235 " </div>\n" +
3712 11236 " </div>\n" +
3713 11237 " <div class=\"form-group\" id=\"row-last_name\">\n" +
3714 11238 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
3715 11239 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3716 11240 " Last Name\n" +
3717 11241 " </label>\n" +
3718 11242 " <div class=\"col-sm-8 col-lg-9\">\n" +
3719 11243 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"$ctrl.user.last_name\">\n" +
3720 11244 " </div>\n" +
3721 11245 " </div>\n" +
3722 11246 "\n" +
3723 11247 " <div class=\"form-group\" id=\"row-status\">\n" +
3724 11248 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.status\"></data-form-errors>\n" +
3725 11249 " <label for=\"status\" id=\"label-status\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3726 11250 " Active\n" +
3727 11251 " </label>\n" +
3728 11252 " <div class=\"col-sm-8 col-lg-9\">\n" +
3729 11253 " <input checked class=\"form-control\" id=\"status\" name=\"status\" type=\"checkbox\" ng-model=\"$ctrl.user.status\">\n" +
3730 11254 " </div>\n" +
3731 11255 " </div>\n" +
3732 11256 "\n" +
3733 11257 " <div class=\"form-group\" id=\"row-submit\">\n" +
3734 11258 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
3735 11259 " </label>\n" +
3736 11260 " <div class=\"col-sm-8 col-lg-9\">\n" +
3737 11261 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.$state.params.userId ? 'Update' : 'Add'}} User\">\n" +
3738 11262 " </div>\n" +
3739 11263 " </div>\n" +
3740 11264 " </form>\n" +
3741 11265 " </div>\n" +
3742 11266 " </div>\n" +
3743 11267 "\n" +
3744 11268 "\n" +
3745 11269 " <div class=\"panel panel-default\" ng-if=\"$ctrl.user.id\">\n" +
3746 11270 " <div class=\"panel-heading\">\n" +
3747 11271 " <h3 class=\"panel-title\">Permission Summary</h3>\n" +
3748 11272 " </div>\n" +
3749 11273 " <div class=\"panel-body\">\n" +
3750 11274 " <h3>Direct application permissions</h3>\n" +
3751 11275 "\n" +
3752 11276 " <ul class=\"list-group\">\n" +
3753 11277 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.user.application\" class=\"animate-repeat list-group-item\">\n" +
3754 11278 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3755 11279 " <div class=\"pull-right\">\n" +
3756 11280 "\n" +
3757 11281 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3758 11282 "\n" +
3759 11283 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Application\" data-ui-sref=\"applications.update({resourceId:perm.self.resource_id})\">\n" +
3760 11284 " <span class=\"fa fa-cog\"></span>\n" +
3761 11285 " </a>\n" +
3762 11286 " </div>\n" +
3763 11287 " </li>\n" +
3764 11288 " </ul>\n" +
3765 11289 "\n" +
3766 11290 " <h3>Direct dashboard permissions</h3>\n" +
3767 11291 "\n" +
3768 11292 " <ul class=\"list-group\">\n" +
3769 11293 " <li ng-repeat=\"perm in $ctrl.resourcePermissions.user.dashboard\" class=\"animate-repeat list-group-item\">\n" +
3770 11294 " <strong>{{ perm.self.resource_name }}</strong>\n" +
3771 11295 " <div class=\"pull-right\">\n" +
3772 11296 "\n" +
3773 11297 " <span class=\"btn btn-primary btn-xs m-r-1\" disabled ng-repeat=\"perm_name in perm.permissions\">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span>\n" +
3774 11298 "\n" +
3775 11299 " <a class=\"btn btn-default btn-xs\" data-uib-tooltip=\"Visit Dashboard\" data-ui-sref=\"dashboard.update({resourceId:perm.self.resource_id})\">\n" +
3776 11300 " <span class=\"fa fa-cog\"></span>\n" +
3777 11301 " </a>\n" +
3778 11302 " </div>\n" +
3779 11303 " </li>\n" +
3780 11304 " </ul>\n" +
3781 11305 "\n" +
3782 11306 " </div>\n" +
3783 11307 "\n" +
3784 11308 " </div>\n" +
3785 11309 "\n" +
3786 11310 "\n" +
3787 11311 "</div>\n"
3788 11312 );
3789 11313
3790 11314
3791 11315 $templateCache.put('components/views/admin-users-list-view/admin-users-list-view.html',
3792 11316 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.users\"></ng-include>\n" +
3793 11317 "\n" +
3794 11318 "<div ng-show=\"!$ctrl.loading.users\">\n" +
3795 11319 "\n" +
3796 11320 " <div class=\"panel panel-default\">\n" +
3797 11321 "\n" +
3798 11322 " <div class=\"panel-heading\">\n" +
3799 11323 " {{$ctrl.activeUsers}} active out of {{$ctrl.users.length}} users\n" +
3800 11324 " </div>\n" +
3801 11325 "\n" +
3802 11326 "\n" +
3803 11327 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.users\" class=\"table table-striped\">\n" +
3804 11328 " <thead>\n" +
3805 11329 " <tr>\n" +
3806 11330 " <th class=\"user_name\" st-sort=\"user_name\"><a>Username</a></th>\n" +
3807 11331 " <th class=\"email\" st-sort=\"email\"><a>Email</a></th>\n" +
3808 11332 " <th class=\"status\" st-sort=\"status\"><a>Status</a></th>\n" +
3809 11333 " <th st-sort=\"first_name\"><a>First Name</a></th>\n" +
3810 11334 " <th st-sort=\"last_name\"><a>Last Name</a></th>\n" +
3811 11335 " <th st-sort=\"last_login_date\"><a>Last login</a></th>\n" +
3812 11336 " <th class=\"options\"></th>\n" +
3813 11337 " </tr>\n" +
3814 11338 " <tr>\n" +
3815 11339 " <th><input st-search=\"user_name\" placeholder=\"search for user name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3816 11340 " <th><input st-search=\"email\" placeholder=\"search for email\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3817 11341 " <th></th>\n" +
3818 11342 " <th><input st-search=\"first_name\" placeholder=\"search for first name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3819 11343 " <th><input st-search=\"last_name\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3820 11344 " <th><input st-search=\"last_login_date\" placeholder=\"search for last name\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
3821 11345 " <th></th>\n" +
3822 11346 " </tr>\n" +
3823 11347 " </thead>\n" +
3824 11348 " <tbody>\n" +
3825 11349 "\n" +
3826 11350 " <tr ng-repeat=\"user in displayedCollection track by user.id\">\n" +
3827 11351 " <td><img src=\"{{user.gravatar_url}}\" class=\"avatar\"> {{user.user_name}}</td>\n" +
3828 11352 " <td class=\"word-wrap small\">{{user.email}}</td>\n" +
3829 11353 " <td class=\"text-center\"><span class=\"fa\" ng-class=\"{'fa-check-circle':user.status, 'fa-times':!user.status}\"></span></td>\n" +
3830 11354 " <td class=\"word-wrap small\">{{user.first_name}}</td>\n" +
3831 11355 " <td class=\"word-wrap small\">{{user.last_name}}</td>\n" +
3832 11356 " <td><span data-uib-tooltip=\"{{user.last_login_date}}\" class=\"small\">{{user.last_login_date | isoToRelativeTime}}</span></td>\n" +
3833 11357 " <td>\n" +
3834 11358 " <a class=\"btn btn-default btn-sm\" data-ui-sref=\"admin.user.update({userId:user.id})\"><span class=\"fa fa-cog\"></span></a>\n" +
3835 11359 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
3836 11360 " <a class=\"btn btn-danger btn-sm\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
3837 11361 " <ul class=\"dropdown-menu\">\n" +
3838 11362 " <li><a>No</a></li>\n" +
3839 11363 " <li><a ng-click=\"$ctrl.removeUser(user)\">Yes</a></li>\n" +
3840 11364 " </ul>\n" +
3841 11365 " </span>\n" +
3842 11366 " </tr>\n" +
3843 11367 " <tfoot>\n" +
3844 11368 " <tr>\n" +
3845 11369 " <td colspan=\"6\" class=\"text-center\">\n" +
3846 11370 " <div st-pagination=\"\" st-items-by-page=\"100\" st-displayed-pages=\"7\"></div>\n" +
3847 11371 " </td>\n" +
3848 11372 " </tr>\n" +
3849 11373 " </tfoot>\n" +
3850 11374 " </tbody>\n" +
3851 11375 " </table>\n" +
3852 11376 "\n" +
3853 11377 "\n" +
3854 11378 " </div>\n" +
3855 11379 "</div>\n"
3856 11380 );
3857 11381
3858 11382
3859 11383 $templateCache.put('components/views/admin-view/admin-view.html',
3860 11384 "<div class=\"row\">\n" +
3861 11385 " <div class=\"col-sm-3\" id=\"menu\">\n" +
3862 11386 " <div class=\"panel panel-default\">\n" +
3863 11387 " <div class=\"panel-heading\">Users and groups</div>\n" +
3864 11388 " <ul class=\"list-group\">\n" +
3865 11389 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.list\"> Users</a></li>\n" +
3866 11390 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.user.create\"> Create user</a></li>\n" +
3867 11391 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.list\"> Groups</a></li>\n" +
3868 11392 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.group.create\"> Create group</a></li>\n" +
3869 11393 " </ul>\n" +
3870 11394 "\n" +
3871 11395 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuUsersItems.length\">\n" +
3872 11396 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuUsersItems\">\n" +
3873 11397 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3874 11398 " </li>\n" +
3875 11399 " </ul>\n" +
3876 11400 "\n" +
3877 11401 " </div>\n" +
3878 11402 " <div class=\"panel panel-default\">\n" +
3879 11403 " <div class=\"panel-heading\">Resources</div>\n" +
3880 11404 " <ul class=\"list-group\">\n" +
3881 11405 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.application.list\"> List applications</a></li>\n" +
3882 11406 " </ul>\n" +
3883 11407 "\n" +
3884 11408 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuResourcesItems.length\">\n" +
3885 11409 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuResourcesItems\">\n" +
3886 11410 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3887 11411 " </li>\n" +
3888 11412 " </ul>\n" +
3889 11413 "\n" +
3890 11414 " </div>\n" +
3891 11415 "\n" +
3892 11416 " <div class=\"panel panel-default\">\n" +
3893 11417 " <div class=\"panel-heading\">System</div>\n" +
3894 11418 " <ul class=\"list-group\">\n" +
3895 11419 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.configs.list\"> Config variables</a></li>\n" +
3896 11420 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.system\"> System</a></li>\n" +
3897 11421 " <li class=\"list-group-item\" ui-sref-active=\"active\"><a data-ui-sref=\"admin.partitions\"> Partition Management</a></li>\n" +
3898 11422 " </ul>\n" +
3899 11423 "\n" +
3900 11424 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.adminNav.menuSystemItems.length\">\n" +
3901 11425 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.adminNav.menuSystemItems\">\n" +
3902 11426 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
3903 11427 " </li>\n" +
3904 11428 " </ul>\n" +
3905 11429 "\n" +
3906 11430 " </div>\n" +
3907 11431 " </div>\n" +
3908 11432 "\n" +
3909 11433 " <div class=\"col-sm-9\" ui-view></div>\n" +
3910 11434 "</div>\n"
3911 11435 );
3912 11436
3913 11437
3914 11438 $templateCache.put('components/views/applications-integrations-view/applications-integrations-view.html',
3915 11439 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application && $state.is('applications.integrations')\"></ng-include>\n" +
3916 11440 "\n" +
3917 11441 "<ui-view>\n" +
3918 11442 " <div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application\">\n" +
3919 11443 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3920 11444 " <div class=\"panel-body\">\n" +
3921 11445 "\n" +
3922 11446 " <a class=\"btn btn-default integration\"\n" +
3923 11447 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'bitbucket'})\">\n" +
3924 11448 " <span class=\"fa fa-fw fa-bitbucket fa-3x pull-left\"></span>\n" +
3925 11449 " <strong>Bitbucket</strong>\n" +
3926 11450 "\n" +
3927 11451 " <p>Send issues and reports to Bitbucket</p>\n" +
3928 11452 " </a>\n" +
3929 11453 "\n" +
3930 11454 " <a class=\"btn btn-default integration\"\n" +
3931 11455 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'campfire'})\">\n" +
3932 11456 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3933 11457 " <strong>Campfire</strong>\n" +
3934 11458 "\n" +
3935 11459 " <p>Receive reports and alerts in your Campfire rooms</p>\n" +
3936 11460 " </a>\n" +
3937 11461 "\n" +
3938 11462 " <a class=\"btn btn-default integration\"\n" +
3939 11463 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'flowdock'})\">\n" +
3940 11464 " <span class=\"fa fa-fw fa-envelope fa-3x pull-left\"></span>\n" +
3941 11465 " <strong>Flowdock</strong>\n" +
3942 11466 "\n" +
3943 11467 " <p>Receive reports and alerts on your Flowdock team\n" +
3944 11468 " inbox</p>\n" +
3945 11469 " </a>\n" +
3946 11470 "\n" +
3947 11471 " <a class=\"btn btn-default integration\"\n" +
3948 11472 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'github'})\">\n" +
3949 11473 " <span class=\"fa fa-fw fa-github fa-3x pull-left\"></span>\n" +
3950 11474 " <strong>Github</strong>\n" +
3951 11475 "\n" +
3952 11476 " <p>Send issues and reports to Github</p>\n" +
3953 11477 " </a>\n" +
3954 11478 "\n" +
3955 11479 " <a class=\"btn btn-default integration\"\n" +
3956 11480 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'hipchat'})\">\n" +
3957 11481 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3958 11482 " <strong>HipChat</strong>\n" +
3959 11483 "\n" +
3960 11484 " <p>Receive reports and alerts in your Hipchat chanels</p>\n" +
3961 11485 " </a>\n" +
3962 11486 "\n" +
3963 11487 " <a class=\"btn btn-default integration\"\n" +
3964 11488 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'jira'})\">\n" +
3965 11489 " <span class=\"fa fa-fw fa-ticket fa-3x pull-left\"></span>\n" +
3966 11490 " <strong>Jira</strong>\n" +
3967 11491 "\n" +
3968 11492 " <p>Send issues and reports to Jira</p>\n" +
3969 11493 " </a>\n" +
3970 11494 "\n" +
3971 11495 " <a class=\"btn btn-default integration\"\n" +
3972 11496 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'slack'})\">\n" +
3973 11497 " <span class=\"fa fa-fw fa-comment fa-3x pull-left\"></span>\n" +
3974 11498 " <strong>Slack</strong>\n" +
3975 11499 "\n" +
3976 11500 " <p>Receive reports and alerts in your Slack chanels</p>\n" +
3977 11501 " </a>\n" +
3978 11502 "\n" +
3979 11503 " <a class=\"btn btn-default integration\"\n" +
3980 11504 " data-ui-sref=\"applications.integrations.edit({resourceId:$ctrl.resource.resource_id, integration:'webhooks'})\">\n" +
3981 11505 " <span class=\"fa fa-fw fa-cloud-upload fa-3x pull-left\"></span>\n" +
3982 11506 " <strong>Webhooks</strong>\n" +
3983 11507 "\n" +
3984 11508 " <p>Notify third party API's of your reports and alerts</p>\n" +
3985 11509 " </a>\n" +
3986 11510 " </div>\n" +
3987 11511 " </div>\n" +
3988 11512 "</ui-view>\n"
3989 11513 );
3990 11514
3991 11515
3992 11516 $templateCache.put('components/views/applications-list-view/applications-list-view.html',
3993 11517 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
3994 11518 "\n" +
3995 11519 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.applications\">\n" +
3996 11520 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
3997 11521 " <div class=\"panel-body\" ng-if=\"$ctrl.applications.length === 0 \">\n" +
3998 11522 "\n" +
3999 11523 " <p>You have to create a new application first.</p>\n" +
4000 11524 "\n" +
4001 11525 " </div>\n" +
4002 11526 "\n" +
4003 11527 " <table class=\"table table-striped\" ng-if=\"$ctrl.applications.length > 0\">\n" +
4004 11528 " <thead>\n" +
4005 11529 " <tr>\n" +
4006 11530 " <th class=\"resource_name\">Resource Name</th>\n" +
4007 11531 " <th class=\"domains\">Domains</th>\n" +
4008 11532 " <th class=\"options\">Options</th>\n" +
4009 11533 " </tr>\n" +
4010 11534 " </thead>\n" +
4011 11535 " <tbody>\n" +
4012 11536 " <tr class=\"r{{$index+1}}\" ng-repeat=\"application in $ctrl.applications\">\n" +
4013 11537 " <td>{{application.resource_name}}</td>\n" +
4014 11538 " <td>{{application.domains}}</td>\n" +
4015 11539 " <td class=\"options\">\n" +
4016 11540 " <a class=\"btn btn-default\" data-ui-sref=\"applications.update({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Update application\"><span class=\"fa fa-cog\"></span> Update</a>\n" +
4017 11541 " <a class=\"btn btn-default\" data-ui-sref=\"applications.integrations({resourceId:application.resource_id})\" data-toggle=\"tooltip\" title=\"Manage Integrations\"><span class=\"fa fa-wrench\"></span> Integrations</a>\n" +
4018 11542 " </td>\n" +
4019 11543 " </tr>\n" +
4020 11544 " </tbody>\n" +
4021 11545 " </table>\n" +
4022 11546 "\n" +
4023 11547 "</div>\n"
4024 11548 );
4025 11549
4026 11550
4027 11551 $templateCache.put('components/views/applications-purge-logs-view/applications-purge-logs-view.html',
4028 11552 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.applications\"></ng-include>\n" +
4029 11553 "\n" +
4030 11554 "<div ng-show=\"!$ctrl.loading.applications\">\n" +
4031 11555 " <div class=\"panel panel-default\">\n" +
4032 11556 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4033 11557 " <div class=\"panel-body\">\n" +
4034 11558 "\n" +
4035 11559 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.form\" ng-submit=\"$ctrl.purgeLogs()\">\n" +
4036 11560 " <div class=\"form-group\">\n" +
4037 11561 " <label class=\"control-label col-sm-3 col-lg-2\">Application:</label>\n" +
4038 11562 "\n" +
4039 11563 " <div class=\"col-sm-9 col-lg-10 form-inline\">\n" +
4040 11564 " <select ng-model=\"$ctrl.selectedResource\" ng-change=\"$ctrl.getCommonKeys()\"\n" +
4041 11565 " ng-options=\"r.resource_id as r.resource_name for r in $ctrl.applications\" class=\"form-control\"></select>\n" +
4042 11566 " </div>\n" +
4043 11567 " </div>\n" +
4044 11568 "\n" +
4045 11569 " <div class=\"form-group\">\n" +
4046 11570 " <label class=\"control-label col-sm-3 col-lg-2\">Namespace:</label>\n" +
4047 11571 "\n" +
4048 11572 " <div class=\"col-sm-9 col-lg-10\">\n" +
4049 11573 " <input type=\"text\" name=\"namespace\" ng-model=\"$ctrl.namespace\"\n" +
4050 11574 " placeholder=\"Namespace to filter on\" uib-typeahead=\"ns for ns in $ctrl.commonNamespaces\"\n" +
4051 11575 " class=\"form-control\">\n" +
4052 11576 " </div>\n" +
4053 11577 " </div>\n" +
4054 11578 "\n" +
4055 11579 " <div class=\"form-group\">\n" +
4056 11580 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4057 11581 "\n" +
4058 11582 " <div class=\"col-sm-8 col-lg-9 \">\n" +
4059 11583 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Purge logs meeting the criteria\">\n" +
4060 11584 " </div>\n" +
4061 11585 " </div>\n" +
4062 11586 "\n" +
4063 11587 " </form>\n" +
4064 11588 " </div>\n" +
4065 11589 " </div>\n" +
4066 11590 "</div>\n"
4067 11591 );
4068 11592
4069 11593
4070 11594 $templateCache.put('components/views/applications-update-view/applications-update-view.html',
4071 11595 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application\"></ng-include>\n" +
4072 11596 "\n" +
4073 11597 "<div ng-show=\"!$ctrl.loading.application\">\n" +
4074 11598 "\n" +
4075 11599 " <div class=\"panel panel-default\">\n" +
4076 11600 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4077 11601 " <div class=\"panel-body\">\n" +
4078 11602 "\n" +
4079 11603 " <div class=\"row\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4080 11604 " <div class=\"col-sm-6\">\n" +
4081 11605 "\n" +
4082 11606 " <uib-tabset>\n" +
4083 11607 " <uib-tab>\n" +
4084 11608 " <uib-tab-heading>\n" +
4085 11609 " API keys\n" +
4086 11610 " </uib-tab-heading>\n" +
4087 11611 "\n" +
4088 11612 " <p><strong>PRIVATE API KEY:</strong></p>\n" +
4089 11613 " <p>\n" +
4090 11614 " <div class=\"well well-sm\">{{ $ctrl.resource.api_key }}</div>\n" +
4091 11615 " </p>\n" +
4092 11616 " <p><strong>PUBLIC API KEY</strong> (for javascript clients):</p>\n" +
4093 11617 " <p>\n" +
4094 11618 " <div class=\"well well-sm\">{{ $ctrl.resource.public_key }}</div>\n" +
4095 11619 " </p>\n" +
4096 11620 " <p><small>Your key will be used to identify to which application your data\n" +
4097 11621 " belongs to please keep them private at all times.</small></p>\n" +
4098 11622 "\n" +
4099 11623 " </uib-tab>\n" +
4100 11624 "\n" +
4101 11625 " <uib-tab>\n" +
4102 11626 " <uib-tab-heading>\n" +
4103 11627 " <span class=\"btn btn-danger btn-xs\"><span class=\"fa fa-exclamation-triangle\"></span></span> Regenerate API keys\n" +
4104 11628 " </uib-tab-heading>\n" +
4105 11629 " <p>Are you sure you want to regenerate API KEY for this application?</p>\n" +
4106 11630 " <p>All client application keys will need to be updated.</p>\n" +
4107 11631 " <form ng-submit=\"$ctrl.regenerateAPIKeys()\" name=\"$ctrl.regenerateAPIKeysForm\" class=\"form-inline\">\n" +
4108 11632 " <data-form-errors errors=\"$ctrl.regenerateAPIKeysForm.ae_validation.password\"></data-form-errors>\n" +
4109 11633 " <div class=\"form-group\">\n" +
4110 11634 " <input type=\"password\" name=\"confirm\"\n" +
4111 11635 " placeholder=\"Enter your password to proceed\" class=\"form-control\" ng-model=\"$ctrl.regenerateAPIKeysPassword\">\n" +
4112 11636 " <input type=\"submit\" class=\"btn btn-danger\" value=\"Confirm\">\n" +
4113 11637 " </div>\n" +
4114 11638 " </form>\n" +
4115 11639 " </uib-tab>\n" +
4116 11640 " </uib-tabset>\n" +
4117 11641 " </div>\n" +
4118 11642 " <div class=\"col-sm-6 text-center\">\n" +
4119 11643 " <h2 class=\"m-t-0\">How to connect your application?</h2>\n" +
4120 11644 " <p>Visit our <a href=\"{{AeConfig.urls.docs}}\"><strong>developer documentation</strong></a> for step-by-step integration instructions.</p>\n" +
4121 11645 " <div class=\"clearfix\"></div>\n" +
4122 11646 " <p class=\"text-center\">\n" +
4123 11647 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/django_small.png\" alt=\"Django Logo\">\n" +
4124 11648 " <img src=\"/static/appenlight/images/logos/pyramid_small.png\" alt=\"Pyramid Logo\">\n" +
4125 11649 " <img src=\"/static/appenlight/images/logos/flask_small.png\" alt=\"Flask Logo\"></a>\n" +
4126 11650 "\n" +
4127 11651 " <a href=\"{{AeConfig.urls.docs}}\"><img src=\"/static/appenlight/images/logos/js_small.png\" alt=\"Javascript Logo\">\n" +
4128 11652 " <img src=\"/static/appenlight/images/logos/nodejs.png\" alt=\"Node.js\"></a>\n" +
4129 11653 " <img src=\"/static/appenlight/images/logos/ruby_small.png\" alt=\"Ruby Logo\">\n" +
4130 11654 " <img src=\"/static/appenlight/images/logos/php_small.png\" alt=\"PHP Logo\">\n" +
4131 11655 " </a>\n" +
4132 11656 "\n" +
4133 11657 " </p>\n" +
4134 11658 " </div>\n" +
4135 11659 " </div>\n" +
4136 11660 "\n" +
4137 11661 " <hr ng-show=\"$ctrl.resource.resource_id\">\n" +
4138 11662 "\n" +
4139 11663 " <form method=\"post\" class=\"form-horizontal\" name=\"$ctrl.BasicForm\" ng-submit=\"$ctrl.updateBasicForm()\" novalidate>\n" +
4140 11664 " <div class=\"form-group\">\n" +
4141 11665 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.resource_name\"></data-form-errors>\n" +
4142 11666 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4143 11667 " Application name\n" +
4144 11668 " <span class=\"required\">*</span>\n" +
4145 11669 " </label>\n" +
4146 11670 "\n" +
4147 11671 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4148 11672 " <input class=\"form-control\" name=\"resource_name\" placeholder=\"Application Name\" type=\"text\" ng-model=\"$ctrl.resource.resource_name\">\n" +
4149 11673 " </div>\n" +
4150 11674 "\n" +
4151 11675 "\n" +
4152 11676 " </div>\n" +
4153 11677 "\n" +
4154 11678 " <div class=\"form-group\">\n" +
4155 11679 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.domains\"></data-form-errors>\n" +
4156 11680 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4157 11681 " Domain names for CORS headers\n" +
4158 11682 " </label>\n" +
4159 11683 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4160 11684 " <textarea class=\"form-control\" name=\"domains\" ng-model=\"$ctrl.resource.domains\"></textarea>\n" +
4161 11685 " <p class=\"description\">Required for Javascript error tracking (one line one domain, skip http:// part)</p>\n" +
4162 11686 " </div>\n" +
4163 11687 "\n" +
4164 11688 "\n" +
4165 11689 " </div>\n" +
4166 11690 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4167 11691 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.default_grouping\"></data-form-errors>\n" +
4168 11692 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4169 11693 " Default grouping for errors\n" +
4170 11694 " </label>\n" +
4171 11695 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4172 11696 " <select class=\"form-control\" name=\"default_grouping\" ng-model=\"$ctrl.resource.default_grouping\" ng-options=\"i[0] as i[1] for i in $ctrl.groupingOptions\"></select>\n" +
4173 11697 " </div>\n" +
4174 11698 "\n" +
4175 11699 " </div>\n" +
4176 11700 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4177 11701 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.error_report_threshold\"></data-form-errors>\n" +
4178 11702 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4179 11703 " Alert on error reports\n" +
4180 11704 " <span class=\"required\">*</span>\n" +
4181 11705 " </label>\n" +
4182 11706 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4183 11707 " <input class=\"form-control\" name=\"error_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.error_report_threshold\">\n" +
4184 11708 " <p class=\"description\">Application requires to send at least this amount of error reports per minute to open alert</p>\n" +
4185 11709 " </div>\n" +
4186 11710 " </div>\n" +
4187 11711 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4188 11712 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.slow_report_threshold\"></data-form-errors>\n" +
4189 11713 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4190 11714 " Alert on slow reports\n" +
4191 11715 " <span class=\"required\">*</span>\n" +
4192 11716 " </label>\n" +
4193 11717 "\n" +
4194 11718 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4195 11719 " <input class=\"form-control\" name=\"slow_report_threshold\" type=\"text\" ng-model=\"$ctrl.resource.slow_report_threshold\">\n" +
4196 11720 " <p class=\"description\">Application requires to send at least this amount of slow reports per minute to open alert</p>\n" +
4197 11721 " </div>\n" +
4198 11722 " </div>\n" +
4199 11723 " <div class=\"form-group\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4200 11724 " <data-form-errors errors=\"$ctrl.BasicForm.ae_validation.allow_permanent_storage\"></data-form-errors>\n" +
4201 11725 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4202 11726 " Permanent logs\n" +
4203 11727 " </label>\n" +
4204 11728 " <div class=\" col-sm-8 col-lg-9\">\n" +
4205 11729 " <input class=\"form-control\" name=\"allow_permanent_storage\" type=\"checkbox\" ng-model=\"$ctrl.resource.allow_permanent_storage\">\n" +
4206 11730 " <p class=\"description\">Allow permanent storage of logs in separate DB partitions (only administrator can enable this feature)</p>\n" +
4207 11731 " </div>\n" +
4208 11732 " </div>\n" +
4209 11733 " <div class=\"form-group\">\n" +
4210 11734 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4211 11735 "\n" +
4212 11736 " </label>\n" +
4213 11737 "\n" +
4214 11738 " <div class=\" col-sm-8 col-lg-9 \">\n" +
4215 11739 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"{{$ctrl.resource.resource_id? 'Update' : 'Create'}} Application\">\n" +
4216 11740 " </div>\n" +
4217 11741 " </div>\n" +
4218 11742 " </form>\n" +
4219 11743 " </div>\n" +
4220 11744 " </div>\n" +
4221 11745 "\n" +
4222 11746 " <div class=\"panel panel-default\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4223 11747 " <div class=\"panel-heading\">\n" +
4224 11748 " <h3 class=\"panel-title\">Plugins</h3>\n" +
4225 11749 " </div>\n" +
4226 11750 " <div class=\"panel-body\">\n" +
4227 11751 "\n" +
4228 11752 " <plugin-config resource=\"$ctrl.resource\"\n" +
4229 11753 " section=\"'application.update'\"\n" +
4230 11754 " ng-if=\"$ctrl.resource.resource_id\">\n" +
4231 11755 " </plugin-config>\n" +
4232 11756 "\n" +
4233 11757 " </div>\n" +
4234 11758 " </div>\n" +
4235 11759 "\n" +
4236 11760 " <div class=\"panel panel-default m-t-1\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4237 11761 " <div class=\"panel-heading\">\n" +
4238 11762 " <h3 class=\"panel-title\">API Testing</h3>\n" +
4239 11763 " </div>\n" +
4240 11764 " <div class=\"panel-body\">\n" +
4241 11765 " <p>Please be sure to add at least one <a data-ui-sref=\"user.alert_channels.email\"><strong>email alert channel</strong></a> for your account.</p>\n" +
4242 11766 " <p>This will enable AppEnlight to send you notification emails about errors inside your $ctrl.</p>\n" +
4243 11767 " <p><strong>After this is done you can use this CURL commands to test APIs:</strong></p>\n" +
4244 11768 " <p>(Please note that the data like execution times is semi randomly generated)</p>\n" +
4245 11769 " <uib-tabset>\n" +
4246 11770 " <uib-tab>\n" +
4247 11771 " <uib-tab-heading>\n" +
4248 11772 " Log API\n" +
4249 11773 " </uib-tab-heading>\n" +
4250 11774 "\n" +
4251 11775 " <div class=\"codehilite\">\n" +
4252 11776 " <pre class=\"m-a-0\">\n" +
4253 11777 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/logs?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4254 11778 " [\n" +
4255 11779 " {\n" +
4256 11780 " \"log_level\": \"WARNING\",\n" +
4257 11781 " \"message\": \"OMG ValueError happened\",\n" +
4258 11782 " \"namespace\": \"some.namespace.indicator\",\n" +
4259 11783 " \"request_id\": \"SOME_UUID\",\n" +
4260 11784 " \"permanent\": false,\n" +
4261 11785 " \"primary_key\": \"random_key\",\n" +
4262 11786 " \"server\": \"some.server.hostname\",\n" +
4263 11787 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4264 11788 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]]\n" +
4265 11789 " },\n" +
4266 11790 " {\n" +
4267 11791 " \"log_level\": \"ERROR\",\n" +
4268 11792 " \"message\": \"OMG ValueError happened2\",\n" +
4269 11793 " \"namespace\": \"some.namespace.indicator\",\n" +
4270 11794 " \"request_id\": \"SOME_UUID\",\n" +
4271 11795 " \"permanent\": false,\n" +
4272 11796 " \"server\": \"some.server.hostname\",\n" +
4273 11797 " \"date\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\"\n" +
4274 11798 " }\n" +
4275 11799 " ]'\n" +
4276 11800 " </pre>\n" +
4277 11801 " </div>\n" +
4278 11802 "\n" +
4279 11803 " </uib-tab>\n" +
4280 11804 "\n" +
4281 11805 " <uib-tab>\n" +
4282 11806 " <uib-tab-heading>\n" +
4283 11807 " Report API\n" +
4284 11808 " </uib-tab-heading>\n" +
4285 11809 "\n" +
4286 11810 " <div class=\"codehilite\">\n" +
4287 11811 " <pre class=\"m-a-0\">\n" +
4288 11812 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/reports?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4289 11813 " [{\n" +
4290 11814 " \"client\": \"your-client-name-python\",\n" +
4291 11815 " \"language\": \"python\",\n" +
4292 11816 " \"view_name\": \"views/foo:bar\",\n" +
4293 11817 " \"server\": \"SERVERNAME/INSTANCENAME\",\n" +
4294 11818 " \"priority\": 5,\n" +
4295 11819 " \"error\": \"OMG ValueError happened\",\n" +
4296 11820 " \"occurences\":1,\n" +
4297 11821 " \"http_status\": 500,\n" +
4298 11822 " \"tags\": [[\"tag1\",\"value\"], [\"tag2\", 5]],\n" +
4299 11823 " \"username\": \"USER\",\n" +
4300 11824 " \"url\": \"HTTP://SOMEURL\",\n" +
4301 11825 " \"ip\": \"127.0.0.1\",\n" +
4302 11826 " \"start_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4303 11827 " \"end_time\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(2, 'seconds').toISOString()}}\",\n" +
4304 11828 " \"user_agent\": \"BROWSER_AGENT\",\n" +
4305 11829 " \"extra\": [[\"message\",\"CUSTOM MESSAGE\"], [\"custom_value\", \"some payload\"]],\n" +
4306 11830 " \"request_id\": \"SOME_UUID\",\n" +
4307 11831 " \"request\": {\"REQUEST_METHOD\": \"GET\",\n" +
4308 11832 " \"PATH_INFO\": \"/FOO/BAR\",\n" +
4309 11833 " \"POST\": {\"FOO\":\"BAZ\",\"XXX\":\"YYY\"}\n" +
4310 11834 " },\n" +
4311 11835 " \"slow_calls\":[{\n" +
4312 11836 " \"start\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4313 11837 " \"end\": \"{{$ctrl.momentJs.utc().milliseconds(0).add(1, 'seconds').toISOString()}}\",\n" +
4314 11838 " \"type\": \"sql\",\n" +
4315 11839 " \"subtype\": \"postgresql\",\n" +
4316 11840 " \"parameters\": [\"QPARAM1\",\"QPARAM2\",\"QPARAMX\"],\n" +
4317 11841 " \"statement\": \"QUERY\"\n" +
4318 11842 " }],\n" +
4319 11843 " \"request_stats\": {\n" +
4320 11844 " \"main\": 2.50779,\n" +
4321 11845 " \"nosql\": 0.01008,\n" +
4322 11846 " \"nosql_calls\": 17.0,\n" +
4323 11847 " \"remote\": 0.0,\n" +
4324 11848 " \"remote_calls\": 0.0,\n" +
4325 11849 " \"sql\": 1,\n" +
4326 11850 " \"sql_calls\": 1.0,\n" +
4327 11851 " \"tmpl\": 0.0,\n" +
4328 11852 " \"tmpl_calls\": 0.0,\n" +
4329 11853 " \"custom\": 0.0,\n" +
4330 11854 " \"custom_calls\": 0.0\n" +
4331 11855 " },\n" +
4332 11856 " \"traceback\": [\n" +
4333 11857 " {\"cline\": \"return foo_bar_baz(1,2,3)\",\n" +
4334 11858 " \"file\": \"somedir/somefile.py\",\n" +
4335 11859 " \"fn\": \"somefunction\",\n" +
4336 11860 " \"line\": 454,\n" +
4337 11861 " \"vars\": [[\"a_list\",\n" +
4338 11862 " [\"1\",2,\"4\",\"5\",6]],\n" +
4339 11863 " [\"b\", {\"1\": \"2\", \"ccc\": \"ddd\", \"1\": \"a\"}],\n" +
4340 11864 " [\"obj\", \"object object at 0x7f0030853dc0\"]]\n" +
4341 11865 " },\n" +
4342 11866 " {\"cline\": \"OMG ValueError happened\",\n" +
4343 11867 " \"file\": \"\",\n" +
4344 11868 " \"fn\": \"\",\n" +
4345 11869 " \"line\": \"\",\n" +
4346 11870 " \"vars\": []}\n" +
4347 11871 " ]\n" +
4348 11872 " }]'\n" +
4349 11873 " </pre>\n" +
4350 11874 " </div>\n" +
4351 11875 "\n" +
4352 11876 " </uib-tab>\n" +
4353 11877 "\n" +
4354 11878 " <uib-tab>\n" +
4355 11879 "\n" +
4356 11880 " <uib-tab-heading>\n" +
4357 11881 " Metrics API\n" +
4358 11882 " </uib-tab-heading>\n" +
4359 11883 "\n" +
4360 11884 " <div class=\"codehilite\">\n" +
4361 11885 " <pre class=\"m-a-0\">\n" +
4362 11886 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/general_metrics?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4363 11887 " [{\n" +
4364 11888 " \"namespace\": \"some.monitor\",\n" +
4365 11889 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4366 11890 " \"server_name\": \"server.name\",\n" +
4367 11891 " \"tags\": [[\"value1\", 15.7], [\"value2\", 26]]}]'\n" +
4368 11892 " </pre>\n" +
4369 11893 " </div>\n" +
4370 11894 "\n" +
4371 11895 " </uib-tab>\n" +
4372 11896 "\n" +
4373 11897 " <uib-tab>\n" +
4374 11898 "\n" +
4375 11899 " <uib-tab-heading>\n" +
4376 11900 " Request Stats API\n" +
4377 11901 " </uib-tab-heading>\n" +
4378 11902 "\n" +
4379 11903 " <div class=\"codehilite\">\n" +
4380 11904 " <pre class=\"m-a-0\">\n" +
4381 11905 "curl -H \"Content-Type: application/json\" -k {{$ctrl.AeConfig.urls.baseUrl}}api/request_stats?protocol_version=0.5\\&ampapi_key={{$ctrl.resource.api_key}} -d '\n" +
4382 11906 " [{\"server\": \"some.server.hostname\",\n" +
4383 11907 " \"timestamp\": \"{{$ctrl.momentJs.utc().milliseconds(0).toISOString()}}\",\n" +
4384 11908 " \"metrics\": [[\"dir/module:func\",\n" +
4385 11909 " {\"custom\": 0.0,\n" +
4386 11910 " \"custom_calls\": 0,\n" +
4387 11911 " \"main\": 0.01664,\n" +
4388 11912 " \"nosql\": 0.00061,\n" +
4389 11913 " \"nosql_calls\": 23,\n" +
4390 11914 " \"remote\": 0.0,\n" +
4391 11915 " \"remote_calls\": 0,\n" +
4392 11916 " \"requests\": 1,\n" +
4393 11917 " \"sql\": 0.00105,\n" +
4394 11918 " \"sql_calls\": 2,\n" +
4395 11919 " \"tmpl\": 0.0,\n" +
4396 11920 " \"tmpl_calls\": 0}],\n" +
4397 11921 " [\"SomeView.function\",\n" +
4398 11922 " {\"custom\": 0.0,\n" +
4399 11923 " \"custom_calls\": 0,\n" +
4400 11924 " \"main\": 0.647261,\n" +
4401 11925 " \"nosql\": 0.306554,\n" +
4402 11926 " \"nosql_calls\": 140,\n" +
4403 11927 " \"remote\": 0.0,\n" +
4404 11928 " \"remote_calls\": 0,\n" +
4405 11929 " \"requests\": 28,\n" +
4406 11930 " \"sql\": 0.0,\n" +
4407 11931 " \"sql_calls\": 0,\n" +
4408 11932 " \"tmpl\": 0.0,\n" +
4409 11933 " \"tmpl_calls\": 0}]]\n" +
4410 11934 " }]'\n" +
4411 11935 " </pre>\n" +
4412 11936 " </div>\n" +
4413 11937 "\n" +
4414 11938 " </uib-tab>\n" +
4415 11939 "\n" +
4416 11940 " </uib-tabset>\n" +
4417 11941 "\n" +
4418 11942 " </div>\n" +
4419 11943 " </div>\n" +
4420 11944 "\n" +
4421 11945 " <permissions-form resource=\"$ctrl.resource\" current-permissions=\"$ctrl.resource.current_permissions\"\n" +
4422 11946 " possible-permissions=\"$ctrl.resource.possible_permissions\" ng-if=\"$ctrl.resource.resource_id\"></permissions-form>\n" +
4423 11947 "\n" +
4424 11948 " <div class=\"panel panel-info\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4425 11949 " <div class=\"panel-heading\">\n" +
4426 11950 " <h3 class=\"panel-title\">Postprocessing</h3>\n" +
4427 11951 " </div>\n" +
4428 11952 " <div class=\"panel-body\">\n" +
4429 11953 " <p>This section allows you influence the rating of report groups - if rule is matched once its not executed anymore</p>\n" +
4430 11954 "\n" +
4431 11955 " <p>\n" +
4432 11956 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addRule()\"><span class=\"fa fa-plus-circle\"></span> Add rule</a>\n" +
4433 11957 " </p>\n" +
4434 11958 "\n" +
4435 11959 " <post-process-action action=\"action\" resource=\"$ctrl.resource\" ng-repeat=\"action in $ctrl.resource.postprocessing_rules\"></post-process-action>\n" +
4436 11960 " </div>\n" +
4437 11961 " </div>\n" +
4438 11962 "\n" +
4439 11963 " <div class=\"panel panel-danger\" ng-show=\"$ctrl.resource.resource_id\">\n" +
4440 11964 " <div class=\"panel-heading\">\n" +
4441 11965 " <h3 class=\"panel-title\">Administration</h3>\n" +
4442 11966 " </div>\n" +
4443 11967 " <div class=\"panel-body\">\n" +
4444 11968 " <h2>Transfer ownership</h2>\n" +
4445 11969 " <p>Please note that by transfering ownership you WILL lose access to the application data and new owner needs to give you access permission</p>\n" +
4446 11970 " <div class=\"confirmation_form\" ng-submit=\"$ctrl.transferApplication()\">\n" +
4447 11971 " <form class=\"form-horizontal\" name=\"$ctrl.formTransfer\">\n" +
4448 11972 " <div class=\"form-group\">\n" +
4449 11973 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.password\"></data-form-errors>\n" +
4450 11974 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4451 11975 " Password\n" +
4452 11976 " </label>\n" +
4453 11977 " <div class=\"col-sm-8 col-lg-9\">\n" +
4454 11978 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formTransferModel.password\">\n" +
4455 11979 " </div>\n" +
4456 11980 " </div>\n" +
4457 11981 " <div class=\"form-group\">\n" +
4458 11982 " <data-form-errors errors=\"$ctrl.formTransfer.ae_validation.user_name\"></data-form-errors>\n" +
4459 11983 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4460 11984 " New owners username\n" +
4461 11985 " </label>\n" +
4462 11986 " <div class=\"col-sm-8 col-lg-9\">\n" +
4463 11987 " <input class=\"form-control\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.formTransferModel.user_name\">\n" +
4464 11988 " </div>\n" +
4465 11989 " </div>\n" +
4466 11990 " <div class=\"form-group\">\n" +
4467 11991 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4468 11992 " </label>\n" +
4469 11993 " <div class=\"col-sm-8 col-lg-9\">\n" +
4470 11994 " <button class=\"btn btn-danger\">\n" +
4471 11995 " <span class=\"fa fa-user-plus\"></span>\n" +
4472 11996 " Transfer ownership of application\n" +
4473 11997 " </button>\n" +
4474 11998 " </div>\n" +
4475 11999 " </div>\n" +
4476 12000 " </form>\n" +
4477 12001 " </div>\n" +
4478 12002 "\n" +
4479 12003 " <hr/>\n" +
4480 12004 "\n" +
4481 12005 " <h2>Remove application</h2>\n" +
4482 12006 " <p><strong>This operation will wipe out all data from database - there is no undo.</strong></p>\n" +
4483 12007 "\n" +
4484 12008 " <div class=\"confirmation_form\">\n" +
4485 12009 " <form class=\"form-horizontal\" name=\"$ctrl.formDelete\" ng-submit=\"$ctrl.deleteApplication()\">\n" +
4486 12010 " <div class=\"form-group\">\n" +
4487 12011 " <data-form-errors errors=\"$ctrl.formDelete.ae_validation.password\"></data-form-errors>\n" +
4488 12012 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4489 12013 " Password\n" +
4490 12014 " </label>\n" +
4491 12015 " <div class=\"col-sm-8 col-lg-9\">\n" +
4492 12016 " <input class=\"form-control\" name=\"password\" type=\"password\" ng-model=\"$ctrl.formDeleteModel.password\">\n" +
4493 12017 " </div>\n" +
4494 12018 " </div>\n" +
4495 12019 " <div class=\"form-group\">\n" +
4496 12020 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
4497 12021 "\n" +
4498 12022 " </label>\n" +
4499 12023 " <div class=\"col-sm-8 col-lg-9\">\n" +
4500 12024 " <button class=\"btn btn-danger\">\n" +
4501 12025 " <span class=\"fa fa-trash-o\"></span>\n" +
4502 12026 " Delete my application\n" +
4503 12027 " </button>\n" +
4504 12028 " </div>\n" +
4505 12029 " </div>\n" +
4506 12030 " </form>\n" +
4507 12031 " </div>\n" +
4508 12032 " </div>\n" +
4509 12033 " </div>\n" +
4510 12034 "</div>\n"
4511 12035 );
4512 12036
4513 12037
4514 12038 $templateCache.put('components/views/event-browser/event-browser.html',
4515 12039 "<div class=\"panel panel-default\">\n" +
4516 12040 " <div class=\"panel-body\">\n" +
4517 12041 "\n" +
4518 12042 " <h1>Event history</h1>\n" +
4519 12043 "\n" +
4520 12044 " <table class=\"table table-striped event-table\">\n" +
4521 12045 " <tr ng-repeat=\"event in $ctrl.events track by event.id\">\n" +
4522 12046 " <td class=\"text-center icons\">\n" +
4523 12047 " <span ng-if=\"event.event_type === 1\" class=\"fa fa-exclamation-triangle fa-2x\" style=\"color:orangered\"></span>\n" +
4524 12048 " <span ng-if=\"event.event_type === 3\" class=\"fa fa-clock-o fa-2x\" style=\"color:darkorange\"></span>\n" +
4525 12049 " <span ng-if=\"event.event_type === 7\" class=\"fa fa-question-circle fa-2x\" style=\"color:dimgrey\"></span>\n" +
4526 12050 " <span ng-if=\"event.event_type === 9\" class=\"fa fa-line-chart fa-2x\" style=\"color:green\"></span>\n" +
4527 12051 " </td>\n" +
4528 12052 " <td>\n" +
4529 12053 " <p>For <strong>{{ event.resource_name }}</strong></p>\n" +
4530 12054 "\n" +
4531 12055 " <p>{{ event.text }}</p>\n" +
4532 12056 " <small class=\"date\" data-uib-tooltip=\"{{event.start_date}}\"> created:\n" +
4533 12057 " <iso-to-relative-time time=\"{{event.start_date}}\"/>\n" +
4534 12058 " </small>\n" +
4535 12059 " <small class=\"date\" ng-show=\"event.end_date\" data-uib-tooltip=\"{{event.end_date}}\"> | closed:\n" +
4536 12060 " <iso-to-relative-time time=\"{{event.end_date}}\"/>\n" +
4537 12061 " </small>\n" +
4538 12062 " </td>\n" +
4539 12063 " <td class=\"options\">\n" +
4540 12064 "\n" +
4541 12065 " <span class=\"dropdown pull-right\" ng-if=\"event.status === 1\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4542 12066 " <a class=\"dropdown-toggle btn btn-danger\" data-uib-dropdown-toggle>\n" +
4543 12067 " <span class=\"fa fa-exclamation-circle\"></span>\n" +
4544 12068 " </a>\n" +
4545 12069 " <ul class=\"dropdown-menu\">\n" +
4546 12070 " <li>\n" +
4547 12071 " <a ng-click=\"$ctrl.closeEvent(event)\">Close event</a>\n" +
4548 12072 " <a>Do nothing</a>\n" +
4549 12073 " </li>\n" +
4550 12074 " </ul>\n" +
4551 12075 " </span>\n" +
4552 12076 "\n" +
4553 12077 " </td>\n" +
4554 12078 " </tr>\n" +
4555 12079 " </table>\n" +
4556 12080 " </div>\n" +
4557 12081 "</div>\n"
4558 12082 );
4559 12083
4560 12084
4561 12085 $templateCache.put('components/views/index-dashboard/index-dashboard.html',
4562 12086 "<style type=\"text/css\">\n" +
4563 12087 " #metrics_chart .c3-line {\n" +
4564 12088 " stroke-width: 0px;\n" +
4565 12089 " }\n" +
4566 12090 "\n" +
4567 12091 " #metrics_chart .c3-area {\n" +
4568 12092 " stroke-width: 0;\n" +
4569 12093 " opacity: 0.75;\n" +
4570 12094 " }\n" +
4571 12095 "</style>\n" +
4572 12096 "\n" +
4573 12097 "<div class=\"row\">\n" +
4574 12098 " <div class=\"col-sm-12 dashboard\" id=\"content\">\n" +
4575 12099 " <div ng-if=\"!$ctrl.stateHolder.AeUser.applications.length\">\n" +
4576 12100 "\n" +
4577 12101 " <div ng-include=\"'templates/quickstart.html'\"></div>\n" +
4578 12102 "\n" +
4579 12103 " </div>\n" +
4580 12104 "\n" +
4581 12105 " <div ng-if=\"$ctrl.stateHolder.AeUser.applications.length\">\n" +
4582 12106 "\n" +
4583 12107 " <div class=\"row\">\n" +
4584 12108 " <div class=\"col-sm-6\">\n" +
4585 12109 " <div class=\"panel panel-default\">\n" +
4586 12110 " <div class=\"panel-body\">\n" +
4587 12111 " <form class=\"graph-type form-inline\">\n" +
4588 12112 " <select ng-model=\"$ctrl.resource\" ng-options=\"r.resource_id as r.resource_name for r in $ctrl.stateHolder.AeUser.applications\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4589 12113 " class=\"SelectField form-control input-sm slim-input\"></select>\n" +
4590 12114 "\n" +
4591 12115 " <select class=\"SelectField form-control input-sm slim-input\" ng-model=\"$ctrl.timeSpan\"\n" +
4592 12116 " ng-options=\"i as i.label for i in $ctrl.timeOptions | objectToOrderedArray:'minutes'\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4593 12117 " class=\"SelectField\"></select>\n" +
4594 12118 "\n" +
4595 12119 "\n" +
4596 12120 " <div class=\"btn-group\">\n" +
4597 12121 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4598 12122 " uib-btn-radio=\"'requests_graphs'\" data-uib-tooltip=\"Requests per second\">\n" +
4599 12123 " <span class=\"fa fa-line-chart\"></span>\n" +
4600 12124 " </button>\n" +
4601 12125 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4602 12126 " uib-btn-radio=\"'response_graphs'\" data-uib-tooltip=\"Average response time\">\n" +
4603 12127 " <span class=\"fa fa-random\"></span>\n" +
4604 12128 " </button>\n" +
4605 12129 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4606 12130 " uib-btn-radio=\"'metrics_graphs'\" data-uib-tooltip=\"Time spent per request\">\n" +
4607 12131 " <span class=\"fa fa-bar-chart-o\"></span>\n" +
4608 12132 " </button>\n" +
4609 12133 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4610 12134 " uib-btn-radio=\"'report_graphs'\" data-uib-tooltip=\"Errors\">\n" +
4611 12135 " <span class=\"fa fa-exclamation-triangle\"></span>\n" +
4612 12136 " </button>\n" +
4613 12137 " <button type=\"button\" class=\"btn btn-primary btn-sm\" ng-model=\"$ctrl.graphType.selected\" ng-change=\"$ctrl.updateSearchParams()\"\n" +
4614 12138 " uib-btn-radio=\"'slow_report_graphs'\" data-uib-tooltip=\"Slow reports\">\n" +
4615 12139 " <span class=\"fa fa-clock-o\"></span>\n" +
4616 12140 " </button>\n" +
4617 12141 " </div>\n" +
4618 12142 " </form>\n" +
4619 12143 " <div class=\"clearfix\"></div>\n" +
4620 12144 "\n" +
4621 12145 " <p ng-if=\"$ctrl.loading.series != false\" class=\"text-center\">\n" +
4622 12146 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4623 12147 " </p>\n" +
4624 12148 "\n" +
4625 12149 " <div ng-if=\"$ctrl.loading.series == false\">\n" +
4626 12150 " <div ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\">\n" +
4627 12151 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.requestsChartData\" data-config=\"$ctrl.requestsChartConfig\" update=\"true\">\n" +
4628 12152 " </c3chart>\n" +
4629 12153 " </div>\n" +
4630 12154 "\n" +
4631 12155 " <div ng-if=\"$ctrl.graphType.selected == 'response_graphs'\">\n" +
4632 12156 " <c3chart data-domid=\"reponse_chart\" data-data=\"$ctrl.responseChartData\" data-config=\"$ctrl.responseChartConfig\" update=\"true\">\n" +
4633 12157 " </c3chart>\n" +
4634 12158 " </div>\n" +
4635 12159 "\n" +
4636 12160 " <div ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\">\n" +
4637 12161 " <c3chart data-domid=\"metrics_chart\" data-data=\"$ctrl.metricsChartData\" data-config=\"$ctrl.metricsChartConfig\" update=\"true\">\n" +
4638 12162 " </c3chart>\n" +
4639 12163 " </div>\n" +
4640 12164 " <div ng-if=\"$ctrl.graphType.selected == 'report_graphs'\">\n" +
4641 12165 " <c3chart data-domid=\"reports_chart\" data-data=\"$ctrl.reportChartData\" data-config=\"$ctrl.reportChartConfig\" update=\"true\">\n" +
4642 12166 " </c3chart>\n" +
4643 12167 " </div>\n" +
4644 12168 "\n" +
4645 12169 " <div ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\">\n" +
4646 12170 " <c3chart data-domid=\"slow_reports_chart\" data-data=\"$ctrl.reportSlowChartData\" data-config=\"$ctrl.reportSlowChartConfig\" update=\"true\">\n" +
4647 12171 " </c3chart>\n" +
4648 12172 " </div>\n" +
4649 12173 "\n" +
4650 12174 " <p ng-if=\"$ctrl.graphType.selected == 'requests_graphs'\" class=\"text-center\">\n" +
4651 12175 " <small>Average requests per second from all servers</small>\n" +
4652 12176 " </p>\n" +
4653 12177 "\n" +
4654 12178 " <p ng-if=\"$ctrl.graphType.selected == 'response_graphs'\" class=\"text-center\">\n" +
4655 12179 " <small>Average response time from all servers</small>\n" +
4656 12180 " </p>\n" +
4657 12181 "\n" +
4658 12182 " <p ng-if=\"$ctrl.graphType.selected == 'metrics_graphs'\" class=\"text-center\">\n" +
4659 12183 " <small>Aggregated average time spent per request - broken to layers</small>\n" +
4660 12184 " </p>\n" +
4661 12185 "\n" +
4662 12186 " <p ng-if=\"$ctrl.graphType.selected == 'report_graphs'\" class=\"text-center\">\n" +
4663 12187 " <small>Aggregated reports sent by your application</small>\n" +
4664 12188 " </p>\n" +
4665 12189 "\n" +
4666 12190 " <p ng-if=\"$ctrl.graphType.selected == 'slow_report_graphs'\" class=\"text-center\">\n" +
4667 12191 " <small>Aggregated slow reports sent by your application</small>\n" +
4668 12192 " </p>\n" +
4669 12193 " </div>\n" +
4670 12194 " </div>\n" +
4671 12195 " </div>\n" +
4672 12196 " </div>\n" +
4673 12197 "\n" +
4674 12198 "\n" +
4675 12199 " <div class=\"col-sm-6\">\n" +
4676 12200 "\n" +
4677 12201 " <div id=\"server-container\">\n" +
4678 12202 "\n" +
4679 12203 " <div ng-if=\"$ctrl.loading.apdex==false\" class=\"text-center m-b-1\">\n" +
4680 12204 "\n" +
4681 12205 " <a data-ui-sref=\"report.list({resource:$ctrl.resource, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"error-rate\">\n" +
4682 12206 " <small>Exceptions</small>\n" +
4683 12207 " <br/>\n" +
4684 12208 " <strong>{{ $ctrl.exceptions|numberToThousands}}</strong>\n" +
4685 12209 " <span class=\"fa fa-chevron-right\"></span>\n" +
4686 12210 " </a><!--\n" +
4687 12211 "\n" +
4688 12212 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"frustrating-requests\" data-uib-tooltip=\"Requests over 4s\">\n" +
4689 12213 " <small>Frustrating req.</small>\n" +
4690 12214 " <br/>\n" +
4691 12215 " <strong>{{$ctrl.frustratingRequests|numberToThousands}}</strong>\n" +
4692 12216 " <span class=\"fa fa-chevron-right\"></span>\n" +
4693 12217 " </a><!--\n" +
4694 12218 "\n" +
4695 12219 " --><a data-ui-sref=\"report.list_slow({resource:$ctrl.resource, min_duration:1, max_duration:4, start_date:$ctrl.startDateFilter})\" class=\"combined-stat text-center\" id=\"tolerated-requests\"\n" +
4696 12220 " data-uib-tooltip=\"Requests under 4s\">\n" +
4697 12221 " <small>Tolerated req.</small>\n" +
4698 12222 " <br/>\n" +
4699 12223 " <strong>{{$ctrl.toleratedRequests|numberToThousands}}</strong>\n" +
4700 12224 " <span class=\"fa fa-chevron-right\"></span>\n" +
4701 12225 " </a><!--\n" +
4702 12226 " \n" +
4703 12227 " --><a class=\"combined-stat text-center\" id=\"satisfying-requests\" data-uib-tooltip=\"Requests under 1s\">\n" +
4704 12228 " <small>Satisfying req.</small>\n" +
4705 12229 " <br/>\n" +
4706 12230 " <strong>{{$ctrl.satisfyingRequests|numberToThousands}}</strong>\n" +
4707 12231 " </a><!--\n" +
4708 12232 "\n" +
4709 12233 " --><a data-ui-sref=\"uptime({resource:$ctrl.resource})\" class=\"combined-stat text-center\" id=\"uptime-stats\" data-uib-tooltip=\"Uptime\">\n" +
4710 12234 " <small>Uptime</small>\n" +
4711 12235 " <br/>\n" +
4712 12236 " <strong>{{$ctrl.uptimeStats}}%</strong>\n" +
4713 12237 " <span class=\"fa fa-chevron-right\"></span>\n" +
4714 12238 " </a>\n" +
4715 12239 "\n" +
4716 12240 " <div class=\"clearfix\"></div>\n" +
4717 12241 " </div>\n" +
4718 12242 "\n" +
4719 12243 " <div id=\"apdex-rate\" class=\"m-b-1 panel panel-default\">\n" +
4720 12244 " <table class=\"servers table table-striped\">\n" +
4721 12245 " <thead>\n" +
4722 12246 " <tr>\n" +
4723 12247 " <th></th>\n" +
4724 12248 " <th>Server</th>\n" +
4725 12249 " <th>Apdex\n" +
4726 12250 " <span class=\"fa fa-question-circle\"\n" +
4727 12251 " data-uib-tooltip=\"Application Performance Index - measures viewer satisfaction based on response times and error rates\"></span>\n" +
4728 12252 " </th>\n" +
4729 12253 " <th>rpm</th>\n" +
4730 12254 " <th>avg. response</th>\n" +
4731 12255 " </tr>\n" +
4732 12256 " </thead>\n" +
4733 12257 " <tbody>\n" +
4734 12258 " <tr ng-if=\"$ctrl.loading.apdex!=false\" class=\"text-center\">\n" +
4735 12259 " <td colspan=\"5\"><span class=\"fa fa-cog fa-spin fa-5x loader\"></span></td>\n" +
4736 12260 " </tr>\n" +
4737 12261 " <tr ng-repeat=\"server in $ctrl.apdexStats\" class=\"{{ server | apdexValue }}\"\n" +
4738 12262 " ng-if=\"$ctrl.loading.apdex==false\">\n" +
4739 12263 " <td><span class=\"fa fa-hdd-o\"></span></td>\n" +
4740 12264 " <td>\n" +
4741 12265 " <small><strong>{{ server.name }}</strong></small>\n" +
4742 12266 " </td>\n" +
4743 12267 " <td class=\"apdex\">\n" +
4744 12268 " <small><strong>{{ server.apdex }} %</strong></small>\n" +
4745 12269 " </td>\n" +
4746 12270 " <td>\n" +
4747 12271 " <small><strong>{{ server.rpm }}rpm</strong></small>\n" +
4748 12272 " </td>\n" +
4749 12273 " <td>\n" +
4750 12274 " <small><strong>{{ server.avg_response_time }}s</strong></small>\n" +
4751 12275 " </td>\n" +
4752 12276 " </tr>\n" +
4753 12277 " </tbody>\n" +
4754 12278 " </table>\n" +
4755 12279 "\n" +
4756 12280 " </div>\n" +
4757 12281 " </div>\n" +
4758 12282 "\n" +
4759 12283 " </div>\n" +
4760 12284 "\n" +
4761 12285 "\n" +
4762 12286 " </div>\n" +
4763 12287 "\n" +
4764 12288 " <div class=\"row\">\n" +
4765 12289 " <div class=\"col-sm-6\">\n" +
4766 12290 "\n" +
4767 12291 " <div class=\"panel panel-default\">\n" +
4768 12292 " <div class=\"panel-heading position-relative\">\n" +
4769 12293 " <h3 class=\"panel-title\"><span class=\"fa fa-exclamation-triangle\"></span> Newest errors (real-time)\n" +
4770 12294 " </h3>\n" +
4771 12295 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Play/Pause stream\" class=\"btn btn-primary btn-sm pause_stream\" ng-model=\"$ctrl.stream.paused\" uib-btn-checkbox>\n" +
4772 12296 " <span class=\"fa {{stream.paused ? 'fa-play' : 'fa-pause'}}\"></span>\n" +
4773 12297 " </a>\n" +
4774 12298 " <a tooltip-append-to-body=\"true\" data-uib-tooltip=\"Limit reports to current application\" class=\"btn btn-primary btn-sm limit_stream\" ng-model=\"$ctrl.stream.filtered\" uib-btn-checkbox>\n" +
4775 12299 " <span class=\"fa fa-lock\"></span>\n" +
4776 12300 " </a>\n" +
4777 12301 "\n" +
4778 12302 "\n" +
4779 12303 " </div>\n" +
4780 12304 " <div class=\"panel-body\">\n" +
4781 12305 "\n" +
4782 12306 " <p ng-if=\"$ctrl.stream.reports.length === 0\">No new reports</p>\n" +
4783 12307 "\n" +
4784 12308 " <div small-report-list reports=\"$ctrl.stream.reports\" applications=\"$ctrl.applications\"></div>\n" +
4785 12309 " </div>\n" +
4786 12310 " </div>\n" +
4787 12311 " </div>\n" +
4788 12312 "\n" +
4789 12313 " <div class=\"col-sm-6\">\n" +
4790 12314 "\n" +
4791 12315 " <div class=\"panel panel-default\">\n" +
4792 12316 " <div class=\"panel-heading\">\n" +
4793 12317 " <h3 class=\"panel-title\"><span class=\"fa fa-sort-amount-desc\"></span> Request breakdown over {{ $ctrl.timeSpan.label }}</h3>\n" +
4794 12318 " </div>\n" +
4795 12319 " <div class=\"panel-body\" id=\"view-breakdown-container\">\n" +
4796 12320 " <p ng-if=\"$ctrl.loading.requestsBreakdown!=false\" class=\"text-center\">\n" +
4797 12321 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4798 12322 " </p>\n" +
4799 12323 "\n" +
4800 12324 " <div class=\"report-list\">\n" +
4801 12325 " <div ng-if=\"$ctrl.loading.requestsBreakdown==false\" ng-repeat=\"view in $ctrl.requestsBreakdown\">\n" +
4802 12326 " <div class=\"view-info\">\n" +
4803 12327 " <div class=\"view-name\">\n" +
4804 12328 " <div class=\"bar\" style=\"width: {{view.percentage}}%\">\n" +
4805 12329 " </div>\n" +
4806 12330 " </div>\n" +
4807 12331 " <strong ng-if=\"view.latest_details.length\">\n" +
4808 12332 " <a data-ui-sref=\"report.list_slow({view_name:view.view_name})\">{{view.view_name}}</a></strong>\n" +
4809 12333 " <strong ng-if=\"!view.latest_details.length\">{{view.view_name}}</strong>\n" +
4810 12334 "\n" +
4811 12335 " <div class=\"stats\">\n" +
4812 12336 " <small>\n" +
4813 12337 " avg. response <strong>{{view.avg_response}}s</strong> in\n" +
4814 12338 " <span class=\"requests\"\n" +
4815 12339 " data-uib-tooltip=\"Requests\"><strong>{{view.requests|numberToThousands}}</strong> requests</span>\n" +
4816 12340 "\n" +
4817 12341 " <span ng-if=\"view.latest_details\">\n" +
4818 12342 " &nbsp;&nbsp; Latest reports:\n" +
4819 12343 " <a ng-repeat=\"d in view.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong></a>\n" +
4820 12344 " </span>\n" +
4821 12345 " </small>\n" +
4822 12346 " </div>\n" +
4823 12347 "\n" +
4824 12348 " </div>\n" +
4825 12349 "\n" +
4826 12350 " </div>\n" +
4827 12351 " </div>\n" +
4828 12352 "\n" +
4829 12353 "\n" +
4830 12354 " </div>\n" +
4831 12355 " </div>\n" +
4832 12356 "\n" +
4833 12357 " </div>\n" +
4834 12358 "\n" +
4835 12359 " </div>\n" +
4836 12360 "\n" +
4837 12361 " <div class=\"row\">\n" +
4838 12362 " <div class=\"col-sm-6\">\n" +
4839 12363 "\n" +
4840 12364 " <div class=\"panel panel-default\">\n" +
4841 12365 " <div class=\"panel-heading\">\n" +
4842 12366 " <h3 class=\"panel-title\">\n" +
4843 12367 " <span class=\"fa fa-exclamation-triangle\"></span> Report groups trending over {{ $ctrl.timeSpan.label }}\n" +
4844 12368 " </h3>\n" +
4845 12369 " </div>\n" +
4846 12370 " <div class=\"panel-body\">\n" +
4847 12371 " <p ng-if=\"$ctrl.loading.reports != false\" class=\"text-center\">\n" +
4848 12372 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4849 12373 " </p>\n" +
4850 12374 "\n" +
4851 12375 " <p ng-if=\"$ctrl.trendingReports.length == 0 && $ctrl.loading.reports == false\">\n" +
4852 12376 " No reports found\n" +
4853 12377 " </p>\n" +
4854 12378 "\n" +
4855 12379 " <div small-report-group-list groups=\"$ctrl.trendingReports\" applications=\"$ctrl.applications\" ng-if=\"$ctrl.loading.reports==false\"></div>\n" +
4856 12380 " </div>\n" +
4857 12381 " </div>\n" +
4858 12382 "\n" +
4859 12383 " </div>\n" +
4860 12384 "\n" +
4861 12385 " <div class=\"col-sm-6\">\n" +
4862 12386 "\n" +
4863 12387 "\n" +
4864 12388 " <div class=\"panel panel-default\">\n" +
4865 12389 " <div class=\"panel-heading\">\n" +
4866 12390 " <h3 class=\"panel-title\">\n" +
4867 12391 " Most common slow calls over {{ $ctrl.timeSpan.label }}\n" +
4868 12392 " </h3>\n" +
4869 12393 " </div>\n" +
4870 12394 " <div class=\"panel-body\">\n" +
4871 12395 "\n" +
4872 12396 " <div ng-if=\"$ctrl.loading.slowCalls!=false\" class=\"text-center\">\n" +
4873 12397 " <span class=\"fa fa-cog fa-spin fa-5x loader\"></span>\n" +
4874 12398 " </div>\n" +
4875 12399 "\n" +
4876 12400 " <table id=\"slow-statements\" ng-if=\"$ctrl.loading.slowCalls==false\">\n" +
4877 12401 " <tbody>\n" +
4878 12402 " <tr ng-repeat=\"call in $ctrl.slowCalls\">\n" +
4879 12403 " <td class=\"occurences\">\n" +
4880 12404 " <span class=\"occurences\" data-uib-tooltip=\"Occurences\">{{call.occurences|numberToThousands}}</span>\n" +
4881 12405 " </td>\n" +
4882 12406 " <td class=\"ellipsis\">\n" +
4883 12407 " <small title=\"{{call.statement}}\" class=\"statement\">{{call.statement}}</small>\n" +
4884 12408 " <br/>\n" +
4885 12409 " <span class=\"type\">{{call.statement_type}}</span>\n" +
4886 12410 " <span class=\"subtype\">{{call.statement_subtype}}</span>\n" +
4887 12411 " <span class=\"duration\" data-uib-tooltip=\"Average duration\">{{call.total_duration/call.occurences|round:2}}s</span>\n" +
4888 12412 " <span class=\"report-list\">\n" +
4889 12413 " Latest reports:\n" +
4890 12414 " <a ng-repeat=\"d in call.latest_details\" target=\"_blank\" ui-sref=\"report.view_detail({groupId:d.group_id, reportId:d.report_id})\"> <strong>{{$index+1}}</strong> </a>\n" +
4891 12415 " </span>\n" +
4892 12416 " </td>\n" +
4893 12417 " </tr>\n" +
4894 12418 " </tbody>\n" +
4895 12419 " </table>\n" +
4896 12420 "\n" +
4897 12421 "\n" +
4898 12422 " </div>\n" +
4899 12423 " </div>\n" +
4900 12424 "\n" +
4901 12425 "\n" +
4902 12426 " </div>\n" +
4903 12427 "\n" +
4904 12428 " </div>\n" +
4905 12429 " </div>\n" +
4906 12430 " </div>\n" +
4907 12431 "</div>\n"
4908 12432 );
4909 12433
4910 12434
4911 12435 $templateCache.put('components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
4912 12436 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4913 12437 "\n" +
4914 12438 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4915 12439 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4916 12440 " <div class=\"panel-body\">\n" +
4917 12441 "\n" +
4918 12442 " <h1>Bitbucket Integration</h1>\n" +
4919 12443 "\n" +
4920 12444 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4921 12445 " <div class=\"form-group\">\n" +
4922 12446 "\n" +
4923 12447 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
4924 12448 "\n" +
4925 12449 " <div class=\"col-sm-8 col-lg-9\">\n" +
4926 12450 "\n" +
4927 12451 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4928 12452 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
4929 12453 "\n" +
4930 12454 " <div class=\"input-group\">\n" +
4931 12455 " <div class=\"input-group-addon\">https://bitbucket.org/</div>\n" +
4932 12456 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
4933 12457 " <div class=\"input-group-addon\">/</div>\n" +
4934 12458 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
4935 12459 " </div>\n" +
4936 12460 "\n" +
4937 12461 " </div>\n" +
4938 12462 " </div>\n" +
4939 12463 " <div class=\"form-group\">\n" +
4940 12464 "\n" +
4941 12465 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
4942 12466 "\n" +
4943 12467 " <div class=\"col-sm-8 col-lg-9\">\n" +
4944 12468 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
4945 12469 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
4946 12470 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
4947 12471 " <ul class=\"dropdown-menu\">\n" +
4948 12472 " <li><a>No</a></li>\n" +
4949 12473 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
4950 12474 " </ul>\n" +
4951 12475 " </span>\n" +
4952 12476 " </div>\n" +
4953 12477 " </div>\n" +
4954 12478 " </form>\n" +
4955 12479 "\n" +
4956 12480 " <p class=\"m-t-1\">Remember you first need to\n" +
4957 12481 " <strong>\n" +
4958 12482 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
4959 12483 " with Bitbucket before we can send issues on your behalf.</p>\n" +
4960 12484 "\n" +
4961 12485 " <p>Every user will have to authorize AppEnlight to access Bitbucket to be able to post issues.</p>\n" +
4962 12486 "\n" +
4963 12487 " </div>\n" +
4964 12488 "</div>\n"
4965 12489 );
4966 12490
4967 12491
4968 12492 $templateCache.put('components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
4969 12493 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
4970 12494 "\n" +
4971 12495 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
4972 12496 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
4973 12497 " <div class=\"panel-body\">\n" +
4974 12498 " <h1>Campfire Integration</h1>\n" +
4975 12499 "\n" +
4976 12500 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
4977 12501 "\n" +
4978 12502 " <div class=\"form-group\">\n" +
4979 12503 "\n" +
4980 12504 " <label class=\"control-label col-sm-3 col-lg-2\">Account name</label>\n" +
4981 12505 " <div class=\"col-sm-8 col-lg-9\">\n" +
4982 12506 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
4983 12507 "\n" +
4984 12508 " <div class=\"input-group\">\n" +
4985 12509 " <div class=\"input-group-addon\">http://</div>\n" +
4986 12510 " <input class=\"form-control\" ng-model=\"$ctrl.config.account\" placeholder=\"account\">\n" +
4987 12511 " <div class=\"input-group-addon\">.campfirenow.com</div>\n" +
4988 12512 " </div>\n" +
4989 12513 " </div>\n" +
4990 12514 " </div>\n" +
4991 12515 "\n" +
4992 12516 " <div class=\"form-group\">\n" +
4993 12517 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
4994 12518 " <div class=\"col-sm-8 col-lg-9\">\n" +
4995 12519 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
4996 12520 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\">\n" +
4997 12521 " </div>\n" +
4998 12522 " </div>\n" +
4999 12523 "\n" +
5000 12524 " <div class=\"form-group\">\n" +
5001 12525 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
5002 12526 " <div class=\"col-sm-8 col-lg-9\">\n" +
5003 12527 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
5004 12528 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\">\n" +
5005 12529 " <p>\n" +
5006 12530 " <small>Room ID list separated by comma</small>\n" +
5007 12531 " </p>\n" +
5008 12532 " </div>\n" +
5009 12533 " </div>\n" +
5010 12534 " <div class=\"form-group\">\n" +
5011 12535 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Campfire\">\n" +
5012 12536 "\n" +
5013 12537 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5014 12538 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5015 12539 " <ul class=\"dropdown-menu\">\n" +
5016 12540 " <li><a>No</a></li>\n" +
5017 12541 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5018 12542 " </ul>\n" +
5019 12543 " </span>\n" +
5020 12544 "\n" +
5021 12545 " <div class=\"btn-group\" uib-dropdown>\n" +
5022 12546 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5023 12547 " Test integration <span class=\"caret\"></span>\n" +
5024 12548 " </button>\n" +
5025 12549 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5026 12550 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5027 12551 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5028 12552 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5029 12553 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5030 12554 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5031 12555 " </ul>\n" +
5032 12556 " </div>\n" +
5033 12557 "\n" +
5034 12558 " </div>\n" +
5035 12559 "\n" +
5036 12560 " </form>\n" +
5037 12561 "\n" +
5038 12562 " </div>\n" +
5039 12563 "</div>\n"
5040 12564 );
5041 12565
5042 12566
5043 12567 $templateCache.put('components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
5044 12568 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5045 12569 "\n" +
5046 12570 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5047 12571 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5048 12572 " <div class=\"panel-body\">\n" +
5049 12573 "\n" +
5050 12574 " <h1>Flowdock Integration</h1>\n" +
5051 12575 "\n" +
5052 12576 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5053 12577 "\n" +
5054 12578 " <div class=\"form-group\">\n" +
5055 12579 "\n" +
5056 12580 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
5057 12581 "\n" +
5058 12582 " <div class=\"col-sm-8 col-lg-9\">\n" +
5059 12583 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
5060 12584 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
5061 12585 " </div>\n" +
5062 12586 "\n" +
5063 12587 "\n" +
5064 12588 " </div>\n" +
5065 12589 "\n" +
5066 12590 " <div class=\"form-group\">\n" +
5067 12591 "\n" +
5068 12592 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5069 12593 "\n" +
5070 12594 " <div class=\"col-sm-8 col-lg-9\">\n" +
5071 12595 "\n" +
5072 12596 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Flowdock\">\n" +
5073 12597 "\n" +
5074 12598 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5075 12599 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5076 12600 " <ul class=\"dropdown-menu\">\n" +
5077 12601 " <li><a>No</a></li>\n" +
5078 12602 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5079 12603 " </ul>\n" +
5080 12604 " </span>\n" +
5081 12605 " <div class=\"btn-group\" uib-dropdown>\n" +
5082 12606 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5083 12607 " Test integration <span class=\"caret\"></span>\n" +
5084 12608 " </button>\n" +
5085 12609 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5086 12610 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5087 12611 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5088 12612 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5089 12613 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5090 12614 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5091 12615 " </ul>\n" +
5092 12616 " </div>\n" +
5093 12617 " </div>\n" +
5094 12618 " </div>\n" +
5095 12619 "\n" +
5096 12620 "\n" +
5097 12621 " </form>\n" +
5098 12622 "\n" +
5099 12623 " </div>\n" +
5100 12624 "</div>\n"
5101 12625 );
5102 12626
5103 12627
5104 12628 $templateCache.put('components/views/integrations/github-integration-config-view/github-integration-config-view.html',
5105 12629 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5106 12630 "\n" +
5107 12631 "<div class=\"panel panel-default\" ng-show=\"!$ctrl.loading.application && !$ctrl.loading.integration\">\n" +
5108 12632 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5109 12633 " <div class=\"panel-body\">\n" +
5110 12634 "\n" +
5111 12635 " <h1>Github Integration</h1>\n" +
5112 12636 "\n" +
5113 12637 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5114 12638 "\n" +
5115 12639 "\n" +
5116 12640 " <div class=\"form-group\">\n" +
5117 12641 "\n" +
5118 12642 " <label class=\"control-label col-sm-3 col-lg-2\">Repository</label>\n" +
5119 12643 "\n" +
5120 12644 " <div class=\"col-sm-8 col-lg-9\">\n" +
5121 12645 "\n" +
5122 12646 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
5123 12647 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.repo_name\"></data-form-errors>\n" +
5124 12648 "\n" +
5125 12649 " <div class=\"input-group\">\n" +
5126 12650 " <div class=\"input-group-addon\">https://api.github.com/</div>\n" +
5127 12651 " <input class=\"form-control\" ng-model=\"$ctrl.config.user_name\" placeholder=\"user\" type=\"text\">\n" +
5128 12652 " <div class=\"input-group-addon\">/</div>\n" +
5129 12653 " <input class=\"form-control\" ng-model=\"$ctrl.config.repo_name\" placeholder=\"repo_name\" type=\"text\">\n" +
5130 12654 " </div>\n" +
5131 12655 "\n" +
5132 12656 " </div>\n" +
5133 12657 " </div>\n" +
5134 12658 "\n" +
5135 12659 " <div class=\"form-group\">\n" +
5136 12660 "\n" +
5137 12661 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5138 12662 "\n" +
5139 12663 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Use this repo\">\n" +
5140 12664 "\n" +
5141 12665 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5142 12666 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5143 12667 " <ul class=\"dropdown-menu\">\n" +
5144 12668 " <li><a>No</a></li>\n" +
5145 12669 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5146 12670 " </ul>\n" +
5147 12671 " </span>\n" +
5148 12672 "\n" +
5149 12673 " </div>\n" +
5150 12674 " </form>\n" +
5151 12675 "\n" +
5152 12676 " <p class=\"m-t-1\">Remember you first need to\n" +
5153 12677 " <strong>\n" +
5154 12678 " <a data-ui-sref=\"user.profile.identities\">authorize your user account</a></strong>\n" +
5155 12679 " with Github before we can send issues on your behalf.</p>\n" +
5156 12680 "\n" +
5157 12681 " <p>Every user will have to authorize AppEnlight to access Github to be able to post issues.</p>\n" +
5158 12682 "\n" +
5159 12683 " <div class=\"panel panel-warning\">\n" +
5160 12684 " <div class=\"panel-heading\">Private repository access</div>\n" +
5161 12685 " <div class=\"panel-body\">\n" +
5162 12686 " <p>If you need access to private repositories <a data-ui-sref=\"user.profile.identities\">profile page</a> allows you to require token including private repository permissions.</p>\n" +
5163 12687 "\n" +
5164 12688 " <p>Registration page OAuth does NOT give you token with private repository access permissions.</p>\n" +
5165 12689 " </div>\n" +
5166 12690 " </div>\n" +
5167 12691 "\n" +
5168 12692 " </div>\n" +
5169 12693 "</div>\n"
5170 12694 );
5171 12695
5172 12696
5173 12697 $templateCache.put('components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
5174 12698 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5175 12699 "\n" +
5176 12700 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5177 12701 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5178 12702 " <div class=\"panel-body\">\n" +
5179 12703 "\n" +
5180 12704 " <h1>Hipchat Integration</h1>\n" +
5181 12705 "\n" +
5182 12706 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5183 12707 "\n" +
5184 12708 " <div class=\"form-group\">\n" +
5185 12709 " <label class=\"control-label col-sm-3 col-lg-2\">API Token</label>\n" +
5186 12710 "\n" +
5187 12711 " <div class=\"col-sm-8 col-lg-9\">\n" +
5188 12712 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.api_token\"></data-form-errors>\n" +
5189 12713 " <input class=\"form-control\" ng-model=\"$ctrl.config.api_token\" placeholder=\"Your API token\" type=\"text\">\n" +
5190 12714 " </div>\n" +
5191 12715 " </div>\n" +
5192 12716 "\n" +
5193 12717 " <div class=\"form-group\">\n" +
5194 12718 "\n" +
5195 12719 " <label class=\"control-label col-sm-3 col-lg-2\">Room ID list</label>\n" +
5196 12720 "\n" +
5197 12721 " <div class=\"col-sm-8 col-lg-9\">\n" +
5198 12722 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.rooms\"></data-form-errors>\n" +
5199 12723 " <input class=\"form-control\" ng-model=\"$ctrl.config.rooms\" placeholder=\"Room ID list\" type=\"text\">\n" +
5200 12724 "\n" +
5201 12725 " <p>\n" +
5202 12726 " <small>Room ID list separated by comma</small>\n" +
5203 12727 " </p>\n" +
5204 12728 " </div>\n" +
5205 12729 "\n" +
5206 12730 " </div>\n" +
5207 12731 "\n" +
5208 12732 " <div class=\"form-group\">\n" +
5209 12733 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5210 12734 " <div class=\"col-sm-8 col-lg-9\">\n" +
5211 12735 " <input type=\"submit\" class=\"btn btn-primary\" value=\"Connect to Hipchat\">\n" +
5212 12736 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5213 12737 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5214 12738 " <ul class=\"dropdown-menu\">\n" +
5215 12739 " <li><a>No</a></li>\n" +
5216 12740 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5217 12741 " </ul>\n" +
5218 12742 " </span>\n" +
5219 12743 "\n" +
5220 12744 " <div class=\"btn-group\" uib-dropdown>\n" +
5221 12745 " <button id=\"single-button\" type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5222 12746 " Test integration <span class=\"caret\"></span>\n" +
5223 12747 " </button>\n" +
5224 12748 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5225 12749 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5226 12750 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5227 12751 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5228 12752 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5229 12753 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5230 12754 " </ul>\n" +
5231 12755 " </div>\n" +
5232 12756 "\n" +
5233 12757 " </div>\n" +
5234 12758 " </div>\n" +
5235 12759 "\n" +
5236 12760 " </form>\n" +
5237 12761 "\n" +
5238 12762 " </div>\n" +
5239 12763 "</div>\n"
5240 12764 );
5241 12765
5242 12766
5243 12767 $templateCache.put('components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
5244 12768 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5245 12769 "\n" +
5246 12770 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5247 12771 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5248 12772 " <div class=\"panel-body\">\n" +
5249 12773 "\n" +
5250 12774 " <h1>Jira Integration</h1>\n" +
5251 12775 "\n" +
5252 12776 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5253 12777 "\n" +
5254 12778 " <div class=\"form-group\" id=\"row-host_name\">\n" +
5255 12779 "\n" +
5256 12780 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5257 12781 " Server URL <span class=\"required\">*</span>\n" +
5258 12782 " </label>\n" +
5259 12783 " <div class=\"col-sm-8 col-lg-9\">\n" +
5260 12784 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.host_name\"></data-form-errors>\n" +
5261 12785 " <input class=\"form-control\" id=\"host_name\" name=\"host_name\" type=\"text\" ng-model=\"$ctrl.config.host_name\">\n" +
5262 12786 "\n" +
5263 12787 " <p>\n" +
5264 12788 " <small>https://servername.atlassian.net</small>\n" +
5265 12789 " </p>\n" +
5266 12790 "\n" +
5267 12791 " </div>\n" +
5268 12792 " </div>\n" +
5269 12793 " <div class=\"form-group\" id=\"row-user_name\">\n" +
5270 12794 "\n" +
5271 12795 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5272 12796 " Username <span class=\"required\">*</span>\n" +
5273 12797 " </label>\n" +
5274 12798 " <div class=\"col-sm-8 col-lg-9\">\n" +
5275 12799 "\n" +
5276 12800 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.user_name\"></data-form-errors>\n" +
5277 12801 " <input class=\"form-control\" id=\"user_name\" name=\"user_name\" type=\"text\" ng-model=\"$ctrl.config.user_name\">\n" +
5278 12802 "\n" +
5279 12803 " <p>\n" +
5280 12804 " <small>user@email.com</small>\n" +
5281 12805 " </p>\n" +
5282 12806 "\n" +
5283 12807 " </div>\n" +
5284 12808 " </div>\n" +
5285 12809 " <div class=\"form-group\" id=\"row-password\">\n" +
5286 12810 "\n" +
5287 12811 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5288 12812 " Password <span class=\"required\">*</span>\n" +
5289 12813 " </label>\n" +
5290 12814 " <div class=\"col-sm-8 col-lg-9\">\n" +
5291 12815 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.password\"></data-form-errors>\n" +
5292 12816 " <input class=\"form-control\" id=\"password\" name=\"password\" type=\"password\" ng-model=\"$ctrl.config.password\">\n" +
5293 12817 " </div>\n" +
5294 12818 " </div>\n" +
5295 12819 " <div class=\"form-group\" id=\"row-project\">\n" +
5296 12820 "\n" +
5297 12821 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5298 12822 " Project key <span class=\"required\">*</span>\n" +
5299 12823 " </label>\n" +
5300 12824 " <div class=\"col-sm-8 col-lg-9\">\n" +
5301 12825 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.project\"></data-form-errors>\n" +
5302 12826 " <input class=\"form-control\" id=\"project\" name=\"project\" type=\"text\" ng-model=\"$ctrl.config.project\">\n" +
5303 12827 " </div>\n" +
5304 12828 " </div>\n" +
5305 12829 " <div class=\"form-group\" id=\"row-submit\">\n" +
5306 12830 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5307 12831 " <div class=\"col-sm-8 col-lg-9\">\n" +
5308 12832 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup Jira\">\n" +
5309 12833 "\n" +
5310 12834 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5311 12835 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5312 12836 " <ul class=\"dropdown-menu\">\n" +
5313 12837 " <li><a>No</a></li>\n" +
5314 12838 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5315 12839 " </ul>\n" +
5316 12840 " </span>\n" +
5317 12841 " </div>\n" +
5318 12842 " </div>\n" +
5319 12843 "\n" +
5320 12844 " </form>\n" +
5321 12845 "\n" +
5322 12846 "\n" +
5323 12847 " </div>\n" +
5324 12848 "</div>\n"
5325 12849 );
5326 12850
5327 12851
5328 12852 $templateCache.put('components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
5329 12853 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5330 12854 "\n" +
5331 12855 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5332 12856 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5333 12857 " <div class=\"panel-body\">\n" +
5334 12858 "\n" +
5335 12859 " <h1>Slack Integration</h1>\n" +
5336 12860 "\n" +
5337 12861 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5338 12862 "\n" +
5339 12863 " <div class=\"form-group\">\n" +
5340 12864 "\n" +
5341 12865 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5342 12866 " API Token <span class=\"required\">*</span>\n" +
5343 12867 " </label>\n" +
5344 12868 " <div class=\"col-sm-8 col-lg-9\">\n" +
5345 12869 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.webhook_url\"></data-form-errors>\n" +
5346 12870 " <input class=\"form-control\" ng-model=\"$ctrl.config.webhook_url\" placeholder=\"Webhook URL\" type=\"webhook_url\">\n" +
5347 12871 " </div>\n" +
5348 12872 " </div>\n" +
5349 12873 "\n" +
5350 12874 " <div class=\"form-group\">\n" +
5351 12875 "\n" +
5352 12876 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5353 12877 " <div class=\"col-sm-8 col-lg-9\">\n" +
5354 12878 " <input type=\"submit\" class=\"btn btn-primary\"\n" +
5355 12879 " value=\"Connect to Slack\">\n" +
5356 12880 "\n" +
5357 12881 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5358 12882 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5359 12883 " <ul class=\"dropdown-menu\">\n" +
5360 12884 " <li><a>No</a></li>\n" +
5361 12885 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5362 12886 " </ul>\n" +
5363 12887 " </span>\n" +
5364 12888 "\n" +
5365 12889 " <div class=\"btn-group\" uib-dropdown>\n" +
5366 12890 " <button type=\"button\" class=\"btn btn-info\" uib-dropdown-toggle>\n" +
5367 12891 " Test integration <span class=\"caret\"></span>\n" +
5368 12892 " </button>\n" +
5369 12893 " <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"single-button\">\n" +
5370 12894 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('report_notification')\">Test report notification</a></li>\n" +
5371 12895 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('error_alert')\">Test error alert</a></li>\n" +
5372 12896 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('uptime_alert')\">Test uptime alert</a></li>\n" +
5373 12897 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('chart_alert')\">Test chart alert</a></li>\n" +
5374 12898 " <li role=\"menuitem\"><a ng-click=\"$ctrl.testIntegration('daily_digest')\">Test daily digest</a></li>\n" +
5375 12899 " </ul>\n" +
5376 12900 " </div>\n" +
5377 12901 " </div>\n" +
5378 12902 " </div>\n" +
5379 12903 " </form>\n" +
5380 12904 "\n" +
5381 12905 " </div>\n" +
5382 12906 "</div>\n"
5383 12907 );
5384 12908
5385 12909
5386 12910 $templateCache.put('components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
5387 12911 "<ng-include src=\"'templates/loader.html'\" ng-if=\"integrations.loading.application || $ctrl.loading.integration\"></ng-include>\n" +
5388 12912 "\n" +
5389 12913 "<div class=\"panel panel-default\" ng-show=\"!integrations.loading.application && !$ctrl.loading.integration\">\n" +
5390 12914 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
5391 12915 " <div class=\"panel-body\">\n" +
5392 12916 "\n" +
5393 12917 " <h1>Webhooks Integration</h1>\n" +
5394 12918 "\n" +
5395 12919 " <form name=\"$ctrl.integrationForm\" ng-submit=\"$ctrl.configureIntegration()\" class=\"form-horizontal\">\n" +
5396 12920 " <div class=\"form-group\" id=\"row-reports_webhook\">\n" +
5397 12921 "\n" +
5398 12922 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5399 12923 " Reports webhook <span class=\"required\">*</span>\n" +
5400 12924 " </label>\n" +
5401 12925 " <div class=\"col-sm-8 col-lg-9\">\n" +
5402 12926 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.reports_webhook\"></data-form-errors>\n" +
5403 12927 " <input class=\"form-control\" id=\"reports_webhook\" name=\"reports_webhook\" type=\"text\" ng-model=\"$ctrl.config.reports_webhook\">\n" +
5404 12928 " </div>\n" +
5405 12929 " </div>\n" +
5406 12930 " <div class=\"form-group\" id=\"row-alerts_webhook\">\n" +
5407 12931 "\n" +
5408 12932 " <label class=\"control-label col-sm-3 col-lg-2\">\n" +
5409 12933 " Alerts webhook <span class=\"required\">*</span>\n" +
5410 12934 " </label>\n" +
5411 12935 " <div class=\"col-sm-8 col-lg-9\">\n" +
5412 12936 " <data-form-errors errors=\"$ctrl.integrationForm.ae_validation.alerts_webhook\"></data-form-errors>\n" +
5413 12937 " <input class=\"form-control StringField None\" id=\"alerts_webhook\" name=\"alerts_webhook\" type=\"text\" ng-model=\"$ctrl.config.alerts_webhook\">\n" +
5414 12938 " </div>\n" +
5415 12939 "\n" +
5416 12940 "\n" +
5417 12941 " </div>\n" +
5418 12942 " <div class=\"form-group\" id=\"row-submit\">\n" +
5419 12943 "\n" +
5420 12944 " <label class=\"control-label col-sm-3 col-lg-2\"></label>\n" +
5421 12945 " <div class=\"col-sm-8 col-lg-9\">\n" +
5422 12946 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Setup webhooks\">\n" +
5423 12947 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5424 12948 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove Integration</a>\n" +
5425 12949 " <ul class=\"dropdown-menu\">\n" +
5426 12950 " <li><a>No</a></li>\n" +
5427 12951 " <li><a ng-click=\"$ctrl.removeIntegration()\">Yes</a></li>\n" +
5428 12952 " </ul>\n" +
5429 12953 " </span>\n" +
5430 12954 " </div>\n" +
5431 12955 " </div>\n" +
5432 12956 " </form>\n" +
5433 12957 " </div>\n" +
5434 12958 "</div>\n"
5435 12959 );
5436 12960
5437 12961
5438 12962 $templateCache.put('components/views/logs-browser/logs-browser.html',
5439 12963 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.isLoading.logs\"></ng-include>\n" +
5440 12964 "\n" +
5441 12965 "<div ng-if=\"$ctrl.isLoading.logs === false\">\n" +
5442 12966 "\n" +
5443 12967 " <p class=\"search-params\">\n" +
5444 12968 " <strong>Search params:</strong>\n" +
5445 12969 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
5446 12970 " <strong>{{tag.type}}</strong>\n" +
5447 12971 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
5448 12972 "\n" +
5449 12973 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
5450 12974 " </span>\n" +
5451 12975 " </p>\n" +
5452 12976 "\n" +
5453 12977 " <p>\n" +
5454 12978 "\n" +
5455 12979 " <script type=\"text/ng-template\" id=\"SearchTypeAheadUrl.html\">\n" +
5456 12980 "\n" +
5457 12981 " </script>\n" +
5458 12982 "\n" +
5459 12983 " <form class=\"form\">\n" +
5460 12984 " <div class=\"typeahead-tags\">\n" +
5461 12985 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter logs for events, filter by servers, namespaces, levels.\"\n" +
5462 12986 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
5463 12987 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:$ctrl.aheadFilter\"\n" +
5464 12988 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
5465 12989 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
5466 12990 " </div>\n" +
5467 12991 " </form>\n" +
5468 12992 "\n" +
5469 12993 " <div class=\"well animate-show position-absolute increse-zindex\" ng-if=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\">\n" +
5470 12994 " <uib-datepicker></uib-datepicker>\n" +
5471 12995 " </div>\n" +
5472 12996 "\n" +
5473 12997 " </p>\n" +
5474 12998 "\n" +
5475 12999 " <div class=\"panel\">\n" +
5476 13000 "\n" +
5477 13001 " <div class=\"panel-body\">\n" +
5478 13002 " <c3chart data-domid=\"log_events_chart\" data-data=\"$ctrl.logEventsChartData\" data-config=\"$ctrl.logEventsChartConfig\">\n" +
5479 13003 " </c3chart>\n" +
5480 13004 " </div>\n" +
5481 13005 " </div>\n" +
5482 13006 "\n" +
5483 13007 "\n" +
5484 13008 " <div class=\"text-center\">\n" +
5485 13009 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5486 13010 " ng-change=\"$ctrl.paginationChange()\"\n" +
5487 13011 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5488 13012 " </div>\n" +
5489 13013 "\n" +
5490 13014 " <div class=\"panel panel-default\">\n" +
5491 13015 "\n" +
5492 13016 " <table class=\"table table-striped log-list\">\n" +
5493 13017 " <caption>Logs</caption>\n" +
5494 13018 " <thead>\n" +
5495 13019 " <tr>\n" +
5496 13020 " <th class=\"c1 resource\">Application</th>\n" +
5497 13021 " <th class=\"c2 message\">Message</th>\n" +
5498 13022 " <th class=\"c3 when\">When</th>\n" +
5499 13023 " </tr>\n" +
5500 13024 " </thead>\n" +
5501 13025 " <tbody>\n" +
5502 13026 " <tr ng-repeat=\"log in $ctrl.logsPage track by log.log_id\" class=\"{{$odd ? 'odd' : 'even'}}\">\n" +
5503 13027 " <td class=\"c1\">\n" +
5504 13028 " <a class=\"tag application\" ng-click=\"$ctrl.addSearchTag({type:'resource', value:log.resource_id})\">\n" +
5505 13029 " <span class=\"name\">{{log.resource_name}}</span></a>\n" +
5506 13030 " </td>\n" +
5507 13031 " <td class=\"c2\">\n" +
5508 13032 " <a class=\"tag {{log.log_level|lowercase}}\" ng-click=\"$ctrl.addSearchTag({type:'level', value:log.log_level})\">\n" +
5509 13033 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
5510 13034 " <a class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:'namespace', value:log.namespace})\">\n" +
5511 13035 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
5512 13036 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\" ng-click=\"$ctrl.addSearchTag({type:tag, value:value})\">\n" +
5513 13037 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
5514 13038 " <div class=\"log\">{{log.message}}</div>\n" +
5515 13039 " </td>\n" +
5516 13040 " <td class=\"c3 when\">\n" +
5517 13041 " <a ng-click=\"$ctrl.filterId(log)\" data-uib-tooltip=\"{{log.timestamp}}\">\n" +
5518 13042 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
5519 13043 " </a>\n" +
5520 13044 " </td>\n" +
5521 13045 " </tr>\n" +
5522 13046 "\n" +
5523 13047 " </tbody>\n" +
5524 13048 " </table>\n" +
5525 13049 "\n" +
5526 13050 " </div>\n" +
5527 13051 "\n" +
5528 13052 " <div class=\"text-center\">\n" +
5529 13053 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
5530 13054 " ng-change=\"$ctrl.paginationChange()\"\n" +
5531 13055 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"></uib-pagination>\n" +
5532 13056 " </div>\n" +
5533 13057 "\n" +
5534 13058 "</div>\n"
5535 13059 );
5536 13060
5537 13061
5538 13062 $templateCache.put('components/views/report-view/report-view.html',
5539 13063 "<script type=\"text/ng-template\" id=\"slow_call.html\">\n" +
5540 13064 " <table class=\"report-table\">\n" +
5541 13065 " <tr>\n" +
5542 13066 " <td class=\"table-label\">Type</td>\n" +
5543 13067 " <td class=\"data\"><strong>{{call.type}}\n" +
5544 13068 " ({{call.subtype}})\n" +
5545 13069 " </strong></td>\n" +
5546 13070 " </tr>\n" +
5547 13071 " <tr>\n" +
5548 13072 " <td class=\"table-label\">Duration</td>\n" +
5549 13073 " <td class=\"data\"><strong class=\"textColor_1\">{{call.duration}}</strong></td>\n" +
5550 13074 " </tr>\n" +
5551 13075 " <tr>\n" +
5552 13076 " <td class=\"table-label\">Start Time</td>\n" +
5553 13077 " <td class=\"data\">{{call.timestamp}}</td>\n" +
5554 13078 " </tr>\n" +
5555 13079 " <tr>\n" +
5556 13080 " <td class=\"table-label\">Statement</td>\n" +
5557 13081 " <td class=\"data\">\n" +
5558 13082 " <pre class=\"word-wrap\">{{call.statement}}</pre>\n" +
5559 13083 " </td>\n" +
5560 13084 " </tr>\n" +
5561 13085 " <tr ng-if=\"call.location\">\n" +
5562 13086 " <td class=\"table-label\">Location</td>\n" +
5563 13087 " <td class=\"data\">{{call.location}}</td>\n" +
5564 13088 " </tr>\n" +
5565 13089 " <tr>\n" +
5566 13090 " <td class=\"table-label\">Parameters</td>\n" +
5567 13091 " <td class=\"\">\n" +
5568 13092 " <div class=\"var-listing\" human-format vars=\"call.parameters\"></div>\n" +
5569 13093 " </td>\n" +
5570 13094 " </tr>\n" +
5571 13095 " </table>\n" +
5572 13096 "\n" +
5573 13097 " <div ng-if=\"call.children.length > 0\" class=\"subcalls p-l-8\">\n" +
5574 13098 "\n" +
5575 13099 " <p><strong>\n" +
5576 13100 " <small>Sub-calls</small>\n" +
5577 13101 " </strong></p>\n" +
5578 13102 "\n" +
5579 13103 " <div class=\"panel panel-default\">\n" +
5580 13104 " <div ng-repeat=\"call in call.children\" ng-include=\"'slow_call.html'\" class=\"panel-body\"/>\n" +
5581 13105 " </div>\n" +
5582 13106 " </div>\n" +
5583 13107 " </div>\n" +
5584 13108 "\n" +
5585 13109 "</script>\n" +
5586 13110 "\n" +
5587 13111 "<script type=\"text/ng-template\" id=\"AssignReportCtrl.html\">\n" +
5588 13112 "\n" +
5589 13113 " <div class=\"modal-header\">\n" +
5590 13114 " <h3>Assign users to report</h3>\n" +
5591 13115 " </div>\n" +
5592 13116 " <div class=\"modal-body\">\n" +
5593 13117 "\n" +
5594 13118 " <ng-include src=\"'templates/loader.html'\" ng-if=\"ctrl.loading\"></ng-include>\n" +
5595 13119 "\n" +
5596 13120 " <div class=\"row\" ng-if=\"!ctrl.loading\">\n" +
5597 13121 " <div class=\"col-sm-6\">\n" +
5598 13122 " <strong>Unassigned</strong>\n" +
5599 13123 "\n" +
5600 13124 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.unAssignedUsers\"\n" +
5601 13125 " ng-click=\"ctrl.reassignUser(user)\">\n" +
5602 13126 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
5603 13127 " <strong>{{user.user_name}}</strong><br/>\n" +
5604 13128 " {{user.name}}\n" +
5605 13129 " <div class=\"clear\"></div>\n" +
5606 13130 " </div>\n" +
5607 13131 " </div>\n" +
5608 13132 "\n" +
5609 13133 " <div class=\"col-sm-6\">\n" +
5610 13134 " <strong>Assigned</strong>\n" +
5611 13135 "\n" +
5612 13136 " <div class=\"user-assignment\" ng-repeat=\"user in ctrl.assignedUsers\" ng-click=\"ctrl.reassignUser(user)\">\n" +
5613 13137 " <img ng-src=\"{{user.gravatar_url}}\"/>\n" +
5614 13138 " {{user.user_name}}<br/>\n" +
5615 13139 " {{user.name}}\n" +
5616 13140 " <div class=\"clear\"></div>\n" +
5617 13141 " </div>\n" +
5618 13142 " </div>\n" +
5619 13143 " </div>\n" +
5620 13144 " </div>\n" +
5621 13145 " <div class=\"modal-footer\">\n" +
5622 13146 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">OK</button>\n" +
5623 13147 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
5624 13148 " </div>\n" +
5625 13149 "</script>\n" +
5626 13150 "\n" +
5627 13151 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading.report\"></ng-include>\n" +
5628 13152 "\n" +
5629 13153 "<div ng-if=\"!$ctrl.is_loading.report && $ctrl.report === null\">\n" +
5630 13154 " <strong>OOPS something went wrong :(</strong>\n" +
5631 13155 "</div>\n" +
5632 13156 "\n" +
5633 13157 "<div ng-if=\"$ctrl.report !== null && !$ctrl.is_loading.report\">\n" +
5634 13158 "\n" +
5635 13159 " <div ng-if=\"$ctrl.stateHolder.AeUser.id\" class=\"row\">\n" +
5636 13160 " <div class=\"col-lg-12\">\n" +
5637 13161 " <a onclick=\"window.history.back()\" class=\"btn btn-default\" ng-if=\"$ctrl.window.history.length > 2\"><span class=\"fa fa-arrow-circle-o-left\"></span>\n" +
5638 13162 " Go back</a>\n" +
5639 13163 " <a class=\"btn btn-default\" ng-click=\"$ctrl.assignUsersModal()\" ng-if=\"$ctrl.reportType == 'report'\"><span\n" +
5640 13164 " class=\"fa fa-flag\"></span> Assign report\n" +
5641 13165 " to user</a>\n" +
5642 13166 "\n" +
5643 13167 " <a class=\"btn {{ $ctrl.report.group.fixed ? 'btn-success' : 'btn-default'}}\" ng-click=\"$ctrl.markFixed()\"\n" +
5644 13168 " ng-if=\"$ctrl.reportType == 'report'\">\n" +
5645 13169 " <span class=\"fa fa-check\"></span> Mark fixed</a>\n" +
5646 13170 "\n" +
5647 13171 " <span class=\"dropdown\" ng-if=\"$ctrl.report.application.integrations.length\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5648 13172 " <a class=\"dropdown-toggle btn btn-default\" data-uib-dropdown-toggle>\n" +
5649 13173 " <span class=\"fa fa-send\"></span> Integrations\n" +
5650 13174 " </a>\n" +
5651 13175 " <ul class=\"dropdown-menu\">\n" +
5652 13176 " <li ng-repeat=\"choice in $ctrl.report.application.integrations\">\n" +
5653 13177 " <a ng-click=\"$ctrl.runIntegration(choice.name)\">{{choice.action}}</a>\n" +
5654 13178 " </li>\n" +
5655 13179 " </ul>\n" +
5656 13180 " </span>\n" +
5657 13181 "\n" +
5658 13182 " <a class=\"btn btn-default\" ng-click=\"$ctrl.markPublic()\">Make {{$ctrl.group.public ? 'private' : 'public'}}</a>\n" +
5659 13183 "\n" +
5660 13184 "<span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
5661 13185 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Delete</a>\n" +
5662 13186 " <ul class=\"dropdown-menu\">\n" +
5663 13187 " <li><a>No</a></li>\n" +
5664 13188 " <li><a ng-click=\"$ctrl.delete()\">Yes</a></li>\n" +
5665 13189 " </ul>\n" +
5666 13190 "</span>\n" +
5667 13191 " </div>\n" +
5668 13192 " </div>\n" +
5669 13193 "\n" +
5670 13194 " <div class=\"row\">\n" +
5671 13195 " <div class=\"col-lg-4\">\n" +
5672 13196 "\n" +
5673 13197 " <div class=\"panel panel-default m-t-1\">\n" +
5674 13198 " <div class=\"panel-body\">\n" +
5675 13199 "\n" +
5676 13200 " <h3 class=\"m-t-0\">Report Information</h3>\n" +
5677 13201 "\n" +
5678 13202 " <table class=\"report-table with-ellipsis\">\n" +
5679 13203 " <tr>\n" +
5680 13204 " <td class=\"table-label\">Occurences</td>\n" +
5681 13205 " <td class=\"data\">{{$ctrl.report.group.occurences}}</td>\n" +
5682 13206 " </tr>\n" +
5683 13207 " <tr ng-if=\"$ctrl.report.http_status\">\n" +
5684 13208 " <td class=\"table-label\">HTTP status</td>\n" +
5685 13209 " <td class=\"data\">{{$ctrl.report.http_status}}</td>\n" +
5686 13210 " </tr>\n" +
5687 13211 " <tr ng-if=\"$ctrl.report.group.priority\">\n" +
5688 13212 " <td class=\"table-label\">Priority</td>\n" +
5689 13213 " <td class=\"data\">{{$ctrl.report.group.priority}}</td>\n" +
5690 13214 " </tr>\n" +
5691 13215 " <tr ng-if=\"$ctrl.report.group.public\">\n" +
5692 13216 " <td class=\"table-label\">Public URL</td>\n" +
5693 13217 " <td class=\"data\">\n" +
5694 13218 " <form>\n" +
5695 13219 " <textarea class=\"TextAreaField form-control\" id=\"public-url\" onclick=\"this.select()\">{{$ctrl.$state.href($ctrl.$state.current.name, $ctrl.$state.params, {absolute: true})}}</textarea>\n" +
5696 13220 " </form>\n" +
5697 13221 " </td>\n" +
5698 13222 " </tr>\n" +
5699 13223 " <tr data-uib-tooltip=\"{{$ctrl.report.url}}\">\n" +
5700 13224 " <td class=\"table-label\">URL</td>\n" +
5701 13225 " <td class=\"data ellipsis\"><a href=\"{{$ctrl.report.url}}\">{{$ctrl.report.url}}</a></td>\n" +
5702 13226 " </tr>\n" +
5703 13227 "\n" +
5704 13228 " <tr ng-if=\"$ctrl.report.ip\">\n" +
5705 13229 " <td class=\"table-label\">Remote IP</td>\n" +
5706 13230 " <td class=\"data\">{{$ctrl.report.ip}}</td>\n" +
5707 13231 " </tr>\n" +
5708 13232 " <tr ng-if=\"$ctrl.report.user_agent\" data-uib-tooltip=\"{{$ctrl.report.user_agent}}\">\n" +
5709 13233 " <td class=\"table-label\">User Agent</td>\n" +
5710 13234 " <td class=\"data ellipsis\">{{$ctrl.report.user_agent}}</td>\n" +
5711 13235 " </tr>\n" +
5712 13236 " <tr ng-if=\"$ctrl.report.message\">\n" +
5713 13237 " <td class=\"table-label\">Message</td>\n" +
5714 13238 " <td class=\"data\">{{$ctrl.report.message}}</td>\n" +
5715 13239 " </tr>\n" +
5716 13240 " <tr ng-if=\"$ctrl.report.duration > 0\">\n" +
5717 13241 " <td class=\"table-label\">Duration</td>\n" +
5718 13242 " <td class=\"data\">\n" +
5719 13243 " <span>{{$ctrl.report.duration}}s</span>\n" +
5720 13244 " </td>\n" +
5721 13245 " </tr>\n" +
5722 13246 " <tr>\n" +
5723 13247 " <td class=\"table-label\">First occured</td>\n" +
5724 13248 " <td class=\"data\">\n" +
5725 13249 " <span uib-tooltip=\"{{$ctrl.report.group.first_timestamp}}\"><iso-to-relative-time\n" +
5726 13250 " time=\"{{$ctrl.report.group.first_timestamp}}\"/></span>\n" +
5727 13251 " </td>\n" +
5728 13252 " </tr>\n" +
5729 13253 " <tr>\n" +
5730 13254 " <td class=\"table-label\">Last occured</td>\n" +
5731 13255 " <td class=\"data\">\n" +
5732 13256 " <span uib-tooltip=\"{{$ctrl.report.group.last_timestamp}}\"><iso-to-relative-time\n" +
5733 13257 " time=\"{{$ctrl.report.group.last_timestamp}}\"/></span>\n" +
5734 13258 " </td>\n" +
5735 13259 " </tr>\n" +
5736 13260 " </table>\n" +
5737 13261 "\n" +
5738 13262 " <div ng-if=\"$ctrl.requestStats\">\n" +
5739 13263 " <h3>Performance stats</h3>\n" +
5740 13264 "\n" +
5741 13265 " <div class=\"perf_stats\">\n" +
5742 13266 " <span class=\"stat\" ng-repeat=\"stat in $ctrl.requestStats\"\n" +
5743 13267 " ng-if=\"stat.calls > 0 || stat.value > 0\"><strong>\n" +
5744 13268 " <span class=\"{{stat.name}} bar\" style=\"width:10px\"></span> {{stat.calls}}\n" +
5745 13269 " <span ng-if=\"stat.name!='main'\"><small>{{stat.name}} calls</small></span>\n" +
5746 13270 " <span ng-if=\"stat.name=='main'\">\n" +
5747 13271 " <span class=\"fa fa-question-circle\"\n" +
5748 13272 " data-uib-tooltip=\"Execution time that didnt get assigned to other layers\"></span> Other</span>\n" +
5749 13273 " </strong>\n" +
5750 13274 " </span>\n" +
5751 13275 "\n" +
5752 13276 " <div style=\"width: 100%; overflow:hidden\">\n" +
5753 13277 " <div class=\"{{stat.name}} bar\" style=\"width:{{stat.percent}}%; height: 25px\"\n" +
5754 13278 " ng-repeat=\"stat in $ctrl.requestStats\"\n" +
5755 13279 " data-uib-tooltip=\"{{stat.value}}s - Cumulative time spent in this request on all {{ stat.name }} calls\"></div>\n" +
5756 13280 " <div class=\"row\">\n" +
5757 13281 " <div class=\"col-xs-6 text-left\">\n" +
5758 13282 " <small>0s</small>\n" +
5759 13283 " </div>\n" +
5760 13284 " <div class=\"col-xs-6 text-right\">\n" +
5761 13285 " <small>{{$ctrl.report.duration.toFixed(3)}}s</small>\n" +
5762 13286 " </div>\n" +
5763 13287 " </div>\n" +
5764 13288 " </div>\n" +
5765 13289 " </div>\n" +
5766 13290 " </div>\n" +
5767 13291 "\n" +
5768 13292 " <h3>Tags</h3>\n" +
5769 13293 "\n" +
5770 13294 " <table class=\"report-table with-tags\">\n" +
5771 13295 " <tr ng-repeat=\"(tag, value) in $ctrl.report.tags\">\n" +
5772 13296 " <td class=\"table-label\" ng-switch=\"tag\"><!--\n" +
5773 13297 " --><span ng-switch-when=\"user_name\">Username/UID</span><!--\n" +
5774 13298 " --><span ng-switch-when=\"view_name\">View Name</span><!--\n" +
5775 13299 " --><span ng-switch-when=\"server_name\">Server Name</span><!--\n" +
5776 13300 " --><span ng-switch-default>{{ tag }}</span>\n" +
5777 13301 " </td>\n" +
5778 13302 " <td class=\"data\"><a ng-click=\"$ctrl.searchTag(tag, value)\">{{ value }}</td>\n" +
5779 13303 " </tr>\n" +
5780 13304 " </table>\n" +
5781 13305 "\n" +
5782 13306 " </div>\n" +
5783 13307 " </div>\n" +
5784 13308 "\n" +
5785 13309 "\n" +
5786 13310 " </div>\n" +
5787 13311 " <div class=\"col-lg-8\">\n" +
5788 13312 " <div class=\"frames\">\n" +
5789 13313 " <p class=\"text-center\">Report history</p>\n" +
5790 13314 "\n" +
5791 13315 " <div class=\"panel\" ng-if=\"!$ctrl.is_loading.history\">\n" +
5792 13316 " <div class=\"panel-body\">\n" +
5793 13317 " <c3chart data-domid=\"report_history_chart\" data-data=\"$ctrl.reportHistoryData\" data-config=\"$ctrl.reportHistoryConfig\">\n" +
5794 13318 " </c3chart>\n" +
5795 13319 " </div>\n" +
5796 13320 " </div>\n" +
5797 13321 "\n" +
5798 13322 " <div class=\"row m-b-1\">\n" +
5799 13323 " <div class=\"col-sm-2 text-left\">\n" +
5800 13324 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.previous_report ? '' : 'disabled'}}\"\n" +
5801 13325 " ng-click=\"$ctrl.previousDetail()\">\n" +
5802 13326 " <span class=\"fa fa-arrow-left\"></span>\n" +
5803 13327 " Prev. detail</a>\n" +
5804 13328 "\n" +
5805 13329 " </div>\n" +
5806 13330 " <div class=\"col-sm-8 text-center\">\n" +
5807 13331 " <small>\n" +
5808 13332 " <span uib-tooltip=\"{{$ctrl.report.start_time|isoToRelativeTime}}\" class=\"m-r-1\">\n" +
5809 13333 " {{$ctrl.report.start_time.replace('T', ' ')}} UTC</span>\n" +
5810 13334 " <span class=\"text-muted\">ID: {{$ctrl.report.request_id}}</span>\n" +
5811 13335 " </small>\n" +
5812 13336 " </div>\n" +
5813 13337 " <div class=\"col-sm-2 text-right\">\n" +
5814 13338 " <a class=\"switch_detail btn btn-sm btn-default {{$ctrl.report.group.next_report ? '' : 'disabled'}}\"\n" +
5815 13339 " ng-click=\"$ctrl.nextDetail()\">\n" +
5816 13340 " Next detail <span class=\"fa fa-arrow-right\"></span></a>\n" +
5817 13341 " </div>\n" +
5818 13342 " </div>\n" +
5819 13343 "\n" +
5820 13344 " <h3 class=\"word-wrap\">{{$ctrl.report.error}}</h3>\n" +
5821 13345 "\n" +
5822 13346 " <div ng-if=\"$ctrl.report.traceback\">\n" +
5823 13347 "\n" +
5824 13348 " <h3><strong>Traceback</strong></h3>\n" +
5825 13349 "\n" +
5826 13350 " <div class=\"btn-group\">\n" +
5827 13351 " <a ng-if=\"$ctrl.traceback.length-10 > 0 \" ng-click=\"$ctrl.showLong = !$ctrl.showLong\"\n" +
5828 13352 " class=\"btn btn-default {{$ctrl.showLong ? 'active' : ''}}\">\n" +
5829 13353 " <span class=\"fa fa-align-left\"></span>\n" +
5830 13354 " <small>Show {{$ctrl.traceback.length-10}} remaining frames</small>\n" +
5831 13355 " </a>\n" +
5832 13356 "\n" +
5833 13357 " <a class=\"btn btn-default {{$ctrl.showRaw ? 'active' : ''}}\" ng-click=\"$ctrl.showRaw = !$ctrl.showRaw\">\n" +
5834 13358 " <span class=\"fa fa-list\"></span>\n" +
5835 13359 " <small>Raw version</small>\n" +
5836 13360 " </a>\n" +
5837 13361 " </div>\n" +
5838 13362 "\n" +
5839 13363 " <div ng-if=\"$ctrl.showRaw\" class=\"m-t-1\">\n" +
5840 13364 " <pre>{{$ctrl.rawTraceback}}</pre>\n" +
5841 13365 " </div>\n" +
5842 13366 " <div ng-if=\"!$ctrl.showRaw\" class=\"m-t-1\">\n" +
5843 13367 "\n" +
5844 13368 " <div ng-repeat=\"frame in $ctrl.traceback\" class=\"frame {{$odd ? 'odd' : 'even'}}\"\n" +
5845 13369 " ng-if=\"$index >= $ctrl.traceback.length-10 || $ctrl.traceback.length <= 10 || $ctrl.showLong\">\n" +
5846 13370 " <div class=\"frameline\" ng-if=\"frame.line\">\n" +
5847 13371 " <a class=\"inspect_vars\" ng-click=\"frame.showVars = !frame.showVars\" ng-if=\"frame.vars\">\n" +
5848 13372 " <span class=\"fa fa-search dim btn btn-default\"\n" +
5849 13373 " uib-tooltip=\"Show local vars\"> </span>\n" +
5850 13374 " </a>\n" +
5851 13375 "\n" +
5852 13376 " <span class=\"no-vars\" ng-if=\"frame.vars.length == 0\"></span>\n" +
5853 13377 "\n" +
5854 13378 " <span ng-if=\"frame.file\">\n" +
5855 13379 " <span class=\"mono\">File</span> <span class=\"file mono\">{{frame.file || 'Unknown file'}}</span>,\n" +
5856 13380 " </span>\n" +
5857 13381 " <span ng-if=\"frame.module && !frame.file\">\n" +
5858 13382 " <span class=\"mono\">Module</span> <span class=\"file mono\">{{frame.module || 'Unknown module'}}</span>,\n" +
5859 13383 " </span>\n" +
5860 13384 " <span class=\"mono\">line</span> <span class=\"line mono\">{{frame.line || 'Unknown line'}}</span>\n" +
5861 13385 "\n" +
5862 13386 " <span ng-if=\"frame.fn\"><span class=\"mono\">in</span> <strong\n" +
5863 13387 " class=\"fn mono\">{{frame.fn || 'Unknown function'}}</strong></span>\n" +
5864 13388 "\n" +
5865 13389 " </div>\n" +
5866 13390 " <div class=\"cline mono\" ng-if=\"frame.cline\">{{frame.cline || 'Unknown context'}}</div>\n" +
5867 13391 "\n" +
5868 13392 " <div class=\"vars\" ng-if=\"frame.showVars\">\n" +
5869 13393 " <table class=\"var-listing small\">\n" +
5870 13394 " <tr ng-repeat=\"fvar in frame.vars track by $index\" class=\"frame {{$odd ? 'odd' : 'even'}}\">\n" +
5871 13395 " <td class=\"var-label\">{{ fvar[0] }}</td>\n" +
5872 13396 " <td>\n" +
5873 13397 " <span human-format vars=\"fvar[1]\"></span>\n" +
5874 13398 " </td>\n" +
5875 13399 " </tr>\n" +
5876 13400 " </table>\n" +
5877 13401 "\n" +
5878 13402 " </div>\n" +
5879 13403 " </div>\n" +
5880 13404 " </div>\n" +
5881 13405 "\n" +
5882 13406 "\n" +
5883 13407 " </div>\n" +
5884 13408 "\n" +
5885 13409 "\n" +
5886 13410 " <uib-tabset>\n" +
5887 13411 " <uib-tab select=\"$ctrl.selectedTab('slow_calls')\" active=\"$ctrl.tabs.slow_calls\">\n" +
5888 13412 " <uib-tab-heading>\n" +
5889 13413 " Slow Calls\n" +
5890 13414 " </uib-tab-heading>\n" +
5891 13415 "\n" +
5892 13416 " <h3><strong>Slow Calls</strong></h3>\n" +
5893 13417 "\n" +
5894 13418 " <div ng-if=\"$ctrl.report.slow_calls.length > 0\">\n" +
5895 13419 " <div ng-repeat=\"call in $ctrl.report.slow_calls\" ng-include=\"'slow_call.html'\"></div>\n" +
5896 13420 " </div>\n" +
5897 13421 "\n" +
5898 13422 " <div ng-if=\"$ctrl.report.slow_calls.length == 0\">\n" +
5899 13423 " No slow calls reported\n" +
5900 13424 " </div>\n" +
5901 13425 "\n" +
5902 13426 " </uib-tab>\n" +
5903 13427 "\n" +
5904 13428 "\n" +
5905 13429 " <uib-tab select=\"$ctrl.selectedTab('request_details')\" active=\"$ctrl.tabs.request_details\">\n" +
5906 13430 " <uib-tab-heading>\n" +
5907 13431 " Request details\n" +
5908 13432 " </uib-tab-heading>\n" +
5909 13433 "\n" +
5910 13434 " <h3><strong>Extra</strong></h3>\n" +
5911 13435 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.extra\"></div>\n" +
5912 13436 " <h3><strong>Request details</strong></h3>\n" +
5913 13437 " <div class=\"var-listing\" human-format vars=\"$ctrl.report.request\"></div>\n" +
5914 13438 "\n" +
5915 13439 " </uib-tab>\n" +
5916 13440 "\n" +
5917 13441 " <uib-tab select=\"$ctrl.selectedTab('logs')\" active=\"$ctrl.tabs.logs\">\n" +
5918 13442 " <uib-tab-heading>\n" +
5919 13443 " Logs\n" +
5920 13444 " </uib-tab-heading>\n" +
5921 13445 "\n" +
5922 13446 " <div ng-if=\"$ctrl.is_loading.logs!=false\" class=\"text-center\">\n" +
5923 13447 " <span class=\"fa fa-cog fa-spin fa-3x loader\"></span>\n" +
5924 13448 " </div>\n" +
5925 13449 " <p ng-if=\"$ctrl.reportLogs.length == 0\"> No logs found</p>\n" +
5926 13450 "\n" +
5927 13451 " <table class=\"table table-striped log-list\" ng-if=\"$ctrl.reportLogs.length > 0\">\n" +
5928 13452 "\n" +
5929 13453 " <caption>Logs</caption>\n" +
5930 13454 " <thead>\n" +
5931 13455 " <tr>\n" +
5932 13456 " <th class=\"message\">Message</th>\n" +
5933 13457 " <th class=\"when\">When</th>\n" +
5934 13458 " </tr>\n" +
5935 13459 " </thead>\n" +
5936 13460 " <tbody>\n" +
5937 13461 " <tr ng-repeat=\"log in $ctrl.reportLogs track by log.log_id\">\n" +
5938 13462 " <td>\n" +
5939 13463 " <a class=\"tag {{log.log_level|lowercase}}\">\n" +
5940 13464 " <span class=\"name\">level:</span> {{log.log_level}}</a>\n" +
5941 13465 " <a class=\"tag\">\n" +
5942 13466 " <span class=\"name\">namespace:</span> {{log.namespace}}</a>\n" +
5943 13467 " <a ng-repeat=\"(tag, value) in log.tags\" class=\"tag\">\n" +
5944 13468 " <span class=\"name\">{{tag}}:</span> {{value}}</a>\n" +
5945 13469 " <div class=\"log\">\n" +
5946 13470 " {{log.message}}\n" +
5947 13471 " </div>\n" +
5948 13472 " </td>\n" +
5949 13473 " <td class=\"when\">\n" +
5950 13474 " <a data-uib-tooltip=\"{{log.timestamp}}\">\n" +
5951 13475 " <iso-to-relative-time time=\"{{log.timestamp}}\"/>\n" +
5952 13476 " </a>\n" +
5953 13477 " </td>\n" +
5954 13478 " </tr>\n" +
5955 13479 "\n" +
5956 13480 " </tbody>\n" +
5957 13481 " </table>\n" +
5958 13482 "\n" +
5959 13483 " </uib-tab>\n" +
5960 13484 "\n" +
5961 13485 "\n" +
5962 13486 " <uib-tab select=\"$ctrl.selectedTab('comments')\" active=\"$ctrl.tabs.comments\">\n" +
5963 13487 " <uib-tab-heading>\n" +
5964 13488 " Comments\n" +
5965 13489 " <span class=\"label label-info\">{{$ctrl.report.comments.length}}</span>\n" +
5966 13490 "\n" +
5967 13491 " </uib-tab-heading>\n" +
5968 13492 "\n" +
5969 13493 " <h3><strong>Comments</strong></h3>\n" +
5970 13494 "\n" +
5971 13495 " <p ng-if=\"$ctrl.report.comments.length == 0\">No comments yet - be first to add one!</p>\n" +
5972 13496 "\n" +
5973 13497 " <div class=\"comment\" ng-repeat=\"comment in $ctrl.report.comments\">\n" +
5974 13498 " <p name=\"comment-{{comment.comment_id}}\"><span class=\"fa fa-comment\"></span>\n" +
5975 13499 " <strong>{{comment.user_name}}</strong>\n" +
5976 13500 " <iso-to-relative-time time=\"{{comment.created_timestamp}}\"/>\n" +
5977 13501 " </p>\n" +
5978 13502 " <p class=\"well\">{{comment.body}}</p>\n" +
5979 13503 " </div>\n" +
5980 13504 "\n" +
5981 13505 " <form name=\"commentForm\" ng-submit=\"$ctrl.addComment()\">\n" +
5982 13506 " <div class=\"form-group\">\n" +
5983 13507 " <textarea type=\"text\" class=\"form-control\" id=\"$ctrl.commentForm\" ng-model=\"$ctrl.comment\" required\n" +
5984 13508 " mentio mentio-search=\"$ctrl.searchMentionedPeople(term)\" mentio-items=\"$ctrl.mentionedPeople| filter:label:typedTerm\" class=\"form-control\"></textarea>\n" +
5985 13509 "\n" +
5986 13510 " </div>\n" +
5987 13511 " <div class=\"form-group\">\n" +
5988 13512 " <button class=\"btn btn-info\" ng-disabled=\"$ctrl.commentForm.$invalid\">Comment</button>\n" +
5989 13513 " </div>\n" +
5990 13514 " </form>\n" +
5991 13515 "\n" +
5992 13516 " <div ng-repeat=\"comment in $ctrl.report.comments\" class=\"{{$odd ? 'odd' : 'even'}}\" class=\"repeat-animate\">\n" +
5993 13517 " </div>\n" +
5994 13518 "\n" +
5995 13519 " </uib-tab>\n" +
5996 13520 "\n" +
5997 13521 " <uib-tab select=\"$ctrl.selectedTab('affected_users')\" active=\"$ctrl.tabs.affected_users\">\n" +
5998 13522 " <uib-tab-heading>\n" +
5999 13523 " Affected users\n" +
6000 13524 " <span class=\"label label-warning\">{{$ctrl.report.affected_users_count}}</span>\n" +
6001 13525 "\n" +
6002 13526 " </uib-tab-heading>\n" +
6003 13527 "\n" +
6004 13528 " <h3><strong>50 most affected users ID's by this issue:</strong></h3>\n" +
6005 13529 " <ul class=\"affected-user-list\">\n" +
6006 13530 " <li ng-repeat=\"user in $ctrl.report.top_affected_users\">\n" +
6007 13531 " <strong>{{user.username}}</strong> <span class=\"badge\" uib-tooltip=\"occurences\">{{user.count}}</span>\n" +
6008 13532 " </li>\n" +
6009 13533 " </ul>\n" +
6010 13534 "\n" +
6011 13535 " </uib-tab>\n" +
6012 13536 "\n" +
6013 13537 " </uib-tabset>\n" +
6014 13538 "\n" +
6015 13539 "\n" +
6016 13540 " </div>\n" +
6017 13541 "\n" +
6018 13542 " </div>\n" +
6019 13543 " </div>\n" +
6020 13544 "</div>\n"
6021 13545 );
6022 13546
6023 13547
6024 13548 $templateCache.put('components/views/reports-browser-view/reports-browser-view.html',
6025 13549 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
6026 13550 "\n" +
6027 13551 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
6028 13552 "\n" +
6029 13553 " <p class=\"search-params\">\n" +
6030 13554 " <strong>Search params:</strong>\n" +
6031 13555 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
6032 13556 " <strong>{{tag.type}}</strong>\n" +
6033 13557 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
6034 13558 "\n" +
6035 13559 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
6036 13560 " </span>\n" +
6037 13561 " </p>\n" +
6038 13562 "\n" +
6039 13563 " <form class=\"form\">\n" +
6040 13564 " <div class=\"typeahead-tags\">\n" +
6041 13565 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter reports - filter by tags, exception, priority or other properties.\"\n" +
6042 13566 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
6043 13567 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
6044 13568 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
6045 13569 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
6046 13570 " </div>\n" +
6047 13571 " </form>\n" +
6048 13572 "\n" +
6049 13573 "\n" +
6050 13574 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
6051 13575 " class=\"animate-show\">\n" +
6052 13576 " <uib-datepicker></uib-datepicker>\n" +
6053 13577 " </div>\n" +
6054 13578 "\n" +
6055 13579 " </p>\n" +
6056 13580 "\n" +
6057 13581 "\n" +
6058 13582 " <div class=\"text-center\">\n" +
6059 13583 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6060 13584 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6061 13585 " ng-change=\"$ctrl.paginationChange()\"\n" +
6062 13586 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6063 13587 " </div>\n" +
6064 13588 "\n" +
6065 13589 " <div class=\"panel panel-default\">\n" +
6066 13590 " <!-- Default panel contents -->\n" +
6067 13591 "\n" +
6068 13592 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
6069 13593 " <caption>Reports</caption>\n" +
6070 13594 " <thead>\n" +
6071 13595 " <tr>\n" +
6072 13596 " <th class=\"c1 ordering occurences\">#</th>\n" +
6073 13597 " <th class=\"c2 application\">Application</th>\n" +
6074 13598 " <th class=\"c4 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
6075 13599 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
6076 13600 " title=\"Tick to see UTC time instead relative\"></th>\n" +
6077 13601 " <th class=\"c5 error_type\">Error</th>\n" +
6078 13602 " </tr>\n" +
6079 13603 " </thead>\n" +
6080 13604 " <tbody>\n" +
6081 13605 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
6082 13606 " <td class=\"c1 occurences\">\n" +
6083 13607 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
6084 13608 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
6085 13609 " {{report.group.occurences|numberToThousands}}\n" +
6086 13610 " </span>\n" +
6087 13611 " </td>\n" +
6088 13612 " <td class=\"c2 application\">\n" +
6089 13613 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
6090 13614 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
6091 13615 " <td class=\"c3 when\">\n" +
6092 13616 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
6093 13617 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
6094 13618 " </span>\n" +
6095 13619 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
6096 13620 " </td>\n" +
6097 13621 " <td class=\"c4 report ellipsis\"><a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\" title=\"{{report.error}}\">{{report.error || 'Unknown Exception'}}</a> <br/>\n" +
6098 13622 " <span class=\"url\">{{ report.tags.view_name || report.url_path}}</td>\n" +
6099 13623 " </tr>\n" +
6100 13624 "\n" +
6101 13625 " </tbody>\n" +
6102 13626 " </table>\n" +
6103 13627 " </div>\n" +
6104 13628 "\n" +
6105 13629 "\n" +
6106 13630 " <div class=\"text-center\">\n" +
6107 13631 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6108 13632 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6109 13633 " ng-change=\"$ctrl.paginationChange()\"\n" +
6110 13634 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6111 13635 " </div>\n" +
6112 13636 "\n" +
6113 13637 "</div>\n"
6114 13638 );
6115 13639
6116 13640
6117 13641 $templateCache.put('components/views/reports-slow-browser-view/reports-slow-browser-view.html',
6118 13642 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.is_loading\"></ng-include>\n" +
6119 13643 "\n" +
6120 13644 "<div ng-if=\"$ctrl.is_loading === false\">\n" +
6121 13645 "\n" +
6122 13646 " <p class=\"search-params\">\n" +
6123 13647 " <strong>Search params:</strong>\n" +
6124 13648 " <span ng-repeat=\"tag in $ctrl.searchParams.tags\" class=\"tag\">\n" +
6125 13649 " <strong>{{tag.type}}</strong>\n" +
6126 13650 " {{ tag.type == 'resource' ? $ctrl.applications[tag.value].resource_name : tag.value }}\n" +
6127 13651 "\n" +
6128 13652 " <a ng-click=\"$ctrl.removeSearchTag(tag)\"><span class=\"fa fa-times\"></span></a>\n" +
6129 13653 " </span>\n" +
6130 13654 " </p>\n" +
6131 13655 "\n" +
6132 13656 " <p>\n" +
6133 13657 "\n" +
6134 13658 " <form class=\"form\">\n" +
6135 13659 " <div class=\"typeahead-tags\">\n" +
6136 13660 " <input type=\"text\" id=\"typeAhead\" ng-model=\"$ctrl.filterTypeAhead\" placeholder=\"Start typing to filter slowness reports - filter by tags, average response time, priority or other properties.\"\n" +
6137 13661 " ng-keydown=\"$ctrl.typeAheadTag($event)\"\n" +
6138 13662 " uib-typeahead=\"tag as tag.text for tag in $ctrl.filterTypeAheadOptions | filter:$viewValue:aheadFilter\"\n" +
6139 13663 " typeahead-min-length=\"1\" class=\"form-control\"\n" +
6140 13664 " typeahead-template-url=\"templates/directives/search_type_ahead.html\">\n" +
6141 13665 " </div>\n" +
6142 13666 " </form>\n" +
6143 13667 "\n" +
6144 13668 "\n" +
6145 13669 " <div class=\"well position-absolute increse-zindex\" ng-show=\"$ctrl.showDatePicker\" ng-model=\"$ctrl.pickerDate\" ng-change=\"$ctrl.pickerDateChanged()\"\n" +
6146 13670 " class=\"animate-show\">\n" +
6147 13671 " <uib-datepicker></uib-datepicker>\n" +
6148 13672 " </div>\n" +
6149 13673 "\n" +
6150 13674 " </p>\n" +
6151 13675 "\n" +
6152 13676 "\n" +
6153 13677 " <div class=\"text-center\">\n" +
6154 13678 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6155 13679 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6156 13680 " ng-change=\"$ctrl.paginationChange()\"\n" +
6157 13681 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6158 13682 " </div>\n" +
6159 13683 "\n" +
6160 13684 "\n" +
6161 13685 " <div class=\"panel panel-default\">\n" +
6162 13686 " <!-- Default panel contents -->\n" +
6163 13687 "\n" +
6164 13688 " <table class=\"table table-striped report-list\" ng-show=\"!$ctrl.is_loading\">\n" +
6165 13689 " <caption>Slow Request Reports</caption>\n" +
6166 13690 " <thead>\n" +
6167 13691 " <tr>\n" +
6168 13692 " <td class=\"c1 ordering occurences\">#</td>\n" +
6169 13693 " <td class=\"c2 average_duration\">Avg. duration</td>\n" +
6170 13694 " <td class=\"c3 application\">Application</td>\n" +
6171 13695 " <td class=\"c5 when\">When <input type=\"checkbox\" ng-model=\"$ctrl.notRelativeTime\"\n" +
6172 13696 " ng-change=\"$ctrl.changeRelativeTime()\"\n" +
6173 13697 " title=\"Tick to see UTC time instead relative\"></td>\n" +
6174 13698 " <td class=\"c6 error_type\">Location</td>\n" +
6175 13699 " </tr>\n" +
6176 13700 " </thead>\n" +
6177 13701 " <tbody>\n" +
6178 13702 " <tr ng-repeat=\"report in $ctrl.reportsPage track by report.id\">\n" +
6179 13703 " <td class=\"c1 occurences\">\n" +
6180 13704 " <span class=\"priority-{{report.group.priority}}\" data-uib-tooltip=\"Report priority\">{{report.group.priority}}</span>\n" +
6181 13705 " <span class=\"count {{report.presentation.className}}\" data-uib-tooltip=\"{{report.presentation.tooltip}}\">\n" +
6182 13706 " {{report.group.occurences|numberToThousands}}\n" +
6183 13707 " </span>\n" +
6184 13708 " </td>\n" +
6185 13709 " <td class=\"c2 average_duration\">{{report.group.average_duration.toFixed(3)}}s</td>\n" +
6186 13710 " <td class=\"c3 application\">\n" +
6187 13711 " <div class=\"app_name\">{{report.resource_name}}</div>\n" +
6188 13712 " <span class=\"server\">@{{report.tags.server_name}}</span></td>\n" +
6189 13713 " <td class=\"c4 when\">\n" +
6190 13714 " <span ng-show=\"!$ctrl.notRelativeTime\"><span data-uib-tooltip=\"{{report.group.last_timestamp}}\"><iso-to-relative-time\n" +
6191 13715 " time=\"{{report.group.last_timestamp}}\"/></span>\n" +
6192 13716 " </span>\n" +
6193 13717 " <span ng-show=\"$ctrl.notRelativeTime\">{{report.group.last_timestamp.replace('T', ' ').slice(0,16)}}</span>\n" +
6194 13718 " </td>\n" +
6195 13719 " <td class=\"c5 report ellipsis\">\n" +
6196 13720 " <a ui-sref=\"report.view_detail({groupId:report.group.id, reportId:report.id})\">{{ report.tags.view_name || report.url_path}} </span></a></td>\n" +
6197 13721 " </td>\n" +
6198 13722 " </tr>\n" +
6199 13723 "\n" +
6200 13724 " </tbody>\n" +
6201 13725 " </table>\n" +
6202 13726 "\n" +
6203 13727 " </div>\n" +
6204 13728 "\n" +
6205 13729 " <div class=\"text-center\">\n" +
6206 13730 " <uib-pagination total-items=\"$ctrl.itemCount\" items-per-page=\"$ctrl.itemsPerPage\" ng-model=\"$ctrl.page\" max-size=\"10\"\n" +
6207 13731 " class=\"pagination pagination-sm\" boundary-links=\"true\" direction-links=\"false\"\n" +
6208 13732 " ng-change=\"$ctrl.paginationChange()\"\n" +
6209 13733 " ng-show=\"!$ctrl.is_loading\"></uib-pagination>\n" +
6210 13734 " </div>\n" +
6211 13735 "\n" +
6212 13736 "</div>\n"
6213 13737 );
6214 13738
6215 13739
6216 13740 $templateCache.put('components/views/settings-view/settings-view.html',
6217 13741 "<div class=\"row\">\n" +
6218 13742 " <div class=\"col-sm-3\" id=\"menu\">\n" +
6219 13743 " <div class=\"panel panel-default\">\n" +
6220 13744 " <div class=\"panel-heading\">Applications</div>\n" +
6221 13745 " <ul class=\"list-group\">\n" +
6222 13746 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.list\"><span class=\"fa fa-cog\"></span> List applications</a></li>\n" +
6223 13747 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.update({resourceId:'new'})\"><span class=\"fa fa-plus-circle\"></span> Create application</a></li>\n" +
6224 13748 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"applications.purge_logs\"><span class=\"fa fa-trash-o\"></span> Purge logs</a></li>\n" +
6225 13749 " </ul>\n" +
6226 13750 "\n" +
6227 13751 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.settingsNav.menuApplicationsItems.length\">\n" +
6228 13752 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.settingsNav.menuApplicationsItems\">\n" +
6229 13753 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
6230 13754 " </li>\n" +
6231 13755 " </ul>\n" +
6232 13756 "\n" +
6233 13757 " </div>\n" +
6234 13758 "\n" +
6235 13759 "\n" +
6236 13760 " <div class=\"panel panel-default\">\n" +
6237 13761 " <div class=\"panel-heading\">Settings</div>\n" +
6238 13762 " <ul class=\"list-group\">\n" +
6239 13763 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.edit\"><span class=\"fa fa-user\"></span> Profile details</a></li>\n" +
6240 13764 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.password\"><span class=\"fa fa-lock\"></span> Change Password</a></li>\n" +
6241 13765 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.identities\"><span class=\"fa fa-link\"></span> External Identities</a></li>\n" +
6242 13766 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.profile.auth_tokens\"><span class=\"fa fa-unlock\"></span> Auth Tokens</a></li>\n" +
6243 13767 " </ul>\n" +
6244 13768 "\n" +
6245 13769 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.settingsNav.menuUserSettingsItems.length\">\n" +
6246 13770 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.settingsNav.menuUserSettingsItems\">\n" +
6247 13771 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
6248 13772 " </li>\n" +
6249 13773 " </ul>\n" +
6250 13774 "\n" +
6251 13775 " </div>\n" +
6252 13776 "\n" +
6253 13777 " <div class=\"panel panel-default\">\n" +
6254 13778 " <div class=\"panel-heading\">Notifications</div>\n" +
6255 13779 " <ul class=\"list-group\">\n" +
6256 13780 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.list\"><span class=\"fa fa-bullhorn\"></span> Alert channels</a></li>\n" +
6257 13781 " <li class=\"list-group-item\" ui-sref-active-eq=\"active\"><a data-ui-sref=\"user.alert_channels.email\"><span class=\"fa fa-envelope\"></span> Add email channel</a></li>\n" +
6258 13782 " </ul>\n" +
6259 13783 "\n" +
6260 13784 " <ul class=\"list-group\" data-ng-if=\"$ctrl.AeConfig.settingsNav.menuNotificationsItems.length\">\n" +
6261 13785 " <li class=\"list-group-item\" ng-repeat=\"item in $ctrl.AeConfig.settingsNav.menuNotificationsItems\">\n" +
6262 13786 " <a data-ui-sref=\"{{ item.sref }}\">{{ item.label }}</a>\n" +
6263 13787 " </li>\n" +
6264 13788 " </ul>\n" +
6265 13789 "\n" +
6266 13790 " </div>\n" +
6267 13791 "\n" +
6268 13792 " </div>\n" +
6269 13793 "\n" +
6270 13794 " <div class=\"col-sm-9\" ui-view></div>\n" +
6271 13795 "</div>\n"
6272 13796 );
6273 13797
6274 13798
6275 13799 $templateCache.put('components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
6276 13800 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.email\"></ng-include>\n" +
6277 13801 "\n" +
6278 13802 "<div ng-show=\"!$ctrl.loading.email\">\n" +
6279 13803 "\n" +
6280 13804 " <div class=\"panel panel-default\">\n" +
6281 13805 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6282 13806 " <div class=\"panel-body\">\n" +
6283 13807 " <p>Adding email alert channel - after you authorize your email in the system we can send alerts directly to this mailbox.</p>\n" +
6284 13808 " <form class=\"form-horizontal\" name=\"$ctrl.channelForm\" ng-submit=\"$ctrl.createChannel()\">\n" +
6285 13809 " <div class=\"form-group\" id=\"row-email\">\n" +
6286 13810 " <data-form-errors errors=\"$ctrl.channelForm.ae_validation.email\"></data-form-errors>\n" +
6287 13811 " <label id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6288 13812 " Email Address\n" +
6289 13813 " <span class=\"required\">*</span>\n" +
6290 13814 " </label>\n" +
6291 13815 " <div class=\"col-sm-8 col-lg-9\">\n" +
6292 13816 " <input class=\"form-control\" type=\"text\" ng-model=\"$ctrl.form.email\">\n" +
6293 13817 " </div>\n" +
6294 13818 " </div>\n" +
6295 13819 " <div class=\"form-group\">\n" +
6296 13820 " <label for=\"submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6297 13821 " </label>\n" +
6298 13822 " <div class=\"col-sm-8 col-lg-9\">\n" +
6299 13823 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Add email channel\">\n" +
6300 13824 " </div>\n" +
6301 13825 " </div>\n" +
6302 13826 " </form>\n" +
6303 13827 " </div>\n" +
6304 13828 " </div>\n" +
6305 13829 "</div>\n"
6306 13830 );
6307 13831
6308 13832
6309 13833 $templateCache.put('components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
6310 13834 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.channels || $ctrl.loading.applications\"></ng-include>\n" +
6311 13835 "\n" +
6312 13836 "<div ng-if=\"!$ctrl.loading.channels && !$ctrl.loading.applications && !$ctrl.loading.actions\">\n" +
6313 13837 "\n" +
6314 13838 " <div class=\"panel panel-default\">\n" +
6315 13839 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6316 13840 " <div class=\"panel-body\">\n" +
6317 13841 " <h1>Report alert rules</h1>\n" +
6318 13842 " <p>\n" +
6319 13843 " <a class=\"btn btn-info\" ng-click=\"$ctrl.addAction()\"><span class=\"fa fa-plus-circle\"></span> Add top-level rule</a>\n" +
6320 13844 " </p>\n" +
6321 13845 "\n" +
6322 13846 " <report-alert-action action=\"action\" rule-definitions=\"$ctrl.ruleDefinitions\"\n" +
6323 13847 " possible-channels=\"$ctrl.alertChannels\"\n" +
6324 13848 " actions=\"$ctrl.alertActions\" applications=\"$ctrl.applications\"\n" +
6325 13849 " ng-repeat=\"action in $ctrl.alertActions | filter: {type:'report'}\"></report-alert-action>\n" +
6326 13850 "\n" +
6327 13851 " </div>\n" +
6328 13852 " </div>\n" +
6329 13853 "\n" +
6330 13854 " <div class=\"panel panel-default\">\n" +
6331 13855 " <div class=\"panel-body\">\n" +
6332 13856 " <h1>Alert channels</h1>\n" +
6333 13857 "\n" +
6334 13858 " <p>Here you can configure your <em>alert channels</em>.</p>\n" +
6335 13859 "\n" +
6336 13860 " <p>An alert channel serves as means of delivery of notifications about important events that happen in your applications.</p>\n" +
6337 13861 "\n" +
6338 13862 " <div class=\"alert alert-success\">You can add more integrations that support different alert channels via application management panel.</div>\n" +
6339 13863 "\n" +
6340 13864 " <table class=\"table table-striped\">\n" +
6341 13865 " <tr ng-repeat=\"channel in $ctrl.alertChannels\" class=\"animate-repeat\">\n" +
6342 13866 " <td><strong>{{ channel.channel_visible_value }}</strong></td>\n" +
6343 13867 " <td class=\"text-right\">\n" +
6344 13868 " <span class=\"btn btn-default\" data-uib-tooltip=\"Channel is {{ channel.channel_validated? '' :'NOT' }} validated\" tooltip-append-to-body=\"true\"\n" +
6345 13869 " ng-class=\"{dim:!channel.channel_validated}\">\n" +
6346 13870 " <span class=\"fa\" ng-class=\"{'fa-check-circle':channel.channel_validated, 'fa-times-circle':!channel.channel_validated}\"></span>\n" +
6347 13871 " </span>\n" +
6348 13872 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.send_alerts ? 'OFF' : 'ON' }} alerting on this chanel\"\n" +
6349 13873 " ng-click=\"$ctrl.updateChannel(channel,'send_alerts')\" ng-class=\"{dim:!channel.send_alerts}\" tooltip-append-to-body=\"true\">\n" +
6350 13874 " <span class=\"fa fa-rss\"></span> Alerts\n" +
6351 13875 " </a>\n" +
6352 13876 " <a class=\"btn btn-default\" data-uib-tooltip=\"Press to turn {{ channel.daily_digest ? 'OFF' : 'ON' }} daily digests on this channel\"\n" +
6353 13877 " ng-click=\"$ctrl.updateChannel(channel,'daily_digest')\" ng-class=\"{dim:!channel.daily_digest}\" tooltip-append-to-body=\"true\">\n" +
6354 13878 " <span class=\"fa fa-envelope\"></span> Daily digests\n" +
6355 13879 " </a>\n" +
6356 13880 "\n" +
6357 13881 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6358 13882 " <a class=\"btn btn-default\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> Remove</a>\n" +
6359 13883 " <ul class=\"dropdown-menu\">\n" +
6360 13884 " <li><a>No</a></li>\n" +
6361 13885 " <li><a ng-click=\"$ctrl.removeChannel(channel)\">Yes</a></li>\n" +
6362 13886 " </ul>\n" +
6363 13887 " </span>\n" +
6364 13888 "\n" +
6365 13889 " </td>\n" +
6366 13890 " </tr>\n" +
6367 13891 " </table>\n" +
6368 13892 "\n" +
6369 13893 " </div>\n" +
6370 13894 " </div>\n" +
6371 13895 "\n" +
6372 13896 "</div>\n"
6373 13897 );
6374 13898
6375 13899
6376 13900 $templateCache.put('components/views/user-auth-tokens-view/user-auth-tokens-view.html',
6377 13901 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.tokens\"></ng-include>\n" +
6378 13902 "\n" +
6379 13903 "<div ng-show=\"!$ctrl.loading.tokens\">\n" +
6380 13904 "\n" +
6381 13905 " <div class=\"panel panel-default\">\n" +
6382 13906 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6383 13907 "\n" +
6384 13908 " <div class=\"panel-body\">\n" +
6385 13909 "\n" +
6386 13910 " <div class=\"alert alert-success\">You can use those tokens to authenticate yourself when performing various API calls</div>\n" +
6387 13911 "\n" +
6388 13912 " <hr/>\n" +
6389 13913 "\n" +
6390 13914 " <form method=\"post\" class=\"form-inline\" name=\"$ctrl.TokenForm\" ng-submit=\"$ctrl.addToken()\" novalidate>\n" +
6391 13915 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.description\"></data-form-errors>\n" +
6392 13916 " <data-form-errors errors=\"$ctrl.TokenForm.ae_validation.expires\"></data-form-errors>\n" +
6393 13917 " <div class=\"form-group\">\n" +
6394 13918 " <label>\n" +
6395 13919 " Description\n" +
6396 13920 " </label>\n" +
6397 13921 " <input class=\"form-control\" name=\"description\" placeholder=\"Token description\" type=\"text\" ng-model=\"$ctrl.form.description\">\n" +
6398 13922 " </div>\n" +
6399 13923 " <div class=\"form-group\">\n" +
6400 13924 " <label>\n" +
6401 13925 " Expires\n" +
6402 13926 " </label>\n" +
6403 13927 " <select class=\"form-control\" ng-model=\"$ctrl.form.expires\" ng-options=\"i.key as i.label for i in $ctrl.expireOptions | objectToOrderedArray:'minutes'\">\n" +
6404 13928 " <option value=\"\">Never</option>\n" +
6405 13929 " </select>\n" +
6406 13930 " </div>\n" +
6407 13931 " <div class=\"form-group\">\n" +
6408 13932 " <label class=\"control-label col-sm-4 col-lg-3\">\n" +
6409 13933 " </label>\n" +
6410 13934 " <input class=\"form-control btn btn-primary\" name=\"submit\" type=\"submit\" value=\"Create Token\">\n" +
6411 13935 " </div>\n" +
6412 13936 " </form>\n" +
6413 13937 "\n" +
6414 13938 " </div>\n" +
6415 13939 "\n" +
6416 13940 "\n" +
6417 13941 " </div>\n" +
6418 13942 "\n" +
6419 13943 " <div class=\"panel panel-default\">\n" +
6420 13944 " <table st-table=\"displayedCollection\" st-safe-src=\"$ctrl.tokens\" class=\"table table-striped\">\n" +
6421 13945 " <caption>Your current tokens</caption>\n" +
6422 13946 " <thead>\n" +
6423 13947 " <tr>\n" +
6424 13948 " <th st-sort=\"description\"><a>Description</a></th>\n" +
6425 13949 " <th class=\"created\"><a>Created</a></th>\n" +
6426 13950 " <th class=\"expires\"><a>Expires</a></th>\n" +
6427 13951 " <th class=\"options\"></th>\n" +
6428 13952 " </tr>\n" +
6429 13953 " <tr>\n" +
6430 13954 " <th><input st-search=\"description\" placeholder=\"search for description\" class=\"form-control\" type=\"search\" st-delay=\"1\"/></th>\n" +
6431 13955 " <th></th>\n" +
6432 13956 " <th></th>\n" +
6433 13957 " <th></th>\n" +
6434 13958 " </tr>\n" +
6435 13959 " </thead>\n" +
6436 13960 " <tbody>\n" +
6437 13961 "\n" +
6438 13962 " <tr ng-repeat=\"token in displayedCollection\">\n" +
6439 13963 " <td><p>{{token.description}}</p>\n" +
6440 13964 " <pre ng-init=\"token.limit = 8\" ng-mouseover=\"token.limit = 99\" ng-mouseleave=\"token.limit = 8\">{{token.token| limitTo:token.limit}}...</pre>\n" +
6441 13965 " </td>\n" +
6442 13966 " <td><span data-uib-tooltip=\"{{token.creation_date}}\">{{token.creation_date | isoToRelativeTime}}</span></td>\n" +
6443 13967 " <td><span ng-if=\"token.expires\" data-uib-tooltip=\"{{token.expires}}\">{{token.expires | isoToRelativeTime}}</span>\n" +
6444 13968 " <span ng-if=\"!token.expires\">Never</span></td>\n" +
6445 13969 " <td>\n" +
6446 13970 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6447 13971 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6448 13972 " <ul class=\"dropdown-menu\">\n" +
6449 13973 " <li><a>No</a></li>\n" +
6450 13974 " <li><a ng-click=\"$ctrl.removeToken(token)\">Yes</a></li>\n" +
6451 13975 " </ul>\n" +
6452 13976 " </span>\n" +
6453 13977 " </td>\n" +
6454 13978 " </tr>\n" +
6455 13979 " </tbody>\n" +
6456 13980 " </table>\n" +
6457 13981 " </div>\n" +
6458 13982 "\n" +
6459 13983 "</div>\n"
6460 13984 );
6461 13985
6462 13986
6463 13987 $templateCache.put('components/views/user-identities-view/user-identities-view.html',
6464 13988 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.identities\"></ng-include>\n" +
6465 13989 "\n" +
6466 13990 "<div ng-show=\"!$ctrl.loading.identities\">\n" +
6467 13991 "\n" +
6468 13992 " <div class=\"panel panel-default\">\n" +
6469 13993 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6470 13994 " <div class=\"panel-body\">\n" +
6471 13995 "\n" +
6472 13996 " <div class=\"col-sm-6\">\n" +
6473 13997 " <p ng-show=\"$ctrl.identities.length === 0\">No external providers linked yet</p>\n" +
6474 13998 " <ul class=\"list-group\">\n" +
6475 13999 " <li ng-repeat=\"provider in $ctrl.identities\" class=\"animate-repeat list-group-item\">\n" +
6476 14000 " <div class=\"pull-right\">\n" +
6477 14001 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\">\n" +
6478 14002 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6479 14003 " <ul class=\"dropdown-menu\">\n" +
6480 14004 " <li><a>No</a></li>\n" +
6481 14005 " <li><a ng-click=\"$ctrl.removeProvider(provider)\">Yes</a></li>\n" +
6482 14006 " </ul>\n" +
6483 14007 " </span>\n" +
6484 14008 " </div>\n" +
6485 14009 " <em>@{{ provider.provider }}</em>: <strong>{{ provider.id }}</strong>\n" +
6486 14010 " </li>\n" +
6487 14011 " </ul>\n" +
6488 14012 " </div>\n" +
6489 14013 " <div class=\"col-sm-6\">\n" +
6490 14014 " <ul class=\"list-group\">\n" +
6491 14015 " <li class=\"list-group-item\">\n" +
6492 14016 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.google}}\" target=\"_self\">\n" +
6493 14017 " <span class=\"fa fa-google-plus-square fa-2x\"></span> Connect with Google</a>\n" +
6494 14018 " </li>\n" +
6495 14019 " <li class=\"list-group-item\">\n" +
6496 14020 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.twitter}}\" target=\"_self\">\n" +
6497 14021 " <span class=\"fa fa-twitter fa-2x\"></span> Connect with Twitter</a>\n" +
6498 14022 " </li>\n" +
6499 14023 " <li class=\"list-group-item\">\n" +
6500 14024 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.bitbucket}}\" target=\"_self\">\n" +
6501 14025 " <span class=\"fa fa-bitbucket fa-2x\"></span> Connect with Bitbucket</a>\n" +
6502 14026 " </li>\n" +
6503 14027 " <li class=\"list-group-item\">\n" +
6504 14028 " <a href=\"{{$ctrl.AeConfig.urls.social_auth.github}}\" target=\"_self\">\n" +
6505 14029 " <span class=\"fa fa-github fa-2x\"></span> Connect with Github including private repo access</a>\n" +
6506 14030 " </li>\n" +
6507 14031 " </ul>\n" +
6508 14032 " </div>\n" +
6509 14033 " </div>\n" +
6510 14034 " </div>\n" +
6511 14035 "</div>\n"
6512 14036 );
6513 14037
6514 14038
6515 14039 $templateCache.put('components/views/user-password-view/user-password-view.html',
6516 14040 "<ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.password\"></ng-include>\n" +
6517 14041 "\n" +
6518 14042 "<div ng-show=\"!$ctrl.loading.password\">\n" +
6519 14043 "\n" +
6520 14044 " <div class=\"panel panel-default\">\n" +
6521 14045 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6522 14046 " <div class=\"panel-body\">\n" +
6523 14047 "\n" +
6524 14048 " <form class=\"form-horizontal\" name=\"$ctrl.passwordForm\" ng-submit=\"$ctrl.updatePassword()\">\n" +
6525 14049 " <div class=\"form-group\" id=\"row-old_password\">\n" +
6526 14050 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.old_password\"></data-form-errors>\n" +
6527 14051 " <label for=\"old_password\" id=\"label-old_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6528 14052 " Old Password\n" +
6529 14053 " <span class=\"required\">*</span>\n" +
6530 14054 " </label>\n" +
6531 14055 " <div class=\"col-sm-8 col-lg-9\">\n" +
6532 14056 " <input class=\"form-control\" id=\"old_password\" name=\"old_password\" type=\"password\" ng-model=\"$ctrl.form.old_password\">\n" +
6533 14057 " </div>\n" +
6534 14058 " </div>\n" +
6535 14059 " <div class=\"form-group\" id=\"row-new_password\">\n" +
6536 14060 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password\"></data-form-errors>\n" +
6537 14061 " <label for=\"new_password\" id=\"label-new_password\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6538 14062 " New Password\n" +
6539 14063 " <span class=\"required\">*</span>\n" +
6540 14064 " </label>\n" +
6541 14065 " <div class=\"col-sm-8 col-lg-9\">\n" +
6542 14066 " <input class=\"form-control\" id=\"new_password\" name=\"new_password\" type=\"password\" ng-model=\"$ctrl.form.new_password\">\n" +
6543 14067 " </div>\n" +
6544 14068 " </div>\n" +
6545 14069 " <div class=\"form-group\" id=\"row-new_password_confirm\">\n" +
6546 14070 " <data-form-errors errors=\"$ctrl.passwordForm.ae_validation.new_password_confirm\"></data-form-errors>\n" +
6547 14071 " <label for=\"new_password_confirm\" id=\"label-new_password_confirm\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6548 14072 " Confirm Password\n" +
6549 14073 " <span class=\"required\">*</span>\n" +
6550 14074 " </label>\n" +
6551 14075 " <div class=\"col-sm-8 col-lg-9\">\n" +
6552 14076 " <input class=\"form-control\" id=\"new_password_confirm\" name=\"new_password_confirm\" type=\"password\" ng-model=\"$ctrl.form.new_password_confirm\">\n" +
6553 14077 " </div>\n" +
6554 14078 " </div>\n" +
6555 14079 " <div class=\"form-group\" id=\"row-submit\">\n" +
6556 14080 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\"></label>\n" +
6557 14081 " <div class=\"col-sm-8 col-lg-9\">\n" +
6558 14082 " <input class=\"form-control SubmitField btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Change Password\">\n" +
6559 14083 " </div>\n" +
6560 14084 " </div>\n" +
6561 14085 " </form>\n" +
6562 14086 "\n" +
6563 14087 " </div>\n" +
6564 14088 " </div>\n" +
6565 14089 "</div>\n"
6566 14090 );
6567 14091
6568 14092
6569 14093 $templateCache.put('components/views/user-profile-view/user-profile-view.html',
6570 14094 "<ui-view></ui-view><ng-include src=\"'templates/loader.html'\" ng-if=\"$ctrl.loading.profile\"></ng-include>\n" +
6571 14095 "\n" +
6572 14096 "<div ng-show=\"!$ctrl.loading.profile\">\n" +
6573 14097 " <div class=\"panel panel-default\">\n" +
6574 14098 " <div class=\"panel-heading\" ng-include=\"'templates/settings_breadcrumbs.html'\"></div>\n" +
6575 14099 " <div class=\"panel-body\">\n" +
6576 14100 " <form name=\"$ctrl.profileForm\" class=\"form-horizontal\" ng-submit=\"$ctrl.updateProfile()\">\n" +
6577 14101 " <div class=\"form-group\" id=\"row-email\">\n" +
6578 14102 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.email\"></data-form-errors>\n" +
6579 14103 " <label for=\"email\" id=\"label-email\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6580 14104 " Email Address\n" +
6581 14105 " <span class=\"required\">*</span>\n" +
6582 14106 " </label>\n" +
6583 14107 " <div class=\"col-sm-8 col-lg-9\">\n" +
6584 14108 " <input class=\"form-control\" id=\"email\" name=\"email\" type=\"text\" ng-model=\"$ctrl.user.email\">\n" +
6585 14109 " </div>\n" +
6586 14110 " </div>\n" +
6587 14111 "\n" +
6588 14112 " <div class=\"form-group\" id=\"row-first_name\">\n" +
6589 14113 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.first_name\"></data-form-errors>\n" +
6590 14114 " <label for=\"first_name\" id=\"label-first_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6591 14115 " First Name\n" +
6592 14116 " </label>\n" +
6593 14117 " <div class=\"col-sm-8 col-lg-9\">\n" +
6594 14118 " <input class=\"form-control\" id=\"first_name\" name=\"first_name\" type=\"text\" ng-model=\"$ctrl.user.first_name\">\n" +
6595 14119 " </div>\n" +
6596 14120 " </div>\n" +
6597 14121 " <div class=\"form-group\" id=\"row-last_name\">\n" +
6598 14122 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.last_name\"></data-form-errors>\n" +
6599 14123 " <label for=\"last_name\" id=\"label-last_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6600 14124 " Last Name\n" +
6601 14125 " </label>\n" +
6602 14126 " <div class=\"col-sm-8 col-lg-9\">\n" +
6603 14127 " <input class=\"form-control\" id=\"last_name\" name=\"last_name\" type=\"text\" ng-model=\"$ctrl.user.last_name\">\n" +
6604 14128 " </div>\n" +
6605 14129 " </div>\n" +
6606 14130 " <div class=\"form-group\" id=\"row-company_name\">\n" +
6607 14131 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_name\"></data-form-errors>\n" +
6608 14132 " <label for=\"company_name\" id=\"label-company_name\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6609 14133 " Company Name\n" +
6610 14134 " </label>\n" +
6611 14135 " <div class=\"col-sm-8 col-lg-9\">\n" +
6612 14136 " <input class=\"form-control\" id=\"company_name\" name=\"company_name\" type=\"text\" ng-model=\"$ctrl.user.company_name\">\n" +
6613 14137 " </div>\n" +
6614 14138 " </div>\n" +
6615 14139 " <div class=\"form-group\" id=\"row-company_address\">\n" +
6616 14140 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.company_address\"></data-form-errors>\n" +
6617 14141 " <label for=\"company_address\" id=\"label-company_address\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6618 14142 " Company Address\n" +
6619 14143 " </label>\n" +
6620 14144 " <div class=\"col-sm-8 col-lg-9\">\n" +
6621 14145 " <textarea class=\"form-control\" id=\"company_address\" name=\"company_address\" ng-model=\"$ctrl.user.company_address\"></textarea>\n" +
6622 14146 " </div>\n" +
6623 14147 " </div>\n" +
6624 14148 " <div class=\"form-group\" id=\"row-zip_code\">\n" +
6625 14149 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.zip_code\"></data-form-errors>\n" +
6626 14150 " <label for=\"zip_code\" id=\"label-zip_code\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6627 14151 " ZIP code\n" +
6628 14152 " </label>\n" +
6629 14153 " <div class=\"col-sm-8 col-lg-9\">\n" +
6630 14154 " <input class=\"form-control\" id=\"zip_code\" name=\"zip_code\" type=\"text\" ng-model=\"$ctrl.user.zip_code\">\n" +
6631 14155 " </div>\n" +
6632 14156 " </div>\n" +
6633 14157 " <div class=\"form-group\" id=\"row-city\">\n" +
6634 14158 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.city\"></data-form-errors>\n" +
6635 14159 " <label for=\"city\" id=\"label-city\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6636 14160 " City\n" +
6637 14161 " </label>\n" +
6638 14162 " <div class=\"col-sm-8 col-lg-9\">\n" +
6639 14163 " <input class=\"form-control\" id=\"city\" name=\"city\" type=\"text\" ng-model=\"$ctrl.user.city\">\n" +
6640 14164 " </div>\n" +
6641 14165 " </div>\n" +
6642 14166 " <div class=\"form-group\" id=\"row-notifications\">\n" +
6643 14167 " <data-form-errors errors=\"$ctrl.profileForm.ae_validation.notifications\"></data-form-errors>\n" +
6644 14168 " <label for=\"notifications\" id=\"label-notifications\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6645 14169 " Account notifications\n" +
6646 14170 " </label>\n" +
6647 14171 " <div class=\"col-sm-8 col-lg-9\">\n" +
6648 14172 " <input checked class=\"form-control\" id=\"notifications\" name=\"notifications\" type=\"checkbox\" ng-model=\"$ctrl.user.notifications\">\n" +
6649 14173 " </div>\n" +
6650 14174 " </div>\n" +
6651 14175 " <div class=\"form-group\" id=\"row-submit\">\n" +
6652 14176 " <label for=\"submit\" id=\"label-submit\" class=\"control-label col-sm-4 col-lg-3\">\n" +
6653 14177 " </label>\n" +
6654 14178 " <div class=\"col-sm-8 col-lg-9\">\n" +
6655 14179 " <input class=\"form-control btn btn-primary\" id=\"submit\" name=\"submit\" type=\"submit\" value=\"Update Account\">\n" +
6656 14180 " </div>\n" +
6657 14181 " </div>\n" +
6658 14182 " </form>\n" +
6659 14183 " </div>\n" +
6660 14184 " </div>\n" +
6661 14185 "</div>\n"
6662 14186 );
6663 14187
6664 14188
6665 14189 $templateCache.put('directives/permissions/permissions.html',
6666 14190 "<div class=\"panel panel-default\">\n" +
6667 14191 " <div class=\"panel-heading\">\n" +
6668 14192 " <h3 class=\"panel-title\">Permissions</h3>\n" +
6669 14193 " </div>\n" +
6670 14194 " <div class=\"panel-body\">\n" +
6671 14195 " <p>Here you can <strong>set permissions</strong> for others to access your app data.</p>\n" +
6672 14196 "\n" +
6673 14197 " <p>For example you can let other staff member view or alter error reports.</p>\n" +
6674 14198 "\n" +
6675 14199 " <div ng-if=\"permissions.possibleGroups.length > 0\">\n" +
6676 14200 " <h3>Group permissions</h3>\n" +
6677 14201 "\n" +
6678 14202 " <ul class=\"list-group\">\n" +
6679 14203 " <li ng-repeat=\"perm in permissions.currentPermissions.group\" class=\"animate-repeat list-group-item\">\n" +
6680 14204 " <strong>{{ perm.self.group_name }}</strong>\n" +
6681 14205 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
6682 14206 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
6683 14207 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
6684 14208 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
6685 14209 " <ul class=\"dropdown-menu\">\n" +
6686 14210 " <li><a>No</a></li>\n" +
6687 14211 " <li><a ng-click=\"permissions.removeGroupPermission(perm_name, perm)\">Yes</a></li>\n" +
6688 14212 " </ul>\n" +
6689 14213 " </span>\n" +
6690 14214 " </div>\n" +
6691 14215 " </li>\n" +
6692 14216 " </ul>\n" +
6693 14217 "\n" +
6694 14218 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setGroupPermission()\">\n" +
6695 14219 " <div class=\"form-group\">\n" +
6696 14220 " <select class=\"form-control\" ng-model=\"permissions.form.selectedGroup\" ng-options=\"g.id as g.group_name for g in permissions.possibleGroups\"></select>\n" +
6697 14221 " </div>\n" +
6698 14222 " <div class=\"form-group\">\n" +
6699 14223 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
6700 14224 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedGroupPermissions[permission]\"> {{ permission }}\n" +
6701 14225 " </span>\n" +
6702 14226 " </div>\n" +
6703 14227 " <div class=\"form-group\">\n" +
6704 14228 " <button class=\"btn btn-info\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
6705 14229 " </div>\n" +
6706 14230 " </form>\n" +
6707 14231 "\n" +
6708 14232 " </div>\n" +
6709 14233 "\n" +
6710 14234 " <h3>User permissions</h3>\n" +
6711 14235 " <div>\n" +
6712 14236 " <ul class=\"list-group\">\n" +
6713 14237 " <li ng-repeat=\"perm in permissions.currentPermissions.user\" class=\"animate-repeat list-group-item\">\n" +
6714 14238 " <strong>{{ perm.self.user_name }}</strong>\n" +
6715 14239 " <div ng-repeat=\"perm_name in perm.permissions\" class=\"pull-right animate-repeat m-l-1\">\n" +
6716 14240 " <span ng-if=\"perm_name == '__all_permissions__'\">Resource owner</span>\n" +
6717 14241 " <span class=\"dropdown\" data-uib-dropdown on-toggle=\"toggled(open)\" ng-if=\"perm_name != '__all_permissions__'\">\n" +
6718 14242 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span> {{ perm_name }}</a>\n" +
6719 14243 " <ul class=\"dropdown-menu\">\n" +
6720 14244 " <li><a>No</a></li>\n" +
6721 14245 " <li><a ng-click=\"permissions.removeUserPermission(perm_name,perm)\">Yes</a></li>\n" +
6722 14246 " </ul>\n" +
6723 14247 " </span>\n" +
6724 14248 " </div>\n" +
6725 14249 " </li>\n" +
6726 14250 " </ul>\n" +
6727 14251 " </div>\n" +
6728 14252 " <div>\n" +
6729 14253 " <p>First enter username or full email of person you want to give access to (the person needs to be <strong>already registered in AppEnlight</strong>)</p>\n" +
6730 14254 "\n" +
6731 14255 " <form name=\"add_permission\" class=\"form-inline\" ng-submit=\"permissions.setUserPermission()\">\n" +
6732 14256 " <div class=\"form-group\">\n" +
6733 14257 " <input type=\"text\" class=\"autocomplete form-control\" placeholder=\"Search for user/email\" ng-model=\"permissions.form.autocompleteUser\"\n" +
6734 14258 " uib-typeahead=\"u.user for u in permissions.searchUsers($viewValue) | limitTo:8\" typeahead-loading=\"permissions.searchingUsers\" typeahead-wait-ms=\"250\"\n" +
6735 14259 " typeahead-template-url=\"templates/directives/user_search_type_ahead.html\"\n" +
6736 14260 " />\n" +
6737 14261 " </div>\n" +
6738 14262 " <div class=\"form-group\">\n" +
6739 14263 " <span ng-repeat=\"permission in permissions.possiblePermissions\">\n" +
6740 14264 " <input type=\"checkbox\" ng-model=\"permissions.form.selectedUserPermissions[permission]\"> {{ permission }}\n" +
6741 14265 " </span>\n" +
6742 14266 " </div>\n" +
6743 14267 " <div class=\"form-group\">\n" +
6744 14268 " <button class=\"btn btn-info\" ng-disabled=\"!permissions.form.autocompleteUser\"><span class=\"fa fa-user\"></span> Give permission</button>\n" +
6745 14269 " </div>\n" +
6746 14270 " </form>\n" +
6747 14271 " </div>\n" +
6748 14272 " </div>\n" +
6749 14273 "</div>\n"
6750 14274 );
6751 14275
6752 14276
6753 14277 $templateCache.put('directives/plugin_config/plugin_config.html',
6754 14278 "<div ng-repeat=\"tmpl in plugin_ctrlr.inclusions track by $index\">\n" +
6755 14279 " <div><strong>Plugin: {{tmpl.name}}</strong></div>\n" +
6756 14280 " <ng-include src=\"tmpl.template\"></ng-include>\n" +
6757 14281 " <hr/>\n" +
6758 14282 "</div>\n"
6759 14283 );
6760 14284
6761 14285
6762 14286 $templateCache.put('directives/postprocess_action/postprocess_action.html',
6763 14287 "<div class=\"panel panel-default action\">\n" +
6764 14288 " <div class=\"panel-body form-inline\">\n" +
6765 14289 " <div class=\"pull-right\">\n" +
6766 14290 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6767 14291 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6768 14292 " <ul class=\"dropdown-menu\">\n" +
6769 14293 " <li><a>No</a></li>\n" +
6770 14294 " <li><a ng-click=\"ctrl.deleteAction(ctrl.action)\">Yes</a></li>\n" +
6771 14295 " </ul>\n" +
6772 14296 " </span>\n" +
6773 14297 " </div>\n" +
6774 14298 "\n" +
6775 14299 " <div class=\"form-group\">\n" +
6776 14300 " <label>Action</label>\n" +
6777 14301 "\n" +
6778 14302 " <div class=\"form-group\">\n" +
6779 14303 " <select class=\"form-control\" ng-model=\"ctrl.action.new_value\" ng-options=\"f[0] as f[1] for f in ctrl.possibleActions\" ng-change=\"ctrl.setDirty()\"></select>\n" +
6780 14304 " </div>\n" +
6781 14305 "\n" +
6782 14306 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
6783 14307 "\n" +
6784 14308 " </div>\n" +
6785 14309 " <hr/>\n" +
6786 14310 " <p>Meeting following criteria:</p>\n" +
6787 14311 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
6788 14312 " {{ctrl.rule}}\n" +
6789 14313 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
6790 14314 " </div>\n" +
6791 14315 "</div>\n"
6792 14316 );
6793 14317
6794 14318
6795 14319 $templateCache.put('directives/report_alert_action/report_alert_action.html',
6796 14320 "<div class=\"panel panel-default action\">\n" +
6797 14321 " <div class=\"panel-body form-inline\">\n" +
6798 14322 " <div class=\"pull-right\">\n" +
6799 14323 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6800 14324 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6801 14325 " <ul class=\"dropdown-menu\">\n" +
6802 14326 " <li><a>No</a></li>\n" +
6803 14327 " <li><a ng-click=\"ctrl.deleteAction(ctrl.actions, ctrl.action)\">Yes</a></li>\n" +
6804 14328 " </ul>\n" +
6805 14329 " </span>\n" +
6806 14330 " </div>\n" +
6807 14331 "\n" +
6808 14332 " <div class=\"form-group\">\n" +
6809 14333 " <label>Applies to</label>\n" +
6810 14334 " <select class=\"form-control\" ng-model=\"ctrl.action.resource_id\" ng-options=\"f.resource_id as f.resource_name for f in ctrl.applications\" ng-change=\"ctrl.setDirty()\">\n" +
6811 14335 " <option value=\"\">All Resources</option>\n" +
6812 14336 " </select>\n" +
6813 14337 " </div>\n" +
6814 14338 " <div class=\"form-group\">\n" +
6815 14339 " <label>Notify</label>\n" +
6816 14340 " <select class=\"form-control\" ng-model=\"ctrl.action.action\" ng-change=\"ctrl.setDirty()\" ng-options=\"f[0] as f[1] for f in ctrl.possibleNotifications\"></select>\n" +
6817 14341 "\n" +
6818 14342 " <a class=\"btn btn-success\" ng-if=\"ctrl.action.dirty\" ng-click=\"ctrl.saveAction()\"><span class=\"fa fa-save\"></span> &nbsp;Save changes</a>\n" +
6819 14343 "\n" +
6820 14344 " </div>\n" +
6821 14345 " <div>\n" +
6822 14346 " <p><strong>Channels:</strong></p>\n" +
6823 14347 " <ul class=\"list-group\">\n" +
6824 14348 " <li class=\"list-group-item\" ng-repeat=\"channel in ctrl.action.channels\">\n" +
6825 14349 " <strong>{{channel.channel_visible_value}}</strong>\n" +
6826 14350 " <div class=\"pull-right\">\n" +
6827 14351 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6828 14352 " <a class=\"btn btn-danger btn-xs\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6829 14353 " <ul class=\"dropdown-menu\">\n" +
6830 14354 " <li><a>No</a></li>\n" +
6831 14355 " <li><a ng-click=\"ctrl.unBindChannel(channel)\">Yes</a></li>\n" +
6832 14356 " </ul>\n" +
6833 14357 " </span>\n" +
6834 14358 " </div>\n" +
6835 14359 " </li>\n" +
6836 14360 " </ul>\n" +
6837 14361 " <div class=\"form-group\" ng-if=\"ctrl.possibleChannels.length\">\n" +
6838 14362 " <select class=\"form-control\" ng-model=\"ctrl.channelToBind\" ng-options=\"c as c.channel_visible_value for c in ctrl.possibleChannels |filter: c.supports_report_alerting\"></select>\n" +
6839 14363 " <a class=\"btn btn-info\" ng-click=\"ctrl.bindChannel(channel, ctrl.action)\"><span class=\"fa fa-plus-circle\"></span> Add Channel</a>\n" +
6840 14364 " </div>\n" +
6841 14365 " <div class=\"alert alert-danger\" ng-if=\"!ctrl.possibleChannels.length\">\n" +
6842 14366 " <span class=\"fa fa-exclamation-triangle \"></span>You need to create an alert channel before you can assign it to your rule.\n" +
6843 14367 " </div>\n" +
6844 14368 "\n" +
6845 14369 " </div>\n" +
6846 14370 " <hr/>\n" +
6847 14371 " <p>Meeting following criteria:</p>\n" +
6848 14372 " <form-errors errors=\"ctrl.errors\"></form-errors>\n" +
6849 14373 " <rule rule=\"ctrl.action.rule\" rule-definitions=\"ctrl.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"ctrl.action\"></rule>\n" +
6850 14374 " </div>\n" +
6851 14375 "</div>\n"
6852 14376 );
6853 14377
6854 14378
6855 14379 $templateCache.put('directives/rule_read_only/rule_read_only.html',
6856 14380 "<div class=\"rule-read-only\">\n" +
6857 14381 "\n" +
6858 14382 " <span class=\"form-group\">\n" +
6859 14383 " {{rule_ctrlr.readOnlyPossibleFields[rule_ctrlr.rule.field]}}\n" +
6860 14384 " </span>\n" +
6861 14385 "\n" +
6862 14386 " <span ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\">\n" +
6863 14387 " is {{rule_ctrlr.ruleDefinitions.allOps[rule_ctrlr.rule.op]}} {{rule_ctrlr.rule.value}}\n" +
6864 14388 " </span>\n" +
6865 14389 "\n" +
6866 14390 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
6867 14391 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
6868 14392 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
6869 14393 "\n" +
6870 14394 " <div class=\"panel panel-default\">\n" +
6871 14395 " <div class=\"panel-body form-inline\">\n" +
6872 14396 " <recursive>\n" +
6873 14397 " <rule-read-only rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"null\" parent-obj=\"rule_ctrlr.parentObj\"></rule-read-only>\n" +
6874 14398 " </recursive>\n" +
6875 14399 " </div>\n" +
6876 14400 " </div>\n" +
6877 14401 " </div>\n" +
6878 14402 "\n" +
6879 14403 " </span>\n" +
6880 14404 "</div>\n"
6881 14405 );
6882 14406
6883 14407
6884 14408 $templateCache.put('directives/rule/rule.html',
6885 14409 "<div class=\"rule form-inline\">\n" +
6886 14410 "\n" +
6887 14411 " <div class=\"form-group\">\n" +
6888 14412 " <select class=\"form-control\"\n" +
6889 14413 " ng-model=\"rule_ctrlr.rule.field\"\n" +
6890 14414 " ng-change=\"rule_ctrlr.fieldChange()\"\n" +
6891 14415 " ng-options=\"key as label for (key, label) in rule_ctrlr.ruleDefinitions.possibleFields\"></select>\n" +
6892 14416 " </div>\n" +
6893 14417 "\n" +
6894 14418 " <div ng-if=\"rule_ctrlr.rule.field != '__AND__' && rule_ctrlr.rule.field !='__OR__' && rule_ctrlr.rule.field !='__NOT__'\" class=\"form-group\">\n" +
6895 14419 "\n" +
6896 14420 " <select ng-model=\"rule_ctrlr.rule.op\" class=\"form-control\"\n" +
6897 14421 " ng-change=\"rule_ctrlr.setDirty()\"\n" +
6898 14422 " ng-options=\"op as rule_ctrlr.ruleDefinitions.allOps[op] for op in rule_ctrlr.ruleDefinitions.fieldOps[rule_ctrlr.rule.field]\">\n" +
6899 14423 " </select>\n" +
6900 14424 "\n" +
6901 14425 " <input type=\"text\" placeholder=\"Value\" ng-model=\"rule_ctrlr.rule.value\" ng-change=\"rule_ctrlr.setDirty()\" class=\"form-control\">\n" +
6902 14426 "\n" +
6903 14427 " </div>\n" +
6904 14428 "\n" +
6905 14429 " <span ng-if=\"rule_ctrlr.rule.field == '__AND__' || rule_ctrlr.rule.field =='__OR__' || rule_ctrlr.rule.field =='__NOT__'\">\n" +
6906 14430 " <p ng-if=\"parent\"><strong>Subrules</strong></p>\n" +
6907 14431 " <div ng-repeat=\"subrule in rule_ctrlr.rule.rules\" class=\"m-l-2\">\n" +
6908 14432 " <div class=\"panel panel-default\">\n" +
6909 14433 " <div class=\"panel-body form-inline\">\n" +
6910 14434 " <recursive>\n" +
6911 14435 " <rule rule=\"subrule\" rule-definitions=\"rule_ctrlr.ruleDefinitions\" parent-rule=\"rule_ctrlr.rule\" parent-obj=\"rule_ctrlr.parentObj\"></rule>\n" +
6912 14436 " </recursive>\n" +
6913 14437 " </div>\n" +
6914 14438 " </div>\n" +
6915 14439 " </div>\n" +
6916 14440 "\n" +
6917 14441 " <span ng-if=\"(rule_ctrlr.config.disable_subrules == false) == false\" class=\"btn btn-info\" ng-click=\"rule_ctrlr.add()\"><span class=\"fa fa-plus-circle\"></span> Add rule</span>\n" +
6918 14442 "\n" +
6919 14443 " </span>\n" +
6920 14444 " <div class=\"pull-right\" ng-if=\"rule_ctrlr.parentRule\">\n" +
6921 14445 " <span class=\"dropdown\" data-uib-dropdown>\n" +
6922 14446 " <a class=\"btn btn-danger\" data-uib-dropdown-toggle><span class=\"fa fa-trash-o\"></span></a>\n" +
6923 14447 " <ul class=\"dropdown-menu\">\n" +
6924 14448 " <li><a>No</a></li>\n" +
6925 14449 " <li><a ng-click=\"rule_ctrlr.deleteRule(rule_ctrlr.parentRule, rule_ctrlr.rule)\">Yes</a></li>\n" +
6926 14450 " </ul>\n" +
6927 14451 " </span>\n" +
6928 14452 " </div>\n" +
6929 14453 "</div>\n"
6930 14454 );
6931 14455
6932 14456
6933 14457 $templateCache.put('templates/admin/groups/parent_view.html',
6934 14458 "<div ui-view></div>"
6935 14459 );
6936 14460
6937 14461
6938 14462 $templateCache.put('templates/directives/search_type_ahead.html',
6939 14463 "<a>\n" +
6940 14464 " <span class=\"tag\" ng-show=\"match.model.tag\">{{match.model.tag}}</span>\n" +
6941 14465 " <span class=\"tag\" ng-show=\"!match.model.tag\">{{match.label}}</span>\n" +
6942 14466 " <span ng-show=\"match.model.example\">-</span> <span class=\"example\">{{match.model.example}}</span>\n" +
6943 14467 " <div class=\"description\">{{match.model.description}}</div>\n" +
6944 14468 "\n" +
6945 14469 "</a>\n"
6946 14470 );
6947 14471
6948 14472
6949 14473 $templateCache.put('templates/directives/user_search_type_ahead.html',
6950 14474 "<a>\n" +
6951 14475 " <span>{{match.label}}</span> -\n" +
6952 14476 " <span class=\"color-secondary\">{{match.model.name}}</span>\n" +
6953 14477 "</a>\n"
6954 14478 );
6955 14479
6956 14480
6957 14481 $templateCache.put('templates/integrations/bitbucket.html',
6958 14482 " <div class=\"modal-header\">\n" +
6959 14483 " <h3 class=\"m-t-0\">Add issue to Bitbucket</h3>\n" +
6960 14484 " </div>\n" +
6961 14485 " <div class=\"modal-body\">\n" +
6962 14486 " <div class=\"alert alert-danger\" ng-repeat=\"msg in ctrl.error_messages\">{{msg}}</div>\n" +
6963 14487 " <div class=\"text-center\" ng-show=\"ctrl.loading\">\n" +
6964 14488 " <span class=\"fa fa-cog fa-spin fa-5x loader m-a-4\"></span>\n" +
6965 14489 " </div>\n" +
6966 14490 "\n" +
6967 14491 " <form role=\"form\" ng-show=\"!ctrl.loading\">\n" +
6968 14492 " <div class=\"form-group\">\n" +
6969 14493 " <label for=\"issue_title\">Issue Title</label>\n" +
6970 14494 " <input type=\"text\" class=\"form-control\" id=\"issue_title\" placeholder=\"Issue title\" ng-model=\"ctrl.form.title\">\n" +
6971 14495 " </div>\n" +
6972 14496 " <div class=\"form-group row\">\n" +
6973 14497 " <div class=\"col-sm-6\">\n" +
6974 14498 " <label for=\"issue_priority\">Priority</label>\n" +
6975 14499 " <select class=\"form-control\" id=\"issue_priority\" ng-options=\"s for s in ctrl.priorities\" ng-model=\"ctrl.form.priority\"></select>\n" +
6976 14500 " </div>\n" +
6977 14501 "\n" +
6978 14502 " <div class=\"col-sm-6\">\n" +
6979 14503 " <label for=\"issue_responsible\">Assignee</label>\n" +
6980 14504 " <select class=\"form-control\" id=\"issue_responsible\" ng-options=\"a.user for a in ctrl.assignees\" ng-model=\"ctrl.form.responsible\"></select>\n" +
6981 14505 " </div>\n" +
6982 14506 " </div>\n" +
6983 14507 " <div class=\"form-group\">\n" +
6984 14508 " <label for=\"issue_content\">Description</label>\n" +
6985 14509 " <textarea id=\"issue_content\" class=\"form-control\" ng-model=\"ctrl.form.content\" style=\"min-height: 100px\"></textarea>\n" +
6986 14510 " </div>\n" +
6987 14511 " </form>\n" +
6988 14512 "\n" +
6989 14513 " </div>\n" +
6990 14514 " <div class=\"modal-footer\">\n" +
6991 14515 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">Add issue</button>\n" +
6992 14516 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
6993 14517 " </div>\n"
6994 14518 );
6995 14519
6996 14520
6997 14521 $templateCache.put('templates/integrations/github.html',
6998 14522 " <div class=\"modal-header\">\n" +
6999 14523 " <h3 class=\"m-t-0\">Add issue to Github</h3>\n" +
7000 14524 " </div>\n" +
7001 14525 " <div class=\"modal-body\">\n" +
7002 14526 " <div class=\"alert alert-danger\" ng-repeat=\"msg in ctrl.error_messages\">{{msg}}</div>\n" +
7003 14527 "\n" +
7004 14528 " <div class=\"text-center\" ng-show=\"ctrl.loading\">\n" +
7005 14529 " <span class=\"fa fa-cog fa-spin fa-5x loader m-a-4\"></span>\n" +
7006 14530 " </div>\n" +
7007 14531 "\n" +
7008 14532 " <form role=\"form\" ng-show=\"!ctrl.loading\">\n" +
7009 14533 " <div class=\"form-group\">\n" +
7010 14534 " <label for=\"issue_title\">Issue Title</label>\n" +
7011 14535 " <input type=\"text\" class=\"form-control\" id=\"issue_title\" placeholder=\"Issue title\" ng-model=\"ctrl.form.title\">\n" +
7012 14536 " </div>\n" +
7013 14537 " <div class=\"form-group row\">\n" +
7014 14538 " <div class=\"col-sm-6\">\n" +
7015 14539 " <label for=\"issue_status\">Tag</label>\n" +
7016 14540 " <select class=\"form-control\" id=\"issue_status\" ng-options=\"s for s in ctrl.statuses\" ng-model=\"ctrl.form.status\"></select>\n" +
7017 14541 " </div>\n" +
7018 14542 "\n" +
7019 14543 " <div class=\"col-sm-6\">\n" +
7020 14544 " <label for=\"issue_responsible\">Assignee</label>\n" +
7021 14545 " <select class=\"form-control\" id=\"issue_responsible\" ng-options=\"a.user for a in ctrl.assignees\" ng-model=\"ctrl.form.responsible\"></select>\n" +
7022 14546 " </div>\n" +
7023 14547 " </div>\n" +
7024 14548 " <div class=\"form-group\">\n" +
7025 14549 " <label for=\"issue_description\">Description</label>\n" +
7026 14550 " <textarea id=\"issue_description\" class=\"form-control\" ng-model=\"ctrl.form.content\" style=\"min-height: 100px\"></textarea>\n" +
7027 14551 " </div>\n" +
7028 14552 " </form>\n" +
7029 14553 "\n" +
7030 14554 " </div>\n" +
7031 14555 " <div class=\"modal-footer\">\n" +
7032 14556 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">Add issue</button>\n" +
7033 14557 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
7034 14558 " </div>\n"
7035 14559 );
7036 14560
7037 14561
7038 14562 $templateCache.put('templates/integrations/jira.html',
7039 14563 " <div class=\"modal-header\">\n" +
7040 14564 " <h3 class=\"m-t-0\">Add issue to Jira</h3>\n" +
7041 14565 " </div>\n" +
7042 14566 " <div class=\"modal-body\">\n" +
7043 14567 " <div class=\"alert alert-danger\" ng-repeat=\"msg in ctrl.error_messages\">{{msg}}</div>\n" +
7044 14568 " <div class=\"text-center\" ng-show=\"ctrl.loading\">\n" +
7045 14569 " <span class=\"fa fa-cog fa-spin fa-5x loader m-a-4\"></span>\n" +
7046 14570 " </div>\n" +
7047 14571 "\n" +
7048 14572 " <form role=\"form\" ng-show=\"!ctrl.loading\">\n" +
7049 14573 " <div class=\"form-group\">\n" +
7050 14574 " <label for=\"issue_title\">Issue Title</label>\n" +
7051 14575 " <input type=\"text\" class=\"form-control\" id=\"issue_title\" placeholder=\"Issue title\" ng-model=\"ctrl.form.title\">\n" +
7052 14576 " </div>\n" +
7053 14577 "\n" +
7054 14578 " <div class=\"form-group\">\n" +
7055 14579 " <label for=\"issue_type\">Issue Type</label>\n" +
7056 14580 " <select class=\"form-control\" id=\"issue_type\" ng-options=\"i.name for i in ctrl.issue_types\" ng-model=\"ctrl.form.issue_type\"></select>\n" +
7057 14581 " </div>\n" +
7058 14582 " <div class=\"form-group row\">\n" +
7059 14583 " <div class=\"col-sm-6\">\n" +
7060 14584 " <label for=\"issue_priority\">Priority</label>\n" +
7061 14585 " <select class=\"form-control\" id=\"issue_priority\" ng-options=\"s.name for s in ctrl.priorities\" ng-model=\"ctrl.form.priority\"></select>\n" +
7062 14586 " </div>\n" +
7063 14587 "\n" +
7064 14588 " <div class=\"col-sm-6\">\n" +
7065 14589 " <label for=\"issue_responsible\">Assignee</label>\n" +
7066 14590 " <select class=\"form-control\" id=\"issue_responsible\" ng-options=\"a.name for a in ctrl.assignees\" ng-model=\"ctrl.form.responsible\"></select>\n" +
7067 14591 " </div>\n" +
7068 14592 " </div>\n" +
7069 14593 " <div class=\"form-group\">\n" +
7070 14594 " <label for=\"issue_content\">Description</label>\n" +
7071 14595 " <textarea id=\"issue_content\" class=\"form-control\" ng-model=\"ctrl.form.content\" style=\"min-height: 100px\"></textarea>\n" +
7072 14596 " </div>\n" +
7073 14597 " </form>\n" +
7074 14598 "\n" +
7075 14599 " </div>\n" +
7076 14600 " <div class=\"modal-footer\">\n" +
7077 14601 " <button class=\"btn btn-primary\" ng-click=\"ctrl.ok()\">Add issue</button>\n" +
7078 14602 " <button class=\"btn btn-warning\" ng-click=\"ctrl.cancel()\">Cancel</button>\n" +
7079 14603 " </div>\n"
7080 14604 );
7081 14605
7082 14606
7083 14607 $templateCache.put('templates/loader.html',
7084 14608 "<div class=\"text-center\">\n" +
7085 14609 " <span class=\"fa fa-cog fa-spin fa-5x m-a-4\"></span>\n" +
7086 14610 "</div>\n"
7087 14611 );
7088 14612
7089 14613
7090 14614 $templateCache.put('templates/quickstart.html',
7091 14615 "<h2>AppEnlight quickstart</h2>\n" +
7092 14616 "\n" +
7093 14617 "<p>\n" +
7094 14618 " <span class=\"point\">1</span>\n" +
7095 14619 " For AppEnlight to operate, you need to\n" +
7096 14620 " <a data-ui-sref=\"applications.update({resourceId:'new'})\" target=\"_blank\"><strong>create an app profile</strong></a> that allows\n" +
7097 14621 " you to\n" +
7098 14622 " obtain an <strong>API key</strong> that one of the clients can use.\n" +
7099 14623 "</p>\n" +
7100 14624 "\n" +
7101 14625 "<div class=\"clear\"></div>\n" +
7102 14626 "<hr/>\n" +
7103 14627 "\n" +
7104 14628 "<p>\n" +
7105 14629 " <span class=\"point\">2</span>\n" +
7106 14630 " It is a good idea to configure an\n" +
7107 14631 " <a data-ui-sref=\"user.alert_channels.email\" target=\"_blank\">\n" +
7108 14632 " <strong>email alert channel</strong></a> that you can use to receive\n" +
7109 14633 " notifications about events that happen in your application.\n" +
7110 14634 "</p>\n" +
7111 14635 "\n" +
7112 14636 "<p>\n" +
7113 14637 " It can be the same email account you used to register withing AppEnlight -\n" +
7114 14638 " although we often recommend using a separate <em>errors@...</em> account\n" +
7115 14639 " designated for alert notifications.\n" +
7116 14640 "</p>\n" +
7117 14641 "\n" +
7118 14642 "<div class=\"clear\"></div>\n" +
7119 14643 "<hr/>\n" +
7120 14644 "\n" +
7121 14645 "<p>\n" +
7122 14646 " <span class=\"point\">3</span>\n" +
7123 14647 " In order for your application to stream meaningful information, you will need to\n" +
7124 14648 " integrate a compatible client for your language of choice.\n" +
7125 14649 "</p>\n" +
7126 14650 "\n" +
7127 14651 "<p>Head over to the <a href=\"{{AeConfig.urls.docs}}\" target=\"_blank\">\n" +
7128 14652 " <strong>developers section</strong></a> for information on currently available\n" +
7129 14653 " clients that you can plug into your software</p>\n"
7130 14654 );
7131 14655
7132 14656
7133 14657 $templateCache.put('templates/register.html',
7134 14658 ""
7135 14659 );
7136 14660
7137 14661
7138 14662 $templateCache.put('templates/reports/small_report_group_list.html',
7139 14663 "<table class=\"errors-small-list\">\n" +
7140 14664 " <tr ng-repeat=\"report_group in groups track by report_group.id\" class=\"animate-repeat\">\n" +
7141 14665 " <td class=\"c1 occurences\"><span class=\"occurences\" data-uib-tooltip=\"occurences\">{{ report_group.occurences|numberToThousands }}</span></td>\n" +
7142 14666 " <td class=\"ellipsis c2 report_group\">\n" +
7143 14667 " <a ui-sref=\"report.view_detail({groupId:report_group.id, reportId:report_group.last_report})\" title=\"{{report_group.error}}\" class=\"error-type\">\n" +
7144 14668 " {{ report_group.error || \"Slow Report\"}}</a>\n" +
7145 14669 " <br/>\n" +
7146 14670 " <span ng-show=\"report_group.summed_duration\" class=\"duration\" data-uib-tooltip=\"Average duration\">{{report_group.summed_duration/report_group.occurences|round:2}}s</span>\n" +
7147 14671 " <span class=\"url\">{{ report_group.view_name || report_group.url_path}}</span>\n" +
7148 14672 " </td>\n" +
7149 14673 " <td class=\"info\">\n" +
7150 14674 " <strong ng-show=\"report_group.resource_id\">@{{applications[report_group.resource_id].resource_name}}</strong><br/>\n" +
7151 14675 " <span class=\"date\">{{report_group.last_timestamp | isoToRelativeTime}}</span>\n" +
7152 14676 " </td>\n" +
7153 14677 " </tr>\n" +
7154 14678 "</table>\n"
7155 14679 );
7156 14680
7157 14681
7158 14682 $templateCache.put('templates/reports/small_report_list.html',
7159 14683 "<table class=\"errors-small-list\">\n" +
7160 14684 " <tr ng-repeat=\"report in reports track by $index\" ng-show=\"reports.length > 0\" class=\"animate-repeat\">\n" +
7161 14685 " <td class=\"c1 occurences\"><span class=\"occurences\" data-uib-tooltip=\"occurences\">{{ report.group.occurences|numberToThousands }}</span></td>\n" +
7162 14686 " <td class=\"ellipsis c2 report\">\n" +
7163 14687 " <a ui-sref=\"report.view_detail({groupId:report.group_id, reportId:report.report_id})\" title=\"{{report.error}}\" class=\"error-type\">\n" +
7164 14688 " {{ report.error || \"Slow Report\"}}</a>\n" +
7165 14689 " <br/>\n" +
7166 14690 " <span ng-show=\"report.group.summed_duration\" class=\"duration\" data-uib-tooltip=\"Average duration\">{{report.group.summed_duration/report.group.occurences|round:2}}s</span>\n" +
7167 14691 " <span class=\"url\">{{ report.view_name || report.url_path}}</span>\n" +
7168 14692 " </td>\n" +
7169 14693 " <td class=\"info\">\n" +
7170 14694 " <strong ng-show=\"report.resource_id\">@{{applications[report.resource_id].resource_name}}</strong><br/>\n" +
7171 14695 " <span class=\"date\">{{report.last_timestamp | isoToRelativeTime}}</span>\n" +
7172 14696 " </td>\n" +
7173 14697 " </tr>\n" +
7174 14698 "</table>\n"
7175 14699 );
7176 14700
7177 14701
7178 14702 $templateCache.put('templates/settings_breadcrumbs.html',
7179 14703 "<ol class=\"breadcrumb\" ng-show=\"$ctrl.$state.includes('applications')\">\n" +
7180 14704 " <li>Applications</li>\n" +
7181 14705 " <li ng-show=\"$ctrl.$state.includes('applications.list')\" ng-class=\"{bold:$ctrl.$state.is('applications.list')}\">Owned applications</li>\n" +
7182 14706 " <li ng-show=\"$ctrl.$state.includes('applications.update')\" ng-class=\"{bold:$ctrl.$state.is('applications.update')}\">Modify application</li>\n" +
7183 14707 " <li ng-show=\"$ctrl.$state.includes('applications.integrations')\" ng-class=\"{bold:$ctrl.$state.includes('applications.integrations')}\">Integrations</li>\n" +
7184 14708 " <li ng-show=\"$ctrl.$state.includes('applications.purge_logs')\" ng-class=\"{bold:$ctrl.$state.includes('applications.purge_logs')}\">Log Purging</li>\n" +
7185 14709 "</ol>\n" +
7186 14710 "\n" +
7187 14711 "<ol class=\"breadcrumb\" ng-show=\"$ctrl.$state.includes('user.profile')\">\n" +
7188 14712 " <li>Settings</li>\n" +
7189 14713 " <li ng-show=\"$ctrl.$state.includes('user.profile.edit')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.edit')}\">User Profile</li>\n" +
7190 14714 " <li ng-show=\"$ctrl.$state.includes('user.profile.password')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.password')}\">Password</li>\n" +
7191 14715 " <li ng-show=\"$ctrl.$state.includes('user.profile.identities')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.identities')}\">Identities</li>\n" +
7192 14716 " <li ng-show=\"$ctrl.$state.includes('user.profile.auth_tokens')\" ng-class=\"{bold:$ctrl.$state.is('user.profile.auth_tokens')}\">Auth Tokens</li>\n" +
7193 14717 "</ol>\n" +
7194 14718 "<ol class=\"breadcrumb\" ng-show=\"$ctrl.$state.includes('user.alert_channels')\">\n" +
7195 14719 "<li>Notifications</li>\n" +
7196 14720 "<li ng-show=\"$ctrl.$state.includes('user.alert_channels.list')\" ng-class=\"{bold:$ctrl.$state.is('user.alert_channels.list')}\">Alert Channels</li>\n" +
7197 14721 "<li ng-show=\"$ctrl.$state.includes('user.alert_channels.email')\" ng-class=\"{bold:$ctrl.$state.is('user.alert_channels.email')}\">Create email channel</li>\n" +
7198 14722 "</ol>\n"
7199 14723 );
7200 14724
7201 14725 }]);
7202 14726
7203 14727 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7204 14728 //
7205 14729 // Licensed under the Apache License, Version 2.0 (the "License");
7206 14730 // you may not use this file except in compliance with the License.
7207 14731 // You may obtain a copy of the License at
7208 14732 //
7209 14733 // http://www.apache.org/licenses/LICENSE-2.0
7210 14734 //
7211 14735 // Unless required by applicable law or agreed to in writing, software
7212 14736 // distributed under the License is distributed on an "AS IS" BASIS,
7213 14737 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7214 14738 // See the License for the specific language governing permissions and
7215 14739 // limitations under the License.
7216 14740
7217 14741 angular.module('appenlight.components.appenlightApp', [])
7218 14742 .component('appenlightApp', {
7219 14743 templateUrl: 'components/appenlight-app/appenlight-app.html',
7220 14744 controller: AppEnlightAppController
7221 14745 });
7222 14746
7223 14747 AppEnlightAppController.$inject = ['$scope','$state', 'stateHolder', 'AeConfig'];
7224 14748
7225 14749 function AppEnlightAppController($scope, $state, stateHolder, AeConfig){
7226 14750
7227 14751 // to keep bw compatibility
7228 14752 $scope.$state = $state;
7229 14753 $scope.stateHolder = stateHolder;
7230 14754 $scope.flash = stateHolder.flashMessages.list;
7231 14755 $scope.closeAlert = stateHolder.flashMessages.closeAlert;
7232 14756 $scope.AeConfig = AeConfig;
7233 14757 }
7234 14758
7235 14759 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7236 14760 //
7237 14761 // Licensed under the Apache License, Version 2.0 (the "License");
7238 14762 // you may not use this file except in compliance with the License.
7239 14763 // You may obtain a copy of the License at
7240 14764 //
7241 14765 // http://www.apache.org/licenses/LICENSE-2.0
7242 14766 //
7243 14767 // Unless required by applicable law or agreed to in writing, software
7244 14768 // distributed under the License is distributed on an "AS IS" BASIS,
7245 14769 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7246 14770 // See the License for the specific language governing permissions and
7247 14771 // limitations under the License.
7248 14772
7249 14773 angular.module('appenlight.components.appenlightHeader', [])
7250 14774 .component('appenlightFooter', {
7251 14775 templateUrl: 'templates/components/appenlight-footer.html',
7252 14776 controller: AppEnlightFooterController
7253 14777 });
7254 14778
7255 14779 ChannelstreamController.$inject = ['stateHolder', 'AeConfig'];
7256 14780
7257 14781 function AppEnlightFooterController(stateHolder, AeConfig) {
7258 14782 var vm = this;
7259 14783
7260 14784 vm.$onInit = function () {
7261 14785 vm.AeConfig = AeConfig;
7262 14786 vm.stateHolder = stateHolder;
7263 14787 }
7264 14788 }
7265 14789
7266 14790 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7267 14791 //
7268 14792 // Licensed under the Apache License, Version 2.0 (the "License");
7269 14793 // you may not use this file except in compliance with the License.
7270 14794 // You may obtain a copy of the License at
7271 14795 //
7272 14796 // http://www.apache.org/licenses/LICENSE-2.0
7273 14797 //
7274 14798 // Unless required by applicable law or agreed to in writing, software
7275 14799 // distributed under the License is distributed on an "AS IS" BASIS,
7276 14800 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7277 14801 // See the License for the specific language governing permissions and
7278 14802 // limitations under the License.
7279 14803
7280 14804 angular.module('appenlight.components.appenlightHeader', [])
7281 14805 .component('appenlightHeader', {
7282 14806 templateUrl: 'components/appenlight-header/appenlight-header.html',
7283 14807 controller: AppEnlightHeaderController
7284 14808 });
7285 14809
7286 14810 ChannelstreamController.$inject = ['$state', 'stateHolder', 'AeConfig'];
7287 14811
7288 14812 function AppEnlightHeaderController($state, stateHolder, AeConfig) {
7289 14813 var vm = this;
7290 14814
7291 14815 vm.$onInit = function () {
7292 14816
7293 14817 vm.AeConfig = AeConfig;
7294 14818 vm.stateHolder = stateHolder;
7295 14819 vm.assignedReports = stateHolder.AeUser.assigned_reports;
7296 14820 vm.latestEvents = stateHolder.AeUser.latest_events;
7297 14821 vm.activeEvents = 0;
7298 14822 _.each(vm.latestEvents, function (event) {
7299 14823 if (event.status === 1 && event.end_date === null) {
7300 14824 vm.activeEvents += 1;
7301 14825 }
7302 14826 });
7303 14827 }
7304 14828
7305 14829 vm.clickedEvent = function (event) {
7306 14830 // exception reports
7307 14831 if (_.contains([1, 2], event.event_type)) {
7308 14832 $state.go('report.list', {resource: event.resource_id, start_date: event.start_date});
7309 14833 }
7310 14834 // slowness reports
7311 14835 else if (_.contains([3, 4], event.event_type)) {
7312 14836 $state.go('report.list_slow', {resource: event.resource_id, start_date: event.start_date});
7313 14837 }
7314 14838 // uptime reports
7315 14839 else if (_.contains([7, 8], event.event_type)) {
7316 14840 $state.go('uptime', {resource: event.resource_id, start_date: event.start_date});
7317 14841 } else {
7318 14842
7319 14843 }
7320 14844 }
7321 14845 }
7322 14846
7323 14847 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7324 14848 //
7325 14849 // Licensed under the Apache License, Version 2.0 (the "License");
7326 14850 // you may not use this file except in compliance with the License.
7327 14851 // You may obtain a copy of the License at
7328 14852 //
7329 14853 // http://www.apache.org/licenses/LICENSE-2.0
7330 14854 //
7331 14855 // Unless required by applicable law or agreed to in writing, software
7332 14856 // distributed under the License is distributed on an "AS IS" BASIS,
7333 14857 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7334 14858 // See the License for the specific language governing permissions and
7335 14859 // limitations under the License.
7336 14860
7337 14861 angular.module('appenlight.components.channelstream', [])
7338 14862 .component('channelstream', {
7339 14863 controller: ChannelstreamController,
7340 14864 bindings: {
7341 14865 config: '='
7342 14866 }
7343 14867 });
7344 14868
7345 14869 ChannelstreamController.$inject = ['$rootScope', 'stateHolder', 'userSelfPropertyResource'];
7346 14870
7347 14871 function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResource){
7348 14872 if (stateHolder.AeUser.id === null){
7349 14873 return
7350 14874 }
7351 14875 userSelfPropertyResource.get({key: 'websocket'}, function (data) {
7352 14876 stateHolder.websocket = new ReconnectingWebSocket(this.config.ws_url + '/ws?conn_id=' + data.conn_id);
7353 14877 stateHolder.websocket.onopen = function (event) {
7354 14878
7355 14879 };
7356 14880 stateHolder.websocket.onmessage = function (event) {
7357 14881 var data = JSON.parse(event.data);
7358 14882 $rootScope.$apply(function (scope) {
7359 14883 _.each(data, function (message) {
7360 14884
7361 14885 if(typeof message.message.topic !== 'undefined'){
7362 14886 $rootScope.$emit(
7363 14887 'channelstream-message.'+message.message.topic, message);
7364 14888 }
7365 14889 else{
7366 14890 $rootScope.$emit('channelstream-message', message);
7367 14891 }
7368 14892 });
7369 14893 });
7370 14894 };
7371 14895 stateHolder.websocket.onclose = function (event) {
7372 14896
7373 14897 };
7374 14898
7375 14899 stateHolder.websocket.onerror = function (event) {
7376 14900
7377 14901 };
7378 14902 }.bind(this));
7379 14903 }
7380 14904
7381 14905 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7382 14906 //
7383 14907 // Licensed under the Apache License, Version 2.0 (the "License");
7384 14908 // you may not use this file except in compliance with the License.
7385 14909 // You may obtain a copy of the License at
7386 14910 //
7387 14911 // http://www.apache.org/licenses/LICENSE-2.0
7388 14912 //
7389 14913 // Unless required by applicable law or agreed to in writing, software
7390 14914 // distributed under the License is distributed on an "AS IS" BASIS,
7391 14915 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7392 14916 // See the License for the specific language governing permissions and
7393 14917 // limitations under the License.
7394 14918
7395 14919 angular.module('appenlight.components.adminApplicationsListView', [])
7396 14920 .component('adminApplicationsListView', {
7397 14921 templateUrl: 'components/views/admin-applications-list-view/admin-applications-list-view.html',
7398 14922 controller: AdminApplicationsListController
7399 14923 });
7400 14924
7401 14925 AdminApplicationsListController.$inject = ['applicationsResource'];
7402 14926
7403 14927 function AdminApplicationsListController(applicationsResource) {
7404 14928
7405 14929 var vm = this;
7406 14930 vm.$onInit = function () {
7407 14931 vm.loading = {applications: true};
7408 14932
7409 14933 vm.applications = applicationsResource.query({
7410 14934 root_list: true,
7411 14935 resource_type: 'application'
7412 14936 }, function (data) {
7413 14937 vm.loading = {applications: false};
7414 14938 });
7415 14939 }
7416 14940 };
7417 14941
7418 14942 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7419 14943 //
7420 14944 // Licensed under the Apache License, Version 2.0 (the "License");
7421 14945 // you may not use this file except in compliance with the License.
7422 14946 // You may obtain a copy of the License at
7423 14947 //
7424 14948 // http://www.apache.org/licenses/LICENSE-2.0
7425 14949 //
7426 14950 // Unless required by applicable law or agreed to in writing, software
7427 14951 // distributed under the License is distributed on an "AS IS" BASIS,
7428 14952 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7429 14953 // See the License for the specific language governing permissions and
7430 14954 // limitations under the License.
7431 14955
7432 14956 angular.module('appenlight.components.adminConfigurationView', [])
7433 14957 .component('adminConfigurationView', {
7434 14958 templateUrl: 'components/views/admin-configuration-view/admin-configuration-view.html',
7435 14959 controller: AdminConfigurationViewController
7436 14960 });
7437 14961
7438 14962 AdminConfigurationViewController.$inject = ['configsResource', 'configsNoIdResource'];
7439 14963
7440 14964 function AdminConfigurationViewController(configsResource, configsNoIdResource) {
7441 14965 var vm = this;
7442 14966 vm.$onInit = function () {
7443 14967 vm.loading = {config: true};
7444 14968
7445 14969 var filters = [
7446 14970 'template_footer_html:global',
7447 14971 'list_groups_to_non_admins:global',
7448 14972 'per_application_reports_rate_limit:global',
7449 14973 'per_application_logs_rate_limit:global',
7450 14974 'per_application_metrics_rate_limit:global',
7451 14975 ];
7452 14976
7453 14977 vm.configs = {};
7454 14978
7455 14979 vm.configList = configsResource.query({filter: filters},
7456 14980 function (data) {
7457 14981 vm.loading = {config: false};
7458 14982 _.each(data, function (item) {
7459 14983 if (vm.configs[item.section] === undefined) {
7460 14984 vm.configs[item.section] = {};
7461 14985 }
7462 14986 vm.configs[item.section][item.key] = item;
7463 14987 });
7464 14988 });
7465 14989 }
7466 14990 vm.save = function () {
7467 14991 vm.loading.config = true;
7468 14992 _.each(vm.configList, function (item) {
7469 14993 item.$save();
7470 14994 });
7471 14995 vm.loading.config = false;
7472 14996 };
7473 14997
7474 14998 };
7475 14999
7476 15000 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7477 15001 //
7478 15002 // Licensed under the Apache License, Version 2.0 (the "License");
7479 15003 // you may not use this file except in compliance with the License.
7480 15004 // You may obtain a copy of the License at
7481 15005 //
7482 15006 // http://www.apache.org/licenses/LICENSE-2.0
7483 15007 //
7484 15008 // Unless required by applicable law or agreed to in writing, software
7485 15009 // distributed under the License is distributed on an "AS IS" BASIS,
7486 15010 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7487 15011 // See the License for the specific language governing permissions and
7488 15012 // limitations under the License.
7489 15013
7490 15014 angular.module('appenlight.components.adminGroupsCreateView', [])
7491 15015 .component('adminGroupsCreateView', {
7492 15016 templateUrl: 'components/views/admin-groups-create-view/admin-groups-create-view.html',
7493 15017 controller: AdminGroupsCreateViewController
7494 15018 });
7495 15019
7496 15020 AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource'];
7497 15021
7498 15022 function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) {
7499 15023
7500 15024 var vm = this;
7501 15025 vm.$onInit = function () {
7502 15026 vm.$state = $state;
7503 15027 vm.loading = {
7504 15028 group: false,
7505 15029 resource_permissions: false,
7506 15030 users: false
7507 15031 };
7508 15032
7509 15033 vm.form = {
7510 15034 autocompleteUser: '',
7511 15035 }
7512 15036
7513 15037
7514 15038 if (typeof $state.params.groupId !== 'undefined') {
7515 15039 vm.loading.group = true;
7516 15040 var groupId = $state.params.groupId;
7517 15041 vm.group = groupsResource.get({groupId: groupId}, function (data) {
7518 15042 vm.loading.group = false;
7519 15043 });
7520 15044
7521 15045 vm.resource_permissions = groupsPropertyResource.query(
7522 15046 {groupId: groupId, key: 'resource_permissions'}, function (data) {
7523 15047 vm.loading.resource_permissions = false;
7524 15048 var tmpObj = {
7525 15049 'group': {
7526 15050 'application': {},
7527 15051 'dashboard': {}
7528 15052 }
7529 15053 };
7530 15054 _.each(data, function (item) {
7531 15055
7532 15056 var section = tmpObj[item.type][item.resource_type];
7533 15057 if (typeof section[item.resource_id] == 'undefined') {
7534 15058 section[item.resource_id] = {
7535 15059 self: item,
7536 15060 permissions: []
7537 15061 }
7538 15062 }
7539 15063 section[item.resource_id].permissions.push(item.perm_name);
7540 15064
7541 15065 });
7542 15066 vm.resourcePermissions = tmpObj;
7543 15067 });
7544 15068
7545 15069 vm.users = groupsPropertyResource.query(
7546 15070 {groupId: groupId, key: 'users'}, function (data) {
7547 15071 vm.loading.users = false;
7548 15072 }, function () {
7549 15073 vm.loading.users = false;
7550 15074 });
7551 15075
7552 15076 } else {
7553 15077 var groupId = null;
7554 15078 }
7555 15079
7556 15080 }
7557 15081
7558 15082 var formResponse = function (response) {
7559 15083 if (response.status === 422) {
7560 15084 setServerValidation(vm.groupForm, response.data);
7561 15085 }
7562 15086 vm.loading.group = false;
7563 15087 };
7564 15088
7565 15089 vm.createGroup = function () {
7566 15090 vm.loading.group = true;
7567 15091 var groupId = $state.params.groupId;
7568 15092 if (groupId) {
7569 15093 groupsResource.update({groupId: vm.group.id}, vm.group, function (data) {
7570 15094 setServerValidation(vm.groupForm);
7571 15095 vm.loading.group = false;
7572 15096 }, formResponse);
7573 15097 } else {
7574 15098 groupsResource.save(vm.group, function (data) {
7575 15099 $state.go('admin.group.update', {groupId: data.id});
7576 15100 }, formResponse);
7577 15101 }
7578 15102 };
7579 15103
7580 15104 vm.removeUser = function (user) {
7581 15105 var groupId = $state.params.groupId;
7582 15106 groupsPropertyResource.delete(
7583 15107 {groupId: groupId, key: 'users', user_name: user.user_name},
7584 15108 function (data) {
7585 15109 vm.loading.users = false;
7586 15110 vm.users = _.filter(vm.users, function (item) {
7587 15111 return item != user;
7588 15112 });
7589 15113 }, function () {
7590 15114 vm.loading.users = false;
7591 15115 });
7592 15116 };
7593 15117
7594 15118 vm.addUser = function () {
7595 15119 var groupId = $state.params.groupId;
7596 15120 groupsPropertyResource.save(
7597 15121 {groupId: groupId, key: 'users'},
7598 15122 {user_name: vm.form.autocompleteUser},
7599 15123 function (data) {
7600 15124 vm.loading.users = false;
7601 15125 vm.users.push(data);
7602 15126 vm.form.autocompleteUser = '';
7603 15127 }, function () {
7604 15128 vm.loading.users = false;
7605 15129 });
7606 15130 }
7607 15131
7608 15132 vm.searchUsers = function (searchPhrase) {
7609 15133
7610 15134 return sectionViewResource.query({
7611 15135 section: 'users_section',
7612 15136 view: 'search_users',
7613 15137 'user_name': searchPhrase
7614 15138 }).$promise.then(function (data) {
7615 15139 return _.map(data, function (item) {
7616 15140 return item.user;
7617 15141 });
7618 15142 });
7619 15143 }
7620 15144 };
7621 15145
7622 15146 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7623 15147 //
7624 15148 // Licensed under the Apache License, Version 2.0 (the "License");
7625 15149 // you may not use this file except in compliance with the License.
7626 15150 // You may obtain a copy of the License at
7627 15151 //
7628 15152 // http://www.apache.org/licenses/LICENSE-2.0
7629 15153 //
7630 15154 // Unless required by applicable law or agreed to in writing, software
7631 15155 // distributed under the License is distributed on an "AS IS" BASIS,
7632 15156 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7633 15157 // See the License for the specific language governing permissions and
7634 15158 // limitations under the License.
7635 15159
7636 15160 angular.module('appenlight.components.adminGroupsListView', [])
7637 15161 .component('adminGroupsListView', {
7638 15162 templateUrl: 'components/views/admin-groups-list-view/admin-groups-list-view.html',
7639 15163 controller: AdminGroupsListViewController
7640 15164 });
7641 15165
7642 15166 AdminGroupsListViewController.$inject = ['$state', 'groupsResource'];
7643 15167
7644 15168 function AdminGroupsListViewController($state, groupsResource) {
7645 15169
7646 15170 var vm = this;
7647 15171 this.$onInit = function () {
7648 15172 vm.$state = $state;
7649 15173 vm.loading = {groups: true};
7650 15174
7651 15175 vm.groups = groupsResource.query({}, function (data) {
7652 15176 vm.loading = {groups: false};
7653 15177 vm.activeUsers = _.reduce(vm.groups, function (memo, val) {
7654 15178 if (val.status == 1) {
7655 15179 return memo + 1;
7656 15180 }
7657 15181 return memo;
7658 15182 }, 0);
7659 15183
7660 15184 });
7661 15185 }
7662 15186
7663 15187 vm.removeGroup = function (group) {
7664 15188 groupsResource.remove({groupId: group.id}, function (data, responseHeaders) {
7665 15189
7666 15190 if (data) {
7667 15191 var index = vm.groups.indexOf(group);
7668 15192 if (index !== -1) {
7669 15193 vm.groups.splice(index, 1);
7670 15194 vm.activeGroups -= 1;
7671 15195 }
7672 15196 }
7673 15197 });
7674 15198 }
7675 15199 };
7676 15200
7677 15201 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7678 15202 //
7679 15203 // Licensed under the Apache License, Version 2.0 (the "License");
7680 15204 // you may not use this file except in compliance with the License.
7681 15205 // You may obtain a copy of the License at
7682 15206 //
7683 15207 // http://www.apache.org/licenses/LICENSE-2.0
7684 15208 //
7685 15209 // Unless required by applicable law or agreed to in writing, software
7686 15210 // distributed under the License is distributed on an "AS IS" BASIS,
7687 15211 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7688 15212 // See the License for the specific language governing permissions and
7689 15213 // limitations under the License.
7690 15214
7691 15215 angular.module('appenlight.components.adminPartitionsView', [])
7692 15216 .component('adminPartitionsView', {
7693 15217 templateUrl: 'components/views/admin-partitions-view/admin-partitions-view.html',
7694 15218 controller: AdminPartitionsViewController
7695 15219 });
7696 15220
7697 15221 AdminPartitionsViewController.$inject = ['sectionViewResource'];
7698 15222
7699 15223 function AdminPartitionsViewController(sectionViewResource) {
7700 15224 var vm = this;
7701 15225 this.$onInit = function () {
7702 15226 vm.permanentPartitions = [];
7703 15227 vm.dailyPartitions = [];
7704 15228 vm.loading = {partitions: true};
7705 15229 vm.dailyChecked = false;
7706 15230 vm.permChecked = false;
7707 15231 vm.dailyConfirm = '';
7708 15232 vm.permConfirm = '';
7709 15233
7710 15234 sectionViewResource.get({section: 'admin_section', view: 'partitions'},
7711 15235 vm.loadPartitions);
7712 15236 }
7713 15237
7714 15238 vm.loadPartitions = function (data) {
7715 15239 var permanentPartitions = vm.transformPartitionList(
7716 15240 data.permanent_partitions);
7717 15241 var dailyPartitions = vm.transformPartitionList(
7718 15242 data.daily_partitions);
7719 15243 vm.permanentPartitions = permanentPartitions;
7720 15244 vm.dailyPartitions = dailyPartitions;
7721 15245 vm.loading = {partitions: false};
7722 15246 };
7723 15247
7724 15248 vm.setCheckedList = function (scope) {
7725 15249 var toTest = null;
7726 15250 if (scope === 'dailyPartitions') {
7727 15251 toTest = 'dailyChecked';
7728 15252 } else {
7729 15253 toTest = 'permChecked';
7730 15254 }
7731 15255
7732 15256 if (vm[toTest]) {
7733 15257 var val = true;
7734 15258 } else {
7735 15259 var val = false;
7736 15260 }
7737 15261
7738 15262 _.each(vm[scope], function (item) {
7739 15263 _.each(item[1].pg, function (index) {
7740 15264 index.checked = val;
7741 15265 });
7742 15266 _.each(item[1].elasticsearch, function (index) {
7743 15267 index.checked = val;
7744 15268 });
7745 15269 });
7746 15270 }
7747 15271
7748 15272
7749 15273 vm.transformPartitionList = function (inputList) {
7750 15274 var outputList = [];
7751 15275
7752 15276 _.each(inputList, function (item) {
7753 15277 var time = [item[0], {
7754 15278 elasticsearch: [],
7755 15279 pg: []
7756 15280 }]
7757 15281 _.each(item[1].pg, function (index) {
7758 15282 time[1].pg.push({name: index, checked: false})
7759 15283 });
7760 15284 _.each(item[1].elasticsearch, function (index) {
7761 15285 time[1].elasticsearch.push({
7762 15286 name: index,
7763 15287 checked: false
7764 15288 })
7765 15289 });
7766 15290 outputList.push(time);
7767 15291 });
7768 15292 return outputList;
7769 15293 };
7770 15294
7771 15295 vm.partitionsDelete = function (partitionType) {
7772 15296 var es_indices = [];
7773 15297 var pg_indices = [];
7774 15298 _.each(vm[partitionType], function (item) {
7775 15299 _.each(item[1].pg, function (index) {
7776 15300 if (index.checked) {
7777 15301 pg_indices.push(index.name)
7778 15302 }
7779 15303 });
7780 15304 _.each(item[1].elasticsearch, function (index) {
7781 15305 if (index.checked) {
7782 15306 es_indices.push(index.name)
7783 15307 }
7784 15308 });
7785 15309 });
7786 15310
7787 15311
7788 15312 vm.loading = {partitions: true};
7789 15313 sectionViewResource.save({
7790 15314 section: 'admin_section',
7791 15315 view: 'partitions_remove'
7792 15316 }, {
7793 15317 es_indices: es_indices,
7794 15318 pg_indices: pg_indices,
7795 15319 confirm: 'CONFIRM'
7796 15320 }, vm.loadPartitions);
7797 15321
7798 15322 }
7799 15323
7800 15324 }
7801 15325
7802 15326 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7803 15327 //
7804 15328 // Licensed under the Apache License, Version 2.0 (the "License");
7805 15329 // you may not use this file except in compliance with the License.
7806 15330 // You may obtain a copy of the License at
7807 15331 //
7808 15332 // http://www.apache.org/licenses/LICENSE-2.0
7809 15333 //
7810 15334 // Unless required by applicable law or agreed to in writing, software
7811 15335 // distributed under the License is distributed on an "AS IS" BASIS,
7812 15336 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7813 15337 // See the License for the specific language governing permissions and
7814 15338 // limitations under the License.
7815 15339
7816 15340 angular.module('appenlight.components.adminSystemView', [])
7817 15341 .component('adminSystemView', {
7818 15342 templateUrl: 'components/views/admin-system-view/admin-system-view.html',
7819 15343 controller: AdminSystemViewController
7820 15344 });
7821 15345
7822 15346 AdminSystemViewController.$inject = ['sectionViewResource'];
7823 15347
7824 15348 function AdminSystemViewController(sectionViewResource) {
7825 15349 var vm = this;
7826 15350 this.$onInit = function () {
7827 15351 vm.tables = [];
7828 15352 vm.loading = {system: true};
7829 15353
7830 15354 sectionViewResource.get({
7831 15355 section: 'admin_section',
7832 15356 view: 'system'
7833 15357 }, null, function (data) {
7834 15358 vm.DBtables = data.db_tables;
7835 15359 vm.ESIndices = data.es_indices;
7836 15360 vm.queueStats = data.queue_stats;
7837 15361 vm.systemLoad = data.system_load;
7838 15362 vm.packages = data.packages;
7839 15363 vm.processInfo = data.process_info;
7840 15364 vm.disks = data.disks;
7841 15365 vm.memory = data.memory;
7842 15366 vm.selfInfo = data.self_info;
7843 15367 vm.loading.system = false;
7844 15368 });
7845 15369 }
7846 15370 };
7847 15371
7848 15372 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7849 15373 //
7850 15374 // Licensed under the Apache License, Version 2.0 (the "License");
7851 15375 // you may not use this file except in compliance with the License.
7852 15376 // You may obtain a copy of the License at
7853 15377 //
7854 15378 // http://www.apache.org/licenses/LICENSE-2.0
7855 15379 //
7856 15380 // Unless required by applicable law or agreed to in writing, software
7857 15381 // distributed under the License is distributed on an "AS IS" BASIS,
7858 15382 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7859 15383 // See the License for the specific language governing permissions and
7860 15384 // limitations under the License.
7861 15385
7862 15386 angular.module('appenlight.components.adminUsersCreateView', [])
7863 15387 .component('adminUsersCreateView', {
7864 15388 templateUrl: 'components/views/admin-users-create-view/admin-users-create-view.html',
7865 15389 controller: AdminUsersCreateViewController
7866 15390 });
7867 15391
7868 15392 AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig'];
7869 15393
7870 15394 function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
7871 15395
7872 15396 var vm = this;
7873 15397 vm.$onInit = function () {
7874 15398 vm.$state = $state;
7875 15399 vm.loading = {user: false};
7876 15400
7877 15401
7878 15402 if (typeof $state.params.userId !== 'undefined') {
7879 15403 vm.loading.user = true;
7880 15404 var userId = $state.params.userId;
7881 15405 vm.user = usersResource.get({userId: userId}, function (data) {
7882 15406 vm.loading.user = false;
7883 15407 // cast to true for angular checkbox
7884 15408 if (vm.user.status === 1) {
7885 15409 vm.user.status = true;
7886 15410 }
7887 15411 });
7888 15412
7889 15413 vm.resource_permissions = usersPropertyResource.query(
7890 15414 {userId: userId, key: 'resource_permissions'}, function (data) {
7891 15415 vm.loading.resource_permissions = false;
7892 15416 var tmpObj = {
7893 15417 'user': {
7894 15418 'application': {},
7895 15419 'dashboard': {}
7896 15420 },
7897 15421 'group': {
7898 15422 'application': {},
7899 15423 'dashboard': {}
7900 15424 }
7901 15425 };
7902 15426 _.each(data, function (item) {
7903 15427
7904 15428 var section = tmpObj[item.type][item.resource_type];
7905 15429 if (typeof section[item.resource_id] == 'undefined') {
7906 15430 section[item.resource_id] = {
7907 15431 self: item,
7908 15432 permissions: []
7909 15433 }
7910 15434 }
7911 15435 section[item.resource_id].permissions.push(item.perm_name);
7912 15436
7913 15437 });
7914 15438 vm.resourcePermissions = tmpObj;
7915 15439 });
7916 15440
7917 15441 } else {
7918 15442 var userId = null;
7919 15443 vm.user = {
7920 15444 status: true
7921 15445 }
7922 15446 }
7923 15447 }
7924 15448
7925 15449 var formResponse = function (response) {
7926 15450 if (response.status == 422) {
7927 15451 setServerValidation(vm.profileForm, response.data);
7928 15452 }
7929 15453 vm.loading.user = false;
7930 15454 }
7931 15455
7932 15456 vm.createUser = function () {
7933 15457 vm.loading.user = true;
7934 15458
7935 15459 var userId = $state.params.userId;
7936 15460 if (userId) {
7937 15461 usersResource.update({userId: vm.user.id}, vm.user, function (data) {
7938 15462 setServerValidation(vm.profileForm);
7939 15463 vm.loading.user = false;
7940 15464 }, formResponse);
7941 15465 }
7942 15466 else {
7943 15467 usersResource.save(vm.user, function (data) {
7944 15468 $state.go('admin.user.update', {userId: data.id});
7945 15469 }, formResponse);
7946 15470 }
7947 15471 }
7948 15472
7949 15473 vm.generatePassword = function () {
7950 15474 var length = 8;
7951 15475 var charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
7952 15476 vm.gen_pass = "";
7953 15477 for (var i = 0, n = charset.length; i < length; ++i) {
7954 15478 vm.gen_pass += charset.charAt(Math.floor(Math.random() * n));
7955 15479 }
7956 15480 vm.user.user_password = '' + vm.gen_pass;
7957 15481
7958 15482 }
7959 15483
7960 15484 vm.reloginUser = function () {
7961 15485 sectionViewResource.get({
7962 15486 section: 'admin_section', view: 'relogin_user',
7963 15487 user_id: vm.user.id
7964 15488 }, function () {
7965 15489 window.location = AeConfig.urls.baseUrl;
7966 15490 });
7967 15491
7968 15492 }
7969 15493 };
7970 15494
7971 15495 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
7972 15496 //
7973 15497 // Licensed under the Apache License, Version 2.0 (the "License");
7974 15498 // you may not use this file except in compliance with the License.
7975 15499 // You may obtain a copy of the License at
7976 15500 //
7977 15501 // http://www.apache.org/licenses/LICENSE-2.0
7978 15502 //
7979 15503 // Unless required by applicable law or agreed to in writing, software
7980 15504 // distributed under the License is distributed on an "AS IS" BASIS,
7981 15505 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7982 15506 // See the License for the specific language governing permissions and
7983 15507 // limitations under the License.
7984 15508
7985 15509 angular.module('appenlight.components.adminUsersListView', [])
7986 15510 .component('adminUsersListView', {
7987 15511 templateUrl: 'components/views/admin-users-list-view/admin-users-list-view.html',
7988 15512 controller: AdminUserListViewController
7989 15513 });
7990 15514
7991 15515 AdminUserListViewController.$inject = ['usersResource'];
7992 15516
7993 15517 function AdminUserListViewController(usersResource) {
7994 15518
7995 15519 var vm = this;
7996 15520 vm.$onInit = function () {
7997 15521 vm.loading = {users: true};
7998 15522
7999 15523 vm.users = usersResource.query({}, function (data) {
8000 15524 vm.loading = {users: false};
8001 15525 vm.activeUsers = _.reduce(vm.users, function (memo, val) {
8002 15526 if (val.status == 1) {
8003 15527 return memo + 1;
8004 15528 }
8005 15529 return memo;
8006 15530 }, 0);
8007 15531
8008 15532 });
8009 15533 }
8010 15534
8011 15535 vm.removeUser = function (user) {
8012 15536 usersResource.remove({userId: user.id}, function (data, responseHeaders) {
8013 15537
8014 15538 if (data) {
8015 15539 var index = vm.users.indexOf(user);
8016 15540 if (index !== -1) {
8017 15541 vm.users.splice(index, 1);
8018 15542 vm.activeUsers -= 1;
8019 15543 }
8020 15544 }
8021 15545 });
8022 15546 }
8023 15547 };
8024 15548
8025 15549 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8026 15550 //
8027 15551 // Licensed under the Apache License, Version 2.0 (the "License");
8028 15552 // you may not use this file except in compliance with the License.
8029 15553 // You may obtain a copy of the License at
8030 15554 //
8031 15555 // http://www.apache.org/licenses/LICENSE-2.0
8032 15556 //
8033 15557 // Unless required by applicable law or agreed to in writing, software
8034 15558 // distributed under the License is distributed on an "AS IS" BASIS,
8035 15559 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8036 15560 // See the License for the specific language governing permissions and
8037 15561 // limitations under the License.
8038 15562
8039 15563 angular.module('appenlight.components.adminView', [])
8040 15564 .component('adminView', {
8041 15565 templateUrl: 'components/views/admin-view/admin-view.html',
8042 15566 controller: AdminViewController
8043 15567 });
8044 15568
8045 15569 AdminViewController.$inject = ['$state', 'AeConfig'];
8046 15570
8047 15571 function AdminViewController($state, AeConfig) {
8048 15572 this.$onInit = function () {
8049 15573 this.$state = $state;
8050 15574 this.AeConfig = AeConfig;
8051 15575 console.info('AdminViewController');
8052 15576 }
8053 15577
8054 15578 }
8055 15579
8056 15580 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8057 15581 //
8058 15582 // Licensed under the Apache License, Version 2.0 (the "License");
8059 15583 // you may not use this file except in compliance with the License.
8060 15584 // You may obtain a copy of the License at
8061 15585 //
8062 15586 // http://www.apache.org/licenses/LICENSE-2.0
8063 15587 //
8064 15588 // Unless required by applicable law or agreed to in writing, software
8065 15589 // distributed under the License is distributed on an "AS IS" BASIS,
8066 15590 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8067 15591 // See the License for the specific language governing permissions and
8068 15592 // limitations under the License.
8069 15593
8070 15594 angular.module('appenlight.components.integrationsListView', [])
8071 15595 .component('integrationsListView', {
8072 15596 templateUrl: 'components/views/applications-integrations-view/applications-integrations-view.html',
8073 15597 controller: IntegrationsListViewController
8074 15598 });
8075 15599
8076 15600 IntegrationsListViewController.$inject = ['$state', 'applicationsResource'];
8077 15601
8078 15602 function IntegrationsListViewController($state, applicationsResource) {
8079 15603
8080 15604 var vm = this;
8081 15605 vm.$onInit = function () {
8082 15606 vm.loading = {application: true};
8083 15607 vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) {
8084 15608 vm.loading.application = false;
8085 15609 $state.current.data.resource = vm.resource;
8086 15610 });
8087 15611 }
8088 15612 }
8089 15613
8090 15614 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8091 15615 //
8092 15616 // Licensed under the Apache License, Version 2.0 (the "License");
8093 15617 // you may not use this file except in compliance with the License.
8094 15618 // You may obtain a copy of the License at
8095 15619 //
8096 15620 // http://www.apache.org/licenses/LICENSE-2.0
8097 15621 //
8098 15622 // Unless required by applicable law or agreed to in writing, software
8099 15623 // distributed under the License is distributed on an "AS IS" BASIS,
8100 15624 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8101 15625 // See the License for the specific language governing permissions and
8102 15626 // limitations under the License.
8103 15627
8104 15628 angular.module('appenlight.components.applicationsListView', [])
8105 15629 .component('applicationsListView', {
8106 15630 templateUrl: 'components/views/applications-list-view/applications-list-view.html',
8107 15631 controller: ApplicationsListViewController
8108 15632 });
8109 15633
8110 15634 ApplicationsListViewController.$inject = ['$state', 'applicationsResource'];
8111 15635
8112 15636 function ApplicationsListViewController($state, applicationsResource) {
8113 15637
8114 15638 var vm = this;
8115 15639 vm.$onInit = function () {
8116 15640 vm.$state = $state;
8117 15641 vm.loading = {applications: true};
8118 15642 vm.applications = applicationsResource.query(null, function () {
8119 15643 vm.loading.applications = false;
8120 15644 });
8121 15645 }
8122 15646 }
8123 15647
8124 15648 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8125 15649 //
8126 15650 // Licensed under the Apache License, Version 2.0 (the "License");
8127 15651 // you may not use this file except in compliance with the License.
8128 15652 // You may obtain a copy of the License at
8129 15653 //
8130 15654 // http://www.apache.org/licenses/LICENSE-2.0
8131 15655 //
8132 15656 // Unless required by applicable law or agreed to in writing, software
8133 15657 // distributed under the License is distributed on an "AS IS" BASIS,
8134 15658 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8135 15659 // See the License for the specific language governing permissions and
8136 15660 // limitations under the License.
8137 15661
8138 15662 angular.module('appenlight.components.applicationsPurgeLogsView', [])
8139 15663 .component('applicationsPurgeLogsView', {
8140 15664 templateUrl: 'components/views/applications-purge-logs-view/applications-purge-logs-view.html',
8141 15665 controller: applicationsPurgeLogsViewController
8142 15666 });
8143 15667
8144 15668 applicationsPurgeLogsViewController.$inject = ['$state', 'applicationsResource', 'sectionViewResource', 'logsNoIdResource'];
8145 15669
8146 15670 function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) {
8147 15671
8148 15672 var vm = this;
8149 15673 vm.$onInit = function () {
8150 15674 vm.$state = $state;
8151 15675 vm.loading = {applications: true};
8152 15676
8153 15677 vm.namespace = null;
8154 15678 vm.selectedResource = null;
8155 15679 vm.commonNamespaces = [];
8156 15680
8157 15681 vm.applications = applicationsResource.query({'type': 'update_reports'}, function () {
8158 15682 vm.loading.applications = false;
8159 15683 vm.selectedResource = vm.applications[0].resource_id;
8160 15684 vm.getCommonKeys();
8161 15685 });
8162 15686 }
8163 15687
8164 15688 /**
8165 15689 * Fetches most commonly used tags in logs
8166 15690 */
8167 15691 vm.getCommonKeys = function () {
8168 15692 sectionViewResource.get({
8169 15693 section: 'logs_section',
8170 15694 view: 'common_tags',
8171 15695 resource: vm.selectedResource
8172 15696 }, function (data) {
8173 15697 vm.commonNamespaces = data['namespaces']
8174 15698 });
8175 15699 };
8176 15700
8177 15701 vm.purgeLogs = function () {
8178 15702 vm.loading.applications = true;
8179 15703 logsNoIdResource.delete({
8180 15704 resource: vm.selectedResource,
8181 15705 namespace: vm.namespace
8182 15706 }, function () {
8183 15707 vm.loading.applications = false;
8184 15708 });
8185 15709 }
8186 15710 }
8187 15711
8188 15712 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8189 15713 //
8190 15714 // Licensed under the Apache License, Version 2.0 (the "License");
8191 15715 // you may not use this file except in compliance with the License.
8192 15716 // You may obtain a copy of the License at
8193 15717 //
8194 15718 // http://www.apache.org/licenses/LICENSE-2.0
8195 15719 //
8196 15720 // Unless required by applicable law or agreed to in writing, software
8197 15721 // distributed under the License is distributed on an "AS IS" BASIS,
8198 15722 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8199 15723 // See the License for the specific language governing permissions and
8200 15724 // limitations under the License.
8201 15725
8202 15726 angular.module('appenlight.components.applicationsUpdateView', [])
8203 15727 .component('applicationsUpdateView', {
8204 15728 templateUrl: 'components/views/applications-update-view/applications-update-view.html',
8205 15729 controller: applicationsUpdateViewController
8206 15730 });
8207 15731
8208 15732 applicationsUpdateViewController.$inject = ['$state', 'applicationsNoIdResource', 'applicationsResource', 'applicationsPropertyResource', 'stateHolder', 'AeConfig'];
8209 15733
8210 15734 function applicationsUpdateViewController($state, applicationsNoIdResource, applicationsResource, applicationsPropertyResource, stateHolder, AeConfig) {
8211 15735 'use strict';
8212 15736
8213 15737 var vm = this;
8214 15738 vm.$onInit = function () {
8215 15739 vm.AeConfig = AeConfig;
8216 15740 vm.$state = $state;
8217 15741 vm.loading = {application: false};
8218 15742
8219 15743 vm.groupingOptions = [
8220 15744 ['url_type', 'Error Type + location'],
8221 15745 ['url_traceback', 'Traceback + location'],
8222 15746 ['traceback_server', 'Traceback + Server'],
8223 15747 ];
8224 15748 var resourceId = $state.params.resourceId;
8225 15749 var options = {};
8226 15750 vm.momentJs = moment;
8227 15751 vm.formTransferModel = {password: ''};
8228 15752
8229 15753 // set initial data
8230 15754
8231 15755 if (resourceId === 'new') {
8232 15756 vm.resource = {
8233 15757 resource_id: null,
8234 15758 slow_report_threshold: 10,
8235 15759 error_report_threshold: 10,
8236 15760 allow_permanent_storage: true,
8237 15761 default_grouping: vm.groupingOptions[1][0]
8238 15762 };
8239 15763 } else {
8240 15764 vm.loading.application = true;
8241 15765 vm.resource = applicationsResource.get({
8242 15766 'resourceId': resourceId
8243 15767 }, function (data) {
8244 15768 vm.loading.application = false;
8245 15769 });
8246 15770 }
8247 15771 }
8248 15772
8249 15773 vm.updateBasicForm = function () {
8250 15774 vm.loading.application = true;
8251 15775 if (vm.resource.resource_id === null) {
8252 15776 applicationsNoIdResource.save(null, vm.resource, function (data) {
8253 15777 stateHolder.AeUser.addApplication(data);
8254 15778 $state.go('applications.update', {resourceId: data.resource_id});
8255 15779 setServerValidation(vm.BasicForm);
8256 15780 }, function (response) {
8257 15781 if (response.status == 422) {
8258 15782 setServerValidation(vm.BasicForm, response.data);
8259 15783 }
8260 15784 vm.loading.application = false;
8261 15785
8262 15786 });
8263 15787 }
8264 15788 else {
8265 15789 applicationsResource.update({resourceId: vm.resource.resource_id},
8266 15790 vm.resource, function (data) {
8267 15791 vm.resource = data;
8268 15792 vm.loading.application = false;
8269 15793 setServerValidation(vm.BasicForm);
8270 15794 }, function (response) {
8271 15795 if (response.status == 422) {
8272 15796 setServerValidation(vm.BasicForm, response.data);
8273 15797 }
8274 15798 vm.loading.application = false;
8275 15799 });
8276 15800 }
8277 15801 };
8278 15802
8279 15803 vm.addRule = function () {
8280 15804
8281 15805 applicationsPropertyResource.save({
8282 15806 resourceId: vm.resource.resource_id,
8283 15807 key: 'postprocessing_rules'
8284 15808 }, null,
8285 15809 function (data) {
8286 15810 vm.resource.postprocessing_rules.push(data);
8287 15811 }
8288 15812 );
8289 15813 };
8290 15814
8291 15815 vm.regenerateAPIKeys = function(){
8292 15816 vm.loading.application = true;
8293 15817 applicationsPropertyResource.save({
8294 15818 resourceId: vm.resource.resource_id,
8295 15819 key: 'api_key'
8296 15820 }, {password: vm.regenerateAPIKeysPassword},
8297 15821 function (data) {
8298 15822 vm.resource = data;
8299 15823 vm.loading.application = false;
8300 15824 vm.regenerateAPIKeysPassword = '';
8301 15825 setServerValidation(vm.regenerateAPIKeysForm);
8302 15826 },
8303 15827 function (response) {
8304 15828 if (response.status == 422) {
8305 15829 setServerValidation(vm.regenerateAPIKeysForm, response.data);
8306 15830
8307 15831 }
8308 15832 vm.loading.application = false;
8309 15833 }
8310 15834 )
8311 15835 };
8312 15836
8313 15837 vm.deleteApplication = function(){
8314 15838 vm.loading.application = true;
8315 15839 applicationsPropertyResource.update({
8316 15840 resourceId: vm.resource.resource_id,
8317 15841 key: 'delete_resource'
8318 15842 }, vm.formDeleteModel,
8319 15843 function (data) {
8320 15844 stateHolder.AeUser.removeApplicationById(vm.resource.resource_id);
8321 15845 $state.go('applications.list');
8322 15846 },
8323 15847 function (response) {
8324 15848 if (response.status == 422) {
8325 15849 setServerValidation(vm.formDelete, response.data);
8326 15850
8327 15851 }
8328 15852 vm.loading.application = false;
8329 15853 }
8330 15854 );
8331 15855 };
8332 15856
8333 15857 vm.transferApplication = function(){
8334 15858 vm.loading.application = true;
8335 15859 applicationsPropertyResource.update({
8336 15860 resourceId: vm.resource.resource_id,
8337 15861 key: 'owner'
8338 15862 }, vm.formTransferModel,
8339 15863 function (data) {
8340 15864 $state.go('applications.list');
8341 15865 },
8342 15866 function (response) {
8343 15867 if (response.status == 422) {
8344 15868 setServerValidation(vm.formTransfer, response.data);
8345 15869
8346 15870 }
8347 15871 vm.loading.application = false;
8348 15872 }
8349 15873 )
8350 15874 }
8351 15875
8352 15876 }
8353 15877
8354 15878 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8355 15879 //
8356 15880 // Licensed under the Apache License, Version 2.0 (the "License");
8357 15881 // you may not use this file except in compliance with the License.
8358 15882 // You may obtain a copy of the License at
8359 15883 //
8360 15884 // http://www.apache.org/licenses/LICENSE-2.0
8361 15885 //
8362 15886 // Unless required by applicable law or agreed to in writing, software
8363 15887 // distributed under the License is distributed on an "AS IS" BASIS,
8364 15888 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8365 15889 // See the License for the specific language governing permissions and
8366 15890 // limitations under the License.
8367 15891
8368 15892 angular.module('appenlight.components.eventBrowserView', [])
8369 15893 .component('eventBrowserView', {
8370 15894 templateUrl: 'components/views/event-browser/event-browser.html',
8371 15895 controller: EventBrowserController
8372 15896 });
8373 15897
8374 15898 EventBrowserController.$inject = ['eventsNoIdResource', 'eventsResource'];
8375 15899
8376 15900 function EventBrowserController(eventsNoIdResource, eventsResource) {
8377 15901 console.info('EventBrowserController');
8378 15902 var vm = this;
8379 15903 vm.$onInit = function () {
8380 15904
8381 15905 vm.loading = {events: true};
8382 15906
8383 15907 vm.events = eventsNoIdResource.query(
8384 15908 {key: 'events'},
8385 15909 function (data) {
8386 15910 vm.loading.events = false;
8387 15911 });
8388 15912 }
8389 15913
8390 15914 vm.closeEvent = function (event) {
8391 15915
8392 15916 eventsResource.update({eventId: event.id}, {status: 0}, function (data) {
8393 15917 event.status = 0;
8394 15918 });
8395 15919 }
8396 15920
8397 15921 }
8398 15922
8399 15923 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
8400 15924 //
8401 15925 // Licensed under the Apache License, Version 2.0 (the "License");
8402 15926 // you may not use this file except in compliance with the License.
8403 15927 // You may obtain a copy of the License at
8404 15928 //
8405 15929 // http://www.apache.org/licenses/LICENSE-2.0
8406 15930 //
8407 15931 // Unless required by applicable law or agreed to in writing, software
8408 15932 // distributed under the License is distributed on an "AS IS" BASIS,
8409 15933 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8410 15934 // See the License for the specific language governing permissions and
8411 15935 // limitations under the License.
8412 15936
8413 15937 angular.module('appenlight.components.indexDashboardView', [])
8414 15938 .component('indexDashboardView', {
8415 15939 templateUrl: 'components/views/index-dashboard/index-dashboard.html',
8416 15940 controller: IndexDashboardController
8417 15941 });
8418 15942
8419 15943 IndexDashboardController.$inject = ['$rootScope', '$scope', '$location','$cookies', '$interval', 'stateHolder', 'applicationsPropertyResource', 'AeConfig'];
8420 15944
8421 15945 function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) {
8422 15946 var vm = this;
8423 15947 vm.$onInit = function () {
8424 15948 stateHolder.section = 'dashboard';
8425 15949 vm.timeOptions = {};
8426 15950 var allowed = ['1h', '4h', '12h', '24h', '1w', '2w', '1M'];
8427 15951 _.each(allowed, function (key) {
8428 15952 if (allowed.indexOf(key) !== -1) {
8429 15953 vm.timeOptions[key] = AeConfig.timeOptions[key];
8430 15954 }
8431 15955 });
8432 15956 vm.stateHolder = stateHolder;
8433 15957 vm.urls = AeConfig.urls;
8434 15958 vm.applications = stateHolder.AeUser.applications_map;
8435 15959 vm.show_dashboard = false;
8436 15960 vm.resource = null;
8437 15961 vm.graphType = {selected: null};
8438 15962 vm.timeSpan = vm.timeOptions['1h'];
8439 15963 vm.trendingReports = [];
8440 15964 vm.exceptions = 0;
8441 15965 vm.satisfyingRequests = 0;
8442 15966 vm.toleratedRequests = 0;
8443 15967 vm.frustratingRequests = 0;
8444 15968 vm.uptimeStats = 0;
8445 15969 vm.apdexStats = [];
8446 15970 vm.seriesRequestsData = [];
8447 15971 vm.seriesMetricsData = [];
8448 15972 vm.seriesSlowData = [];
8449 15973 vm.slowCalls = [];
8450 15974 vm.slowURIS = [];
8451 15975
8452 15976 vm.reportChartConfig = {
8453 15977 data: {
8454 15978 json: [],
8455 15979 xFormat: '%Y-%m-%dT%H:%M:%S'
8456 15980 },
8457 15981 color: {
8458 15982 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8459 15983 },
8460 15984 axis: {
8461 15985 x: {
8462 15986 type: 'timeseries',
8463 15987 tick: {
8464 15988 culling: {
8465 15989 max: 6 // the number of tick texts will be adjusted to less than this value
8466 15990 },
8467 15991 format: '%Y-%m-%d %H:%M'
8468 15992 }
8469 15993 },
8470 15994 y: {
8471 15995 tick: {
8472 15996 count: 5,
8473 15997 format: d3.format('.2s')
8474 15998 }
8475 15999 }
8476 16000 },
8477 16001 subchart: {
8478 16002 show: true,
8479 16003 size: {
8480 16004 height: 20
8481 16005 }
8482 16006 },
8483 16007 size: {
8484 16008 height: 250
8485 16009 },
8486 16010 zoom: {
8487 16011 rescale: true
8488 16012 },
8489 16013 grid: {
8490 16014 x: {
8491 16015 show: true
8492 16016 },
8493 16017 y: {
8494 16018 show: true
8495 16019 }
8496 16020 },
8497 16021 tooltip: {
8498 16022 format: {
8499 16023 title: function (d) {
8500 16024 return '' + d;
8501 16025 },
8502 16026 value: function (v) {
8503 16027 return v
8504 16028 }
8505 16029 }
8506 16030 }
8507 16031 };
8508 16032 vm.reportChartData = {};
8509 16033
8510 16034 vm.reportSlowChartConfig = {
8511 16035 data: {
8512 16036 json: [],
8513 16037 xFormat: '%Y-%m-%dT%H:%M:%S'
8514 16038 },
8515 16039 color: {
8516 16040 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
8517 16041 },
8518 16042 axis: {
8519 16043 x: {
8520 16044 type: 'timeseries',
8521 16045 tick: {
8522 16046 culling: {
8523 16047 max: 6 // the number of tick texts will be adjusted to less than this value
8524 16048 },
8525 16049 format: '%Y-%m-%d %H:%M'
8526 16050 }
8527 16051 },
8528 16052 y: {
8529 16053 tick: {
8530 16054 count: 5,
8531 16055 format: d3.format('.2s')
8532 16056 }
8533 16057 }
8534 16058 },
8535 16059 subchart: {
8536 16060 show: true,
8537 16061 size: {
8538 16062 height: 20
8539 16063 }
8540 16064 },
8541 16065 size: {
8542 16066 height: 250
8543 16067 },
8544 16068 zoom: {
8545 16069 rescale: true
8546 16070 },
8547 16071 grid: {
8548 16072 x: {
8549 16073 show: true
8550 16074 },
8551 16075 y: {
8552 16076 show: true
8553 16077 }
8554 16078 },
8555 16079 tooltip: {
8556 16080 format: {
8557 16081 title: function (d) {
8558 16082 return '' + d;
8559 16083 },
8560 16084 value: function (v) {
8561 16085 return v
8562 16086 }
8563 16087 }
8564 16088 }
8565 16089 };
8566 16090 vm.reportSlowChartData = {};
8567 16091
8568 16092 vm.metricsChartConfig = {
8569 16093 data: {
8570 16094 json: [],
8571 16095 xFormat: '%Y-%m-%dT%H:%M:%S',
8572 16096 keys: {
8573 16097 x: 'x',
8574 16098 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
8575 16099 },
8576 16100 names: {
8577 16101 main: 'View/Application logic',
8578 16102 sql: 'Relational database queries',
8579 16103 nosql: 'NoSql datastore calls',
8580 16104 tmpl: 'Template rendering',
8581 16105 custom: 'Custom timed calls',
8582 16106 remote: 'Requests to remote resources'
8583 16107 },
8584 16108 type: 'area',
8585 16109 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
8586 16110 order: null
8587 16111 },
8588 16112 color: {
8589 16113 pattern: ['#6baed6', '#c7e9c0', '#fd8d3c', '#d6616b', '#ffcc00', '#c6dbef']
8590 16114 },
8591 16115 axis: {
8592 16116 x: {
8593 16117 type: 'timeseries',
8594 16118 tick: {
8595 16119 culling: {
8596 16120 max: 6 // the number of tick texts will be adjusted to less than this value
8597 16121 },
8598 16122 format: '%Y-%m-%d %H:%M'
8599 16123 }
8600 16124 },
8601 16125 y: {
8602 16126 tick: {
8603 16127 count: 5,
8604 16128 format: d3.format('.2f')
8605 16129 }
8606 16130 }
8607 16131 },
8608 16132 point: {
8609 16133 show: false
8610 16134 },
8611 16135 subchart: {
8612 16136 show: true,
8613 16137 size: {
8614 16138 height: 20
8615 16139 }
8616 16140 },
8617 16141 size: {
8618 16142 height: 350
8619 16143 },
8620 16144 zoom: {
8621 16145 rescale: true
8622 16146 },
8623 16147 grid: {
8624 16148 x: {
8625 16149 show: true
8626 16150 },
8627 16151 y: {
8628 16152 show: true
8629 16153 }
8630 16154 },
8631 16155 tooltip: {
8632 16156 format: {
8633 16157 title: function (d) {
8634 16158 return '' + d;
8635 16159 },
8636 16160 value: function (v) {
8637 16161 return v
8638 16162 }
8639 16163 }
8640 16164 }
8641 16165 };
8642 16166 vm.metricsChartData = {};
8643 16167
8644 16168 vm.responseChartConfig = {
8645 16169 data: {
8646 16170 json: [],
8647 16171 xFormat: '%Y-%m-%dT%H:%M:%S'
8648 16172 },
8649 16173 color: {
8650 16174 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
8651 16175 },
8652 16176 axis: {
8653 16177 x: {
8654 16178 type: 'timeseries',
8655 16179 tick: {
8656 16180 culling: {
8657 16181 max: 6 // the number of tick texts will be adjusted to less than this value
8658 16182 },
8659 16183 format: '%Y-%m-%d %H:%M'
8660 16184 }
8661 16185 },
8662 16186 y: {
8663 16187 tick: {
8664 16188 count: 5,
8665 16189 format: d3.format('.2f')
8666 16190 }
8667 16191 }
8668 16192 },
8669 16193 point: {
8670 16194 show: false
8671 16195 },
8672 16196 subchart: {
8673 16197 show: true,
8674 16198 size: {
8675 16199 height: 20
8676 16200 }
8677 16201 },
8678 16202 size: {
8679 16203 height: 350
8680 16204 },
8681 16205 zoom: {
8682 16206 rescale: true
8683 16207 },
8684 16208 grid: {
8685 16209 x: {
8686 16210 show: true
8687 16211 },
8688 16212 y: {
8689 16213 show: true
8690 16214 }
8691 16215 },
8692 16216 tooltip: {
8693 16217 format: {
8694 16218 title: function (d) {
8695 16219 return '' + d;
8696 16220 },
8697 16221 value: function (v) {
8698 16222 return v
8699 16223 }
8700 16224 }
8701 16225 }
8702 16226 };
8703 16227 vm.responseChartData = {};
8704 16228
8705 16229 vm.requestsChartConfig = {
8706 16230 data: {
8707 16231 json: [],
8708 16232 xFormat: '%Y-%m-%dT%H:%M:%S'
8709 16233 },
8710 16234 color: {
8711 16235 pattern: ['#d6616b', '#6baed6', '#fd8d3c']
8712 16236 },
8713 16237 axis: {
8714 16238 x: {
8715 16239 type: 'timeseries',
8716 16240 tick: {
8717 16241 culling: {
8718 16242 max: 6 // the number of tick texts will be adjusted to less than this value
8719 16243 },
8720 16244 format: '%Y-%m-%d %H:%M'
8721 16245 }
8722 16246 },
8723 16247 y: {
8724 16248 tick: {
8725 16249 count: 5,
8726 16250 format: d3.format('.2f')
8727 16251 }
8728 16252 }
8729 16253 },
8730 16254 point: {
8731 16255 show: false
8732 16256 },
8733 16257 subchart: {
8734 16258 show: true,
8735 16259 size: {
8736 16260 height: 20
8737 16261 }
8738 16262 },
8739 16263 size: {
8740 16264 height: 350
8741 16265 },
8742 16266 zoom: {
8743 16267 rescale: true
8744 16268 },
8745 16269 grid: {
8746 16270 x: {
8747 16271 show: true
8748 16272 },
8749 16273 y: {
8750 16274 show: true
8751 16275 }
8752 16276 },
8753 16277 tooltip: {
8754 16278 format: {
8755 16279 title: function (d) {
8756 16280 return '' + d;
8757 16281 },
8758 16282 value: function (v) {
8759 16283 return v
8760 16284 }
8761 16285 }
8762 16286 }
8763 16287 };
8764 16288 vm.requestsChartData = {};
8765 16289
8766 16290 vm.loading = {
8767 16291 'apdex': true,
8768 16292 'reports': true,
8769 16293 'graphs': true,
8770 16294 'slowCalls': true,
8771 16295 'slowURIS': true,
8772 16296 'requestsBreakdown': true,
8773 16297 'series': true
8774 16298 };
8775 16299 vm.stream = {paused: false, filtered: false, messages: [], reports: []};
8776 16300
8777 16301 vm.intervalId = $interval(function () {
8778 16302 if (_.contains(['30m', "1h"], vm.timeSpan.key)) {
8779 16303 // don't do anything if window is unfocused
8780 16304 if(document.hidden === true){
8781 16305 return ;
8782 16306 }
8783 16307 vm.refreshData();
8784 16308 }
8785 16309 }, 60000);
8786 16310
8787 16311 if (stateHolder.AeUser.applications.length){
8788 16312 vm.show_dashboard = true;
8789 16313 vm.determineStartState();
8790 16314 }
8791 16315
8792 16316 }
8793 16317 $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){
8794 16318 var ws_report = message.message.report;
8795 16319 if (ws_report.http_status != 500) {
8796 16320 return
8797 16321 }
8798 16322 if (vm.stream.paused == true) {
8799 16323 return
8800 16324 }
8801 16325 if (vm.stream.filtered && ws_report.resource_id != vm.resource) {
8802 16326 return
8803 16327 }
8804 16328 var should_insert = true;
8805 16329 _.each(vm.stream.reports, function (report) {
8806 16330 if (report.report_id == ws_report.report_id) {
8807 16331 report.occurences = ws_report.occurences;
8808 16332 should_insert = false;
8809 16333 }
8810 16334 });
8811 16335 if (should_insert) {
8812 16336 if (vm.stream.reports.length > 7) {
8813 16337 vm.stream.reports.pop();
8814 16338 }
8815 16339 vm.stream.reports.unshift(ws_report);
8816 16340 }
8817 16341 });
8818 16342
8819 16343 vm.determineStartState = function () {
8820 16344 if (stateHolder.AeUser.applications.length) {
8821 16345 vm.resource = Number($location.search().resource);
8822 16346
8823 16347 if (!vm.resource){
8824 16348 var cookieResource = $cookies.getObject('resource');
8825 16349
8826 16350
8827 16351 if (cookieResource) {
8828 16352 vm.resource = cookieResource;
8829 16353 }
8830 16354 else{
8831 16355 vm.resource = stateHolder.AeUser.applications[0].resource_id;
8832 16356 }
8833 16357 }
8834 16358 }
8835 16359
8836 16360 var timespan = $location.search().timespan;
8837 16361
8838 16362 if(_.has(vm.timeOptions, timespan)){
8839 16363 vm.timeSpan = vm.timeOptions[timespan];
8840 16364 }
8841 16365 else{
8842 16366 vm.timeSpan = vm.timeOptions['1h'];
8843 16367 }
8844 16368
8845 16369 var graphType = $location.search().graphtype;
8846 16370 if(!graphType){
8847 16371 vm.graphType = {selected: 'metrics_graphs'};
8848 16372 }
8849 16373 else{
8850 16374 vm.graphType = {selected: graphType};
8851 16375 }
8852 16376 vm.updateSearchParams();
8853 16377 };
8854 16378
8855 16379 vm.updateSearchParams = function () {
8856 16380 $location.search('resource', vm.resource);
8857 16381 $location.search('timespan', vm.timeSpan.key);
8858 16382 $location.search('graphtype', vm.graphType.selected);
8859 16383 stateHolder.resource = vm.resource;
8860 16384
8861 16385 if (vm.resource){
8862 16386 $cookies.putObject('resource', vm.resource,
8863 16387 {expires:new Date(3000, 1, 1)});
8864 16388 }
8865 16389 vm.refreshData();
8866 16390 };
8867 16391
8868 16392 vm.refreshData = function () {
8869 16393 vm.fetchApdexStats();
8870 16394 vm.fetchTrendingReports();
8871 16395 vm.fetchMetrics();
8872 16396 vm.fetchRequestsBreakdown();
8873 16397 vm.fetchSlowCalls();
8874 16398 };
8875 16399
8876 16400 vm.changedTimeSpan = function(){
8877 16401 vm.startDateFilter = timeSpanToStartDate(vm.timeSpan.key);
8878 16402 vm.refreshData();
8879 16403 };
8880 16404
8881 16405 vm.fetchApdexStats = function () {
8882 16406 vm.loading.apdex = true;
8883 16407 vm.apdexStats = applicationsPropertyResource.query({
8884 16408 'key': 'apdex_stats',
8885 16409 'resourceId': vm.resource,
8886 16410 "start_date": timeSpanToStartDate(vm.timeSpan.key)
8887 16411 },
8888 16412 function (data) {
8889 16413 vm.loading.apdex = false;
8890 16414
8891 16415 vm.exceptions = _.reduce(data, function (memo, row) {
8892 16416 return memo + row.errors;
8893 16417 }, 0);
8894 16418 vm.satisfyingRequests = _.reduce(data, function (memo, row) {
8895 16419 return memo + row.satisfying_requests;
8896 16420 }, 0);
8897 16421 vm.toleratedRequests = _.reduce(data, function (memo, row) {
8898 16422 return memo + row.tolerated_requests;
8899 16423 }, 0);
8900 16424 vm.frustratingRequests = _.reduce(data, function (memo, row) {
8901 16425 return memo + row.frustrating_requests;
8902 16426 }, 0);
8903 16427 if (data.length) {
8904 16428 vm.uptimeStats = data[0].uptime;
8905 16429 }
8906 16430
8907 16431 },
8908 16432 function () {
8909 16433 vm.loading.apdex = false;
8910 16434 }
8911 16435 );
8912 16436 }
8913 16437
8914 16438 vm.fetchMetrics = function () {
8915 16439 vm.loading.series = true;
8916 16440 applicationsPropertyResource.query({
8917 16441 'resourceId': vm.resource,
8918 16442 'key': vm.graphType.selected,
8919 16443 "start_date": timeSpanToStartDate(vm.timeSpan.key)
8920 16444 }, function (data) {
8921 16445 if (vm.graphType.selected == 'metrics_graphs') {
8922 16446 vm.metricsChartData = {
8923 16447 json: data,
8924 16448 xFormat: '%Y-%m-%dT%H:%M:%S',
8925 16449 keys: {
8926 16450 x: 'x',
8927 16451 value: ["main", "sql", "nosql", "tmpl", "remote", "custom"]
8928 16452 },
8929 16453 names: {
8930 16454 main: 'View/Application logic',
8931 16455 sql: 'Relational database queries',
8932 16456 nosql: 'NoSql datastore calls',
8933 16457 tmpl: 'Template rendering',
8934 16458 custom: 'Custom timed calls',
8935 16459 remote: 'Requests to remote resources'
8936 16460 },
8937 16461 type: 'area',
8938 16462 groups: [["main", "sql", "nosql", "remote", "custom", "tmpl"]],
8939 16463 order: null
8940 16464 };
8941 16465 }
8942 16466 else if (vm.graphType.selected == 'report_graphs') {
8943 16467 vm.reportChartData = {
8944 16468 json: data,
8945 16469 xFormat: '%Y-%m-%dT%H:%M:%S',
8946 16470 keys: {
8947 16471 x: 'x',
8948 16472 value: ["not_found", "report"]
8949 16473 },
8950 16474 names: {
8951 16475 report: 'Errors',
8952 16476 not_found: '404\'s requests'
8953 16477 },
8954 16478 type: 'bar'
8955 16479 };
8956 16480 }
8957 16481 else if (vm.graphType.selected == 'slow_report_graphs') {
8958 16482 vm.reportSlowChartData = {
8959 16483 json: data,
8960 16484 xFormat: '%Y-%m-%dT%H:%M:%S',
8961 16485 keys: {
8962 16486 x: 'x',
8963 16487 value: ["slow_report"]
8964 16488 },
8965 16489 names: {
8966 16490 slow_report: 'Slow reports'
8967 16491 },
8968 16492 type: 'bar'
8969 16493 };
8970 16494 }
8971 16495 else if (vm.graphType.selected == 'response_graphs') {
8972 16496 vm.responseChartData = {
8973 16497 json: data,
8974 16498 xFormat: '%Y-%m-%dT%H:%M:%S',
8975 16499 keys: {
8976 16500 x: 'x',
8977 16501 value: ["today", "days_ago_2", "days_ago_7"]
8978 16502 },
8979 16503 names: {
8980 16504 today: 'Today',
8981 16505 "days_ago_2": '2 days ago',
8982 16506 "days_ago_7": '7 days ago'
8983 16507 }
8984 16508 };
8985 16509 }
8986 16510 else if (vm.graphType.selected == 'requests_graphs') {
8987 16511 vm.requestsChartData = {
8988 16512 json: data,
8989 16513 xFormat: '%Y-%m-%dT%H:%M:%S',
8990 16514 keys: {
8991 16515 x: 'x',
8992 16516 value: ["requests"]
8993 16517 },
8994 16518 names: {
8995 16519 requests: 'Requests/s'
8996 16520 }
8997 16521 };
8998 16522 }
8999 16523 vm.loading.series = false;
9000 16524 }, function(){
9001 16525 vm.loading.series = false;
9002 16526 });
9003 16527 }
9004 16528
9005 16529 vm.fetchSlowCalls = function () {
9006 16530 vm.loading.slowCalls = true;
9007 16531 applicationsPropertyResource.query({
9008 16532 'resourceId': vm.resource,
9009 16533 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9010 16534 'key': 'slow_calls'
9011 16535 }, function (data) {
9012 16536 vm.slowCalls = data;
9013 16537 vm.loading.slowCalls = false;
9014 16538 }, function () {
9015 16539 vm.loading.slowCalls = false;
9016 16540 });
9017 16541 }
9018 16542
9019 16543 vm.fetchRequestsBreakdown = function () {
9020 16544 vm.loading.requestsBreakdown = true;
9021 16545 applicationsPropertyResource.query({
9022 16546 'resourceId': vm.resource,
9023 16547 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9024 16548 'key': 'requests_breakdown'
9025 16549 }, function (data) {
9026 16550 vm.requestsBreakdown = data;
9027 16551 vm.loading.requestsBreakdown = false;
9028 16552 }, function () {
9029 16553 vm.loading.requestsBreakdown = false;
9030 16554 });
9031 16555 }
9032 16556
9033 16557 vm.fetchTrendingReports = function () {
9034 16558
9035 16559 if (vm.graphType.selected == 'slow_report_graphs') {
9036 16560 var report_type = 'slow';
9037 16561 }
9038 16562 else {
9039 16563 var report_type = 'error';
9040 16564 }
9041 16565
9042 16566 vm.loading.reports = true;
9043 16567 vm.trendingReports = applicationsPropertyResource.query({
9044 16568 'key': 'trending_reports',
9045 16569 'resourceId': vm.resource,
9046 16570 "start_date": timeSpanToStartDate(vm.timeSpan.key),
9047 16571 "report_type": report_type
9048 16572 },
9049 16573 function () {
9050 16574 vm.loading.reports = false;
9051 16575 },
9052 16576 function () {
9053 16577 vm.loading.reports = false;
9054 16578 }
9055 16579 );
9056 16580 };
9057 16581
9058 16582 $scope.$on('$destroy',function(){
9059 16583 $interval.cancel(vm.intervalId);
9060 16584 });
9061 16585 }
9062 16586
9063 16587 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9064 16588 //
9065 16589 // Licensed under the Apache License, Version 2.0 (the "License");
9066 16590 // you may not use this file except in compliance with the License.
9067 16591 // You may obtain a copy of the License at
9068 16592 //
9069 16593 // http://www.apache.org/licenses/LICENSE-2.0
9070 16594 //
9071 16595 // Unless required by applicable law or agreed to in writing, software
9072 16596 // distributed under the License is distributed on an "AS IS" BASIS,
9073 16597 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9074 16598 // See the License for the specific language governing permissions and
9075 16599 // limitations under the License.
9076 16600
9077 16601
9078 16602 ApplicationsIntegrationsEditViewController.$inject = ['$state', 'integrationResource'];
9079 16603
9080 16604 function ApplicationsIntegrationsEditViewController($state, integrationResource) {
9081 16605
9082 16606 var vm = this;
9083 16607 vm.$onInit = function () {
9084 16608 vm.$state = $state;
9085 16609 vm.loading = {integration: true};
9086 16610 vm.config = integrationResource.get(
9087 16611 {
9088 16612 integration: $state.params.integration,
9089 16613 action: 'setup',
9090 16614 resourceId: $state.params.resourceId
9091 16615 }, function (data) {
9092 16616 vm.loading.integration = false;
9093 16617 });
9094 16618 }
9095 16619 vm.configureIntegration = function () {
9096 16620 console.info('configureIntegration');
9097 16621 vm.loading.integration = true;
9098 16622 integrationResource.save(
9099 16623 {
9100 16624 integration: $state.params.integration,
9101 16625 action: 'setup',
9102 16626 resourceId: $state.params.resourceId
9103 16627 }, vm.config, function (data) {
9104 16628 vm.loading.integration = false;
9105 16629 setServerValidation(vm.integrationForm);
9106 16630 }, function (response) {
9107 16631 if (response.status == 422) {
9108 16632 setServerValidation(vm.integrationForm, response.data);
9109 16633 }
9110 16634 vm.loading.integration = false;
9111 16635 });
9112 16636 };
9113 16637
9114 16638 vm.removeIntegration = function () {
9115 16639 console.info('removeIntegration');
9116 16640 integrationResource.remove({
9117 16641 integration: $state.params.integration,
9118 16642 resourceId: $state.params.resourceId,
9119 16643 action: 'delete'
9120 16644 },
9121 16645 function () {
9122 16646 $state.go('applications.integrations',
9123 16647 {resourceId: $state.params.resourceId});
9124 16648 }
9125 16649 );
9126 16650 }
9127 16651
9128 16652 vm.testIntegration = function (to_test) {
9129 16653 console.info('testIntegration', to_test);
9130 16654 vm.loading.integration = true;
9131 16655 integrationResource.save(
9132 16656 {
9133 16657 integration: $state.params.integration,
9134 16658 action: 'test_' + to_test,
9135 16659 resourceId: $state.params.resourceId
9136 16660 }, vm.config, function (data) {
9137 16661 vm.loading.integration = false;
9138 16662 }, function (response) {
9139 16663 vm.loading.integration = false;
9140 16664 });
9141 16665 }
9142 16666
9143 16667
9144 16668 }
9145 16669
9146 16670 ;angular.module('appenlight.components.bitbucketIntegrationConfigView', [])
9147 16671 .component('bitbucketIntegrationConfigView', {
9148 16672 templateUrl: 'components/views/integrations/bitbucket-integration-config-view/bitbucket-integration-config-view.html',
9149 16673 controller: ApplicationsIntegrationsEditViewController
9150 16674 });
9151 16675
9152 16676 ;angular.module('appenlight.components.campfireIntegrationConfigView', [])
9153 16677 .component('campfireIntegrationConfigView', {
9154 16678 templateUrl: 'components/views/integrations/campfire-integration-config-view/campfire-integration-config-view.html',
9155 16679 controller: ApplicationsIntegrationsEditViewController
9156 16680 });
9157 16681
9158 16682 ;angular.module('appenlight.components.flowdockIntegrationConfigView', [])
9159 16683 .component('flowdockIntegrationConfigView', {
9160 16684 templateUrl: 'components/views/integrations/flowdock-integration-config-view/flowdock-integration-config-view.html',
9161 16685 controller: ApplicationsIntegrationsEditViewController
9162 16686 });
9163 16687
9164 16688 ;angular.module('appenlight.components.githubIntegrationConfigView', [])
9165 16689 .component('githubIntegrationConfigView', {
9166 16690 templateUrl: 'components/views/integrations/github-integration-config-view/github-integration-config-view.html',
9167 16691 controller: ApplicationsIntegrationsEditViewController
9168 16692 });
9169 16693
9170 16694 ;angular.module('appenlight.components.hipchatIntegrationConfigView', [])
9171 16695 .component('hipchatIntegrationConfigView', {
9172 16696 templateUrl: 'components/views/integrations/hipchat-integration-config-view/hipchat-integration-config-view.html',
9173 16697 controller: ApplicationsIntegrationsEditViewController
9174 16698 });
9175 16699
9176 16700 ;angular.module('appenlight.components.jiraIntegrationConfigView', [])
9177 16701 .component('jiraIntegrationConfigView', {
9178 16702 templateUrl: 'components/views/integrations/jira-integration-config-view/jira-integration-config-view.html',
9179 16703 controller: ApplicationsIntegrationsEditViewController
9180 16704 });
9181 16705
9182 16706 ;angular.module('appenlight.components.slackIntegrationConfigView', [])
9183 16707 .component('slackIntegrationConfigView', {
9184 16708 templateUrl: 'components/views/integrations/slack-integration-config-view/slack-integration-config-view.html',
9185 16709 controller: ApplicationsIntegrationsEditViewController
9186 16710 });
9187 16711
9188 16712 ;angular.module('appenlight.components.webhooksIntegrationConfigView', [])
9189 16713 .component('webhooksIntegrationConfigView', {
9190 16714 templateUrl: 'components/views/integrations/webhooks-integration-config-view/webhooks-integration-config-view.html',
9191 16715 controller: ApplicationsIntegrationsEditViewController
9192 16716 });
9193 16717
9194 16718 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9195 16719 //
9196 16720 // Licensed under the Apache License, Version 2.0 (the "License");
9197 16721 // you may not use this file except in compliance with the License.
9198 16722 // You may obtain a copy of the License at
9199 16723 //
9200 16724 // http://www.apache.org/licenses/LICENSE-2.0
9201 16725 //
9202 16726 // Unless required by applicable law or agreed to in writing, software
9203 16727 // distributed under the License is distributed on an "AS IS" BASIS,
9204 16728 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9205 16729 // See the License for the specific language governing permissions and
9206 16730 // limitations under the License.
9207 16731
9208 16732 angular.module('appenlight.components.logsBrowserView', [])
9209 16733 .component('logsBrowserView', {
9210 16734 templateUrl: 'components/views/logs-browser/logs-browser.html',
9211 16735 controller: LogsBrowserController
9212 16736 });
9213 16737
9214 16738 LogsBrowserController.$inject = ['$location', 'stateHolder', 'typeAheadTagHelper', 'logsNoIdResource', 'sectionViewResource'];
9215 16739
9216 16740 function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
9217 16741 var vm = this;
9218 16742 vm.$onInit = function () {
9219 16743 vm.logEventsChartConfig = {
9220 16744 data: {
9221 16745 json: [],
9222 16746 xFormat: '%Y-%m-%dT%H:%M:%S'
9223 16747 },
9224 16748 color: {
9225 16749 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
9226 16750 },
9227 16751 axis: {
9228 16752 x: {
9229 16753 type: 'timeseries',
9230 16754 tick: {
9231 16755 format: '%Y-%m-%d'
9232 16756 }
9233 16757 },
9234 16758 y: {
9235 16759 tick: {
9236 16760 count: 5,
9237 16761 format: d3.format('.2s')
9238 16762 }
9239 16763 }
9240 16764 },
9241 16765 subchart: {
9242 16766 show: true,
9243 16767 size: {
9244 16768 height: 20
9245 16769 }
9246 16770 },
9247 16771 size: {
9248 16772 height: 250
9249 16773 },
9250 16774 zoom: {
9251 16775 rescale: true
9252 16776 },
9253 16777 grid: {
9254 16778 x: {
9255 16779 show: true
9256 16780 },
9257 16781 y: {
9258 16782 show: true
9259 16783 }
9260 16784 },
9261 16785 tooltip: {
9262 16786 format: {
9263 16787 title: function (d) {
9264 16788 return '' + d;
9265 16789 },
9266 16790 value: function (v) {
9267 16791 return v
9268 16792 }
9269 16793 }
9270 16794 }
9271 16795 };
9272 16796 vm.logEventsChartData = {};
9273 16797 stateHolder.section = 'logs';
9274 16798 vm.today = function () {
9275 16799 vm.pickerDate = new Date();
9276 16800 };
9277 16801 vm.today();
9278 16802
9279 16803 vm.applications = stateHolder.AeUser.applications_map;
9280 16804 vm.logsPage = [];
9281 16805 vm.itemCount = 0;
9282 16806 vm.itemsPerPage = 250;
9283 16807 vm.page = 1;
9284 16808 vm.$location = $location;
9285 16809 vm.isLoading = {
9286 16810 logs: true,
9287 16811 series: true
9288 16812 };
9289 16813 vm.filterTypeAheadOptions = [
9290 16814 {
9291 16815 type: 'message',
9292 16816 text: 'message:',
9293 16817 'description': 'Full-text search in your logs',
9294 16818 tag: 'Message',
9295 16819 example: 'message:text-im-looking-for'
9296 16820 },
9297 16821 {
9298 16822 type: 'namespace',
9299 16823 text: 'namespace:',
9300 16824 'description': 'Query logs from specific namespace',
9301 16825 tag: 'Namespace',
9302 16826 example: "namespace:module.foo"
9303 16827 },
9304 16828 {
9305 16829 type: 'resource',
9306 16830 text: 'resource:',
9307 16831 'description': 'Restrict resultset to application',
9308 16832 tag: 'Application',
9309 16833 example: "resource:ID"
9310 16834 },
9311 16835 {
9312 16836 type: 'request_id',
9313 16837 text: 'request_id:',
9314 16838 'description': 'Show logs with specific request id',
9315 16839 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9316 16840 tag: 'Request ID'
9317 16841 },
9318 16842 {
9319 16843 type: 'level',
9320 16844 text: 'level:',
9321 16845 'description': 'Show entries with specific log level',
9322 16846 example: 'level:warning',
9323 16847 tag: 'Level'
9324 16848 },
9325 16849 {
9326 16850 type: 'server_name',
9327 16851 text: 'server_name:',
9328 16852 'description': 'Show entries tagged with this key/value pair',
9329 16853 example: 'server_name:hostname',
9330 16854 tag: 'Tag'
9331 16855 },
9332 16856 {
9333 16857 type: 'start_date',
9334 16858 text: 'start_date:',
9335 16859 'description': 'Show results newer than this date (press TAB for dropdown)',
9336 16860 example: 'start_date:2014-08-15T13:00',
9337 16861 tag: 'Start Date'
9338 16862 },
9339 16863 {
9340 16864 type: 'end_date',
9341 16865 text: 'end_date:',
9342 16866 'description': 'Show results older than this date (press TAB for dropdown)',
9343 16867 example: 'start_date:2014-08-15T23:59',
9344 16868 tag: 'End Date'
9345 16869 },
9346 16870 {type: 'level', value: 'debug', text: 'level:debug'},
9347 16871 {type: 'level', value: 'info', text: 'level:info'},
9348 16872 {type: 'level', value: 'warning', text: 'level:warning'},
9349 16873 {type: 'level', value: 'critical', text: 'level:critical'}
9350 16874 ];
9351 16875 vm.filterTypeAhead = null;
9352 16876 vm.showDatePicker = false;
9353 16877 vm.manualOpen = false;
9354 16878 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9355 16879
9356 16880 _.each(vm.applications, function (item) {
9357 16881 vm.filterTypeAheadOptions.push({
9358 16882 type: 'resource',
9359 16883 text: 'resource:' + item.resource_id + ':' + item.resource_name,
9360 16884 example: 'resource:' + item.resource_id,
9361 16885 'tag': item.resource_name,
9362 16886 'description': 'Restrict resultset to this application'
9363 16887 });
9364 16888 });
9365 16889 console.info('page load');
9366 16890 vm.refresh();
9367 16891 }
9368 16892 vm.removeSearchTag = function (tag) {
9369 16893 $location.search(tag.type, null);
9370 16894 vm.refresh();
9371 16895 };
9372 16896 vm.addSearchTag = function (tag) {
9373 16897 $location.search(tag.type, tag.value);
9374 16898 vm.refresh();
9375 16899 };
9376 16900
9377 16901 vm.paginationChange = function(){
9378 16902 $location.search('page', vm.page);
9379 16903 vm.refresh();
9380 16904 };
9381 16905
9382 16906 vm.typeAheadTag = function (event) {
9383 16907 var text = vm.filterTypeAhead;
9384 16908 if (_.isObject(vm.filterTypeAhead)) {
9385 16909 text = vm.filterTypeAhead.text;
9386 16910 };
9387 16911 if (!vm.filterTypeAhead) {
9388 16912 return
9389 16913 }
9390 16914 var parsed = text.split(':');
9391 16915 var tag = {'type': null, 'value': null};
9392 16916 // app tags have : twice
9393 16917 if (parsed.length > 2 && parsed[0] == 'resource') {
9394 16918 tag.type = 'resource';
9395 16919 tag.value = parsed[1];
9396 16920 }
9397 16921 // normal tag:value
9398 16922 else if (parsed.length > 1) {
9399 16923 tag.type = parsed[0];
9400 16924 tag.value = parsed.slice(1).join(':');
9401 16925 }
9402 16926 else {
9403 16927 tag.type = 'message';
9404 16928 tag.value = parsed.join(':');
9405 16929 }
9406 16930
9407 16931 // set datepicker hour based on type of field
9408 16932 if ('start_date:' == text) {
9409 16933 vm.showDatePicker = true;
9410 16934 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
9411 16935 }
9412 16936 else if ('end_date:' == text) {
9413 16937 vm.showDatePicker = true;
9414 16938 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
9415 16939 }
9416 16940
9417 16941 if (event.keyCode != 13 || !tag.type || !tag.value) {
9418 16942 return
9419 16943 }
9420 16944 vm.showDatePicker = false;
9421 16945 // aka we selected one of main options
9422 16946 vm.addSearchTag({type: tag.type, value: tag.value});
9423 16947 // clear typeahead
9424 16948 vm.filterTypeAhead = undefined;
9425 16949 };
9426 16950
9427 16951
9428 16952 vm.pickerDateChanged = function(){
9429 16953 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
9430 16954 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
9431 16955 }
9432 16956 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
9433 16957 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
9434 16958 }
9435 16959 vm.showDatePicker = false;
9436 16960 };
9437 16961
9438 16962 vm.fetchLogs = function (searchParams) {
9439 16963 vm.isLoading.logs = true;
9440 16964 logsNoIdResource.query(searchParams, function (data, getResponseHeaders) {
9441 16965 vm.isLoading.logs = false;
9442 16966 var headers = getResponseHeaders();
9443 16967 vm.logsPage = data;
9444 16968 vm.itemCount = headers['x-total-count'];
9445 16969 vm.itemsPerPage = headers['x-items-per-page'];
9446 16970 }, function () {
9447 16971 vm.isLoading.logs = false;
9448 16972 });
9449 16973 };
9450 16974
9451 16975 vm.fetchSeriesData = function (searchParams) {
9452 16976 searchParams['section'] = 'logs_section';
9453 16977 searchParams['view'] = 'fetch_series';
9454 16978 vm.isLoading.series = true;
9455 16979 sectionViewResource.query(searchParams, function (data) {
9456 16980
9457 16981 vm.logEventsChartData = {
9458 16982 json: data,
9459 16983 xFormat: '%Y-%m-%dT%H:%M:%S',
9460 16984 keys: {
9461 16985 x: 'x',
9462 16986 value: ["logs"]
9463 16987 },
9464 16988 names: {
9465 16989 logs: 'Log events'
9466 16990 },
9467 16991 type: 'bar'
9468 16992 };
9469 16993 vm.isLoading.series = false;
9470 16994 }, function () {
9471 16995 vm.isLoading.series = false;
9472 16996 });
9473 16997 };
9474 16998
9475 16999 vm.filterId = function (log) {
9476 17000 $location.search('request_id', log.request_id);
9477 17001 vm.refresh();
9478 17002 };
9479 17003
9480 17004 vm.refresh = function(){
9481 17005 vm.searchParams = parseSearchToTags($location.search());
9482 17006 vm.page = Number(vm.searchParams.page) || 1;
9483 17007 var params = parseTagsToSearch(vm.searchParams);
9484 17008 vm.fetchLogs(params);
9485 17009 vm.fetchSeriesData(params);
9486 17010 };
9487 17011
9488 17012 }
9489 17013
9490 17014 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9491 17015 //
9492 17016 // Licensed under the Apache License, Version 2.0 (the "License");
9493 17017 // you may not use this file except in compliance with the License.
9494 17018 // You may obtain a copy of the License at
9495 17019 //
9496 17020 // http://www.apache.org/licenses/LICENSE-2.0
9497 17021 //
9498 17022 // Unless required by applicable law or agreed to in writing, software
9499 17023 // distributed under the License is distributed on an "AS IS" BASIS,
9500 17024 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9501 17025 // See the License for the specific language governing permissions and
9502 17026 // limitations under the License.
9503 17027
9504 17028 angular.module('appenlight.components.reportView', [])
9505 17029 .component('reportView', {
9506 17030 templateUrl: 'components/views/report-view/report-view.html',
9507 17031 controller: ReportViewController
9508 17032 });
9509 17033
9510 17034 ReportViewController.$inject = ['$window', '$location', '$state', '$uibModal',
9511 17035 '$cookies', 'reportGroupPropertyResource', 'reportGroupResource',
9512 17036 'logsNoIdResource', 'stateHolder'];
9513 17037
9514 17038 function ReportViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) {
9515 17039 var vm = this;
9516 17040 vm.$onInit = function () {
9517 17041 vm.window = $window;
9518 17042 vm.stateHolder = stateHolder;
9519 17043 vm.$state = $state;
9520 17044 vm.reportHistoryConfig = {
9521 17045 data: {
9522 17046 json: [],
9523 17047 xFormat: '%Y-%m-%dT%H:%M:%S'
9524 17048 },
9525 17049 color: {
9526 17050 pattern: ['#6baed6', '#e6550d', '#74c476', '#fdd0a2', '#8c564b']
9527 17051 },
9528 17052 axis: {
9529 17053 x: {
9530 17054 type: 'timeseries',
9531 17055 tick: {
9532 17056 format: '%Y-%m-%d'
9533 17057 }
9534 17058 },
9535 17059 y: {
9536 17060 tick: {
9537 17061 count: 5,
9538 17062 format: d3.format('.2s')
9539 17063 }
9540 17064 }
9541 17065 },
9542 17066 subchart: {
9543 17067 show: true,
9544 17068 size: {
9545 17069 height: 20
9546 17070 }
9547 17071 },
9548 17072 size: {
9549 17073 height: 250
9550 17074 },
9551 17075 zoom: {
9552 17076 rescale: true
9553 17077 },
9554 17078 grid: {
9555 17079 x: {
9556 17080 show: true
9557 17081 },
9558 17082 y: {
9559 17083 show: true
9560 17084 }
9561 17085 },
9562 17086 tooltip: {
9563 17087 format: {
9564 17088 title: function (d) {
9565 17089 return '' + d;
9566 17090 },
9567 17091 value: function (v) {
9568 17092 return v
9569 17093 }
9570 17094 }
9571 17095 }
9572 17096 };
9573 17097 vm.mentionedPeople = [];
9574 17098 vm.reportHistoryData = {};
9575 17099 vm.textTraceback = true;
9576 17100 vm.rawTraceback = '';
9577 17101 vm.traceback = '';
9578 17102 vm.reportType = 'report';
9579 17103 vm.report = null;
9580 17104 vm.showLong = false;
9581 17105 vm.reportLogs = null;
9582 17106 vm.requestStats = null;
9583 17107 vm.comment = null;
9584 17108 vm.is_loading = {
9585 17109 report: true,
9586 17110 logs: true,
9587 17111 history: true
9588 17112 };
9589 17113
9590 17114 vm.tabs = {
9591 17115 slow_calls:false,
9592 17116 request_details:false,
9593 17117 logs:false,
9594 17118 comments:false,
9595 17119 affected_users:false
9596 17120 };
9597 17121 if ($cookies.selectedReportTab) {
9598 17122 vm.tabs[$cookies.selectedReportTab] = true;
9599 17123 }
9600 17124 else{
9601 17125 $cookies.selectedReportTab = 'request_details';
9602 17126 vm.tabs.request_details = true;
9603 17127 }
9604 17128
9605 17129 // load report
9606 17130 vm.fetchReport();
9607 17131 }
9608 17132
9609 17133 vm.searchMentionedPeople = function(term){
9610 17134 //vm.mentionedPeople = [];
9611 17135 var term = term.toLowerCase();
9612 17136 reportGroupPropertyResource.get({
9613 17137 groupId: vm.report.group_id,
9614 17138 key: 'assigned_users'
9615 17139 }, null,
9616 17140 function (data) {
9617 17141 var users = [];
9618 17142 _.each(data.assigned, function(u){
9619 17143 users.push({label: u.user_name});
9620 17144 });
9621 17145 _.each(data.unassigned, function(u){
9622 17146 users.push({label: u.user_name});
9623 17147 });
9624 17148
9625 17149 var result = _.filter(users, function(u){
9626 17150 return u.label.toLowerCase().indexOf(term) !== -1;
9627 17151 });
9628 17152 vm.mentionedPeople = result;
9629 17153 });
9630 17154 };
9631 17155
9632 17156 vm.searchTag = function (tag, value) {
9633 17157
9634 17158 if (vm.report.report_type === 3) {
9635 17159 $location.url($state.href('report.list_slow'));
9636 17160 }
9637 17161 else {
9638 17162 $location.url($state.href('report.list'));
9639 17163 }
9640 17164 $location.search(tag, value);
9641 17165 };
9642 17166
9643 17167 vm.fetchLogs = function () {
9644 17168 if (!vm.report.request_id){
9645 17169 return
9646 17170 }
9647 17171 vm.is_loading.logs = true;
9648 17172 logsNoIdResource.query({request_id: vm.report.request_id},
9649 17173 function (data) {
9650 17174 vm.is_loading.logs = false;
9651 17175 vm.reportLogs = data;
9652 17176 }, function () {
9653 17177 vm.is_loading.logs = false;
9654 17178 });
9655 17179 };
9656 17180 vm.addComment = function () {
9657 17181 reportGroupPropertyResource.save({
9658 17182 groupId: vm.report.group_id,
9659 17183 key: 'comments'
9660 17184 }, {body: vm.comment},
9661 17185 function (data) {
9662 17186 vm.report.comments.push(data);
9663 17187 });
9664 17188 vm.comment = '';
9665 17189 };
9666 17190
9667 17191 vm.fetchReport = function () {
9668 17192
9669 17193 vm.is_loading.report = true;
9670 17194 reportGroupResource.get($state.params, function (data) {
9671 17195 vm.is_loading.report = false;
9672 17196 if (data.request) {
9673 17197 try {
9674 17198 var to_sort = _.pairs(data.request);
9675 17199 data.request = _.object(_.sortBy(to_sort, function (i) {
9676 17200 return i[0]
9677 17201 }));
9678 17202 }
9679 17203 catch (err) {
9680 17204 }
9681 17205 }
9682 17206 vm.report = data;
9683 17207 if (vm.report.req_stats) {
9684 17208 vm.requestStats = [];
9685 17209 _.each(_.pairs(vm.report.req_stats['percentages']), function (p) {
9686 17210 vm.requestStats.push({
9687 17211 name: p[0],
9688 17212 value: vm.report.req_stats[p[0]].toFixed(3),
9689 17213 percent: p[1],
9690 17214 calls: vm.report.req_stats[p[0] + '_calls']
9691 17215 })
9692 17216 });
9693 17217 }
9694 17218 vm.traceback = data.traceback;
9695 17219 _.each(vm.traceback, function (frame) {
9696 17220 if (frame.line) {
9697 17221 vm.rawTraceback += 'File ' + frame.file + ' line ' + frame.line + ' in ' + frame.fn + ": \r\n";
9698 17222 }
9699 17223 vm.rawTraceback += ' ' + frame.cline + "\r\n";
9700 17224 });
9701 17225
9702 17226 if (stateHolder.AeUser.id){
9703 17227 vm.fetchHistory();
9704 17228 }
9705 17229
9706 17230 vm.selectedTab($cookies.selectedReportTab);
9707 17231
9708 17232 }, function (response) {
9709 17233
9710 17234 if (response.status == 403) {
9711 17235 var uid = response.headers('x-appenlight-uid');
9712 17236 if (!uid) {
9713 17237 window.location = '/register?came_from=' + encodeURIComponent(window.location);
9714 17238 }
9715 17239 }
9716 17240 vm.is_loading.report = false;
9717 17241 });
9718 17242 };
9719 17243
9720 17244 vm.selectedTab = function(tab_name){
9721 17245 $cookies.selectedReportTab = tab_name;
9722 17246 if (tab_name == 'logs' && vm.reportLogs === null) {
9723 17247 vm.fetchLogs();
9724 17248 }
9725 17249 };
9726 17250
9727 17251 vm.markFixed = function () {
9728 17252 reportGroupResource.update({
9729 17253 groupId: vm.report.group_id
9730 17254 }, {fixed: !vm.report.group.fixed},
9731 17255 function (data) {
9732 17256 vm.report.group.fixed = data.fixed;
9733 17257 });
9734 17258 };
9735 17259
9736 17260 vm.markPublic = function () {
9737 17261 reportGroupResource.update({
9738 17262 groupId: vm.report.group_id
9739 17263 }, {public: !vm.report.group.public},
9740 17264 function (data) {
9741 17265 vm.report.group.public = data.public;
9742 17266 });
9743 17267 };
9744 17268
9745 17269 vm.delete = function () {
9746 17270 reportGroupResource.delete({'groupId': vm.report.group_id},
9747 17271 function (data) {
9748 17272 $state.go('report.list');
9749 17273 })
9750 17274 };
9751 17275
9752 17276 vm.assignUsersModal = function (index) {
9753 17277 vm.opts = {
9754 17278 backdrop: 'static',
9755 17279 templateUrl: 'AssignReportCtrl.html',
9756 17280 controller: 'AssignReportCtrl as ctrl',
9757 17281 resolve: {
9758 17282 report: function () {
9759 17283 return vm.report;
9760 17284 }
9761 17285 }
9762 17286 };
9763 17287 var modalInstance = $uibModal.open(vm.opts);
9764 17288 modalInstance.result.then(function (report) {
9765 17289
9766 17290 }, function () {
9767 17291 console.info('Modal dismissed at: ' + new Date());
9768 17292 });
9769 17293
9770 17294 };
9771 17295
9772 17296 vm.fetchHistory = function () {
9773 17297 reportGroupPropertyResource.query({
9774 17298 groupId: vm.report.group_id,
9775 17299 key: 'history'
9776 17300 }, function (data) {
9777 17301 vm.reportHistoryData = {
9778 17302 json: data,
9779 17303 keys: {
9780 17304 x: 'x',
9781 17305 value: ["reports"]
9782 17306 },
9783 17307 names: {
9784 17308 reports: 'Reports history'
9785 17309 },
9786 17310 type: 'bar'
9787 17311 };
9788 17312 vm.is_loading.history = false;
9789 17313 });
9790 17314 };
9791 17315
9792 17316 vm.nextDetail = function () {
9793 17317 $state.go('report.view_detail', {
9794 17318 groupId: vm.report.group_id,
9795 17319 reportId: vm.report.group.next_report
9796 17320 });
9797 17321 };
9798 17322 vm.previousDetail = function () {
9799 17323 $state.go('report.view_detail', {
9800 17324 groupId: vm.report.group_id,
9801 17325 reportId: vm.report.group.previous_report
9802 17326 });
9803 17327 };
9804 17328
9805 17329 vm.runIntegration = function (integration_name) {
9806 17330
9807 17331 if (integration_name == 'bitbucket') {
9808 17332 var controller = 'BitbucketIntegrationCtrl as ctrl';
9809 17333 var template_url = 'templates/integrations/bitbucket.html';
9810 17334 }
9811 17335 else if (integration_name == 'github') {
9812 17336 var controller = 'GithubIntegrationCtrl as ctrl';
9813 17337 var template_url = 'templates/integrations/github.html';
9814 17338 }
9815 17339 else if (integration_name == 'jira') {
9816 17340 var controller = 'JiraIntegrationCtrl as ctrl';
9817 17341 var template_url = 'templates/integrations/jira.html';
9818 17342 }
9819 17343 else {
9820 17344 return false;
9821 17345 }
9822 17346
9823 17347 vm.opts = {
9824 17348 backdrop: 'static',
9825 17349 templateUrl: template_url,
9826 17350 controller: controller,
9827 17351 resolve: {
9828 17352 integrationName: function () {
9829 17353 return integration_name
9830 17354 },
9831 17355 report: function () {
9832 17356 return vm.report;
9833 17357 }
9834 17358 }
9835 17359 };
9836 17360 var modalInstance = $uibModal.open(vm.opts);
9837 17361 modalInstance.result.then(function (report) {
9838 17362
9839 17363 }, function () {
9840 17364 console.info('Modal dismissed at: ' + new Date());
9841 17365 });
9842 17366
9843 17367 };
9844 17368 }
9845 17369
9846 17370 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
9847 17371 //
9848 17372 // Licensed under the Apache License, Version 2.0 (the "License");
9849 17373 // you may not use this file except in compliance with the License.
9850 17374 // You may obtain a copy of the License at
9851 17375 //
9852 17376 // http://www.apache.org/licenses/LICENSE-2.0
9853 17377 //
9854 17378 // Unless required by applicable law or agreed to in writing, software
9855 17379 // distributed under the License is distributed on an "AS IS" BASIS,
9856 17380 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9857 17381 // See the License for the specific language governing permissions and
9858 17382 // limitations under the License.
9859 17383
9860 17384 angular.module('appenlight.components.reportsBrowserView', [])
9861 17385 .component('reportsBrowserView', {
9862 17386 templateUrl: 'components/views/reports-browser-view/reports-browser-view.html',
9863 17387 controller: reportsBrowserViewController
9864 17388 });
9865 17389
9866 17390 reportsBrowserViewController.$inject = ['$location', '$cookies',
9867 17391 'stateHolder', 'typeAheadTagHelper', 'reportsResource'];
9868 17392
9869 17393 function reportsBrowserViewController($location, $cookies, stateHolder,
9870 17394 typeAheadTagHelper, reportsResource) {
9871 17395 var vm = this;
9872 17396 vm.$onInit = function () {
9873 17397 vm.applications = stateHolder.AeUser.applications_map;
9874 17398 stateHolder.section = 'reports';
9875 17399 vm.today = function () {
9876 17400 vm.pickerDate = new Date();
9877 17401 };
9878 17402 vm.today();
9879 17403 vm.reportsPage = [];
9880 17404 vm.page = 1;
9881 17405 vm.itemCount = 0;
9882 17406 vm.itemsPerPage = 250;
9883 17407 typeAheadTagHelper.tags = [];
9884 17408 vm.searchParams = {tags: [], page: 1, type: 'report'};
9885 17409 vm.is_loading = false;
9886 17410 vm.filterTypeAheadOptions = [
9887 17411 {
9888 17412 type: 'error',
9889 17413 text: 'error:',
9890 17414 'description': 'Full-text search in your reports',
9891 17415 example: 'error:text-im-looking-for',
9892 17416 tag: 'Error'
9893 17417 },
9894 17418 {
9895 17419 type: 'view_name',
9896 17420 text: 'view_name:',
9897 17421 'description': 'Query reports occured in specific views',
9898 17422 example: "view_name:module.foo",
9899 17423 tag: 'View Name'
9900 17424 },
9901 17425 {
9902 17426 type: 'resource',
9903 17427 text: 'resource:',
9904 17428 'description': 'Restrict resultset to application',
9905 17429 example: "resource:ID",
9906 17430 tag: 'Application'
9907 17431 },
9908 17432 {
9909 17433 type: 'priority',
9910 17434 text: 'priority:',
9911 17435 'description': 'Show reports with specific priority',
9912 17436 example: 'priority:8',
9913 17437 tag: 'Priority'
9914 17438 },
9915 17439 {
9916 17440 type: 'min_occurences',
9917 17441 text: 'min_occurences:',
9918 17442 'description': 'Show reports from groups with at least X occurences',
9919 17443 example: 'min_occurences:25',
9920 17444 tag: 'Occurences'
9921 17445 },
9922 17446 {
9923 17447 type: 'url_path',
9924 17448 text: 'url_path:',
9925 17449 'description': 'Show reports from specific URL paths',
9926 17450 example: 'url_path:/foo/bar/baz',
9927 17451 tag: 'Url Path'
9928 17452 },
9929 17453 {
9930 17454 type: 'url_domain',
9931 17455 text: 'url_domain:',
9932 17456 'description': 'Show reports from specific domain',
9933 17457 example: 'url_domain:domain.com',
9934 17458 tag: 'Domain'
9935 17459 },
9936 17460 {
9937 17461 type: 'report_status',
9938 17462 text: 'report_status:',
9939 17463 'description': 'Show reports from groups with specific status',
9940 17464 example: 'report_status:never_reviewed',
9941 17465 tag: 'Status'
9942 17466 },
9943 17467 {
9944 17468 type: 'request_id',
9945 17469 text: 'request_id:',
9946 17470 'description': 'Show reports with specific request id',
9947 17471 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
9948 17472 tag: 'Request ID'
9949 17473 },
9950 17474 {
9951 17475 type: 'server_name',
9952 17476 text: 'server_name:',
9953 17477 'description': 'Show reports tagged with this key/value pair',
9954 17478 example: 'server_name:hostname',
9955 17479 tag: 'Tag'
9956 17480 },
9957 17481 {
9958 17482 type: 'http_status',
9959 17483 text: 'http_status:',
9960 17484 'description': 'Show reports with specific HTTP status code',
9961 17485 example: "http_status:",
9962 17486 tag: 'HTTP Status'
9963 17487 },
9964 17488 {
9965 17489 type: 'http_status',
9966 17490 text: 'http_status:500',
9967 17491 'description': 'Show reports with specific HTTP status code',
9968 17492 example: "http_status:500",
9969 17493 tag: 'HTTP Status'
9970 17494 },
9971 17495 {
9972 17496 type: 'http_status',
9973 17497 text: 'http_status:404',
9974 17498 'description': 'Include 404 reports in your search',
9975 17499 example: "http_status:404",
9976 17500 tag: 'HTTP Status'
9977 17501 },
9978 17502 {
9979 17503 type: 'start_date',
9980 17504 text: 'start_date:',
9981 17505 'description': 'Show reports newer than this date (press TAB for dropdown)',
9982 17506 example: 'start_date:2014-08-15T13:00',
9983 17507 tag: 'Start Date'
9984 17508 },
9985 17509 {
9986 17510 type: 'end_date',
9987 17511 text: 'end_date:',
9988 17512 'description': 'Show reports older than this date (press TAB for dropdown)',
9989 17513 example: 'start_date:2014-08-15T23:59',
9990 17514 tag: 'End Date'
9991 17515 }
9992 17516 ];
9993 17517
9994 17518 vm.filterTypeAhead = undefined;
9995 17519 vm.showDatePicker = false;
9996 17520 vm.manualOpen = false;
9997 17521 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
9998 17522
9999 17523 vm.notRelativeTime = false;
10000 17524 if ($cookies.notRelativeTime) {
10001 17525 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
10002 17526 }
10003 17527
10004 17528 _.each(_.range(1, 11), function (priority) {
10005 17529 vm.filterTypeAheadOptions.push({
10006 17530 type: 'priority',
10007 17531 text: 'priority:' + priority.toString(),
10008 17532 description: 'Show entries with specific priority',
10009 17533 example: 'priority:' + priority,
10010 17534 tag: 'Priority'
10011 17535 });
10012 17536 });
10013 17537 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
10014 17538 vm.filterTypeAheadOptions.push({
10015 17539 type: 'report_status',
10016 17540 text: 'report_status:' + status,
10017 17541 'description': 'Show only reports with this status',
10018 17542 example: 'report_status:' + status,
10019 17543 tag: 'Status ' + status.toUpperCase()
10020 17544 });
10021 17545 });
10022 17546 _.each(stateHolder.AeUser.applications, function (item) {
10023 17547 vm.filterTypeAheadOptions.push({
10024 17548 type: 'resource',
10025 17549 text: 'resource:' + item.resource_id + ':' + item.resource_name,
10026 17550 example: 'resource:' + item.resource_id,
10027 17551 'tag': item.resource_name,
10028 17552 'description': 'Restrict resultset to this application'
10029 17553 });
10030 17554 });
10031 17555
10032 17556 // initial load
10033 17557 vm.refresh();
10034 17558
10035 17559 }
10036 17560
10037 17561 vm.removeSearchTag = function (tag) {
10038 17562 $location.search(tag.type, null);
10039 17563 vm.refresh();
10040 17564 };
10041 17565 vm.addSearchTag = function (tag) {
10042 17566 $location.search(tag.type, tag.value);
10043 17567 vm.refresh();
10044 17568 };
10045 17569
10046 17570 vm.changeRelativeTime = function () {
10047 17571 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
10048 17572 };
10049 17573
10050 17574 vm.paginationChange = function () {
10051 17575 $location.search('page', vm.page);
10052 17576 vm.refresh();
10053 17577 };
10054 17578
10055 17579 vm.typeAheadTag = function (event) {
10056 17580 var text = vm.filterTypeAhead;
10057 17581 if (_.isObject(vm.filterTypeAhead)) {
10058 17582 text = vm.filterTypeAhead.text;
10059 17583 }
10060 17584 if (!vm.filterTypeAhead) {
10061 17585 return
10062 17586 }
10063 17587
10064 17588 var parsed = text.split(':');
10065 17589 var tag = {'type': null, 'value': null};
10066 17590 // app tags have : twice
10067 17591 if (parsed.length > 2 && parsed[0] == 'resource') {
10068 17592 tag.type = 'resource';
10069 17593 tag.value = parsed[1];
10070 17594 }
10071 17595 // normal tag:value
10072 17596 else if (parsed.length > 1) {
10073 17597 tag.type = parsed[0];
10074 17598 var tagValue = parsed.slice(1);
10075 17599 if (tagValue) {
10076 17600 tag.value = tagValue.join(':');
10077 17601 }
10078 17602 } else {
10079 17603 tag.type = 'error';
10080 17604 tag.value = parsed.join(':');
10081 17605 }
10082 17606
10083 17607 // set datepicker hour based on type of field
10084 17608 if ('start_date:' == text) {
10085 17609 vm.showDatePicker = true;
10086 17610 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10087 17611 } else if ('end_date:' == text) {
10088 17612 vm.showDatePicker = true;
10089 17613 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10090 17614 }
10091 17615
10092 17616 if (event.keyCode != 13 || !tag.type || !tag.value) {
10093 17617 return
10094 17618 }
10095 17619 vm.showDatePicker = false;
10096 17620 // aka we selected one of main options
10097 17621 vm.addSearchTag({type: tag.type, value: tag.value});
10098 17622 // clear typeahead
10099 17623 vm.filterTypeAhead = undefined;
10100 17624 };
10101 17625
10102 17626 vm.pickerDateChanged = function () {
10103 17627 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
10104 17628 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10105 17629 } else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
10106 17630 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10107 17631 }
10108 17632 vm.showDatePicker = false;
10109 17633 };
10110 17634
10111 17635 var reportPresentation = function (report) {
10112 17636 report.presentation = {};
10113 17637 if (report.group.public) {
10114 17638 report.presentation.className = 'public';
10115 17639 report.presentation.tooltip = 'Public';
10116 17640 } else if (report.group.fixed) {
10117 17641 report.presentation.className = 'fixed';
10118 17642 report.presentation.tooltip = 'Fixed';
10119 17643 } else if (report.group.read) {
10120 17644 report.presentation.className = 'reviewed';
10121 17645 report.presentation.tooltip = 'Reviewed';
10122 17646 } else {
10123 17647 report.presentation.className = 'new';
10124 17648 report.presentation.tooltip = 'New';
10125 17649 }
10126 17650 return report;
10127 17651 };
10128 17652
10129 17653 vm.fetchReports = function (searchParams) {
10130 17654 vm.is_loading = true;
10131 17655 reportsResource.query(searchParams, function (data, getResponseHeaders) {
10132 17656 var headers = getResponseHeaders();
10133 17657
10134 17658 vm.is_loading = false;
10135 17659 vm.reportsPage = _.map(data, function (item) {
10136 17660 return reportPresentation(item);
10137 17661 });
10138 17662 vm.itemCount = headers['x-total-count'];
10139 17663 vm.itemsPerPage = headers['x-items-per-page'];
10140 17664 }, function () {
10141 17665 vm.is_loading = false;
10142 17666 });
10143 17667 };
10144 17668
10145 17669 vm.filterId = function (log) {
10146 17670 vm.searchParams.tags.push({
10147 17671 type: "request_id",
10148 17672 value: log.request_id
10149 17673 });
10150 17674 vm.refresh();
10151 17675 };
10152 17676
10153 17677 vm.refresh = function () {
10154 17678 vm.searchParams = parseSearchToTags($location.search());
10155 17679 vm.page = Number(vm.searchParams.page) || 1;
10156 17680 var params = parseTagsToSearch(vm.searchParams);
10157 17681
10158 17682 vm.fetchReports(params);
10159 17683 };
10160 17684
10161 17685 }
10162 17686
10163 17687 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10164 17688 //
10165 17689 // Licensed under the Apache License, Version 2.0 (the "License");
10166 17690 // you may not use this file except in compliance with the License.
10167 17691 // You may obtain a copy of the License at
10168 17692 //
10169 17693 // http://www.apache.org/licenses/LICENSE-2.0
10170 17694 //
10171 17695 // Unless required by applicable law or agreed to in writing, software
10172 17696 // distributed under the License is distributed on an "AS IS" BASIS,
10173 17697 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10174 17698 // See the License for the specific language governing permissions and
10175 17699 // limitations under the License.
10176 17700
10177 17701 'use strict';
10178 17702
10179 17703 /* Controllers */
10180 17704
10181 17705 angular.module('appenlight.components.reportsSlowBrowserView', [])
10182 17706 .component('reportsSlowBrowserView', {
10183 17707 templateUrl: 'components/views/reports-slow-browser-view/reports-slow-browser-view.html',
10184 17708 controller: ReportsSlowBrowserViewController
10185 17709 });
10186 17710
10187 17711 ReportsSlowBrowserViewController.$inject = ['$location', '$cookies',
10188 17712 'stateHolder', 'typeAheadTagHelper', 'slowReportsResource']
10189 17713
10190 17714 function ReportsSlowBrowserViewController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
10191 17715 var vm = this;
10192 17716 vm.$onInit = function () {
10193 17717 vm.applications = stateHolder.AeUser.applications_map;
10194 17718 stateHolder.section = 'slow_reports';
10195 17719 vm.today = function () {
10196 17720 vm.pickerDate = new Date();
10197 17721 };
10198 17722 vm.today();
10199 17723 vm.reportsPage = [];
10200 17724 vm.page = 1;
10201 17725 vm.itemCount = 0;
10202 17726 vm.itemsPerPage = 250;
10203 17727 typeAheadTagHelper.tags = [];
10204 17728 vm.searchParams = {tags: [], page: 1, type: 'slow_report'};
10205 17729 vm.is_loading = false;
10206 17730 vm.filterTypeAheadOptions = [
10207 17731 {
10208 17732 type: 'view_name',
10209 17733 text: 'view_name:',
10210 17734 'description': 'Query reports occured in specific views',
10211 17735 tag: 'View Name',
10212 17736 example: "view_name:module.foo"
10213 17737 },
10214 17738 {
10215 17739 type: 'resource',
10216 17740 text: 'resource:',
10217 17741 'description': 'Restrict resultset to application',
10218 17742 tag: 'Application',
10219 17743 example: "resource:ID"
10220 17744 },
10221 17745 {
10222 17746 type: 'priority',
10223 17747 text: 'priority:',
10224 17748 'description': 'Show reports with specific priority',
10225 17749 example: 'priority:8',
10226 17750 tag: 'Priority'
10227 17751 },
10228 17752 {
10229 17753 type: 'min_occurences',
10230 17754 text: 'min_occurences:',
10231 17755 'description': 'Show reports from groups with at least X occurences',
10232 17756 example: 'min_occurences:25',
10233 17757 tag: 'Min. occurences'
10234 17758 },
10235 17759 {
10236 17760 type: 'min_duration',
10237 17761 text: 'min_duration:',
10238 17762 'description': 'Show reports from groups with average duration >= Xs',
10239 17763 example: 'min_duration:4.5',
10240 17764 tag: 'Min. duration'
10241 17765 },
10242 17766 {
10243 17767 type: 'url_path',
10244 17768 text: 'url_path:',
10245 17769 'description': 'Show reports from specific URL paths',
10246 17770 example: 'url_path:/foo/bar/baz',
10247 17771 tag: 'Url Path'
10248 17772 },
10249 17773 {
10250 17774 type: 'url_domain',
10251 17775 text: 'url_domain:',
10252 17776 'description': 'Show reports from specific domain',
10253 17777 example: 'url_domain:domain.com',
10254 17778 tag: 'Domain'
10255 17779 },
10256 17780 {
10257 17781 type: 'request_id',
10258 17782 text: 'request_id:',
10259 17783 'description': 'Show reports with specific request id',
10260 17784 example: "request_id:883143dc572e4c38aceae92af0ea5ae0",
10261 17785 tag: 'Request ID'
10262 17786 },
10263 17787 {
10264 17788 type: 'report_status',
10265 17789 text: 'report_status:',
10266 17790 'description': 'Show reports from groups with specific status',
10267 17791 example: 'report_status:never_reviewed',
10268 17792 tag: 'Status'
10269 17793 },
10270 17794 {
10271 17795 type: 'server_name',
10272 17796 text: 'server_name:',
10273 17797 'description': 'Show reports tagged with this key/value pair',
10274 17798 example: 'server_name:hostname',
10275 17799 tag: 'Tag'
10276 17800 },
10277 17801 {
10278 17802 type: 'start_date',
10279 17803 text: 'start_date:',
10280 17804 'description': 'Show reports newer than this date (press TAB for dropdown)',
10281 17805 example: 'start_date:2014-08-15T13:00',
10282 17806 tag: 'Start Date'
10283 17807 },
10284 17808 {
10285 17809 type: 'end_date',
10286 17810 text: 'end_date:',
10287 17811 'description': 'Show reports older than this date (press TAB for dropdown)',
10288 17812 example: 'start_date:2014-08-15T23:59',
10289 17813 tag: 'End Date'
10290 17814 }
10291 17815 ];
10292 17816
10293 17817 vm.filterTypeAhead = undefined;
10294 17818 vm.showDatePicker = false;
10295 17819 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
10296 17820
10297 17821 vm.manualOpen = false;
10298 17822 vm.notRelativeTime = false;
10299 17823 if ($cookies.notRelativeTime) {
10300 17824 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
10301 17825 }
10302 17826
10303 17827 _.each(_.range(1, 11), function (priority) {
10304 17828 vm.filterTypeAheadOptions.push({
10305 17829 type: 'priority',
10306 17830 text: 'priority:' + priority.toString(),
10307 17831 description: 'Show entries with specific priority',
10308 17832 example: 'priority:' + priority,
10309 17833 tag: 'Priority'
10310 17834 });
10311 17835 });
10312 17836 _.each(['never_reviewed', 'reviewed', 'fixed', 'public'], function (status) {
10313 17837 vm.filterTypeAheadOptions.push({
10314 17838 type: 'report_status',
10315 17839 text: 'report_status:' + status,
10316 17840 'description': 'Show only reports with this status',
10317 17841 example: 'report_status:' + status,
10318 17842 tag: 'Status ' + status.toUpperCase()
10319 17843 });
10320 17844 });
10321 17845 _.each(stateHolder.AeUser.applications, function (item) {
10322 17846 vm.filterTypeAheadOptions.push({
10323 17847 type: 'resource',
10324 17848 text: 'resource:' + item.resource_id + ':' + item.resource_name,
10325 17849 example: 'resource:' + item.resource_id,
10326 17850 'tag': item.resource_name,
10327 17851 'description': 'Restrict resultset to this application'
10328 17852 });
10329 17853 });
10330 17854
10331 17855 //initial load
10332 17856 vm.refresh();
10333 17857 }
10334 17858
10335 17859 vm.removeSearchTag = function (tag) {
10336 17860 $location.search(tag.type, null);
10337 17861 vm.refresh();
10338 17862 };
10339 17863 vm.addSearchTag = function (tag) {
10340 17864 $location.search(tag.type, tag.value);
10341 17865 vm.refresh();
10342 17866 };
10343 17867
10344 17868
10345 17869 vm.changeRelativeTime = function () {
10346 17870 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
10347 17871 };
10348 17872
10349 17873 vm.typeAheadTag = function (event) {
10350 17874 var text = vm.filterTypeAhead;
10351 17875 if (_.isObject(vm.filterTypeAhead)) {
10352 17876 text = vm.filterTypeAhead.text;
10353 17877 };
10354 17878 if (!vm.filterTypeAhead) {
10355 17879 return
10356 17880 }
10357 17881 var parsed = text.split(':');
10358 17882 var tag = {'type': null, 'value': null};
10359 17883 // app tags have : twice
10360 17884 if (parsed.length > 2 && parsed[0] == 'resource') {
10361 17885 tag.type = 'resource';
10362 17886 tag.value = parsed[1];
10363 17887 }
10364 17888 // normal tag:value
10365 17889 else if (parsed.length > 1) {
10366 17890 tag.type = parsed[0];
10367 17891 var tagValue = parsed.slice(1);
10368 17892 if (tagValue) {
10369 17893 tag.value = tagValue.join(':');
10370 17894 }
10371 17895 }
10372 17896
10373 17897 // set datepicker hour based on type of field
10374 17898 if ('start_date:' == text) {
10375 17899 vm.showDatePicker = true;
10376 17900 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10377 17901 }
10378 17902 else if ('end_date:' == text) {
10379 17903 vm.showDatePicker = true;
10380 17904 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10381 17905 }
10382 17906
10383 17907 if (event.keyCode != 13 || !tag.type || !tag.value) {
10384 17908 return
10385 17909 }
10386 17910 vm.showDatePicker = false;
10387 17911 // aka we selected one of main options
10388 17912 vm.addSearchTag({type: tag.type, value: tag.value});
10389 17913 // clear typeahead
10390 17914 vm.filterTypeAhead = undefined;
10391 17915 };
10392 17916
10393 17917 vm.paginationChange = function(){
10394 17918 $location.search('page', vm.page);
10395 17919 vm.refresh();
10396 17920 };
10397 17921
10398 17922 vm.pickerDateChanged = function(){
10399 17923 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
10400 17924 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
10401 17925 }
10402 17926 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
10403 17927 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
10404 17928 }
10405 17929 vm.showDatePicker = false;
10406 17930 };
10407 17931
10408 17932 var reportPresentation = function (report) {
10409 17933 report.presentation = {};
10410 17934 if (report.group.public) {
10411 17935 report.presentation.className = 'public';
10412 17936 report.presentation.tooltip = 'Public';
10413 17937 }
10414 17938 else if (report.group.fixed) {
10415 17939 report.presentation.className = 'fixed';
10416 17940 report.presentation.tooltip = 'Fixed';
10417 17941 }
10418 17942 else if (report.group.read) {
10419 17943 report.presentation.className = 'reviewed';
10420 17944 report.presentation.tooltip = 'Reviewed';
10421 17945 }
10422 17946 else {
10423 17947 report.presentation.className = 'new';
10424 17948 report.presentation.tooltip = 'New';
10425 17949 }
10426 17950 return report;
10427 17951 };
10428 17952
10429 17953 vm.fetchReports = function (searchParams) {
10430 17954 vm.is_loading = true;
10431 17955 slowReportsResource.query(searchParams, function (data, getResponseHeaders) {
10432 17956 var headers = getResponseHeaders();
10433 17957
10434 17958 vm.is_loading = false;
10435 17959 vm.reportsPage = _.map(data, function (item) {
10436 17960 return reportPresentation(item);
10437 17961 });
10438 17962 vm.itemCount = headers['x-total-count'];
10439 17963 vm.itemsPerPage = headers['x-items-per-page'];
10440 17964 }, function () {
10441 17965 vm.is_loading = false;
10442 17966 });
10443 17967 };
10444 17968
10445 17969 vm.filterId = function (log) {
10446 17970 vm.searchParams.tags.push({
10447 17971 type: "request_id",
10448 17972 value: log.request_id
10449 17973 });
10450 17974 vm.refresh();
10451 17975 };
10452 17976 vm.refresh = function(){
10453 17977 vm.searchParams = parseSearchToTags($location.search());
10454 17978 vm.page = Number(vm.searchParams.page) || 1;
10455 17979 var params = parseTagsToSearch(vm.searchParams);
10456 17980 vm.fetchReports(params);
10457 17981 };
10458 17982
10459 17983 }
10460 17984
10461 17985 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10462 17986 //
10463 17987 // Licensed under the Apache License, Version 2.0 (the "License");
10464 17988 // you may not use this file except in compliance with the License.
10465 17989 // You may obtain a copy of the License at
10466 17990 //
10467 17991 // http://www.apache.org/licenses/LICENSE-2.0
10468 17992 //
10469 17993 // Unless required by applicable law or agreed to in writing, software
10470 17994 // distributed under the License is distributed on an "AS IS" BASIS,
10471 17995 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10472 17996 // See the License for the specific language governing permissions and
10473 17997 // limitations under the License.
10474 17998
10475 17999 angular.module('appenlight.components.settingsView', [])
10476 18000 .component('settingsView', {
10477 18001 templateUrl: 'components/views/settings-view/settings-view.html',
10478 18002 controller: SettingsViewController
10479 18003 });
10480 18004
10481 18005 SettingsViewController.$inject = ['$state', 'AeConfig'];
10482 18006
10483 18007 function SettingsViewController($state, AeConfig) {
10484 18008 this.$onInit = function () {
10485 18009 this.$state = $state;
10486 18010 this.AeConfig = AeConfig;
10487 18011 console.info('SettingsViewController');
10488 18012 }
10489 18013 }
10490 18014
10491 18015 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10492 18016 //
10493 18017 // Licensed under the Apache License, Version 2.0 (the "License");
10494 18018 // you may not use this file except in compliance with the License.
10495 18019 // You may obtain a copy of the License at
10496 18020 //
10497 18021 // http://www.apache.org/licenses/LICENSE-2.0
10498 18022 //
10499 18023 // Unless required by applicable law or agreed to in writing, software
10500 18024 // distributed under the License is distributed on an "AS IS" BASIS,
10501 18025 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10502 18026 // See the License for the specific language governing permissions and
10503 18027 // limitations under the License.
10504 18028
10505 18029 angular.module('appenlight.components.userAlertChannelsEmailNewView', [])
10506 18030 .component('userAlertChannelsEmailNewView', {
10507 18031 templateUrl: 'components/views/user-alert-channel-email-new-view/user-alert-channel-email-new-view.html',
10508 18032 controller: AlertChannelsEmailController
10509 18033 });
10510 18034
10511 18035 AlertChannelsEmailController.$inject = ['$state', 'userSelfPropertyResource'];
10512 18036
10513 18037 function AlertChannelsEmailController($state, userSelfPropertyResource) {
10514 18038
10515 18039 var vm = this;
10516 18040 vm.$onInit = function () {
10517 18041 var vm = this;
10518 18042 vm.$state = $state;
10519 18043 vm.loading = {email: false};
10520 18044 vm.form = {};
10521 18045 }
10522 18046 vm.createChannel = function () {
10523 18047 vm.loading.email = true;
10524 18048
10525 18049 userSelfPropertyResource.save({key: 'alert_channels'}, vm.form, function () {
10526 18050 //vm.loading.email = false;
10527 18051 //setServerValidation(vm.channelForm);
10528 18052 //vm.form = {};
10529 18053 $state.go('user.alert_channels.list');
10530 18054 }, function (response) {
10531 18055 if (response.status == 422) {
10532 18056 setServerValidation(vm.channelForm, response.data);
10533 18057 }
10534 18058 vm.loading.email = false;
10535 18059 });
10536 18060 }
10537 18061 }
10538 18062
10539 18063 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10540 18064 //
10541 18065 // Licensed under the Apache License, Version 2.0 (the "License");
10542 18066 // you may not use this file except in compliance with the License.
10543 18067 // You may obtain a copy of the License at
10544 18068 //
10545 18069 // http://www.apache.org/licenses/LICENSE-2.0
10546 18070 //
10547 18071 // Unless required by applicable law or agreed to in writing, software
10548 18072 // distributed under the License is distributed on an "AS IS" BASIS,
10549 18073 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10550 18074 // See the License for the specific language governing permissions and
10551 18075 // limitations under the License.
10552 18076
10553 18077 angular.module('appenlight.components.userAlertChannelsListView', [])
10554 18078 .component('userAlertChannelsListView', {
10555 18079 templateUrl: 'components/views/user-alert-channels-list-view/user-alert-channels-list-view.html',
10556 18080 controller: userAlertChannelsListViewController
10557 18081 });
10558 18082
10559 18083 userAlertChannelsListViewController.$inject = ['$state', 'userSelfPropertyResource', 'applicationsNoIdResource'];
10560 18084
10561 18085 function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) {
10562 18086
10563 18087 var vm = this;
10564 18088 vm.$onInit = function () {
10565 18089 vm.$state = $state;
10566 18090 vm.loading = {channels: true, applications: true, actions: true};
10567 18091
10568 18092 vm.alertChannels = userSelfPropertyResource.query({key: 'alert_channels'},
10569 18093 function (data) {
10570 18094 vm.loading.channels = false;
10571 18095 });
10572 18096
10573 18097 vm.alertActions = userSelfPropertyResource.query({key: 'alert_actions'},
10574 18098 function (data) {
10575 18099 vm.loading.actions = false;
10576 18100 });
10577 18101
10578 18102 vm.applications = applicationsNoIdResource.query({permission: 'view'},
10579 18103 function (data) {
10580 18104 vm.loading.applications = false;
10581 18105 });
10582 18106
10583 18107 var allOps = {
10584 18108 'eq': 'Equal',
10585 18109 'ne': 'Not equal',
10586 18110 'ge': 'Greater or equal',
10587 18111 'gt': 'Greater than',
10588 18112 'le': 'Lesser or equal',
10589 18113 'lt': 'Lesser than',
10590 18114 'startswith': 'Starts with',
10591 18115 'endswith': 'Ends with',
10592 18116 'contains': 'Contains'
10593 18117 };
10594 18118
10595 18119 var fieldOps = {};
10596 18120 fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le'];
10597 18121 fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le'];
10598 18122 fieldOps['duration'] = ['ge', 'le'];
10599 18123 fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith',
10600 18124 'contains'];
10601 18125 fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith',
10602 18126 'contains'];
10603 18127 fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith',
10604 18128 'contains'];
10605 18129 fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith',
10606 18130 'contains'];
10607 18131 fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le'];
10608 18132
10609 18133 var possibleFields = {
10610 18134 '__AND__': 'All met (composite rule)',
10611 18135 '__OR__': 'One met (composite rule)',
10612 18136 '__NOT__': 'Not met (composite rule)',
10613 18137 'http_status': 'HTTP Status',
10614 18138 'duration': 'Request duration',
10615 18139 'group:priority': 'Group -> Priority',
10616 18140 'url_domain': 'Domain',
10617 18141 'url_path': 'URL Path',
10618 18142 'error': 'Error',
10619 18143 'tags:server_name': 'Tag -> Server name',
10620 18144 'group:occurences': 'Group -> Occurences'
10621 18145 };
10622 18146
10623 18147 vm.ruleDefinitions = {
10624 18148 fieldOps: fieldOps,
10625 18149 allOps: allOps,
10626 18150 possibleFields: possibleFields
10627 18151 };
10628 18152 }
10629 18153 vm.addAction = function (channel) {
10630 18154
10631 18155 userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) {
10632 18156 vm.alertActions.push(data);
10633 18157 }, function (response) {
10634 18158 if (response.status == 422) {
10635 18159
10636 18160 }
10637 18161 });
10638 18162 };
10639 18163
10640 18164 vm.updateChannel = function (channel, subKey) {
10641 18165 var params = {
10642 18166 key: 'alert_channels',
10643 18167 channel_name: channel['channel_name'],
10644 18168 channel_value: channel['channel_value']
10645 18169 };
10646 18170 var toUpdate = {};
10647 18171 if (['daily_digest', 'send_alerts'].indexOf(subKey) !== -1) {
10648 18172 toUpdate[subKey] = !channel[subKey];
10649 18173 }
10650 18174 userSelfPropertyResource.update(params, toUpdate, function (data) {
10651 18175 _.extend(channel, data);
10652 18176 });
10653 18177 };
10654 18178
10655 18179 vm.removeChannel = function (channel) {
10656 18180
10657 18181 userSelfPropertyResource.delete({
10658 18182 key: 'alert_channels',
10659 18183 channel_name: channel.channel_name,
10660 18184 channel_value: channel.channel_value
10661 18185 }, function () {
10662 18186 vm.alertChannels = _.filter(vm.alertChannels, function (item) {
10663 18187 return item != channel;
10664 18188 });
10665 18189 });
10666 18190
10667 18191 }
10668 18192
10669 18193 }
10670 18194
10671 18195 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10672 18196 //
10673 18197 // Licensed under the Apache License, Version 2.0 (the "License");
10674 18198 // you may not use this file except in compliance with the License.
10675 18199 // You may obtain a copy of the License at
10676 18200 //
10677 18201 // http://www.apache.org/licenses/LICENSE-2.0
10678 18202 //
10679 18203 // Unless required by applicable law or agreed to in writing, software
10680 18204 // distributed under the License is distributed on an "AS IS" BASIS,
10681 18205 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10682 18206 // See the License for the specific language governing permissions and
10683 18207 // limitations under the License.
10684 18208
10685 18209 angular.module('appenlight.components.userAuthTokensView', [])
10686 18210 .component('userAuthTokensView', {
10687 18211 templateUrl: 'components/views/user-auth-tokens-view/user-auth-tokens-view.html',
10688 18212 controller: userAuthTokensViewController
10689 18213 });
10690 18214
10691 18215 userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
10692 18216
10693 18217 function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) {
10694 18218
10695 18219 var vm = this;
10696 18220 vm.$onInit = function () {
10697 18221 vm.$state = $state;
10698 18222 vm.loading = {tokens: true};
10699 18223
10700 18224 vm.expireOptions = AeConfig.timeOptions;
10701 18225
10702 18226 vm.tokens = userSelfPropertyResource.query({key: 'auth_tokens'},
10703 18227 function (data) {
10704 18228 vm.loading.tokens = false;
10705 18229 });
10706 18230 }
10707 18231 vm.addToken = function () {
10708 18232 vm.loading.tokens = true;
10709 18233 userSelfPropertyResource.save({key: 'auth_tokens'},
10710 18234 vm.form,
10711 18235 function (data) {
10712 18236 vm.loading.tokens = false;
10713 18237 setServerValidation(vm.TokenForm);
10714 18238 vm.form = {};
10715 18239 vm.tokens.push(data);
10716 18240 }, function (response) {
10717 18241 vm.loading.tokens = false;
10718 18242 if (response.status == 422) {
10719 18243 setServerValidation(vm.TokenForm, response.data);
10720 18244 }
10721 18245 })
10722 18246 };
10723 18247
10724 18248 vm.removeToken = function (token) {
10725 18249 userSelfPropertyResource.delete({
10726 18250 key: 'auth_tokens',
10727 18251 token: token.token
10728 18252 },
10729 18253 function () {
10730 18254 var index = vm.tokens.indexOf(token);
10731 18255 if (index !== -1) {
10732 18256 vm.tokens.splice(index, 1);
10733 18257 }
10734 18258 })
10735 18259 }
10736 18260 }
10737 18261
10738 18262 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10739 18263 //
10740 18264 // Licensed under the Apache License, Version 2.0 (the "License");
10741 18265 // you may not use this file except in compliance with the License.
10742 18266 // You may obtain a copy of the License at
10743 18267 //
10744 18268 // http://www.apache.org/licenses/LICENSE-2.0
10745 18269 //
10746 18270 // Unless required by applicable law or agreed to in writing, software
10747 18271 // distributed under the License is distributed on an "AS IS" BASIS,
10748 18272 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10749 18273 // See the License for the specific language governing permissions and
10750 18274 // limitations under the License.
10751 18275
10752 18276 angular.module('appenlight.components.userIdentitiesView', [])
10753 18277 .component('userIdentitiesView', {
10754 18278 templateUrl: 'components/views/user-identities-view/user-identities-view.html',
10755 18279 controller: UserIdentitiesController
10756 18280 });
10757 18281
10758 18282 UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig'];
10759 18283
10760 18284 function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) {
10761 18285
10762 18286 var vm = this;
10763 18287 vm.$onInit = function () {
10764 18288 vm.$state = $state;
10765 18289 vm.AeConfig = AeConfig;
10766 18290 vm.loading = {identities: true};
10767 18291
10768 18292 vm.identities = userSelfPropertyResource.query(
10769 18293 {key: 'external_identities'},
10770 18294 function (data) {
10771 18295 vm.loading.identities = false;
10772 18296
10773 18297 });
10774 18298 }
10775 18299 vm.removeProvider = function (provider) {
10776 18300
10777 18301 userSelfPropertyResource.delete(
10778 18302 {
10779 18303 key: 'external_identities',
10780 18304 provider: provider.provider,
10781 18305 id: provider.id
10782 18306 },
10783 18307 function (status) {
10784 18308 if (status) {
10785 18309 vm.identities = _.filter(vm.identities, function (item) {
10786 18310 return item != provider
10787 18311 });
10788 18312 }
10789 18313
10790 18314 });
10791 18315 }
10792 18316 }
10793 18317
10794 18318 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10795 18319 //
10796 18320 // Licensed under the Apache License, Version 2.0 (the "License");
10797 18321 // you may not use this file except in compliance with the License.
10798 18322 // You may obtain a copy of the License at
10799 18323 //
10800 18324 // http://www.apache.org/licenses/LICENSE-2.0
10801 18325 //
10802 18326 // Unless required by applicable law or agreed to in writing, software
10803 18327 // distributed under the License is distributed on an "AS IS" BASIS,
10804 18328 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10805 18329 // See the License for the specific language governing permissions and
10806 18330 // limitations under the License.
10807 18331
10808 18332 angular.module('appenlight.components.userPasswordView', [])
10809 18333 .component('userPasswordView', {
10810 18334 templateUrl: 'components/views/user-password-view/user-password-view.html',
10811 18335 controller: UserPasswordViewController
10812 18336 });
10813 18337
10814 18338 UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource'];
10815 18339
10816 18340 function UserPasswordViewController($state, userSelfPropertyResource) {
10817 18341
10818 18342 var vm = this;
10819 18343 vm.$onInit = function () {
10820 18344 vm.$state = $state;
10821 18345 vm.loading = {password: false};
10822 18346 vm.form = {};
10823 18347 }
10824 18348 vm.updatePassword = function () {
10825 18349 vm.loading.password = true;
10826 18350
10827 18351 userSelfPropertyResource.update({key: 'password'}, vm.form, function () {
10828 18352 vm.loading.password = false;
10829 18353 vm.form = {};
10830 18354 setServerValidation(vm.passwordForm);
10831 18355 }, function (response) {
10832 18356 if (response.status == 422) {
10833 18357
10834 18358 setServerValidation(vm.passwordForm, response.data);
10835 18359
10836 18360 }
10837 18361 vm.loading.password = false;
10838 18362 });
10839 18363 }
10840 18364 }
10841 18365
10842 18366 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10843 18367 //
10844 18368 // Licensed under the Apache License, Version 2.0 (the "License");
10845 18369 // you may not use this file except in compliance with the License.
10846 18370 // You may obtain a copy of the License at
10847 18371 //
10848 18372 // http://www.apache.org/licenses/LICENSE-2.0
10849 18373 //
10850 18374 // Unless required by applicable law or agreed to in writing, software
10851 18375 // distributed under the License is distributed on an "AS IS" BASIS,
10852 18376 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10853 18377 // See the License for the specific language governing permissions and
10854 18378 // limitations under the License.
10855 18379
10856 18380 angular.module('appenlight.components.userProfileView', [])
10857 18381 .component('userProfileView', {
10858 18382 templateUrl: 'components/views/user-profile-view/user-profile-view.html',
10859 18383 controller: UserProfileViewController
10860 18384 });
10861 18385
10862 18386 UserProfileViewController.$inject = ['$state', 'userSelfResource'];
10863 18387
10864 18388 function UserProfileViewController($state, userSelfResource) {
10865 18389
10866 18390 var vm = this;
10867 18391 vm.$onInit = function () {
10868 18392 vm.$state = $state;
10869 18393 vm.loading = {profile: true};
10870 18394
10871 18395 vm.user = userSelfResource.get(null, function (data) {
10872 18396 vm.loading.profile = false;
10873 18397
10874 18398 });
10875 18399 }
10876 18400 vm.updateProfile = function () {
10877 18401 vm.loading.profile = true;
10878 18402
10879 18403
10880 18404 vm.user.$update(null, function () {
10881 18405 vm.loading.profile = false;
10882 18406 setServerValidation(vm.profileForm);
10883 18407 }, function (response) {
10884 18408 if (response.status == 422) {
10885 18409 setServerValidation(vm.profileForm, response.data);
10886 18410 }
10887 18411 vm.loading.profile = false;
10888 18412 });
10889 18413 }
10890 18414 }
10891 18415
10892 18416 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10893 18417 //
10894 18418 // Licensed under the Apache License, Version 2.0 (the "License");
10895 18419 // you may not use this file except in compliance with the License.
10896 18420 // You may obtain a copy of the License at
10897 18421 //
10898 18422 // http://www.apache.org/licenses/LICENSE-2.0
10899 18423 //
10900 18424 // Unless required by applicable law or agreed to in writing, software
10901 18425 // distributed under the License is distributed on an "AS IS" BASIS,
10902 18426 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10903 18427 // See the License for the specific language governing permissions and
10904 18428 // limitations under the License.
10905 18429
10906 18430 var aeconfig = angular.module('appenlight.config', []);
10907 18431 aeconfig.factory('AeConfig', function () {
10908 18432 var obj = {};
10909 18433 obj.flashMessages = decodeEncodedJSON(window.AE.flash_messages);
10910 18434 obj.timeOptions = decodeEncodedJSON(window.AE.timeOptions);
10911 18435 obj.plugins = decodeEncodedJSON(window.AE.plugins);
10912 18436 obj.topNav = {
10913 18437 menuDashboardsItems: [],
10914 18438 menuReportsItems: [],
10915 18439 menuLogsItems: [],
10916 18440 menuSettingsItems: [],
10917 18441 menuAdminItems: []
10918 18442 };
10919 18443 obj.settingsNav = {
10920 18444 menuApplicationsItems: [],
10921 18445 menuUserSettingsItems: [],
10922 18446 menuNotificationsItems: []
10923 18447 };
10924 18448 obj.adminNav = {
10925 18449 menuUsersItems: [],
10926 18450 menuResourcesItems: [],
10927 18451 menuSystemItems: []
10928 18452 };
10929 18453 obj.ws_url = window.AE.ws_url;
10930 18454 obj.urls = window.AE.urls;
10931 18455 // set keys on values because we wont be able to retrieve them everywhere
10932 18456 for (var key in obj.timeOptions) {
10933 18457 obj.timeOptions[key]['key'] = key;
10934 18458 }
10935 18459 console.info('config', obj);
10936 18460 return obj;
10937 18461 });
10938 18462
10939 18463 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
10940 18464 //
10941 18465 // Licensed under the Apache License, Version 2.0 (the "License");
10942 18466 // you may not use this file except in compliance with the License.
10943 18467 // You may obtain a copy of the License at
10944 18468 //
10945 18469 // http://www.apache.org/licenses/LICENSE-2.0
10946 18470 //
10947 18471 // Unless required by applicable law or agreed to in writing, software
10948 18472 // distributed under the License is distributed on an "AS IS" BASIS,
10949 18473 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10950 18474 // See the License for the specific language governing permissions and
10951 18475 // limitations under the License.
10952 18476
10953 18477 angular.module('appenlight.controllers')
10954 18478 .controller('BitbucketIntegrationCtrl', BitbucketIntegrationCtrl)
10955 18479
10956 18480 BitbucketIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integrationName', 'integrationResource'];
10957 18481
10958 18482 function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
10959 18483 var vm = this;
10960 18484 vm.$onInit = function () {
10961 18485 vm.loading = true;
10962 18486 vm.assignees = [];
10963 18487 vm.report = report;
10964 18488 vm.integrationName = integrationName;
10965 18489 vm.statuses = [];
10966 18490 vm.priorities = [];
10967 18491 vm.error_messages = [];
10968 18492 vm.form = {
10969 18493 content: '\n' +
10970 18494 'Issue created for report: ' +
10971 18495 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
10972 18496 };
10973 18497 vm.fetchInfo();
10974 18498 }
10975 18499 vm.fetchInfo = function () {
10976 18500 integrationResource.get({
10977 18501 resourceId: vm.report.resource_id,
10978 18502 action: 'info',
10979 18503 integration: vm.integrationName
10980 18504 }, null,
10981 18505 function (data) {
10982 18506 vm.loading = false;
10983 18507 if (data.error_messages) {
10984 18508 vm.error_messages = data.error_messages;
10985 18509 }
10986 18510 vm.assignees = data.assignees;
10987 18511 vm.priorities = data.priorities;
10988 18512 vm.form.responsible = vm.assignees[0];
10989 18513 vm.form.priority = vm.priorities[0];
10990 18514 }, function (error_data) {
10991 18515 if (error_data.data.error_messages) {
10992 18516 vm.error_messages = error_data.data.error_messages;
10993 18517 } else {
10994 18518 vm.error_messages = ['There was a problem processing your request'];
10995 18519 }
10996 18520 });
10997 18521 };
10998 18522 vm.ok = function () {
10999 18523 vm.loading = true;
11000 18524 vm.form.group_id = vm.report.group_id;
11001 18525 integrationResource.save({
11002 18526 resourceId: vm.report.resource_id,
11003 18527 action: 'create-issue',
11004 18528 integration: vm.integrationName
11005 18529 }, vm.form,
11006 18530 function (data) {
11007 18531 vm.loading = false;
11008 18532 if (data.error_messages) {
11009 18533 vm.error_messages = data.error_messages;
11010 18534 }
11011 18535 if (data !== false) {
11012 18536 $uibModalInstance.dismiss('success');
11013 18537 }
11014 18538 }, function (error_data) {
11015 18539 if (error_data.data.error_messages) {
11016 18540 vm.error_messages = error_data.data.error_messages;
11017 18541 } else {
11018 18542 vm.error_messages = ['There was a problem processing your request'];
11019 18543 }
11020 18544 });
11021 18545 };
11022 18546 vm.cancel = function () {
11023 18547 $uibModalInstance.dismiss('cancel');
11024 18548 };
11025 18549 }
11026 18550
11027 18551 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11028 18552 //
11029 18553 // Licensed under the Apache License, Version 2.0 (the "License");
11030 18554 // you may not use this file except in compliance with the License.
11031 18555 // You may obtain a copy of the License at
11032 18556 //
11033 18557 // http://www.apache.org/licenses/LICENSE-2.0
11034 18558 //
11035 18559 // Unless required by applicable law or agreed to in writing, software
11036 18560 // distributed under the License is distributed on an "AS IS" BASIS,
11037 18561 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11038 18562 // See the License for the specific language governing permissions and
11039 18563 // limitations under the License.
11040 18564
11041 18565 angular.module('appenlight.controllers')
11042 18566 .controller('GithubIntegrationCtrl', GithubIntegrationCtrl);
11043 18567
11044 18568 GithubIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integrationName', 'integrationResource'];
11045 18569
11046 18570 function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
11047 18571 var vm = this;
11048 18572 vm.$onInit = function () {
11049 18573 vm.loading = true;
11050 18574 vm.assignees = [];
11051 18575 vm.report = report;
11052 18576 vm.integrationName = integrationName;
11053 18577 vm.statuses = [];
11054 18578 vm.assignees = [];
11055 18579 vm.error_messages = [];
11056 18580 vm.form = {
11057 18581 content: '\n' +
11058 18582 'Issue created for report: ' +
11059 18583 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
11060 18584 };
11061 18585 vm.fetchInfo();
11062 18586 }
11063 18587 vm.fetchInfo = function () {
11064 18588 integrationResource.get({
11065 18589 resourceId: vm.report.resource_id,
11066 18590 action: 'info',
11067 18591 integration: vm.integrationName
11068 18592 }, null,
11069 18593 function (data) {
11070 18594 vm.loading = false;
11071 18595 if (data.error_messages) {
11072 18596 vm.error_messages = data.error_messages;
11073 18597 } else {
11074 18598 vm.assignees = data.assignees;
11075 18599 vm.statuses = data.statuses;
11076 18600 vm.form.responsible = vm.assignees[0];
11077 18601 vm.form.status = vm.statuses[0];
11078 18602 }
11079 18603 }, function (error_data) {
11080 18604 if (error_data.data.error_messages) {
11081 18605 vm.error_messages = error_data.data.error_messages;
11082 18606 } else {
11083 18607 vm.error_messages = ['There was a problem processing your request'];
11084 18608 }
11085 18609 });
11086 18610 };
11087 18611 vm.ok = function () {
11088 18612 vm.loading = true;
11089 18613 vm.form.group_id = vm.report.group_id;
11090 18614 integrationResource.save({
11091 18615 resourceId: vm.report.resource_id,
11092 18616 action: 'create-issue',
11093 18617 integration: vm.integrationName
11094 18618 }, vm.form,
11095 18619 function (data) {
11096 18620 vm.loading = false;
11097 18621 if (data.error_messages) {
11098 18622 vm.error_messages = data.error_messages;
11099 18623 } else {
11100 18624 $uibModalInstance.dismiss('success');
11101 18625 }
11102 18626 }, function (error_data) {
11103 18627 if (error_data.data.error_messages) {
11104 18628 vm.error_messages = error_data.data.error_messages;
11105 18629 } else {
11106 18630 vm.error_messages = ['There was a problem processing your request'];
11107 18631 }
11108 18632 });
11109 18633 };
11110 18634 vm.cancel = function () {
11111 18635 $uibModalInstance.dismiss('cancel');
11112 18636 };
11113 18637 }
11114 18638
11115 18639 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11116 18640 //
11117 18641 // Licensed under the Apache License, Version 2.0 (the "License");
11118 18642 // you may not use this file except in compliance with the License.
11119 18643 // You may obtain a copy of the License at
11120 18644 //
11121 18645 // http://www.apache.org/licenses/LICENSE-2.0
11122 18646 //
11123 18647 // Unless required by applicable law or agreed to in writing, software
11124 18648 // distributed under the License is distributed on an "AS IS" BASIS,
11125 18649 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11126 18650 // See the License for the specific language governing permissions and
11127 18651 // limitations under the License.
11128 18652
11129 18653 angular.module('appenlight.controllers')
11130 18654 .controller('JiraIntegrationCtrl', JiraIntegrationCtrl)
11131 18655
11132 18656 JiraIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integrationName', 'integrationResource'];
11133 18657
11134 18658 function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
11135 18659 var vm = this;
11136 18660 vm.$onInit = function () {
11137 18661 vm.loading = true;
11138 18662 vm.assignees = [];
11139 18663 vm.report = report;
11140 18664 vm.integrationName = integrationName;
11141 18665 vm.statuses = [];
11142 18666 vm.priorities = [];
11143 18667 vm.issue_types = [];
11144 18668 vm.error_messages = [];
11145 18669 vm.form = {
11146 18670 content: '\n' +
11147 18671 'Issue created for report: ' +
11148 18672 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
11149 18673 };
11150 18674 vm.fetchInfo();
11151 18675 }
11152 18676 vm.fetchInfo = function () {
11153 18677 integrationResource.get({
11154 18678 resourceId: vm.report.resource_id,
11155 18679 action: 'info',
11156 18680 integration: vm.integrationName
11157 18681 }, null,
11158 18682 function (data) {
11159 18683 vm.loading = false;
11160 18684 if (data.error_messages) {
11161 18685 vm.error_messages = data.error_messages;
11162 18686 }
11163 18687 vm.assignees = data.assignees;
11164 18688 vm.priorities = data.priorities;
11165 18689 vm.issue_types = data.issue_types;
11166 18690 vm.form.issue_type = vm.issue_types[0];
11167 18691 vm.form.responsible = vm.assignees[0];
11168 18692 vm.form.priority = vm.priorities[0];
11169 18693 }, function (error_data) {
11170 18694
11171 18695 if (error_data.data.error_messages) {
11172 18696 vm.error_messages = error_data.data.error_messages;
11173 18697 } else {
11174 18698 vm.error_messages = ['There was a problem processing your request'];
11175 18699 }
11176 18700 });
11177 18701 };
11178 18702 vm.ok = function () {
11179 18703 vm.loading = true;
11180 18704 vm.form.group_id = vm.report.group_id;
11181 18705 integrationResource.save({
11182 18706 resourceId: vm.report.resource_id,
11183 18707 action: 'create-issue',
11184 18708 integration: vm.integrationName
11185 18709 }, vm.form,
11186 18710 function (data) {
11187 18711 vm.loading = false;
11188 18712 if (data.error_messages) {
11189 18713 vm.error_messages = data.error_messages;
11190 18714 }
11191 18715 if (data !== false) {
11192 18716 $uibModalInstance.dismiss('success');
11193 18717 }
11194 18718 }, function (error_data) {
11195 18719 if (error_data.data.error_messages) {
11196 18720 vm.error_messages = error_data.data.error_messages;
11197 18721 } else {
11198 18722 vm.error_messages = ['There was a problem processing your request'];
11199 18723 }
11200 18724 });
11201 18725 };
11202 18726 vm.cancel = function () {
11203 18727 $uibModalInstance.dismiss('cancel');
11204 18728 };
11205 18729 }
11206 18730
11207 18731 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11208 18732 //
11209 18733 // Licensed under the Apache License, Version 2.0 (the "License");
11210 18734 // you may not use this file except in compliance with the License.
11211 18735 // You may obtain a copy of the License at
11212 18736 //
11213 18737 // http://www.apache.org/licenses/LICENSE-2.0
11214 18738 //
11215 18739 // Unless required by applicable law or agreed to in writing, software
11216 18740 // distributed under the License is distributed on an "AS IS" BASIS,
11217 18741 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11218 18742 // See the License for the specific language governing permissions and
11219 18743 // limitations under the License.
11220 18744
11221 18745 angular.module('appenlight.controllers').controller('AssignReportCtrl', AssignReportCtrl);
11222 18746 AssignReportCtrl.$inject = ['$uibModalInstance', 'reportGroupPropertyResource', 'report'];
11223 18747
11224 18748 function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report) {
11225 18749 var vm = this;
11226 18750 vm.$onInit = function () {
11227 18751 vm.loading = true;
11228 18752 vm.assignedUsers = [];
11229 18753 vm.unAssignedUsers = [];
11230 18754 vm.report = report;
11231 18755 vm.fetchAssignments = function () {
11232 18756 reportGroupPropertyResource.get({
11233 18757 groupId: vm.report.group_id,
11234 18758 key: 'assigned_users'
11235 18759 }, null,
11236 18760 function (data) {
11237 18761 vm.assignedUsers = data.assigned;
11238 18762 vm.unAssignedUsers = data.unassigned;
11239 18763 vm.loading = false;
11240 18764 });
11241 18765 }
11242 18766 vm.fetchAssignments();
11243 18767 }
11244 18768 vm.reassignUser = function (user) {
11245 18769 var is_assigned = vm.assignedUsers.indexOf(user);
11246 18770 if (is_assigned != -1) {
11247 18771 vm.assignedUsers.splice(is_assigned, 1);
11248 18772 vm.unAssignedUsers.push(user);
11249 18773 return
11250 18774 }
11251 18775 var is_unassigned = vm.unAssignedUsers.indexOf(user);
11252 18776 if (is_unassigned != -1) {
11253 18777 vm.unAssignedUsers.splice(is_unassigned, 1);
11254 18778 vm.assignedUsers.push(user);
11255 18779 return
11256 18780 }
11257 18781 }
11258 18782 vm.updateAssignments = function () {
11259 18783 var post = {'unassigned': [], 'assigned': []};
11260 18784 _.each(vm.assignedUsers, function (u) {
11261 18785 post['assigned'].push(u.user_name)
11262 18786 });
11263 18787 _.each(vm.unAssignedUsers, function (u) {
11264 18788 post['unassigned'].push(u.user_name)
11265 18789 });
11266 18790 vm.loading = true;
11267 18791 reportGroupPropertyResource.update({
11268 18792 groupId: vm.report.group_id,
11269 18793 key: 'assigned_users'
11270 18794 }, post,
11271 18795 function (data) {
11272 18796 vm.loading = false;
11273 18797 $uibModalInstance.close(vm.report);
11274 18798 });
11275 18799 };
11276 18800
11277 18801
11278 18802 vm.ok = function () {
11279 18803 vm.updateAssignments();
11280 18804 };
11281 18805
11282 18806 vm.cancel = function () {
11283 18807 $uibModalInstance.dismiss('cancel');
11284 18808 };
11285 18809 }
11286 18810
11287 18811 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11288 18812 //
11289 18813 // Licensed under the Apache License, Version 2.0 (the "License");
11290 18814 // you may not use this file except in compliance with the License.
11291 18815 // You may obtain a copy of the License at
11292 18816 //
11293 18817 // http://www.apache.org/licenses/LICENSE-2.0
11294 18818 //
11295 18819 // Unless required by applicable law or agreed to in writing, software
11296 18820 // distributed under the License is distributed on an "AS IS" BASIS,
11297 18821 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11298 18822 // See the License for the specific language governing permissions and
11299 18823 // limitations under the License.
11300 18824
11301 18825 // This code is inspired by https://github.com/jettro/c3-angular-sample/tree/master/js
11302 18826 // License is MIT
11303 18827
11304 18828
11305 18829 angular.module('appenlight.directives.c3chart', [])
11306 18830 .controller('ChartCtrl', ['$scope', '$timeout', function ($scope, $timeout) {
11307 18831 $scope.chart = null;
11308 18832 this.showGraph = function () {
11309 18833 var config = angular.copy($scope.config);
11310 18834 var firstLoad = true;
11311 18835 config.bindto = "#" + $scope.domid;
11312 18836 var originalXTickCount = null;
11313 18837 if ($scope.data && $scope.config) {
11314 18838 if (!_.isEmpty($scope.data)) {
11315 18839 _.extend(config.data, angular.copy($scope.data));
11316 18840 }
11317 18841
11318 18842 config.onresized = function () {
11319 18843 if (this.currentWidth < 400){
11320 18844 $scope.chart.internal.config.axis_x_tick_culling_max = 3;
11321 18845 }
11322 18846 else if (this.currentWidth < 600){
11323 18847 $scope.chart.internal.config.axis_x_tick_culling_max = 5;
11324 18848 }
11325 18849 else{
11326 18850 $scope.chart.internal.config.axis_x_tick_culling_max = originalXTickCount;
11327 18851 }
11328 18852 $scope.chart.flush();
11329 18853 };
11330 18854
11331 18855
11332 18856 $scope.chart = c3.generate(config);
11333 18857 originalXTickCount = $scope.chart.internal.config.axis_x_tick_culling_max;
11334 18858 $scope.chart.internal.config.onresized.call($scope.chart.internal);
11335 18859 }
11336 18860
11337 18861 if ($scope.update) {
11338 18862
11339 18863 $scope.$watch('data', function () {
11340 18864 if (!firstLoad) {
11341 18865
11342 18866 $scope.chart.load(angular.copy($scope.data), {unload: true});
11343 18867 if (typeof $scope.data.groups != 'undefined') {
11344 18868
11345 18869 $scope.chart.groups($scope.data.groups);
11346 18870 }
11347 18871 if (typeof $scope.data.names != 'undefined') {
11348 18872
11349 18873 $scope.chart.data.names($scope.data.names);
11350 18874 }
11351 18875 $scope.chart.flush();
11352 18876 }
11353 18877 }, true);
11354 18878 }
11355 18879 $scope.$watch('config.regions', function (newValue, oldValue) {
11356 18880 if (newValue === oldValue) {
11357 18881 return
11358 18882 }
11359 18883 if (typeof $scope.config.regions != 'undefined') {
11360 18884
11361 18885 $scope.chart.regions($scope.config.regions);
11362 18886 }
11363 18887 });
11364 18888
11365 18889 firstLoad = false;
11366 18890 $scope.$watch('resizetrigger', function (newValue, oldValue) {
11367 18891 if (newValue !== oldValue) {
11368 18892 $timeout(function () {
11369 18893 $scope.chart.resize();
11370 18894 $scope.chart.internal.config.onresized.call($scope.chart.internal);
11371 18895 });
11372 18896 }
11373 18897 });
11374 18898 };
11375 18899 }])
11376 18900 .directive('c3chart', function ($timeout) {
11377 18901 var chartLinker = function (scope, element, attrs, chartCtrl) {
11378 18902 // Trick to wait for all rendering of the DOM to be finished.
11379 18903 // then we can tell c3js to "connect" to our dom node
11380 18904 $timeout(function () {
11381 18905 chartCtrl.showGraph()
11382 18906 });
11383 18907
11384 18908 scope.$on("$destroy", function () {
11385 18909 if (scope.chart !== null) {
11386 18910 scope.chart = scope.chart.destroy();
11387 18911 delete element;
11388 18912 delete scope.chart;
11389 18913 }
11390 18914 }
11391 18915 );
11392 18916 };
11393 18917 return {
11394 18918 "restrict": "E",
11395 18919 "controller": "ChartCtrl",
11396 18920 "scope": {
11397 18921 "domid": "@domid",
11398 18922 "config": "=config",
11399 18923 "data": "=data",
11400 18924 "resizetrigger": "=resizetrigger",
11401 18925 "update": "=update"
11402 18926 },
11403 18927 "template": "<div id='{{domid}}' class='chart'></div>",
11404 18928 "replace": true,
11405 18929 "link": chartLinker
11406 18930 }
11407 18931 });
11408 18932
11409 18933 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11410 18934 //
11411 18935 // Licensed under the Apache License, Version 2.0 (the "License");
11412 18936 // you may not use this file except in compliance with the License.
11413 18937 // You may obtain a copy of the License at
11414 18938 //
11415 18939 // http://www.apache.org/licenses/LICENSE-2.0
11416 18940 //
11417 18941 // Unless required by applicable law or agreed to in writing, software
11418 18942 // distributed under the License is distributed on an "AS IS" BASIS,
11419 18943 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11420 18944 // See the License for the specific language governing permissions and
11421 18945 // limitations under the License.
11422 18946
11423 18947 angular.module('appenlight.directives.confirmValidate', []).
11424 18948 directive('confirmValidate', [function () {
11425 18949 return {
11426 18950 restrict: 'A',
11427 18951 require: 'ngModel',
11428 18952 link: function ($scope, elem, attrs, ngModel) {
11429 18953 ngModel.$validators.confirm = function (modelValue, viewValue) {
11430 18954 var value = modelValue || viewValue;
11431 18955
11432 18956 if (value.toLowerCase() == 'confirm') {
11433 18957 return true;
11434 18958 }
11435 18959 return false;
11436 18960 }
11437 18961 }
11438 18962 }
11439 18963 }])
11440 18964
11441 18965 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11442 18966 //
11443 18967 // Licensed under the Apache License, Version 2.0 (the "License");
11444 18968 // you may not use this file except in compliance with the License.
11445 18969 // You may obtain a copy of the License at
11446 18970 //
11447 18971 // http://www.apache.org/licenses/LICENSE-2.0
11448 18972 //
11449 18973 // Unless required by applicable law or agreed to in writing, software
11450 18974 // distributed under the License is distributed on an "AS IS" BASIS,
11451 18975 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11452 18976 // See the License for the specific language governing permissions and
11453 18977 // limitations under the License.
11454 18978
11455 18979 angular.module('appenlight.directives.focus', []).directive('focus', function () {
11456 18980 return function (scope, element, attrs) {
11457 18981 attrs.$observe('focus', function (newValue) {
11458 18982 newValue === 'true' && element[0].focus();
11459 18983 });
11460 18984 }
11461 18985 });
11462 18986
11463 18987 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11464 18988 //
11465 18989 // Licensed under the Apache License, Version 2.0 (the "License");
11466 18990 // you may not use this file except in compliance with the License.
11467 18991 // You may obtain a copy of the License at
11468 18992 //
11469 18993 // http://www.apache.org/licenses/LICENSE-2.0
11470 18994 //
11471 18995 // Unless required by applicable law or agreed to in writing, software
11472 18996 // distributed under the License is distributed on an "AS IS" BASIS,
11473 18997 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11474 18998 // See the License for the specific language governing permissions and
11475 18999 // limitations under the License.
11476 19000
11477 19001 angular.module('appenlight.directives.formErrors', []).
11478 19002 directive('formErrors', function() {
11479 19003 return {
11480 19004 scope: {
11481 19005 errors: '='
11482 19006 },
11483 19007 template: '<div ng-repeat="errorMessage in errors"><div class="form-error alert alert-error">{{ errorMessage }}</div></div>'
11484 19008 }
11485 19009 })
11486 19010
11487 19011 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11488 19012 //
11489 19013 // Licensed under the Apache License, Version 2.0 (the "License");
11490 19014 // you may not use this file except in compliance with the License.
11491 19015 // You may obtain a copy of the License at
11492 19016 //
11493 19017 // http://www.apache.org/licenses/LICENSE-2.0
11494 19018 //
11495 19019 // Unless required by applicable law or agreed to in writing, software
11496 19020 // distributed under the License is distributed on an "AS IS" BASIS,
11497 19021 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11498 19022 // See the License for the specific language governing permissions and
11499 19023 // limitations under the License.
11500 19024
11501 19025 angular.module('appenlight.directives.humanFormat', []).
11502 19026 directive('humanFormat', [function () {
11503 19027 /* json inspector */
11504 19028 return {
11505 19029 restrict: "A",
11506 19030 scope: {
11507 19031 vars: '=',
11508 19032 },
11509 19033 "link": function (scope, element, attrs) {
11510 19034 scope.$watch('vars', function (newValue, oldValue, scope) {
11511 19035 element.empty();
11512 19036 element.append(JsonHuman.format(scope.vars));
11513 19037 });
11514 19038
11515 19039 }
11516 19040 }
11517 19041 }])
11518 19042
11519 19043 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11520 19044 //
11521 19045 // Licensed under the Apache License, Version 2.0 (the "License");
11522 19046 // you may not use this file except in compliance with the License.
11523 19047 // You may obtain a copy of the License at
11524 19048 //
11525 19049 // http://www.apache.org/licenses/LICENSE-2.0
11526 19050 //
11527 19051 // Unless required by applicable law or agreed to in writing, software
11528 19052 // distributed under the License is distributed on an "AS IS" BASIS,
11529 19053 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11530 19054 // See the License for the specific language governing permissions and
11531 19055 // limitations under the License.
11532 19056
11533 19057 angular.module('appenlight.directives.isoToRelativeTime', []).
11534 19058 directive('isoToRelativeTime', function () {
11535 19059 return {
11536 19060 "restrict": "E",
11537 19061 scope: {
11538 19062 time: '@'
11539 19063 },
11540 19064 "link": function (scope, element) {
11541 19065 scope.$watch('time', function(newValue, oldValue, scope){
11542 19066 element.empty();
11543 19067 element.html(moment.utc(newValue).fromNow());
11544 19068 });
11545 19069 }
11546 19070 }
11547 19071 })
11548 19072
11549 19073 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11550 19074 //
11551 19075 // Licensed under the Apache License, Version 2.0 (the "License");
11552 19076 // you may not use this file except in compliance with the License.
11553 19077 // You may obtain a copy of the License at
11554 19078 //
11555 19079 // http://www.apache.org/licenses/LICENSE-2.0
11556 19080 //
11557 19081 // Unless required by applicable law or agreed to in writing, software
11558 19082 // distributed under the License is distributed on an "AS IS" BASIS,
11559 19083 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11560 19084 // See the License for the specific language governing permissions and
11561 19085 // limitations under the License.
11562 19086
11563 19087 angular.module('appenlight.controllers')
11564 19088 .controller('ApplicationPermissionsController', ApplicationPermissionsController);
11565 19089
11566 19090 ApplicationPermissionsController.$inject = ['sectionViewResource',
11567 19091 'applicationsPropertyResource', 'groupsResource']
11568 19092
11569 19093
11570 19094 function ApplicationPermissionsController(sectionViewResource, applicationsPropertyResource , groupsResource) {
11571 19095 var vm = this;
11572 19096 vm.$onInit = function () {
11573 19097 vm.form = {
11574 19098 autocompleteUser: '',
11575 19099 selectedGroup: null,
11576 19100 selectedUserPermissions: {},
11577 19101 selectedGroupPermissions: {}
11578 19102 }
11579 19103 vm.possibleGroups = groupsResource.query(null, function () {
11580 19104 if (vm.possibleGroups.length > 0) {
11581 19105 vm.form.selectedGroup = vm.possibleGroups[0].id;
11582 19106 }
11583 19107 });
11584 19108
11585 19109 vm.possibleUsers = [];
11586 19110 _.each(vm.resource.possible_permissions, function (perm) {
11587 19111 vm.form.selectedUserPermissions[perm] = false;
11588 19112 vm.form.selectedGroupPermissions[perm] = false;
11589 19113 });
11590 19114
11591 19115 /**
11592 19116 * Converts the permission list into {user, permission_list objects}
11593 19117 * for rendering in templates
11594 19118 * **/
11595 19119 var tmpObj = {
11596 19120 user: {},
11597 19121 group: {}
11598 19122 };
11599 19123 _.each(vm.currentPermissions, function (perm) {
11600 19124
11601 19125 if (perm.type == 'user') {
11602 19126 if (typeof tmpObj[perm.type][perm.user_name] === 'undefined') {
11603 19127 tmpObj[perm.type][perm.user_name] = {
11604 19128 self: perm,
11605 19129 permissions: []
11606 19130 }
11607 19131 }
11608 19132 if (tmpObj[perm.type][perm.user_name].permissions.indexOf(perm.perm_name) === -1) {
11609 19133 tmpObj[perm.type][perm.user_name].permissions.push(perm.perm_name);
11610 19134 }
11611 19135 } else {
11612 19136 if (typeof tmpObj[perm.type][perm.group_name] === 'undefined') {
11613 19137 tmpObj[perm.type][perm.group_name] = {
11614 19138 self: perm,
11615 19139 permissions: []
11616 19140 }
11617 19141 }
11618 19142 if (tmpObj[perm.type][perm.group_name].permissions.indexOf(perm.perm_name) === -1) {
11619 19143 tmpObj[perm.type][perm.group_name].permissions.push(perm.perm_name);
11620 19144 }
11621 19145
11622 19146 }
11623 19147 });
11624 19148 vm.currentPermissions = {
11625 19149 user: _.values(tmpObj.user),
11626 19150 group: _.values(tmpObj.group),
11627 19151 };
11628 19152
11629 19153 }
11630 19154
11631 19155
11632 19156 vm.searchUsers = function (searchPhrase) {
11633 19157
11634 19158 vm.searchingUsers = true;
11635 19159 return sectionViewResource.query({
11636 19160 section: 'users_section',
11637 19161 view: 'search_users',
11638 19162 'user_name': searchPhrase
11639 19163 }).$promise.then(function (data) {
11640 19164 vm.searchingUsers = false;
11641 19165 return _.map(data, function (item) {
11642 19166 return item;
11643 19167 });
11644 19168 });
11645 19169 };
11646 19170
11647 19171
11648 19172 vm.setGroupPermission = function(){
11649 19173 var POSTObj = {
11650 19174 'group_id': vm.form.selectedGroup,
11651 19175 'permissions': []
11652 19176 };
11653 19177 for (var key in vm.form.selectedGroupPermissions) {
11654 19178 if (vm.form.selectedGroupPermissions[key]) {
11655 19179 POSTObj.permissions.push(key)
11656 19180 }
11657 19181 }
11658 19182 applicationsPropertyResource.save({
11659 19183 key: 'group_permissions',
11660 19184 resourceId: vm.resource.resource_id
11661 19185 }, POSTObj,
11662 19186 function (data) {
11663 19187 var found_row = false;
11664 19188 _.each(vm.currentPermissions.group, function (perm) {
11665 19189 if (perm.self.group_id == data.group.id) {
11666 19190 perm['permissions'] = data['permissions'];
11667 19191 found_row = true;
11668 19192 }
11669 19193 });
11670 19194 if (!found_row) {
11671 19195 data.self = data.group;
11672 19196 // normalize data format
11673 19197 data.self.group_id = data.self.id;
11674 19198 vm.currentPermissions.group.push(data);
11675 19199 }
11676 19200 });
11677 19201
11678 19202 }
11679 19203
11680 19204
11681 19205 vm.setUserPermission = function () {
11682 19206
11683 19207 var POSTObj = {
11684 19208 'user_name': vm.form.autocompleteUser,
11685 19209 'permissions': []
11686 19210 };
11687 19211 for (var key in vm.form.selectedUserPermissions) {
11688 19212 if (vm.form.selectedUserPermissions[key]) {
11689 19213 POSTObj.permissions.push(key)
11690 19214 }
11691 19215 }
11692 19216 applicationsPropertyResource.save({
11693 19217 key: 'user_permissions',
11694 19218 resourceId: vm.resource.resource_id
11695 19219 }, POSTObj,
11696 19220 function (data) {
11697 19221 var found_row = false;
11698 19222 _.each(vm.currentPermissions.user, function (perm) {
11699 19223 if (perm.self.user_name == data['user_name']) {
11700 19224 perm['permissions'] = data['permissions'];
11701 19225 found_row = true;
11702 19226 }
11703 19227 });
11704 19228 if (!found_row) {
11705 19229 data.self = data;
11706 19230 vm.currentPermissions.user.push(data);
11707 19231 }
11708 19232 });
11709 19233 }
11710 19234
11711 19235 vm.removeUserPermission = function (perm_name, curr_perm) {
11712 19236
11713 19237
11714 19238 var POSTObj = {
11715 19239 key: 'user_permissions',
11716 19240 user_name: curr_perm.self.user_name,
11717 19241 permissions: [perm_name],
11718 19242 resourceId: vm.resource.resource_id
11719 19243 }
11720 19244 applicationsPropertyResource.delete(POSTObj, function (data) {
11721 19245 _.each(vm.currentPermissions.user, function (perm) {
11722 19246 if (perm.self.user_name == data['user_name']) {
11723 19247 perm['permissions'] = data['permissions']
11724 19248 }
11725 19249 });
11726 19250 });
11727 19251 }
11728 19252
11729 19253 vm.removeGroupPermission = function (perm_name, curr_perm) {
11730 19254
11731 19255 var POSTObj = {
11732 19256 key: 'group_permissions',
11733 19257 group_id: curr_perm.self.group_id,
11734 19258 permissions: [perm_name],
11735 19259 resourceId: vm.resource.resource_id
11736 19260 }
11737 19261 applicationsPropertyResource.delete(POSTObj, function (data) {
11738 19262 _.each(vm.currentPermissions.group, function (perm) {
11739 19263 if (perm.self.group_id == data.group.id) {
11740 19264 perm['permissions'] = data['permissions']
11741 19265 }
11742 19266 });
11743 19267 });
11744 19268 }
11745 19269 }
11746 19270
11747 19271 angular.module('appenlight.directives.permissionsForm',[])
11748 19272 .directive('permissionsForm', function () {
11749 19273 return {
11750 19274 "restrict": "E",
11751 19275 "controller": "ApplicationPermissionsController",
11752 19276 controllerAs: 'permissions',
11753 19277 bindToController: true,
11754 19278 scope: {
11755 19279 currentPermissions: '=',
11756 19280 possiblePermissions: '=',
11757 19281 resource: '='
11758 19282 },
11759 19283 templateUrl: 'directives/permissions/permissions.html'
11760 19284 }
11761 19285 })
11762 19286
11763 19287 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11764 19288 //
11765 19289 // Licensed under the Apache License, Version 2.0 (the "License");
11766 19290 // you may not use this file except in compliance with the License.
11767 19291 // You may obtain a copy of the License at
11768 19292 //
11769 19293 // http://www.apache.org/licenses/LICENSE-2.0
11770 19294 //
11771 19295 // Unless required by applicable law or agreed to in writing, software
11772 19296 // distributed under the License is distributed on an "AS IS" BASIS,
11773 19297 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11774 19298 // See the License for the specific language governing permissions and
11775 19299 // limitations under the License.
11776 19300
11777 19301 angular.module('appenlight.directives.pluginConfig', []).directive('pluginConfig', function () {
11778 19302 return {
11779 19303 scope: {},
11780 19304 bindToController: {
11781 19305 resource: '=',
11782 19306 section: '='
11783 19307 },
11784 19308 restrict: 'E',
11785 19309 templateUrl: 'directives/plugin_config/plugin_config.html',
11786 19310 controller: PluginConfig,
11787 19311 controllerAs: 'plugin_ctrlr'
11788 19312 };
11789 19313
11790 19314 PluginConfig.$inject = ['stateHolder'];
11791 19315
11792 19316 function PluginConfig(stateHolder) {
11793 19317 this.$onInit = function () {
11794 19318 this.plugins = {};
11795 19319 this.inclusions = stateHolder.plugins.inclusions[this.section];
11796 19320 }
11797 19321 }
11798 19322 });
11799 19323
11800 19324 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11801 19325 //
11802 19326 // Licensed under the Apache License, Version 2.0 (the "License");
11803 19327 // you may not use this file except in compliance with the License.
11804 19328 // You may obtain a copy of the License at
11805 19329 //
11806 19330 // http://www.apache.org/licenses/LICENSE-2.0
11807 19331 //
11808 19332 // Unless required by applicable law or agreed to in writing, software
11809 19333 // distributed under the License is distributed on an "AS IS" BASIS,
11810 19334 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11811 19335 // See the License for the specific language governing permissions and
11812 19336 // limitations under the License.
11813 19337
11814 19338 angular.module('appenlight.directives.postProcessAction', []).directive('postProcessAction', ['applicationsPropertyResource', function (applicationsPropertyResource) {
11815 19339 return {
11816 19340 scope: {},
11817 19341 bindToController: {
11818 19342 action: '=',
11819 19343 resource: '='
11820 19344 },
11821 19345 controller: postProcessActionController,
11822 19346 controllerAs: 'ctrl',
11823 19347 restrict: 'E',
11824 19348 templateUrl: 'directives/postprocess_action/postprocess_action.html'
11825 19349 };
11826 19350
11827 19351 function postProcessActionController() {
11828 19352 var vm = this;
11829 19353 vm.$onInit = function () {
11830 19354
11831 19355 var allOps = {
11832 19356 'eq': 'Equal',
11833 19357 'ne': 'Not equal',
11834 19358 'ge': 'Greater or equal',
11835 19359 'gt': 'Greater than',
11836 19360 'le': 'Lesser or equal',
11837 19361 'lt': 'Lesser than',
11838 19362 'startswith': 'Starts with',
11839 19363 'endswith': 'Ends with',
11840 19364 'contains': 'Contains'
11841 19365 };
11842 19366
11843 19367 var fieldOps = {};
11844 19368 fieldOps['http_status'] = ['eq', 'ne', 'ge', 'le'];
11845 19369 fieldOps['group:priority'] = ['eq', 'ne', 'ge', 'le'];
11846 19370 fieldOps['duration'] = ['ge', 'le'];
11847 19371 fieldOps['url_domain'] = ['eq', 'ne', 'startswith', 'endswith',
11848 19372 'contains'];
11849 19373 fieldOps['url_path'] = ['eq', 'ne', 'startswith', 'endswith',
11850 19374 'contains'];
11851 19375 fieldOps['error'] = ['eq', 'ne', 'startswith', 'endswith',
11852 19376 'contains'];
11853 19377 fieldOps['tags:server_name'] = ['eq', 'ne', 'startswith', 'endswith',
11854 19378 'contains'];
11855 19379 fieldOps['group:occurences'] = ['eq', 'ne', 'ge', 'le'];
11856 19380
11857 19381 var possibleFields = {
11858 19382 '__AND__': 'All met (composite rule)',
11859 19383 '__OR__': 'One met (composite rule)',
11860 19384 '__NOT__': 'Not met (composite rule)',
11861 19385 'http_status': 'HTTP Status',
11862 19386 'duration': 'Request duration',
11863 19387 'group:priority': 'Group -> Priority',
11864 19388 'url_domain': 'Domain',
11865 19389 'url_path': 'URL Path',
11866 19390 'error': 'Error',
11867 19391 'tags:server_name': 'Tag -> Server name',
11868 19392 'group:occurences': 'Group -> Occurences'
11869 19393 };
11870 19394
11871 19395 vm.ruleDefinitions = {
11872 19396 fieldOps: fieldOps,
11873 19397 allOps: allOps,
11874 19398 possibleFields: possibleFields
11875 19399 };
11876 19400
11877 19401 vm.possibleActions = [
11878 19402 ['1', 'Priority +1'],
11879 19403 ['-1', 'Priority -1']
11880 19404 ];
11881 19405 }
11882 19406 vm.deleteAction = function (action) {
11883 19407 applicationsPropertyResource.remove({
11884 19408 pkey: vm.action.pkey,
11885 19409 resourceId: vm.resource.resource_id,
11886 19410 key: 'postprocessing_rules'
11887 19411 }, function () {
11888 19412 vm.resource.postprocessing_rules.splice(
11889 19413 vm.resource.postprocessing_rules.indexOf(action), 1);
11890 19414 });
11891 19415 };
11892 19416
11893 19417
11894 19418 vm.saveAction = function () {
11895 19419 var params = {
11896 19420 'pkey': vm.action.pkey,
11897 19421 'resourceId': vm.resource.resource_id,
11898 19422 key: 'postprocessing_rules'
11899 19423 };
11900 19424 applicationsPropertyResource.update(params, vm.action,
11901 19425 function (data) {
11902 19426 vm.action.dirty = false;
11903 19427 vm.errors = [];
11904 19428 }, function (response) {
11905 19429 if (response.status == 422) {
11906 19430 var errorDict = angular.fromJson(response.data);
11907 19431 vm.errors = _.values(errorDict);
11908 19432 }
11909 19433 });
11910 19434 };
11911 19435
11912 19436 vm.setDirty = function () {
11913 19437 vm.action.dirty = true;
11914 19438
11915 19439 };
11916 19440 }
11917 19441
11918 19442 }]);
11919 19443
11920 19444 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11921 19445 //
11922 19446 // Licensed under the Apache License, Version 2.0 (the "License");
11923 19447 // you may not use this file except in compliance with the License.
11924 19448 // You may obtain a copy of the License at
11925 19449 //
11926 19450 // http://www.apache.org/licenses/LICENSE-2.0
11927 19451 //
11928 19452 // Unless required by applicable law or agreed to in writing, software
11929 19453 // distributed under the License is distributed on an "AS IS" BASIS,
11930 19454 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11931 19455 // See the License for the specific language governing permissions and
11932 19456 // limitations under the License.
11933 19457
11934 19458 angular.module('appenlight.directives.recursive', []).directive("recursive", function ($compile) {
11935 19459 return {
11936 19460 restrict: "EACM",
11937 19461 priority: 100000,
11938 19462 compile: function (tElement, tAttr) {
11939 19463 var contents = tElement.contents().remove();
11940 19464 var compiledContents;
11941 19465 return function (scope, iElement, iAttr) {
11942 19466 if (!compiledContents) {
11943 19467 compiledContents = $compile(contents);
11944 19468 }
11945 19469 iElement.append(compiledContents(scope, function (clone) {
11946 19470 return clone;
11947 19471 }));
11948 19472 };
11949 19473 }
11950 19474 };
11951 19475 });
11952 19476
11953 19477 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
11954 19478 //
11955 19479 // Licensed under the Apache License, Version 2.0 (the "License");
11956 19480 // you may not use this file except in compliance with the License.
11957 19481 // You may obtain a copy of the License at
11958 19482 //
11959 19483 // http://www.apache.org/licenses/LICENSE-2.0
11960 19484 //
11961 19485 // Unless required by applicable law or agreed to in writing, software
11962 19486 // distributed under the License is distributed on an "AS IS" BASIS,
11963 19487 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11964 19488 // See the License for the specific language governing permissions and
11965 19489 // limitations under the License.
11966 19490
11967 19491 angular.module('appenlight.directives.reportAlertAction', []).directive('reportAlertAction', ['userSelfPropertyResource', function (userSelfPropertyResource) {
11968 19492 return {
11969 19493 scope: {},
11970 19494 bindToController: {
11971 19495 action: '=',
11972 19496 applications: '=',
11973 19497 possibleChannels: '=',
11974 19498 actions: '=',
11975 19499 ruleDefinitions: '='
11976 19500 },
11977 19501 controller: reportAlertActionController,
11978 19502 controllerAs: 'ctrl',
11979 19503 restrict: 'E',
11980 19504 templateUrl: 'directives/report_alert_action/report_alert_action.html'
11981 19505 };
11982 19506
11983 19507 function reportAlertActionController() {
11984 19508 var vm = this;
11985 19509 vm.$onInit = function () {
11986 19510 vm.possibleNotifications = [
11987 19511 ['always', 'Always'],
11988 19512 ['only_first', 'Only New'],
11989 19513 ];
11990 19514
11991 19515 vm.possibleChannels = _.filter(vm.possibleChannels, function (c) {
11992 19516 return c.supports_report_alerting
11993 19517 }
11994 19518 );
11995 19519
11996 19520 if (vm.possibleChannels.length > 0) {
11997 19521 vm.channelToBind = vm.possibleChannels[0];
11998 19522 }
11999 19523 }
12000 19524 vm.deleteAction = function (actions, action) {
12001 19525 var get = {
12002 19526 key: 'alert_channels_rules',
12003 19527 pkey: action.pkey
12004 19528 };
12005 19529 userSelfPropertyResource.remove(get, function (data) {
12006 19530 actions.splice(actions.indexOf(action), 1);
12007 19531 });
12008 19532
12009 19533 };
12010 19534
12011 19535 vm.bindChannel = function () {
12012 19536 var post = {
12013 19537 channel_pkey: vm.channelToBind.pkey,
12014 19538 action_pkey: vm.action.pkey
12015 19539 };
12016 19540
12017 19541 userSelfPropertyResource.save({key: 'alert_channels_actions_binds'}, post,
12018 19542 function (data) {
12019 19543 vm.action.channels = [];
12020 19544 vm.action.channels = data.channels;
12021 19545 }, function (response) {
12022 19546 if (response.status == 422) {
12023 19547
12024 19548 }
12025 19549 });
12026 19550 };
12027 19551
12028 19552 vm.unBindChannel = function (channel) {
12029 19553 userSelfPropertyResource.delete({
12030 19554 key: 'alert_channels_actions_binds',
12031 19555 channel_pkey: channel.pkey,
12032 19556 action_pkey: vm.action.pkey
12033 19557 },
12034 19558 function (data) {
12035 19559 vm.action.channels = [];
12036 19560 vm.action.channels = data.channels;
12037 19561 }, function (response) {
12038 19562 if (response.status == 422) {
12039 19563
12040 19564 }
12041 19565 });
12042 19566 };
12043 19567
12044 19568 vm.saveAction = function () {
12045 19569 var params = {
12046 19570 key: 'alert_channels_rules',
12047 19571 pkey: vm.action.pkey
12048 19572 };
12049 19573 userSelfPropertyResource.update(params, vm.action,
12050 19574 function (data) {
12051 19575 vm.action.dirty = false;
12052 19576 vm.errors = [];
12053 19577 }, function (response) {
12054 19578 if (response.status == 422) {
12055 19579 var errorDict = angular.fromJson(response.data);
12056 19580 vm.errors = _.values(errorDict);
12057 19581 }
12058 19582 });
12059 19583 };
12060 19584
12061 19585 vm.setDirty = function () {
12062 19586 vm.action.dirty = true;
12063 19587
12064 19588 };
12065 19589 }
12066 19590
12067 19591 }]);
12068 19592
12069 19593 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12070 19594 //
12071 19595 // Licensed under the Apache License, Version 2.0 (the "License");
12072 19596 // you may not use this file except in compliance with the License.
12073 19597 // You may obtain a copy of the License at
12074 19598 //
12075 19599 // http://www.apache.org/licenses/LICENSE-2.0
12076 19600 //
12077 19601 // Unless required by applicable law or agreed to in writing, software
12078 19602 // distributed under the License is distributed on an "AS IS" BASIS,
12079 19603 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12080 19604 // See the License for the specific language governing permissions and
12081 19605 // limitations under the License.
12082 19606
12083 19607 angular.module('appenlight.directives.ruleReadOnly', []).directive('ruleReadOnly', ['userSelfPropertyResource', function (userSelfPropertyResource) {
12084 19608 return {
12085 19609 scope: {},
12086 19610 bindToController: {
12087 19611 parentObj: '=',
12088 19612 rule: '=',
12089 19613 ruleDefinitions: '=',
12090 19614 parentRule: "=",
12091 19615 config: "="
12092 19616 },
12093 19617 restrict: 'E',
12094 19618 templateUrl: 'directives/rule_read_only/rule_read_only.html',
12095 19619 controller: RuleController,
12096 19620 controllerAs: 'rule_ctrlr'
12097 19621 }
12098 19622
12099 19623 function RuleController() {
12100 19624 var vm = this;
12101 19625 vm.$onInit = function () {
12102 19626 vm.readOnlyPossibleFields = {};
12103 19627 var labelPairs = _.pairs(vm.parentObj.config);
12104 19628 _.each(labelPairs, function (entry) {
12105 19629 vm.readOnlyPossibleFields[entry[0]] = entry[1].human_label;
12106 19630 });
12107 19631 }
12108 19632 }
12109 19633 }]);
12110 19634
12111 19635 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12112 19636 //
12113 19637 // Licensed under the Apache License, Version 2.0 (the "License");
12114 19638 // you may not use this file except in compliance with the License.
12115 19639 // You may obtain a copy of the License at
12116 19640 //
12117 19641 // http://www.apache.org/licenses/LICENSE-2.0
12118 19642 //
12119 19643 // Unless required by applicable law or agreed to in writing, software
12120 19644 // distributed under the License is distributed on an "AS IS" BASIS,
12121 19645 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12122 19646 // See the License for the specific language governing permissions and
12123 19647 // limitations under the License.
12124 19648
12125 19649 angular.module('appenlight.directives.rule', []).directive('rule', function () {
12126 19650 return {
12127 19651 scope: {},
12128 19652 bindToController:{
12129 19653 parentObj: '=',
12130 19654 rule: '=',
12131 19655 ruleDefinitions: '=',
12132 19656 parentRule: "=",
12133 19657 config: "="
12134 19658 },
12135 19659 restrict: 'E',
12136 19660 templateUrl: 'directives/rule/rule.html',
12137 19661 controller:RuleController,
12138 19662 controllerAs:'rule_ctrlr'
12139 19663 };
12140 19664 function RuleController(){
12141 19665 var vm = this;
12142 19666 vm.$onInit = function () {
12143 19667 vm.rule.dirty = false;
12144 19668 vm.oldField = vm.rule.field;
12145 19669 }
12146 19670 vm.add = function () {
12147 19671 vm.rule.rules.push(
12148 19672 {op: "eq", field: 'http_status', value: ""}
12149 19673 );
12150 19674 vm.setDirty();
12151 19675 };
12152 19676
12153 19677 vm.setDirty = function() {
12154 19678 vm.rule.dirty = true;
12155 19679
12156 19680 if (vm.parentObj){
12157 19681
12158 19682
12159 19683 vm.parentObj.dirty = true;
12160 19684 }
12161 19685 };
12162 19686
12163 19687 vm.fieldChange = function () {
12164 19688 var compound_types = ['__AND__', '__OR__', '__NOT__'];
12165 19689 var new_is_compound = compound_types.indexOf(vm.rule.field) !== -1;
12166 19690 var old_was_compound = compound_types.indexOf(vm.oldField) !== -1;
12167 19691
12168 19692 if (!new_is_compound) {
12169 19693 vm.rule.op = vm.ruleDefinitions.fieldOps[vm.rule.field][0];
12170 19694 }
12171 19695 if ((new_is_compound && !old_was_compound)) {
12172 19696
12173 19697 delete vm.rule.value;
12174 19698 vm.rule.rules = [];
12175 19699 vm.add();
12176 19700 }
12177 19701 else if (!new_is_compound && old_was_compound) {
12178 19702
12179 19703 delete vm.rule.rules;
12180 19704 vm.rule.value = '';
12181 19705 }
12182 19706 vm.oldField = vm.rule.field;
12183 19707 vm.setDirty();
12184 19708 };
12185 19709
12186 19710 vm.deleteRule = function (parent, rule) {
12187 19711 parent.rules.splice(parent.rules.indexOf(rule), 1);
12188 19712 vm.setDirty();
12189 19713 }
12190 19714 }
12191 19715 });
12192 19716
12193 19717 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12194 19718 //
12195 19719 // Licensed under the Apache License, Version 2.0 (the "License");
12196 19720 // you may not use this file except in compliance with the License.
12197 19721 // You may obtain a copy of the License at
12198 19722 //
12199 19723 // http://www.apache.org/licenses/LICENSE-2.0
12200 19724 //
12201 19725 // Unless required by applicable law or agreed to in writing, software
12202 19726 // distributed under the License is distributed on an "AS IS" BASIS,
12203 19727 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12204 19728 // See the License for the specific language governing permissions and
12205 19729 // limitations under the License.
12206 19730
12207 19731 angular.module('appenlight.directives.smallReportGroupList',[]).
12208 19732 directive('smallReportGroupList', [function () {
12209 19733 return {
12210 19734 restrict: "A",
12211 19735 scope: {
12212 19736 groups: '=',
12213 19737 applications: '='
12214 19738 },
12215 19739 templateUrl: 'templates/reports/small_report_group_list.html'
12216 19740 }
12217 19741 }])
12218 19742
12219 19743 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12220 19744 //
12221 19745 // Licensed under the Apache License, Version 2.0 (the "License");
12222 19746 // you may not use this file except in compliance with the License.
12223 19747 // You may obtain a copy of the License at
12224 19748 //
12225 19749 // http://www.apache.org/licenses/LICENSE-2.0
12226 19750 //
12227 19751 // Unless required by applicable law or agreed to in writing, software
12228 19752 // distributed under the License is distributed on an "AS IS" BASIS,
12229 19753 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12230 19754 // See the License for the specific language governing permissions and
12231 19755 // limitations under the License.
12232 19756
12233 19757 angular.module('appenlight.directives.smallReportList', []).
12234 19758 directive('smallReportList', [function () {
12235 19759 return {
12236 19760 restrict: "A",
12237 19761 scope: {
12238 19762 reports: '=',
12239 19763 applications: '='
12240 19764 },
12241 19765 templateUrl: 'templates/reports/small_report_list.html'
12242 19766 }
12243 19767 }])
12244 19768
12245 19769 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12246 19770 //
12247 19771 // Licensed under the Apache License, Version 2.0 (the "License");
12248 19772 // you may not use this file except in compliance with the License.
12249 19773 // You may obtain a copy of the License at
12250 19774 //
12251 19775 // http://www.apache.org/licenses/LICENSE-2.0
12252 19776 //
12253 19777 // Unless required by applicable law or agreed to in writing, software
12254 19778 // distributed under the License is distributed on an "AS IS" BASIS,
12255 19779 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12256 19780 // See the License for the specific language governing permissions and
12257 19781 // limitations under the License.
12258 19782
12259 19783 'use strict';
12260 19784
12261 19785 /* Filters */
12262 19786
12263 19787 angular.module('appenlight.filters').
12264 19788 filter('interpolate', ['version', function (version) {
12265 19789 return function (text) {
12266 19790 return String(text).replace(/\%VERSION\%/mg, version);
12267 19791 }
12268 19792 }])
12269 19793 .filter('isoToRelativeTime', function () {
12270 19794 return function (input) {
12271 19795 return moment.utc(input).fromNow();
12272 19796 }
12273 19797 })
12274 19798
12275 19799 .filter('round', function () {
12276 19800 return function (input, precision) {
12277 19801 return input.toFixed(precision)
12278 19802 }
12279 19803 })
12280 19804
12281 19805 .filter('numberToThousands', function () {
12282 19806 return function (input) {
12283 19807 if (input > 1000000) {
12284 19808 var i = input / 1000000;
12285 19809 return i.toFixed(1).toString() + 'M'
12286 19810 }
12287 19811 else if (input > 1000) {
12288 19812 var i = input / 1000;
12289 19813 return i.toFixed(1).toString() + 'k'
12290 19814 }
12291 19815 else {
12292 19816 return input;
12293 19817 }
12294 19818 }
12295 19819 })
12296 19820 .filter('getOrdered', function () {
12297 19821 return function (input, filterOn) {
12298 19822 var ordered = {};
12299 19823 for (var key in input) {
12300 19824 ordered[input[key][filterOn]] = input[key];
12301 19825 }
12302 19826 return ordered;
12303 19827 };
12304 19828 })
12305 19829 .filter('objectToOrderedArray', function(){
12306 19830 return function(items, field, reverse) {
12307 19831 var filtered = [];
12308 19832 angular.forEach(items, function(item) {
12309 19833 filtered.push(item);
12310 19834 });
12311 19835 filtered.sort(function (a, b) {
12312 19836 return (a[field] > b[field] ? 1 : -1);
12313 19837 });
12314 19838 if(reverse) filtered.reverse();
12315 19839 return filtered;
12316 19840 };
12317 19841 })
12318 19842 .filter('apdexValue', function () {
12319 19843 return function (input) {
12320 19844 if (input.apdex >= 95) {
12321 19845 return 'satisfactory';
12322 19846 } else if (input.apdex >= 80) {
12323 19847 return 'tolerating';
12324 19848 } else {
12325 19849 return 'frustrating';
12326 19850 }
12327 19851 };
12328 19852 })
12329 19853 .filter('truncate', function(){
12330 19854 return function (text, length, end) {
12331 19855 if (isNaN(length))
12332 19856 length = 10;
12333 19857
12334 19858 if (end === undefined)
12335 19859 end = "...";
12336 19860
12337 19861 if (text.length <= length || text.length - end.length <= length) {
12338 19862 return text;
12339 19863 }
12340 19864 else {
12341 19865 return String(text).substring(0, length-end.length) + end;
12342 19866 }
12343 19867
12344 19868 };
12345 19869 })
12346 19870
12347 19871 ;
12348 19872
12349 19873 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12350 19874 //
12351 19875 // Licensed under the Apache License, Version 2.0 (the "License");
12352 19876 // you may not use this file except in compliance with the License.
12353 19877 // You may obtain a copy of the License at
12354 19878 //
12355 19879 // http://www.apache.org/licenses/LICENSE-2.0
12356 19880 //
12357 19881 // Unless required by applicable law or agreed to in writing, software
12358 19882 // distributed under the License is distributed on an "AS IS" BASIS,
12359 19883 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12360 19884 // See the License for the specific language governing permissions and
12361 19885 // limitations under the License.
12362 19886
12363 19887 angular.module('appenlight').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
12364 19888
12365 19889 $urlRouterProvider.otherwise('/ui');
12366 19890
12367 19891 $stateProvider.state('logs', {
12368 19892 url: '/ui/logs?resource',
12369 19893 component: 'logsBrowserView'
12370 19894 });
12371 19895
12372 19896 $stateProvider.state('front_dashboard', {
12373 19897 url: '/ui',
12374 19898 component: 'indexDashboardView'
12375 19899 });
12376 19900
12377 19901 $stateProvider.state('report', {
12378 19902 abstract: true,
12379 19903 url: '/ui/report',
12380 19904 template: '<ui-view></ui-view>'
12381 19905 });
12382 19906
12383 19907 $stateProvider.state('report.list', {
12384 19908 url: '/list?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource',
12385 19909 component: 'reportsBrowserView'
12386 19910 });
12387 19911
12388 19912 $stateProvider.state('report.list_slow', {
12389 19913 url: '/list_slow?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource',
12390 19914 component: 'reportsSlowBrowserView'
12391 19915 });
12392 19916
12393 19917 $stateProvider.state('report.view_detail', {
12394 19918 url: '/:groupId/:reportId',
12395 19919 component: 'reportView'
12396 19920 });
12397 19921 $stateProvider.state('report.view_group', {
12398 19922 url: '/:groupId',
12399 19923 component: 'reportView'
12400 19924 });
12401 19925 $stateProvider.state('events', {
12402 19926 url: '/ui/events',
12403 19927 component: 'eventBrowserView'
12404 19928 });
12405 19929 $stateProvider.state('admin', {
12406 19930 url: '/ui/admin',
12407 19931 component: 'adminView'
12408 19932 });
12409 19933 $stateProvider.state('admin.user', {
12410 19934 abstract: true,
12411 19935 url: '/user',
12412 19936 template: '<ui-view></ui-view>'
12413 19937 });
12414 19938 $stateProvider.state('admin.user.list', {
12415 19939 url: '/list',
12416 19940 component: 'adminUsersListView'
12417 19941 });
12418 19942 $stateProvider.state('admin.user.create', {
12419 19943 url: '/create',
12420 19944 component: 'adminUsersCreateView'
12421 19945 });
12422 19946 $stateProvider.state('admin.user.update', {
12423 19947 url: '/{userId}/update',
12424 19948 component: 'adminUsersCreateView'
12425 19949 });
12426 19950
12427 19951
12428 19952 $stateProvider.state('admin.group', {
12429 19953 abstract: true,
12430 19954 url: '/group',
12431 19955 template: '<ui-view></ui-view>'
12432 19956 });
12433 19957 $stateProvider.state('admin.group.list', {
12434 19958 url: '/list',
12435 19959 component: 'adminGroupsListView'
12436 19960 });
12437 19961 $stateProvider.state('admin.group.create', {
12438 19962 url: '/create',
12439 19963 component: 'adminGroupsCreateView'
12440 19964 });
12441 19965 $stateProvider.state('admin.group.update', {
12442 19966 url: '/{groupId}/update',
12443 19967 component: 'adminGroupsCreateView'
12444 19968 });
12445 19969
12446 19970 $stateProvider.state('admin.application', {
12447 19971 abstract: true,
12448 19972 url: '/application',
12449 19973 template: '<ui-view></ui-view>'
12450 19974 });
12451 19975
12452 19976 $stateProvider.state('admin.application.list', {
12453 19977 url: '/list',
12454 19978 component: 'adminApplicationsListView'
12455 19979 });
12456 19980
12457 19981 $stateProvider.state('admin.partitions', {
12458 19982 url: '/partitions',
12459 19983 component: 'adminPartitionsView'
12460 19984 });
12461 19985 $stateProvider.state('admin.system', {
12462 19986 url: '/system',
12463 19987 component: 'adminSystemView'
12464 19988 });
12465 19989
12466 19990 $stateProvider.state('admin.configs', {
12467 19991 abstract: true,
12468 19992 url: '/configs',
12469 19993 template: '<ui-view></ui-view>'
12470 19994 });
12471 19995
12472 19996 $stateProvider.state('admin.configs.list', {
12473 19997 url: '/list',
12474 19998 component: 'adminConfigurationView'
12475 19999 });
12476 20000
12477 20001 $stateProvider.state('user', {
12478 20002 url: '/ui/user',
12479 20003 component: 'settingsView'
12480 20004 });
12481 20005
12482 20006 $stateProvider.state('user.profile', {
12483 20007 abstract: true,
12484 20008 template: '<ui-view></ui-view>'
12485 20009 });
12486 20010 $stateProvider.state('user.profile.edit', {
12487 20011 url: '/profile',
12488 20012 component: 'userProfileView'
12489 20013 });
12490 20014
12491 20015
12492 20016 $stateProvider.state('user.profile.password', {
12493 20017 url: '/password',
12494 20018 component: 'userPasswordView'
12495 20019 });
12496 20020
12497 20021 $stateProvider.state('user.profile.identities', {
12498 20022 url: '/identities',
12499 20023 component: 'userIdentitiesView'
12500 20024 });
12501 20025
12502 20026 $stateProvider.state('user.profile.auth_tokens', {
12503 20027 url: '/auth_tokens',
12504 20028 component: 'userAuthTokensView'
12505 20029 });
12506 20030
12507 20031 $stateProvider.state('user.alert_channels', {
12508 20032 abstract: true,
12509 20033 url: '/alert_channels',
12510 20034 template: '<ui-view></ui-view>'
12511 20035 });
12512 20036
12513 20037 $stateProvider.state('user.alert_channels.list', {
12514 20038 url: '/list',
12515 20039 component: 'userAlertChannelsListView'
12516 20040 });
12517 20041
12518 20042 $stateProvider.state('user.alert_channels.email', {
12519 20043 url: '/email',
12520 20044 component: 'userAlertChannelsEmailNewView'
12521 20045 });
12522 20046
12523 20047 $stateProvider.state('applications', {
12524 20048 abstract: true,
12525 20049 url: '/ui/applications',
12526 20050 component: 'settingsView'
12527 20051 });
12528 20052
12529 20053 $stateProvider.state('applications.list', {
12530 20054 url: '/list',
12531 20055 component: 'applicationsListView'
12532 20056 });
12533 20057 $stateProvider.state('applications.update', {
12534 20058 url: '/{resourceId}/update',
12535 20059 component: 'applicationsUpdateView'
12536 20060 });
12537 20061
12538 20062 $stateProvider.state('applications.integrations', {
12539 20063 url: '/{resourceId}/integrations',
12540 20064 component: 'integrationsListView',
12541 20065 data: {
12542 20066 resource: null
12543 20067 }
12544 20068 });
12545 20069
12546 20070 $stateProvider.state('applications.purge_logs', {
12547 20071 url: '/purge_logs',
12548 20072 component: 'applicationsPurgeLogsView'
12549 20073 });
12550 20074
12551 20075 $stateProvider.state('applications.integrations.edit', {
12552 20076 url: '/{integration}',
12553 20077 template: function ($stateParams) {
12554 20078 return '<'+ $stateParams.integration + '-integration-config-view>'
12555 20079 }
12556 20080 });
12557 20081
12558 20082 $stateProvider.state('tests', {
12559 20083 url: '/ui/tests',
12560 20084 templateUrl: 'templates/user/alert_channels_test.html',
12561 20085 controller: 'AlertChannelsTestController as test_action'
12562 20086 });
12563 20087
12564 20088 }]);
12565 20089
12566 20090 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12567 20091 //
12568 20092 // Licensed under the Apache License, Version 2.0 (the "License");
12569 20093 // you may not use this file except in compliance with the License.
12570 20094 // You may obtain a copy of the License at
12571 20095 //
12572 20096 // http://www.apache.org/licenses/LICENSE-2.0
12573 20097 //
12574 20098 // Unless required by applicable law or agreed to in writing, software
12575 20099 // distributed under the License is distributed on an "AS IS" BASIS,
12576 20100 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12577 20101 // See the License for the specific language governing permissions and
12578 20102 // limitations under the License.
12579 20103
12580 20104 angular.module('appenlight.services.chartResultParser',[]).factory('chartResultParser', function () {
12581 20105
12582 20106 function transform(data) {
12583 20107
12584 20108 /** transform result to a format that is more friendly
12585 20109 * to c3js we don't want to export this way as default
12586 20110 * as TSV stuff is less readable overall
12587 20111 *
12588 20112 * we want format of:
12589 20113 * {x: [unix_timestamps],
12590 20114 * key1: [val,list],
12591 20115 * key2: [val,list]...}
12592 20116 *
12593 20117 * OR
12594 20118 *
12595 20119 * handle special case where we want pie/donut for
12596 20120 * aggregation with a single metric, we need to transform
12597 20121 * the data from:
12598 20122 * [y:list, categories:[cat1,cat2,...]]
12599 20123 * to
12600 20124 * [cat1: val, cat2:val...] format to render properly
12601 20125 */
12602 20126 var chartC3Config = {
12603 20127 data: {
12604 20128 json: [],
12605 20129 type: 'bar'
12606 20130 },
12607 20131 point: {
12608 20132 show: false
12609 20133 },
12610 20134 tooltip: {
12611 20135 format: {
12612 20136 title: function (d) {
12613 20137 if (d) {
12614 20138 return '' + d;
12615 20139 }
12616 20140 return '';
12617 20141 },
12618 20142 value: function (value, ratio, id, index) {
12619 20143 return d3.round(value, 3);
12620 20144 }
12621 20145 }
12622 20146 },
12623 20147 regions: data.rect_regions
12624 20148 };
12625 20149 var labels = _.keys(data.system_labels);
12626 20150 var specialCases = ['pie', 'donut', 'gauge'];
12627 20151 if (labels.length === 1 && _.contains(specialCases,
12628 20152 data.chart_type.type)) {
12629 20153 var transformedData = {};
12630 20154
12631 20155 _.each(data.series, function (item) {
12632 20156 transformedData[item['key']] = item[labels[0]];
12633 20157 });
12634 20158 }
12635 20159 else {
12636 20160 var transformedData = {'key': []};
12637 20161
12638 20162 _.each(labels, function (label) {
12639 20163 transformedData[label] = [];
12640 20164 });
12641 20165
12642 20166 _.each(data.series, function (item) {
12643 20167 for (key in item) {
12644 20168 transformedData[key].push(item[key])
12645 20169 }
12646 20170 });
12647 20171 }
12648 20172
12649 20173
12650 20174 if (data.parent_agg.type === 'time_histogram') {
12651 20175 chartC3Config.axis = {
12652 20176 x: {
12653 20177 type: 'timeseries',
12654 20178 tick: {
12655 20179 format: '%Y-%m-%d'
12656 20180 }
12657 20181 }
12658 20182 };
12659 20183 chartC3Config.data.xFormat = '%Y-%m-%dT%H:%M:%S';
12660 20184 }
12661 20185 else if (data.categories) {
12662 20186 chartC3Config.axis = {
12663 20187 x: {
12664 20188 type: 'category',
12665 20189 categories: data.categories
12666 20190 }
12667 20191 };
12668 20192 // we don't want to show key as label if it is being
12669 20193 // used as a category instead
12670 20194 if (data.categories) {
12671 20195 delete transformedData['key'];
12672 20196 }
12673 20197 }
12674 20198
12675 20199 var human_labels = {};
12676 20200 _.each(_.pairs(data.system_labels), function(entry){
12677 20201 human_labels[entry[0]] = entry[1].human_label;
12678 20202 });
12679 20203 var chartC3Data = {
12680 20204 json: transformedData,
12681 20205 names: human_labels,
12682 20206 groups: data.groups,
12683 20207 type: data.chart_type.type
12684 20208 };
12685 20209
12686 20210 if (data.parent_agg.type == 'time_histogram') {
12687 20211 chartC3Data.x = 'key';
12688 20212 }
12689 20213 return {chartC3Data: chartC3Data, chartC3Config: chartC3Config}
12690 20214 }
12691 20215
12692 20216 return transform
12693 20217 });
12694 20218
12695 20219 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12696 20220 //
12697 20221 // Licensed under the Apache License, Version 2.0 (the "License");
12698 20222 // you may not use this file except in compliance with the License.
12699 20223 // You may obtain a copy of the License at
12700 20224 //
12701 20225 // http://www.apache.org/licenses/LICENSE-2.0
12702 20226 //
12703 20227 // Unless required by applicable law or agreed to in writing, software
12704 20228 // distributed under the License is distributed on an "AS IS" BASIS,
12705 20229 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12706 20230 // See the License for the specific language governing permissions and
12707 20231 // limitations under the License.
12708 20232
12709 20233 var DEFAULT_ACTIONS = {
12710 20234 'get': {method: 'GET', timeout: 60000 * 2},
12711 20235 'save': {method: 'POST', timeout: 60000 * 2},
12712 20236 'query': {method: 'GET', isArray: true, timeout: 60000 * 2},
12713 20237 'remove': {method: 'DELETE', timeout: 30000},
12714 20238 'update': {method: 'PATCH', timeout: 30000},
12715 20239 'delete': {method: 'DELETE', timeout: 30000}
12716 20240 };
12717 20241
12718 20242 angular.module('appenlight.services.resources', []).factory('usersResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12719 20243 return $resource(AeConfig.urls.users, {userId: '@id'}, angular.copy(DEFAULT_ACTIONS));
12720 20244 }]);
12721 20245
12722 20246 angular.module('appenlight.services.resources').factory('userResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12723 20247 return $resource(AeConfig.urls.user, null, angular.copy(DEFAULT_ACTIONS));
12724 20248 }]);
12725 20249
12726 20250 angular.module('appenlight.services.resources').factory('usersPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12727 20251 return $resource(AeConfig.urls.usersProperty, null, angular.copy(DEFAULT_ACTIONS));
12728 20252 }]);
12729 20253
12730 20254 angular.module('appenlight.services.resources').factory('userSelfResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12731 20255 return $resource(AeConfig.urls.userSelf, null, angular.copy(DEFAULT_ACTIONS));
12732 20256 }]);
12733 20257
12734 20258 angular.module('appenlight.services.resources').factory('userSelfPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12735 20259 return $resource(AeConfig.urls.userSelfProperty, null, angular.copy(DEFAULT_ACTIONS));
12736 20260 }]);
12737 20261
12738 20262 angular.module('appenlight.services.resources').factory('logsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12739 20263 return $resource(AeConfig.urls.logsNoId, null, angular.copy(DEFAULT_ACTIONS));
12740 20264 }]);
12741 20265
12742 20266 angular.module('appenlight.services.resources').factory('reportsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12743 20267 return $resource(AeConfig.urls.reports, null, angular.copy(DEFAULT_ACTIONS));
12744 20268 }]);
12745 20269
12746 20270 angular.module('appenlight.services.resources').factory('slowReportsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12747 20271 return $resource(AeConfig.urls.slowReports, null, angular.copy(DEFAULT_ACTIONS));
12748 20272 }]);
12749 20273
12750 20274 angular.module('appenlight.services.resources').factory('reportGroupResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12751 20275 return $resource(AeConfig.urls.reportGroup, null, angular.copy(DEFAULT_ACTIONS));
12752 20276 }]);
12753 20277
12754 20278 angular.module('appenlight.services.resources').factory('reportGroupPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12755 20279 return $resource(AeConfig.urls.reportGroupProperty, null, angular.copy(DEFAULT_ACTIONS));
12756 20280 }]);
12757 20281
12758 20282
12759 20283 angular.module('appenlight.services.resources').factory('reportResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12760 20284 return $resource(AeConfig.urls.reports, null, angular.copy(DEFAULT_ACTIONS));
12761 20285 }]);
12762 20286
12763 20287 angular.module('appenlight.services.resources').factory('analyticsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12764 20288 return $resource(AeConfig.urls.analyticsAction, null, angular.copy(DEFAULT_ACTIONS));
12765 20289 }]);
12766 20290
12767 20291 angular.module('appenlight.services.resources').factory('reportsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12768 20292 return $resource(AeConfig.urls.reports, null, angular.copy(DEFAULT_ACTIONS));
12769 20293 }]);
12770 20294
12771 20295 angular.module('appenlight.services.resources').factory('integrationResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12772 20296 return $resource(AeConfig.urls.integrationAction, null, angular.copy(DEFAULT_ACTIONS));
12773 20297 }]);
12774 20298
12775 20299
12776 20300 angular.module('appenlight.services.resources').factory('adminResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12777 20301 return $resource(AeConfig.urls.adminAction, null, angular.copy(DEFAULT_ACTIONS));
12778 20302 }]);
12779 20303
12780 20304 angular.module('appenlight.services.resources').factory('applicationsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12781 20305 return $resource(AeConfig.urls.applicationsNoId, null, angular.copy(DEFAULT_ACTIONS));
12782 20306 }]);
12783 20307
12784 20308 angular.module('appenlight.services.resources').factory('applicationsPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12785 20309 return $resource(AeConfig.urls.applicationsProperty, null, angular.copy(DEFAULT_ACTIONS));
12786 20310 }]);
12787 20311 angular.module('appenlight.services.resources').factory('applicationsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12788 20312 return $resource(AeConfig.urls.applications, null, angular.copy(DEFAULT_ACTIONS));
12789 20313 }]);
12790 20314
12791 20315 angular.module('appenlight.services.resources').factory('sectionViewResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12792 20316 return $resource(AeConfig.urls.sectionView, null, angular.copy(DEFAULT_ACTIONS));
12793 20317 }]);
12794 20318
12795 20319 angular.module('appenlight.services.resources').factory('groupsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12796 20320 return $resource(AeConfig.urls.groupsNoId, null, angular.copy(DEFAULT_ACTIONS));
12797 20321 }]);
12798 20322
12799 20323
12800 20324 angular.module('appenlight.services.resources').factory('groupsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12801 20325 return $resource(AeConfig.urls.groups, {userId: '@id'}, angular.copy(DEFAULT_ACTIONS));
12802 20326 }]);
12803 20327
12804 20328 angular.module('appenlight.services.resources').factory('groupsPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12805 20329 return $resource(AeConfig.urls.groupsProperty, null, angular.copy(DEFAULT_ACTIONS));
12806 20330 }]);
12807 20331
12808 20332
12809 20333 angular.module('appenlight.services.resources').factory('eventsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12810 20334 return $resource(AeConfig.urls.eventsNoId, null, angular.copy(DEFAULT_ACTIONS));
12811 20335 }]);
12812 20336
12813 20337
12814 20338 angular.module('appenlight.services.resources').factory('eventsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12815 20339 return $resource(AeConfig.urls.events, {userId: '@id'}, angular.copy(DEFAULT_ACTIONS));
12816 20340 }]);
12817 20341
12818 20342 angular.module('appenlight.services.resources').factory('eventsPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12819 20343 return $resource(AeConfig.urls.eventsProperty, null, angular.copy(DEFAULT_ACTIONS));
12820 20344 }]);
12821 20345
12822 20346 angular.module('appenlight.services.resources').factory('configsNoIdResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12823 20347 return $resource(AeConfig.urls.configsNoId, null, angular.copy(DEFAULT_ACTIONS));
12824 20348 }]);
12825 20349
12826 20350 angular.module('appenlight.services.resources').factory('configsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12827 20351 return $resource(AeConfig.urls.configs, {
12828 20352 key: '@key',
12829 20353 section: '@section'
12830 20354 }, angular.copy(DEFAULT_ACTIONS));
12831 20355 }]);
12832 20356
12833 20357 angular.module('appenlight.services.resources').factory('pluginConfigsResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12834 20358 return $resource(AeConfig.urls.pluginConfigs, {
12835 20359 id: '@id',
12836 20360 plugin_name: '@plugin_name'
12837 20361 }, angular.copy(DEFAULT_ACTIONS));
12838 20362 }]);
12839 20363
12840 20364 angular.module('appenlight.services.resources').factory('resourcesPropertyResource', ['$resource', 'AeConfig', function ($resource, AeConfig) {
12841 20365 return $resource(AeConfig.urls.resourceProperty, null, angular.copy(DEFAULT_ACTIONS));
12842 20366 }]);
12843 20367
12844 20368 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
12845 20369 //
12846 20370 // Licensed under the Apache License, Version 2.0 (the "License");
12847 20371 // you may not use this file except in compliance with the License.
12848 20372 // You may obtain a copy of the License at
12849 20373 //
12850 20374 // http://www.apache.org/licenses/LICENSE-2.0
12851 20375 //
12852 20376 // Unless required by applicable law or agreed to in writing, software
12853 20377 // distributed under the License is distributed on an "AS IS" BASIS,
12854 20378 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12855 20379 // See the License for the specific language governing permissions and
12856 20380 // limitations under the License.
12857 20381
12858 20382 angular.module('appenlight.services.stateHolder', []).factory('stateHolder',
12859 20383 ['$timeout', 'AeConfig', function ($timeout, AeConfig) {
12860 20384
12861 20385 var AeUser = {"user_name": null, "id": null};
12862 20386 AeUser.update = function (jsonData) {
12863 20387 jsonData = jsonData || {};
12864 20388 this.applications_map = {};
12865 20389 this.dashboards_map = {};
12866 20390 this.user_name = jsonData.user_name || null;
12867 20391 this.id = jsonData.id;
12868 20392 this.assigned_reports = jsonData.assigned_reports || null;
12869 20393 this.latest_events = jsonData.latest_events || null;
12870 20394 this.permissions = jsonData.permissions || null;
12871 20395 this.groups = jsonData.groups || null;
12872 20396 this.applications = [];
12873 20397 this.dashboards = [];
12874 20398 _.each(jsonData.applications, function (item) {
12875 20399 this.addApplication(item);
12876 20400 }.bind(this));
12877 20401 _.each(jsonData.dashboards, function (item) {
12878 20402 this.addDashboard(item);
12879 20403 }.bind(this));
12880 20404 };
12881 20405 AeUser.addApplication = function (item) {
12882 20406 this.applications.push(item);
12883 20407 this.applications_map[item.resource_id] = item;
12884 20408 };
12885 20409 AeUser.addDashboard = function (item) {
12886 20410 this.dashboards.push(item);
12887 20411 this.dashboards_map[item.resource_id] = item;
12888 20412 };
12889 20413
12890 20414 AeUser.removeApplicationById = function (applicationId) {
12891 20415 this.applications = _.filter(this.applications, function (item) {
12892 20416 return item.resource_id != applicationId;
12893 20417 });
12894 20418 delete this.applications_map[applicationId];
12895 20419 };
12896 20420 AeUser.removeDashboardById = function (dashboardId) {
12897 20421 this.dashboards = _.filter(this.dashboards, function (item) {
12898 20422 return item.resource_id != dashboardId;
12899 20423 });
12900 20424 delete this.dashboards_map[dashboardId];
12901 20425 };
12902 20426
12903 20427 AeUser.hasAppPermission = function (perm_name) {
12904 20428 if (!this.permissions){
12905 20429 return false
12906 20430 }
12907 20431 if (this.permissions.indexOf('root_administration') !== -1) {
12908 20432 return true
12909 20433 }
12910 20434 return this.permissions.indexOf(perm_name) !== -1;
12911 20435 };
12912 20436
12913 20437 AeUser.hasContextPermission = function (permName, ACLList) {
12914 20438 var hasPerm = false;
12915 20439 _.each(ACLList, function (ACL) {
12916 20440 // is this the right perm?
12917 20441 if (ACL.perm_name == permName ||
12918 20442 ACL.perm_name == '__all_permissions__') {
12919 20443 // perm for this user or a group user belongs to
12920 20444 if (ACL.user_name === this.user_name ||
12921 20445 this.groups.indexOf(ACL.group_name) !== -1) {
12922 20446 hasPerm = true
12923 20447 }
12924 20448 }
12925 20449 }.bind(this));
12926 20450
12927 20451 return hasPerm;
12928 20452 };
12929 20453
12930 20454 /**
12931 20455 * Holds some common stuff like flash messages, but important part is
12932 20456 * plugins property that is a registry that holds all information about
12933 20457 * loaded plugins, its mutated via .run() functions on inclusion
12934 20458 * @type {{list: Array, timeout: null, extend: flashMessages.extend, pop: flashMessages.pop, cancelTimeout: flashMessages.cancelTimeout, removeMessages: flashMessages.removeMessages}}
12935 20459 */
12936 20460 var flashMessages = {
12937 20461 list: [],
12938 20462 timeout: null,
12939 20463 extend: function (values) {
12940 20464
12941 20465 if (this.list.length > 2) {
12942 20466 this.list.splice(0, this.list.length - 2);
12943 20467 }
12944 20468 this.list.push.apply(this.list, values);
12945 20469 this.cancelTimeout();
12946 20470 this.removeMessages();
12947 20471 },
12948 20472 pop: function () {
12949 20473
12950 20474 this.list.pop();
12951 20475 },
12952 20476 cancelTimeout: function () {
12953 20477 if (this.timeout) {
12954 20478 $timeout.cancel(this.timeout);
12955 20479 }
12956 20480 },
12957 20481 removeMessages: function () {
12958 20482 var self = this;
12959 20483 this.timeout = $timeout(function () {
12960 20484 while (self.list.length > 0) {
12961 20485 self.list.pop();
12962 20486 }
12963 20487 }, 10000);
12964 20488 }
12965 20489 };
12966 20490 flashMessages.closeAlert = angular.bind(flashMessages, function (index) {
12967 20491 this.list.splice(index, 1);
12968 20492 this.cancelTimeout();
12969 20493 });
12970 20494 /* add flash messages from template generated on non-xhr request level */
12971 20495 try {
12972 20496 if (AeConfig.flashMessages.length > 0) {
12973 20497 flashMessages.list = AeConfig.flashMessages;
12974 20498 }
12975 20499 }
12976 20500 catch (exc) {
12977 20501
12978 20502 }
12979 20503
12980 20504 var Plugins = {
12981 20505 enabled: [],
12982 20506 configs: {},
12983 20507 callables: [],
12984 20508 inclusions: {},
12985 20509 addInclusion: function (name, inclusion) {
12986 20510 var self = this;
12987 20511 if (self.inclusions.hasOwnProperty(name) === false) {
12988 20512 self.inclusions[name] = [];
12989 20513 }
12990 20514 self.inclusions[name].push(inclusion);
12991 20515 }
12992 20516 };
12993 20517
12994 20518 var stateHolder = {
12995 20519 section: 'settings',
12996 20520 resource: null,
12997 20521 plugins: Plugins,
12998 20522 flashMessages: flashMessages,
12999 20523 AeUser: AeUser,
13000 20524 AeConfig: AeConfig
13001 20525 };
13002 20526 return stateHolder;
13003 20527 }]);
13004 20528
13005 20529 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
13006 20530 //
13007 20531 // Licensed under the Apache License, Version 2.0 (the "License");
13008 20532 // you may not use this file except in compliance with the License.
13009 20533 // You may obtain a copy of the License at
13010 20534 //
13011 20535 // http://www.apache.org/licenses/LICENSE-2.0
13012 20536 //
13013 20537 // Unless required by applicable law or agreed to in writing, software
13014 20538 // distributed under the License is distributed on an "AS IS" BASIS,
13015 20539 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13016 20540 // See the License for the specific language governing permissions and
13017 20541 // limitations under the License.
13018 20542
13019 20543 angular.module('appenlight.services.typeAheadTagHelper', []).factory('typeAheadTagHelper', function () {
13020 20544 var typeAheadTagHelper = {tags: []};
13021 20545 typeAheadTagHelper.aheadFilter = function (item, viewValue) {
13022 20546 //dont show "deeper" autocomplete like level:foo with exception of application ones
13023 20547 var label_text = item.text || item;
13024 20548 if (label_text.charAt(label_text.length - 1) != ':' && viewValue.indexOf(':') === -1 && label_text.indexOf('resource:') !== 0) {
13025 20549 return false;
13026 20550 }
13027 20551 if (viewValue.length > 2) {
13028 20552 // with apps we need to do it differently
13029 20553 if (viewValue.toLowerCase().indexOf('resource:') == 0) {
13030 20554 viewValue = viewValue.split(':').pop();
13031 20555 }
13032 20556 // check if tags match
13033 20557 if (label_text.toLowerCase().indexOf(viewValue.toLowerCase()) === -1) {
13034 20558 return false;
13035 20559 }
13036 20560 }
13037 20561 return true;
13038 20562 };
13039 20563 typeAheadTagHelper.removeSearchTag = function (tag) {
13040 20564
13041 20565 var indexValue = _.indexOf(typeAheadTagHelper.tags, tag);
13042 20566 typeAheadTagHelper.tags.splice(indexValue, 1);
13043 20567
13044 20568 };
13045 20569 typeAheadTagHelper.addSearchTag = function (tag) {
13046 20570 // do not allow dupes - angular will complain
13047 20571 var found = _.find(typeAheadTagHelper.tags, function (existingTag) {
13048 20572 return existingTag.type == tag.type && existingTag.value == tag.value
13049 20573 });
13050 20574 if (!found) {
13051 20575 typeAheadTagHelper.tags.push(tag);
13052 20576 }
13053 20577 };
13054 20578
13055 20579 return typeAheadTagHelper;
13056 20580 });
13057 20581
13058 20582 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
13059 20583 //
13060 20584 // Licensed under the Apache License, Version 2.0 (the "License");
13061 20585 // you may not use this file except in compliance with the License.
13062 20586 // You may obtain a copy of the License at
13063 20587 //
13064 20588 // http://www.apache.org/licenses/LICENSE-2.0
13065 20589 //
13066 20590 // Unless required by applicable law or agreed to in writing, software
13067 20591 // distributed under the License is distributed on an "AS IS" BASIS,
13068 20592 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13069 20593 // See the License for the specific language governing permissions and
13070 20594 // limitations under the License.
13071 20595
13072 20596 angular.module('appenlight.services.UUIDProvider', []).factory('UUIDProvider', function () {
13073 20597 var provider = {
13074 20598 genUUID4: function () {
13075 20599 return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
13076 20600 /[xy]/g, function (c) {
13077 20601 var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;
13078 20602 return v.toString(16);
13079 20603 }
13080 20604 );
13081 20605 }
13082 20606 };
13083 20607 return provider;
13084 20608 });
13085 20609
13086 20610 ;// Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
13087 20611 //
13088 20612 // Licensed under the Apache License, Version 2.0 (the "License");
13089 20613 // you may not use this file except in compliance with the License.
13090 20614 // You may obtain a copy of the License at
13091 20615 //
13092 20616 // http://www.apache.org/licenses/LICENSE-2.0
13093 20617 //
13094 20618 // Unless required by applicable law or agreed to in writing, software
13095 20619 // distributed under the License is distributed on an "AS IS" BASIS,
13096 20620 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13097 20621 // See the License for the specific language governing permissions and
13098 20622 // limitations under the License.
13099 20623
13100 20624 var underscore = angular.module('underscore', []);
13101 20625 underscore.factory('_', function () {
13102 20626 return window._; // assumes underscore has already been loaded on the page
13103 20627 });
@@ -1,150 +1,149 b''
1 1 var fs = require('fs');
2 2 var ini = require('ini');
3 3 var config = ini.parse(fs.readFileSync('./locations.ini', 'utf-8'))
4 4 module.exports = function (grunt) {
5 5
6 6 var grunt_conf_obj = {
7 7 pkg: grunt.file.readJSON('package.json'),
8 8
9 9 ngtemplates: {
10 10 app: {
11 11 options: {
12 12 module: 'appenlight.templates'
13 13 },
14 14 cwd: "src",
15 15 src: '**/*.html',
16 16 dest: 'build/templates.js'
17 17 }
18 18 },
19 19
20 20 concat: {
21 21 options: {
22 22 // define a string to put between each file in the concatenated output
23 23 separator: '\n;'
24 24 },
25 25 base: {
26 26 src: [
27 "bower_components/underscore/underscore.js",
28 "bower_components/angular/angular.min.js",
29 "bower_components/angular-cookies/angular-cookies.min.js",
30 "bower_components/angular-route/angular-route.min.js",
31 "bower_components/angular-resource/angular-resource.min.js",
32 "bower_components/angular-animate/angular-animate.min.js",
33 "bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js",
34 "bower_components/angular-ui-router/release/angular-ui-router.min.js",
35 "bower_components/angular-toArrayFilter/toArrayFilter.js",
27 "node_modules/underscore/underscore.js",
28 "node_modules/angular/angular.min.js",
29 "node_modules/angular-cookies/angular-cookies.min.js",
30 "node_modules/angular-route/angular-route.min.js",
31 "node_modules/angular-resource/angular-resource.min.js",
32 "node_modules/angular-animate/angular-animate.min.js",
33 "node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js",
34 "node_modules/angular-ui-router/release/angular-ui-router.min.js",
35 "node_modules/angular-toarrayfilter/toArrayFilter.js",
36 36 "vendors/crel.js",
37 "bower_components/json-human/src/json.human.js",
38 "bower_components/moment/min/moment.min.js",
39 "bower_components/d3/d3.min.js",
40 "bower_components/c3/c3.min.js",
41 "bower_components/angular-smart-table/dist/smart-table.min.js",
42 "bower_components/ment.io/dist/mentio.min.js",
37 "vendors/json-human/src/json.human.js",
38 "node_modules/moment/min/moment.min.js",
39 "node_modules/d3/d3.min.js",
40 "node_modules/c3/c3.min.js",
41 "node_modules/angular-smart-table/dist/smart-table.min.js",
42 "node_modules/ment.io/dist/mentio.min.js",
43 43 "vendors/simple_moment_utc.js",
44 44 "vendors/reconnecting-websocket.js",
45 45 ],
46 46 dest: "build/base.js",
47 47 nonull: true
48 48 }
49 49 ,
50 50 dev: {
51 51 src: [
52 52 "src/utils.js",
53 53 "src/app.js",
54 54 "build/templates.js",
55 55 "src/**/*.js",
56 56 "!src/**/*_test.js"
57 57 ],
58 58 dest: 'build/app.js',
59 59 nonull: true
60 60 },
61 61 dist: {
62 62 src: [
63 63 'build/base.js',
64 64 'build/app.js'
65 65 ],
66 66 dest: "build/release/js/appenlight.js",
67 67 nonull: true
68 68 },
69 69 },
70 70 removelogging: {
71 71 dist: {
72 72 src: "build/app.js"
73 73 }
74 74 },
75 75 copy: {
76 76 css: {
77 77 files: [
78 78 // includes files within path and its sub-directories
79 79 {
80 80 expand: true,
81 81 cwd: 'build/release/css',
82 82 src: ['front.css'],
83 83 dest: config.ae_statics_location + '/css'
84 84 },
85 85 {
86 86 expand: true,
87 87 cwd: 'build/release/css',
88 88 src: ['front.css'],
89 89 dest: config.ae_webassets_location + '/appenlight/css'
90 90 }
91 91 ]
92 92 },
93 93 js: {
94 94 files: [
95 95 // includes files within path and its sub-directories
96 96 {
97 97 expand: true,
98 98 cwd: 'build/release/js',
99 99 src: ['**'],
100 100 dest: config.ae_statics_location + '/js'
101 101 },
102 102 {
103 103 expand: true,
104 104 cwd: 'build/release/js',
105 105 src: ['**'],
106 106 dest: config.ae_webassets_location + '/appenlight/js'
107 107 }
108 108 ]
109 109 }
110 110 },
111 111 watch: {
112 112 dev: {
113 113 files: ['<%= concat.dev.src %>', 'src/**/*.html', '!build/*.js'],
114 114 tasks: ['ngtemplates', 'concat:dev', 'concat:dist', 'copy:js']
115 115 },
116 116 css: {
117 117 files: ['css/**/*.less', 'css/**/*.css'],
118 118 tasks: ['less', 'copy:css']
119 119 }
120 120 },
121 121
122 122 less: {
123 123 dev: {
124 124 files: {
125 125 "build/release/css/front.css": "css/front_app.less"
126 126 }
127 127 }
128 128 }
129 129
130 130 };
131 131
132 132 grunt.initConfig(grunt_conf_obj);
133 133
134 134 grunt.loadNpmTasks('grunt-contrib-uglify');
135 135 grunt.loadNpmTasks('grunt-contrib-watch');
136 136 grunt.loadNpmTasks('grunt-contrib-concat');
137 grunt.loadNpmTasks('grunt-bower-concat');
138 137 grunt.loadNpmTasks('grunt-contrib-requirejs');
139 138 grunt.loadNpmTasks('grunt-contrib-copy');
140 139 grunt.loadNpmTasks("grunt-remove-logging");
141 140 grunt.loadNpmTasks('grunt-angular-templates');
142 141 grunt.loadNpmTasks('grunt-contrib-less');
143 142
144 143
145 144 grunt.registerTask('styles', ['less']);
146 145 grunt.registerTask('test', ['jshint', 'qunit']);
147 146
148 147 grunt.registerTask('default', ['ngtemplates', 'concat:base', 'concat:dev', 'removelogging', 'concat:dist', 'less', 'copy:js', 'copy:css']);
149 148
150 149 };
@@ -1,33 +1,33 b''
1 1 module.exports = function(config){
2 2 config.set({
3 3
4 4 basePath : './',
5 5
6 6 files : [
7 'bower_components/angular/angular.js',
8 'bower_components/angular-route/angular-route.js',
9 'bower_components/angular-mocks/angular-mocks.js',
10 'bower_components/angular-scenario/angular-scenario.js',
7 'node_modules/angular/angular.js',
8 'node_modules/angular-route/angular-route.js',
9 'node_modules/angular-mocks/angular-mocks.js',
10 'node_modules/angular-scenario/angular-scenario.js',
11 11 'src/**/*.js'
12 12 ],
13 13
14 14 autoWatch : true,
15 15
16 16 frameworks: ['jasmine'],
17 17
18 18 browsers : ['Chrome'],
19 19
20 20 plugins : [
21 21 'karma-chrome-launcher',
22 22 'karma-firefox-launcher',
23 23 'karma-jasmine',
24 24 'karma-junit-reporter'
25 25 ],
26 26
27 27 junitReporter : {
28 28 outputFile: 'test_out/unit.xml',
29 29 suite: 'unit'
30 30 }
31 31
32 32 });
33 }; No newline at end of file
33 };
@@ -1,34 +1,47 b''
1 1 {
2 2 "name": "errormator",
3 3 "description": "JS layer for AppEnlight",
4 4 "devDependencies": {
5 "bower": "^1.8.8",
6 "bower-requirejs": "1.2.0",
7 5 "grunt": "1.0.1",
8 6 "grunt-angular-templates": "1.0.4",
9 "grunt-bower-concat": "1.0.0",
10 "grunt-bower-requirejs": "2.0.0",
11 7 "grunt-contrib-concat": "1.0.1",
12 8 "grunt-contrib-copy": "1.0.0",
13 9 "grunt-contrib-jshint": "1.0.0",
14 10 "grunt-contrib-less": "1.3.0",
15 11 "grunt-contrib-nodeunit": "1.0.0",
16 12 "grunt-contrib-requirejs": "1.0.0",
17 13 "grunt-contrib-uglify": "1.0.1",
18 14 "grunt-contrib-watch": "1.0.0",
19 15 "grunt-remove-logging": "0.2.0",
20 16 "ini": "1.3.4",
21 "karma": "0.13.22",
22 "underscore": "1.8.3",
23 "yo": "1.8.4"
17 "karma": "0.13.22"
24 18 },
25 19 "dependencies": {
26 "grunt-cli": "^1.3.2"
20 "grunt-cli": "^1.3.2",
21 "angular": "1.7.7",
22 "angular-resource": "1.7.7",
23 "angular-cookies": "1.7.7",
24 "angular-sanitize": "1.7.7",
25 "angular-animate": "1.7.7",
26 "angular-touch": "1.7.7",
27 "angular-route": "1.7.7",
28 "angular-messages": "1.7.7",
29 "angular-mocks": "1.7.7",
30 "angular-scenario": "1.7.7",
31 "angular-ui-bootstrap": "1.3.2",
32 "angular-ui-router": "1.0.0-beta.3",
33 "angular-toarrayfilter" : "1.0.1",
34 "d3": "3.5.4",
35 "c3": "0.4.11",
36 "underscore": "1.8.3",
37 "json-human": "*",
38 "moment": "~2.8.1",
39 "angular-smart-table": "v2.1.8",
40 "ment.io": "0.9.23"
27 41 },
28 42 "scripts": {
29 "bower": "bower install",
30 43 "build": "grunt",
31 44 "watch": "grunt watch",
32 45 "watch:dev": "grunt watch:dev"
33 46 }
34 47 }
@@ -1,23 +0,0 b''
1 { fetchbower, buildEnv }:
2 buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
3 (fetchbower "angular" "1.5.5" "1.5.5" "01l5z4ympm61akrxqaahmd869625nxzdwkmgbibbwhgm9ir99r60")
4 (fetchbower "angular-resource" "1.5.5" "1.5.5" "022p70clz5xrj0jgslk6hhbbvb787mz42i0gnbi06r7m4x7k38i9")
5 (fetchbower "angular-cookies" "1.5.5" "1.5.5" "18xxvfhja5mk8kwk59m6ay8qfybvafczyfn1hv6jh004xvq0aq95")
6 (fetchbower "angular-sanitize" "1.5.5" "1.5.5" "02khk0dp7shia2v2d8marb2paq6rldxbfhsmab7cg9b36a9d166p")
7 (fetchbower "angular-animate" "1.5.5" "1.5.5" "1kphsab56wibivkqwxkscrym1blcfs5lims12c6fpsajjqmamcbn")
8 (fetchbower "angular-touch" "1.5.5" "1.5.5" "1m9f9d5lkscgl4x7d3jmwiri752cy9dk8k1xpa7hbz2i7gv3mh45")
9 (fetchbower "angular-route" "1.5.5" "1.5.5" "0r7j864mdglm3cn6jw8zf2p8a4g1bfzir41986ngqr2dawyk1dld")
10 (fetchbower "angular-messages" "1.5.5" "1.5.5" "0rr1ki0ci1bfz4rs0kdyrpwpy3m2ljzy1q764r823lg0qw53lfvn")
11 (fetchbower "angular-mocks" "1.5.5" "1.5.5" "17vmjlgsp56qjaszi6n5d3czzzj78cpmlwgai8mrp28b8jhyj5m2")
12 (fetchbower "angular-scenario" "1.5.5" "1.5.5" "04bkr6krx2lkazkibch79lvyhmmygk364pcbgpbaj6f27bq3qvvx")
13 (fetchbower "angular-bootstrap" "1.3.2" "1.3.2" "0b9kr2926643ryfkmhn0hiv78a82q12qgwyadw2la5ajdkv80pvj")
14 (fetchbower "angular-ui-router" "1.0.0-alpha.5" "1.0.0-alpha.5" "0y552x57y3l0z86r3x5yx0p54fhxih7wwdsshqn41ym347wa3nh9")
15 (fetchbower "angular-toArrayFilter" "1.0.1" "1.0.1" "06cpx3sap45wnq1fx0g0l0mx83xaym6ijslim9by8h0z7fif3b1x")
16 (fetchbower "d3" "3.5.0" "3.5.0" "08abpzas36471dr2ifgwwafnv8s9kr2ppb3zkrbg4yg1f7g8ilxy")
17 (fetchbower "c3" "0.4.11" "0.4.11" "0nmzn4pmyk8xjhp3b0c9b67az2ps9zan18k7sjlij1izf4m89dsd")
18 (fetchbower "underscore" "1.6.0" "~1.6.0" "0pxb8fn2nd5r9285vaf3vs2m6yzw72s3358fdh8w5kc6j53brs84")
19 (fetchbower "json-human" "0.1.1" "*" "0qgcqgjkv1pcpggiwbm17vj93x5ar78988dc5nbnkhd2xazz4xk5")
20 (fetchbower "moment" "2.8.4" "~2.8.1" "028996rd13ffn0x0q5skdx3nqm0k9yym8v88rl9c6g6h4v9js10m")
21 (fetchbower "angular-smart-table" "2.1.8" "v2.1.8" "1dm29cvpi4njr0m298vvnj4h7xvxjk7y6vii3b5ii43bq6v9yw60")
22 (fetchbower "ment.io" "0.9.24" "0.9.24" "0n1w43h5j6c4i2wrmqpkfszg16dbm8lzx7ai59sv5h5gacidr0xp")
23 ]; }
@@ -1,15 +0,0 b''
1 # This file has been generated by node2nix 1.0.0. Do not edit!
2
3 {pkgs ? import <nixpkgs> {
4 inherit system;
5 }, system ? builtins.currentSystem}:
6
7 let
8 nodeEnv = import ./node-env.nix {
9 inherit (pkgs) stdenv python utillinux runCommand writeTextFile nodejs;
10 };
11 in
12 import ./node-packages.nix {
13 inherit (pkgs) fetchurl fetchgit;
14 inherit nodeEnv;
15 }
@@ -1,292 +0,0 b''
1 # This file originates from node2nix
2
3 {stdenv, python, nodejs, utillinux, runCommand, writeTextFile}:
4
5 let
6 # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
7 tarWrapper = runCommand "tarWrapper" {} ''
8 mkdir -p $out/bin
9
10 cat > $out/bin/tar <<EOF
11 #! ${stdenv.shell} -e
12 $(type -p tar) "\$@" --warning=no-unknown-keyword
13 EOF
14
15 chmod +x $out/bin/tar
16 '';
17
18 # Function that generates a TGZ file from a NPM project
19 buildNodeSourceDist =
20 { name, version, src, ... }:
21
22 stdenv.mkDerivation {
23 name = "node-tarball-${name}-${version}";
24 inherit src;
25 buildInputs = [ nodejs ];
26 buildPhase = ''
27 export HOME=$TMPDIR
28 tgzFile=$(npm pack)
29 '';
30 installPhase = ''
31 mkdir -p $out/tarballs
32 mv $tgzFile $out/tarballs
33 mkdir -p $out/nix-support
34 echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products
35 '';
36 };
37
38 includeDependencies = {dependencies}:
39 stdenv.lib.optionalString (dependencies != [])
40 (stdenv.lib.concatMapStrings (dependency:
41 ''
42 # Bundle the dependencies of the package
43 mkdir -p node_modules
44 cd node_modules
45
46 # Only include dependencies if they don't exist. They may also be bundled in the package.
47 if [ ! -e "${dependency.name}" ]
48 then
49 ${composePackage dependency}
50 fi
51
52 cd ..
53 ''
54 ) dependencies);
55
56 # Recursively composes the dependencies of a package
57 composePackage = { name, packageName, src, dependencies ? [], ... }@args:
58 let
59 fixImpureDependencies = writeTextFile {
60 name = "fixDependencies.js";
61 text = ''
62 var fs = require('fs');
63 var url = require('url');
64
65 /*
66 * Replaces an impure version specification by *
67 */
68 function replaceImpureVersionSpec(versionSpec) {
69 var parsedUrl = url.parse(versionSpec);
70
71 if(versionSpec == "latest" || versionSpec == "unstable" ||
72 versionSpec.substr(0, 2) == ".." || dependency.substr(0, 2) == "./" || dependency.substr(0, 2) == "~/" || dependency.substr(0, 1) == '/')
73 return '*';
74 else if(parsedUrl.protocol == "git:" || parsedUrl.protocol == "git+ssh:" || parsedUrl.protocol == "git+http:" || parsedUrl.protocol == "git+https:" ||
75 parsedUrl.protocol == "http:" || parsedUrl.protocol == "https:")
76 return '*';
77 else
78 return versionSpec;
79 }
80
81 var packageObj = JSON.parse(fs.readFileSync('./package.json'));
82
83 /* Replace dependencies */
84 if(packageObj.dependencies !== undefined) {
85 for(var dependency in packageObj.dependencies) {
86 var versionSpec = packageObj.dependencies[dependency];
87 packageObj.dependencies[dependency] = replaceImpureVersionSpec(versionSpec);
88 }
89 }
90
91 /* Replace development dependencies */
92 if(packageObj.devDependencies !== undefined) {
93 for(var dependency in packageObj.devDependencies) {
94 var versionSpec = packageObj.devDependencies[dependency];
95 packageObj.devDependencies[dependency] = replaceImpureVersionSpec(versionSpec);
96 }
97 }
98
99 /* Replace optional dependencies */
100 if(packageObj.optionalDependencies !== undefined) {
101 for(var dependency in packageObj.optionalDependencies) {
102 var versionSpec = packageObj.optionalDependencies[dependency];
103 packageObj.optionalDependencies[dependency] = replaceImpureVersionSpec(versionSpec);
104 }
105 }
106
107 /* Write the fixed JSON file */
108 fs.writeFileSync("package.json", JSON.stringify(packageObj));
109 '';
110 };
111 in
112 ''
113 DIR=$(pwd)
114 cd $TMPDIR
115
116 unpackFile ${src}
117
118 # Make the base dir in which the target dependency resides first
119 mkdir -p "$(dirname "$DIR/${packageName}")"
120
121 if [ -f "${src}" ]
122 then
123 # Figure out what directory has been unpacked
124 packageDir=$(find . -type d -maxdepth 1 | tail -1)
125
126 # Restore write permissions to make building work
127 chmod -R u+w "$packageDir"
128
129 # Move the extracted tarball into the output folder
130 mv "$packageDir" "$DIR/${packageName}"
131 elif [ -d "${src}" ]
132 then
133 # Restore write permissions to make building work
134 chmod -R u+w $strippedName
135
136 # Move the extracted directory into the output folder
137 mv $strippedName "$DIR/${packageName}"
138 fi
139
140 # Unset the stripped name to not confuse the next unpack step
141 unset strippedName
142
143 # Some version specifiers (latest, unstable, URLs, file paths) force NPM to make remote connections or consult paths outside the Nix store.
144 # The following JavaScript replaces these by * to prevent that
145 cd "$DIR/${packageName}"
146 node ${fixImpureDependencies}
147
148 # Include the dependencies of the package
149 ${includeDependencies { inherit dependencies; }}
150 cd ..
151 ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
152 '';
153
154 # Extract the Node.js source code which is used to compile packages with
155 # native bindings
156 nodeSources = runCommand "node-sources" {} ''
157 tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
158 mv node-* $out
159 '';
160
161 # Builds and composes an NPM package including all its dependencies
162 buildNodePackage = { name, packageName, version, dependencies ? [], production ? true, npmFlags ? "", dontNpmInstall ? false, preRebuild ? "", ... }@args:
163
164 stdenv.lib.makeOverridable stdenv.mkDerivation (builtins.removeAttrs args [ "dependencies" ] // {
165 name = "node-${name}-${version}";
166 buildInputs = [ tarWrapper python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
167 dontStrip = args.dontStrip or true; # Striping may fail a build for some package deployments
168
169 inherit dontNpmInstall preRebuild;
170
171 unpackPhase = args.unpackPhase or "true";
172
173 buildPhase = args.buildPhase or "true";
174
175 compositionScript = composePackage args;
176 passAsFile = [ "compositionScript" ];
177
178 installPhase = args.installPhase or ''
179 # Create and enter a root node_modules/ folder
180 mkdir -p $out/lib/node_modules
181 cd $out/lib/node_modules
182
183 # Compose the package and all its dependencies
184 source $compositionScriptPath
185
186 # Patch the shebangs of the bundled modules to prevent them from
187 # calling executables outside the Nix store as much as possible
188 patchShebangs .
189
190 # Deploy the Node.js package by running npm install. Since the
191 # dependencies have been provided already by ourselves, it should not
192 # attempt to install them again, which is good, because we want to make
193 # it Nix's responsibility. If it needs to install any dependencies
194 # anyway (e.g. because the dependency parameters are
195 # incomplete/incorrect), it fails.
196 #
197 # The other responsibilities of NPM are kept -- version checks, build
198 # steps, postprocessing etc.
199
200 export HOME=$TMPDIR
201 cd "${packageName}"
202 runHook preRebuild
203 npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
204
205 if [ "$dontNpmInstall" != "1" ]
206 then
207 npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
208 fi
209
210 # Create symlink to the deployed executable folder, if applicable
211 if [ -d "$out/lib/node_modules/.bin" ]
212 then
213 ln -s $out/lib/node_modules/.bin $out/bin
214 fi
215
216 # Create symlinks to the deployed manual page folders, if applicable
217 if [ -d "$out/lib/node_modules/${packageName}/man" ]
218 then
219 mkdir -p $out/share
220 for dir in "$out/lib/node_modules/${packageName}/man/"*
221 do
222 mkdir -p $out/share/man/$(basename "$dir")
223 for page in "$dir"/*
224 do
225 ln -s $page $out/share/man/$(basename "$dir")
226 done
227 done
228 fi
229 '';
230 });
231
232 # Builds a development shell
233 buildNodeShell = { name, packageName, version, src, dependencies ? [], production ? true, npmFlags ? "", dontNpmInstall ? false, ... }@args:
234 let
235 nodeDependencies = stdenv.mkDerivation {
236 name = "node-dependencies-${name}-${version}";
237
238 buildInputs = [ tarWrapper python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
239
240 includeScript = includeDependencies { inherit dependencies; };
241 passAsFile = [ "includeScript" ];
242
243 buildCommand = ''
244 mkdir -p $out/lib
245 cd $out/lib
246 source $includeScriptPath
247
248 # Create fake package.json to make the npm commands work properly
249 cat > package.json <<EOF
250 {
251 "name": "${packageName}",
252 "version": "${version}"
253 }
254 EOF
255
256 # Patch the shebangs of the bundled modules to prevent them from
257 # calling executables outside the Nix store as much as possible
258 patchShebangs .
259
260 export HOME=$TMPDIR
261 npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
262
263 ${stdenv.lib.optionalString (!dontNpmInstall) ''
264 npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
265 ''}
266
267 ln -s $out/lib/node_modules/.bin $out/bin
268 '';
269 };
270 in
271 stdenv.mkDerivation {
272 name = "node-shell-${name}-${version}";
273
274 buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
275 buildCommand = ''
276 mkdir -p $out/bin
277 cat > $out/bin/shell <<EOF
278 #! ${stdenv.shell} -e
279 $shellHook
280 exec ${stdenv.shell}
281 EOF
282 chmod +x $out/bin/shell
283 '';
284
285 # Provide the dependencies in a development shell through the NODE_PATH environment variable
286 inherit nodeDependencies;
287 shellHook = stdenv.lib.optionalString (dependencies != []) ''
288 export NODE_PATH=$nodeDependencies/lib/node_modules
289 '';
290 };
291 in
292 { inherit buildNodeSourceDist buildNodePackage buildNodeShell; }
This diff has been collapsed as it changes many lines, (7028 lines changed) Show them Hide them
@@ -1,7028 +0,0 b''
1 # This file has been generated by node2nix 1.0.0. Do not edit!
2
3 {nodeEnv, fetchurl, fetchgit}:
4
5 let
6 sources = {
7 "bower-1.7.9" = {
8 name = "bower";
9 packageName = "bower";
10 version = "1.7.9";
11 src = fetchurl {
12 url = "https://registry.npmjs.org/bower/-/bower-1.7.9.tgz";
13 sha1 = "b7296c2393e0d75edaa6ca39648132dd255812b0";
14 };
15 };
16 "bower-requirejs-1.2.0" = {
17 name = "bower-requirejs";
18 packageName = "bower-requirejs";
19 version = "1.2.0";
20 src = fetchurl {
21 url = "https://registry.npmjs.org/bower-requirejs/-/bower-requirejs-1.2.0.tgz";
22 sha1 = "219a35703189bdc0e2e482fbdde62603647e8ab5";
23 };
24 };
25 "grunt-1.0.1" = {
26 name = "grunt";
27 packageName = "grunt";
28 version = "1.0.1";
29 src = fetchurl {
30 url = "https://registry.npmjs.org/grunt/-/grunt-1.0.1.tgz";
31 sha1 = "e8778764e944b18f32bb0f10b9078475c9dfb56b";
32 };
33 };
34 "grunt-angular-templates-1.0.4" = {
35 name = "grunt-angular-templates";
36 packageName = "grunt-angular-templates";
37 version = "1.0.4";
38 src = fetchurl {
39 url = "https://registry.npmjs.org/grunt-angular-templates/-/grunt-angular-templates-1.0.4.tgz";
40 sha1 = "9555b1e1d50fc62e5a7231472bfff3f37f276838";
41 };
42 };
43 "grunt-bower-concat-1.0.0" = {
44 name = "grunt-bower-concat";
45 packageName = "grunt-bower-concat";
46 version = "1.0.0";
47 src = fetchurl {
48 url = "https://registry.npmjs.org/grunt-bower-concat/-/grunt-bower-concat-1.0.0.tgz";
49 sha1 = "f430c7b718704c6815215c6ca94d2fd5dd4a7b5b";
50 };
51 };
52 "grunt-bower-requirejs-2.0.0" = {
53 name = "grunt-bower-requirejs";
54 packageName = "grunt-bower-requirejs";
55 version = "2.0.0";
56 src = fetchurl {
57 url = "https://registry.npmjs.org/grunt-bower-requirejs/-/grunt-bower-requirejs-2.0.0.tgz";
58 sha1 = "10dd9288d235e05df3e11de139be9803654b77fe";
59 };
60 };
61 "grunt-contrib-concat-1.0.1" = {
62 name = "grunt-contrib-concat";
63 packageName = "grunt-contrib-concat";
64 version = "1.0.1";
65 src = fetchurl {
66 url = "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-1.0.1.tgz";
67 sha1 = "61509863084e871d7e86de48c015259ed97745bd";
68 };
69 };
70 "grunt-contrib-copy-1.0.0" = {
71 name = "grunt-contrib-copy";
72 packageName = "grunt-contrib-copy";
73 version = "1.0.0";
74 src = fetchurl {
75 url = "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz";
76 sha1 = "7060c6581e904b8ab0d00f076e0a8f6e3e7c3573";
77 };
78 };
79 "grunt-contrib-jshint-1.0.0" = {
80 name = "grunt-contrib-jshint";
81 packageName = "grunt-contrib-jshint";
82 version = "1.0.0";
83 src = fetchurl {
84 url = "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-1.0.0.tgz";
85 sha1 = "30f405a51de656bfa6eb029b9a464b9fe02a402a";
86 };
87 };
88 "grunt-contrib-less-1.3.0" = {
89 name = "grunt-contrib-less";
90 packageName = "grunt-contrib-less";
91 version = "1.3.0";
92 src = fetchurl {
93 url = "https://registry.npmjs.org/grunt-contrib-less/-/grunt-contrib-less-1.3.0.tgz";
94 sha1 = "518ef7c86dc60e159e65108aa75db93a9c8ff5d4";
95 };
96 };
97 "grunt-contrib-nodeunit-1.0.0" = {
98 name = "grunt-contrib-nodeunit";
99 packageName = "grunt-contrib-nodeunit";
100 version = "1.0.0";
101 src = fetchurl {
102 url = "https://registry.npmjs.org/grunt-contrib-nodeunit/-/grunt-contrib-nodeunit-1.0.0.tgz";
103 sha1 = "6f488555ed9c0c8478854103c71edb1fc4685f05";
104 };
105 };
106 "grunt-contrib-requirejs-1.0.0" = {
107 name = "grunt-contrib-requirejs";
108 packageName = "grunt-contrib-requirejs";
109 version = "1.0.0";
110 src = fetchurl {
111 url = "https://registry.npmjs.org/grunt-contrib-requirejs/-/grunt-contrib-requirejs-1.0.0.tgz";
112 sha1 = "ec1670cafc32713902ee53569454715b2e3cbad5";
113 };
114 };
115 "grunt-contrib-uglify-1.0.1" = {
116 name = "grunt-contrib-uglify";
117 packageName = "grunt-contrib-uglify";
118 version = "1.0.1";
119 src = fetchurl {
120 url = "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-1.0.1.tgz";
121 sha1 = "ad68411b963b99661211f76f466bdeded4fb07ac";
122 };
123 };
124 "grunt-contrib-watch-1.0.0" = {
125 name = "grunt-contrib-watch";
126 packageName = "grunt-contrib-watch";
127 version = "1.0.0";
128 src = fetchurl {
129 url = "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.0.0.tgz";
130 sha1 = "84a1a7a1d6abd26ed568413496c73133e990018f";
131 };
132 };
133 "grunt-remove-logging-0.2.0" = {
134 name = "grunt-remove-logging";
135 packageName = "grunt-remove-logging";
136 version = "0.2.0";
137 src = fetchurl {
138 url = "https://registry.npmjs.org/grunt-remove-logging/-/grunt-remove-logging-0.2.0.tgz";
139 sha1 = "4686590f7003e21fdc4a21c5f738e88b35e00916";
140 };
141 };
142 "karma-0.13.22" = {
143 name = "karma";
144 packageName = "karma";
145 version = "0.13.22";
146 src = fetchurl {
147 url = "https://registry.npmjs.org/karma/-/karma-0.13.22.tgz";
148 sha1 = "07750b1bd063d7e7e7b91bcd2e6354d8f2aa8744";
149 };
150 };
151 "underscore-1.8.3" = {
152 name = "underscore";
153 packageName = "underscore";
154 version = "1.8.3";
155 src = fetchurl {
156 url = "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz";
157 sha1 = "4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022";
158 };
159 };
160 "yo-1.8.4" = {
161 name = "yo";
162 packageName = "yo";
163 version = "1.8.4";
164 src = fetchurl {
165 url = "https://registry.npmjs.org/yo/-/yo-1.8.4.tgz";
166 sha1 = "c99e33bfd8b59153c3cf060e52aa6fcdd2bc2957";
167 };
168 };
169 "ini-1.3.4" = {
170 name = "ini";
171 packageName = "ini";
172 version = "1.3.4";
173 src = fetchurl {
174 url = "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz";
175 sha1 = "0537cb79daf59b59a1a517dff706c86ec039162e";
176 };
177 };
178 "chalk-1.1.3" = {
179 name = "chalk";
180 packageName = "chalk";
181 version = "1.1.3";
182 src = fetchurl {
183 url = "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz";
184 sha1 = "a8115c55e4a702fe4d150abd3872822a7e09fc98";
185 };
186 };
187 "file-utils-0.2.2" = {
188 name = "file-utils";
189 packageName = "file-utils";
190 version = "0.2.2";
191 src = fetchurl {
192 url = "https://registry.npmjs.org/file-utils/-/file-utils-0.2.2.tgz";
193 sha1 = "4b7967bb2079ada4d4a7f5454206ecb5c0d4c589";
194 };
195 };
196 "lodash-3.10.1" = {
197 name = "lodash";
198 packageName = "lodash";
199 version = "3.10.1";
200 src = fetchurl {
201 url = "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz";
202 sha1 = "5bf45e8e49ba4189e17d482789dfd15bd140b7b6";
203 };
204 };
205 "nopt-3.0.6" = {
206 name = "nopt";
207 packageName = "nopt";
208 version = "3.0.6";
209 src = fetchurl {
210 url = "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz";
211 sha1 = "c6465dbf08abcd4db359317f79ac68a646b28ff9";
212 };
213 };
214 "object-assign-2.1.1" = {
215 name = "object-assign";
216 packageName = "object-assign";
217 version = "2.1.1";
218 src = fetchurl {
219 url = "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz";
220 sha1 = "43c36e5d569ff8e4816c4efa8be02d26967c18aa";
221 };
222 };
223 "requirejs-2.3.1" = {
224 name = "requirejs";
225 packageName = "requirejs";
226 version = "2.3.1";
227 src = fetchurl {
228 url = "https://registry.npmjs.org/requirejs/-/requirejs-2.3.1.tgz";
229 sha1 = "11d5a0225e47a634ac7348dba2a07fdebb1ac676";
230 };
231 };
232 "slash-1.0.0" = {
233 name = "slash";
234 packageName = "slash";
235 version = "1.0.0";
236 src = fetchurl {
237 url = "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz";
238 sha1 = "c41f2f6c39fc16d1cd17ad4b5d896114ae470d55";
239 };
240 };
241 "sudo-block-1.2.0" = {
242 name = "sudo-block";
243 packageName = "sudo-block";
244 version = "1.2.0";
245 src = fetchurl {
246 url = "https://registry.npmjs.org/sudo-block/-/sudo-block-1.2.0.tgz";
247 sha1 = "cc539bf8191624d4f507d83eeb45b4cea27f3463";
248 };
249 };
250 "update-notifier-0.3.2" = {
251 name = "update-notifier";
252 packageName = "update-notifier";
253 version = "0.3.2";
254 src = fetchurl {
255 url = "https://registry.npmjs.org/update-notifier/-/update-notifier-0.3.2.tgz";
256 sha1 = "22a8735baadef3320e2db928f693da898dc87777";
257 };
258 };
259 "ansi-styles-2.2.1" = {
260 name = "ansi-styles";
261 packageName = "ansi-styles";
262 version = "2.2.1";
263 src = fetchurl {
264 url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz";
265 sha1 = "b432dd3358b634cf75e1e4664368240533c1ddbe";
266 };
267 };
268 "escape-string-regexp-1.0.5" = {
269 name = "escape-string-regexp";
270 packageName = "escape-string-regexp";
271 version = "1.0.5";
272 src = fetchurl {
273 url = "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz";
274 sha1 = "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4";
275 };
276 };
277 "has-ansi-2.0.0" = {
278 name = "has-ansi";
279 packageName = "has-ansi";
280 version = "2.0.0";
281 src = fetchurl {
282 url = "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz";
283 sha1 = "34f5049ce1ecdf2b0649af3ef24e45ed35416d91";
284 };
285 };
286 "strip-ansi-3.0.1" = {
287 name = "strip-ansi";
288 packageName = "strip-ansi";
289 version = "3.0.1";
290 src = fetchurl {
291 url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz";
292 sha1 = "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf";
293 };
294 };
295 "supports-color-2.0.0" = {
296 name = "supports-color";
297 packageName = "supports-color";
298 version = "2.0.0";
299 src = fetchurl {
300 url = "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz";
301 sha1 = "535d045ce6b6363fa40117084629995e9df324c7";
302 };
303 };
304 "ansi-regex-2.0.0" = {
305 name = "ansi-regex";
306 packageName = "ansi-regex";
307 version = "2.0.0";
308 src = fetchurl {
309 url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz";
310 sha1 = "c5061b6e0ef8a81775e50f5d66151bf6bf371107";
311 };
312 };
313 "findup-sync-0.2.1" = {
314 name = "findup-sync";
315 packageName = "findup-sync";
316 version = "0.2.1";
317 src = fetchurl {
318 url = "https://registry.npmjs.org/findup-sync/-/findup-sync-0.2.1.tgz";
319 sha1 = "e0a90a450075c49466ee513732057514b81e878c";
320 };
321 };
322 "glob-4.5.3" = {
323 name = "glob";
324 packageName = "glob";
325 version = "4.5.3";
326 src = fetchurl {
327 url = "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz";
328 sha1 = "c6cb73d3226c1efef04de3c56d012f03377ee15f";
329 };
330 };
331 "iconv-lite-0.4.13" = {
332 name = "iconv-lite";
333 packageName = "iconv-lite";
334 version = "0.4.13";
335 src = fetchurl {
336 url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz";
337 sha1 = "1f88aba4ab0b1508e8312acc39345f36e992e2f2";
338 };
339 };
340 "isbinaryfile-2.0.4" = {
341 name = "isbinaryfile";
342 packageName = "isbinaryfile";
343 version = "2.0.4";
344 src = fetchurl {
345 url = "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-2.0.4.tgz";
346 sha1 = "d23592e6a6f093efb84c2e6152056be294e414a1";
347 };
348 };
349 "lodash-2.4.2" = {
350 name = "lodash";
351 packageName = "lodash";
352 version = "2.4.2";
353 src = fetchurl {
354 url = "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz";
355 sha1 = "fadd834b9683073da179b3eae6d9c0d15053f73e";
356 };
357 };
358 "minimatch-2.0.10" = {
359 name = "minimatch";
360 packageName = "minimatch";
361 version = "2.0.10";
362 src = fetchurl {
363 url = "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz";
364 sha1 = "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7";
365 };
366 };
367 "rimraf-2.5.4" = {
368 name = "rimraf";
369 packageName = "rimraf";
370 version = "2.5.4";
371 src = fetchurl {
372 url = "https://registry.npmjs.org/rimraf/-/rimraf-2.5.4.tgz";
373 sha1 = "96800093cbf1a0c86bd95b4625467535c29dfa04";
374 };
375 };
376 "glob-4.3.5" = {
377 name = "glob";
378 packageName = "glob";
379 version = "4.3.5";
380 src = fetchurl {
381 url = "https://registry.npmjs.org/glob/-/glob-4.3.5.tgz";
382 sha1 = "80fbb08ca540f238acce5d11d1e9bc41e75173d3";
383 };
384 };
385 "inflight-1.0.5" = {
386 name = "inflight";
387 packageName = "inflight";
388 version = "1.0.5";
389 src = fetchurl {
390 url = "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz";
391 sha1 = "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a";
392 };
393 };
394 "inherits-2.0.3" = {
395 name = "inherits";
396 packageName = "inherits";
397 version = "2.0.3";
398 src = fetchurl {
399 url = "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz";
400 sha1 = "633c2c83e3da42a502f52466022480f4208261de";
401 };
402 };
403 "once-1.4.0" = {
404 name = "once";
405 packageName = "once";
406 version = "1.4.0";
407 src = fetchurl {
408 url = "https://registry.npmjs.org/once/-/once-1.4.0.tgz";
409 sha1 = "583b1aa775961d4b113ac17d9c50baef9dd76bd1";
410 };
411 };
412 "wrappy-1.0.2" = {
413 name = "wrappy";
414 packageName = "wrappy";
415 version = "1.0.2";
416 src = fetchurl {
417 url = "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz";
418 sha1 = "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f";
419 };
420 };
421 "brace-expansion-1.1.6" = {
422 name = "brace-expansion";
423 packageName = "brace-expansion";
424 version = "1.1.6";
425 src = fetchurl {
426 url = "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz";
427 sha1 = "7197d7eaa9b87e648390ea61fc66c84427420df9";
428 };
429 };
430 "balanced-match-0.4.2" = {
431 name = "balanced-match";
432 packageName = "balanced-match";
433 version = "0.4.2";
434 src = fetchurl {
435 url = "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz";
436 sha1 = "cb3f3e3c732dc0f01ee70b403f302e61d7709838";
437 };
438 };
439 "concat-map-0.0.1" = {
440 name = "concat-map";
441 packageName = "concat-map";
442 version = "0.0.1";
443 src = fetchurl {
444 url = "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz";
445 sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b";
446 };
447 };
448 "glob-7.0.6" = {
449 name = "glob";
450 packageName = "glob";
451 version = "7.0.6";
452 src = fetchurl {
453 url = "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz";
454 sha1 = "211bafaf49e525b8cd93260d14ab136152b3f57a";
455 };
456 };
457 "fs.realpath-1.0.0" = {
458 name = "fs.realpath";
459 packageName = "fs.realpath";
460 version = "1.0.0";
461 src = fetchurl {
462 url = "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz";
463 sha1 = "1504ad2523158caa40db4a2787cb01411994ea4f";
464 };
465 };
466 "minimatch-3.0.3" = {
467 name = "minimatch";
468 packageName = "minimatch";
469 version = "3.0.3";
470 src = fetchurl {
471 url = "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz";
472 sha1 = "2a4e4090b96b2db06a9d7df01055a62a77c9b774";
473 };
474 };
475 "path-is-absolute-1.0.0" = {
476 name = "path-is-absolute";
477 packageName = "path-is-absolute";
478 version = "1.0.0";
479 src = fetchurl {
480 url = "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz";
481 sha1 = "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912";
482 };
483 };
484 "abbrev-1.0.9" = {
485 name = "abbrev";
486 packageName = "abbrev";
487 version = "1.0.9";
488 src = fetchurl {
489 url = "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz";
490 sha1 = "91b4792588a7738c25f35dd6f63752a2f8776135";
491 };
492 };
493 "is-docker-1.0.1" = {
494 name = "is-docker";
495 packageName = "is-docker";
496 version = "1.0.1";
497 src = fetchurl {
498 url = "https://registry.npmjs.org/is-docker/-/is-docker-1.0.1.tgz";
499 sha1 = "c02e215fc3d1d2ffe35a3b70d19f9d984693a4d8";
500 };
501 };
502 "is-root-1.0.0" = {
503 name = "is-root";
504 packageName = "is-root";
505 version = "1.0.0";
506 src = fetchurl {
507 url = "https://registry.npmjs.org/is-root/-/is-root-1.0.0.tgz";
508 sha1 = "07b6c233bc394cd9d02ba15c966bd6660d6342d5";
509 };
510 };
511 "configstore-0.3.2" = {
512 name = "configstore";
513 packageName = "configstore";
514 version = "0.3.2";
515 src = fetchurl {
516 url = "https://registry.npmjs.org/configstore/-/configstore-0.3.2.tgz";
517 sha1 = "25e4c16c3768abf75c5a65bc61761f495055b459";
518 };
519 };
520 "is-npm-1.0.0" = {
521 name = "is-npm";
522 packageName = "is-npm";
523 version = "1.0.0";
524 src = fetchurl {
525 url = "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz";
526 sha1 = "f2fb63a65e4905b406c86072765a1a4dc793b9f4";
527 };
528 };
529 "latest-version-1.0.1" = {
530 name = "latest-version";
531 packageName = "latest-version";
532 version = "1.0.1";
533 src = fetchurl {
534 url = "https://registry.npmjs.org/latest-version/-/latest-version-1.0.1.tgz";
535 sha1 = "72cfc46e3e8d1be651e1ebb54ea9f6ea96f374bb";
536 };
537 };
538 "semver-diff-2.1.0" = {
539 name = "semver-diff";
540 packageName = "semver-diff";
541 version = "2.1.0";
542 src = fetchurl {
543 url = "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz";
544 sha1 = "4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36";
545 };
546 };
547 "string-length-1.0.1" = {
548 name = "string-length";
549 packageName = "string-length";
550 version = "1.0.1";
551 src = fetchurl {
552 url = "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz";
553 sha1 = "56970fb1c38558e9e70b728bf3de269ac45adfac";
554 };
555 };
556 "graceful-fs-3.0.11" = {
557 name = "graceful-fs";
558 packageName = "graceful-fs";
559 version = "3.0.11";
560 src = fetchurl {
561 url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz";
562 sha1 = "7613c778a1afea62f25c630a086d7f3acbbdd818";
563 };
564 };
565 "js-yaml-3.6.1" = {
566 name = "js-yaml";
567 packageName = "js-yaml";
568 version = "3.6.1";
569 src = fetchurl {
570 url = "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz";
571 sha1 = "6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30";
572 };
573 };
574 "mkdirp-0.5.1" = {
575 name = "mkdirp";
576 packageName = "mkdirp";
577 version = "0.5.1";
578 src = fetchurl {
579 url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz";
580 sha1 = "30057438eac6cf7f8c4767f38648d6697d75c903";
581 };
582 };
583 "osenv-0.1.3" = {
584 name = "osenv";
585 packageName = "osenv";
586 version = "0.1.3";
587 src = fetchurl {
588 url = "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz";
589 sha1 = "83cf05c6d6458fc4d5ac6362ea325d92f2754217";
590 };
591 };
592 "user-home-1.1.1" = {
593 name = "user-home";
594 packageName = "user-home";
595 version = "1.1.1";
596 src = fetchurl {
597 url = "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz";
598 sha1 = "2b5be23a32b63a7c9deb8d0f28d485724a3df190";
599 };
600 };
601 "uuid-2.0.2" = {
602 name = "uuid";
603 packageName = "uuid";
604 version = "2.0.2";
605 src = fetchurl {
606 url = "https://registry.npmjs.org/uuid/-/uuid-2.0.2.tgz";
607 sha1 = "48bd5698f0677e3c7901a1c46ef15b1643794726";
608 };
609 };
610 "xdg-basedir-1.0.1" = {
611 name = "xdg-basedir";
612 packageName = "xdg-basedir";
613 version = "1.0.1";
614 src = fetchurl {
615 url = "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-1.0.1.tgz";
616 sha1 = "14ff8f63a4fdbcb05d5b6eea22b36f3033b9f04e";
617 };
618 };
619 "natives-1.1.0" = {
620 name = "natives";
621 packageName = "natives";
622 version = "1.1.0";
623 src = fetchurl {
624 url = "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz";
625 sha1 = "e9ff841418a6b2ec7a495e939984f78f163e6e31";
626 };
627 };
628 "argparse-1.0.7" = {
629 name = "argparse";
630 packageName = "argparse";
631 version = "1.0.7";
632 src = fetchurl {
633 url = "https://registry.npmjs.org/argparse/-/argparse-1.0.7.tgz";
634 sha1 = "c289506480557810f14a8bc62d7a06f63ed7f951";
635 };
636 };
637 "esprima-2.7.3" = {
638 name = "esprima";
639 packageName = "esprima";
640 version = "2.7.3";
641 src = fetchurl {
642 url = "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz";
643 sha1 = "96e3b70d5779f6ad49cd032673d1c312767ba581";
644 };
645 };
646 "sprintf-js-1.0.3" = {
647 name = "sprintf-js";
648 packageName = "sprintf-js";
649 version = "1.0.3";
650 src = fetchurl {
651 url = "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz";
652 sha1 = "04e6926f662895354f3dd015203633b857297e2c";
653 };
654 };
655 "minimist-0.0.8" = {
656 name = "minimist";
657 packageName = "minimist";
658 version = "0.0.8";
659 src = fetchurl {
660 url = "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz";
661 sha1 = "857fcabfc3397d2625b8228262e86aa7a011b05d";
662 };
663 };
664 "os-homedir-1.0.1" = {
665 name = "os-homedir";
666 packageName = "os-homedir";
667 version = "1.0.1";
668 src = fetchurl {
669 url = "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz";
670 sha1 = "0d62bdf44b916fd3bbdcf2cab191948fb094f007";
671 };
672 };
673 "os-tmpdir-1.0.1" = {
674 name = "os-tmpdir";
675 packageName = "os-tmpdir";
676 version = "1.0.1";
677 src = fetchurl {
678 url = "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz";
679 sha1 = "e9b423a1edaf479882562e92ed71d7743a071b6e";
680 };
681 };
682 "package-json-1.2.0" = {
683 name = "package-json";
684 packageName = "package-json";
685 version = "1.2.0";
686 src = fetchurl {
687 url = "https://registry.npmjs.org/package-json/-/package-json-1.2.0.tgz";
688 sha1 = "c8ecac094227cdf76a316874ed05e27cc939a0e0";
689 };
690 };
691 "got-3.3.1" = {
692 name = "got";
693 packageName = "got";
694 version = "3.3.1";
695 src = fetchurl {
696 url = "https://registry.npmjs.org/got/-/got-3.3.1.tgz";
697 sha1 = "e5d0ed4af55fc3eef4d56007769d98192bcb2eca";
698 };
699 };
700 "registry-url-3.1.0" = {
701 name = "registry-url";
702 packageName = "registry-url";
703 version = "3.1.0";
704 src = fetchurl {
705 url = "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz";
706 sha1 = "3d4ef870f73dde1d77f0cf9a381432444e174942";
707 };
708 };
709 "duplexify-3.4.5" = {
710 name = "duplexify";
711 packageName = "duplexify";
712 version = "3.4.5";
713 src = fetchurl {
714 url = "https://registry.npmjs.org/duplexify/-/duplexify-3.4.5.tgz";
715 sha1 = "0e7e287a775af753bf57e6e7b7f21f183f6c3a53";
716 };
717 };
718 "infinity-agent-2.0.3" = {
719 name = "infinity-agent";
720 packageName = "infinity-agent";
721 version = "2.0.3";
722 src = fetchurl {
723 url = "https://registry.npmjs.org/infinity-agent/-/infinity-agent-2.0.3.tgz";
724 sha1 = "45e0e2ff7a9eb030b27d62b74b3744b7a7ac4216";
725 };
726 };
727 "is-redirect-1.0.0" = {
728 name = "is-redirect";
729 packageName = "is-redirect";
730 version = "1.0.0";
731 src = fetchurl {
732 url = "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz";
733 sha1 = "1d03dded53bd8db0f30c26e4f95d36fc7c87dc24";
734 };
735 };
736 "is-stream-1.1.0" = {
737 name = "is-stream";
738 packageName = "is-stream";
739 version = "1.1.0";
740 src = fetchurl {
741 url = "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz";
742 sha1 = "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44";
743 };
744 };
745 "lowercase-keys-1.0.0" = {
746 name = "lowercase-keys";
747 packageName = "lowercase-keys";
748 version = "1.0.0";
749 src = fetchurl {
750 url = "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz";
751 sha1 = "4e3366b39e7f5457e35f1324bdf6f88d0bfc7306";
752 };
753 };
754 "nested-error-stacks-1.0.2" = {
755 name = "nested-error-stacks";
756 packageName = "nested-error-stacks";
757 version = "1.0.2";
758 src = fetchurl {
759 url = "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-1.0.2.tgz";
760 sha1 = "19f619591519f096769a5ba9a86e6eeec823c3cf";
761 };
762 };
763 "object-assign-3.0.0" = {
764 name = "object-assign";
765 packageName = "object-assign";
766 version = "3.0.0";
767 src = fetchurl {
768 url = "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz";
769 sha1 = "9bedd5ca0897949bca47e7ff408062d549f587f2";
770 };
771 };
772 "prepend-http-1.0.4" = {
773 name = "prepend-http";
774 packageName = "prepend-http";
775 version = "1.0.4";
776 src = fetchurl {
777 url = "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz";
778 sha1 = "d4f4562b0ce3696e41ac52d0e002e57a635dc6dc";
779 };
780 };
781 "read-all-stream-3.1.0" = {
782 name = "read-all-stream";
783 packageName = "read-all-stream";
784 version = "3.1.0";
785 src = fetchurl {
786 url = "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz";
787 sha1 = "35c3e177f2078ef789ee4bfafa4373074eaef4fa";
788 };
789 };
790 "timed-out-2.0.0" = {
791 name = "timed-out";
792 packageName = "timed-out";
793 version = "2.0.0";
794 src = fetchurl {
795 url = "https://registry.npmjs.org/timed-out/-/timed-out-2.0.0.tgz";
796 sha1 = "f38b0ae81d3747d628001f41dafc652ace671c0a";
797 };
798 };
799 "end-of-stream-1.0.0" = {
800 name = "end-of-stream";
801 packageName = "end-of-stream";
802 version = "1.0.0";
803 src = fetchurl {
804 url = "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.0.0.tgz";
805 sha1 = "d4596e702734a93e40e9af864319eabd99ff2f0e";
806 };
807 };
808 "readable-stream-2.1.5" = {
809 name = "readable-stream";
810 packageName = "readable-stream";
811 version = "2.1.5";
812 src = fetchurl {
813 url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz";
814 sha1 = "66fa8b720e1438b364681f2ad1a63c618448c9d0";
815 };
816 };
817 "stream-shift-1.0.0" = {
818 name = "stream-shift";
819 packageName = "stream-shift";
820 version = "1.0.0";
821 src = fetchurl {
822 url = "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz";
823 sha1 = "d5c752825e5367e786f78e18e445ea223a155952";
824 };
825 };
826 "once-1.3.3" = {
827 name = "once";
828 packageName = "once";
829 version = "1.3.3";
830 src = fetchurl {
831 url = "https://registry.npmjs.org/once/-/once-1.3.3.tgz";
832 sha1 = "b2e261557ce4c314ec8304f3fa82663e4297ca20";
833 };
834 };
835 "buffer-shims-1.0.0" = {
836 name = "buffer-shims";
837 packageName = "buffer-shims";
838 version = "1.0.0";
839 src = fetchurl {
840 url = "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz";
841 sha1 = "9978ce317388c649ad8793028c3477ef044a8b51";
842 };
843 };
844 "core-util-is-1.0.2" = {
845 name = "core-util-is";
846 packageName = "core-util-is";
847 version = "1.0.2";
848 src = fetchurl {
849 url = "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz";
850 sha1 = "b5fd54220aa2bc5ab57aab7140c940754503c1a7";
851 };
852 };
853 "isarray-1.0.0" = {
854 name = "isarray";
855 packageName = "isarray";
856 version = "1.0.0";
857 src = fetchurl {
858 url = "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz";
859 sha1 = "bb935d48582cba168c06834957a54a3e07124f11";
860 };
861 };
862 "process-nextick-args-1.0.7" = {
863 name = "process-nextick-args";
864 packageName = "process-nextick-args";
865 version = "1.0.7";
866 src = fetchurl {
867 url = "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz";
868 sha1 = "150e20b756590ad3f91093f25a4f2ad8bff30ba3";
869 };
870 };
871 "string_decoder-0.10.31" = {
872 name = "string_decoder";
873 packageName = "string_decoder";
874 version = "0.10.31";
875 src = fetchurl {
876 url = "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz";
877 sha1 = "62e203bc41766c6c28c9fc84301dab1c5310fa94";
878 };
879 };
880 "util-deprecate-1.0.2" = {
881 name = "util-deprecate";
882 packageName = "util-deprecate";
883 version = "1.0.2";
884 src = fetchurl {
885 url = "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz";
886 sha1 = "450d4dc9fa70de732762fbd2d4a28981419a0ccf";
887 };
888 };
889 "pinkie-promise-2.0.1" = {
890 name = "pinkie-promise";
891 packageName = "pinkie-promise";
892 version = "2.0.1";
893 src = fetchurl {
894 url = "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz";
895 sha1 = "2135d6dfa7a358c069ac9b178776288228450ffa";
896 };
897 };
898 "pinkie-2.0.4" = {
899 name = "pinkie";
900 packageName = "pinkie";
901 version = "2.0.4";
902 src = fetchurl {
903 url = "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz";
904 sha1 = "72556b80cfa0d48a974e80e77248e80ed4f7f870";
905 };
906 };
907 "rc-1.1.6" = {
908 name = "rc";
909 packageName = "rc";
910 version = "1.1.6";
911 src = fetchurl {
912 url = "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz";
913 sha1 = "43651b76b6ae53b5c802f1151fa3fc3b059969c9";
914 };
915 };
916 "deep-extend-0.4.1" = {
917 name = "deep-extend";
918 packageName = "deep-extend";
919 version = "0.4.1";
920 src = fetchurl {
921 url = "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz";
922 sha1 = "efe4113d08085f4e6f9687759810f807469e2253";
923 };
924 };
925 "minimist-1.2.0" = {
926 name = "minimist";
927 packageName = "minimist";
928 version = "1.2.0";
929 src = fetchurl {
930 url = "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz";
931 sha1 = "a35008b20f41383eec1fb914f4cd5df79a264284";
932 };
933 };
934 "strip-json-comments-1.0.4" = {
935 name = "strip-json-comments";
936 packageName = "strip-json-comments";
937 version = "1.0.4";
938 src = fetchurl {
939 url = "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz";
940 sha1 = "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91";
941 };
942 };
943 "semver-5.3.0" = {
944 name = "semver";
945 packageName = "semver";
946 version = "5.3.0";
947 src = fetchurl {
948 url = "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz";
949 sha1 = "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f";
950 };
951 };
952 "coffee-script-1.10.0" = {
953 name = "coffee-script";
954 packageName = "coffee-script";
955 version = "1.10.0";
956 src = fetchurl {
957 url = "https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz";
958 sha1 = "12938bcf9be1948fa006f92e0c4c9e81705108c0";
959 };
960 };
961 "dateformat-1.0.12" = {
962 name = "dateformat";
963 packageName = "dateformat";
964 version = "1.0.12";
965 src = fetchurl {
966 url = "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz";
967 sha1 = "9f124b67594c937ff706932e4a642cca8dbbfee9";
968 };
969 };
970 "eventemitter2-0.4.14" = {
971 name = "eventemitter2";
972 packageName = "eventemitter2";
973 version = "0.4.14";
974 src = fetchurl {
975 url = "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz";
976 sha1 = "8f61b75cde012b2e9eb284d4545583b5643b61ab";
977 };
978 };
979 "exit-0.1.2" = {
980 name = "exit";
981 packageName = "exit";
982 version = "0.1.2";
983 src = fetchurl {
984 url = "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz";
985 sha1 = "0632638f8d877cc82107d30a0fff1a17cba1cd0c";
986 };
987 };
988 "findup-sync-0.3.0" = {
989 name = "findup-sync";
990 packageName = "findup-sync";
991 version = "0.3.0";
992 src = fetchurl {
993 url = "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz";
994 sha1 = "37930aa5d816b777c03445e1966cc6790a4c0b16";
995 };
996 };
997 "grunt-cli-1.2.0" = {
998 name = "grunt-cli";
999 packageName = "grunt-cli";
1000 version = "1.2.0";
1001 src = fetchurl {
1002 url = "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz";
1003 sha1 = "562b119ebb069ddb464ace2845501be97b35b6a8";
1004 };
1005 };
1006 "grunt-known-options-1.1.0" = {
1007 name = "grunt-known-options";
1008 packageName = "grunt-known-options";
1009 version = "1.1.0";
1010 src = fetchurl {
1011 url = "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz";
1012 sha1 = "a4274eeb32fa765da5a7a3b1712617ce3b144149";
1013 };
1014 };
1015 "grunt-legacy-log-1.0.0" = {
1016 name = "grunt-legacy-log";
1017 packageName = "grunt-legacy-log";
1018 version = "1.0.0";
1019 src = fetchurl {
1020 url = "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-1.0.0.tgz";
1021 sha1 = "fb86f1809847bc07dc47843f9ecd6cacb62df2d5";
1022 };
1023 };
1024 "grunt-legacy-util-1.0.0" = {
1025 name = "grunt-legacy-util";
1026 packageName = "grunt-legacy-util";
1027 version = "1.0.0";
1028 src = fetchurl {
1029 url = "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.0.0.tgz";
1030 sha1 = "386aa78dc6ed50986c2b18957265b1b48abb9b86";
1031 };
1032 };
1033 "js-yaml-3.5.5" = {
1034 name = "js-yaml";
1035 packageName = "js-yaml";
1036 version = "3.5.5";
1037 src = fetchurl {
1038 url = "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz";
1039 sha1 = "0377c38017cabc7322b0d1fbcd25a491641f2fbe";
1040 };
1041 };
1042 "rimraf-2.2.8" = {
1043 name = "rimraf";
1044 packageName = "rimraf";
1045 version = "2.2.8";
1046 src = fetchurl {
1047 url = "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz";
1048 sha1 = "e439be2aaee327321952730f99a8929e4fc50582";
1049 };
1050 };
1051 "get-stdin-4.0.1" = {
1052 name = "get-stdin";
1053 packageName = "get-stdin";
1054 version = "4.0.1";
1055 src = fetchurl {
1056 url = "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz";
1057 sha1 = "b968c6b0a04384324902e8bf1a5df32579a450fe";
1058 };
1059 };
1060 "meow-3.7.0" = {
1061 name = "meow";
1062 packageName = "meow";
1063 version = "3.7.0";
1064 src = fetchurl {
1065 url = "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz";
1066 sha1 = "72cb668b425228290abbfa856892587308a801fb";
1067 };
1068 };
1069 "camelcase-keys-2.1.0" = {
1070 name = "camelcase-keys";
1071 packageName = "camelcase-keys";
1072 version = "2.1.0";
1073 src = fetchurl {
1074 url = "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz";
1075 sha1 = "308beeaffdf28119051efa1d932213c91b8f92e7";
1076 };
1077 };
1078 "decamelize-1.2.0" = {
1079 name = "decamelize";
1080 packageName = "decamelize";
1081 version = "1.2.0";
1082 src = fetchurl {
1083 url = "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz";
1084 sha1 = "f6534d15148269b20352e7bee26f501f9a191290";
1085 };
1086 };
1087 "loud-rejection-1.6.0" = {
1088 name = "loud-rejection";
1089 packageName = "loud-rejection";
1090 version = "1.6.0";
1091 src = fetchurl {
1092 url = "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz";
1093 sha1 = "5b46f80147edee578870f086d04821cf998e551f";
1094 };
1095 };
1096 "map-obj-1.0.1" = {
1097 name = "map-obj";
1098 packageName = "map-obj";
1099 version = "1.0.1";
1100 src = fetchurl {
1101 url = "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz";
1102 sha1 = "d933ceb9205d82bdcf4886f6742bdc2b4dea146d";
1103 };
1104 };
1105 "normalize-package-data-2.3.5" = {
1106 name = "normalize-package-data";
1107 packageName = "normalize-package-data";
1108 version = "2.3.5";
1109 src = fetchurl {
1110 url = "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz";
1111 sha1 = "8d924f142960e1777e7ffe170543631cc7cb02df";
1112 };
1113 };
1114 "object-assign-4.1.0" = {
1115 name = "object-assign";
1116 packageName = "object-assign";
1117 version = "4.1.0";
1118 src = fetchurl {
1119 url = "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz";
1120 sha1 = "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0";
1121 };
1122 };
1123 "read-pkg-up-1.0.1" = {
1124 name = "read-pkg-up";
1125 packageName = "read-pkg-up";
1126 version = "1.0.1";
1127 src = fetchurl {
1128 url = "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz";
1129 sha1 = "9d63c13276c065918d57f002a57f40a1b643fb02";
1130 };
1131 };
1132 "redent-1.0.0" = {
1133 name = "redent";
1134 packageName = "redent";
1135 version = "1.0.0";
1136 src = fetchurl {
1137 url = "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz";
1138 sha1 = "cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde";
1139 };
1140 };
1141 "trim-newlines-1.0.0" = {
1142 name = "trim-newlines";
1143 packageName = "trim-newlines";
1144 version = "1.0.0";
1145 src = fetchurl {
1146 url = "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz";
1147 sha1 = "5887966bb582a4503a41eb524f7d35011815a613";
1148 };
1149 };
1150 "camelcase-2.1.1" = {
1151 name = "camelcase";
1152 packageName = "camelcase";
1153 version = "2.1.1";
1154 src = fetchurl {
1155 url = "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz";
1156 sha1 = "7c1d16d679a1bbe59ca02cacecfb011e201f5a1f";
1157 };
1158 };
1159 "currently-unhandled-0.4.1" = {
1160 name = "currently-unhandled";
1161 packageName = "currently-unhandled";
1162 version = "0.4.1";
1163 src = fetchurl {
1164 url = "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz";
1165 sha1 = "988df33feab191ef799a61369dd76c17adf957ea";
1166 };
1167 };
1168 "signal-exit-3.0.1" = {
1169 name = "signal-exit";
1170 packageName = "signal-exit";
1171 version = "3.0.1";
1172 src = fetchurl {
1173 url = "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.1.tgz";
1174 sha1 = "5a4c884992b63a7acd9badb7894c3ee9cfccad81";
1175 };
1176 };
1177 "array-find-index-1.0.1" = {
1178 name = "array-find-index";
1179 packageName = "array-find-index";
1180 version = "1.0.1";
1181 src = fetchurl {
1182 url = "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz";
1183 sha1 = "0bc25ddac941ec8a496ae258fd4ac188003ef3af";
1184 };
1185 };
1186 "hosted-git-info-2.1.5" = {
1187 name = "hosted-git-info";
1188 packageName = "hosted-git-info";
1189 version = "2.1.5";
1190 src = fetchurl {
1191 url = "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz";
1192 sha1 = "0ba81d90da2e25ab34a332e6ec77936e1598118b";
1193 };
1194 };
1195 "is-builtin-module-1.0.0" = {
1196 name = "is-builtin-module";
1197 packageName = "is-builtin-module";
1198 version = "1.0.0";
1199 src = fetchurl {
1200 url = "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz";
1201 sha1 = "540572d34f7ac3119f8f76c30cbc1b1e037affbe";
1202 };
1203 };
1204 "validate-npm-package-license-3.0.1" = {
1205 name = "validate-npm-package-license";
1206 packageName = "validate-npm-package-license";
1207 version = "3.0.1";
1208 src = fetchurl {
1209 url = "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz";
1210 sha1 = "2804babe712ad3379459acfbe24746ab2c303fbc";
1211 };
1212 };
1213 "builtin-modules-1.1.1" = {
1214 name = "builtin-modules";
1215 packageName = "builtin-modules";
1216 version = "1.1.1";
1217 src = fetchurl {
1218 url = "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz";
1219 sha1 = "270f076c5a72c02f5b65a47df94c5fe3a278892f";
1220 };
1221 };
1222 "spdx-correct-1.0.2" = {
1223 name = "spdx-correct";
1224 packageName = "spdx-correct";
1225 version = "1.0.2";
1226 src = fetchurl {
1227 url = "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz";
1228 sha1 = "4b3073d933ff51f3912f03ac5519498a4150db40";
1229 };
1230 };
1231 "spdx-expression-parse-1.0.3" = {
1232 name = "spdx-expression-parse";
1233 packageName = "spdx-expression-parse";
1234 version = "1.0.3";
1235 src = fetchurl {
1236 url = "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.3.tgz";
1237 sha1 = "ca3c3828c4fea8aa44997884b398fc5d67436442";
1238 };
1239 };
1240 "spdx-license-ids-1.2.2" = {
1241 name = "spdx-license-ids";
1242 packageName = "spdx-license-ids";
1243 version = "1.2.2";
1244 src = fetchurl {
1245 url = "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz";
1246 sha1 = "c9df7a3424594ade6bd11900d596696dc06bac57";
1247 };
1248 };
1249 "find-up-1.1.2" = {
1250 name = "find-up";
1251 packageName = "find-up";
1252 version = "1.1.2";
1253 src = fetchurl {
1254 url = "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz";
1255 sha1 = "6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f";
1256 };
1257 };
1258 "read-pkg-1.1.0" = {
1259 name = "read-pkg";
1260 packageName = "read-pkg";
1261 version = "1.1.0";
1262 src = fetchurl {
1263 url = "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz";
1264 sha1 = "f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28";
1265 };
1266 };
1267 "path-exists-2.1.0" = {
1268 name = "path-exists";
1269 packageName = "path-exists";
1270 version = "2.1.0";
1271 src = fetchurl {
1272 url = "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz";
1273 sha1 = "0feb6c64f0fc518d9a754dd5efb62c7022761f4b";
1274 };
1275 };
1276 "load-json-file-1.1.0" = {
1277 name = "load-json-file";
1278 packageName = "load-json-file";
1279 version = "1.1.0";
1280 src = fetchurl {
1281 url = "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz";
1282 sha1 = "956905708d58b4bab4c2261b04f59f31c99374c0";
1283 };
1284 };
1285 "path-type-1.1.0" = {
1286 name = "path-type";
1287 packageName = "path-type";
1288 version = "1.1.0";
1289 src = fetchurl {
1290 url = "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz";
1291 sha1 = "59c44f7ee491da704da415da5a4070ba4f8fe441";
1292 };
1293 };
1294 "graceful-fs-4.1.6" = {
1295 name = "graceful-fs";
1296 packageName = "graceful-fs";
1297 version = "4.1.6";
1298 src = fetchurl {
1299 url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz";
1300 sha1 = "514c38772b31bee2e08bedc21a0aeb3abf54c19e";
1301 };
1302 };
1303 "parse-json-2.2.0" = {
1304 name = "parse-json";
1305 packageName = "parse-json";
1306 version = "2.2.0";
1307 src = fetchurl {
1308 url = "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz";
1309 sha1 = "f480f40434ef80741f8469099f8dea18f55a4dc9";
1310 };
1311 };
1312 "pify-2.3.0" = {
1313 name = "pify";
1314 packageName = "pify";
1315 version = "2.3.0";
1316 src = fetchurl {
1317 url = "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz";
1318 sha1 = "ed141a6ac043a849ea588498e7dca8b15330e90c";
1319 };
1320 };
1321 "strip-bom-2.0.0" = {
1322 name = "strip-bom";
1323 packageName = "strip-bom";
1324 version = "2.0.0";
1325 src = fetchurl {
1326 url = "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz";
1327 sha1 = "6219a85616520491f35788bdbf1447a99c7e6b0e";
1328 };
1329 };
1330 "error-ex-1.3.0" = {
1331 name = "error-ex";
1332 packageName = "error-ex";
1333 version = "1.3.0";
1334 src = fetchurl {
1335 url = "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz";
1336 sha1 = "e67b43f3e82c96ea3a584ffee0b9fc3325d802d9";
1337 };
1338 };
1339 "is-arrayish-0.2.1" = {
1340 name = "is-arrayish";
1341 packageName = "is-arrayish";
1342 version = "0.2.1";
1343 src = fetchurl {
1344 url = "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz";
1345 sha1 = "77c99840527aa8ecb1a8ba697b80645a7a926a9d";
1346 };
1347 };
1348 "is-utf8-0.2.1" = {
1349 name = "is-utf8";
1350 packageName = "is-utf8";
1351 version = "0.2.1";
1352 src = fetchurl {
1353 url = "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz";
1354 sha1 = "4b0da1442104d1b336340e80797e865cf39f7d72";
1355 };
1356 };
1357 "indent-string-2.1.0" = {
1358 name = "indent-string";
1359 packageName = "indent-string";
1360 version = "2.1.0";
1361 src = fetchurl {
1362 url = "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz";
1363 sha1 = "8e2d48348742121b4a8218b7a137e9a52049dc80";
1364 };
1365 };
1366 "strip-indent-1.0.1" = {
1367 name = "strip-indent";
1368 packageName = "strip-indent";
1369 version = "1.0.1";
1370 src = fetchurl {
1371 url = "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz";
1372 sha1 = "0c7962a6adefa7bbd4ac366460a638552ae1a0a2";
1373 };
1374 };
1375 "repeating-2.0.1" = {
1376 name = "repeating";
1377 packageName = "repeating";
1378 version = "2.0.1";
1379 src = fetchurl {
1380 url = "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz";
1381 sha1 = "5214c53a926d3552707527fbab415dbc08d06dda";
1382 };
1383 };
1384 "is-finite-1.0.1" = {
1385 name = "is-finite";
1386 packageName = "is-finite";
1387 version = "1.0.1";
1388 src = fetchurl {
1389 url = "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz";
1390 sha1 = "6438603eaebe2793948ff4a4262ec8db3d62597b";
1391 };
1392 };
1393 "number-is-nan-1.0.0" = {
1394 name = "number-is-nan";
1395 packageName = "number-is-nan";
1396 version = "1.0.0";
1397 src = fetchurl {
1398 url = "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz";
1399 sha1 = "c020f529c5282adfdd233d91d4b181c3d686dc4b";
1400 };
1401 };
1402 "glob-5.0.15" = {
1403 name = "glob";
1404 packageName = "glob";
1405 version = "5.0.15";
1406 src = fetchurl {
1407 url = "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz";
1408 sha1 = "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1";
1409 };
1410 };
1411 "resolve-1.1.7" = {
1412 name = "resolve";
1413 packageName = "resolve";
1414 version = "1.1.7";
1415 src = fetchurl {
1416 url = "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz";
1417 sha1 = "203114d82ad2c5ed9e8e0411b3932875e889e97b";
1418 };
1419 };
1420 "colors-1.1.2" = {
1421 name = "colors";
1422 packageName = "colors";
1423 version = "1.1.2";
1424 src = fetchurl {
1425 url = "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz";
1426 sha1 = "168a4701756b6a7f51a12ce0c97bfa28c084ed63";
1427 };
1428 };
1429 "grunt-legacy-log-utils-1.0.0" = {
1430 name = "grunt-legacy-log-utils";
1431 packageName = "grunt-legacy-log-utils";
1432 version = "1.0.0";
1433 src = fetchurl {
1434 url = "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-1.0.0.tgz";
1435 sha1 = "a7b8e2d0fb35b5a50f4af986fc112749ebc96f3d";
1436 };
1437 };
1438 "hooker-0.2.3" = {
1439 name = "hooker";
1440 packageName = "hooker";
1441 version = "0.2.3";
1442 src = fetchurl {
1443 url = "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz";
1444 sha1 = "b834f723cc4a242aa65963459df6d984c5d3d959";
1445 };
1446 };
1447 "underscore.string-3.2.3" = {
1448 name = "underscore.string";
1449 packageName = "underscore.string";
1450 version = "3.2.3";
1451 src = fetchurl {
1452 url = "https://registry.npmjs.org/underscore.string/-/underscore.string-3.2.3.tgz";
1453 sha1 = "806992633665d5e5fcb4db1fb3a862eb68e9e6da";
1454 };
1455 };
1456 "lodash-4.3.0" = {
1457 name = "lodash";
1458 packageName = "lodash";
1459 version = "4.3.0";
1460 src = fetchurl {
1461 url = "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz";
1462 sha1 = "efd9c4a6ec53f3b05412429915c3e4824e4d25a4";
1463 };
1464 };
1465 "async-1.5.2" = {
1466 name = "async";
1467 packageName = "async";
1468 version = "1.5.2";
1469 src = fetchurl {
1470 url = "https://registry.npmjs.org/async/-/async-1.5.2.tgz";
1471 sha1 = "ec6a61ae56480c0c3cb241c95618e20892f9672a";
1472 };
1473 };
1474 "getobject-0.1.0" = {
1475 name = "getobject";
1476 packageName = "getobject";
1477 version = "0.1.0";
1478 src = fetchurl {
1479 url = "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz";
1480 sha1 = "047a449789fa160d018f5486ed91320b6ec7885c";
1481 };
1482 };
1483 "which-1.2.11" = {
1484 name = "which";
1485 packageName = "which";
1486 version = "1.2.11";
1487 src = fetchurl {
1488 url = "https://registry.npmjs.org/which/-/which-1.2.11.tgz";
1489 sha1 = "c8b2eeea6b8c1659fa7c1dd4fdaabe9533dc5e8b";
1490 };
1491 };
1492 "isexe-1.1.2" = {
1493 name = "isexe";
1494 packageName = "isexe";
1495 version = "1.1.2";
1496 src = fetchurl {
1497 url = "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz";
1498 sha1 = "36f3e22e60750920f5e7241a476a8c6a42275ad0";
1499 };
1500 };
1501 "html-minifier-2.1.7" = {
1502 name = "html-minifier";
1503 packageName = "html-minifier";
1504 version = "2.1.7";
1505 src = fetchurl {
1506 url = "https://registry.npmjs.org/html-minifier/-/html-minifier-2.1.7.tgz";
1507 sha1 = "9051d6fcbbcf214ed307e1ad74f432bb9ad655cc";
1508 };
1509 };
1510 "change-case-3.0.0" = {
1511 name = "change-case";
1512 packageName = "change-case";
1513 version = "3.0.0";
1514 src = fetchurl {
1515 url = "https://registry.npmjs.org/change-case/-/change-case-3.0.0.tgz";
1516 sha1 = "6c9c8e35f8790870a82b6b0745be8c3cbef9b081";
1517 };
1518 };
1519 "clean-css-3.4.19" = {
1520 name = "clean-css";
1521 packageName = "clean-css";
1522 version = "3.4.19";
1523 src = fetchurl {
1524 url = "https://registry.npmjs.org/clean-css/-/clean-css-3.4.19.tgz";
1525 sha1 = "c32a8a13ca3b824609b14306a5da76d8793c7874";
1526 };
1527 };
1528 "commander-2.9.0" = {
1529 name = "commander";
1530 packageName = "commander";
1531 version = "2.9.0";
1532 src = fetchurl {
1533 url = "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz";
1534 sha1 = "9c99094176e12240cb22d6c5146098400fe0f7d4";
1535 };
1536 };
1537 "he-1.1.0" = {
1538 name = "he";
1539 packageName = "he";
1540 version = "1.1.0";
1541 src = fetchurl {
1542 url = "https://registry.npmjs.org/he/-/he-1.1.0.tgz";
1543 sha1 = "29319d49beec13a9b1f3c4f9b2a6dde4859bb2a7";
1544 };
1545 };
1546 "ncname-1.0.0" = {
1547 name = "ncname";
1548 packageName = "ncname";
1549 version = "1.0.0";
1550 src = fetchurl {
1551 url = "https://registry.npmjs.org/ncname/-/ncname-1.0.0.tgz";
1552 sha1 = "5b57ad18b1ca092864ef62b0b1ed8194f383b71c";
1553 };
1554 };
1555 "relateurl-0.2.7" = {
1556 name = "relateurl";
1557 packageName = "relateurl";
1558 version = "0.2.7";
1559 src = fetchurl {
1560 url = "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz";
1561 sha1 = "54dbf377e51440aca90a4cd274600d3ff2d888a9";
1562 };
1563 };
1564 "uglify-js-2.6.4" = {
1565 name = "uglify-js";
1566 packageName = "uglify-js";
1567 version = "2.6.4";
1568 src = fetchurl {
1569 url = "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.4.tgz";
1570 sha1 = "65ea2fb3059c9394692f15fed87c2b36c16b9adf";
1571 };
1572 };
1573 "camel-case-3.0.0" = {
1574 name = "camel-case";
1575 packageName = "camel-case";
1576 version = "3.0.0";
1577 src = fetchurl {
1578 url = "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz";
1579 sha1 = "ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73";
1580 };
1581 };
1582 "constant-case-2.0.0" = {
1583 name = "constant-case";
1584 packageName = "constant-case";
1585 version = "2.0.0";
1586 src = fetchurl {
1587 url = "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz";
1588 sha1 = "4175764d389d3fa9c8ecd29186ed6005243b6a46";
1589 };
1590 };
1591 "dot-case-2.1.0" = {
1592 name = "dot-case";
1593 packageName = "dot-case";
1594 version = "2.1.0";
1595 src = fetchurl {
1596 url = "https://registry.npmjs.org/dot-case/-/dot-case-2.1.0.tgz";
1597 sha1 = "4b43dd0d7403c34cb645424add397e80bfe85ca6";
1598 };
1599 };
1600 "header-case-1.0.0" = {
1601 name = "header-case";
1602 packageName = "header-case";
1603 version = "1.0.0";
1604 src = fetchurl {
1605 url = "https://registry.npmjs.org/header-case/-/header-case-1.0.0.tgz";
1606 sha1 = "d9e335909505d56051ec16a0106821889e910781";
1607 };
1608 };
1609 "is-lower-case-1.1.3" = {
1610 name = "is-lower-case";
1611 packageName = "is-lower-case";
1612 version = "1.1.3";
1613 src = fetchurl {
1614 url = "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz";
1615 sha1 = "7e147be4768dc466db3bfb21cc60b31e6ad69393";
1616 };
1617 };
1618 "is-upper-case-1.1.2" = {
1619 name = "is-upper-case";
1620 packageName = "is-upper-case";
1621 version = "1.1.2";
1622 src = fetchurl {
1623 url = "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz";
1624 sha1 = "8d0b1fa7e7933a1e58483600ec7d9661cbaf756f";
1625 };
1626 };
1627 "lower-case-1.1.3" = {
1628 name = "lower-case";
1629 packageName = "lower-case";
1630 version = "1.1.3";
1631 src = fetchurl {
1632 url = "https://registry.npmjs.org/lower-case/-/lower-case-1.1.3.tgz";
1633 sha1 = "c92393d976793eee5ba4edb583cf8eae35bd9bfb";
1634 };
1635 };
1636 "lower-case-first-1.0.2" = {
1637 name = "lower-case-first";
1638 packageName = "lower-case-first";
1639 version = "1.0.2";
1640 src = fetchurl {
1641 url = "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz";
1642 sha1 = "e5da7c26f29a7073be02d52bac9980e5922adfa1";
1643 };
1644 };
1645 "no-case-2.3.0" = {
1646 name = "no-case";
1647 packageName = "no-case";
1648 version = "2.3.0";
1649 src = fetchurl {
1650 url = "https://registry.npmjs.org/no-case/-/no-case-2.3.0.tgz";
1651 sha1 = "ca2825ccb76b18e6f79d573dcfbf1eace33dd164";
1652 };
1653 };
1654 "param-case-2.1.0" = {
1655 name = "param-case";
1656 packageName = "param-case";
1657 version = "2.1.0";
1658 src = fetchurl {
1659 url = "https://registry.npmjs.org/param-case/-/param-case-2.1.0.tgz";
1660 sha1 = "2619f90fd6c829ed0b958f1c84ed03a745a6d70a";
1661 };
1662 };
1663 "pascal-case-2.0.0" = {
1664 name = "pascal-case";
1665 packageName = "pascal-case";
1666 version = "2.0.0";
1667 src = fetchurl {
1668 url = "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.0.tgz";
1669 sha1 = "39c248bde5a8dc02d5160696bdb01e044d016ee1";
1670 };
1671 };
1672 "path-case-2.1.0" = {
1673 name = "path-case";
1674 packageName = "path-case";
1675 version = "2.1.0";
1676 src = fetchurl {
1677 url = "https://registry.npmjs.org/path-case/-/path-case-2.1.0.tgz";
1678 sha1 = "5ac491de642936e5dfe0e18d16c461b8be8cf073";
1679 };
1680 };
1681 "sentence-case-2.1.0" = {
1682 name = "sentence-case";
1683 packageName = "sentence-case";
1684 version = "2.1.0";
1685 src = fetchurl {
1686 url = "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.0.tgz";
1687 sha1 = "d592fbed457fd1a59e3af0ee17e99f6fd70d7efd";
1688 };
1689 };
1690 "snake-case-2.1.0" = {
1691 name = "snake-case";
1692 packageName = "snake-case";
1693 version = "2.1.0";
1694 src = fetchurl {
1695 url = "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz";
1696 sha1 = "41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f";
1697 };
1698 };
1699 "swap-case-1.1.2" = {
1700 name = "swap-case";
1701 packageName = "swap-case";
1702 version = "1.1.2";
1703 src = fetchurl {
1704 url = "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz";
1705 sha1 = "c39203a4587385fad3c850a0bd1bcafa081974e3";
1706 };
1707 };
1708 "title-case-2.1.0" = {
1709 name = "title-case";
1710 packageName = "title-case";
1711 version = "2.1.0";
1712 src = fetchurl {
1713 url = "https://registry.npmjs.org/title-case/-/title-case-2.1.0.tgz";
1714 sha1 = "c68ccb4232079ded64f94b91b4941ade91391979";
1715 };
1716 };
1717 "upper-case-1.1.3" = {
1718 name = "upper-case";
1719 packageName = "upper-case";
1720 version = "1.1.3";
1721 src = fetchurl {
1722 url = "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz";
1723 sha1 = "f6b4501c2ec4cdd26ba78be7222961de77621598";
1724 };
1725 };
1726 "upper-case-first-1.1.2" = {
1727 name = "upper-case-first";
1728 packageName = "upper-case-first";
1729 version = "1.1.2";
1730 src = fetchurl {
1731 url = "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz";
1732 sha1 = "5d79bedcff14419518fd2edb0a0507c9b6859115";
1733 };
1734 };
1735 "commander-2.8.1" = {
1736 name = "commander";
1737 packageName = "commander";
1738 version = "2.8.1";
1739 src = fetchurl {
1740 url = "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz";
1741 sha1 = "06be367febfda0c330aa1e2a072d3dc9762425d4";
1742 };
1743 };
1744 "source-map-0.4.4" = {
1745 name = "source-map";
1746 packageName = "source-map";
1747 version = "0.4.4";
1748 src = fetchurl {
1749 url = "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz";
1750 sha1 = "eba4f5da9c0dc999de68032d8b4f76173652036b";
1751 };
1752 };
1753 "graceful-readlink-1.0.1" = {
1754 name = "graceful-readlink";
1755 packageName = "graceful-readlink";
1756 version = "1.0.1";
1757 src = fetchurl {
1758 url = "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz";
1759 sha1 = "4cafad76bc62f02fa039b2f94e9a3dd3a391a725";
1760 };
1761 };
1762 "amdefine-1.0.0" = {
1763 name = "amdefine";
1764 packageName = "amdefine";
1765 version = "1.0.0";
1766 src = fetchurl {
1767 url = "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz";
1768 sha1 = "fd17474700cb5cc9c2b709f0be9d23ce3c198c33";
1769 };
1770 };
1771 "xml-char-classes-1.0.0" = {
1772 name = "xml-char-classes";
1773 packageName = "xml-char-classes";
1774 version = "1.0.0";
1775 src = fetchurl {
1776 url = "https://registry.npmjs.org/xml-char-classes/-/xml-char-classes-1.0.0.tgz";
1777 sha1 = "64657848a20ffc5df583a42ad8a277b4512bbc4d";
1778 };
1779 };
1780 "async-0.2.10" = {
1781 name = "async";
1782 packageName = "async";
1783 version = "0.2.10";
1784 src = fetchurl {
1785 url = "https://registry.npmjs.org/async/-/async-0.2.10.tgz";
1786 sha1 = "b6bbe0b0674b9d719708ca38de8c237cb526c3d1";
1787 };
1788 };
1789 "source-map-0.5.6" = {
1790 name = "source-map";
1791 packageName = "source-map";
1792 version = "0.5.6";
1793 src = fetchurl {
1794 url = "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz";
1795 sha1 = "75ce38f52bf0733c5a7f0c118d81334a2bb5f412";
1796 };
1797 };
1798 "uglify-to-browserify-1.0.2" = {
1799 name = "uglify-to-browserify";
1800 packageName = "uglify-to-browserify";
1801 version = "1.0.2";
1802 src = fetchurl {
1803 url = "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz";
1804 sha1 = "6e0924d6bda6b5afe349e39a6d632850a0f882b7";
1805 };
1806 };
1807 "yargs-3.10.0" = {
1808 name = "yargs";
1809 packageName = "yargs";
1810 version = "3.10.0";
1811 src = fetchurl {
1812 url = "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz";
1813 sha1 = "f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1";
1814 };
1815 };
1816 "camelcase-1.2.1" = {
1817 name = "camelcase";
1818 packageName = "camelcase";
1819 version = "1.2.1";
1820 src = fetchurl {
1821 url = "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz";
1822 sha1 = "9bb5304d2e0b56698b2c758b08a3eaa9daa58a39";
1823 };
1824 };
1825 "cliui-2.1.0" = {
1826 name = "cliui";
1827 packageName = "cliui";
1828 version = "2.1.0";
1829 src = fetchurl {
1830 url = "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz";
1831 sha1 = "4b475760ff80264c762c3a1719032e91c7fea0d1";
1832 };
1833 };
1834 "window-size-0.1.0" = {
1835 name = "window-size";
1836 packageName = "window-size";
1837 version = "0.1.0";
1838 src = fetchurl {
1839 url = "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz";
1840 sha1 = "5438cd2ea93b202efa3a19fe8887aee7c94f9c9d";
1841 };
1842 };
1843 "center-align-0.1.3" = {
1844 name = "center-align";
1845 packageName = "center-align";
1846 version = "0.1.3";
1847 src = fetchurl {
1848 url = "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz";
1849 sha1 = "aa0d32629b6ee972200411cbd4461c907bc2b7ad";
1850 };
1851 };
1852 "right-align-0.1.3" = {
1853 name = "right-align";
1854 packageName = "right-align";
1855 version = "0.1.3";
1856 src = fetchurl {
1857 url = "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz";
1858 sha1 = "61339b722fe6a3515689210d24e14c96148613ef";
1859 };
1860 };
1861 "wordwrap-0.0.2" = {
1862 name = "wordwrap";
1863 packageName = "wordwrap";
1864 version = "0.0.2";
1865 src = fetchurl {
1866 url = "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz";
1867 sha1 = "b79669bb42ecb409f83d583cad52ca17eaa1643f";
1868 };
1869 };
1870 "align-text-0.1.4" = {
1871 name = "align-text";
1872 packageName = "align-text";
1873 version = "0.1.4";
1874 src = fetchurl {
1875 url = "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz";
1876 sha1 = "0cd90a561093f35d0a99256c22b7069433fad117";
1877 };
1878 };
1879 "lazy-cache-1.0.4" = {
1880 name = "lazy-cache";
1881 packageName = "lazy-cache";
1882 version = "1.0.4";
1883 src = fetchurl {
1884 url = "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz";
1885 sha1 = "a1d78fc3a50474cb80845d3b3b6e1da49a446e8e";
1886 };
1887 };
1888 "kind-of-3.0.4" = {
1889 name = "kind-of";
1890 packageName = "kind-of";
1891 version = "3.0.4";
1892 src = fetchurl {
1893 url = "https://registry.npmjs.org/kind-of/-/kind-of-3.0.4.tgz";
1894 sha1 = "7b8ecf18a4e17f8269d73b501c9f232c96887a74";
1895 };
1896 };
1897 "longest-1.0.1" = {
1898 name = "longest";
1899 packageName = "longest";
1900 version = "1.0.1";
1901 src = fetchurl {
1902 url = "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz";
1903 sha1 = "30a0b2da38f73770e8294a0d22e6625ed77d0097";
1904 };
1905 };
1906 "repeat-string-1.5.4" = {
1907 name = "repeat-string";
1908 packageName = "repeat-string";
1909 version = "1.5.4";
1910 src = fetchurl {
1911 url = "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz";
1912 sha1 = "64ec0c91e0f4b475f90d5b643651e3e6e5b6c2d5";
1913 };
1914 };
1915 "is-buffer-1.1.4" = {
1916 name = "is-buffer";
1917 packageName = "is-buffer";
1918 version = "1.1.4";
1919 src = fetchurl {
1920 url = "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.4.tgz";
1921 sha1 = "cfc86ccd5dc5a52fa80489111c6920c457e2d98b";
1922 };
1923 };
1924 "detective-4.3.1" = {
1925 name = "detective";
1926 packageName = "detective";
1927 version = "4.3.1";
1928 src = fetchurl {
1929 url = "https://registry.npmjs.org/detective/-/detective-4.3.1.tgz";
1930 sha1 = "9fb06dd1ee8f0ea4dbcc607cda39d9ce1d4f726f";
1931 };
1932 };
1933 "filesize-3.2.1" = {
1934 name = "filesize";
1935 packageName = "filesize";
1936 version = "3.2.1";
1937 src = fetchurl {
1938 url = "https://registry.npmjs.org/filesize/-/filesize-3.2.1.tgz";
1939 sha1 = "a06f1c5497ed6358057c415e53403f764c1fb5e6";
1940 };
1941 };
1942 "acorn-1.2.2" = {
1943 name = "acorn";
1944 packageName = "acorn";
1945 version = "1.2.2";
1946 src = fetchurl {
1947 url = "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz";
1948 sha1 = "c8ce27de0acc76d896d2b1fad3df588d9e82f014";
1949 };
1950 };
1951 "defined-1.0.0" = {
1952 name = "defined";
1953 packageName = "defined";
1954 version = "1.0.0";
1955 src = fetchurl {
1956 url = "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz";
1957 sha1 = "c98d9bcef75674188e110969151199e39b1fa693";
1958 };
1959 };
1960 "load-grunt-tasks-2.0.0" = {
1961 name = "load-grunt-tasks";
1962 packageName = "load-grunt-tasks";
1963 version = "2.0.0";
1964 src = fetchurl {
1965 url = "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-2.0.0.tgz";
1966 sha1 = "5e3a9579694cc4b3fee0b1839ff4510b85dc9c34";
1967 };
1968 };
1969 "multimatch-2.1.0" = {
1970 name = "multimatch";
1971 packageName = "multimatch";
1972 version = "2.1.0";
1973 src = fetchurl {
1974 url = "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz";
1975 sha1 = "9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b";
1976 };
1977 };
1978 "array-differ-1.0.0" = {
1979 name = "array-differ";
1980 packageName = "array-differ";
1981 version = "1.0.0";
1982 src = fetchurl {
1983 url = "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz";
1984 sha1 = "eff52e3758249d33be402b8bb8e564bb2b5d4031";
1985 };
1986 };
1987 "array-union-1.0.2" = {
1988 name = "array-union";
1989 packageName = "array-union";
1990 version = "1.0.2";
1991 src = fetchurl {
1992 url = "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz";
1993 sha1 = "9a34410e4f4e3da23dea375be5be70f24778ec39";
1994 };
1995 };
1996 "arrify-1.0.1" = {
1997 name = "arrify";
1998 packageName = "arrify";
1999 version = "1.0.1";
2000 src = fetchurl {
2001 url = "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz";
2002 sha1 = "898508da2226f380df904728456849c1501a4b0d";
2003 };
2004 };
2005 "array-uniq-1.0.3" = {
2006 name = "array-uniq";
2007 packageName = "array-uniq";
2008 version = "1.0.3";
2009 src = fetchurl {
2010 url = "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz";
2011 sha1 = "af6ac877a25cc7f74e058894753858dfdb24fdb6";
2012 };
2013 };
2014 "file-sync-cmp-0.1.1" = {
2015 name = "file-sync-cmp";
2016 packageName = "file-sync-cmp";
2017 version = "0.1.1";
2018 src = fetchurl {
2019 url = "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz";
2020 sha1 = "a5e7a8ffbfa493b43b923bbd4ca89a53b63b612b";
2021 };
2022 };
2023 "jshint-2.9.3" = {
2024 name = "jshint";
2025 packageName = "jshint";
2026 version = "2.9.3";
2027 src = fetchurl {
2028 url = "https://registry.npmjs.org/jshint/-/jshint-2.9.3.tgz";
2029 sha1 = "a2e14ff85c2d6bf8c8080e5aa55129ebc6a2d320";
2030 };
2031 };
2032 "cli-1.0.0" = {
2033 name = "cli";
2034 packageName = "cli";
2035 version = "1.0.0";
2036 src = fetchurl {
2037 url = "https://registry.npmjs.org/cli/-/cli-1.0.0.tgz";
2038 sha1 = "ee07dfc1390e3f2e6a9957cf88e1d4bfa777719d";
2039 };
2040 };
2041 "console-browserify-1.1.0" = {
2042 name = "console-browserify";
2043 packageName = "console-browserify";
2044 version = "1.1.0";
2045 src = fetchurl {
2046 url = "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz";
2047 sha1 = "f0241c45730a9fc6323b206dbf38edc741d0bb10";
2048 };
2049 };
2050 "htmlparser2-3.8.3" = {
2051 name = "htmlparser2";
2052 packageName = "htmlparser2";
2053 version = "3.8.3";
2054 src = fetchurl {
2055 url = "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz";
2056 sha1 = "996c28b191516a8be86501a7d79757e5c70c1068";
2057 };
2058 };
2059 "shelljs-0.3.0" = {
2060 name = "shelljs";
2061 packageName = "shelljs";
2062 version = "0.3.0";
2063 src = fetchurl {
2064 url = "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz";
2065 sha1 = "3596e6307a781544f591f37da618360f31db57b1";
2066 };
2067 };
2068 "lodash-3.7.0" = {
2069 name = "lodash";
2070 packageName = "lodash";
2071 version = "3.7.0";
2072 src = fetchurl {
2073 url = "https://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz";
2074 sha1 = "3678bd8ab995057c07ade836ed2ef087da811d45";
2075 };
2076 };
2077 "date-now-0.1.4" = {
2078 name = "date-now";
2079 packageName = "date-now";
2080 version = "0.1.4";
2081 src = fetchurl {
2082 url = "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz";
2083 sha1 = "eaf439fd4d4848ad74e5cc7dbef200672b9e345b";
2084 };
2085 };
2086 "domhandler-2.3.0" = {
2087 name = "domhandler";
2088 packageName = "domhandler";
2089 version = "2.3.0";
2090 src = fetchurl {
2091 url = "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz";
2092 sha1 = "2de59a0822d5027fabff6f032c2b25a2a8abe738";
2093 };
2094 };
2095 "domutils-1.5.1" = {
2096 name = "domutils";
2097 packageName = "domutils";
2098 version = "1.5.1";
2099 src = fetchurl {
2100 url = "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz";
2101 sha1 = "dcd8488a26f563d61079e48c9f7b7e32373682cf";
2102 };
2103 };
2104 "domelementtype-1.3.0" = {
2105 name = "domelementtype";
2106 packageName = "domelementtype";
2107 version = "1.3.0";
2108 src = fetchurl {
2109 url = "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz";
2110 sha1 = "b17aed82e8ab59e52dd9c19b1756e0fc187204c2";
2111 };
2112 };
2113 "readable-stream-1.1.14" = {
2114 name = "readable-stream";
2115 packageName = "readable-stream";
2116 version = "1.1.14";
2117 src = fetchurl {
2118 url = "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz";
2119 sha1 = "7cf4c54ef648e3813084c636dd2079e166c081d9";
2120 };
2121 };
2122 "entities-1.0.0" = {
2123 name = "entities";
2124 packageName = "entities";
2125 version = "1.0.0";
2126 src = fetchurl {
2127 url = "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz";
2128 sha1 = "b2987aa3821347fcde642b24fdfc9e4fb712bf26";
2129 };
2130 };
2131 "dom-serializer-0.1.0" = {
2132 name = "dom-serializer";
2133 packageName = "dom-serializer";
2134 version = "0.1.0";
2135 src = fetchurl {
2136 url = "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz";
2137 sha1 = "073c697546ce0780ce23be4a28e293e40bc30c82";
2138 };
2139 };
2140 "domelementtype-1.1.3" = {
2141 name = "domelementtype";
2142 packageName = "domelementtype";
2143 version = "1.1.3";
2144 src = fetchurl {
2145 url = "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz";
2146 sha1 = "bd28773e2642881aec51544924299c5cd822185b";
2147 };
2148 };
2149 "entities-1.1.1" = {
2150 name = "entities";
2151 packageName = "entities";
2152 version = "1.1.1";
2153 src = fetchurl {
2154 url = "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz";
2155 sha1 = "6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0";
2156 };
2157 };
2158 "isarray-0.0.1" = {
2159 name = "isarray";
2160 packageName = "isarray";
2161 version = "0.0.1";
2162 src = fetchurl {
2163 url = "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz";
2164 sha1 = "8a18acfca9a8f4177e09abfc6038939b05d1eedf";
2165 };
2166 };
2167 "less-2.6.1" = {
2168 name = "less";
2169 packageName = "less";
2170 version = "2.6.1";
2171 src = fetchurl {
2172 url = "https://registry.npmjs.org/less/-/less-2.6.1.tgz";
2173 sha1 = "658e01ec9ac3149959c6b6dfbcfbc0a170afda7a";
2174 };
2175 };
2176 "lodash-4.15.0" = {
2177 name = "lodash";
2178 packageName = "lodash";
2179 version = "4.15.0";
2180 src = fetchurl {
2181 url = "https://registry.npmjs.org/lodash/-/lodash-4.15.0.tgz";
2182 sha1 = "3162391d8f0140aa22cf8f6b3c34d6b7f63d3aa9";
2183 };
2184 };
2185 "errno-0.1.4" = {
2186 name = "errno";
2187 packageName = "errno";
2188 version = "0.1.4";
2189 src = fetchurl {
2190 url = "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz";
2191 sha1 = "b896e23a9e5e8ba33871fc996abd3635fc9a1c7d";
2192 };
2193 };
2194 "image-size-0.4.0" = {
2195 name = "image-size";
2196 packageName = "image-size";
2197 version = "0.4.0";
2198 src = fetchurl {
2199 url = "https://registry.npmjs.org/image-size/-/image-size-0.4.0.tgz";
2200 sha1 = "d4b4e1f61952e4cbc1cea9a6b0c915fecb707510";
2201 };
2202 };
2203 "mime-1.3.4" = {
2204 name = "mime";
2205 packageName = "mime";
2206 version = "1.3.4";
2207 src = fetchurl {
2208 url = "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz";
2209 sha1 = "115f9e3b6b3daf2959983cb38f149a2d40eb5d53";
2210 };
2211 };
2212 "promise-7.1.1" = {
2213 name = "promise";
2214 packageName = "promise";
2215 version = "7.1.1";
2216 src = fetchurl {
2217 url = "https://registry.npmjs.org/promise/-/promise-7.1.1.tgz";
2218 sha1 = "489654c692616b8aa55b0724fa809bb7db49c5bf";
2219 };
2220 };
2221 "request-2.74.0" = {
2222 name = "request";
2223 packageName = "request";
2224 version = "2.74.0";
2225 src = fetchurl {
2226 url = "https://registry.npmjs.org/request/-/request-2.74.0.tgz";
2227 sha1 = "7693ca768bbb0ea5c8ce08c084a45efa05b892ab";
2228 };
2229 };
2230 "prr-0.0.0" = {
2231 name = "prr";
2232 packageName = "prr";
2233 version = "0.0.0";
2234 src = fetchurl {
2235 url = "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz";
2236 sha1 = "1a84b85908325501411853d0081ee3fa86e2926a";
2237 };
2238 };
2239 "asap-2.0.4" = {
2240 name = "asap";
2241 packageName = "asap";
2242 version = "2.0.4";
2243 src = fetchurl {
2244 url = "https://registry.npmjs.org/asap/-/asap-2.0.4.tgz";
2245 sha1 = "b391bf7f6bfbc65706022fec8f49c4b07fecf589";
2246 };
2247 };
2248 "aws-sign2-0.6.0" = {
2249 name = "aws-sign2";
2250 packageName = "aws-sign2";
2251 version = "0.6.0";
2252 src = fetchurl {
2253 url = "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz";
2254 sha1 = "14342dd38dbcc94d0e5b87d763cd63612c0e794f";
2255 };
2256 };
2257 "aws4-1.4.1" = {
2258 name = "aws4";
2259 packageName = "aws4";
2260 version = "1.4.1";
2261 src = fetchurl {
2262 url = "https://registry.npmjs.org/aws4/-/aws4-1.4.1.tgz";
2263 sha1 = "fde7d5292466d230e5ee0f4e038d9dfaab08fc61";
2264 };
2265 };
2266 "bl-1.1.2" = {
2267 name = "bl";
2268 packageName = "bl";
2269 version = "1.1.2";
2270 src = fetchurl {
2271 url = "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz";
2272 sha1 = "fdca871a99713aa00d19e3bbba41c44787a65398";
2273 };
2274 };
2275 "caseless-0.11.0" = {
2276 name = "caseless";
2277 packageName = "caseless";
2278 version = "0.11.0";
2279 src = fetchurl {
2280 url = "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz";
2281 sha1 = "715b96ea9841593cc33067923f5ec60ebda4f7d7";
2282 };
2283 };
2284 "combined-stream-1.0.5" = {
2285 name = "combined-stream";
2286 packageName = "combined-stream";
2287 version = "1.0.5";
2288 src = fetchurl {
2289 url = "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz";
2290 sha1 = "938370a57b4a51dea2c77c15d5c5fdf895164009";
2291 };
2292 };
2293 "extend-3.0.0" = {
2294 name = "extend";
2295 packageName = "extend";
2296 version = "3.0.0";
2297 src = fetchurl {
2298 url = "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz";
2299 sha1 = "5a474353b9f3353ddd8176dfd37b91c83a46f1d4";
2300 };
2301 };
2302 "forever-agent-0.6.1" = {
2303 name = "forever-agent";
2304 packageName = "forever-agent";
2305 version = "0.6.1";
2306 src = fetchurl {
2307 url = "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz";
2308 sha1 = "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91";
2309 };
2310 };
2311 "form-data-1.0.1" = {
2312 name = "form-data";
2313 packageName = "form-data";
2314 version = "1.0.1";
2315 src = fetchurl {
2316 url = "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz";
2317 sha1 = "ae315db9a4907fa065502304a66d7733475ee37c";
2318 };
2319 };
2320 "har-validator-2.0.6" = {
2321 name = "har-validator";
2322 packageName = "har-validator";
2323 version = "2.0.6";
2324 src = fetchurl {
2325 url = "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz";
2326 sha1 = "cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d";
2327 };
2328 };
2329 "hawk-3.1.3" = {
2330 name = "hawk";
2331 packageName = "hawk";
2332 version = "3.1.3";
2333 src = fetchurl {
2334 url = "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz";
2335 sha1 = "078444bd7c1640b0fe540d2c9b73d59678e8e1c4";
2336 };
2337 };
2338 "http-signature-1.1.1" = {
2339 name = "http-signature";
2340 packageName = "http-signature";
2341 version = "1.1.1";
2342 src = fetchurl {
2343 url = "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz";
2344 sha1 = "df72e267066cd0ac67fb76adf8e134a8fbcf91bf";
2345 };
2346 };
2347 "is-typedarray-1.0.0" = {
2348 name = "is-typedarray";
2349 packageName = "is-typedarray";
2350 version = "1.0.0";
2351 src = fetchurl {
2352 url = "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz";
2353 sha1 = "e479c80858df0c1b11ddda6940f96011fcda4a9a";
2354 };
2355 };
2356 "isstream-0.1.2" = {
2357 name = "isstream";
2358 packageName = "isstream";
2359 version = "0.1.2";
2360 src = fetchurl {
2361 url = "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz";
2362 sha1 = "47e63f7af55afa6f92e1500e690eb8b8529c099a";
2363 };
2364 };
2365 "json-stringify-safe-5.0.1" = {
2366 name = "json-stringify-safe";
2367 packageName = "json-stringify-safe";
2368 version = "5.0.1";
2369 src = fetchurl {
2370 url = "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz";
2371 sha1 = "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb";
2372 };
2373 };
2374 "mime-types-2.1.11" = {
2375 name = "mime-types";
2376 packageName = "mime-types";
2377 version = "2.1.11";
2378 src = fetchurl {
2379 url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz";
2380 sha1 = "c259c471bda808a85d6cd193b430a5fae4473b3c";
2381 };
2382 };
2383 "node-uuid-1.4.7" = {
2384 name = "node-uuid";
2385 packageName = "node-uuid";
2386 version = "1.4.7";
2387 src = fetchurl {
2388 url = "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz";
2389 sha1 = "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f";
2390 };
2391 };
2392 "oauth-sign-0.8.2" = {
2393 name = "oauth-sign";
2394 packageName = "oauth-sign";
2395 version = "0.8.2";
2396 src = fetchurl {
2397 url = "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz";
2398 sha1 = "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43";
2399 };
2400 };
2401 "qs-6.2.1" = {
2402 name = "qs";
2403 packageName = "qs";
2404 version = "6.2.1";
2405 src = fetchurl {
2406 url = "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz";
2407 sha1 = "ce03c5ff0935bc1d9d69a9f14cbd18e568d67625";
2408 };
2409 };
2410 "stringstream-0.0.5" = {
2411 name = "stringstream";
2412 packageName = "stringstream";
2413 version = "0.0.5";
2414 src = fetchurl {
2415 url = "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz";
2416 sha1 = "4e484cd4de5a0bbbee18e46307710a8a81621878";
2417 };
2418 };
2419 "tough-cookie-2.3.1" = {
2420 name = "tough-cookie";
2421 packageName = "tough-cookie";
2422 version = "2.3.1";
2423 src = fetchurl {
2424 url = "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.1.tgz";
2425 sha1 = "99c77dfbb7d804249e8a299d4cb0fd81fef083fd";
2426 };
2427 };
2428 "tunnel-agent-0.4.3" = {
2429 name = "tunnel-agent";
2430 packageName = "tunnel-agent";
2431 version = "0.4.3";
2432 src = fetchurl {
2433 url = "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz";
2434 sha1 = "6373db76909fe570e08d73583365ed828a74eeeb";
2435 };
2436 };
2437 "readable-stream-2.0.6" = {
2438 name = "readable-stream";
2439 packageName = "readable-stream";
2440 version = "2.0.6";
2441 src = fetchurl {
2442 url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz";
2443 sha1 = "8f90341e68a53ccc928788dacfcd11b36eb9b78e";
2444 };
2445 };
2446 "delayed-stream-1.0.0" = {
2447 name = "delayed-stream";
2448 packageName = "delayed-stream";
2449 version = "1.0.0";
2450 src = fetchurl {
2451 url = "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz";
2452 sha1 = "df3ae199acadfb7d440aaae0b29e2272b24ec619";
2453 };
2454 };
2455 "async-2.0.1" = {
2456 name = "async";
2457 packageName = "async";
2458 version = "2.0.1";
2459 src = fetchurl {
2460 url = "https://registry.npmjs.org/async/-/async-2.0.1.tgz";
2461 sha1 = "b709cc0280a9c36f09f4536be823c838a9049e25";
2462 };
2463 };
2464 "is-my-json-valid-2.13.1" = {
2465 name = "is-my-json-valid";
2466 packageName = "is-my-json-valid";
2467 version = "2.13.1";
2468 src = fetchurl {
2469 url = "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.13.1.tgz";
2470 sha1 = "d55778a82feb6b0963ff4be111d5d1684e890707";
2471 };
2472 };
2473 "generate-function-2.0.0" = {
2474 name = "generate-function";
2475 packageName = "generate-function";
2476 version = "2.0.0";
2477 src = fetchurl {
2478 url = "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz";
2479 sha1 = "6858fe7c0969b7d4e9093337647ac79f60dfbe74";
2480 };
2481 };
2482 "generate-object-property-1.2.0" = {
2483 name = "generate-object-property";
2484 packageName = "generate-object-property";
2485 version = "1.2.0";
2486 src = fetchurl {
2487 url = "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz";
2488 sha1 = "9c0e1c40308ce804f4783618b937fa88f99d50d0";
2489 };
2490 };
2491 "jsonpointer-2.0.0" = {
2492 name = "jsonpointer";
2493 packageName = "jsonpointer";
2494 version = "2.0.0";
2495 src = fetchurl {
2496 url = "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz";
2497 sha1 = "3af1dd20fe85463910d469a385e33017d2a030d9";
2498 };
2499 };
2500 "xtend-4.0.1" = {
2501 name = "xtend";
2502 packageName = "xtend";
2503 version = "4.0.1";
2504 src = fetchurl {
2505 url = "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz";
2506 sha1 = "a5c6d532be656e23db820efb943a1f04998d63af";
2507 };
2508 };
2509 "is-property-1.0.2" = {
2510 name = "is-property";
2511 packageName = "is-property";
2512 version = "1.0.2";
2513 src = fetchurl {
2514 url = "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz";
2515 sha1 = "57fe1c4e48474edd65b09911f26b1cd4095dda84";
2516 };
2517 };
2518 "hoek-2.16.3" = {
2519 name = "hoek";
2520 packageName = "hoek";
2521 version = "2.16.3";
2522 src = fetchurl {
2523 url = "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz";
2524 sha1 = "20bb7403d3cea398e91dc4710a8ff1b8274a25ed";
2525 };
2526 };
2527 "boom-2.10.1" = {
2528 name = "boom";
2529 packageName = "boom";
2530 version = "2.10.1";
2531 src = fetchurl {
2532 url = "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz";
2533 sha1 = "39c8918ceff5799f83f9492a848f625add0c766f";
2534 };
2535 };
2536 "cryptiles-2.0.5" = {
2537 name = "cryptiles";
2538 packageName = "cryptiles";
2539 version = "2.0.5";
2540 src = fetchurl {
2541 url = "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz";
2542 sha1 = "3bdfecdc608147c1c67202fa291e7dca59eaa3b8";
2543 };
2544 };
2545 "sntp-1.0.9" = {
2546 name = "sntp";
2547 packageName = "sntp";
2548 version = "1.0.9";
2549 src = fetchurl {
2550 url = "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz";
2551 sha1 = "6541184cc90aeea6c6e7b35e2659082443c66198";
2552 };
2553 };
2554 "assert-plus-0.2.0" = {
2555 name = "assert-plus";
2556 packageName = "assert-plus";
2557 version = "0.2.0";
2558 src = fetchurl {
2559 url = "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz";
2560 sha1 = "d74e1b87e7affc0db8aadb7021f3fe48101ab234";
2561 };
2562 };
2563 "jsprim-1.3.1" = {
2564 name = "jsprim";
2565 packageName = "jsprim";
2566 version = "1.3.1";
2567 src = fetchurl {
2568 url = "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz";
2569 sha1 = "2a7256f70412a29ee3670aaca625994c4dcff252";
2570 };
2571 };
2572 "sshpk-1.10.0" = {
2573 name = "sshpk";
2574 packageName = "sshpk";
2575 version = "1.10.0";
2576 src = fetchurl {
2577 url = "https://registry.npmjs.org/sshpk/-/sshpk-1.10.0.tgz";
2578 sha1 = "104d6ba2afb2ac099ab9567c0d193977f29c6dfa";
2579 };
2580 };
2581 "extsprintf-1.0.2" = {
2582 name = "extsprintf";
2583 packageName = "extsprintf";
2584 version = "1.0.2";
2585 src = fetchurl {
2586 url = "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz";
2587 sha1 = "e1080e0658e300b06294990cc70e1502235fd550";
2588 };
2589 };
2590 "json-schema-0.2.3" = {
2591 name = "json-schema";
2592 packageName = "json-schema";
2593 version = "0.2.3";
2594 src = fetchurl {
2595 url = "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz";
2596 sha1 = "b480c892e59a2f05954ce727bd3f2a4e882f9e13";
2597 };
2598 };
2599 "verror-1.3.6" = {
2600 name = "verror";
2601 packageName = "verror";
2602 version = "1.3.6";
2603 src = fetchurl {
2604 url = "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz";
2605 sha1 = "cff5df12946d297d2baaefaa2689e25be01c005c";
2606 };
2607 };
2608 "asn1-0.2.3" = {
2609 name = "asn1";
2610 packageName = "asn1";
2611 version = "0.2.3";
2612 src = fetchurl {
2613 url = "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz";
2614 sha1 = "dac8787713c9966849fc8180777ebe9c1ddf3b86";
2615 };
2616 };
2617 "assert-plus-1.0.0" = {
2618 name = "assert-plus";
2619 packageName = "assert-plus";
2620 version = "1.0.0";
2621 src = fetchurl {
2622 url = "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz";
2623 sha1 = "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525";
2624 };
2625 };
2626 "dashdash-1.14.0" = {
2627 name = "dashdash";
2628 packageName = "dashdash";
2629 version = "1.14.0";
2630 src = fetchurl {
2631 url = "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz";
2632 sha1 = "29e486c5418bf0f356034a993d51686a33e84141";
2633 };
2634 };
2635 "getpass-0.1.6" = {
2636 name = "getpass";
2637 packageName = "getpass";
2638 version = "0.1.6";
2639 src = fetchurl {
2640 url = "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz";
2641 sha1 = "283ffd9fc1256840875311c1b60e8c40187110e6";
2642 };
2643 };
2644 "jsbn-0.1.0" = {
2645 name = "jsbn";
2646 packageName = "jsbn";
2647 version = "0.1.0";
2648 src = fetchurl {
2649 url = "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz";
2650 sha1 = "650987da0dd74f4ebf5a11377a2aa2d273e97dfd";
2651 };
2652 };
2653 "tweetnacl-0.13.3" = {
2654 name = "tweetnacl";
2655 packageName = "tweetnacl";
2656 version = "0.13.3";
2657 src = fetchurl {
2658 url = "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz";
2659 sha1 = "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56";
2660 };
2661 };
2662 "jodid25519-1.0.2" = {
2663 name = "jodid25519";
2664 packageName = "jodid25519";
2665 version = "1.0.2";
2666 src = fetchurl {
2667 url = "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz";
2668 sha1 = "06d4912255093419477d425633606e0e90782967";
2669 };
2670 };
2671 "ecc-jsbn-0.1.1" = {
2672 name = "ecc-jsbn";
2673 packageName = "ecc-jsbn";
2674 version = "0.1.1";
2675 src = fetchurl {
2676 url = "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz";
2677 sha1 = "0fc73a9ed5f0d53c38193398523ef7e543777505";
2678 };
2679 };
2680 "bcrypt-pbkdf-1.0.0" = {
2681 name = "bcrypt-pbkdf";
2682 packageName = "bcrypt-pbkdf";
2683 version = "1.0.0";
2684 src = fetchurl {
2685 url = "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz";
2686 sha1 = "3ca76b85241c7170bf7d9703e7b9aa74630040d4";
2687 };
2688 };
2689 "tweetnacl-0.14.3" = {
2690 name = "tweetnacl";
2691 packageName = "tweetnacl";
2692 version = "0.14.3";
2693 src = fetchurl {
2694 url = "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.3.tgz";
2695 sha1 = "3da382f670f25ded78d7b3d1792119bca0b7132d";
2696 };
2697 };
2698 "mime-db-1.23.0" = {
2699 name = "mime-db";
2700 packageName = "mime-db";
2701 version = "1.23.0";
2702 src = fetchurl {
2703 url = "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz";
2704 sha1 = "a31b4070adaea27d732ea333740a64d0ec9a6659";
2705 };
2706 };
2707 "nodeunit-0.9.5" = {
2708 name = "nodeunit";
2709 packageName = "nodeunit";
2710 version = "0.9.5";
2711 src = fetchurl {
2712 url = "https://registry.npmjs.org/nodeunit/-/nodeunit-0.9.5.tgz";
2713 sha1 = "0b632368007d94651ccf0a18999807982f073866";
2714 };
2715 };
2716 "tap-7.1.2" = {
2717 name = "tap";
2718 packageName = "tap";
2719 version = "7.1.2";
2720 src = fetchurl {
2721 url = "https://registry.npmjs.org/tap/-/tap-7.1.2.tgz";
2722 sha1 = "dfac3ecf14ac8547bbad25bbd16cf2c3743f65cf";
2723 };
2724 };
2725 "bluebird-3.4.6" = {
2726 name = "bluebird";
2727 packageName = "bluebird";
2728 version = "3.4.6";
2729 src = fetchurl {
2730 url = "https://registry.npmjs.org/bluebird/-/bluebird-3.4.6.tgz";
2731 sha1 = "01da8d821d87813d158967e743d5fe6c62cf8c0f";
2732 };
2733 };
2734 "clean-yaml-object-0.1.0" = {
2735 name = "clean-yaml-object";
2736 packageName = "clean-yaml-object";
2737 version = "0.1.0";
2738 src = fetchurl {
2739 url = "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz";
2740 sha1 = "63fb110dc2ce1a84dc21f6d9334876d010ae8b68";
2741 };
2742 };
2743 "color-support-1.1.1" = {
2744 name = "color-support";
2745 packageName = "color-support";
2746 version = "1.1.1";
2747 src = fetchurl {
2748 url = "https://registry.npmjs.org/color-support/-/color-support-1.1.1.tgz";
2749 sha1 = "04816947ba6b06d364e3f13fe045280b93b688cd";
2750 };
2751 };
2752 "coveralls-2.11.13" = {
2753 name = "coveralls";
2754 packageName = "coveralls";
2755 version = "2.11.13";
2756 src = fetchurl {
2757 url = "https://registry.npmjs.org/coveralls/-/coveralls-2.11.13.tgz";
2758 sha1 = "dd50322ab9b4fd78c91f6109d058edd6929d1a41";
2759 };
2760 };
2761 "deeper-2.1.0" = {
2762 name = "deeper";
2763 packageName = "deeper";
2764 version = "2.1.0";
2765 src = fetchurl {
2766 url = "https://registry.npmjs.org/deeper/-/deeper-2.1.0.tgz";
2767 sha1 = "bc564e5f73174fdf201e08b00030e8a14da74368";
2768 };
2769 };
2770 "foreground-child-1.5.3" = {
2771 name = "foreground-child";
2772 packageName = "foreground-child";
2773 version = "1.5.3";
2774 src = fetchurl {
2775 url = "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.3.tgz";
2776 sha1 = "94dd6aba671389867de8e57e99f1c2ecfb15c01a";
2777 };
2778 };
2779 "nyc-7.1.0" = {
2780 name = "nyc";
2781 packageName = "nyc";
2782 version = "7.1.0";
2783 src = fetchurl {
2784 url = "https://registry.npmjs.org/nyc/-/nyc-7.1.0.tgz";
2785 sha1 = "8e14971f3a15d1abbec7ac610ef54cb889e9ffb4";
2786 };
2787 };
2788 "only-shallow-1.2.0" = {
2789 name = "only-shallow";
2790 packageName = "only-shallow";
2791 version = "1.2.0";
2792 src = fetchurl {
2793 url = "https://registry.npmjs.org/only-shallow/-/only-shallow-1.2.0.tgz";
2794 sha1 = "71cecedba9324bc0518aef10ec080d3249dc2465";
2795 };
2796 };
2797 "opener-1.4.2" = {
2798 name = "opener";
2799 packageName = "opener";
2800 version = "1.4.2";
2801 src = fetchurl {
2802 url = "https://registry.npmjs.org/opener/-/opener-1.4.2.tgz";
2803 sha1 = "b32582080042af8680c389a499175b4c54fff523";
2804 };
2805 };
2806 "stack-utils-0.4.0" = {
2807 name = "stack-utils";
2808 packageName = "stack-utils";
2809 version = "0.4.0";
2810 src = fetchurl {
2811 url = "https://registry.npmjs.org/stack-utils/-/stack-utils-0.4.0.tgz";
2812 sha1 = "940cb82fccfa84e8ff2f3fdf293fe78016beccd1";
2813 };
2814 };
2815 "tap-mocha-reporter-2.0.1" = {
2816 name = "tap-mocha-reporter";
2817 packageName = "tap-mocha-reporter";
2818 version = "2.0.1";
2819 src = fetchurl {
2820 url = "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-2.0.1.tgz";
2821 sha1 = "c70316173d6e3a16c58e1ba92d5d6cd8de58a12e";
2822 };
2823 };
2824 "tap-parser-2.2.3" = {
2825 name = "tap-parser";
2826 packageName = "tap-parser";
2827 version = "2.2.3";
2828 src = fetchurl {
2829 url = "https://registry.npmjs.org/tap-parser/-/tap-parser-2.2.3.tgz";
2830 sha1 = "ade6e96e37bfd38ce0f162da067f34034f068b01";
2831 };
2832 };
2833 "tmatch-2.0.1" = {
2834 name = "tmatch";
2835 packageName = "tmatch";
2836 version = "2.0.1";
2837 src = fetchurl {
2838 url = "https://registry.npmjs.org/tmatch/-/tmatch-2.0.1.tgz";
2839 sha1 = "0c56246f33f30da1b8d3d72895abaf16660f38cf";
2840 };
2841 };
2842 "lcov-parse-0.0.10" = {
2843 name = "lcov-parse";
2844 packageName = "lcov-parse";
2845 version = "0.0.10";
2846 src = fetchurl {
2847 url = "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz";
2848 sha1 = "1b0b8ff9ac9c7889250582b70b71315d9da6d9a3";
2849 };
2850 };
2851 "log-driver-1.2.5" = {
2852 name = "log-driver";
2853 packageName = "log-driver";
2854 version = "1.2.5";
2855 src = fetchurl {
2856 url = "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz";
2857 sha1 = "7ae4ec257302fd790d557cb10c97100d857b0056";
2858 };
2859 };
2860 "request-2.73.0" = {
2861 name = "request";
2862 packageName = "request";
2863 version = "2.73.0";
2864 src = fetchurl {
2865 url = "https://registry.npmjs.org/request/-/request-2.73.0.tgz";
2866 sha1 = "5f78a9fde4370abc8ff6479d7a84a71a14b878a2";
2867 };
2868 };
2869 "tough-cookie-2.2.2" = {
2870 name = "tough-cookie";
2871 packageName = "tough-cookie";
2872 version = "2.2.2";
2873 src = fetchurl {
2874 url = "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz";
2875 sha1 = "c83a1830f4e5ef0b93ef2a3488e724f8de016ac7";
2876 };
2877 };
2878 "cross-spawn-4.0.0" = {
2879 name = "cross-spawn";
2880 packageName = "cross-spawn";
2881 version = "4.0.0";
2882 src = fetchurl {
2883 url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.0.tgz";
2884 sha1 = "8254774ab4786b8c5b3cf4dfba66ce563932c252";
2885 };
2886 };
2887 "lru-cache-4.0.1" = {
2888 name = "lru-cache";
2889 packageName = "lru-cache";
2890 version = "4.0.1";
2891 src = fetchurl {
2892 url = "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.1.tgz";
2893 sha1 = "1343955edaf2e37d9b9e7ee7241e27c4b9fb72be";
2894 };
2895 };
2896 "pseudomap-1.0.2" = {
2897 name = "pseudomap";
2898 packageName = "pseudomap";
2899 version = "1.0.2";
2900 src = fetchurl {
2901 url = "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz";
2902 sha1 = "f052a28da70e618917ef0a8ac34c1ae5a68286b3";
2903 };
2904 };
2905 "yallist-2.0.0" = {
2906 name = "yallist";
2907 packageName = "yallist";
2908 version = "2.0.0";
2909 src = fetchurl {
2910 url = "https://registry.npmjs.org/yallist/-/yallist-2.0.0.tgz";
2911 sha1 = "306c543835f09ee1a4cb23b7bce9ab341c91cdd4";
2912 };
2913 };
2914 "caching-transform-1.0.1" = {
2915 name = "caching-transform";
2916 packageName = "caching-transform";
2917 version = "1.0.1";
2918 src = fetchurl {
2919 url = "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz";
2920 sha1 = "6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1";
2921 };
2922 };
2923 "convert-source-map-1.3.0" = {
2924 name = "convert-source-map";
2925 packageName = "convert-source-map";
2926 version = "1.3.0";
2927 src = fetchurl {
2928 url = "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.3.0.tgz";
2929 sha1 = "e9f3e9c6e2728efc2676696a70eb382f73106a67";
2930 };
2931 };
2932 "default-require-extensions-1.0.0" = {
2933 name = "default-require-extensions";
2934 packageName = "default-require-extensions";
2935 version = "1.0.0";
2936 src = fetchurl {
2937 url = "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz";
2938 sha1 = "f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8";
2939 };
2940 };
2941 "find-cache-dir-0.1.1" = {
2942 name = "find-cache-dir";
2943 packageName = "find-cache-dir";
2944 version = "0.1.1";
2945 src = fetchurl {
2946 url = "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz";
2947 sha1 = "c8defae57c8a52a8a784f9e31c57c742e993a0b9";
2948 };
2949 };
2950 "istanbul-lib-coverage-1.0.0" = {
2951 name = "istanbul-lib-coverage";
2952 packageName = "istanbul-lib-coverage";
2953 version = "1.0.0";
2954 src = fetchurl {
2955 url = "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.0.tgz";
2956 sha1 = "c3f9b6d226da12424064cce87fce0fb57fdfa7a2";
2957 };
2958 };
2959 "istanbul-lib-hook-1.0.0-alpha.4" = {
2960 name = "istanbul-lib-hook";
2961 packageName = "istanbul-lib-hook";
2962 version = "1.0.0-alpha.4";
2963 src = fetchurl {
2964 url = "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.0.0-alpha.4.tgz";
2965 sha1 = "8c5bb9f6fbd8526e0ae6cf639af28266906b938f";
2966 };
2967 };
2968 "istanbul-lib-instrument-1.1.3" = {
2969 name = "istanbul-lib-instrument";
2970 packageName = "istanbul-lib-instrument";
2971 version = "1.1.3";
2972 src = fetchurl {
2973 url = "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.1.3.tgz";
2974 sha1 = "66d5353d1f592b9e34d1cf9acda9c3f1ab509696";
2975 };
2976 };
2977 "istanbul-lib-report-1.0.0-alpha.3" = {
2978 name = "istanbul-lib-report";
2979 packageName = "istanbul-lib-report";
2980 version = "1.0.0-alpha.3";
2981 src = fetchurl {
2982 url = "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.0.0-alpha.3.tgz";
2983 sha1 = "32d5f6ec7f33ca3a602209e278b2e6ff143498af";
2984 };
2985 };
2986 "istanbul-lib-source-maps-1.0.1" = {
2987 name = "istanbul-lib-source-maps";
2988 packageName = "istanbul-lib-source-maps";
2989 version = "1.0.1";
2990 src = fetchurl {
2991 url = "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.0.1.tgz";
2992 sha1 = "92393f1b1f11b5916beea382c1901398a81b7d4c";
2993 };
2994 };
2995 "istanbul-reports-1.0.0-alpha.8" = {
2996 name = "istanbul-reports";
2997 packageName = "istanbul-reports";
2998 version = "1.0.0-alpha.8";
2999 src = fetchurl {
3000 url = "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.0.0-alpha.8.tgz";
3001 sha1 = "094830f4c7f3d482e466aac8abda2495f9ae4689";
3002 };
3003 };
3004 "md5-hex-1.3.0" = {
3005 name = "md5-hex";
3006 packageName = "md5-hex";
3007 version = "1.3.0";
3008 src = fetchurl {
3009 url = "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz";
3010 sha1 = "d2c4afe983c4370662179b8cad145219135046c4";
3011 };
3012 };
3013 "micromatch-2.3.11" = {
3014 name = "micromatch";
3015 packageName = "micromatch";
3016 version = "2.3.11";
3017 src = fetchurl {
3018 url = "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz";
3019 sha1 = "86677c97d1720b363431d04d0d15293bd38c1565";
3020 };
3021 };
3022 "pkg-up-1.0.0" = {
3023 name = "pkg-up";
3024 packageName = "pkg-up";
3025 version = "1.0.0";
3026 src = fetchurl {
3027 url = "https://registry.npmjs.org/pkg-up/-/pkg-up-1.0.0.tgz";
3028 sha1 = "3e08fb461525c4421624a33b9f7e6d0af5b05a26";
3029 };
3030 };
3031 "resolve-from-2.0.0" = {
3032 name = "resolve-from";
3033 packageName = "resolve-from";
3034 version = "2.0.0";
3035 src = fetchurl {
3036 url = "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz";
3037 sha1 = "9480ab20e94ffa1d9e80a804c7ea147611966b57";
3038 };
3039 };
3040 "spawn-wrap-1.2.4" = {
3041 name = "spawn-wrap";
3042 packageName = "spawn-wrap";
3043 version = "1.2.4";
3044 src = fetchurl {
3045 url = "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.2.4.tgz";
3046 sha1 = "920eb211a769c093eebfbd5b0e7a5d2e68ab2e40";
3047 };
3048 };
3049 "test-exclude-1.1.0" = {
3050 name = "test-exclude";
3051 packageName = "test-exclude";
3052 version = "1.1.0";
3053 src = fetchurl {
3054 url = "https://registry.npmjs.org/test-exclude/-/test-exclude-1.1.0.tgz";
3055 sha1 = "f5ddd718927b12fd02f270a0aa939ceb6eea4151";
3056 };
3057 };
3058 "yargs-4.8.1" = {
3059 name = "yargs";
3060 packageName = "yargs";
3061 version = "4.8.1";
3062 src = fetchurl {
3063 url = "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz";
3064 sha1 = "c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0";
3065 };
3066 };
3067 "yargs-parser-2.4.1" = {
3068 name = "yargs-parser";
3069 packageName = "yargs-parser";
3070 version = "2.4.1";
3071 src = fetchurl {
3072 url = "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz";
3073 sha1 = "85568de3cf150ff49fa51825f03a8c880ddcc5c4";
3074 };
3075 };
3076 "write-file-atomic-1.2.0" = {
3077 name = "write-file-atomic";
3078 packageName = "write-file-atomic";
3079 version = "1.2.0";
3080 src = fetchurl {
3081 url = "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.2.0.tgz";
3082 sha1 = "14c66d4e4cb3ca0565c28cf3b7a6f3e4d5938fab";
3083 };
3084 };
3085 "imurmurhash-0.1.4" = {
3086 name = "imurmurhash";
3087 packageName = "imurmurhash";
3088 version = "0.1.4";
3089 src = fetchurl {
3090 url = "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz";
3091 sha1 = "9218b9b2b928a238b13dc4fb6b6d576f231453ea";
3092 };
3093 };
3094 "slide-1.1.6" = {
3095 name = "slide";
3096 packageName = "slide";
3097 version = "1.1.6";
3098 src = fetchurl {
3099 url = "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz";
3100 sha1 = "56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707";
3101 };
3102 };
3103 "commondir-1.0.1" = {
3104 name = "commondir";
3105 packageName = "commondir";
3106 version = "1.0.1";
3107 src = fetchurl {
3108 url = "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz";
3109 sha1 = "ddd800da0c66127393cca5950ea968a3aaf1253b";
3110 };
3111 };
3112 "pkg-dir-1.0.0" = {
3113 name = "pkg-dir";
3114 packageName = "pkg-dir";
3115 version = "1.0.0";
3116 src = fetchurl {
3117 url = "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz";
3118 sha1 = "7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4";
3119 };
3120 };
3121 "append-transform-0.3.0" = {
3122 name = "append-transform";
3123 packageName = "append-transform";
3124 version = "0.3.0";
3125 src = fetchurl {
3126 url = "https://registry.npmjs.org/append-transform/-/append-transform-0.3.0.tgz";
3127 sha1 = "d6933ce4a85f09445d9ccc4cc119051b7381a813";
3128 };
3129 };
3130 "babel-generator-6.14.0" = {
3131 name = "babel-generator";
3132 packageName = "babel-generator";
3133 version = "6.14.0";
3134 src = fetchurl {
3135 url = "https://registry.npmjs.org/babel-generator/-/babel-generator-6.14.0.tgz";
3136 sha1 = "0f3f173e9cb95d501b1a735598b1a593dbee3705";
3137 };
3138 };
3139 "babel-template-6.15.0" = {
3140 name = "babel-template";
3141 packageName = "babel-template";
3142 version = "6.15.0";
3143 src = fetchurl {
3144 url = "https://registry.npmjs.org/babel-template/-/babel-template-6.15.0.tgz";
3145 sha1 = "a0f249c89d5d57e806fc50d0ec522fbddeade1f2";
3146 };
3147 };
3148 "babel-traverse-6.15.0" = {
3149 name = "babel-traverse";
3150 packageName = "babel-traverse";
3151 version = "6.15.0";
3152 src = fetchurl {
3153 url = "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.15.0.tgz";
3154 sha1 = "f0114c8c84cfee32c94eca02bcd0d2cbc8928478";
3155 };
3156 };
3157 "babel-types-6.15.0" = {
3158 name = "babel-types";
3159 packageName = "babel-types";
3160 version = "6.15.0";
3161 src = fetchurl {
3162 url = "https://registry.npmjs.org/babel-types/-/babel-types-6.15.0.tgz";
3163 sha1 = "413d4fef4750a48570de819f18a64d39a4f3dc38";
3164 };
3165 };
3166 "babylon-6.9.2" = {
3167 name = "babylon";
3168 packageName = "babylon";
3169 version = "6.9.2";
3170 src = fetchurl {
3171 url = "https://registry.npmjs.org/babylon/-/babylon-6.9.2.tgz";
3172 sha1 = "94e19951e47401fb5643f94dfae94dbdcf993144";
3173 };
3174 };
3175 "babel-messages-6.8.0" = {
3176 name = "babel-messages";
3177 packageName = "babel-messages";
3178 version = "6.8.0";
3179 src = fetchurl {
3180 url = "https://registry.npmjs.org/babel-messages/-/babel-messages-6.8.0.tgz";
3181 sha1 = "bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9";
3182 };
3183 };
3184 "babel-runtime-6.11.6" = {
3185 name = "babel-runtime";
3186 packageName = "babel-runtime";
3187 version = "6.11.6";
3188 src = fetchurl {
3189 url = "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.11.6.tgz";
3190 sha1 = "6db707fef2d49c49bfa3cb64efdb436b518b8222";
3191 };
3192 };
3193 "detect-indent-3.0.1" = {
3194 name = "detect-indent";
3195 packageName = "detect-indent";
3196 version = "3.0.1";
3197 src = fetchurl {
3198 url = "https://registry.npmjs.org/detect-indent/-/detect-indent-3.0.1.tgz";
3199 sha1 = "9dc5e5ddbceef8325764b9451b02bc6d54084f75";
3200 };
3201 };
3202 "core-js-2.4.1" = {
3203 name = "core-js";
3204 packageName = "core-js";
3205 version = "2.4.1";
3206 src = fetchurl {
3207 url = "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz";
3208 sha1 = "4de911e667b0eae9124e34254b53aea6fc618d3e";
3209 };
3210 };
3211 "regenerator-runtime-0.9.5" = {
3212 name = "regenerator-runtime";
3213 packageName = "regenerator-runtime";
3214 version = "0.9.5";
3215 src = fetchurl {
3216 url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.5.tgz";
3217 sha1 = "403d6d40a4bdff9c330dd9392dcbb2d9a8bba1fc";
3218 };
3219 };
3220 "repeating-1.1.3" = {
3221 name = "repeating";
3222 packageName = "repeating";
3223 version = "1.1.3";
3224 src = fetchurl {
3225 url = "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz";
3226 sha1 = "3d4114218877537494f97f77f9785fab810fa4ac";
3227 };
3228 };
3229 "babel-code-frame-6.11.0" = {
3230 name = "babel-code-frame";
3231 packageName = "babel-code-frame";
3232 version = "6.11.0";
3233 src = fetchurl {
3234 url = "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.11.0.tgz";
3235 sha1 = "9072dd2353fb0f85b6b57d2c97f0d134d188aed8";
3236 };
3237 };
3238 "debug-2.2.0" = {
3239 name = "debug";
3240 packageName = "debug";
3241 version = "2.2.0";
3242 src = fetchurl {
3243 url = "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz";
3244 sha1 = "f87057e995b1a1f6ae6a4960664137bc56f039da";
3245 };
3246 };
3247 "globals-8.18.0" = {
3248 name = "globals";
3249 packageName = "globals";
3250 version = "8.18.0";
3251 src = fetchurl {
3252 url = "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz";
3253 sha1 = "93d4a62bdcac38cfafafc47d6b034768cb0ffcb4";
3254 };
3255 };
3256 "invariant-2.2.1" = {
3257 name = "invariant";
3258 packageName = "invariant";
3259 version = "2.2.1";
3260 src = fetchurl {
3261 url = "https://registry.npmjs.org/invariant/-/invariant-2.2.1.tgz";
3262 sha1 = "b097010547668c7e337028ebe816ebe36c8a8d54";
3263 };
3264 };
3265 "esutils-2.0.2" = {
3266 name = "esutils";
3267 packageName = "esutils";
3268 version = "2.0.2";
3269 src = fetchurl {
3270 url = "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz";
3271 sha1 = "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b";
3272 };
3273 };
3274 "js-tokens-2.0.0" = {
3275 name = "js-tokens";
3276 packageName = "js-tokens";
3277 version = "2.0.0";
3278 src = fetchurl {
3279 url = "https://registry.npmjs.org/js-tokens/-/js-tokens-2.0.0.tgz";
3280 sha1 = "79903f5563ee778cc1162e6dcf1a0027c97f9cb5";
3281 };
3282 };
3283 "ms-0.7.1" = {
3284 name = "ms";
3285 packageName = "ms";
3286 version = "0.7.1";
3287 src = fetchurl {
3288 url = "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz";
3289 sha1 = "9cd13c03adbff25b65effde7ce864ee952017098";
3290 };
3291 };
3292 "loose-envify-1.2.0" = {
3293 name = "loose-envify";
3294 packageName = "loose-envify";
3295 version = "1.2.0";
3296 src = fetchurl {
3297 url = "https://registry.npmjs.org/loose-envify/-/loose-envify-1.2.0.tgz";
3298 sha1 = "69a65aad3de542cf4ee0f4fe74e8e33c709ccb0f";
3299 };
3300 };
3301 "js-tokens-1.0.3" = {
3302 name = "js-tokens";
3303 packageName = "js-tokens";
3304 version = "1.0.3";
3305 src = fetchurl {
3306 url = "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.3.tgz";
3307 sha1 = "14e56eb68c8f1a92c43d59f5014ec29dc20f2ae1";
3308 };
3309 };
3310 "to-fast-properties-1.0.2" = {
3311 name = "to-fast-properties";
3312 packageName = "to-fast-properties";
3313 version = "1.0.2";
3314 src = fetchurl {
3315 url = "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.2.tgz";
3316 sha1 = "f3f5c0c3ba7299a7ef99427e44633257ade43320";
3317 };
3318 };
3319 "path-parse-1.0.5" = {
3320 name = "path-parse";
3321 packageName = "path-parse";
3322 version = "1.0.5";
3323 src = fetchurl {
3324 url = "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz";
3325 sha1 = "3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1";
3326 };
3327 };
3328 "supports-color-3.1.2" = {
3329 name = "supports-color";
3330 packageName = "supports-color";
3331 version = "3.1.2";
3332 src = fetchurl {
3333 url = "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz";
3334 sha1 = "72a262894d9d408b956ca05ff37b2ed8a6e2a2d5";
3335 };
3336 };
3337 "has-flag-1.0.0" = {
3338 name = "has-flag";
3339 packageName = "has-flag";
3340 version = "1.0.0";
3341 src = fetchurl {
3342 url = "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz";
3343 sha1 = "9d9e793165ce017a00f00418c43f942a7b1d11fa";
3344 };
3345 };
3346 "handlebars-4.0.5" = {
3347 name = "handlebars";
3348 packageName = "handlebars";
3349 version = "4.0.5";
3350 src = fetchurl {
3351 url = "https://registry.npmjs.org/handlebars/-/handlebars-4.0.5.tgz";
3352 sha1 = "92c6ed6bb164110c50d4d8d0fbddc70806c6f8e7";
3353 };
3354 };
3355 "optimist-0.6.1" = {
3356 name = "optimist";
3357 packageName = "optimist";
3358 version = "0.6.1";
3359 src = fetchurl {
3360 url = "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz";
3361 sha1 = "da3ea74686fa21a19a111c326e90eb15a0196686";
3362 };
3363 };
3364 "md5-o-matic-0.1.1" = {
3365 name = "md5-o-matic";
3366 packageName = "md5-o-matic";
3367 version = "0.1.1";
3368 src = fetchurl {
3369 url = "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz";
3370 sha1 = "822bccd65e117c514fab176b25945d54100a03c3";
3371 };
3372 };
3373 "arr-diff-2.0.0" = {
3374 name = "arr-diff";
3375 packageName = "arr-diff";
3376 version = "2.0.0";
3377 src = fetchurl {
3378 url = "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz";
3379 sha1 = "8f3b827f955a8bd669697e4a4256ac3ceae356cf";
3380 };
3381 };
3382 "array-unique-0.2.1" = {
3383 name = "array-unique";
3384 packageName = "array-unique";
3385 version = "0.2.1";
3386 src = fetchurl {
3387 url = "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz";
3388 sha1 = "a1d97ccafcbc2625cc70fadceb36a50c58b01a53";
3389 };
3390 };
3391 "braces-1.8.5" = {
3392 name = "braces";
3393 packageName = "braces";
3394 version = "1.8.5";
3395 src = fetchurl {
3396 url = "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz";
3397 sha1 = "ba77962e12dff969d6b76711e914b737857bf6a7";
3398 };
3399 };
3400 "expand-brackets-0.1.5" = {
3401 name = "expand-brackets";
3402 packageName = "expand-brackets";
3403 version = "0.1.5";
3404 src = fetchurl {
3405 url = "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz";
3406 sha1 = "df07284e342a807cd733ac5af72411e581d1177b";
3407 };
3408 };
3409 "extglob-0.3.2" = {
3410 name = "extglob";
3411 packageName = "extglob";
3412 version = "0.3.2";
3413 src = fetchurl {
3414 url = "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz";
3415 sha1 = "2e18ff3d2f49ab2765cec9023f011daa8d8349a1";
3416 };
3417 };
3418 "filename-regex-2.0.0" = {
3419 name = "filename-regex";
3420 packageName = "filename-regex";
3421 version = "2.0.0";
3422 src = fetchurl {
3423 url = "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz";
3424 sha1 = "996e3e80479b98b9897f15a8a58b3d084e926775";
3425 };
3426 };
3427 "is-extglob-1.0.0" = {
3428 name = "is-extglob";
3429 packageName = "is-extglob";
3430 version = "1.0.0";
3431 src = fetchurl {
3432 url = "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz";
3433 sha1 = "ac468177c4943405a092fc8f29760c6ffc6206c0";
3434 };
3435 };
3436 "is-glob-2.0.1" = {
3437 name = "is-glob";
3438 packageName = "is-glob";
3439 version = "2.0.1";
3440 src = fetchurl {
3441 url = "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz";
3442 sha1 = "d096f926a3ded5600f3fdfd91198cb0888c2d863";
3443 };
3444 };
3445 "normalize-path-2.0.1" = {
3446 name = "normalize-path";
3447 packageName = "normalize-path";
3448 version = "2.0.1";
3449 src = fetchurl {
3450 url = "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz";
3451 sha1 = "47886ac1662760d4261b7d979d241709d3ce3f7a";
3452 };
3453 };
3454 "object.omit-2.0.0" = {
3455 name = "object.omit";
3456 packageName = "object.omit";
3457 version = "2.0.0";
3458 src = fetchurl {
3459 url = "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz";
3460 sha1 = "868597333d54e60662940bb458605dd6ae12fe94";
3461 };
3462 };
3463 "parse-glob-3.0.4" = {
3464 name = "parse-glob";
3465 packageName = "parse-glob";
3466 version = "3.0.4";
3467 src = fetchurl {
3468 url = "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz";
3469 sha1 = "b2c376cfb11f35513badd173ef0bb6e3a388391c";
3470 };
3471 };
3472 "regex-cache-0.4.3" = {
3473 name = "regex-cache";
3474 packageName = "regex-cache";
3475 version = "0.4.3";
3476 src = fetchurl {
3477 url = "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz";
3478 sha1 = "9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145";
3479 };
3480 };
3481 "arr-flatten-1.0.1" = {
3482 name = "arr-flatten";
3483 packageName = "arr-flatten";
3484 version = "1.0.1";
3485 src = fetchurl {
3486 url = "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz";
3487 sha1 = "e5ffe54d45e19f32f216e91eb99c8ce892bb604b";
3488 };
3489 };
3490 "expand-range-1.8.2" = {
3491 name = "expand-range";
3492 packageName = "expand-range";
3493 version = "1.8.2";
3494 src = fetchurl {
3495 url = "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz";
3496 sha1 = "a299effd335fe2721ebae8e257ec79644fc85337";
3497 };
3498 };
3499 "preserve-0.2.0" = {
3500 name = "preserve";
3501 packageName = "preserve";
3502 version = "0.2.0";
3503 src = fetchurl {
3504 url = "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz";
3505 sha1 = "815ed1f6ebc65926f865b310c0713bcb3315ce4b";
3506 };
3507 };
3508 "repeat-element-1.1.2" = {
3509 name = "repeat-element";
3510 packageName = "repeat-element";
3511 version = "1.1.2";
3512 src = fetchurl {
3513 url = "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz";
3514 sha1 = "ef089a178d1483baae4d93eb98b4f9e4e11d990a";
3515 };
3516 };
3517 "fill-range-2.2.3" = {
3518 name = "fill-range";
3519 packageName = "fill-range";
3520 version = "2.2.3";
3521 src = fetchurl {
3522 url = "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz";
3523 sha1 = "50b77dfd7e469bc7492470963699fe7a8485a723";
3524 };
3525 };
3526 "is-number-2.1.0" = {
3527 name = "is-number";
3528 packageName = "is-number";
3529 version = "2.1.0";
3530 src = fetchurl {
3531 url = "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz";
3532 sha1 = "01fcbbb393463a548f2f466cce16dece49db908f";
3533 };
3534 };
3535 "isobject-2.1.0" = {
3536 name = "isobject";
3537 packageName = "isobject";
3538 version = "2.1.0";
3539 src = fetchurl {
3540 url = "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz";
3541 sha1 = "f065561096a3f1da2ef46272f815c840d87e0c89";
3542 };
3543 };
3544 "randomatic-1.1.5" = {
3545 name = "randomatic";
3546 packageName = "randomatic";
3547 version = "1.1.5";
3548 src = fetchurl {
3549 url = "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz";
3550 sha1 = "5e9ef5f2d573c67bd2b8124ae90b5156e457840b";
3551 };
3552 };
3553 "is-posix-bracket-0.1.1" = {
3554 name = "is-posix-bracket";
3555 packageName = "is-posix-bracket";
3556 version = "0.1.1";
3557 src = fetchurl {
3558 url = "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz";
3559 sha1 = "3334dc79774368e92f016e6fbc0a88f5cd6e6bc4";
3560 };
3561 };
3562 "for-own-0.1.4" = {
3563 name = "for-own";
3564 packageName = "for-own";
3565 version = "0.1.4";
3566 src = fetchurl {
3567 url = "https://registry.npmjs.org/for-own/-/for-own-0.1.4.tgz";
3568 sha1 = "0149b41a39088c7515f51ebe1c1386d45f935072";
3569 };
3570 };
3571 "is-extendable-0.1.1" = {
3572 name = "is-extendable";
3573 packageName = "is-extendable";
3574 version = "0.1.1";
3575 src = fetchurl {
3576 url = "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz";
3577 sha1 = "62b110e289a471418e3ec36a617d472e301dfc89";
3578 };
3579 };
3580 "for-in-0.1.6" = {
3581 name = "for-in";
3582 packageName = "for-in";
3583 version = "0.1.6";
3584 src = fetchurl {
3585 url = "https://registry.npmjs.org/for-in/-/for-in-0.1.6.tgz";
3586 sha1 = "c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8";
3587 };
3588 };
3589 "glob-base-0.3.0" = {
3590 name = "glob-base";
3591 packageName = "glob-base";
3592 version = "0.3.0";
3593 src = fetchurl {
3594 url = "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz";
3595 sha1 = "dbb164f6221b1c0b1ccf82aea328b497df0ea3c4";
3596 };
3597 };
3598 "is-dotfile-1.0.2" = {
3599 name = "is-dotfile";
3600 packageName = "is-dotfile";
3601 version = "1.0.2";
3602 src = fetchurl {
3603 url = "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz";
3604 sha1 = "2c132383f39199f8edc268ca01b9b007d205cc4d";
3605 };
3606 };
3607 "glob-parent-2.0.0" = {
3608 name = "glob-parent";
3609 packageName = "glob-parent";
3610 version = "2.0.0";
3611 src = fetchurl {
3612 url = "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz";
3613 sha1 = "81383d72db054fcccf5336daa902f182f6edbb28";
3614 };
3615 };
3616 "is-equal-shallow-0.1.3" = {
3617 name = "is-equal-shallow";
3618 packageName = "is-equal-shallow";
3619 version = "0.1.3";
3620 src = fetchurl {
3621 url = "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz";
3622 sha1 = "2238098fc221de0bcfa5d9eac4c45d638aa1c534";
3623 };
3624 };
3625 "is-primitive-2.0.0" = {
3626 name = "is-primitive";
3627 packageName = "is-primitive";
3628 version = "2.0.0";
3629 src = fetchurl {
3630 url = "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz";
3631 sha1 = "207bab91638499c07b2adf240a41a87210034575";
3632 };
3633 };
3634 "signal-exit-2.1.2" = {
3635 name = "signal-exit";
3636 packageName = "signal-exit";
3637 version = "2.1.2";
3638 src = fetchurl {
3639 url = "https://registry.npmjs.org/signal-exit/-/signal-exit-2.1.2.tgz";
3640 sha1 = "375879b1f92ebc3b334480d038dc546a6d558564";
3641 };
3642 };
3643 "lodash.assign-4.2.0" = {
3644 name = "lodash.assign";
3645 packageName = "lodash.assign";
3646 version = "4.2.0";
3647 src = fetchurl {
3648 url = "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz";
3649 sha1 = "0d99f3ccd7a6d261d19bdaeb9245005d285808e7";
3650 };
3651 };
3652 "require-main-filename-1.0.1" = {
3653 name = "require-main-filename";
3654 packageName = "require-main-filename";
3655 version = "1.0.1";
3656 src = fetchurl {
3657 url = "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz";
3658 sha1 = "97f717b69d48784f5f526a6c5aa8ffdda055a4d1";
3659 };
3660 };
3661 "cliui-3.2.0" = {
3662 name = "cliui";
3663 packageName = "cliui";
3664 version = "3.2.0";
3665 src = fetchurl {
3666 url = "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz";
3667 sha1 = "120601537a916d29940f934da3b48d585a39213d";
3668 };
3669 };
3670 "get-caller-file-1.0.2" = {
3671 name = "get-caller-file";
3672 packageName = "get-caller-file";
3673 version = "1.0.2";
3674 src = fetchurl {
3675 url = "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz";
3676 sha1 = "f702e63127e7e231c160a80c1554acb70d5047e5";
3677 };
3678 };
3679 "os-locale-1.4.0" = {
3680 name = "os-locale";
3681 packageName = "os-locale";
3682 version = "1.4.0";
3683 src = fetchurl {
3684 url = "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz";
3685 sha1 = "20f9f17ae29ed345e8bde583b13d2009803c14d9";
3686 };
3687 };
3688 "require-directory-2.1.1" = {
3689 name = "require-directory";
3690 packageName = "require-directory";
3691 version = "2.1.1";
3692 src = fetchurl {
3693 url = "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz";
3694 sha1 = "8c64ad5fd30dab1c976e2344ffe7f792a6a6df42";
3695 };
3696 };
3697 "set-blocking-2.0.0" = {
3698 name = "set-blocking";
3699 packageName = "set-blocking";
3700 version = "2.0.0";
3701 src = fetchurl {
3702 url = "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz";
3703 sha1 = "045f9782d011ae9a6803ddd382b24392b3d890f7";
3704 };
3705 };
3706 "string-width-1.0.2" = {
3707 name = "string-width";
3708 packageName = "string-width";
3709 version = "1.0.2";
3710 src = fetchurl {
3711 url = "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz";
3712 sha1 = "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3";
3713 };
3714 };
3715 "which-module-1.0.0" = {
3716 name = "which-module";
3717 packageName = "which-module";
3718 version = "1.0.0";
3719 src = fetchurl {
3720 url = "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz";
3721 sha1 = "bba63ca861948994ff307736089e3b96026c2a4f";
3722 };
3723 };
3724 "window-size-0.2.0" = {
3725 name = "window-size";
3726 packageName = "window-size";
3727 version = "0.2.0";
3728 src = fetchurl {
3729 url = "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz";
3730 sha1 = "b4315bb4214a3d7058ebeee892e13fa24d98b075";
3731 };
3732 };
3733 "y18n-3.2.1" = {
3734 name = "y18n";
3735 packageName = "y18n";
3736 version = "3.2.1";
3737 src = fetchurl {
3738 url = "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz";
3739 sha1 = "6d15fba884c08679c0d77e88e7759e811e07fa41";
3740 };
3741 };
3742 "wrap-ansi-2.0.0" = {
3743 name = "wrap-ansi";
3744 packageName = "wrap-ansi";
3745 version = "2.0.0";
3746 src = fetchurl {
3747 url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.0.0.tgz";
3748 sha1 = "7d30f8f873f9a5bbc3a64dabc8d177e071ae426f";
3749 };
3750 };
3751 "lcid-1.0.0" = {
3752 name = "lcid";
3753 packageName = "lcid";
3754 version = "1.0.0";
3755 src = fetchurl {
3756 url = "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz";
3757 sha1 = "308accafa0bc483a3867b4b6f2b9506251d1b835";
3758 };
3759 };
3760 "invert-kv-1.0.0" = {
3761 name = "invert-kv";
3762 packageName = "invert-kv";
3763 version = "1.0.0";
3764 src = fetchurl {
3765 url = "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz";
3766 sha1 = "104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6";
3767 };
3768 };
3769 "code-point-at-1.0.0" = {
3770 name = "code-point-at";
3771 packageName = "code-point-at";
3772 version = "1.0.0";
3773 src = fetchurl {
3774 url = "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz";
3775 sha1 = "f69b192d3f7d91e382e4b71bddb77878619ab0c6";
3776 };
3777 };
3778 "is-fullwidth-code-point-1.0.0" = {
3779 name = "is-fullwidth-code-point";
3780 packageName = "is-fullwidth-code-point";
3781 version = "1.0.0";
3782 src = fetchurl {
3783 url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz";
3784 sha1 = "ef9e31386f031a7f0d643af82fde50c457ef00cb";
3785 };
3786 };
3787 "camelcase-3.0.0" = {
3788 name = "camelcase";
3789 packageName = "camelcase";
3790 version = "3.0.0";
3791 src = fetchurl {
3792 url = "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz";
3793 sha1 = "32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a";
3794 };
3795 };
3796 "diff-1.4.0" = {
3797 name = "diff";
3798 packageName = "diff";
3799 version = "1.4.0";
3800 src = fetchurl {
3801 url = "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz";
3802 sha1 = "7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf";
3803 };
3804 };
3805 "unicode-length-1.0.3" = {
3806 name = "unicode-length";
3807 packageName = "unicode-length";
3808 version = "1.0.3";
3809 src = fetchurl {
3810 url = "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz";
3811 sha1 = "5ada7a7fed51841a418a328cf149478ac8358abb";
3812 };
3813 };
3814 "punycode-1.4.1" = {
3815 name = "punycode";
3816 packageName = "punycode";
3817 version = "1.4.1";
3818 src = fetchurl {
3819 url = "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz";
3820 sha1 = "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e";
3821 };
3822 };
3823 "events-to-array-1.0.2" = {
3824 name = "events-to-array";
3825 packageName = "events-to-array";
3826 version = "1.0.2";
3827 src = fetchurl {
3828 url = "https://registry.npmjs.org/events-to-array/-/events-to-array-1.0.2.tgz";
3829 sha1 = "b3484465534fe4ff66fbdd1a83b777713ba404aa";
3830 };
3831 };
3832 "maxmin-1.1.0" = {
3833 name = "maxmin";
3834 packageName = "maxmin";
3835 version = "1.1.0";
3836 src = fetchurl {
3837 url = "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz";
3838 sha1 = "71365e84a99dd8f8b3f7d5fde2f00d1e7f73be61";
3839 };
3840 };
3841 "uri-path-1.0.0" = {
3842 name = "uri-path";
3843 packageName = "uri-path";
3844 version = "1.0.0";
3845 src = fetchurl {
3846 url = "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz";
3847 sha1 = "9747f018358933c31de0fccfd82d138e67262e32";
3848 };
3849 };
3850 "figures-1.7.0" = {
3851 name = "figures";
3852 packageName = "figures";
3853 version = "1.7.0";
3854 src = fetchurl {
3855 url = "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz";
3856 sha1 = "cbe1e3affcf1cd44b80cadfed28dc793a9701d2e";
3857 };
3858 };
3859 "gzip-size-1.0.0" = {
3860 name = "gzip-size";
3861 packageName = "gzip-size";
3862 version = "1.0.0";
3863 src = fetchurl {
3864 url = "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz";
3865 sha1 = "66cf8b101047227b95bace6ea1da0c177ed5c22f";
3866 };
3867 };
3868 "pretty-bytes-1.0.4" = {
3869 name = "pretty-bytes";
3870 packageName = "pretty-bytes";
3871 version = "1.0.4";
3872 src = fetchurl {
3873 url = "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz";
3874 sha1 = "0a22e8210609ad35542f8c8d5d2159aff0751c84";
3875 };
3876 };
3877 "concat-stream-1.5.2" = {
3878 name = "concat-stream";
3879 packageName = "concat-stream";
3880 version = "1.5.2";
3881 src = fetchurl {
3882 url = "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz";
3883 sha1 = "708978624d856af41a5a741defdd261da752c266";
3884 };
3885 };
3886 "browserify-zlib-0.1.4" = {
3887 name = "browserify-zlib";
3888 packageName = "browserify-zlib";
3889 version = "0.1.4";
3890 src = fetchurl {
3891 url = "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz";
3892 sha1 = "bb35f8a519f600e0fa6b8485241c979d0141fb2d";
3893 };
3894 };
3895 "typedarray-0.0.6" = {
3896 name = "typedarray";
3897 packageName = "typedarray";
3898 version = "0.0.6";
3899 src = fetchurl {
3900 url = "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz";
3901 sha1 = "867ac74e3864187b1d3d47d996a78ec5c8830777";
3902 };
3903 };
3904 "pako-0.2.9" = {
3905 name = "pako";
3906 packageName = "pako";
3907 version = "0.2.9";
3908 src = fetchurl {
3909 url = "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz";
3910 sha1 = "f3f7522f4ef782348da8161bad9ecfd51bf83a75";
3911 };
3912 };
3913 "gaze-1.1.1" = {
3914 name = "gaze";
3915 packageName = "gaze";
3916 version = "1.1.1";
3917 src = fetchurl {
3918 url = "https://registry.npmjs.org/gaze/-/gaze-1.1.1.tgz";
3919 sha1 = "ab81d557d1b515f5752bd5f1117d6fa3c4e9db41";
3920 };
3921 };
3922 "tiny-lr-0.2.1" = {
3923 name = "tiny-lr";
3924 packageName = "tiny-lr";
3925 version = "0.2.1";
3926 src = fetchurl {
3927 url = "https://registry.npmjs.org/tiny-lr/-/tiny-lr-0.2.1.tgz";
3928 sha1 = "b3fdba802e5d56a33c2f6f10794b32e477ac729d";
3929 };
3930 };
3931 "globule-1.0.0" = {
3932 name = "globule";
3933 packageName = "globule";
3934 version = "1.0.0";
3935 src = fetchurl {
3936 url = "https://registry.npmjs.org/globule/-/globule-1.0.0.tgz";
3937 sha1 = "f22aebaacce02be492453e979c3ae9b6983f1c6c";
3938 };
3939 };
3940 "lodash-4.9.0" = {
3941 name = "lodash";
3942 packageName = "lodash";
3943 version = "4.9.0";
3944 src = fetchurl {
3945 url = "https://registry.npmjs.org/lodash/-/lodash-4.9.0.tgz";
3946 sha1 = "4c20d742f03ce85dc700e0dd7ab9bcab85e6fc14";
3947 };
3948 };
3949 "body-parser-1.14.2" = {
3950 name = "body-parser";
3951 packageName = "body-parser";
3952 version = "1.14.2";
3953 src = fetchurl {
3954 url = "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz";
3955 sha1 = "1015cb1fe2c443858259581db53332f8d0cf50f9";
3956 };
3957 };
3958 "faye-websocket-0.10.0" = {
3959 name = "faye-websocket";
3960 packageName = "faye-websocket";
3961 version = "0.10.0";
3962 src = fetchurl {
3963 url = "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz";
3964 sha1 = "4e492f8d04dfb6f89003507f6edbf2d501e7c6f4";
3965 };
3966 };
3967 "livereload-js-2.2.2" = {
3968 name = "livereload-js";
3969 packageName = "livereload-js";
3970 version = "2.2.2";
3971 src = fetchurl {
3972 url = "https://registry.npmjs.org/livereload-js/-/livereload-js-2.2.2.tgz";
3973 sha1 = "6c87257e648ab475bc24ea257457edcc1f8d0bc2";
3974 };
3975 };
3976 "parseurl-1.3.1" = {
3977 name = "parseurl";
3978 packageName = "parseurl";
3979 version = "1.3.1";
3980 src = fetchurl {
3981 url = "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz";
3982 sha1 = "c8ab8c9223ba34888aa64a297b28853bec18da56";
3983 };
3984 };
3985 "qs-5.1.0" = {
3986 name = "qs";
3987 packageName = "qs";
3988 version = "5.1.0";
3989 src = fetchurl {
3990 url = "https://registry.npmjs.org/qs/-/qs-5.1.0.tgz";
3991 sha1 = "4d932e5c7ea411cca76a312d39a606200fd50cd9";
3992 };
3993 };
3994 "bytes-2.2.0" = {
3995 name = "bytes";
3996 packageName = "bytes";
3997 version = "2.2.0";
3998 src = fetchurl {
3999 url = "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz";
4000 sha1 = "fd35464a403f6f9117c2de3609ecff9cae000588";
4001 };
4002 };
4003 "content-type-1.0.2" = {
4004 name = "content-type";
4005 packageName = "content-type";
4006 version = "1.0.2";
4007 src = fetchurl {
4008 url = "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz";
4009 sha1 = "b7d113aee7a8dd27bd21133c4dc2529df1721eed";
4010 };
4011 };
4012 "depd-1.1.0" = {
4013 name = "depd";
4014 packageName = "depd";
4015 version = "1.1.0";
4016 src = fetchurl {
4017 url = "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz";
4018 sha1 = "e1bd82c6aab6ced965b97b88b17ed3e528ca18c3";
4019 };
4020 };
4021 "http-errors-1.3.1" = {
4022 name = "http-errors";
4023 packageName = "http-errors";
4024 version = "1.3.1";
4025 src = fetchurl {
4026 url = "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz";
4027 sha1 = "197e22cdebd4198585e8694ef6786197b91ed942";
4028 };
4029 };
4030 "on-finished-2.3.0" = {
4031 name = "on-finished";
4032 packageName = "on-finished";
4033 version = "2.3.0";
4034 src = fetchurl {
4035 url = "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz";
4036 sha1 = "20f1336481b083cd75337992a16971aa2d906947";
4037 };
4038 };
4039 "qs-5.2.0" = {
4040 name = "qs";
4041 packageName = "qs";
4042 version = "5.2.0";
4043 src = fetchurl {
4044 url = "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz";
4045 sha1 = "a9f31142af468cb72b25b30136ba2456834916be";
4046 };
4047 };
4048 "raw-body-2.1.7" = {
4049 name = "raw-body";
4050 packageName = "raw-body";
4051 version = "2.1.7";
4052 src = fetchurl {
4053 url = "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz";
4054 sha1 = "adfeace2e4fb3098058014d08c072dcc59758774";
4055 };
4056 };
4057 "type-is-1.6.13" = {
4058 name = "type-is";
4059 packageName = "type-is";
4060 version = "1.6.13";
4061 src = fetchurl {
4062 url = "https://registry.npmjs.org/type-is/-/type-is-1.6.13.tgz";
4063 sha1 = "6e83ba7bc30cd33a7bb0b7fb00737a2085bf9d08";
4064 };
4065 };
4066 "statuses-1.3.0" = {
4067 name = "statuses";
4068 packageName = "statuses";
4069 version = "1.3.0";
4070 src = fetchurl {
4071 url = "https://registry.npmjs.org/statuses/-/statuses-1.3.0.tgz";
4072 sha1 = "8e55758cb20e7682c1f4fce8dcab30bf01d1e07a";
4073 };
4074 };
4075 "ee-first-1.1.1" = {
4076 name = "ee-first";
4077 packageName = "ee-first";
4078 version = "1.1.1";
4079 src = fetchurl {
4080 url = "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz";
4081 sha1 = "590c61156b0ae2f4f0255732a158b266bc56b21d";
4082 };
4083 };
4084 "bytes-2.4.0" = {
4085 name = "bytes";
4086 packageName = "bytes";
4087 version = "2.4.0";
4088 src = fetchurl {
4089 url = "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz";
4090 sha1 = "7d97196f9d5baf7f6935e25985549edd2a6c2339";
4091 };
4092 };
4093 "unpipe-1.0.0" = {
4094 name = "unpipe";
4095 packageName = "unpipe";
4096 version = "1.0.0";
4097 src = fetchurl {
4098 url = "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz";
4099 sha1 = "b2bf4ee8514aae6165b4817829d21b2ef49904ec";
4100 };
4101 };
4102 "media-typer-0.3.0" = {
4103 name = "media-typer";
4104 packageName = "media-typer";
4105 version = "0.3.0";
4106 src = fetchurl {
4107 url = "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz";
4108 sha1 = "8710d7af0aa626f8fffa1ce00168545263255748";
4109 };
4110 };
4111 "websocket-driver-0.6.5" = {
4112 name = "websocket-driver";
4113 packageName = "websocket-driver";
4114 version = "0.6.5";
4115 src = fetchurl {
4116 url = "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz";
4117 sha1 = "5cb2556ceb85f4373c6d8238aa691c8454e13a36";
4118 };
4119 };
4120 "websocket-extensions-0.1.1" = {
4121 name = "websocket-extensions";
4122 packageName = "websocket-extensions";
4123 version = "0.1.1";
4124 src = fetchurl {
4125 url = "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz";
4126 sha1 = "76899499c184b6ef754377c2dbb0cd6cb55d29e7";
4127 };
4128 };
4129 "batch-0.5.3" = {
4130 name = "batch";
4131 packageName = "batch";
4132 version = "0.5.3";
4133 src = fetchurl {
4134 url = "https://registry.npmjs.org/batch/-/batch-0.5.3.tgz";
4135 sha1 = "3f3414f380321743bfc1042f9a83ff1d5824d464";
4136 };
4137 };
4138 "bluebird-2.11.0" = {
4139 name = "bluebird";
4140 packageName = "bluebird";
4141 version = "2.11.0";
4142 src = fetchurl {
4143 url = "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz";
4144 sha1 = "534b9033c022c9579c56ba3b3e5a5caafbb650e1";
4145 };
4146 };
4147 "chokidar-1.6.0" = {
4148 name = "chokidar";
4149 packageName = "chokidar";
4150 version = "1.6.0";
4151 src = fetchurl {
4152 url = "https://registry.npmjs.org/chokidar/-/chokidar-1.6.0.tgz";
4153 sha1 = "90c32ad4802901d7713de532dc284e96a63ad058";
4154 };
4155 };
4156 "connect-3.5.0" = {
4157 name = "connect";
4158 packageName = "connect";
4159 version = "3.5.0";
4160 src = fetchurl {
4161 url = "https://registry.npmjs.org/connect/-/connect-3.5.0.tgz";
4162 sha1 = "b357525a0b4c1f50599cd983e1d9efeea9677198";
4163 };
4164 };
4165 "di-0.0.1" = {
4166 name = "di";
4167 packageName = "di";
4168 version = "0.0.1";
4169 src = fetchurl {
4170 url = "https://registry.npmjs.org/di/-/di-0.0.1.tgz";
4171 sha1 = "806649326ceaa7caa3306d75d985ea2748ba913c";
4172 };
4173 };
4174 "dom-serialize-2.2.1" = {
4175 name = "dom-serialize";
4176 packageName = "dom-serialize";
4177 version = "2.2.1";
4178 src = fetchurl {
4179 url = "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz";
4180 sha1 = "562ae8999f44be5ea3076f5419dcd59eb43ac95b";
4181 };
4182 };
4183 "expand-braces-0.1.2" = {
4184 name = "expand-braces";
4185 packageName = "expand-braces";
4186 version = "0.1.2";
4187 src = fetchurl {
4188 url = "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz";
4189 sha1 = "488b1d1d2451cb3d3a6b192cfc030f44c5855fea";
4190 };
4191 };
4192 "http-proxy-1.15.1" = {
4193 name = "http-proxy";
4194 packageName = "http-proxy";
4195 version = "1.15.1";
4196 src = fetchurl {
4197 url = "https://registry.npmjs.org/http-proxy/-/http-proxy-1.15.1.tgz";
4198 sha1 = "91a6088172e79bc0e821d5eb04ce702f32446393";
4199 };
4200 };
4201 "isbinaryfile-3.0.1" = {
4202 name = "isbinaryfile";
4203 packageName = "isbinaryfile";
4204 version = "3.0.1";
4205 src = fetchurl {
4206 url = "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.1.tgz";
4207 sha1 = "6e99573675372e841a0520c036b41513d783e79e";
4208 };
4209 };
4210 "log4js-0.6.38" = {
4211 name = "log4js";
4212 packageName = "log4js";
4213 version = "0.6.38";
4214 src = fetchurl {
4215 url = "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz";
4216 sha1 = "2c494116695d6fb25480943d3fc872e662a522fd";
4217 };
4218 };
4219 "socket.io-1.4.8" = {
4220 name = "socket.io";
4221 packageName = "socket.io";
4222 version = "1.4.8";
4223 src = fetchurl {
4224 url = "https://registry.npmjs.org/socket.io/-/socket.io-1.4.8.tgz";
4225 sha1 = "e576f330cd0bed64e55b3fd26df991141884867b";
4226 };
4227 };
4228 "useragent-2.1.9" = {
4229 name = "useragent";
4230 packageName = "useragent";
4231 version = "2.1.9";
4232 src = fetchurl {
4233 url = "https://registry.npmjs.org/useragent/-/useragent-2.1.9.tgz";
4234 sha1 = "4dba2bc4dad1875777ab15de3ff8098b475000b7";
4235 };
4236 };
4237 "anymatch-1.3.0" = {
4238 name = "anymatch";
4239 packageName = "anymatch";
4240 version = "1.3.0";
4241 src = fetchurl {
4242 url = "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz";
4243 sha1 = "a3e52fa39168c825ff57b0248126ce5a8ff95507";
4244 };
4245 };
4246 "async-each-1.0.1" = {
4247 name = "async-each";
4248 packageName = "async-each";
4249 version = "1.0.1";
4250 src = fetchurl {
4251 url = "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz";
4252 sha1 = "19d386a1d9edc6e7c1c85d388aedbcc56d33602d";
4253 };
4254 };
4255 "is-binary-path-1.0.1" = {
4256 name = "is-binary-path";
4257 packageName = "is-binary-path";
4258 version = "1.0.1";
4259 src = fetchurl {
4260 url = "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz";
4261 sha1 = "75f16642b480f187a711c814161fd3a4a7655898";
4262 };
4263 };
4264 "readdirp-2.1.0" = {
4265 name = "readdirp";
4266 packageName = "readdirp";
4267 version = "2.1.0";
4268 src = fetchurl {
4269 url = "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz";
4270 sha1 = "4ed0ad060df3073300c48440373f72d1cc642d78";
4271 };
4272 };
4273 "fsevents-1.0.14" = {
4274 name = "fsevents";
4275 packageName = "fsevents";
4276 version = "1.0.14";
4277 src = fetchurl {
4278 url = "https://registry.npmjs.org/fsevents/-/fsevents-1.0.14.tgz";
4279 sha1 = "558e8cc38643d8ef40fe45158486d0d25758eee4";
4280 };
4281 };
4282 "binary-extensions-1.6.0" = {
4283 name = "binary-extensions";
4284 packageName = "binary-extensions";
4285 version = "1.6.0";
4286 src = fetchurl {
4287 url = "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.6.0.tgz";
4288 sha1 = "aa2184cbc434d29862c66a69bf81cc0a3383ee79";
4289 };
4290 };
4291 "set-immediate-shim-1.0.1" = {
4292 name = "set-immediate-shim";
4293 packageName = "set-immediate-shim";
4294 version = "1.0.1";
4295 src = fetchurl {
4296 url = "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz";
4297 sha1 = "4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61";
4298 };
4299 };
4300 "nan-2.4.0" = {
4301 name = "nan";
4302 packageName = "nan";
4303 version = "2.4.0";
4304 src = fetchurl {
4305 url = "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz";
4306 sha1 = "fb3c59d45fe4effe215f0b890f8adf6eb32d2232";
4307 };
4308 };
4309 "node-pre-gyp-0.6.30" = {
4310 name = "node-pre-gyp";
4311 packageName = "node-pre-gyp";
4312 version = "0.6.30";
4313 src = fetchurl {
4314 url = "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.30.tgz";
4315 sha1 = "64d3073a6f573003717ccfe30c89023297babba1";
4316 };
4317 };
4318 "npmlog-4.0.0" = {
4319 name = "npmlog";
4320 packageName = "npmlog";
4321 version = "4.0.0";
4322 src = fetchurl {
4323 url = "https://registry.npmjs.org/npmlog/-/npmlog-4.0.0.tgz";
4324 sha1 = "e094503961c70c1774eb76692080e8d578a9f88f";
4325 };
4326 };
4327 "tar-2.2.1" = {
4328 name = "tar";
4329 packageName = "tar";
4330 version = "2.2.1";
4331 src = fetchurl {
4332 url = "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz";
4333 sha1 = "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1";
4334 };
4335 };
4336 "tar-pack-3.1.4" = {
4337 name = "tar-pack";
4338 packageName = "tar-pack";
4339 version = "3.1.4";
4340 src = fetchurl {
4341 url = "https://registry.npmjs.org/tar-pack/-/tar-pack-3.1.4.tgz";
4342 sha1 = "bc8cf9a22f5832739f12f3910dac1eb97b49708c";
4343 };
4344 };
4345 "are-we-there-yet-1.1.2" = {
4346 name = "are-we-there-yet";
4347 packageName = "are-we-there-yet";
4348 version = "1.1.2";
4349 src = fetchurl {
4350 url = "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz";
4351 sha1 = "80e470e95a084794fe1899262c5667c6e88de1b3";
4352 };
4353 };
4354 "console-control-strings-1.1.0" = {
4355 name = "console-control-strings";
4356 packageName = "console-control-strings";
4357 version = "1.1.0";
4358 src = fetchurl {
4359 url = "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz";
4360 sha1 = "3d7cf4464db6446ea644bf4b39507f9851008e8e";
4361 };
4362 };
4363 "gauge-2.6.0" = {
4364 name = "gauge";
4365 packageName = "gauge";
4366 version = "2.6.0";
4367 src = fetchurl {
4368 url = "https://registry.npmjs.org/gauge/-/gauge-2.6.0.tgz";
4369 sha1 = "d35301ad18e96902b4751dcbbe40f4218b942a46";
4370 };
4371 };
4372 "delegates-1.0.0" = {
4373 name = "delegates";
4374 packageName = "delegates";
4375 version = "1.0.0";
4376 src = fetchurl {
4377 url = "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz";
4378 sha1 = "84c6e159b81904fdca59a0ef44cd870d31250f9a";
4379 };
4380 };
4381 "aproba-1.0.4" = {
4382 name = "aproba";
4383 packageName = "aproba";
4384 version = "1.0.4";
4385 src = fetchurl {
4386 url = "https://registry.npmjs.org/aproba/-/aproba-1.0.4.tgz";
4387 sha1 = "2713680775e7614c8ba186c065d4e2e52d1072c0";
4388 };
4389 };
4390 "has-color-0.1.7" = {
4391 name = "has-color";
4392 packageName = "has-color";
4393 version = "0.1.7";
4394 src = fetchurl {
4395 url = "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz";
4396 sha1 = "67144a5260c34fc3cca677d041daf52fe7b78b2f";
4397 };
4398 };
4399 "has-unicode-2.0.1" = {
4400 name = "has-unicode";
4401 packageName = "has-unicode";
4402 version = "2.0.1";
4403 src = fetchurl {
4404 url = "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz";
4405 sha1 = "e0e6fe6a28cf51138855e086d1691e771de2a8b9";
4406 };
4407 };
4408 "wide-align-1.1.0" = {
4409 name = "wide-align";
4410 packageName = "wide-align";
4411 version = "1.1.0";
4412 src = fetchurl {
4413 url = "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz";
4414 sha1 = "40edde802a71fea1f070da3e62dcda2e7add96ad";
4415 };
4416 };
4417 "block-stream-0.0.9" = {
4418 name = "block-stream";
4419 packageName = "block-stream";
4420 version = "0.0.9";
4421 src = fetchurl {
4422 url = "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz";
4423 sha1 = "13ebfe778a03205cfe03751481ebb4b3300c126a";
4424 };
4425 };
4426 "fstream-1.0.10" = {
4427 name = "fstream";
4428 packageName = "fstream";
4429 version = "1.0.10";
4430 src = fetchurl {
4431 url = "https://registry.npmjs.org/fstream/-/fstream-1.0.10.tgz";
4432 sha1 = "604e8a92fe26ffd9f6fae30399d4984e1ab22822";
4433 };
4434 };
4435 "fstream-ignore-1.0.5" = {
4436 name = "fstream-ignore";
4437 packageName = "fstream-ignore";
4438 version = "1.0.5";
4439 src = fetchurl {
4440 url = "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz";
4441 sha1 = "9c31dae34767018fe1d249b24dada67d092da105";
4442 };
4443 };
4444 "uid-number-0.0.6" = {
4445 name = "uid-number";
4446 packageName = "uid-number";
4447 version = "0.0.6";
4448 src = fetchurl {
4449 url = "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz";
4450 sha1 = "0ea10e8035e8eb5b8e4449f06da1c730663baa81";
4451 };
4452 };
4453 "finalhandler-0.5.0" = {
4454 name = "finalhandler";
4455 packageName = "finalhandler";
4456 version = "0.5.0";
4457 src = fetchurl {
4458 url = "https://registry.npmjs.org/finalhandler/-/finalhandler-0.5.0.tgz";
4459 sha1 = "e9508abece9b6dba871a6942a1d7911b91911ac7";
4460 };
4461 };
4462 "utils-merge-1.0.0" = {
4463 name = "utils-merge";
4464 packageName = "utils-merge";
4465 version = "1.0.0";
4466 src = fetchurl {
4467 url = "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz";
4468 sha1 = "0294fb922bb9375153541c4f7096231f287c8af8";
4469 };
4470 };
4471 "escape-html-1.0.3" = {
4472 name = "escape-html";
4473 packageName = "escape-html";
4474 version = "1.0.3";
4475 src = fetchurl {
4476 url = "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz";
4477 sha1 = "0258eae4d3d0c0974de1c169188ef0051d1d1988";
4478 };
4479 };
4480 "custom-event-1.0.0" = {
4481 name = "custom-event";
4482 packageName = "custom-event";
4483 version = "1.0.0";
4484 src = fetchurl {
4485 url = "https://registry.npmjs.org/custom-event/-/custom-event-1.0.0.tgz";
4486 sha1 = "2e4628be19dc4b214b5c02630c5971e811618062";
4487 };
4488 };
4489 "ent-2.2.0" = {
4490 name = "ent";
4491 packageName = "ent";
4492 version = "2.2.0";
4493 src = fetchurl {
4494 url = "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz";
4495 sha1 = "e964219325a21d05f44466a2f686ed6ce5f5dd1d";
4496 };
4497 };
4498 "void-elements-2.0.1" = {
4499 name = "void-elements";
4500 packageName = "void-elements";
4501 version = "2.0.1";
4502 src = fetchurl {
4503 url = "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz";
4504 sha1 = "c066afb582bb1cb4128d60ea92392e94d5e9dbec";
4505 };
4506 };
4507 "array-slice-0.2.3" = {
4508 name = "array-slice";
4509 packageName = "array-slice";
4510 version = "0.2.3";
4511 src = fetchurl {
4512 url = "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz";
4513 sha1 = "dd3cfb80ed7973a75117cdac69b0b99ec86186f5";
4514 };
4515 };
4516 "braces-0.1.5" = {
4517 name = "braces";
4518 packageName = "braces";
4519 version = "0.1.5";
4520 src = fetchurl {
4521 url = "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz";
4522 sha1 = "c085711085291d8b75fdd74eab0f8597280711e6";
4523 };
4524 };
4525 "expand-range-0.1.1" = {
4526 name = "expand-range";
4527 packageName = "expand-range";
4528 version = "0.1.1";
4529 src = fetchurl {
4530 url = "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz";
4531 sha1 = "4cb8eda0993ca56fa4f41fc42f3cbb4ccadff044";
4532 };
4533 };
4534 "is-number-0.1.1" = {
4535 name = "is-number";
4536 packageName = "is-number";
4537 version = "0.1.1";
4538 src = fetchurl {
4539 url = "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz";
4540 sha1 = "69a7af116963d47206ec9bd9b48a14216f1e3806";
4541 };
4542 };
4543 "repeat-string-0.2.2" = {
4544 name = "repeat-string";
4545 packageName = "repeat-string";
4546 version = "0.2.2";
4547 src = fetchurl {
4548 url = "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz";
4549 sha1 = "c7a8d3236068362059a7e4651fc6884e8b1fb4ae";
4550 };
4551 };
4552 "eventemitter3-1.2.0" = {
4553 name = "eventemitter3";
4554 packageName = "eventemitter3";
4555 version = "1.2.0";
4556 src = fetchurl {
4557 url = "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz";
4558 sha1 = "1c86991d816ad1e504750e73874224ecf3bec508";
4559 };
4560 };
4561 "requires-port-1.0.0" = {
4562 name = "requires-port";
4563 packageName = "requires-port";
4564 version = "1.0.0";
4565 src = fetchurl {
4566 url = "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz";
4567 sha1 = "925d2601d39ac485e091cf0da5c6e694dc3dcaff";
4568 };
4569 };
4570 "readable-stream-1.0.34" = {
4571 name = "readable-stream";
4572 packageName = "readable-stream";
4573 version = "1.0.34";
4574 src = fetchurl {
4575 url = "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz";
4576 sha1 = "125820e34bc842d2f2aaafafe4c2916ee32c157c";
4577 };
4578 };
4579 "semver-4.3.6" = {
4580 name = "semver";
4581 packageName = "semver";
4582 version = "4.3.6";
4583 src = fetchurl {
4584 url = "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz";
4585 sha1 = "300bc6e0e86374f7ba61068b5b1ecd57fc6532da";
4586 };
4587 };
4588 "engine.io-1.6.11" = {
4589 name = "engine.io";
4590 packageName = "engine.io";
4591 version = "1.6.11";
4592 src = fetchurl {
4593 url = "https://registry.npmjs.org/engine.io/-/engine.io-1.6.11.tgz";
4594 sha1 = "2533a97a65876c40ffcf95397b7ef9b495c423fe";
4595 };
4596 };
4597 "socket.io-parser-2.2.6" = {
4598 name = "socket.io-parser";
4599 packageName = "socket.io-parser";
4600 version = "2.2.6";
4601 src = fetchurl {
4602 url = "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.6.tgz";
4603 sha1 = "38dfd61df50dcf8ab1d9e2091322bf902ba28b99";
4604 };
4605 };
4606 "socket.io-client-1.4.8" = {
4607 name = "socket.io-client";
4608 packageName = "socket.io-client";
4609 version = "1.4.8";
4610 src = fetchurl {
4611 url = "https://registry.npmjs.org/socket.io-client/-/socket.io-client-1.4.8.tgz";
4612 sha1 = "481b241e73df140ea1a4fb03486a85ad097f5558";
4613 };
4614 };
4615 "socket.io-adapter-0.4.0" = {
4616 name = "socket.io-adapter";
4617 packageName = "socket.io-adapter";
4618 version = "0.4.0";
4619 src = fetchurl {
4620 url = "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-0.4.0.tgz";
4621 sha1 = "fb9f82ab1aa65290bf72c3657955b930a991a24f";
4622 };
4623 };
4624 "has-binary-0.1.7" = {
4625 name = "has-binary";
4626 packageName = "has-binary";
4627 version = "0.1.7";
4628 src = fetchurl {
4629 url = "https://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz";
4630 sha1 = "68e61eb16210c9545a0a5cce06a873912fe1e68c";
4631 };
4632 };
4633 "base64id-0.1.0" = {
4634 name = "base64id";
4635 packageName = "base64id";
4636 version = "0.1.0";
4637 src = fetchurl {
4638 url = "https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz";
4639 sha1 = "02ce0fdeee0cef4f40080e1e73e834f0b1bfce3f";
4640 };
4641 };
4642 "ws-1.1.0" = {
4643 name = "ws";
4644 packageName = "ws";
4645 version = "1.1.0";
4646 src = fetchurl {
4647 url = "https://registry.npmjs.org/ws/-/ws-1.1.0.tgz";
4648 sha1 = "c1d6fd1515d3ceff1f0ae2759bf5fd77030aad1d";
4649 };
4650 };
4651 "engine.io-parser-1.2.4" = {
4652 name = "engine.io-parser";
4653 packageName = "engine.io-parser";
4654 version = "1.2.4";
4655 src = fetchurl {
4656 url = "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-1.2.4.tgz";
4657 sha1 = "e0897b0bf14e792d4cd2a5950553919c56948c42";
4658 };
4659 };
4660 "accepts-1.1.4" = {
4661 name = "accepts";
4662 packageName = "accepts";
4663 version = "1.1.4";
4664 src = fetchurl {
4665 url = "https://registry.npmjs.org/accepts/-/accepts-1.1.4.tgz";
4666 sha1 = "d71c96f7d41d0feda2c38cd14e8a27c04158df4a";
4667 };
4668 };
4669 "options-0.0.6" = {
4670 name = "options";
4671 packageName = "options";
4672 version = "0.0.6";
4673 src = fetchurl {
4674 url = "https://registry.npmjs.org/options/-/options-0.0.6.tgz";
4675 sha1 = "ec22d312806bb53e731773e7cdaefcf1c643128f";
4676 };
4677 };
4678 "ultron-1.0.2" = {
4679 name = "ultron";
4680 packageName = "ultron";
4681 version = "1.0.2";
4682 src = fetchurl {
4683 url = "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz";
4684 sha1 = "ace116ab557cd197386a4e88f4685378c8b2e4fa";
4685 };
4686 };
4687 "after-0.8.1" = {
4688 name = "after";
4689 packageName = "after";
4690 version = "0.8.1";
4691 src = fetchurl {
4692 url = "https://registry.npmjs.org/after/-/after-0.8.1.tgz";
4693 sha1 = "ab5d4fb883f596816d3515f8f791c0af486dd627";
4694 };
4695 };
4696 "arraybuffer.slice-0.0.6" = {
4697 name = "arraybuffer.slice";
4698 packageName = "arraybuffer.slice";
4699 version = "0.0.6";
4700 src = fetchurl {
4701 url = "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz";
4702 sha1 = "f33b2159f0532a3f3107a272c0ccfbd1ad2979ca";
4703 };
4704 };
4705 "base64-arraybuffer-0.1.2" = {
4706 name = "base64-arraybuffer";
4707 packageName = "base64-arraybuffer";
4708 version = "0.1.2";
4709 src = fetchurl {
4710 url = "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.2.tgz";
4711 sha1 = "474df4a9f2da24e05df3158c3b1db3c3cd46a154";
4712 };
4713 };
4714 "blob-0.0.4" = {
4715 name = "blob";
4716 packageName = "blob";
4717 version = "0.0.4";
4718 src = fetchurl {
4719 url = "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz";
4720 sha1 = "bcf13052ca54463f30f9fc7e95b9a47630a94921";
4721 };
4722 };
4723 "has-binary-0.1.6" = {
4724 name = "has-binary";
4725 packageName = "has-binary";
4726 version = "0.1.6";
4727 src = fetchurl {
4728 url = "https://registry.npmjs.org/has-binary/-/has-binary-0.1.6.tgz";
4729 sha1 = "25326f39cfa4f616ad8787894e3af2cfbc7b6e10";
4730 };
4731 };
4732 "utf8-2.1.0" = {
4733 name = "utf8";
4734 packageName = "utf8";
4735 version = "2.1.0";
4736 src = fetchurl {
4737 url = "https://registry.npmjs.org/utf8/-/utf8-2.1.0.tgz";
4738 sha1 = "0cfec5c8052d44a23e3aaa908104e8075f95dfd5";
4739 };
4740 };
4741 "mime-types-2.0.14" = {
4742 name = "mime-types";
4743 packageName = "mime-types";
4744 version = "2.0.14";
4745 src = fetchurl {
4746 url = "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz";
4747 sha1 = "310e159db23e077f8bb22b748dabfa4957140aa6";
4748 };
4749 };
4750 "negotiator-0.4.9" = {
4751 name = "negotiator";
4752 packageName = "negotiator";
4753 version = "0.4.9";
4754 src = fetchurl {
4755 url = "https://registry.npmjs.org/negotiator/-/negotiator-0.4.9.tgz";
4756 sha1 = "92e46b6db53c7e421ed64a2bc94f08be7630df3f";
4757 };
4758 };
4759 "mime-db-1.12.0" = {
4760 name = "mime-db";
4761 packageName = "mime-db";
4762 version = "1.12.0";
4763 src = fetchurl {
4764 url = "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz";
4765 sha1 = "3d0c63180f458eb10d325aaa37d7c58ae312e9d7";
4766 };
4767 };
4768 "json3-3.3.2" = {
4769 name = "json3";
4770 packageName = "json3";
4771 version = "3.3.2";
4772 src = fetchurl {
4773 url = "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz";
4774 sha1 = "3c0434743df93e2f5c42aee7b19bcb483575f4e1";
4775 };
4776 };
4777 "component-emitter-1.1.2" = {
4778 name = "component-emitter";
4779 packageName = "component-emitter";
4780 version = "1.1.2";
4781 src = fetchurl {
4782 url = "https://registry.npmjs.org/component-emitter/-/component-emitter-1.1.2.tgz";
4783 sha1 = "296594f2753daa63996d2af08d15a95116c9aec3";
4784 };
4785 };
4786 "benchmark-1.0.0" = {
4787 name = "benchmark";
4788 packageName = "benchmark";
4789 version = "1.0.0";
4790 src = fetchurl {
4791 url = "https://registry.npmjs.org/benchmark/-/benchmark-1.0.0.tgz";
4792 sha1 = "2f1e2fa4c359f11122aa183082218e957e390c73";
4793 };
4794 };
4795 "engine.io-client-1.6.11" = {
4796 name = "engine.io-client";
4797 packageName = "engine.io-client";
4798 version = "1.6.11";
4799 src = fetchurl {
4800 url = "https://registry.npmjs.org/engine.io-client/-/engine.io-client-1.6.11.tgz";
4801 sha1 = "7d250d8fa1c218119ecde51390458a57d5171376";
4802 };
4803 };
4804 "component-bind-1.0.0" = {
4805 name = "component-bind";
4806 packageName = "component-bind";
4807 version = "1.0.0";
4808 src = fetchurl {
4809 url = "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz";
4810 sha1 = "00c608ab7dcd93897c0009651b1d3a8e1e73bbd1";
4811 };
4812 };
4813 "component-emitter-1.2.0" = {
4814 name = "component-emitter";
4815 packageName = "component-emitter";
4816 version = "1.2.0";
4817 src = fetchurl {
4818 url = "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.0.tgz";
4819 sha1 = "ccd113a86388d06482d03de3fc7df98526ba8efe";
4820 };
4821 };
4822 "object-component-0.0.3" = {
4823 name = "object-component";
4824 packageName = "object-component";
4825 version = "0.0.3";
4826 src = fetchurl {
4827 url = "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz";
4828 sha1 = "f0c69aa50efc95b866c186f400a33769cb2f1291";
4829 };
4830 };
4831 "indexof-0.0.1" = {
4832 name = "indexof";
4833 packageName = "indexof";
4834 version = "0.0.1";
4835 src = fetchurl {
4836 url = "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz";
4837 sha1 = "82dc336d232b9062179d05ab3293a66059fd435d";
4838 };
4839 };
4840 "parseuri-0.0.4" = {
4841 name = "parseuri";
4842 packageName = "parseuri";
4843 version = "0.0.4";
4844 src = fetchurl {
4845 url = "https://registry.npmjs.org/parseuri/-/parseuri-0.0.4.tgz";
4846 sha1 = "806582a39887e1ea18dd5e2fe0e01902268e9350";
4847 };
4848 };
4849 "to-array-0.1.4" = {
4850 name = "to-array";
4851 packageName = "to-array";
4852 version = "0.1.4";
4853 src = fetchurl {
4854 url = "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz";
4855 sha1 = "17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890";
4856 };
4857 };
4858 "backo2-1.0.2" = {
4859 name = "backo2";
4860 packageName = "backo2";
4861 version = "1.0.2";
4862 src = fetchurl {
4863 url = "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz";
4864 sha1 = "31ab1ac8b129363463e35b3ebb69f4dfcfba7947";
4865 };
4866 };
4867 "has-cors-1.1.0" = {
4868 name = "has-cors";
4869 packageName = "has-cors";
4870 version = "1.1.0";
4871 src = fetchurl {
4872 url = "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz";
4873 sha1 = "5e474793f7ea9843d1bb99c23eef49ff126fff39";
4874 };
4875 };
4876 "ws-1.0.1" = {
4877 name = "ws";
4878 packageName = "ws";
4879 version = "1.0.1";
4880 src = fetchurl {
4881 url = "https://registry.npmjs.org/ws/-/ws-1.0.1.tgz";
4882 sha1 = "7d0b2a2e58cddd819039c29c9de65045e1b310e9";
4883 };
4884 };
4885 "xmlhttprequest-ssl-1.5.1" = {
4886 name = "xmlhttprequest-ssl";
4887 packageName = "xmlhttprequest-ssl";
4888 version = "1.5.1";
4889 src = fetchurl {
4890 url = "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.1.tgz";
4891 sha1 = "3b7741fea4a86675976e908d296d4445961faa67";
4892 };
4893 };
4894 "parsejson-0.0.1" = {
4895 name = "parsejson";
4896 packageName = "parsejson";
4897 version = "0.0.1";
4898 src = fetchurl {
4899 url = "https://registry.npmjs.org/parsejson/-/parsejson-0.0.1.tgz";
4900 sha1 = "9b10c6c0d825ab589e685153826de0a3ba278bcc";
4901 };
4902 };
4903 "parseqs-0.0.2" = {
4904 name = "parseqs";
4905 packageName = "parseqs";
4906 version = "0.0.2";
4907 src = fetchurl {
4908 url = "https://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz";
4909 sha1 = "9dfe70b2cddac388bde4f35b1f240fa58adbe6c7";
4910 };
4911 };
4912 "component-inherit-0.0.3" = {
4913 name = "component-inherit";
4914 packageName = "component-inherit";
4915 version = "0.0.3";
4916 src = fetchurl {
4917 url = "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz";
4918 sha1 = "645fc4adf58b72b649d5cae65135619db26ff143";
4919 };
4920 };
4921 "yeast-0.1.2" = {
4922 name = "yeast";
4923 packageName = "yeast";
4924 version = "0.1.2";
4925 src = fetchurl {
4926 url = "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz";
4927 sha1 = "008e06d8094320c372dbc2f8ed76a0ca6c8ac419";
4928 };
4929 };
4930 "better-assert-1.0.2" = {
4931 name = "better-assert";
4932 packageName = "better-assert";
4933 version = "1.0.2";
4934 src = fetchurl {
4935 url = "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz";
4936 sha1 = "40866b9e1b9e0b55b481894311e68faffaebc522";
4937 };
4938 };
4939 "callsite-1.0.0" = {
4940 name = "callsite";
4941 packageName = "callsite";
4942 version = "1.0.0";
4943 src = fetchurl {
4944 url = "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz";
4945 sha1 = "280398e5d664bd74038b6f0905153e6e8af1bc20";
4946 };
4947 };
4948 "socket.io-parser-2.2.2" = {
4949 name = "socket.io-parser";
4950 packageName = "socket.io-parser";
4951 version = "2.2.2";
4952 src = fetchurl {
4953 url = "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-2.2.2.tgz";
4954 sha1 = "3d7af6b64497e956b7d9fe775f999716027f9417";
4955 };
4956 };
4957 "debug-0.7.4" = {
4958 name = "debug";
4959 packageName = "debug";
4960 version = "0.7.4";
4961 src = fetchurl {
4962 url = "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz";
4963 sha1 = "06e1ea8082c2cb14e39806e22e2f6f757f92af39";
4964 };
4965 };
4966 "json3-3.2.6" = {
4967 name = "json3";
4968 packageName = "json3";
4969 version = "3.2.6";
4970 src = fetchurl {
4971 url = "https://registry.npmjs.org/json3/-/json3-3.2.6.tgz";
4972 sha1 = "f6efc93c06a04de9aec53053df2559bb19e2038b";
4973 };
4974 };
4975 "lru-cache-2.2.4" = {
4976 name = "lru-cache";
4977 packageName = "lru-cache";
4978 version = "2.2.4";
4979 src = fetchurl {
4980 url = "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz";
4981 sha1 = "6c658619becf14031d0d0b594b16042ce4dc063d";
4982 };
4983 };
4984 "cli-list-0.1.8" = {
4985 name = "cli-list";
4986 packageName = "cli-list";
4987 version = "0.1.8";
4988 src = fetchurl {
4989 url = "https://registry.npmjs.org/cli-list/-/cli-list-0.1.8.tgz";
4990 sha1 = "aee6d45c4c59bf80068bb968089fb06f1aeddc0a";
4991 };
4992 };
4993 "configstore-1.4.0" = {
4994 name = "configstore";
4995 packageName = "configstore";
4996 version = "1.4.0";
4997 src = fetchurl {
4998 url = "https://registry.npmjs.org/configstore/-/configstore-1.4.0.tgz";
4999 sha1 = "c35781d0501d268c25c54b8b17f6240e8a4fb021";
5000 };
5001 };
5002 "cross-spawn-3.0.1" = {
5003 name = "cross-spawn";
5004 packageName = "cross-spawn";
5005 version = "3.0.1";
5006 src = fetchurl {
5007 url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz";
5008 sha1 = "1256037ecb9f0c5f79e3d6ef135e30770184b982";
5009 };
5010 };
5011 "fullname-2.1.0" = {
5012 name = "fullname";
5013 packageName = "fullname";
5014 version = "2.1.0";
5015 src = fetchurl {
5016 url = "https://registry.npmjs.org/fullname/-/fullname-2.1.0.tgz";
5017 sha1 = "c46bf0f7c3f24fd5b3358d00e4a41380eef87350";
5018 };
5019 };
5020 "got-5.6.0" = {
5021 name = "got";
5022 packageName = "got";
5023 version = "5.6.0";
5024 src = fetchurl {
5025 url = "https://registry.npmjs.org/got/-/got-5.6.0.tgz";
5026 sha1 = "bb1d7ee163b78082bbc8eb836f3f395004ea6fbf";
5027 };
5028 };
5029 "humanize-string-1.0.1" = {
5030 name = "humanize-string";
5031 packageName = "humanize-string";
5032 version = "1.0.1";
5033 src = fetchurl {
5034 url = "https://registry.npmjs.org/humanize-string/-/humanize-string-1.0.1.tgz";
5035 sha1 = "fce2d6c545efc25dea1f23235182c98da0180b42";
5036 };
5037 };
5038 "inquirer-0.11.4" = {
5039 name = "inquirer";
5040 packageName = "inquirer";
5041 version = "0.11.4";
5042 src = fetchurl {
5043 url = "https://registry.npmjs.org/inquirer/-/inquirer-0.11.4.tgz";
5044 sha1 = "81e3374e8361beaff2d97016206d359d0b32fa4d";
5045 };
5046 };
5047 "insight-0.7.0" = {
5048 name = "insight";
5049 packageName = "insight";
5050 version = "0.7.0";
5051 src = fetchurl {
5052 url = "https://registry.npmjs.org/insight/-/insight-0.7.0.tgz";
5053 sha1 = "061f9189835bd38a97a60c2b76ea0c6b30099ff6";
5054 };
5055 };
5056 "npm-keyword-4.2.0" = {
5057 name = "npm-keyword";
5058 packageName = "npm-keyword";
5059 version = "4.2.0";
5060 src = fetchurl {
5061 url = "https://registry.npmjs.org/npm-keyword/-/npm-keyword-4.2.0.tgz";
5062 sha1 = "98ffebfdbb1336f27ef5fe1baca0dcacd0acf6c0";
5063 };
5064 };
5065 "opn-3.0.3" = {
5066 name = "opn";
5067 packageName = "opn";
5068 version = "3.0.3";
5069 src = fetchurl {
5070 url = "https://registry.npmjs.org/opn/-/opn-3.0.3.tgz";
5071 sha1 = "b6d99e7399f78d65c3baaffef1fb288e9b85243a";
5072 };
5073 };
5074 "package-json-2.4.0" = {
5075 name = "package-json";
5076 packageName = "package-json";
5077 version = "2.4.0";
5078 src = fetchurl {
5079 url = "https://registry.npmjs.org/package-json/-/package-json-2.4.0.tgz";
5080 sha1 = "0d15bd67d1cbbddbb2ca222ff2edb86bcb31a8bb";
5081 };
5082 };
5083 "parse-help-0.1.1" = {
5084 name = "parse-help";
5085 packageName = "parse-help";
5086 version = "0.1.1";
5087 src = fetchurl {
5088 url = "https://registry.npmjs.org/parse-help/-/parse-help-0.1.1.tgz";
5089 sha1 = "2f4df942e77a5581bba9967c0c3f48e4c66d7dda";
5090 };
5091 };
5092 "root-check-1.0.0" = {
5093 name = "root-check";
5094 packageName = "root-check";
5095 version = "1.0.0";
5096 src = fetchurl {
5097 url = "https://registry.npmjs.org/root-check/-/root-check-1.0.0.tgz";
5098 sha1 = "c52a794bf0db9fad567536e41898f0c9e0a86697";
5099 };
5100 };
5101 "sort-on-1.3.0" = {
5102 name = "sort-on";
5103 packageName = "sort-on";
5104 version = "1.3.0";
5105 src = fetchurl {
5106 url = "https://registry.npmjs.org/sort-on/-/sort-on-1.3.0.tgz";
5107 sha1 = "0dfd5b364b23df7f2acd86985daeb889e1a7c840";
5108 };
5109 };
5110 "tabtab-1.3.2" = {
5111 name = "tabtab";
5112 packageName = "tabtab";
5113 version = "1.3.2";
5114 src = fetchurl {
5115 url = "https://registry.npmjs.org/tabtab/-/tabtab-1.3.2.tgz";
5116 sha1 = "bb9c2ca6324f659fde7634c2caf3c096e1187ca7";
5117 };
5118 };
5119 "titleize-1.0.0" = {
5120 name = "titleize";
5121 packageName = "titleize";
5122 version = "1.0.0";
5123 src = fetchurl {
5124 url = "https://registry.npmjs.org/titleize/-/titleize-1.0.0.tgz";
5125 sha1 = "7d350722061830ba6617631e0cfd3ea08398d95a";
5126 };
5127 };
5128 "update-notifier-0.6.3" = {
5129 name = "update-notifier";
5130 packageName = "update-notifier";
5131 version = "0.6.3";
5132 src = fetchurl {
5133 url = "https://registry.npmjs.org/update-notifier/-/update-notifier-0.6.3.tgz";
5134 sha1 = "776dec8daa13e962a341e8a1d98354306b67ae08";
5135 };
5136 };
5137 "user-home-2.0.0" = {
5138 name = "user-home";
5139 packageName = "user-home";
5140 version = "2.0.0";
5141 src = fetchurl {
5142 url = "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz";
5143 sha1 = "9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f";
5144 };
5145 };
5146 "yeoman-character-1.1.0" = {
5147 name = "yeoman-character";
5148 packageName = "yeoman-character";
5149 version = "1.1.0";
5150 src = fetchurl {
5151 url = "https://registry.npmjs.org/yeoman-character/-/yeoman-character-1.1.0.tgz";
5152 sha1 = "90d4b5beaf92759086177015b2fdfa2e0684d7c7";
5153 };
5154 };
5155 "yeoman-doctor-2.1.0" = {
5156 name = "yeoman-doctor";
5157 packageName = "yeoman-doctor";
5158 version = "2.1.0";
5159 src = fetchurl {
5160 url = "https://registry.npmjs.org/yeoman-doctor/-/yeoman-doctor-2.1.0.tgz";
5161 sha1 = "94ab784896a64f53a9fac452d5e9133e2750a236";
5162 };
5163 };
5164 "yeoman-environment-1.6.3" = {
5165 name = "yeoman-environment";
5166 packageName = "yeoman-environment";
5167 version = "1.6.3";
5168 src = fetchurl {
5169 url = "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-1.6.3.tgz";
5170 sha1 = "8154d4b5d74bcc57d9a92b9f8d9b1ae2a75570c8";
5171 };
5172 };
5173 "yosay-1.2.0" = {
5174 name = "yosay";
5175 packageName = "yosay";
5176 version = "1.2.0";
5177 src = fetchurl {
5178 url = "https://registry.npmjs.org/yosay/-/yosay-1.2.0.tgz";
5179 sha1 = "34ac105e02d019c07ae7ab8c63ab43aeaad4c615";
5180 };
5181 };
5182 "xdg-basedir-2.0.0" = {
5183 name = "xdg-basedir";
5184 packageName = "xdg-basedir";
5185 version = "2.0.0";
5186 src = fetchurl {
5187 url = "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz";
5188 sha1 = "edbc903cc385fc04523d966a335504b5504d1bd2";
5189 };
5190 };
5191 "npmconf-2.1.2" = {
5192 name = "npmconf";
5193 packageName = "npmconf";
5194 version = "2.1.2";
5195 src = fetchurl {
5196 url = "https://registry.npmjs.org/npmconf/-/npmconf-2.1.2.tgz";
5197 sha1 = "66606a4a736f1e77a059aa071a79c94ab781853a";
5198 };
5199 };
5200 "config-chain-1.1.10" = {
5201 name = "config-chain";
5202 packageName = "config-chain";
5203 version = "1.1.10";
5204 src = fetchurl {
5205 url = "https://registry.npmjs.org/config-chain/-/config-chain-1.1.10.tgz";
5206 sha1 = "7fc383de0fcc84d711cb465bd176579cad612346";
5207 };
5208 };
5209 "uid-number-0.0.5" = {
5210 name = "uid-number";
5211 packageName = "uid-number";
5212 version = "0.0.5";
5213 src = fetchurl {
5214 url = "https://registry.npmjs.org/uid-number/-/uid-number-0.0.5.tgz";
5215 sha1 = "5a3db23ef5dbd55b81fce0ec9a2ac6fccdebb81e";
5216 };
5217 };
5218 "proto-list-1.2.4" = {
5219 name = "proto-list";
5220 packageName = "proto-list";
5221 version = "1.2.4";
5222 src = fetchurl {
5223 url = "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz";
5224 sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
5225 };
5226 };
5227 "create-error-class-3.0.2" = {
5228 name = "create-error-class";
5229 packageName = "create-error-class";
5230 version = "3.0.2";
5231 src = fetchurl {
5232 url = "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz";
5233 sha1 = "06be7abef947a3f14a30fd610671d401bca8b7b6";
5234 };
5235 };
5236 "duplexer2-0.1.4" = {
5237 name = "duplexer2";
5238 packageName = "duplexer2";
5239 version = "0.1.4";
5240 src = fetchurl {
5241 url = "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz";
5242 sha1 = "8b12dab878c0d69e3e7891051662a32fc6bddcc1";
5243 };
5244 };
5245 "is-plain-obj-1.1.0" = {
5246 name = "is-plain-obj";
5247 packageName = "is-plain-obj";
5248 version = "1.1.0";
5249 src = fetchurl {
5250 url = "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz";
5251 sha1 = "71a50c8429dfca773c92a390a4a03b39fcd51d3e";
5252 };
5253 };
5254 "is-retry-allowed-1.1.0" = {
5255 name = "is-retry-allowed";
5256 packageName = "is-retry-allowed";
5257 version = "1.1.0";
5258 src = fetchurl {
5259 url = "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz";
5260 sha1 = "11a060568b67339444033d0125a61a20d564fb34";
5261 };
5262 };
5263 "node-status-codes-1.0.0" = {
5264 name = "node-status-codes";
5265 packageName = "node-status-codes";
5266 version = "1.0.0";
5267 src = fetchurl {
5268 url = "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz";
5269 sha1 = "5ae5541d024645d32a58fcddc9ceecea7ae3ac2f";
5270 };
5271 };
5272 "unzip-response-1.0.1" = {
5273 name = "unzip-response";
5274 packageName = "unzip-response";
5275 version = "1.0.1";
5276 src = fetchurl {
5277 url = "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.1.tgz";
5278 sha1 = "4a73959f2989470fa503791cefb54e1dbbc68412";
5279 };
5280 };
5281 "url-parse-lax-1.0.0" = {
5282 name = "url-parse-lax";
5283 packageName = "url-parse-lax";
5284 version = "1.0.0";
5285 src = fetchurl {
5286 url = "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz";
5287 sha1 = "7af8f303645e9bd79a272e7a14ac68bc0609da73";
5288 };
5289 };
5290 "capture-stack-trace-1.0.0" = {
5291 name = "capture-stack-trace";
5292 packageName = "capture-stack-trace";
5293 version = "1.0.0";
5294 src = fetchurl {
5295 url = "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz";
5296 sha1 = "4a6fa07399c26bba47f0b2496b4d0fb408c5550d";
5297 };
5298 };
5299 "ansi-escapes-1.4.0" = {
5300 name = "ansi-escapes";
5301 packageName = "ansi-escapes";
5302 version = "1.4.0";
5303 src = fetchurl {
5304 url = "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz";
5305 sha1 = "d3a8a83b319aa67793662b13e761c7911422306e";
5306 };
5307 };
5308 "cli-cursor-1.0.2" = {
5309 name = "cli-cursor";
5310 packageName = "cli-cursor";
5311 version = "1.0.2";
5312 src = fetchurl {
5313 url = "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz";
5314 sha1 = "64da3f7d56a54412e59794bd62dc35295e8f2987";
5315 };
5316 };
5317 "cli-width-1.1.1" = {
5318 name = "cli-width";
5319 packageName = "cli-width";
5320 version = "1.1.1";
5321 src = fetchurl {
5322 url = "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz";
5323 sha1 = "a4d293ef67ebb7b88d4a4d42c0ccf00c4d1e366d";
5324 };
5325 };
5326 "readline2-1.0.1" = {
5327 name = "readline2";
5328 packageName = "readline2";
5329 version = "1.0.1";
5330 src = fetchurl {
5331 url = "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz";
5332 sha1 = "41059608ffc154757b715d9989d199ffbf372e35";
5333 };
5334 };
5335 "run-async-0.1.0" = {
5336 name = "run-async";
5337 packageName = "run-async";
5338 version = "0.1.0";
5339 src = fetchurl {
5340 url = "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz";
5341 sha1 = "c8ad4a5e110661e402a7d21b530e009f25f8e389";
5342 };
5343 };
5344 "rx-lite-3.1.2" = {
5345 name = "rx-lite";
5346 packageName = "rx-lite";
5347 version = "3.1.2";
5348 src = fetchurl {
5349 url = "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz";
5350 sha1 = "19ce502ca572665f3b647b10939f97fd1615f102";
5351 };
5352 };
5353 "through-2.3.8" = {
5354 name = "through";
5355 packageName = "through";
5356 version = "2.3.8";
5357 src = fetchurl {
5358 url = "https://registry.npmjs.org/through/-/through-2.3.8.tgz";
5359 sha1 = "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5";
5360 };
5361 };
5362 "restore-cursor-1.0.1" = {
5363 name = "restore-cursor";
5364 packageName = "restore-cursor";
5365 version = "1.0.1";
5366 src = fetchurl {
5367 url = "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz";
5368 sha1 = "34661f46886327fed2991479152252df92daa541";
5369 };
5370 };
5371 "exit-hook-1.1.1" = {
5372 name = "exit-hook";
5373 packageName = "exit-hook";
5374 version = "1.1.1";
5375 src = fetchurl {
5376 url = "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz";
5377 sha1 = "f05ca233b48c05d54fff07765df8507e95c02ff8";
5378 };
5379 };
5380 "onetime-1.1.0" = {
5381 name = "onetime";
5382 packageName = "onetime";
5383 version = "1.1.0";
5384 src = fetchurl {
5385 url = "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz";
5386 sha1 = "a1f7838f8314c516f05ecefcbc4ccfe04b4ed789";
5387 };
5388 };
5389 "mute-stream-0.0.5" = {
5390 name = "mute-stream";
5391 packageName = "mute-stream";
5392 version = "0.0.5";
5393 src = fetchurl {
5394 url = "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz";
5395 sha1 = "8fbfabb0a98a253d3184331f9e8deb7372fac6c0";
5396 };
5397 };
5398 "inquirer-0.10.1" = {
5399 name = "inquirer";
5400 packageName = "inquirer";
5401 version = "0.10.1";
5402 src = fetchurl {
5403 url = "https://registry.npmjs.org/inquirer/-/inquirer-0.10.1.tgz";
5404 sha1 = "ea25e4ce69ca145e05c99e46dcfec05e4012594a";
5405 };
5406 };
5407 "lodash.debounce-3.1.1" = {
5408 name = "lodash.debounce";
5409 packageName = "lodash.debounce";
5410 version = "3.1.1";
5411 src = fetchurl {
5412 url = "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-3.1.1.tgz";
5413 sha1 = "812211c378a94cc29d5aa4e3346cf0bfce3a7df5";
5414 };
5415 };
5416 "os-name-1.0.3" = {
5417 name = "os-name";
5418 packageName = "os-name";
5419 version = "1.0.3";
5420 src = fetchurl {
5421 url = "https://registry.npmjs.org/os-name/-/os-name-1.0.3.tgz";
5422 sha1 = "1b379f64835af7c5a7f498b357cb95215c159edf";
5423 };
5424 };
5425 "lodash._getnative-3.9.1" = {
5426 name = "lodash._getnative";
5427 packageName = "lodash._getnative";
5428 version = "3.9.1";
5429 src = fetchurl {
5430 url = "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz";
5431 sha1 = "570bc7dede46d61cdcde687d65d3eecbaa3aaff5";
5432 };
5433 };
5434 "osx-release-1.1.0" = {
5435 name = "osx-release";
5436 packageName = "osx-release";
5437 version = "1.1.0";
5438 src = fetchurl {
5439 url = "https://registry.npmjs.org/osx-release/-/osx-release-1.1.0.tgz";
5440 sha1 = "f217911a28136949af1bf9308b241e2737d3cd6c";
5441 };
5442 };
5443 "win-release-1.1.1" = {
5444 name = "win-release";
5445 packageName = "win-release";
5446 version = "1.1.1";
5447 src = fetchurl {
5448 url = "https://registry.npmjs.org/win-release/-/win-release-1.1.1.tgz";
5449 sha1 = "5fa55e02be7ca934edfc12665632e849b72e5209";
5450 };
5451 };
5452 "registry-auth-token-3.0.1" = {
5453 name = "registry-auth-token";
5454 packageName = "registry-auth-token";
5455 version = "3.0.1";
5456 src = fetchurl {
5457 url = "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.0.1.tgz";
5458 sha1 = "c3ee5ec585bce29f88bf41629a3944c71ed53e25";
5459 };
5460 };
5461 "execall-1.0.0" = {
5462 name = "execall";
5463 packageName = "execall";
5464 version = "1.0.0";
5465 src = fetchurl {
5466 url = "https://registry.npmjs.org/execall/-/execall-1.0.0.tgz";
5467 sha1 = "73d0904e395b3cab0658b08d09ec25307f29bb73";
5468 };
5469 };
5470 "clone-regexp-1.0.0" = {
5471 name = "clone-regexp";
5472 packageName = "clone-regexp";
5473 version = "1.0.0";
5474 src = fetchurl {
5475 url = "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.0.tgz";
5476 sha1 = "eae0a2413f55c0942f818c229fefce845d7f3b1c";
5477 };
5478 };
5479 "is-regexp-1.0.0" = {
5480 name = "is-regexp";
5481 packageName = "is-regexp";
5482 version = "1.0.0";
5483 src = fetchurl {
5484 url = "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz";
5485 sha1 = "fd2d883545c46bac5a633e7b9a09e87fa2cb5069";
5486 };
5487 };
5488 "is-supported-regexp-flag-1.0.0" = {
5489 name = "is-supported-regexp-flag";
5490 packageName = "is-supported-regexp-flag";
5491 version = "1.0.0";
5492 src = fetchurl {
5493 url = "https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.0.tgz";
5494 sha1 = "8b520c85fae7a253382d4b02652e045576e13bb8";
5495 };
5496 };
5497 "downgrade-root-1.2.2" = {
5498 name = "downgrade-root";
5499 packageName = "downgrade-root";
5500 version = "1.2.2";
5501 src = fetchurl {
5502 url = "https://registry.npmjs.org/downgrade-root/-/downgrade-root-1.2.2.tgz";
5503 sha1 = "531319715b0e81ffcc22eb28478ba27643e12c6c";
5504 };
5505 };
5506 "default-uid-1.0.0" = {
5507 name = "default-uid";
5508 packageName = "default-uid";
5509 version = "1.0.0";
5510 src = fetchurl {
5511 url = "https://registry.npmjs.org/default-uid/-/default-uid-1.0.0.tgz";
5512 sha1 = "fcefa9df9f5ac40c8916d912dd1fe1146aa3c59e";
5513 };
5514 };
5515 "dot-prop-2.4.0" = {
5516 name = "dot-prop";
5517 packageName = "dot-prop";
5518 version = "2.4.0";
5519 src = fetchurl {
5520 url = "https://registry.npmjs.org/dot-prop/-/dot-prop-2.4.0.tgz";
5521 sha1 = "848e28f7f1d50740c6747ab3cb07670462b6f89c";
5522 };
5523 };
5524 "is-obj-1.0.1" = {
5525 name = "is-obj";
5526 packageName = "is-obj";
5527 version = "1.0.1";
5528 src = fetchurl {
5529 url = "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz";
5530 sha1 = "3e4729ac1f5fde025cd7d83a896dab9f4f67db0f";
5531 };
5532 };
5533 "inquirer-1.1.3" = {
5534 name = "inquirer";
5535 packageName = "inquirer";
5536 version = "1.1.3";
5537 src = fetchurl {
5538 url = "https://registry.npmjs.org/inquirer/-/inquirer-1.1.3.tgz";
5539 sha1 = "6cd2a93f709fa50779731fd2262c698155cab2fa";
5540 };
5541 };
5542 "npmlog-2.0.4" = {
5543 name = "npmlog";
5544 packageName = "npmlog";
5545 version = "2.0.4";
5546 src = fetchurl {
5547 url = "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz";
5548 sha1 = "98b52530f2514ca90d09ec5b22c8846722375692";
5549 };
5550 };
5551 "cli-width-2.1.0" = {
5552 name = "cli-width";
5553 packageName = "cli-width";
5554 version = "2.1.0";
5555 src = fetchurl {
5556 url = "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz";
5557 sha1 = "b234ca209b29ef66fc518d9b98d5847b00edf00a";
5558 };
5559 };
5560 "external-editor-1.0.3" = {
5561 name = "external-editor";
5562 packageName = "external-editor";
5563 version = "1.0.3";
5564 src = fetchurl {
5565 url = "https://registry.npmjs.org/external-editor/-/external-editor-1.0.3.tgz";
5566 sha1 = "723b89cc7ea91f59db8bb19df73718f042a0a7a1";
5567 };
5568 };
5569 "mute-stream-0.0.6" = {
5570 name = "mute-stream";
5571 packageName = "mute-stream";
5572 version = "0.0.6";
5573 src = fetchurl {
5574 url = "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.6.tgz";
5575 sha1 = "48962b19e169fd1dfc240b3f1e7317627bbc47db";
5576 };
5577 };
5578 "run-async-2.2.0" = {
5579 name = "run-async";
5580 packageName = "run-async";
5581 version = "2.2.0";
5582 src = fetchurl {
5583 url = "https://registry.npmjs.org/run-async/-/run-async-2.2.0.tgz";
5584 sha1 = "8783abd83c7bb86f41ee0602fc82404b3bd6e8b9";
5585 };
5586 };
5587 "rx-4.1.0" = {
5588 name = "rx";
5589 packageName = "rx";
5590 version = "4.1.0";
5591 src = fetchurl {
5592 url = "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz";
5593 sha1 = "a5f13ff79ef3b740fe30aa803fb09f98805d4782";
5594 };
5595 };
5596 "spawn-sync-1.0.15" = {
5597 name = "spawn-sync";
5598 packageName = "spawn-sync";
5599 version = "1.0.15";
5600 src = fetchurl {
5601 url = "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz";
5602 sha1 = "b00799557eb7fb0c8376c29d44e8a1ea67e57476";
5603 };
5604 };
5605 "temp-0.8.3" = {
5606 name = "temp";
5607 packageName = "temp";
5608 version = "0.8.3";
5609 src = fetchurl {
5610 url = "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz";
5611 sha1 = "e0c6bc4d26b903124410e4fed81103014dfc1f59";
5612 };
5613 };
5614 "os-shim-0.1.3" = {
5615 name = "os-shim";
5616 packageName = "os-shim";
5617 version = "0.1.3";
5618 src = fetchurl {
5619 url = "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz";
5620 sha1 = "6b62c3791cf7909ea35ed46e17658bb417cb3917";
5621 };
5622 };
5623 "is-promise-2.1.0" = {
5624 name = "is-promise";
5625 packageName = "is-promise";
5626 version = "2.1.0";
5627 src = fetchurl {
5628 url = "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz";
5629 sha1 = "79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa";
5630 };
5631 };
5632 "ansi-0.3.1" = {
5633 name = "ansi";
5634 packageName = "ansi";
5635 version = "0.3.1";
5636 src = fetchurl {
5637 url = "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz";
5638 sha1 = "0c42d4fb17160d5a9af1e484bace1c66922c1b21";
5639 };
5640 };
5641 "gauge-1.2.7" = {
5642 name = "gauge";
5643 packageName = "gauge";
5644 version = "1.2.7";
5645 src = fetchurl {
5646 url = "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz";
5647 sha1 = "e9cec5483d3d4ee0ef44b60a7d99e4935e136d93";
5648 };
5649 };
5650 "lodash.pad-4.5.1" = {
5651 name = "lodash.pad";
5652 packageName = "lodash.pad";
5653 version = "4.5.1";
5654 src = fetchurl {
5655 url = "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz";
5656 sha1 = "4330949a833a7c8da22cc20f6a26c4d59debba70";
5657 };
5658 };
5659 "lodash.padend-4.6.1" = {
5660 name = "lodash.padend";
5661 packageName = "lodash.padend";
5662 version = "4.6.1";
5663 src = fetchurl {
5664 url = "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz";
5665 sha1 = "53ccba047d06e158d311f45da625f4e49e6f166e";
5666 };
5667 };
5668 "lodash.padstart-4.6.1" = {
5669 name = "lodash.padstart";
5670 packageName = "lodash.padstart";
5671 version = "4.6.1";
5672 src = fetchurl {
5673 url = "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz";
5674 sha1 = "d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b";
5675 };
5676 };
5677 "boxen-0.3.1" = {
5678 name = "boxen";
5679 packageName = "boxen";
5680 version = "0.3.1";
5681 src = fetchurl {
5682 url = "https://registry.npmjs.org/boxen/-/boxen-0.3.1.tgz";
5683 sha1 = "a7d898243ae622f7abb6bb604d740a76c6a5461b";
5684 };
5685 };
5686 "configstore-2.1.0" = {
5687 name = "configstore";
5688 packageName = "configstore";
5689 version = "2.1.0";
5690 src = fetchurl {
5691 url = "https://registry.npmjs.org/configstore/-/configstore-2.1.0.tgz";
5692 sha1 = "737a3a7036e9886102aa6099e47bb33ab1aba1a1";
5693 };
5694 };
5695 "latest-version-2.0.0" = {
5696 name = "latest-version";
5697 packageName = "latest-version";
5698 version = "2.0.0";
5699 src = fetchurl {
5700 url = "https://registry.npmjs.org/latest-version/-/latest-version-2.0.0.tgz";
5701 sha1 = "56f8d6139620847b8017f8f1f4d78e211324168b";
5702 };
5703 };
5704 "filled-array-1.1.0" = {
5705 name = "filled-array";
5706 packageName = "filled-array";
5707 version = "1.1.0";
5708 src = fetchurl {
5709 url = "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz";
5710 sha1 = "c3c4f6c663b923459a9aa29912d2d031f1507f84";
5711 };
5712 };
5713 "widest-line-1.0.0" = {
5714 name = "widest-line";
5715 packageName = "widest-line";
5716 version = "1.0.0";
5717 src = fetchurl {
5718 url = "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz";
5719 sha1 = "0c09c85c2a94683d0d7eaf8ee097d564bf0e105c";
5720 };
5721 };
5722 "dot-prop-3.0.0" = {
5723 name = "dot-prop";
5724 packageName = "dot-prop";
5725 version = "3.0.0";
5726 src = fetchurl {
5727 url = "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz";
5728 sha1 = "1b708af094a49c9a0e7dbcad790aba539dac1177";
5729 };
5730 };
5731 "bin-version-check-2.1.0" = {
5732 name = "bin-version-check";
5733 packageName = "bin-version-check";
5734 version = "2.1.0";
5735 src = fetchurl {
5736 url = "https://registry.npmjs.org/bin-version-check/-/bin-version-check-2.1.0.tgz";
5737 sha1 = "e4e5df290b9069f7d111324031efc13fdd11a5b0";
5738 };
5739 };
5740 "each-async-1.1.1" = {
5741 name = "each-async";
5742 packageName = "each-async";
5743 version = "1.1.1";
5744 src = fetchurl {
5745 url = "https://registry.npmjs.org/each-async/-/each-async-1.1.1.tgz";
5746 sha1 = "dee5229bdf0ab6ba2012a395e1b869abf8813473";
5747 };
5748 };
5749 "log-symbols-1.0.2" = {
5750 name = "log-symbols";
5751 packageName = "log-symbols";
5752 version = "1.0.2";
5753 src = fetchurl {
5754 url = "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz";
5755 sha1 = "376ff7b58ea3086a0f09facc74617eca501e1a18";
5756 };
5757 };
5758 "object-values-1.0.0" = {
5759 name = "object-values";
5760 packageName = "object-values";
5761 version = "1.0.0";
5762 src = fetchurl {
5763 url = "https://registry.npmjs.org/object-values/-/object-values-1.0.0.tgz";
5764 sha1 = "72af839630119e5b98c3b02bb8c27e3237158105";
5765 };
5766 };
5767 "twig-0.8.9" = {
5768 name = "twig";
5769 packageName = "twig";
5770 version = "0.8.9";
5771 src = fetchurl {
5772 url = "https://registry.npmjs.org/twig/-/twig-0.8.9.tgz";
5773 sha1 = "b1594f002b684e5f029de3e54e87bec4f084b6c2";
5774 };
5775 };
5776 "bin-version-1.0.4" = {
5777 name = "bin-version";
5778 packageName = "bin-version";
5779 version = "1.0.4";
5780 src = fetchurl {
5781 url = "https://registry.npmjs.org/bin-version/-/bin-version-1.0.4.tgz";
5782 sha1 = "9eb498ee6fd76f7ab9a7c160436f89579435d78e";
5783 };
5784 };
5785 "semver-truncate-1.1.2" = {
5786 name = "semver-truncate";
5787 packageName = "semver-truncate";
5788 version = "1.1.2";
5789 src = fetchurl {
5790 url = "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz";
5791 sha1 = "57f41de69707a62709a7e0104ba2117109ea47e8";
5792 };
5793 };
5794 "find-versions-1.2.1" = {
5795 name = "find-versions";
5796 packageName = "find-versions";
5797 version = "1.2.1";
5798 src = fetchurl {
5799 url = "https://registry.npmjs.org/find-versions/-/find-versions-1.2.1.tgz";
5800 sha1 = "cbde9f12e38575a0af1be1b9a2c5d5fd8f186b62";
5801 };
5802 };
5803 "semver-regex-1.0.0" = {
5804 name = "semver-regex";
5805 packageName = "semver-regex";
5806 version = "1.0.0";
5807 src = fetchurl {
5808 url = "https://registry.npmjs.org/semver-regex/-/semver-regex-1.0.0.tgz";
5809 sha1 = "92a4969065f9c70c694753d55248fc68f8f652c9";
5810 };
5811 };
5812 "walk-2.3.9" = {
5813 name = "walk";
5814 packageName = "walk";
5815 version = "2.3.9";
5816 src = fetchurl {
5817 url = "https://registry.npmjs.org/walk/-/walk-2.3.9.tgz";
5818 sha1 = "31b4db6678f2ae01c39ea9fb8725a9031e558a7b";
5819 };
5820 };
5821 "foreachasync-3.0.0" = {
5822 name = "foreachasync";
5823 packageName = "foreachasync";
5824 version = "3.0.0";
5825 src = fetchurl {
5826 url = "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz";
5827 sha1 = "5502987dc8714be3392097f32e0071c9dee07cf6";
5828 };
5829 };
5830 "diff-2.2.3" = {
5831 name = "diff";
5832 packageName = "diff";
5833 version = "2.2.3";
5834 src = fetchurl {
5835 url = "https://registry.npmjs.org/diff/-/diff-2.2.3.tgz";
5836 sha1 = "60eafd0d28ee906e4e8ff0a52c1229521033bf99";
5837 };
5838 };
5839 "globby-4.1.0" = {
5840 name = "globby";
5841 packageName = "globby";
5842 version = "4.1.0";
5843 src = fetchurl {
5844 url = "https://registry.npmjs.org/globby/-/globby-4.1.0.tgz";
5845 sha1 = "080f54549ec1b82a6c60e631fc82e1211dbe95f8";
5846 };
5847 };
5848 "grouped-queue-0.3.2" = {
5849 name = "grouped-queue";
5850 packageName = "grouped-queue";
5851 version = "0.3.2";
5852 src = fetchurl {
5853 url = "https://registry.npmjs.org/grouped-queue/-/grouped-queue-0.3.2.tgz";
5854 sha1 = "1005f70ece919eccbb37a318f84af99fd6c4eb5c";
5855 };
5856 };
5857 "mem-fs-1.1.3" = {
5858 name = "mem-fs";
5859 packageName = "mem-fs";
5860 version = "1.1.3";
5861 src = fetchurl {
5862 url = "https://registry.npmjs.org/mem-fs/-/mem-fs-1.1.3.tgz";
5863 sha1 = "b8ae8d2e3fcb6f5d3f9165c12d4551a065d989cc";
5864 };
5865 };
5866 "text-table-0.2.0" = {
5867 name = "text-table";
5868 packageName = "text-table";
5869 version = "0.2.0";
5870 src = fetchurl {
5871 url = "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz";
5872 sha1 = "7f5ee823ae805207c00af2df4a84ec3fcfa570b4";
5873 };
5874 };
5875 "untildify-2.1.0" = {
5876 name = "untildify";
5877 packageName = "untildify";
5878 version = "2.1.0";
5879 src = fetchurl {
5880 url = "https://registry.npmjs.org/untildify/-/untildify-2.1.0.tgz";
5881 sha1 = "17eb2807987f76952e9c0485fc311d06a826a2e0";
5882 };
5883 };
5884 "glob-6.0.4" = {
5885 name = "glob";
5886 packageName = "glob";
5887 version = "6.0.4";
5888 src = fetchurl {
5889 url = "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz";
5890 sha1 = "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22";
5891 };
5892 };
5893 "through2-2.0.1" = {
5894 name = "through2";
5895 packageName = "through2";
5896 version = "2.0.1";
5897 src = fetchurl {
5898 url = "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz";
5899 sha1 = "384e75314d49f32de12eebb8136b8eb6b5d59da9";
5900 };
5901 };
5902 "vinyl-1.2.0" = {
5903 name = "vinyl";
5904 packageName = "vinyl";
5905 version = "1.2.0";
5906 src = fetchurl {
5907 url = "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz";
5908 sha1 = "5c88036cf565e5df05558bfc911f8656df218884";
5909 };
5910 };
5911 "vinyl-file-2.0.0" = {
5912 name = "vinyl-file";
5913 packageName = "vinyl-file";
5914 version = "2.0.0";
5915 src = fetchurl {
5916 url = "https://registry.npmjs.org/vinyl-file/-/vinyl-file-2.0.0.tgz";
5917 sha1 = "a7ebf5ffbefda1b7d18d140fcb07b223efb6751a";
5918 };
5919 };
5920 "clone-1.0.2" = {
5921 name = "clone";
5922 packageName = "clone";
5923 version = "1.0.2";
5924 src = fetchurl {
5925 url = "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz";
5926 sha1 = "260b7a99ebb1edfe247538175f783243cb19d149";
5927 };
5928 };
5929 "clone-stats-0.0.1" = {
5930 name = "clone-stats";
5931 packageName = "clone-stats";
5932 version = "0.0.1";
5933 src = fetchurl {
5934 url = "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz";
5935 sha1 = "b88f94a82cf38b8791d58046ea4029ad88ca99d1";
5936 };
5937 };
5938 "replace-ext-0.0.1" = {
5939 name = "replace-ext";
5940 packageName = "replace-ext";
5941 version = "0.0.1";
5942 src = fetchurl {
5943 url = "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz";
5944 sha1 = "29bbd92078a739f0bcce2b4ee41e837953522924";
5945 };
5946 };
5947 "strip-bom-stream-2.0.0" = {
5948 name = "strip-bom-stream";
5949 packageName = "strip-bom-stream";
5950 version = "2.0.0";
5951 src = fetchurl {
5952 url = "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz";
5953 sha1 = "f87db5ef2613f6968aa545abfe1ec728b6a829ca";
5954 };
5955 };
5956 "first-chunk-stream-2.0.0" = {
5957 name = "first-chunk-stream";
5958 packageName = "first-chunk-stream";
5959 version = "2.0.0";
5960 src = fetchurl {
5961 url = "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz";
5962 sha1 = "1bdecdb8e083c0664b91945581577a43a9f31d70";
5963 };
5964 };
5965 "cli-boxes-1.0.0" = {
5966 name = "cli-boxes";
5967 packageName = "cli-boxes";
5968 version = "1.0.0";
5969 src = fetchurl {
5970 url = "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz";
5971 sha1 = "4fa917c3e59c94a004cd61f8ee509da651687143";
5972 };
5973 };
5974 "pad-component-0.0.1" = {
5975 name = "pad-component";
5976 packageName = "pad-component";
5977 version = "0.0.1";
5978 src = fetchurl {
5979 url = "https://registry.npmjs.org/pad-component/-/pad-component-0.0.1.tgz";
5980 sha1 = "ad1f22ce1bf0fdc0d6ddd908af17f351a404b8ac";
5981 };
5982 };
5983 "taketalk-1.0.0" = {
5984 name = "taketalk";
5985 packageName = "taketalk";
5986 version = "1.0.0";
5987 src = fetchurl {
5988 url = "https://registry.npmjs.org/taketalk/-/taketalk-1.0.0.tgz";
5989 sha1 = "b4d4f0deed206ae7df775b129ea2ca6de52f26dd";
5990 };
5991 };
5992 };
5993 args = {
5994 name = "errormator";
5995 packageName = "errormator";
5996 src = ./.;
5997 dependencies = [
5998 sources."bower-1.7.9"
5999 sources."bower-requirejs-1.2.0"
6000 (sources."grunt-1.0.1" // {
6001 dependencies = [
6002 (sources."findup-sync-0.3.0" // {
6003 dependencies = [
6004 sources."glob-5.0.15"
6005 ];
6006 })
6007 sources."glob-7.0.6"
6008 sources."js-yaml-3.5.5"
6009 sources."minimatch-3.0.3"
6010 sources."rimraf-2.2.8"
6011 ];
6012 })
6013 sources."grunt-angular-templates-1.0.4"
6014 (sources."grunt-bower-concat-1.0.0" // {
6015 dependencies = [
6016 sources."lodash-4.3.0"
6017 ];
6018 })
6019 sources."grunt-bower-requirejs-2.0.0"
6020 (sources."grunt-contrib-concat-1.0.1" // {
6021 dependencies = [
6022 sources."source-map-0.5.6"
6023 ];
6024 })
6025 sources."grunt-contrib-copy-1.0.0"
6026 sources."grunt-contrib-jshint-1.0.0"
6027 (sources."grunt-contrib-less-1.3.0" // {
6028 dependencies = [
6029 sources."lodash-4.15.0"
6030 ];
6031 })
6032 sources."grunt-contrib-nodeunit-1.0.0"
6033 sources."grunt-contrib-requirejs-1.0.0"
6034 (sources."grunt-contrib-uglify-1.0.1" // {
6035 dependencies = [
6036 sources."lodash-4.15.0"
6037 ];
6038 })
6039 sources."grunt-contrib-watch-1.0.0"
6040 sources."grunt-remove-logging-0.2.0"
6041 (sources."karma-0.13.22" // {
6042 dependencies = [
6043 sources."bluebird-2.11.0"
6044 sources."glob-7.0.6"
6045 sources."graceful-fs-4.1.6"
6046 sources."isbinaryfile-3.0.1"
6047 sources."minimatch-3.0.3"
6048 sources."source-map-0.5.6"
6049 ];
6050 })
6051 sources."underscore-1.8.3"
6052 (sources."yo-1.8.4" // {
6053 dependencies = [
6054 sources."configstore-1.4.0"
6055 sources."cross-spawn-3.0.1"
6056 sources."got-5.6.0"
6057 sources."package-json-2.4.0"
6058 (sources."update-notifier-0.6.3" // {
6059 dependencies = [
6060 sources."configstore-2.1.0"
6061 ];
6062 })
6063 sources."user-home-2.0.0"
6064 sources."graceful-fs-4.1.6"
6065 sources."object-assign-4.1.0"
6066 sources."xdg-basedir-2.0.0"
6067 sources."latest-version-2.0.0"
6068 sources."dot-prop-3.0.0"
6069 ];
6070 })
6071 sources."ini-1.3.4"
6072 sources."chalk-1.1.3"
6073 (sources."file-utils-0.2.2" // {
6074 dependencies = [
6075 sources."lodash-2.4.2"
6076 ];
6077 })
6078 sources."lodash-3.10.1"
6079 sources."nopt-3.0.6"
6080 sources."object-assign-2.1.1"
6081 sources."requirejs-2.3.1"
6082 sources."slash-1.0.0"
6083 sources."sudo-block-1.2.0"
6084 sources."update-notifier-0.3.2"
6085 sources."ansi-styles-2.2.1"
6086 sources."escape-string-regexp-1.0.5"
6087 sources."has-ansi-2.0.0"
6088 sources."strip-ansi-3.0.1"
6089 sources."supports-color-2.0.0"
6090 sources."ansi-regex-2.0.0"
6091 (sources."findup-sync-0.2.1" // {
6092 dependencies = [
6093 sources."glob-4.3.5"
6094 ];
6095 })
6096 sources."glob-4.5.3"
6097 sources."iconv-lite-0.4.13"
6098 sources."isbinaryfile-2.0.4"
6099 sources."minimatch-2.0.10"
6100 (sources."rimraf-2.5.4" // {
6101 dependencies = [
6102 sources."glob-7.0.6"
6103 sources."minimatch-3.0.3"
6104 ];
6105 })
6106 sources."inflight-1.0.5"
6107 sources."inherits-2.0.3"
6108 sources."once-1.4.0"
6109 sources."wrappy-1.0.2"
6110 sources."brace-expansion-1.1.6"
6111 sources."balanced-match-0.4.2"
6112 sources."concat-map-0.0.1"
6113 sources."fs.realpath-1.0.0"
6114 sources."path-is-absolute-1.0.0"
6115 sources."abbrev-1.0.9"
6116 sources."is-docker-1.0.1"
6117 sources."is-root-1.0.0"
6118 sources."configstore-0.3.2"
6119 sources."is-npm-1.0.0"
6120 sources."latest-version-1.0.1"
6121 sources."semver-diff-2.1.0"
6122 sources."string-length-1.0.1"
6123 sources."graceful-fs-3.0.11"
6124 sources."js-yaml-3.6.1"
6125 sources."mkdirp-0.5.1"
6126 sources."osenv-0.1.3"
6127 sources."user-home-1.1.1"
6128 sources."uuid-2.0.2"
6129 sources."xdg-basedir-1.0.1"
6130 sources."natives-1.1.0"
6131 sources."argparse-1.0.7"
6132 sources."esprima-2.7.3"
6133 sources."sprintf-js-1.0.3"
6134 sources."minimist-0.0.8"
6135 sources."os-homedir-1.0.1"
6136 sources."os-tmpdir-1.0.1"
6137 sources."package-json-1.2.0"
6138 (sources."got-3.3.1" // {
6139 dependencies = [
6140 sources."object-assign-3.0.0"
6141 ];
6142 })
6143 sources."registry-url-3.1.0"
6144 sources."duplexify-3.4.5"
6145 sources."infinity-agent-2.0.3"
6146 sources."is-redirect-1.0.0"
6147 sources."is-stream-1.1.0"
6148 sources."lowercase-keys-1.0.0"
6149 sources."nested-error-stacks-1.0.2"
6150 sources."prepend-http-1.0.4"
6151 sources."read-all-stream-3.1.0"
6152 sources."timed-out-2.0.0"
6153 (sources."end-of-stream-1.0.0" // {
6154 dependencies = [
6155 sources."once-1.3.3"
6156 ];
6157 })
6158 sources."readable-stream-2.1.5"
6159 sources."stream-shift-1.0.0"
6160 sources."buffer-shims-1.0.0"
6161 sources."core-util-is-1.0.2"
6162 sources."isarray-1.0.0"
6163 sources."process-nextick-args-1.0.7"
6164 sources."string_decoder-0.10.31"
6165 sources."util-deprecate-1.0.2"
6166 sources."pinkie-promise-2.0.1"
6167 sources."pinkie-2.0.4"
6168 (sources."rc-1.1.6" // {
6169 dependencies = [
6170 sources."minimist-1.2.0"
6171 ];
6172 })
6173 sources."deep-extend-0.4.1"
6174 sources."strip-json-comments-1.0.4"
6175 sources."semver-5.3.0"
6176 sources."coffee-script-1.10.0"
6177 sources."dateformat-1.0.12"
6178 sources."eventemitter2-0.4.14"
6179 sources."exit-0.1.2"
6180 (sources."grunt-cli-1.2.0" // {
6181 dependencies = [
6182 sources."findup-sync-0.3.0"
6183 sources."glob-5.0.15"
6184 ];
6185 })
6186 sources."grunt-known-options-1.1.0"
6187 sources."grunt-legacy-log-1.0.0"
6188 (sources."grunt-legacy-util-1.0.0" // {
6189 dependencies = [
6190 sources."lodash-4.3.0"
6191 ];
6192 })
6193 sources."get-stdin-4.0.1"
6194 (sources."meow-3.7.0" // {
6195 dependencies = [
6196 sources."minimist-1.2.0"
6197 sources."object-assign-4.1.0"
6198 ];
6199 })
6200 sources."camelcase-keys-2.1.0"
6201 sources."decamelize-1.2.0"
6202 sources."loud-rejection-1.6.0"
6203 sources."map-obj-1.0.1"
6204 sources."normalize-package-data-2.3.5"
6205 sources."read-pkg-up-1.0.1"
6206 sources."redent-1.0.0"
6207 sources."trim-newlines-1.0.0"
6208 sources."camelcase-2.1.1"
6209 sources."currently-unhandled-0.4.1"
6210 sources."signal-exit-3.0.1"
6211 sources."array-find-index-1.0.1"
6212 sources."hosted-git-info-2.1.5"
6213 sources."is-builtin-module-1.0.0"
6214 sources."validate-npm-package-license-3.0.1"
6215 sources."builtin-modules-1.1.1"
6216 sources."spdx-correct-1.0.2"
6217 sources."spdx-expression-parse-1.0.3"
6218 sources."spdx-license-ids-1.2.2"
6219 sources."find-up-1.1.2"
6220 sources."read-pkg-1.1.0"
6221 sources."path-exists-2.1.0"
6222 (sources."load-json-file-1.1.0" // {
6223 dependencies = [
6224 sources."graceful-fs-4.1.6"
6225 ];
6226 })
6227 (sources."path-type-1.1.0" // {
6228 dependencies = [
6229 sources."graceful-fs-4.1.6"
6230 ];
6231 })
6232 sources."parse-json-2.2.0"
6233 sources."pify-2.3.0"
6234 sources."strip-bom-2.0.0"
6235 sources."error-ex-1.3.0"
6236 sources."is-arrayish-0.2.1"
6237 sources."is-utf8-0.2.1"
6238 sources."indent-string-2.1.0"
6239 sources."strip-indent-1.0.1"
6240 sources."repeating-2.0.1"
6241 sources."is-finite-1.0.1"
6242 sources."number-is-nan-1.0.0"
6243 sources."resolve-1.1.7"
6244 sources."colors-1.1.2"
6245 (sources."grunt-legacy-log-utils-1.0.0" // {
6246 dependencies = [
6247 sources."lodash-4.3.0"
6248 ];
6249 })
6250 sources."hooker-0.2.3"
6251 sources."underscore.string-3.2.3"
6252 sources."async-1.5.2"
6253 sources."getobject-0.1.0"
6254 sources."which-1.2.11"
6255 sources."isexe-1.1.2"
6256 sources."html-minifier-2.1.7"
6257 sources."change-case-3.0.0"
6258 (sources."clean-css-3.4.19" // {
6259 dependencies = [
6260 sources."commander-2.8.1"
6261 ];
6262 })
6263 sources."commander-2.9.0"
6264 sources."he-1.1.0"
6265 sources."ncname-1.0.0"
6266 sources."relateurl-0.2.7"
6267 (sources."uglify-js-2.6.4" // {
6268 dependencies = [
6269 sources."async-0.2.10"
6270 sources."source-map-0.5.6"
6271 ];
6272 })
6273 sources."camel-case-3.0.0"
6274 sources."constant-case-2.0.0"
6275 sources."dot-case-2.1.0"
6276 sources."header-case-1.0.0"
6277 sources."is-lower-case-1.1.3"
6278 sources."is-upper-case-1.1.2"
6279 sources."lower-case-1.1.3"
6280 sources."lower-case-first-1.0.2"
6281 sources."no-case-2.3.0"
6282 sources."param-case-2.1.0"
6283 sources."pascal-case-2.0.0"
6284 sources."path-case-2.1.0"
6285 sources."sentence-case-2.1.0"
6286 sources."snake-case-2.1.0"
6287 sources."swap-case-1.1.2"
6288 sources."title-case-2.1.0"
6289 sources."upper-case-1.1.3"
6290 sources."upper-case-first-1.1.2"
6291 sources."source-map-0.4.4"
6292 sources."graceful-readlink-1.0.1"
6293 sources."amdefine-1.0.0"
6294 sources."xml-char-classes-1.0.0"
6295 sources."uglify-to-browserify-1.0.2"
6296 (sources."yargs-3.10.0" // {
6297 dependencies = [
6298 sources."camelcase-1.2.1"
6299 ];
6300 })
6301 sources."cliui-2.1.0"
6302 sources."window-size-0.1.0"
6303 sources."center-align-0.1.3"
6304 sources."right-align-0.1.3"
6305 sources."wordwrap-0.0.2"
6306 sources."align-text-0.1.4"
6307 sources."lazy-cache-1.0.4"
6308 sources."kind-of-3.0.4"
6309 sources."longest-1.0.1"
6310 sources."repeat-string-1.5.4"
6311 sources."is-buffer-1.1.4"
6312 sources."detective-4.3.1"
6313 sources."filesize-3.2.1"
6314 sources."acorn-1.2.2"
6315 sources."defined-1.0.0"
6316 sources."load-grunt-tasks-2.0.0"
6317 (sources."multimatch-2.1.0" // {
6318 dependencies = [
6319 sources."minimatch-3.0.3"
6320 ];
6321 })
6322 sources."array-differ-1.0.0"
6323 sources."array-union-1.0.2"
6324 sources."arrify-1.0.1"
6325 sources."array-uniq-1.0.3"
6326 sources."file-sync-cmp-0.1.1"
6327 (sources."jshint-2.9.3" // {
6328 dependencies = [
6329 sources."minimatch-3.0.3"
6330 sources."lodash-3.7.0"
6331 ];
6332 })
6333 (sources."cli-1.0.0" // {
6334 dependencies = [
6335 sources."glob-7.0.6"
6336 sources."minimatch-3.0.3"
6337 ];
6338 })
6339 sources."console-browserify-1.1.0"
6340 (sources."htmlparser2-3.8.3" // {
6341 dependencies = [
6342 sources."readable-stream-1.1.14"
6343 sources."isarray-0.0.1"
6344 ];
6345 })
6346 sources."shelljs-0.3.0"
6347 sources."date-now-0.1.4"
6348 sources."domhandler-2.3.0"
6349 sources."domutils-1.5.1"
6350 sources."domelementtype-1.3.0"
6351 sources."entities-1.0.0"
6352 (sources."dom-serializer-0.1.0" // {
6353 dependencies = [
6354 sources."domelementtype-1.1.3"
6355 sources."entities-1.1.1"
6356 ];
6357 })
6358 (sources."less-2.6.1" // {
6359 dependencies = [
6360 sources."graceful-fs-4.1.6"
6361 sources."source-map-0.5.6"
6362 ];
6363 })
6364 sources."errno-0.1.4"
6365 sources."image-size-0.4.0"
6366 sources."mime-1.3.4"
6367 sources."promise-7.1.1"
6368 sources."request-2.74.0"
6369 sources."prr-0.0.0"
6370 sources."asap-2.0.4"
6371 sources."aws-sign2-0.6.0"
6372 sources."aws4-1.4.1"
6373 (sources."bl-1.1.2" // {
6374 dependencies = [
6375 sources."readable-stream-2.0.6"
6376 ];
6377 })
6378 sources."caseless-0.11.0"
6379 sources."combined-stream-1.0.5"
6380 sources."extend-3.0.0"
6381 sources."forever-agent-0.6.1"
6382 (sources."form-data-1.0.1" // {
6383 dependencies = [
6384 sources."async-2.0.1"
6385 sources."lodash-4.15.0"
6386 ];
6387 })
6388 sources."har-validator-2.0.6"
6389 sources."hawk-3.1.3"
6390 sources."http-signature-1.1.1"
6391 sources."is-typedarray-1.0.0"
6392 sources."isstream-0.1.2"
6393 sources."json-stringify-safe-5.0.1"
6394 sources."mime-types-2.1.11"
6395 sources."node-uuid-1.4.7"
6396 sources."oauth-sign-0.8.2"
6397 sources."qs-6.2.1"
6398 sources."stringstream-0.0.5"
6399 sources."tough-cookie-2.3.1"
6400 sources."tunnel-agent-0.4.3"
6401 sources."delayed-stream-1.0.0"
6402 sources."is-my-json-valid-2.13.1"
6403 sources."generate-function-2.0.0"
6404 sources."generate-object-property-1.2.0"
6405 sources."jsonpointer-2.0.0"
6406 sources."xtend-4.0.1"
6407 sources."is-property-1.0.2"
6408 sources."hoek-2.16.3"
6409 sources."boom-2.10.1"
6410 sources."cryptiles-2.0.5"
6411 sources."sntp-1.0.9"
6412 sources."assert-plus-0.2.0"
6413 sources."jsprim-1.3.1"
6414 (sources."sshpk-1.10.0" // {
6415 dependencies = [
6416 sources."assert-plus-1.0.0"
6417 ];
6418 })
6419 sources."extsprintf-1.0.2"
6420 sources."json-schema-0.2.3"
6421 sources."verror-1.3.6"
6422 sources."asn1-0.2.3"
6423 (sources."dashdash-1.14.0" // {
6424 dependencies = [
6425 sources."assert-plus-1.0.0"
6426 ];
6427 })
6428 (sources."getpass-0.1.6" // {
6429 dependencies = [
6430 sources."assert-plus-1.0.0"
6431 ];
6432 })
6433 sources."jsbn-0.1.0"
6434 sources."tweetnacl-0.13.3"
6435 sources."jodid25519-1.0.2"
6436 sources."ecc-jsbn-0.1.1"
6437 (sources."bcrypt-pbkdf-1.0.0" // {
6438 dependencies = [
6439 sources."tweetnacl-0.14.3"
6440 ];
6441 })
6442 sources."mime-db-1.23.0"
6443 sources."nodeunit-0.9.5"
6444 (sources."tap-7.1.2" // {
6445 dependencies = [
6446 sources."glob-7.0.6"
6447 sources."minimatch-3.0.3"
6448 ];
6449 })
6450 sources."bluebird-3.4.6"
6451 sources."clean-yaml-object-0.1.0"
6452 sources."color-support-1.1.1"
6453 (sources."coveralls-2.11.13" // {
6454 dependencies = [
6455 sources."minimist-1.2.0"
6456 sources."request-2.73.0"
6457 sources."tough-cookie-2.2.2"
6458 ];
6459 })
6460 sources."deeper-2.1.0"
6461 sources."foreground-child-1.5.3"
6462 (sources."nyc-7.1.0" // {
6463 dependencies = [
6464 sources."glob-7.0.6"
6465 sources."yargs-4.8.1"
6466 sources."minimatch-3.0.3"
6467 sources."cliui-3.2.0"
6468 sources."window-size-0.2.0"
6469 ];
6470 })
6471 sources."only-shallow-1.2.0"
6472 sources."opener-1.4.2"
6473 sources."stack-utils-0.4.0"
6474 (sources."tap-mocha-reporter-2.0.1" // {
6475 dependencies = [
6476 sources."glob-7.0.6"
6477 sources."minimatch-3.0.3"
6478 ];
6479 })
6480 sources."tap-parser-2.2.3"
6481 sources."tmatch-2.0.1"
6482 sources."lcov-parse-0.0.10"
6483 sources."log-driver-1.2.5"
6484 sources."cross-spawn-4.0.0"
6485 sources."lru-cache-4.0.1"
6486 sources."pseudomap-1.0.2"
6487 sources."yallist-2.0.0"
6488 sources."caching-transform-1.0.1"
6489 sources."convert-source-map-1.3.0"
6490 sources."default-require-extensions-1.0.0"
6491 sources."find-cache-dir-0.1.1"
6492 sources."istanbul-lib-coverage-1.0.0"
6493 sources."istanbul-lib-hook-1.0.0-alpha.4"
6494 sources."istanbul-lib-instrument-1.1.3"
6495 (sources."istanbul-lib-report-1.0.0-alpha.3" // {
6496 dependencies = [
6497 sources."supports-color-3.1.2"
6498 ];
6499 })
6500 (sources."istanbul-lib-source-maps-1.0.1" // {
6501 dependencies = [
6502 sources."source-map-0.5.6"
6503 ];
6504 })
6505 sources."istanbul-reports-1.0.0-alpha.8"
6506 sources."md5-hex-1.3.0"
6507 sources."micromatch-2.3.11"
6508 sources."pkg-up-1.0.0"
6509 sources."resolve-from-2.0.0"
6510 (sources."spawn-wrap-1.2.4" // {
6511 dependencies = [
6512 sources."signal-exit-2.1.2"
6513 ];
6514 })
6515 sources."test-exclude-1.1.0"
6516 (sources."yargs-parser-2.4.1" // {
6517 dependencies = [
6518 sources."camelcase-3.0.0"
6519 ];
6520 })
6521 (sources."write-file-atomic-1.2.0" // {
6522 dependencies = [
6523 sources."graceful-fs-4.1.6"
6524 ];
6525 })
6526 sources."imurmurhash-0.1.4"
6527 sources."slide-1.1.6"
6528 sources."commondir-1.0.1"
6529 sources."pkg-dir-1.0.0"
6530 sources."append-transform-0.3.0"
6531 (sources."babel-generator-6.14.0" // {
6532 dependencies = [
6533 sources."lodash-4.15.0"
6534 sources."source-map-0.5.6"
6535 ];
6536 })
6537 (sources."babel-template-6.15.0" // {
6538 dependencies = [
6539 sources."lodash-4.15.0"
6540 ];
6541 })
6542 (sources."babel-traverse-6.15.0" // {
6543 dependencies = [
6544 sources."lodash-4.15.0"
6545 ];
6546 })
6547 (sources."babel-types-6.15.0" // {
6548 dependencies = [
6549 sources."lodash-4.15.0"
6550 ];
6551 })
6552 sources."babylon-6.9.2"
6553 sources."babel-messages-6.8.0"
6554 sources."babel-runtime-6.11.6"
6555 (sources."detect-indent-3.0.1" // {
6556 dependencies = [
6557 sources."minimist-1.2.0"
6558 sources."repeating-1.1.3"
6559 ];
6560 })
6561 sources."core-js-2.4.1"
6562 sources."regenerator-runtime-0.9.5"
6563 sources."babel-code-frame-6.11.0"
6564 sources."debug-2.2.0"
6565 sources."globals-8.18.0"
6566 sources."invariant-2.2.1"
6567 sources."esutils-2.0.2"
6568 sources."js-tokens-2.0.0"
6569 sources."ms-0.7.1"
6570 (sources."loose-envify-1.2.0" // {
6571 dependencies = [
6572 sources."js-tokens-1.0.3"
6573 ];
6574 })
6575 sources."to-fast-properties-1.0.2"
6576 sources."path-parse-1.0.5"
6577 sources."has-flag-1.0.0"
6578 sources."handlebars-4.0.5"
6579 sources."optimist-0.6.1"
6580 sources."md5-o-matic-0.1.1"
6581 sources."arr-diff-2.0.0"
6582 sources."array-unique-0.2.1"
6583 sources."braces-1.8.5"
6584 sources."expand-brackets-0.1.5"
6585 sources."extglob-0.3.2"
6586 sources."filename-regex-2.0.0"
6587 sources."is-extglob-1.0.0"
6588 sources."is-glob-2.0.1"
6589 sources."normalize-path-2.0.1"
6590 sources."object.omit-2.0.0"
6591 sources."parse-glob-3.0.4"
6592 sources."regex-cache-0.4.3"
6593 sources."arr-flatten-1.0.1"
6594 sources."expand-range-1.8.2"
6595 sources."preserve-0.2.0"
6596 sources."repeat-element-1.1.2"
6597 sources."fill-range-2.2.3"
6598 sources."is-number-2.1.0"
6599 sources."isobject-2.1.0"
6600 sources."randomatic-1.1.5"
6601 sources."is-posix-bracket-0.1.1"
6602 sources."for-own-0.1.4"
6603 sources."is-extendable-0.1.1"
6604 sources."for-in-0.1.6"
6605 sources."glob-base-0.3.0"
6606 sources."is-dotfile-1.0.2"
6607 sources."glob-parent-2.0.0"
6608 sources."is-equal-shallow-0.1.3"
6609 sources."is-primitive-2.0.0"
6610 sources."lodash.assign-4.2.0"
6611 sources."require-main-filename-1.0.1"
6612 sources."get-caller-file-1.0.2"
6613 sources."os-locale-1.4.0"
6614 sources."require-directory-2.1.1"
6615 sources."set-blocking-2.0.0"
6616 sources."string-width-1.0.2"
6617 sources."which-module-1.0.0"
6618 sources."y18n-3.2.1"
6619 sources."wrap-ansi-2.0.0"
6620 sources."lcid-1.0.0"
6621 sources."invert-kv-1.0.0"
6622 sources."code-point-at-1.0.0"
6623 sources."is-fullwidth-code-point-1.0.0"
6624 sources."diff-1.4.0"
6625 sources."unicode-length-1.0.3"
6626 sources."punycode-1.4.1"
6627 sources."events-to-array-1.0.2"
6628 sources."maxmin-1.1.0"
6629 sources."uri-path-1.0.0"
6630 (sources."figures-1.7.0" // {
6631 dependencies = [
6632 sources."object-assign-4.1.0"
6633 ];
6634 })
6635 sources."gzip-size-1.0.0"
6636 sources."pretty-bytes-1.0.4"
6637 (sources."concat-stream-1.5.2" // {
6638 dependencies = [
6639 sources."readable-stream-2.0.6"
6640 ];
6641 })
6642 sources."browserify-zlib-0.1.4"
6643 sources."typedarray-0.0.6"
6644 sources."pako-0.2.9"
6645 sources."gaze-1.1.1"
6646 (sources."tiny-lr-0.2.1" // {
6647 dependencies = [
6648 sources."qs-5.1.0"
6649 ];
6650 })
6651 (sources."globule-1.0.0" // {
6652 dependencies = [
6653 sources."glob-7.0.6"
6654 sources."lodash-4.9.0"
6655 sources."minimatch-3.0.3"
6656 ];
6657 })
6658 (sources."body-parser-1.14.2" // {
6659 dependencies = [
6660 sources."qs-5.2.0"
6661 ];
6662 })
6663 sources."faye-websocket-0.10.0"
6664 sources."livereload-js-2.2.2"
6665 sources."parseurl-1.3.1"
6666 sources."bytes-2.2.0"
6667 sources."content-type-1.0.2"
6668 sources."depd-1.1.0"
6669 sources."http-errors-1.3.1"
6670 sources."on-finished-2.3.0"
6671 (sources."raw-body-2.1.7" // {
6672 dependencies = [
6673 sources."bytes-2.4.0"
6674 ];
6675 })
6676 sources."type-is-1.6.13"
6677 sources."statuses-1.3.0"
6678 sources."ee-first-1.1.1"
6679 sources."unpipe-1.0.0"
6680 sources."media-typer-0.3.0"
6681 sources."websocket-driver-0.6.5"
6682 sources."websocket-extensions-0.1.1"
6683 sources."batch-0.5.3"
6684 sources."chokidar-1.6.0"
6685 sources."connect-3.5.0"
6686 sources."di-0.0.1"
6687 sources."dom-serialize-2.2.1"
6688 (sources."expand-braces-0.1.2" // {
6689 dependencies = [
6690 sources."braces-0.1.5"
6691 sources."expand-range-0.1.1"
6692 sources."is-number-0.1.1"
6693 sources."repeat-string-0.2.2"
6694 ];
6695 })
6696 sources."http-proxy-1.15.1"
6697 (sources."log4js-0.6.38" // {
6698 dependencies = [
6699 sources."readable-stream-1.0.34"
6700 sources."semver-4.3.6"
6701 sources."isarray-0.0.1"
6702 ];
6703 })
6704 sources."socket.io-1.4.8"
6705 (sources."useragent-2.1.9" // {
6706 dependencies = [
6707 sources."lru-cache-2.2.4"
6708 ];
6709 })
6710 sources."anymatch-1.3.0"
6711 sources."async-each-1.0.1"
6712 sources."is-binary-path-1.0.1"
6713 (sources."readdirp-2.1.0" // {
6714 dependencies = [
6715 sources."graceful-fs-4.1.6"
6716 sources."minimatch-3.0.3"
6717 ];
6718 })
6719 sources."fsevents-1.0.14"
6720 sources."binary-extensions-1.6.0"
6721 sources."set-immediate-shim-1.0.1"
6722 sources."nan-2.4.0"
6723 sources."node-pre-gyp-0.6.30"
6724 sources."npmlog-4.0.0"
6725 sources."tar-2.2.1"
6726 (sources."tar-pack-3.1.4" // {
6727 dependencies = [
6728 sources."once-1.3.3"
6729 ];
6730 })
6731 sources."are-we-there-yet-1.1.2"
6732 sources."console-control-strings-1.1.0"
6733 (sources."gauge-2.6.0" // {
6734 dependencies = [
6735 sources."object-assign-4.1.0"
6736 ];
6737 })
6738 sources."delegates-1.0.0"
6739 sources."aproba-1.0.4"
6740 sources."has-color-0.1.7"
6741 sources."has-unicode-2.0.1"
6742 sources."wide-align-1.1.0"
6743 sources."block-stream-0.0.9"
6744 (sources."fstream-1.0.10" // {
6745 dependencies = [
6746 sources."graceful-fs-4.1.6"
6747 ];
6748 })
6749 (sources."fstream-ignore-1.0.5" // {
6750 dependencies = [
6751 sources."minimatch-3.0.3"
6752 ];
6753 })
6754 sources."uid-number-0.0.6"
6755 sources."finalhandler-0.5.0"
6756 sources."utils-merge-1.0.0"
6757 sources."escape-html-1.0.3"
6758 sources."custom-event-1.0.0"
6759 sources."ent-2.2.0"
6760 sources."void-elements-2.0.1"
6761 sources."array-slice-0.2.3"
6762 sources."eventemitter3-1.2.0"
6763 sources."requires-port-1.0.0"
6764 sources."engine.io-1.6.11"
6765 (sources."socket.io-parser-2.2.6" // {
6766 dependencies = [
6767 sources."isarray-0.0.1"
6768 ];
6769 })
6770 (sources."socket.io-client-1.4.8" // {
6771 dependencies = [
6772 sources."component-emitter-1.2.0"
6773 ];
6774 })
6775 (sources."socket.io-adapter-0.4.0" // {
6776 dependencies = [
6777 (sources."socket.io-parser-2.2.2" // {
6778 dependencies = [
6779 sources."debug-0.7.4"
6780 ];
6781 })
6782 sources."json3-3.2.6"
6783 sources."isarray-0.0.1"
6784 ];
6785 })
6786 (sources."has-binary-0.1.7" // {
6787 dependencies = [
6788 sources."isarray-0.0.1"
6789 ];
6790 })
6791 sources."base64id-0.1.0"
6792 sources."ws-1.1.0"
6793 (sources."engine.io-parser-1.2.4" // {
6794 dependencies = [
6795 sources."has-binary-0.1.6"
6796 sources."isarray-0.0.1"
6797 ];
6798 })
6799 (sources."accepts-1.1.4" // {
6800 dependencies = [
6801 sources."mime-types-2.0.14"
6802 sources."mime-db-1.12.0"
6803 ];
6804 })
6805 sources."options-0.0.6"
6806 sources."ultron-1.0.2"
6807 sources."after-0.8.1"
6808 sources."arraybuffer.slice-0.0.6"
6809 sources."base64-arraybuffer-0.1.2"
6810 sources."blob-0.0.4"
6811 sources."utf8-2.1.0"
6812 sources."negotiator-0.4.9"
6813 sources."json3-3.3.2"
6814 sources."component-emitter-1.1.2"
6815 sources."benchmark-1.0.0"
6816 (sources."engine.io-client-1.6.11" // {
6817 dependencies = [
6818 sources."ws-1.0.1"
6819 ];
6820 })
6821 sources."component-bind-1.0.0"
6822 sources."object-component-0.0.3"
6823 sources."indexof-0.0.1"
6824 sources."parseuri-0.0.4"
6825 sources."to-array-0.1.4"
6826 sources."backo2-1.0.2"
6827 sources."has-cors-1.1.0"
6828 sources."xmlhttprequest-ssl-1.5.1"
6829 sources."parsejson-0.0.1"
6830 sources."parseqs-0.0.2"
6831 sources."component-inherit-0.0.3"
6832 sources."yeast-0.1.2"
6833 sources."better-assert-1.0.2"
6834 sources."callsite-1.0.0"
6835 sources."cli-list-0.1.8"
6836 sources."fullname-2.1.0"
6837 sources."humanize-string-1.0.1"
6838 sources."inquirer-0.11.4"
6839 (sources."insight-0.7.0" // {
6840 dependencies = [
6841 sources."configstore-1.4.0"
6842 sources."inquirer-0.10.1"
6843 sources."object-assign-4.1.0"
6844 sources."graceful-fs-4.1.6"
6845 sources."xdg-basedir-2.0.0"
6846 ];
6847 })
6848 (sources."npm-keyword-4.2.0" // {
6849 dependencies = [
6850 sources."got-5.6.0"
6851 sources."object-assign-4.1.0"
6852 ];
6853 })
6854 (sources."opn-3.0.3" // {
6855 dependencies = [
6856 sources."object-assign-4.1.0"
6857 ];
6858 })
6859 sources."parse-help-0.1.1"
6860 sources."root-check-1.0.0"
6861 sources."sort-on-1.3.0"
6862 (sources."tabtab-1.3.2" // {
6863 dependencies = [
6864 sources."inquirer-1.1.3"
6865 sources."minimist-1.2.0"
6866 sources."npmlog-2.0.4"
6867 sources."object-assign-4.1.0"
6868 sources."cli-width-2.1.0"
6869 sources."lodash-4.15.0"
6870 sources."mute-stream-0.0.6"
6871 sources."run-async-2.2.0"
6872 sources."gauge-1.2.7"
6873 ];
6874 })
6875 sources."titleize-1.0.0"
6876 (sources."yeoman-character-1.1.0" // {
6877 dependencies = [
6878 sources."supports-color-3.1.2"
6879 ];
6880 })
6881 (sources."yeoman-doctor-2.1.0" // {
6882 dependencies = [
6883 sources."user-home-2.0.0"
6884 ];
6885 })
6886 (sources."yeoman-environment-1.6.3" // {
6887 dependencies = [
6888 sources."diff-2.2.3"
6889 sources."inquirer-1.1.3"
6890 sources."lodash-4.15.0"
6891 sources."cli-width-2.1.0"
6892 sources."mute-stream-0.0.6"
6893 sources."run-async-2.2.0"
6894 ];
6895 })
6896 sources."yosay-1.2.0"
6897 (sources."npmconf-2.1.2" // {
6898 dependencies = [
6899 sources."once-1.3.3"
6900 sources."semver-4.3.6"
6901 sources."uid-number-0.0.5"
6902 ];
6903 })
6904 sources."config-chain-1.1.10"
6905 sources."proto-list-1.2.4"
6906 sources."create-error-class-3.0.2"
6907 sources."duplexer2-0.1.4"
6908 sources."is-plain-obj-1.1.0"
6909 sources."is-retry-allowed-1.1.0"
6910 sources."node-status-codes-1.0.0"
6911 sources."unzip-response-1.0.1"
6912 sources."url-parse-lax-1.0.0"
6913 sources."capture-stack-trace-1.0.0"
6914 sources."ansi-escapes-1.4.0"
6915 sources."cli-cursor-1.0.2"
6916 sources."cli-width-1.1.1"
6917 sources."readline2-1.0.1"
6918 sources."run-async-0.1.0"
6919 sources."rx-lite-3.1.2"
6920 sources."through-2.3.8"
6921 sources."restore-cursor-1.0.1"
6922 sources."exit-hook-1.1.1"
6923 sources."onetime-1.1.0"
6924 sources."mute-stream-0.0.5"
6925 sources."lodash.debounce-3.1.1"
6926 sources."os-name-1.0.3"
6927 sources."lodash._getnative-3.9.1"
6928 (sources."osx-release-1.1.0" // {
6929 dependencies = [
6930 sources."minimist-1.2.0"
6931 ];
6932 })
6933 sources."win-release-1.1.1"
6934 sources."registry-auth-token-3.0.1"
6935 sources."execall-1.0.0"
6936 sources."clone-regexp-1.0.0"
6937 sources."is-regexp-1.0.0"
6938 sources."is-supported-regexp-flag-1.0.0"
6939 sources."downgrade-root-1.2.2"
6940 sources."default-uid-1.0.0"
6941 sources."dot-prop-2.4.0"
6942 sources."is-obj-1.0.1"
6943 sources."external-editor-1.0.3"
6944 sources."rx-4.1.0"
6945 sources."spawn-sync-1.0.15"
6946 (sources."temp-0.8.3" // {
6947 dependencies = [
6948 sources."rimraf-2.2.8"
6949 ];
6950 })
6951 sources."os-shim-0.1.3"
6952 sources."is-promise-2.1.0"
6953 sources."ansi-0.3.1"
6954 sources."lodash.pad-4.5.1"
6955 sources."lodash.padend-4.6.1"
6956 sources."lodash.padstart-4.6.1"
6957 (sources."boxen-0.3.1" // {
6958 dependencies = [
6959 sources."object-assign-4.1.0"
6960 ];
6961 })
6962 sources."filled-array-1.1.0"
6963 sources."widest-line-1.0.0"
6964 (sources."bin-version-check-2.1.0" // {
6965 dependencies = [
6966 sources."minimist-1.2.0"
6967 sources."semver-4.3.6"
6968 ];
6969 })
6970 sources."each-async-1.1.1"
6971 sources."log-symbols-1.0.2"
6972 sources."object-values-1.0.0"
6973 (sources."twig-0.8.9" // {
6974 dependencies = [
6975 sources."minimatch-3.0.3"
6976 ];
6977 })
6978 sources."bin-version-1.0.4"
6979 sources."semver-truncate-1.1.2"
6980 sources."find-versions-1.2.1"
6981 sources."semver-regex-1.0.0"
6982 sources."walk-2.3.9"
6983 sources."foreachasync-3.0.0"
6984 (sources."globby-4.1.0" // {
6985 dependencies = [
6986 sources."glob-6.0.4"
6987 sources."object-assign-4.1.0"
6988 ];
6989 })
6990 sources."grouped-queue-0.3.2"
6991 sources."mem-fs-1.1.3"
6992 sources."text-table-0.2.0"
6993 sources."untildify-2.1.0"
6994 (sources."through2-2.0.1" // {
6995 dependencies = [
6996 sources."readable-stream-2.0.6"
6997 ];
6998 })
6999 sources."vinyl-1.2.0"
7000 (sources."vinyl-file-2.0.0" // {
7001 dependencies = [
7002 sources."graceful-fs-4.1.6"
7003 ];
7004 })
7005 sources."clone-1.0.2"
7006 sources."clone-stats-0.0.1"
7007 sources."replace-ext-0.0.1"
7008 sources."strip-bom-stream-2.0.0"
7009 sources."first-chunk-stream-2.0.0"
7010 sources."cli-boxes-1.0.0"
7011 sources."pad-component-0.0.1"
7012 (sources."taketalk-1.0.0" // {
7013 dependencies = [
7014 sources."minimist-1.2.0"
7015 ];
7016 })
7017 ];
7018 meta = {
7019 description = "JS layer for Errormator";
7020 };
7021 production = false;
7022 };
7023 in
7024 {
7025 tarball = nodeEnv.buildNodeSourceDist args;
7026 package = nodeEnv.buildNodePackage args;
7027 shell = nodeEnv.buildNodeShell args;
7028 } No newline at end of file
General Comments 4
Under Review
author

Auto status change to "Under Review"

Under Review
author

Auto status change to "Under Review"

You need to be logged in to leave comments. Login now