1 |
|
2 | (function (QUnit, sinon, videojs$1) {
|
3 | 'use strict';
|
4 |
|
5 | QUnit = QUnit && QUnit.hasOwnProperty('default') ? QUnit['default'] : QUnit;
|
6 | sinon = sinon && sinon.hasOwnProperty('default') ? sinon['default'] : sinon;
|
7 | videojs$1 = videojs$1 && videojs$1.hasOwnProperty('default') ? videojs$1['default'] : videojs$1;
|
8 |
|
9 | function _extends() {
|
10 | _extends = Object.assign || function (target) {
|
11 | for (var i = 1; i < arguments.length; i++) {
|
12 | var source = arguments[i];
|
13 |
|
14 | for (var key in source) {
|
15 | if (Object.prototype.hasOwnProperty.call(source, key)) {
|
16 | target[key] = source[key];
|
17 | }
|
18 | }
|
19 | }
|
20 |
|
21 | return target;
|
22 | };
|
23 |
|
24 | return _extends.apply(this, arguments);
|
25 | }
|
26 |
|
27 | function _inheritsLoose(subClass, superClass) {
|
28 | subClass.prototype = Object.create(superClass.prototype);
|
29 | subClass.prototype.constructor = subClass;
|
30 | subClass.__proto__ = superClass;
|
31 | }
|
32 |
|
33 | var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
34 |
|
35 | function createCommonjsModule(fn, module) {
|
36 | return module = { exports: {} }, fn(module, module.exports), module.exports;
|
37 | }
|
38 |
|
39 | var minDoc = {};
|
40 |
|
41 | var topLevel = typeof commonjsGlobal !== 'undefined' ? commonjsGlobal :
|
42 | typeof window !== 'undefined' ? window : {};
|
43 |
|
44 |
|
45 | var doccy;
|
46 |
|
47 | if (typeof document !== 'undefined') {
|
48 | doccy = document;
|
49 | } else {
|
50 | doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
|
51 |
|
52 | if (!doccy) {
|
53 | doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
|
54 | }
|
55 | }
|
56 |
|
57 | var document_1 = doccy;
|
58 |
|
59 | var win;
|
60 |
|
61 | if (typeof window !== "undefined") {
|
62 | win = window;
|
63 | } else if (typeof commonjsGlobal !== "undefined") {
|
64 | win = commonjsGlobal;
|
65 | } else if (typeof self !== "undefined"){
|
66 | win = self;
|
67 | } else {
|
68 | win = {};
|
69 | }
|
70 |
|
71 | var window_1 = win;
|
72 |
|
73 | var lodash = createCommonjsModule(function (module, exports) {
|
74 | (function() {
|
75 |
|
76 |
|
77 | var undefined;
|
78 |
|
79 |
|
80 | var VERSION = '4.17.15';
|
81 |
|
82 |
|
83 | var LARGE_ARRAY_SIZE = 200;
|
84 |
|
85 |
|
86 | var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
87 | FUNC_ERROR_TEXT = 'Expected a function';
|
88 |
|
89 |
|
90 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
91 |
|
92 |
|
93 | var MAX_MEMOIZE_SIZE = 500;
|
94 |
|
95 |
|
96 | var PLACEHOLDER = '__lodash_placeholder__';
|
97 |
|
98 |
|
99 | var CLONE_DEEP_FLAG = 1,
|
100 | CLONE_FLAT_FLAG = 2,
|
101 | CLONE_SYMBOLS_FLAG = 4;
|
102 |
|
103 |
|
104 | var COMPARE_PARTIAL_FLAG = 1,
|
105 | COMPARE_UNORDERED_FLAG = 2;
|
106 |
|
107 |
|
108 | var WRAP_BIND_FLAG = 1,
|
109 | WRAP_BIND_KEY_FLAG = 2,
|
110 | WRAP_CURRY_BOUND_FLAG = 4,
|
111 | WRAP_CURRY_FLAG = 8,
|
112 | WRAP_CURRY_RIGHT_FLAG = 16,
|
113 | WRAP_PARTIAL_FLAG = 32,
|
114 | WRAP_PARTIAL_RIGHT_FLAG = 64,
|
115 | WRAP_ARY_FLAG = 128,
|
116 | WRAP_REARG_FLAG = 256,
|
117 | WRAP_FLIP_FLAG = 512;
|
118 |
|
119 |
|
120 | var DEFAULT_TRUNC_LENGTH = 30,
|
121 | DEFAULT_TRUNC_OMISSION = '...';
|
122 |
|
123 |
|
124 | var HOT_COUNT = 800,
|
125 | HOT_SPAN = 16;
|
126 |
|
127 |
|
128 | var LAZY_FILTER_FLAG = 1,
|
129 | LAZY_MAP_FLAG = 2,
|
130 | LAZY_WHILE_FLAG = 3;
|
131 |
|
132 |
|
133 | var INFINITY = 1 / 0,
|
134 | MAX_SAFE_INTEGER = 9007199254740991,
|
135 | MAX_INTEGER = 1.7976931348623157e+308,
|
136 | NAN = 0 / 0;
|
137 |
|
138 |
|
139 | var MAX_ARRAY_LENGTH = 4294967295,
|
140 | MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
|
141 | HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
|
142 |
|
143 |
|
144 | var wrapFlags = [
|
145 | ['ary', WRAP_ARY_FLAG],
|
146 | ['bind', WRAP_BIND_FLAG],
|
147 | ['bindKey', WRAP_BIND_KEY_FLAG],
|
148 | ['curry', WRAP_CURRY_FLAG],
|
149 | ['curryRight', WRAP_CURRY_RIGHT_FLAG],
|
150 | ['flip', WRAP_FLIP_FLAG],
|
151 | ['partial', WRAP_PARTIAL_FLAG],
|
152 | ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
|
153 | ['rearg', WRAP_REARG_FLAG]
|
154 | ];
|
155 |
|
156 |
|
157 | var argsTag = '[object Arguments]',
|
158 | arrayTag = '[object Array]',
|
159 | asyncTag = '[object AsyncFunction]',
|
160 | boolTag = '[object Boolean]',
|
161 | dateTag = '[object Date]',
|
162 | domExcTag = '[object DOMException]',
|
163 | errorTag = '[object Error]',
|
164 | funcTag = '[object Function]',
|
165 | genTag = '[object GeneratorFunction]',
|
166 | mapTag = '[object Map]',
|
167 | numberTag = '[object Number]',
|
168 | nullTag = '[object Null]',
|
169 | objectTag = '[object Object]',
|
170 | promiseTag = '[object Promise]',
|
171 | proxyTag = '[object Proxy]',
|
172 | regexpTag = '[object RegExp]',
|
173 | setTag = '[object Set]',
|
174 | stringTag = '[object String]',
|
175 | symbolTag = '[object Symbol]',
|
176 | undefinedTag = '[object Undefined]',
|
177 | weakMapTag = '[object WeakMap]',
|
178 | weakSetTag = '[object WeakSet]';
|
179 |
|
180 | var arrayBufferTag = '[object ArrayBuffer]',
|
181 | dataViewTag = '[object DataView]',
|
182 | float32Tag = '[object Float32Array]',
|
183 | float64Tag = '[object Float64Array]',
|
184 | int8Tag = '[object Int8Array]',
|
185 | int16Tag = '[object Int16Array]',
|
186 | int32Tag = '[object Int32Array]',
|
187 | uint8Tag = '[object Uint8Array]',
|
188 | uint8ClampedTag = '[object Uint8ClampedArray]',
|
189 | uint16Tag = '[object Uint16Array]',
|
190 | uint32Tag = '[object Uint32Array]';
|
191 |
|
192 |
|
193 | var reEmptyStringLeading = /\b__p \+= '';/g,
|
194 | reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
195 | reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
196 |
|
197 |
|
198 | var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
|
199 | reUnescapedHtml = /[&<>"']/g,
|
200 | reHasEscapedHtml = RegExp(reEscapedHtml.source),
|
201 | reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
202 |
|
203 |
|
204 | var reEscape = /<%-([\s\S]+?)%>/g,
|
205 | reEvaluate = /<%([\s\S]+?)%>/g,
|
206 | reInterpolate = /<%=([\s\S]+?)%>/g;
|
207 |
|
208 |
|
209 | var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
210 | reIsPlainProp = /^\w*$/,
|
211 | rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
212 |
|
213 | |
214 |
|
215 |
|
216 |
|
217 | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
218 | reHasRegExpChar = RegExp(reRegExpChar.source);
|
219 |
|
220 |
|
221 | var reTrim = /^\s+|\s+$/g,
|
222 | reTrimStart = /^\s+/,
|
223 | reTrimEnd = /\s+$/;
|
224 |
|
225 |
|
226 | var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
|
227 | reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
|
228 | reSplitDetails = /,? & /;
|
229 |
|
230 |
|
231 | var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
232 |
|
233 |
|
234 | var reEscapeChar = /\\(\\)?/g;
|
235 |
|
236 | |
237 |
|
238 |
|
239 |
|
240 | var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
241 |
|
242 |
|
243 | var reFlags = /\w*$/;
|
244 |
|
245 |
|
246 | var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
247 |
|
248 |
|
249 | var reIsBinary = /^0b[01]+$/i;
|
250 |
|
251 |
|
252 | var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
253 |
|
254 |
|
255 | var reIsOctal = /^0o[0-7]+$/i;
|
256 |
|
257 |
|
258 | var reIsUint = /^(?:0|[1-9]\d*)$/;
|
259 |
|
260 |
|
261 | var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
262 |
|
263 |
|
264 | var reNoMatch = /($^)/;
|
265 |
|
266 |
|
267 | var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
|
268 |
|
269 |
|
270 | var rsAstralRange = '\\ud800-\\udfff',
|
271 | rsComboMarksRange = '\\u0300-\\u036f',
|
272 | reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
273 | rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
274 | rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
275 | rsDingbatRange = '\\u2700-\\u27bf',
|
276 | rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
277 | rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
278 | rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
279 | rsPunctuationRange = '\\u2000-\\u206f',
|
280 | rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
281 | rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
282 | rsVarRange = '\\ufe0e\\ufe0f',
|
283 | rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
284 |
|
285 |
|
286 | var rsApos = "['\u2019]",
|
287 | rsAstral = '[' + rsAstralRange + ']',
|
288 | rsBreak = '[' + rsBreakRange + ']',
|
289 | rsCombo = '[' + rsComboRange + ']',
|
290 | rsDigits = '\\d+',
|
291 | rsDingbat = '[' + rsDingbatRange + ']',
|
292 | rsLower = '[' + rsLowerRange + ']',
|
293 | rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
294 | rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
295 | rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
296 | rsNonAstral = '[^' + rsAstralRange + ']',
|
297 | rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
298 | rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
299 | rsUpper = '[' + rsUpperRange + ']',
|
300 | rsZWJ = '\\u200d';
|
301 |
|
302 |
|
303 | var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
304 | rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
305 | rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
|
306 | rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
|
307 | reOptMod = rsModifier + '?',
|
308 | rsOptVar = '[' + rsVarRange + ']?',
|
309 | rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
310 | rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
311 | rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
312 | rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
313 | rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
314 | rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
315 |
|
316 |
|
317 | var reApos = RegExp(rsApos, 'g');
|
318 |
|
319 | |
320 |
|
321 |
|
322 |
|
323 | var reComboMark = RegExp(rsCombo, 'g');
|
324 |
|
325 |
|
326 | var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
327 |
|
328 |
|
329 | var reUnicodeWord = RegExp([
|
330 | rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
331 | rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
332 | rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
333 | rsUpper + '+' + rsOptContrUpper,
|
334 | rsOrdUpper,
|
335 | rsOrdLower,
|
336 | rsDigits,
|
337 | rsEmoji
|
338 | ].join('|'), 'g');
|
339 |
|
340 |
|
341 | var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
342 |
|
343 |
|
344 | var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
345 |
|
346 |
|
347 | var contextProps = [
|
348 | 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
|
349 | 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
|
350 | 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
|
351 | 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
|
352 | '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
|
353 | ];
|
354 |
|
355 |
|
356 | var templateCounter = -1;
|
357 |
|
358 |
|
359 | var typedArrayTags = {};
|
360 | typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
361 | typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
362 | typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
363 | typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
364 | typedArrayTags[uint32Tag] = true;
|
365 | typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
366 | typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
367 | typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
368 | typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
369 | typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
370 | typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
371 | typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
372 | typedArrayTags[weakMapTag] = false;
|
373 |
|
374 |
|
375 | var cloneableTags = {};
|
376 | cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
377 | cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
378 | cloneableTags[boolTag] = cloneableTags[dateTag] =
|
379 | cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
380 | cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
381 | cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
382 | cloneableTags[numberTag] = cloneableTags[objectTag] =
|
383 | cloneableTags[regexpTag] = cloneableTags[setTag] =
|
384 | cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
385 | cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
386 | cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
387 | cloneableTags[errorTag] = cloneableTags[funcTag] =
|
388 | cloneableTags[weakMapTag] = false;
|
389 |
|
390 |
|
391 | var deburredLetters = {
|
392 |
|
393 | '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
394 | '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
395 | '\xc7': 'C', '\xe7': 'c',
|
396 | '\xd0': 'D', '\xf0': 'd',
|
397 | '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
398 | '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
399 | '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
400 | '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
401 | '\xd1': 'N', '\xf1': 'n',
|
402 | '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
403 | '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
404 | '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
405 | '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
406 | '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
407 | '\xc6': 'Ae', '\xe6': 'ae',
|
408 | '\xde': 'Th', '\xfe': 'th',
|
409 | '\xdf': 'ss',
|
410 |
|
411 | '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
412 | '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
413 | '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
414 | '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
415 | '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
416 | '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
417 | '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
418 | '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
419 | '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
420 | '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
421 | '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
422 | '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
423 | '\u0134': 'J', '\u0135': 'j',
|
424 | '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
425 | '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
426 | '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
427 | '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
428 | '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
429 | '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
430 | '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
431 | '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
432 | '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
433 | '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
434 | '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
435 | '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
436 | '\u0163': 't', '\u0165': 't', '\u0167': 't',
|
437 | '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
438 | '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
439 | '\u0174': 'W', '\u0175': 'w',
|
440 | '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
441 | '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
442 | '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
443 | '\u0132': 'IJ', '\u0133': 'ij',
|
444 | '\u0152': 'Oe', '\u0153': 'oe',
|
445 | '\u0149': "'n", '\u017f': 's'
|
446 | };
|
447 |
|
448 |
|
449 | var htmlEscapes = {
|
450 | '&': '&',
|
451 | '<': '<',
|
452 | '>': '>',
|
453 | '"': '"',
|
454 | "'": '''
|
455 | };
|
456 |
|
457 |
|
458 | var htmlUnescapes = {
|
459 | '&': '&',
|
460 | '<': '<',
|
461 | '>': '>',
|
462 | '"': '"',
|
463 | ''': "'"
|
464 | };
|
465 |
|
466 |
|
467 | var stringEscapes = {
|
468 | '\\': '\\',
|
469 | "'": "'",
|
470 | '\n': 'n',
|
471 | '\r': 'r',
|
472 | '\u2028': 'u2028',
|
473 | '\u2029': 'u2029'
|
474 | };
|
475 |
|
476 |
|
477 | var freeParseFloat = parseFloat,
|
478 | freeParseInt = parseInt;
|
479 |
|
480 |
|
481 | var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
482 |
|
483 |
|
484 | var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
485 |
|
486 |
|
487 | var root = freeGlobal || freeSelf || Function('return this')();
|
488 |
|
489 |
|
490 | var freeExports = exports && !exports.nodeType && exports;
|
491 |
|
492 |
|
493 | var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
494 |
|
495 |
|
496 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
497 |
|
498 |
|
499 | var freeProcess = moduleExports && freeGlobal.process;
|
500 |
|
501 |
|
502 | var nodeUtil = (function() {
|
503 | try {
|
504 |
|
505 | var types = freeModule && freeModule.require && freeModule.require('util').types;
|
506 |
|
507 | if (types) {
|
508 | return types;
|
509 | }
|
510 |
|
511 |
|
512 | return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
513 | } catch (e) {}
|
514 | }());
|
515 |
|
516 |
|
517 | var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
|
518 | nodeIsDate = nodeUtil && nodeUtil.isDate,
|
519 | nodeIsMap = nodeUtil && nodeUtil.isMap,
|
520 | nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
|
521 | nodeIsSet = nodeUtil && nodeUtil.isSet,
|
522 | nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
523 |
|
524 |
|
525 |
|
526 | |
527 |
|
528 |
|
529 |
|
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 |
|
536 | function apply(func, thisArg, args) {
|
537 | switch (args.length) {
|
538 | case 0: return func.call(thisArg);
|
539 | case 1: return func.call(thisArg, args[0]);
|
540 | case 2: return func.call(thisArg, args[0], args[1]);
|
541 | case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
542 | }
|
543 | return func.apply(thisArg, args);
|
544 | }
|
545 |
|
546 | |
547 |
|
548 |
|
549 |
|
550 |
|
551 |
|
552 |
|
553 |
|
554 |
|
555 |
|
556 | function arrayAggregator(array, setter, iteratee, accumulator) {
|
557 | var index = -1,
|
558 | length = array == null ? 0 : array.length;
|
559 |
|
560 | while (++index < length) {
|
561 | var value = array[index];
|
562 | setter(accumulator, value, iteratee(value), array);
|
563 | }
|
564 | return accumulator;
|
565 | }
|
566 |
|
567 | |
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 |
|
574 |
|
575 |
|
576 | function arrayEach(array, iteratee) {
|
577 | var index = -1,
|
578 | length = array == null ? 0 : array.length;
|
579 |
|
580 | while (++index < length) {
|
581 | if (iteratee(array[index], index, array) === false) {
|
582 | break;
|
583 | }
|
584 | }
|
585 | return array;
|
586 | }
|
587 |
|
588 | |
589 |
|
590 |
|
591 |
|
592 |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 | function arrayEachRight(array, iteratee) {
|
598 | var length = array == null ? 0 : array.length;
|
599 |
|
600 | while (length--) {
|
601 | if (iteratee(array[length], length, array) === false) {
|
602 | break;
|
603 | }
|
604 | }
|
605 | return array;
|
606 | }
|
607 |
|
608 | |
609 |
|
610 |
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 | function arrayEvery(array, predicate) {
|
619 | var index = -1,
|
620 | length = array == null ? 0 : array.length;
|
621 |
|
622 | while (++index < length) {
|
623 | if (!predicate(array[index], index, array)) {
|
624 | return false;
|
625 | }
|
626 | }
|
627 | return true;
|
628 | }
|
629 |
|
630 | |
631 |
|
632 |
|
633 |
|
634 |
|
635 |
|
636 |
|
637 |
|
638 |
|
639 | function arrayFilter(array, predicate) {
|
640 | var index = -1,
|
641 | length = array == null ? 0 : array.length,
|
642 | resIndex = 0,
|
643 | result = [];
|
644 |
|
645 | while (++index < length) {
|
646 | var value = array[index];
|
647 | if (predicate(value, index, array)) {
|
648 | result[resIndex++] = value;
|
649 | }
|
650 | }
|
651 | return result;
|
652 | }
|
653 |
|
654 | |
655 |
|
656 |
|
657 |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 |
|
663 | function arrayIncludes(array, value) {
|
664 | var length = array == null ? 0 : array.length;
|
665 | return !!length && baseIndexOf(array, value, 0) > -1;
|
666 | }
|
667 |
|
668 | |
669 |
|
670 |
|
671 |
|
672 |
|
673 |
|
674 |
|
675 |
|
676 |
|
677 | function arrayIncludesWith(array, value, comparator) {
|
678 | var index = -1,
|
679 | length = array == null ? 0 : array.length;
|
680 |
|
681 | while (++index < length) {
|
682 | if (comparator(value, array[index])) {
|
683 | return true;
|
684 | }
|
685 | }
|
686 | return false;
|
687 | }
|
688 |
|
689 | |
690 |
|
691 |
|
692 |
|
693 |
|
694 |
|
695 |
|
696 |
|
697 |
|
698 | function arrayMap(array, iteratee) {
|
699 | var index = -1,
|
700 | length = array == null ? 0 : array.length,
|
701 | result = Array(length);
|
702 |
|
703 | while (++index < length) {
|
704 | result[index] = iteratee(array[index], index, array);
|
705 | }
|
706 | return result;
|
707 | }
|
708 |
|
709 | |
710 |
|
711 |
|
712 |
|
713 |
|
714 |
|
715 |
|
716 |
|
717 | function arrayPush(array, values) {
|
718 | var index = -1,
|
719 | length = values.length,
|
720 | offset = array.length;
|
721 |
|
722 | while (++index < length) {
|
723 | array[offset + index] = values[index];
|
724 | }
|
725 | return array;
|
726 | }
|
727 |
|
728 | |
729 |
|
730 |
|
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 |
|
738 |
|
739 |
|
740 | function arrayReduce(array, iteratee, accumulator, initAccum) {
|
741 | var index = -1,
|
742 | length = array == null ? 0 : array.length;
|
743 |
|
744 | if (initAccum && length) {
|
745 | accumulator = array[++index];
|
746 | }
|
747 | while (++index < length) {
|
748 | accumulator = iteratee(accumulator, array[index], index, array);
|
749 | }
|
750 | return accumulator;
|
751 | }
|
752 |
|
753 | |
754 |
|
755 |
|
756 |
|
757 |
|
758 |
|
759 |
|
760 |
|
761 |
|
762 |
|
763 |
|
764 |
|
765 | function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
766 | var length = array == null ? 0 : array.length;
|
767 | if (initAccum && length) {
|
768 | accumulator = array[--length];
|
769 | }
|
770 | while (length--) {
|
771 | accumulator = iteratee(accumulator, array[length], length, array);
|
772 | }
|
773 | return accumulator;
|
774 | }
|
775 |
|
776 | |
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 |
|
785 |
|
786 | function arraySome(array, predicate) {
|
787 | var index = -1,
|
788 | length = array == null ? 0 : array.length;
|
789 |
|
790 | while (++index < length) {
|
791 | if (predicate(array[index], index, array)) {
|
792 | return true;
|
793 | }
|
794 | }
|
795 | return false;
|
796 | }
|
797 |
|
798 | |
799 |
|
800 |
|
801 |
|
802 |
|
803 |
|
804 |
|
805 | var asciiSize = baseProperty('length');
|
806 |
|
807 | |
808 |
|
809 |
|
810 |
|
811 |
|
812 |
|
813 |
|
814 | function asciiToArray(string) {
|
815 | return string.split('');
|
816 | }
|
817 |
|
818 | |
819 |
|
820 |
|
821 |
|
822 |
|
823 |
|
824 |
|
825 | function asciiWords(string) {
|
826 | return string.match(reAsciiWord) || [];
|
827 | }
|
828 |
|
829 | |
830 |
|
831 |
|
832 |
|
833 |
|
834 |
|
835 |
|
836 |
|
837 |
|
838 |
|
839 |
|
840 | function baseFindKey(collection, predicate, eachFunc) {
|
841 | var result;
|
842 | eachFunc(collection, function(value, key, collection) {
|
843 | if (predicate(value, key, collection)) {
|
844 | result = key;
|
845 | return false;
|
846 | }
|
847 | });
|
848 | return result;
|
849 | }
|
850 |
|
851 | |
852 |
|
853 |
|
854 |
|
855 |
|
856 |
|
857 |
|
858 |
|
859 |
|
860 |
|
861 |
|
862 | function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
863 | var length = array.length,
|
864 | index = fromIndex + (fromRight ? 1 : -1);
|
865 |
|
866 | while ((fromRight ? index-- : ++index < length)) {
|
867 | if (predicate(array[index], index, array)) {
|
868 | return index;
|
869 | }
|
870 | }
|
871 | return -1;
|
872 | }
|
873 |
|
874 | |
875 |
|
876 |
|
877 |
|
878 |
|
879 |
|
880 |
|
881 |
|
882 |
|
883 | function baseIndexOf(array, value, fromIndex) {
|
884 | return value === value
|
885 | ? strictIndexOf(array, value, fromIndex)
|
886 | : baseFindIndex(array, baseIsNaN, fromIndex);
|
887 | }
|
888 |
|
889 | |
890 |
|
891 |
|
892 |
|
893 |
|
894 |
|
895 |
|
896 |
|
897 |
|
898 |
|
899 | function baseIndexOfWith(array, value, fromIndex, comparator) {
|
900 | var index = fromIndex - 1,
|
901 | length = array.length;
|
902 |
|
903 | while (++index < length) {
|
904 | if (comparator(array[index], value)) {
|
905 | return index;
|
906 | }
|
907 | }
|
908 | return -1;
|
909 | }
|
910 |
|
911 | |
912 |
|
913 |
|
914 |
|
915 |
|
916 |
|
917 |
|
918 | function baseIsNaN(value) {
|
919 | return value !== value;
|
920 | }
|
921 |
|
922 | |
923 |
|
924 |
|
925 |
|
926 |
|
927 |
|
928 |
|
929 |
|
930 |
|
931 | function baseMean(array, iteratee) {
|
932 | var length = array == null ? 0 : array.length;
|
933 | return length ? (baseSum(array, iteratee) / length) : NAN;
|
934 | }
|
935 |
|
936 | |
937 |
|
938 |
|
939 |
|
940 |
|
941 |
|
942 |
|
943 | function baseProperty(key) {
|
944 | return function(object) {
|
945 | return object == null ? undefined : object[key];
|
946 | };
|
947 | }
|
948 |
|
949 | |
950 |
|
951 |
|
952 |
|
953 |
|
954 |
|
955 |
|
956 | function basePropertyOf(object) {
|
957 | return function(key) {
|
958 | return object == null ? undefined : object[key];
|
959 | };
|
960 | }
|
961 |
|
962 | |
963 |
|
964 |
|
965 |
|
966 |
|
967 |
|
968 |
|
969 |
|
970 |
|
971 |
|
972 |
|
973 |
|
974 |
|
975 | function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
976 | eachFunc(collection, function(value, index, collection) {
|
977 | accumulator = initAccum
|
978 | ? (initAccum = false, value)
|
979 | : iteratee(accumulator, value, index, collection);
|
980 | });
|
981 | return accumulator;
|
982 | }
|
983 |
|
984 | |
985 |
|
986 |
|
987 |
|
988 |
|
989 |
|
990 |
|
991 |
|
992 |
|
993 |
|
994 | function baseSortBy(array, comparer) {
|
995 | var length = array.length;
|
996 |
|
997 | array.sort(comparer);
|
998 | while (length--) {
|
999 | array[length] = array[length].value;
|
1000 | }
|
1001 | return array;
|
1002 | }
|
1003 |
|
1004 | |
1005 |
|
1006 |
|
1007 |
|
1008 |
|
1009 |
|
1010 |
|
1011 |
|
1012 |
|
1013 | function baseSum(array, iteratee) {
|
1014 | var result,
|
1015 | index = -1,
|
1016 | length = array.length;
|
1017 |
|
1018 | while (++index < length) {
|
1019 | var current = iteratee(array[index]);
|
1020 | if (current !== undefined) {
|
1021 | result = result === undefined ? current : (result + current);
|
1022 | }
|
1023 | }
|
1024 | return result;
|
1025 | }
|
1026 |
|
1027 | |
1028 |
|
1029 |
|
1030 |
|
1031 |
|
1032 |
|
1033 |
|
1034 |
|
1035 |
|
1036 | function baseTimes(n, iteratee) {
|
1037 | var index = -1,
|
1038 | result = Array(n);
|
1039 |
|
1040 | while (++index < n) {
|
1041 | result[index] = iteratee(index);
|
1042 | }
|
1043 | return result;
|
1044 | }
|
1045 |
|
1046 | |
1047 |
|
1048 |
|
1049 |
|
1050 |
|
1051 |
|
1052 |
|
1053 |
|
1054 |
|
1055 | function baseToPairs(object, props) {
|
1056 | return arrayMap(props, function(key) {
|
1057 | return [key, object[key]];
|
1058 | });
|
1059 | }
|
1060 |
|
1061 | |
1062 |
|
1063 |
|
1064 |
|
1065 |
|
1066 |
|
1067 |
|
1068 | function baseUnary(func) {
|
1069 | return function(value) {
|
1070 | return func(value);
|
1071 | };
|
1072 | }
|
1073 |
|
1074 | |
1075 |
|
1076 |
|
1077 |
|
1078 |
|
1079 |
|
1080 |
|
1081 |
|
1082 |
|
1083 |
|
1084 | function baseValues(object, props) {
|
1085 | return arrayMap(props, function(key) {
|
1086 | return object[key];
|
1087 | });
|
1088 | }
|
1089 |
|
1090 | |
1091 |
|
1092 |
|
1093 |
|
1094 |
|
1095 |
|
1096 |
|
1097 |
|
1098 | function cacheHas(cache, key) {
|
1099 | return cache.has(key);
|
1100 | }
|
1101 |
|
1102 | |
1103 |
|
1104 |
|
1105 |
|
1106 |
|
1107 |
|
1108 |
|
1109 |
|
1110 |
|
1111 | function charsStartIndex(strSymbols, chrSymbols) {
|
1112 | var index = -1,
|
1113 | length = strSymbols.length;
|
1114 |
|
1115 | while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
1116 | return index;
|
1117 | }
|
1118 |
|
1119 | |
1120 |
|
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 |
|
1126 |
|
1127 |
|
1128 | function charsEndIndex(strSymbols, chrSymbols) {
|
1129 | var index = strSymbols.length;
|
1130 |
|
1131 | while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
1132 | return index;
|
1133 | }
|
1134 |
|
1135 | |
1136 |
|
1137 |
|
1138 |
|
1139 |
|
1140 |
|
1141 |
|
1142 |
|
1143 | function countHolders(array, placeholder) {
|
1144 | var length = array.length,
|
1145 | result = 0;
|
1146 |
|
1147 | while (length--) {
|
1148 | if (array[length] === placeholder) {
|
1149 | ++result;
|
1150 | }
|
1151 | }
|
1152 | return result;
|
1153 | }
|
1154 |
|
1155 | |
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 |
|
1161 |
|
1162 |
|
1163 | var deburrLetter = basePropertyOf(deburredLetters);
|
1164 |
|
1165 | |
1166 |
|
1167 |
|
1168 |
|
1169 |
|
1170 |
|
1171 |
|
1172 | var escapeHtmlChar = basePropertyOf(htmlEscapes);
|
1173 |
|
1174 | |
1175 |
|
1176 |
|
1177 |
|
1178 |
|
1179 |
|
1180 |
|
1181 | function escapeStringChar(chr) {
|
1182 | return '\\' + stringEscapes[chr];
|
1183 | }
|
1184 |
|
1185 | |
1186 |
|
1187 |
|
1188 |
|
1189 |
|
1190 |
|
1191 |
|
1192 |
|
1193 | function getValue(object, key) {
|
1194 | return object == null ? undefined : object[key];
|
1195 | }
|
1196 |
|
1197 | |
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 |
|
1203 |
|
1204 | function hasUnicode(string) {
|
1205 | return reHasUnicode.test(string);
|
1206 | }
|
1207 |
|
1208 | |
1209 |
|
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 | function hasUnicodeWord(string) {
|
1216 | return reHasUnicodeWord.test(string);
|
1217 | }
|
1218 |
|
1219 | |
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 | function iteratorToArray(iterator) {
|
1227 | var data,
|
1228 | result = [];
|
1229 |
|
1230 | while (!(data = iterator.next()).done) {
|
1231 | result.push(data.value);
|
1232 | }
|
1233 | return result;
|
1234 | }
|
1235 |
|
1236 | |
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 | function mapToArray(map) {
|
1244 | var index = -1,
|
1245 | result = Array(map.size);
|
1246 |
|
1247 | map.forEach(function(value, key) {
|
1248 | result[++index] = [key, value];
|
1249 | });
|
1250 | return result;
|
1251 | }
|
1252 |
|
1253 | |
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 |
|
1260 |
|
1261 | function overArg(func, transform) {
|
1262 | return function(arg) {
|
1263 | return func(transform(arg));
|
1264 | };
|
1265 | }
|
1266 |
|
1267 | |
1268 |
|
1269 |
|
1270 |
|
1271 |
|
1272 |
|
1273 |
|
1274 |
|
1275 |
|
1276 | function replaceHolders(array, placeholder) {
|
1277 | var index = -1,
|
1278 | length = array.length,
|
1279 | resIndex = 0,
|
1280 | result = [];
|
1281 |
|
1282 | while (++index < length) {
|
1283 | var value = array[index];
|
1284 | if (value === placeholder || value === PLACEHOLDER) {
|
1285 | array[index] = PLACEHOLDER;
|
1286 | result[resIndex++] = index;
|
1287 | }
|
1288 | }
|
1289 | return result;
|
1290 | }
|
1291 |
|
1292 | |
1293 |
|
1294 |
|
1295 |
|
1296 |
|
1297 |
|
1298 |
|
1299 | function setToArray(set) {
|
1300 | var index = -1,
|
1301 | result = Array(set.size);
|
1302 |
|
1303 | set.forEach(function(value) {
|
1304 | result[++index] = value;
|
1305 | });
|
1306 | return result;
|
1307 | }
|
1308 |
|
1309 | |
1310 |
|
1311 |
|
1312 |
|
1313 |
|
1314 |
|
1315 |
|
1316 | function setToPairs(set) {
|
1317 | var index = -1,
|
1318 | result = Array(set.size);
|
1319 |
|
1320 | set.forEach(function(value) {
|
1321 | result[++index] = [value, value];
|
1322 | });
|
1323 | return result;
|
1324 | }
|
1325 |
|
1326 | |
1327 |
|
1328 |
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 | function strictIndexOf(array, value, fromIndex) {
|
1337 | var index = fromIndex - 1,
|
1338 | length = array.length;
|
1339 |
|
1340 | while (++index < length) {
|
1341 | if (array[index] === value) {
|
1342 | return index;
|
1343 | }
|
1344 | }
|
1345 | return -1;
|
1346 | }
|
1347 |
|
1348 | |
1349 |
|
1350 |
|
1351 |
|
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 | function strictLastIndexOf(array, value, fromIndex) {
|
1359 | var index = fromIndex + 1;
|
1360 | while (index--) {
|
1361 | if (array[index] === value) {
|
1362 | return index;
|
1363 | }
|
1364 | }
|
1365 | return index;
|
1366 | }
|
1367 |
|
1368 | |
1369 |
|
1370 |
|
1371 |
|
1372 |
|
1373 |
|
1374 |
|
1375 | function stringSize(string) {
|
1376 | return hasUnicode(string)
|
1377 | ? unicodeSize(string)
|
1378 | : asciiSize(string);
|
1379 | }
|
1380 |
|
1381 | |
1382 |
|
1383 |
|
1384 |
|
1385 |
|
1386 |
|
1387 |
|
1388 | function stringToArray(string) {
|
1389 | return hasUnicode(string)
|
1390 | ? unicodeToArray(string)
|
1391 | : asciiToArray(string);
|
1392 | }
|
1393 |
|
1394 | |
1395 |
|
1396 |
|
1397 |
|
1398 |
|
1399 |
|
1400 |
|
1401 | var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
1402 |
|
1403 | |
1404 |
|
1405 |
|
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 | function unicodeSize(string) {
|
1411 | var result = reUnicode.lastIndex = 0;
|
1412 | while (reUnicode.test(string)) {
|
1413 | ++result;
|
1414 | }
|
1415 | return result;
|
1416 | }
|
1417 |
|
1418 | |
1419 |
|
1420 |
|
1421 |
|
1422 |
|
1423 |
|
1424 |
|
1425 | function unicodeToArray(string) {
|
1426 | return string.match(reUnicode) || [];
|
1427 | }
|
1428 |
|
1429 | |
1430 |
|
1431 |
|
1432 |
|
1433 |
|
1434 |
|
1435 |
|
1436 | function unicodeWords(string) {
|
1437 | return string.match(reUnicodeWord) || [];
|
1438 | }
|
1439 |
|
1440 |
|
1441 |
|
1442 | |
1443 |
|
1444 |
|
1445 |
|
1446 |
|
1447 |
|
1448 |
|
1449 |
|
1450 |
|
1451 |
|
1452 |
|
1453 |
|
1454 |
|
1455 |
|
1456 |
|
1457 |
|
1458 |
|
1459 |
|
1460 |
|
1461 |
|
1462 |
|
1463 |
|
1464 |
|
1465 |
|
1466 |
|
1467 |
|
1468 |
|
1469 |
|
1470 |
|
1471 | var runInContext = (function runInContext(context) {
|
1472 | context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
1473 |
|
1474 |
|
1475 | var Array = context.Array,
|
1476 | Date = context.Date,
|
1477 | Error = context.Error,
|
1478 | Function = context.Function,
|
1479 | Math = context.Math,
|
1480 | Object = context.Object,
|
1481 | RegExp = context.RegExp,
|
1482 | String = context.String,
|
1483 | TypeError = context.TypeError;
|
1484 |
|
1485 |
|
1486 | var arrayProto = Array.prototype,
|
1487 | funcProto = Function.prototype,
|
1488 | objectProto = Object.prototype;
|
1489 |
|
1490 |
|
1491 | var coreJsData = context['__core-js_shared__'];
|
1492 |
|
1493 |
|
1494 | var funcToString = funcProto.toString;
|
1495 |
|
1496 |
|
1497 | var hasOwnProperty = objectProto.hasOwnProperty;
|
1498 |
|
1499 |
|
1500 | var idCounter = 0;
|
1501 |
|
1502 |
|
1503 | var maskSrcKey = (function() {
|
1504 | var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
1505 | return uid ? ('Symbol(src)_1.' + uid) : '';
|
1506 | }());
|
1507 |
|
1508 | |
1509 |
|
1510 |
|
1511 |
|
1512 |
|
1513 | var nativeObjectToString = objectProto.toString;
|
1514 |
|
1515 |
|
1516 | var objectCtorString = funcToString.call(Object);
|
1517 |
|
1518 |
|
1519 | var oldDash = root._;
|
1520 |
|
1521 |
|
1522 | var reIsNative = RegExp('^' +
|
1523 | funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
1524 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
1525 | );
|
1526 |
|
1527 |
|
1528 | var Buffer = moduleExports ? context.Buffer : undefined,
|
1529 | Symbol = context.Symbol,
|
1530 | Uint8Array = context.Uint8Array,
|
1531 | allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
|
1532 | getPrototype = overArg(Object.getPrototypeOf, Object),
|
1533 | objectCreate = Object.create,
|
1534 | propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
1535 | splice = arrayProto.splice,
|
1536 | spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
|
1537 | symIterator = Symbol ? Symbol.iterator : undefined,
|
1538 | symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
1539 |
|
1540 | var defineProperty = (function() {
|
1541 | try {
|
1542 | var func = getNative(Object, 'defineProperty');
|
1543 | func({}, '', {});
|
1544 | return func;
|
1545 | } catch (e) {}
|
1546 | }());
|
1547 |
|
1548 |
|
1549 | var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
|
1550 | ctxNow = Date && Date.now !== root.Date.now && Date.now,
|
1551 | ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
1552 |
|
1553 |
|
1554 | var nativeCeil = Math.ceil,
|
1555 | nativeFloor = Math.floor,
|
1556 | nativeGetSymbols = Object.getOwnPropertySymbols,
|
1557 | nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
1558 | nativeIsFinite = context.isFinite,
|
1559 | nativeJoin = arrayProto.join,
|
1560 | nativeKeys = overArg(Object.keys, Object),
|
1561 | nativeMax = Math.max,
|
1562 | nativeMin = Math.min,
|
1563 | nativeNow = Date.now,
|
1564 | nativeParseInt = context.parseInt,
|
1565 | nativeRandom = Math.random,
|
1566 | nativeReverse = arrayProto.reverse;
|
1567 |
|
1568 |
|
1569 | var DataView = getNative(context, 'DataView'),
|
1570 | Map = getNative(context, 'Map'),
|
1571 | Promise = getNative(context, 'Promise'),
|
1572 | Set = getNative(context, 'Set'),
|
1573 | WeakMap = getNative(context, 'WeakMap'),
|
1574 | nativeCreate = getNative(Object, 'create');
|
1575 |
|
1576 |
|
1577 | var metaMap = WeakMap && new WeakMap;
|
1578 |
|
1579 |
|
1580 | var realNames = {};
|
1581 |
|
1582 |
|
1583 | var dataViewCtorString = toSource(DataView),
|
1584 | mapCtorString = toSource(Map),
|
1585 | promiseCtorString = toSource(Promise),
|
1586 | setCtorString = toSource(Set),
|
1587 | weakMapCtorString = toSource(WeakMap);
|
1588 |
|
1589 |
|
1590 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
1591 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
|
1592 | symbolToString = symbolProto ? symbolProto.toString : undefined;
|
1593 |
|
1594 |
|
1595 |
|
1596 | |
1597 |
|
1598 |
|
1599 |
|
1600 |
|
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 |
|
1606 |
|
1607 |
|
1608 |
|
1609 |
|
1610 |
|
1611 |
|
1612 |
|
1613 |
|
1614 |
|
1615 |
|
1616 |
|
1617 |
|
1618 |
|
1619 |
|
1620 |
|
1621 |
|
1622 |
|
1623 |
|
1624 |
|
1625 |
|
1626 |
|
1627 |
|
1628 |
|
1629 |
|
1630 |
|
1631 |
|
1632 |
|
1633 |
|
1634 |
|
1635 |
|
1636 |
|
1637 |
|
1638 |
|
1639 |
|
1640 |
|
1641 |
|
1642 |
|
1643 |
|
1644 |
|
1645 |
|
1646 |
|
1647 |
|
1648 |
|
1649 |
|
1650 |
|
1651 |
|
1652 |
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 |
|
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 |
|
1671 |
|
1672 |
|
1673 |
|
1674 |
|
1675 |
|
1676 |
|
1677 |
|
1678 |
|
1679 |
|
1680 |
|
1681 |
|
1682 |
|
1683 |
|
1684 |
|
1685 |
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
|
1697 |
|
1698 |
|
1699 |
|
1700 |
|
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 | function lodash(value) {
|
1714 | if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
1715 | if (value instanceof LodashWrapper) {
|
1716 | return value;
|
1717 | }
|
1718 | if (hasOwnProperty.call(value, '__wrapped__')) {
|
1719 | return wrapperClone(value);
|
1720 | }
|
1721 | }
|
1722 | return new LodashWrapper(value);
|
1723 | }
|
1724 |
|
1725 | |
1726 |
|
1727 |
|
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 | var baseCreate = (function() {
|
1734 | function object() {}
|
1735 | return function(proto) {
|
1736 | if (!isObject(proto)) {
|
1737 | return {};
|
1738 | }
|
1739 | if (objectCreate) {
|
1740 | return objectCreate(proto);
|
1741 | }
|
1742 | object.prototype = proto;
|
1743 | var result = new object;
|
1744 | object.prototype = undefined;
|
1745 | return result;
|
1746 | };
|
1747 | }());
|
1748 |
|
1749 | |
1750 |
|
1751 |
|
1752 |
|
1753 |
|
1754 | function baseLodash() {
|
1755 |
|
1756 | }
|
1757 |
|
1758 | |
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 | function LodashWrapper(value, chainAll) {
|
1766 | this.__wrapped__ = value;
|
1767 | this.__actions__ = [];
|
1768 | this.__chain__ = !!chainAll;
|
1769 | this.__index__ = 0;
|
1770 | this.__values__ = undefined;
|
1771 | }
|
1772 |
|
1773 | |
1774 |
|
1775 |
|
1776 |
|
1777 |
|
1778 |
|
1779 |
|
1780 |
|
1781 |
|
1782 | lodash.templateSettings = {
|
1783 |
|
1784 | |
1785 |
|
1786 |
|
1787 |
|
1788 |
|
1789 |
|
1790 | 'escape': reEscape,
|
1791 |
|
1792 | |
1793 |
|
1794 |
|
1795 |
|
1796 |
|
1797 |
|
1798 | 'evaluate': reEvaluate,
|
1799 |
|
1800 | |
1801 |
|
1802 |
|
1803 |
|
1804 |
|
1805 |
|
1806 | 'interpolate': reInterpolate,
|
1807 |
|
1808 | |
1809 |
|
1810 |
|
1811 |
|
1812 |
|
1813 |
|
1814 | 'variable': '',
|
1815 |
|
1816 | |
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 | 'imports': {
|
1823 |
|
1824 | |
1825 |
|
1826 |
|
1827 |
|
1828 |
|
1829 |
|
1830 | '_': lodash
|
1831 | }
|
1832 | };
|
1833 |
|
1834 |
|
1835 | lodash.prototype = baseLodash.prototype;
|
1836 | lodash.prototype.constructor = lodash;
|
1837 |
|
1838 | LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
1839 | LodashWrapper.prototype.constructor = LodashWrapper;
|
1840 |
|
1841 |
|
1842 |
|
1843 | |
1844 |
|
1845 |
|
1846 |
|
1847 |
|
1848 |
|
1849 |
|
1850 | function LazyWrapper(value) {
|
1851 | this.__wrapped__ = value;
|
1852 | this.__actions__ = [];
|
1853 | this.__dir__ = 1;
|
1854 | this.__filtered__ = false;
|
1855 | this.__iteratees__ = [];
|
1856 | this.__takeCount__ = MAX_ARRAY_LENGTH;
|
1857 | this.__views__ = [];
|
1858 | }
|
1859 |
|
1860 | |
1861 |
|
1862 |
|
1863 |
|
1864 |
|
1865 |
|
1866 |
|
1867 |
|
1868 | function lazyClone() {
|
1869 | var result = new LazyWrapper(this.__wrapped__);
|
1870 | result.__actions__ = copyArray(this.__actions__);
|
1871 | result.__dir__ = this.__dir__;
|
1872 | result.__filtered__ = this.__filtered__;
|
1873 | result.__iteratees__ = copyArray(this.__iteratees__);
|
1874 | result.__takeCount__ = this.__takeCount__;
|
1875 | result.__views__ = copyArray(this.__views__);
|
1876 | return result;
|
1877 | }
|
1878 |
|
1879 | |
1880 |
|
1881 |
|
1882 |
|
1883 |
|
1884 |
|
1885 |
|
1886 |
|
1887 | function lazyReverse() {
|
1888 | if (this.__filtered__) {
|
1889 | var result = new LazyWrapper(this);
|
1890 | result.__dir__ = -1;
|
1891 | result.__filtered__ = true;
|
1892 | } else {
|
1893 | result = this.clone();
|
1894 | result.__dir__ *= -1;
|
1895 | }
|
1896 | return result;
|
1897 | }
|
1898 |
|
1899 | |
1900 |
|
1901 |
|
1902 |
|
1903 |
|
1904 |
|
1905 |
|
1906 |
|
1907 | function lazyValue() {
|
1908 | var array = this.__wrapped__.value(),
|
1909 | dir = this.__dir__,
|
1910 | isArr = isArray(array),
|
1911 | isRight = dir < 0,
|
1912 | arrLength = isArr ? array.length : 0,
|
1913 | view = getView(0, arrLength, this.__views__),
|
1914 | start = view.start,
|
1915 | end = view.end,
|
1916 | length = end - start,
|
1917 | index = isRight ? end : (start - 1),
|
1918 | iteratees = this.__iteratees__,
|
1919 | iterLength = iteratees.length,
|
1920 | resIndex = 0,
|
1921 | takeCount = nativeMin(length, this.__takeCount__);
|
1922 |
|
1923 | if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
|
1924 | return baseWrapperValue(array, this.__actions__);
|
1925 | }
|
1926 | var result = [];
|
1927 |
|
1928 | outer:
|
1929 | while (length-- && resIndex < takeCount) {
|
1930 | index += dir;
|
1931 |
|
1932 | var iterIndex = -1,
|
1933 | value = array[index];
|
1934 |
|
1935 | while (++iterIndex < iterLength) {
|
1936 | var data = iteratees[iterIndex],
|
1937 | iteratee = data.iteratee,
|
1938 | type = data.type,
|
1939 | computed = iteratee(value);
|
1940 |
|
1941 | if (type == LAZY_MAP_FLAG) {
|
1942 | value = computed;
|
1943 | } else if (!computed) {
|
1944 | if (type == LAZY_FILTER_FLAG) {
|
1945 | continue outer;
|
1946 | } else {
|
1947 | break outer;
|
1948 | }
|
1949 | }
|
1950 | }
|
1951 | result[resIndex++] = value;
|
1952 | }
|
1953 | return result;
|
1954 | }
|
1955 |
|
1956 |
|
1957 | LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
1958 | LazyWrapper.prototype.constructor = LazyWrapper;
|
1959 |
|
1960 |
|
1961 |
|
1962 | |
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 |
|
1968 |
|
1969 | function Hash(entries) {
|
1970 | var index = -1,
|
1971 | length = entries == null ? 0 : entries.length;
|
1972 |
|
1973 | this.clear();
|
1974 | while (++index < length) {
|
1975 | var entry = entries[index];
|
1976 | this.set(entry[0], entry[1]);
|
1977 | }
|
1978 | }
|
1979 |
|
1980 | |
1981 |
|
1982 |
|
1983 |
|
1984 |
|
1985 |
|
1986 |
|
1987 | function hashClear() {
|
1988 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
1989 | this.size = 0;
|
1990 | }
|
1991 |
|
1992 | |
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 |
|
1998 |
|
1999 |
|
2000 |
|
2001 |
|
2002 | function hashDelete(key) {
|
2003 | var result = this.has(key) && delete this.__data__[key];
|
2004 | this.size -= result ? 1 : 0;
|
2005 | return result;
|
2006 | }
|
2007 |
|
2008 | |
2009 |
|
2010 |
|
2011 |
|
2012 |
|
2013 |
|
2014 |
|
2015 |
|
2016 |
|
2017 | function hashGet(key) {
|
2018 | var data = this.__data__;
|
2019 | if (nativeCreate) {
|
2020 | var result = data[key];
|
2021 | return result === HASH_UNDEFINED ? undefined : result;
|
2022 | }
|
2023 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
2024 | }
|
2025 |
|
2026 | |
2027 |
|
2028 |
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 |
|
2035 | function hashHas(key) {
|
2036 | var data = this.__data__;
|
2037 | return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
2038 | }
|
2039 |
|
2040 | |
2041 |
|
2042 |
|
2043 |
|
2044 |
|
2045 |
|
2046 |
|
2047 |
|
2048 |
|
2049 |
|
2050 | function hashSet(key, value) {
|
2051 | var data = this.__data__;
|
2052 | this.size += this.has(key) ? 0 : 1;
|
2053 | data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
2054 | return this;
|
2055 | }
|
2056 |
|
2057 |
|
2058 | Hash.prototype.clear = hashClear;
|
2059 | Hash.prototype['delete'] = hashDelete;
|
2060 | Hash.prototype.get = hashGet;
|
2061 | Hash.prototype.has = hashHas;
|
2062 | Hash.prototype.set = hashSet;
|
2063 |
|
2064 |
|
2065 |
|
2066 | |
2067 |
|
2068 |
|
2069 |
|
2070 |
|
2071 |
|
2072 |
|
2073 | function ListCache(entries) {
|
2074 | var index = -1,
|
2075 | length = entries == null ? 0 : entries.length;
|
2076 |
|
2077 | this.clear();
|
2078 | while (++index < length) {
|
2079 | var entry = entries[index];
|
2080 | this.set(entry[0], entry[1]);
|
2081 | }
|
2082 | }
|
2083 |
|
2084 | |
2085 |
|
2086 |
|
2087 |
|
2088 |
|
2089 |
|
2090 |
|
2091 | function listCacheClear() {
|
2092 | this.__data__ = [];
|
2093 | this.size = 0;
|
2094 | }
|
2095 |
|
2096 | |
2097 |
|
2098 |
|
2099 |
|
2100 |
|
2101 |
|
2102 |
|
2103 |
|
2104 |
|
2105 | function listCacheDelete(key) {
|
2106 | var data = this.__data__,
|
2107 | index = assocIndexOf(data, key);
|
2108 |
|
2109 | if (index < 0) {
|
2110 | return false;
|
2111 | }
|
2112 | var lastIndex = data.length - 1;
|
2113 | if (index == lastIndex) {
|
2114 | data.pop();
|
2115 | } else {
|
2116 | splice.call(data, index, 1);
|
2117 | }
|
2118 | --this.size;
|
2119 | return true;
|
2120 | }
|
2121 |
|
2122 | |
2123 |
|
2124 |
|
2125 |
|
2126 |
|
2127 |
|
2128 |
|
2129 |
|
2130 |
|
2131 | function listCacheGet(key) {
|
2132 | var data = this.__data__,
|
2133 | index = assocIndexOf(data, key);
|
2134 |
|
2135 | return index < 0 ? undefined : data[index][1];
|
2136 | }
|
2137 |
|
2138 | |
2139 |
|
2140 |
|
2141 |
|
2142 |
|
2143 |
|
2144 |
|
2145 |
|
2146 |
|
2147 | function listCacheHas(key) {
|
2148 | return assocIndexOf(this.__data__, key) > -1;
|
2149 | }
|
2150 |
|
2151 | |
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 |
|
2157 |
|
2158 |
|
2159 |
|
2160 |
|
2161 | function listCacheSet(key, value) {
|
2162 | var data = this.__data__,
|
2163 | index = assocIndexOf(data, key);
|
2164 |
|
2165 | if (index < 0) {
|
2166 | ++this.size;
|
2167 | data.push([key, value]);
|
2168 | } else {
|
2169 | data[index][1] = value;
|
2170 | }
|
2171 | return this;
|
2172 | }
|
2173 |
|
2174 |
|
2175 | ListCache.prototype.clear = listCacheClear;
|
2176 | ListCache.prototype['delete'] = listCacheDelete;
|
2177 | ListCache.prototype.get = listCacheGet;
|
2178 | ListCache.prototype.has = listCacheHas;
|
2179 | ListCache.prototype.set = listCacheSet;
|
2180 |
|
2181 |
|
2182 |
|
2183 | |
2184 |
|
2185 |
|
2186 |
|
2187 |
|
2188 |
|
2189 |
|
2190 | function MapCache(entries) {
|
2191 | var index = -1,
|
2192 | length = entries == null ? 0 : entries.length;
|
2193 |
|
2194 | this.clear();
|
2195 | while (++index < length) {
|
2196 | var entry = entries[index];
|
2197 | this.set(entry[0], entry[1]);
|
2198 | }
|
2199 | }
|
2200 |
|
2201 | |
2202 |
|
2203 |
|
2204 |
|
2205 |
|
2206 |
|
2207 |
|
2208 | function mapCacheClear() {
|
2209 | this.size = 0;
|
2210 | this.__data__ = {
|
2211 | 'hash': new Hash,
|
2212 | 'map': new (Map || ListCache),
|
2213 | 'string': new Hash
|
2214 | };
|
2215 | }
|
2216 |
|
2217 | |
2218 |
|
2219 |
|
2220 |
|
2221 |
|
2222 |
|
2223 |
|
2224 |
|
2225 |
|
2226 | function mapCacheDelete(key) {
|
2227 | var result = getMapData(this, key)['delete'](key);
|
2228 | this.size -= result ? 1 : 0;
|
2229 | return result;
|
2230 | }
|
2231 |
|
2232 | |
2233 |
|
2234 |
|
2235 |
|
2236 |
|
2237 |
|
2238 |
|
2239 |
|
2240 |
|
2241 | function mapCacheGet(key) {
|
2242 | return getMapData(this, key).get(key);
|
2243 | }
|
2244 |
|
2245 | |
2246 |
|
2247 |
|
2248 |
|
2249 |
|
2250 |
|
2251 |
|
2252 |
|
2253 |
|
2254 | function mapCacheHas(key) {
|
2255 | return getMapData(this, key).has(key);
|
2256 | }
|
2257 |
|
2258 | |
2259 |
|
2260 |
|
2261 |
|
2262 |
|
2263 |
|
2264 |
|
2265 |
|
2266 |
|
2267 |
|
2268 | function mapCacheSet(key, value) {
|
2269 | var data = getMapData(this, key),
|
2270 | size = data.size;
|
2271 |
|
2272 | data.set(key, value);
|
2273 | this.size += data.size == size ? 0 : 1;
|
2274 | return this;
|
2275 | }
|
2276 |
|
2277 |
|
2278 | MapCache.prototype.clear = mapCacheClear;
|
2279 | MapCache.prototype['delete'] = mapCacheDelete;
|
2280 | MapCache.prototype.get = mapCacheGet;
|
2281 | MapCache.prototype.has = mapCacheHas;
|
2282 | MapCache.prototype.set = mapCacheSet;
|
2283 |
|
2284 |
|
2285 |
|
2286 | |
2287 |
|
2288 |
|
2289 |
|
2290 |
|
2291 |
|
2292 |
|
2293 |
|
2294 | function SetCache(values) {
|
2295 | var index = -1,
|
2296 | length = values == null ? 0 : values.length;
|
2297 |
|
2298 | this.__data__ = new MapCache;
|
2299 | while (++index < length) {
|
2300 | this.add(values[index]);
|
2301 | }
|
2302 | }
|
2303 |
|
2304 | |
2305 |
|
2306 |
|
2307 |
|
2308 |
|
2309 |
|
2310 |
|
2311 |
|
2312 |
|
2313 |
|
2314 | function setCacheAdd(value) {
|
2315 | this.__data__.set(value, HASH_UNDEFINED);
|
2316 | return this;
|
2317 | }
|
2318 |
|
2319 | |
2320 |
|
2321 |
|
2322 |
|
2323 |
|
2324 |
|
2325 |
|
2326 |
|
2327 |
|
2328 | function setCacheHas(value) {
|
2329 | return this.__data__.has(value);
|
2330 | }
|
2331 |
|
2332 |
|
2333 | SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
2334 | SetCache.prototype.has = setCacheHas;
|
2335 |
|
2336 |
|
2337 |
|
2338 | |
2339 |
|
2340 |
|
2341 |
|
2342 |
|
2343 |
|
2344 |
|
2345 | function Stack(entries) {
|
2346 | var data = this.__data__ = new ListCache(entries);
|
2347 | this.size = data.size;
|
2348 | }
|
2349 |
|
2350 | |
2351 |
|
2352 |
|
2353 |
|
2354 |
|
2355 |
|
2356 |
|
2357 | function stackClear() {
|
2358 | this.__data__ = new ListCache;
|
2359 | this.size = 0;
|
2360 | }
|
2361 |
|
2362 | |
2363 |
|
2364 |
|
2365 |
|
2366 |
|
2367 |
|
2368 |
|
2369 |
|
2370 |
|
2371 | function stackDelete(key) {
|
2372 | var data = this.__data__,
|
2373 | result = data['delete'](key);
|
2374 |
|
2375 | this.size = data.size;
|
2376 | return result;
|
2377 | }
|
2378 |
|
2379 | |
2380 |
|
2381 |
|
2382 |
|
2383 |
|
2384 |
|
2385 |
|
2386 |
|
2387 |
|
2388 | function stackGet(key) {
|
2389 | return this.__data__.get(key);
|
2390 | }
|
2391 |
|
2392 | |
2393 |
|
2394 |
|
2395 |
|
2396 |
|
2397 |
|
2398 |
|
2399 |
|
2400 |
|
2401 | function stackHas(key) {
|
2402 | return this.__data__.has(key);
|
2403 | }
|
2404 |
|
2405 | |
2406 |
|
2407 |
|
2408 |
|
2409 |
|
2410 |
|
2411 |
|
2412 |
|
2413 |
|
2414 |
|
2415 | function stackSet(key, value) {
|
2416 | var data = this.__data__;
|
2417 | if (data instanceof ListCache) {
|
2418 | var pairs = data.__data__;
|
2419 | if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
2420 | pairs.push([key, value]);
|
2421 | this.size = ++data.size;
|
2422 | return this;
|
2423 | }
|
2424 | data = this.__data__ = new MapCache(pairs);
|
2425 | }
|
2426 | data.set(key, value);
|
2427 | this.size = data.size;
|
2428 | return this;
|
2429 | }
|
2430 |
|
2431 |
|
2432 | Stack.prototype.clear = stackClear;
|
2433 | Stack.prototype['delete'] = stackDelete;
|
2434 | Stack.prototype.get = stackGet;
|
2435 | Stack.prototype.has = stackHas;
|
2436 | Stack.prototype.set = stackSet;
|
2437 |
|
2438 |
|
2439 |
|
2440 | |
2441 |
|
2442 |
|
2443 |
|
2444 |
|
2445 |
|
2446 |
|
2447 |
|
2448 | function arrayLikeKeys(value, inherited) {
|
2449 | var isArr = isArray(value),
|
2450 | isArg = !isArr && isArguments(value),
|
2451 | isBuff = !isArr && !isArg && isBuffer(value),
|
2452 | isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
2453 | skipIndexes = isArr || isArg || isBuff || isType,
|
2454 | result = skipIndexes ? baseTimes(value.length, String) : [],
|
2455 | length = result.length;
|
2456 |
|
2457 | for (var key in value) {
|
2458 | if ((inherited || hasOwnProperty.call(value, key)) &&
|
2459 | !(skipIndexes && (
|
2460 |
|
2461 | key == 'length' ||
|
2462 |
|
2463 | (isBuff && (key == 'offset' || key == 'parent')) ||
|
2464 |
|
2465 | (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
2466 |
|
2467 | isIndex(key, length)
|
2468 | ))) {
|
2469 | result.push(key);
|
2470 | }
|
2471 | }
|
2472 | return result;
|
2473 | }
|
2474 |
|
2475 | |
2476 |
|
2477 |
|
2478 |
|
2479 |
|
2480 |
|
2481 |
|
2482 | function arraySample(array) {
|
2483 | var length = array.length;
|
2484 | return length ? array[baseRandom(0, length - 1)] : undefined;
|
2485 | }
|
2486 |
|
2487 | |
2488 |
|
2489 |
|
2490 |
|
2491 |
|
2492 |
|
2493 |
|
2494 |
|
2495 | function arraySampleSize(array, n) {
|
2496 | return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
|
2497 | }
|
2498 |
|
2499 | |
2500 |
|
2501 |
|
2502 |
|
2503 |
|
2504 |
|
2505 |
|
2506 | function arrayShuffle(array) {
|
2507 | return shuffleSelf(copyArray(array));
|
2508 | }
|
2509 |
|
2510 | |
2511 |
|
2512 |
|
2513 |
|
2514 |
|
2515 |
|
2516 |
|
2517 |
|
2518 |
|
2519 | function assignMergeValue(object, key, value) {
|
2520 | if ((value !== undefined && !eq(object[key], value)) ||
|
2521 | (value === undefined && !(key in object))) {
|
2522 | baseAssignValue(object, key, value);
|
2523 | }
|
2524 | }
|
2525 |
|
2526 | |
2527 |
|
2528 |
|
2529 |
|
2530 |
|
2531 |
|
2532 |
|
2533 |
|
2534 |
|
2535 |
|
2536 | function assignValue(object, key, value) {
|
2537 | var objValue = object[key];
|
2538 | if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
2539 | (value === undefined && !(key in object))) {
|
2540 | baseAssignValue(object, key, value);
|
2541 | }
|
2542 | }
|
2543 |
|
2544 | |
2545 |
|
2546 |
|
2547 |
|
2548 |
|
2549 |
|
2550 |
|
2551 |
|
2552 | function assocIndexOf(array, key) {
|
2553 | var length = array.length;
|
2554 | while (length--) {
|
2555 | if (eq(array[length][0], key)) {
|
2556 | return length;
|
2557 | }
|
2558 | }
|
2559 | return -1;
|
2560 | }
|
2561 |
|
2562 | |
2563 |
|
2564 |
|
2565 |
|
2566 |
|
2567 |
|
2568 |
|
2569 |
|
2570 |
|
2571 |
|
2572 |
|
2573 | function baseAggregator(collection, setter, iteratee, accumulator) {
|
2574 | baseEach(collection, function(value, key, collection) {
|
2575 | setter(accumulator, value, iteratee(value), collection);
|
2576 | });
|
2577 | return accumulator;
|
2578 | }
|
2579 |
|
2580 | |
2581 |
|
2582 |
|
2583 |
|
2584 |
|
2585 |
|
2586 |
|
2587 |
|
2588 |
|
2589 | function baseAssign(object, source) {
|
2590 | return object && copyObject(source, keys(source), object);
|
2591 | }
|
2592 |
|
2593 | |
2594 |
|
2595 |
|
2596 |
|
2597 |
|
2598 |
|
2599 |
|
2600 |
|
2601 |
|
2602 | function baseAssignIn(object, source) {
|
2603 | return object && copyObject(source, keysIn(source), object);
|
2604 | }
|
2605 |
|
2606 | |
2607 |
|
2608 |
|
2609 |
|
2610 |
|
2611 |
|
2612 |
|
2613 |
|
2614 |
|
2615 | function baseAssignValue(object, key, value) {
|
2616 | if (key == '__proto__' && defineProperty) {
|
2617 | defineProperty(object, key, {
|
2618 | 'configurable': true,
|
2619 | 'enumerable': true,
|
2620 | 'value': value,
|
2621 | 'writable': true
|
2622 | });
|
2623 | } else {
|
2624 | object[key] = value;
|
2625 | }
|
2626 | }
|
2627 |
|
2628 | |
2629 |
|
2630 |
|
2631 |
|
2632 |
|
2633 |
|
2634 |
|
2635 |
|
2636 | function baseAt(object, paths) {
|
2637 | var index = -1,
|
2638 | length = paths.length,
|
2639 | result = Array(length),
|
2640 | skip = object == null;
|
2641 |
|
2642 | while (++index < length) {
|
2643 | result[index] = skip ? undefined : get(object, paths[index]);
|
2644 | }
|
2645 | return result;
|
2646 | }
|
2647 |
|
2648 | /**
|
2649 | * The base implementation of `_.clamp` which doesn't coerce arguments.
|
2650 | *
|
2651 | * @private
|
2652 | * @param {number} number The number to clamp.
|
2653 | * @param {number} [lower] The lower bound.
|
2654 | * @param {number} upper The upper bound.
|
2655 | * @returns {number} Returns the clamped number.
|
2656 | */
|
2657 | function baseClamp(number, lower, upper) {
|
2658 | if (number === number) {
|
2659 | if (upper !== undefined) {
|
2660 | number = number <= upper ? number : upper;
|
2661 | }
|
2662 | if (lower !== undefined) {
|
2663 | number = number >= lower ? number : lower;
|
2664 | }
|
2665 | }
|
2666 | return number;
|
2667 | }
|
2668 |
|
2669 | |
2670 |
|
2671 |
|
2672 |
|
2673 |
|
2674 |
|
2675 |
|
2676 |
|
2677 |
|
2678 |
|
2679 |
|
2680 |
|
2681 |
|
2682 |
|
2683 |
|
2684 |
|
2685 | function baseClone(value, bitmask, customizer, key, object, stack) {
|
2686 | var result,
|
2687 | isDeep = bitmask & CLONE_DEEP_FLAG,
|
2688 | isFlat = bitmask & CLONE_FLAT_FLAG,
|
2689 | isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
2690 |
|
2691 | if (customizer) {
|
2692 | result = object ? customizer(value, key, object, stack) : customizer(value);
|
2693 | }
|
2694 | if (result !== undefined) {
|
2695 | return result;
|
2696 | }
|
2697 | if (!isObject(value)) {
|
2698 | return value;
|
2699 | }
|
2700 | var isArr = isArray(value);
|
2701 | if (isArr) {
|
2702 | result = initCloneArray(value);
|
2703 | if (!isDeep) {
|
2704 | return copyArray(value, result);
|
2705 | }
|
2706 | } else {
|
2707 | var tag = getTag(value),
|
2708 | isFunc = tag == funcTag || tag == genTag;
|
2709 |
|
2710 | if (isBuffer(value)) {
|
2711 | return cloneBuffer(value, isDeep);
|
2712 | }
|
2713 | if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
2714 | result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
2715 | if (!isDeep) {
|
2716 | return isFlat
|
2717 | ? copySymbolsIn(value, baseAssignIn(result, value))
|
2718 | : copySymbols(value, baseAssign(result, value));
|
2719 | }
|
2720 | } else {
|
2721 | if (!cloneableTags[tag]) {
|
2722 | return object ? value : {};
|
2723 | }
|
2724 | result = initCloneByTag(value, tag, isDeep);
|
2725 | }
|
2726 | }
|
2727 |
|
2728 | stack || (stack = new Stack);
|
2729 | var stacked = stack.get(value);
|
2730 | if (stacked) {
|
2731 | return stacked;
|
2732 | }
|
2733 | stack.set(value, result);
|
2734 |
|
2735 | if (isSet(value)) {
|
2736 | value.forEach(function(subValue) {
|
2737 | result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
2738 | });
|
2739 | } else if (isMap(value)) {
|
2740 | value.forEach(function(subValue, key) {
|
2741 | result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
2742 | });
|
2743 | }
|
2744 |
|
2745 | var keysFunc = isFull
|
2746 | ? (isFlat ? getAllKeysIn : getAllKeys)
|
2747 | : (isFlat ? keysIn : keys);
|
2748 |
|
2749 | var props = isArr ? undefined : keysFunc(value);
|
2750 | arrayEach(props || value, function(subValue, key) {
|
2751 | if (props) {
|
2752 | key = subValue;
|
2753 | subValue = value[key];
|
2754 | }
|
2755 |
|
2756 | assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
2757 | });
|
2758 | return result;
|
2759 | }
|
2760 |
|
2761 | |
2762 |
|
2763 |
|
2764 |
|
2765 |
|
2766 |
|
2767 |
|
2768 | function baseConforms(source) {
|
2769 | var props = keys(source);
|
2770 | return function(object) {
|
2771 | return baseConformsTo(object, source, props);
|
2772 | };
|
2773 | }
|
2774 |
|
2775 | |
2776 |
|
2777 |
|
2778 |
|
2779 |
|
2780 |
|
2781 |
|
2782 |
|
2783 | function baseConformsTo(object, source, props) {
|
2784 | var length = props.length;
|
2785 | if (object == null) {
|
2786 | return !length;
|
2787 | }
|
2788 | object = Object(object);
|
2789 | while (length--) {
|
2790 | var key = props[length],
|
2791 | predicate = source[key],
|
2792 | value = object[key];
|
2793 |
|
2794 | if ((value === undefined && !(key in object)) || !predicate(value)) {
|
2795 | return false;
|
2796 | }
|
2797 | }
|
2798 | return true;
|
2799 | }
|
2800 |
|
2801 | |
2802 |
|
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 |
|
2808 |
|
2809 |
|
2810 |
|
2811 | function baseDelay(func, wait, args) {
|
2812 | if (typeof func != 'function') {
|
2813 | throw new TypeError(FUNC_ERROR_TEXT);
|
2814 | }
|
2815 | return setTimeout(function() { func.apply(undefined, args); }, wait);
|
2816 | }
|
2817 |
|
2818 | |
2819 |
|
2820 |
|
2821 |
|
2822 |
|
2823 |
|
2824 |
|
2825 |
|
2826 |
|
2827 |
|
2828 |
|
2829 | function baseDifference(array, values, iteratee, comparator) {
|
2830 | var index = -1,
|
2831 | includes = arrayIncludes,
|
2832 | isCommon = true,
|
2833 | length = array.length,
|
2834 | result = [],
|
2835 | valuesLength = values.length;
|
2836 |
|
2837 | if (!length) {
|
2838 | return result;
|
2839 | }
|
2840 | if (iteratee) {
|
2841 | values = arrayMap(values, baseUnary(iteratee));
|
2842 | }
|
2843 | if (comparator) {
|
2844 | includes = arrayIncludesWith;
|
2845 | isCommon = false;
|
2846 | }
|
2847 | else if (values.length >= LARGE_ARRAY_SIZE) {
|
2848 | includes = cacheHas;
|
2849 | isCommon = false;
|
2850 | values = new SetCache(values);
|
2851 | }
|
2852 | outer:
|
2853 | while (++index < length) {
|
2854 | var value = array[index],
|
2855 | computed = iteratee == null ? value : iteratee(value);
|
2856 |
|
2857 | value = (comparator || value !== 0) ? value : 0;
|
2858 | if (isCommon && computed === computed) {
|
2859 | var valuesIndex = valuesLength;
|
2860 | while (valuesIndex--) {
|
2861 | if (values[valuesIndex] === computed) {
|
2862 | continue outer;
|
2863 | }
|
2864 | }
|
2865 | result.push(value);
|
2866 | }
|
2867 | else if (!includes(values, computed, comparator)) {
|
2868 | result.push(value);
|
2869 | }
|
2870 | }
|
2871 | return result;
|
2872 | }
|
2873 |
|
2874 | |
2875 |
|
2876 |
|
2877 |
|
2878 |
|
2879 |
|
2880 |
|
2881 |
|
2882 | var baseEach = createBaseEach(baseForOwn);
|
2883 |
|
2884 | |
2885 |
|
2886 |
|
2887 |
|
2888 |
|
2889 |
|
2890 |
|
2891 |
|
2892 | var baseEachRight = createBaseEach(baseForOwnRight, true);
|
2893 |
|
2894 | |
2895 |
|
2896 |
|
2897 |
|
2898 |
|
2899 |
|
2900 |
|
2901 |
|
2902 |
|
2903 | function baseEvery(collection, predicate) {
|
2904 | var result = true;
|
2905 | baseEach(collection, function(value, index, collection) {
|
2906 | result = !!predicate(value, index, collection);
|
2907 | return result;
|
2908 | });
|
2909 | return result;
|
2910 | }
|
2911 |
|
2912 | |
2913 |
|
2914 |
|
2915 |
|
2916 |
|
2917 |
|
2918 |
|
2919 |
|
2920 |
|
2921 |
|
2922 | function baseExtremum(array, iteratee, comparator) {
|
2923 | var index = -1,
|
2924 | length = array.length;
|
2925 |
|
2926 | while (++index < length) {
|
2927 | var value = array[index],
|
2928 | current = iteratee(value);
|
2929 |
|
2930 | if (current != null && (computed === undefined
|
2931 | ? (current === current && !isSymbol(current))
|
2932 | : comparator(current, computed)
|
2933 | )) {
|
2934 | var computed = current,
|
2935 | result = value;
|
2936 | }
|
2937 | }
|
2938 | return result;
|
2939 | }
|
2940 |
|
2941 | |
2942 |
|
2943 |
|
2944 |
|
2945 |
|
2946 |
|
2947 |
|
2948 |
|
2949 |
|
2950 |
|
2951 | function baseFill(array, value, start, end) {
|
2952 | var length = array.length;
|
2953 |
|
2954 | start = toInteger(start);
|
2955 | if (start < 0) {
|
2956 | start = -start > length ? 0 : (length + start);
|
2957 | }
|
2958 | end = (end === undefined || end > length) ? length : toInteger(end);
|
2959 | if (end < 0) {
|
2960 | end += length;
|
2961 | }
|
2962 | end = start > end ? 0 : toLength(end);
|
2963 | while (start < end) {
|
2964 | array[start++] = value;
|
2965 | }
|
2966 | return array;
|
2967 | }
|
2968 |
|
2969 | |
2970 |
|
2971 |
|
2972 |
|
2973 |
|
2974 |
|
2975 |
|
2976 |
|
2977 | function baseFilter(collection, predicate) {
|
2978 | var result = [];
|
2979 | baseEach(collection, function(value, index, collection) {
|
2980 | if (predicate(value, index, collection)) {
|
2981 | result.push(value);
|
2982 | }
|
2983 | });
|
2984 | return result;
|
2985 | }
|
2986 |
|
2987 | |
2988 |
|
2989 |
|
2990 |
|
2991 |
|
2992 |
|
2993 |
|
2994 |
|
2995 |
|
2996 |
|
2997 |
|
2998 | function baseFlatten(array, depth, predicate, isStrict, result) {
|
2999 | var index = -1,
|
3000 | length = array.length;
|
3001 |
|
3002 | predicate || (predicate = isFlattenable);
|
3003 | result || (result = []);
|
3004 |
|
3005 | while (++index < length) {
|
3006 | var value = array[index];
|
3007 | if (depth > 0 && predicate(value)) {
|
3008 | if (depth > 1) {
|
3009 |
|
3010 | baseFlatten(value, depth - 1, predicate, isStrict, result);
|
3011 | } else {
|
3012 | arrayPush(result, value);
|
3013 | }
|
3014 | } else if (!isStrict) {
|
3015 | result[result.length] = value;
|
3016 | }
|
3017 | }
|
3018 | return result;
|
3019 | }
|
3020 |
|
3021 | |
3022 |
|
3023 |
|
3024 |
|
3025 |
|
3026 |
|
3027 |
|
3028 |
|
3029 |
|
3030 |
|
3031 |
|
3032 | var baseFor = createBaseFor();
|
3033 |
|
3034 | |
3035 |
|
3036 |
|
3037 |
|
3038 |
|
3039 |
|
3040 |
|
3041 |
|
3042 |
|
3043 |
|
3044 | var baseForRight = createBaseFor(true);
|
3045 |
|
3046 | |
3047 |
|
3048 |
|
3049 |
|
3050 |
|
3051 |
|
3052 |
|
3053 |
|
3054 | function baseForOwn(object, iteratee) {
|
3055 | return object && baseFor(object, iteratee, keys);
|
3056 | }
|
3057 |
|
3058 | |
3059 |
|
3060 |
|
3061 |
|
3062 |
|
3063 |
|
3064 |
|
3065 |
|
3066 | function baseForOwnRight(object, iteratee) {
|
3067 | return object && baseForRight(object, iteratee, keys);
|
3068 | }
|
3069 |
|
3070 | |
3071 |
|
3072 |
|
3073 |
|
3074 |
|
3075 |
|
3076 |
|
3077 |
|
3078 |
|
3079 | function baseFunctions(object, props) {
|
3080 | return arrayFilter(props, function(key) {
|
3081 | return isFunction(object[key]);
|
3082 | });
|
3083 | }
|
3084 |
|
3085 | |
3086 |
|
3087 |
|
3088 |
|
3089 |
|
3090 |
|
3091 |
|
3092 |
|
3093 | function baseGet(object, path) {
|
3094 | path = castPath(path, object);
|
3095 |
|
3096 | var index = 0,
|
3097 | length = path.length;
|
3098 |
|
3099 | while (object != null && index < length) {
|
3100 | object = object[toKey(path[index++])];
|
3101 | }
|
3102 | return (index && index == length) ? object : undefined;
|
3103 | }
|
3104 |
|
3105 | |
3106 |
|
3107 |
|
3108 |
|
3109 |
|
3110 |
|
3111 |
|
3112 |
|
3113 |
|
3114 |
|
3115 |
|
3116 | function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
3117 | var result = keysFunc(object);
|
3118 | return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
3119 | }
|
3120 |
|
3121 | |
3122 |
|
3123 |
|
3124 |
|
3125 |
|
3126 |
|
3127 |
|
3128 | function baseGetTag(value) {
|
3129 | if (value == null) {
|
3130 | return value === undefined ? undefinedTag : nullTag;
|
3131 | }
|
3132 | return (symToStringTag && symToStringTag in Object(value))
|
3133 | ? getRawTag(value)
|
3134 | : objectToString(value);
|
3135 | }
|
3136 |
|
3137 | |
3138 |
|
3139 |
|
3140 |
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 |
|
3146 | function baseGt(value, other) {
|
3147 | return value > other;
|
3148 | }
|
3149 |
|
3150 | |
3151 |
|
3152 |
|
3153 |
|
3154 |
|
3155 |
|
3156 |
|
3157 |
|
3158 | function baseHas(object, key) {
|
3159 | return object != null && hasOwnProperty.call(object, key);
|
3160 | }
|
3161 |
|
3162 | |
3163 |
|
3164 |
|
3165 |
|
3166 |
|
3167 |
|
3168 |
|
3169 |
|
3170 | function baseHasIn(object, key) {
|
3171 | return object != null && key in Object(object);
|
3172 | }
|
3173 |
|
3174 | |
3175 |
|
3176 |
|
3177 |
|
3178 |
|
3179 |
|
3180 |
|
3181 |
|
3182 |
|
3183 | function baseInRange(number, start, end) {
|
3184 | return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
3185 | }
|
3186 |
|
3187 | |
3188 |
|
3189 |
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 |
|
3196 |
|
3197 | function baseIntersection(arrays, iteratee, comparator) {
|
3198 | var includes = comparator ? arrayIncludesWith : arrayIncludes,
|
3199 | length = arrays[0].length,
|
3200 | othLength = arrays.length,
|
3201 | othIndex = othLength,
|
3202 | caches = Array(othLength),
|
3203 | maxLength = Infinity,
|
3204 | result = [];
|
3205 |
|
3206 | while (othIndex--) {
|
3207 | var array = arrays[othIndex];
|
3208 | if (othIndex && iteratee) {
|
3209 | array = arrayMap(array, baseUnary(iteratee));
|
3210 | }
|
3211 | maxLength = nativeMin(array.length, maxLength);
|
3212 | caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
|
3213 | ? new SetCache(othIndex && array)
|
3214 | : undefined;
|
3215 | }
|
3216 | array = arrays[0];
|
3217 |
|
3218 | var index = -1,
|
3219 | seen = caches[0];
|
3220 |
|
3221 | outer:
|
3222 | while (++index < length && result.length < maxLength) {
|
3223 | var value = array[index],
|
3224 | computed = iteratee ? iteratee(value) : value;
|
3225 |
|
3226 | value = (comparator || value !== 0) ? value : 0;
|
3227 | if (!(seen
|
3228 | ? cacheHas(seen, computed)
|
3229 | : includes(result, computed, comparator)
|
3230 | )) {
|
3231 | othIndex = othLength;
|
3232 | while (--othIndex) {
|
3233 | var cache = caches[othIndex];
|
3234 | if (!(cache
|
3235 | ? cacheHas(cache, computed)
|
3236 | : includes(arrays[othIndex], computed, comparator))
|
3237 | ) {
|
3238 | continue outer;
|
3239 | }
|
3240 | }
|
3241 | if (seen) {
|
3242 | seen.push(computed);
|
3243 | }
|
3244 | result.push(value);
|
3245 | }
|
3246 | }
|
3247 | return result;
|
3248 | }
|
3249 |
|
3250 | |
3251 |
|
3252 |
|
3253 |
|
3254 |
|
3255 |
|
3256 |
|
3257 |
|
3258 |
|
3259 |
|
3260 |
|
3261 | function baseInverter(object, setter, iteratee, accumulator) {
|
3262 | baseForOwn(object, function(value, key, object) {
|
3263 | setter(accumulator, iteratee(value), key, object);
|
3264 | });
|
3265 | return accumulator;
|
3266 | }
|
3267 |
|
3268 | |
3269 |
|
3270 |
|
3271 |
|
3272 |
|
3273 |
|
3274 |
|
3275 |
|
3276 |
|
3277 |
|
3278 | function baseInvoke(object, path, args) {
|
3279 | path = castPath(path, object);
|
3280 | object = parent(object, path);
|
3281 | var func = object == null ? object : object[toKey(last(path))];
|
3282 | return func == null ? undefined : apply(func, object, args);
|
3283 | }
|
3284 |
|
3285 | |
3286 |
|
3287 |
|
3288 |
|
3289 |
|
3290 |
|
3291 |
|
3292 | function baseIsArguments(value) {
|
3293 | return isObjectLike(value) && baseGetTag(value) == argsTag;
|
3294 | }
|
3295 |
|
3296 | |
3297 |
|
3298 |
|
3299 |
|
3300 |
|
3301 |
|
3302 |
|
3303 | function baseIsArrayBuffer(value) {
|
3304 | return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
|
3305 | }
|
3306 |
|
3307 | |
3308 |
|
3309 |
|
3310 |
|
3311 |
|
3312 |
|
3313 |
|
3314 | function baseIsDate(value) {
|
3315 | return isObjectLike(value) && baseGetTag(value) == dateTag;
|
3316 | }
|
3317 |
|
3318 | |
3319 |
|
3320 |
|
3321 |
|
3322 |
|
3323 |
|
3324 |
|
3325 |
|
3326 |
|
3327 |
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 | function baseIsEqual(value, other, bitmask, customizer, stack) {
|
3333 | if (value === other) {
|
3334 | return true;
|
3335 | }
|
3336 | if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
|
3337 | return value !== value && other !== other;
|
3338 | }
|
3339 | return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
3340 | }
|
3341 |
|
3342 | |
3343 |
|
3344 |
|
3345 |
|
3346 |
|
3347 |
|
3348 |
|
3349 |
|
3350 |
|
3351 |
|
3352 |
|
3353 |
|
3354 |
|
3355 |
|
3356 | function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
3357 | var objIsArr = isArray(object),
|
3358 | othIsArr = isArray(other),
|
3359 | objTag = objIsArr ? arrayTag : getTag(object),
|
3360 | othTag = othIsArr ? arrayTag : getTag(other);
|
3361 |
|
3362 | objTag = objTag == argsTag ? objectTag : objTag;
|
3363 | othTag = othTag == argsTag ? objectTag : othTag;
|
3364 |
|
3365 | var objIsObj = objTag == objectTag,
|
3366 | othIsObj = othTag == objectTag,
|
3367 | isSameTag = objTag == othTag;
|
3368 |
|
3369 | if (isSameTag && isBuffer(object)) {
|
3370 | if (!isBuffer(other)) {
|
3371 | return false;
|
3372 | }
|
3373 | objIsArr = true;
|
3374 | objIsObj = false;
|
3375 | }
|
3376 | if (isSameTag && !objIsObj) {
|
3377 | stack || (stack = new Stack);
|
3378 | return (objIsArr || isTypedArray(object))
|
3379 | ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
3380 | : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
3381 | }
|
3382 | if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
3383 | var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
3384 | othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
3385 |
|
3386 | if (objIsWrapped || othIsWrapped) {
|
3387 | var objUnwrapped = objIsWrapped ? object.value() : object,
|
3388 | othUnwrapped = othIsWrapped ? other.value() : other;
|
3389 |
|
3390 | stack || (stack = new Stack);
|
3391 | return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
3392 | }
|
3393 | }
|
3394 | if (!isSameTag) {
|
3395 | return false;
|
3396 | }
|
3397 | stack || (stack = new Stack);
|
3398 | return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
3399 | }
|
3400 |
|
3401 | |
3402 |
|
3403 |
|
3404 |
|
3405 |
|
3406 |
|
3407 |
|
3408 | function baseIsMap(value) {
|
3409 | return isObjectLike(value) && getTag(value) == mapTag;
|
3410 | }
|
3411 |
|
3412 | |
3413 |
|
3414 |
|
3415 |
|
3416 |
|
3417 |
|
3418 |
|
3419 |
|
3420 |
|
3421 |
|
3422 | function baseIsMatch(object, source, matchData, customizer) {
|
3423 | var index = matchData.length,
|
3424 | length = index,
|
3425 | noCustomizer = !customizer;
|
3426 |
|
3427 | if (object == null) {
|
3428 | return !length;
|
3429 | }
|
3430 | object = Object(object);
|
3431 | while (index--) {
|
3432 | var data = matchData[index];
|
3433 | if ((noCustomizer && data[2])
|
3434 | ? data[1] !== object[data[0]]
|
3435 | : !(data[0] in object)
|
3436 | ) {
|
3437 | return false;
|
3438 | }
|
3439 | }
|
3440 | while (++index < length) {
|
3441 | data = matchData[index];
|
3442 | var key = data[0],
|
3443 | objValue = object[key],
|
3444 | srcValue = data[1];
|
3445 |
|
3446 | if (noCustomizer && data[2]) {
|
3447 | if (objValue === undefined && !(key in object)) {
|
3448 | return false;
|
3449 | }
|
3450 | } else {
|
3451 | var stack = new Stack;
|
3452 | if (customizer) {
|
3453 | var result = customizer(objValue, srcValue, key, object, source, stack);
|
3454 | }
|
3455 | if (!(result === undefined
|
3456 | ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
3457 | : result
|
3458 | )) {
|
3459 | return false;
|
3460 | }
|
3461 | }
|
3462 | }
|
3463 | return true;
|
3464 | }
|
3465 |
|
3466 | |
3467 |
|
3468 |
|
3469 |
|
3470 |
|
3471 |
|
3472 |
|
3473 |
|
3474 | function baseIsNative(value) {
|
3475 | if (!isObject(value) || isMasked(value)) {
|
3476 | return false;
|
3477 | }
|
3478 | var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
3479 | return pattern.test(toSource(value));
|
3480 | }
|
3481 |
|
3482 | |
3483 |
|
3484 |
|
3485 |
|
3486 |
|
3487 |
|
3488 |
|
3489 | function baseIsRegExp(value) {
|
3490 | return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
3491 | }
|
3492 |
|
3493 | |
3494 |
|
3495 |
|
3496 |
|
3497 |
|
3498 |
|
3499 |
|
3500 | function baseIsSet(value) {
|
3501 | return isObjectLike(value) && getTag(value) == setTag;
|
3502 | }
|
3503 |
|
3504 | |
3505 |
|
3506 |
|
3507 |
|
3508 |
|
3509 |
|
3510 |
|
3511 | function baseIsTypedArray(value) {
|
3512 | return isObjectLike(value) &&
|
3513 | isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
3514 | }
|
3515 |
|
3516 | |
3517 |
|
3518 |
|
3519 |
|
3520 |
|
3521 |
|
3522 |
|
3523 | function baseIteratee(value) {
|
3524 |
|
3525 |
|
3526 | if (typeof value == 'function') {
|
3527 | return value;
|
3528 | }
|
3529 | if (value == null) {
|
3530 | return identity;
|
3531 | }
|
3532 | if (typeof value == 'object') {
|
3533 | return isArray(value)
|
3534 | ? baseMatchesProperty(value[0], value[1])
|
3535 | : baseMatches(value);
|
3536 | }
|
3537 | return property(value);
|
3538 | }
|
3539 |
|
3540 | |
3541 |
|
3542 |
|
3543 |
|
3544 |
|
3545 |
|
3546 |
|
3547 | function baseKeys(object) {
|
3548 | if (!isPrototype(object)) {
|
3549 | return nativeKeys(object);
|
3550 | }
|
3551 | var result = [];
|
3552 | for (var key in Object(object)) {
|
3553 | if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
3554 | result.push(key);
|
3555 | }
|
3556 | }
|
3557 | return result;
|
3558 | }
|
3559 |
|
3560 | |
3561 |
|
3562 |
|
3563 |
|
3564 |
|
3565 |
|
3566 |
|
3567 | function baseKeysIn(object) {
|
3568 | if (!isObject(object)) {
|
3569 | return nativeKeysIn(object);
|
3570 | }
|
3571 | var isProto = isPrototype(object),
|
3572 | result = [];
|
3573 |
|
3574 | for (var key in object) {
|
3575 | if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
|
3576 | result.push(key);
|
3577 | }
|
3578 | }
|
3579 | return result;
|
3580 | }
|
3581 |
|
3582 | |
3583 |
|
3584 |
|
3585 |
|
3586 |
|
3587 |
|
3588 |
|
3589 |
|
3590 |
|
3591 | function baseLt(value, other) {
|
3592 | return value < other;
|
3593 | }
|
3594 |
|
3595 | |
3596 |
|
3597 |
|
3598 |
|
3599 |
|
3600 |
|
3601 |
|
3602 |
|
3603 | function baseMap(collection, iteratee) {
|
3604 | var index = -1,
|
3605 | result = isArrayLike(collection) ? Array(collection.length) : [];
|
3606 |
|
3607 | baseEach(collection, function(value, key, collection) {
|
3608 | result[++index] = iteratee(value, key, collection);
|
3609 | });
|
3610 | return result;
|
3611 | }
|
3612 |
|
3613 | |
3614 |
|
3615 |
|
3616 |
|
3617 |
|
3618 |
|
3619 |
|
3620 | function baseMatches(source) {
|
3621 | var matchData = getMatchData(source);
|
3622 | if (matchData.length == 1 && matchData[0][2]) {
|
3623 | return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
3624 | }
|
3625 | return function(object) {
|
3626 | return object === source || baseIsMatch(object, source, matchData);
|
3627 | };
|
3628 | }
|
3629 |
|
3630 | |
3631 |
|
3632 |
|
3633 |
|
3634 |
|
3635 |
|
3636 |
|
3637 |
|
3638 | function baseMatchesProperty(path, srcValue) {
|
3639 | if (isKey(path) && isStrictComparable(srcValue)) {
|
3640 | return matchesStrictComparable(toKey(path), srcValue);
|
3641 | }
|
3642 | return function(object) {
|
3643 | var objValue = get(object, path);
|
3644 | return (objValue === undefined && objValue === srcValue)
|
3645 | ? hasIn(object, path)
|
3646 | : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
3647 | };
|
3648 | }
|
3649 |
|
3650 | /**
|
3651 | * The base implementation of `_.merge` without support for multiple sources.
|
3652 | *
|
3653 | * @private
|
3654 | * @param {Object} object The destination object.
|
3655 | * @param {Object} source The source object.
|
3656 | * @param {number} srcIndex The index of `source`.
|
3657 | * @param {Function} [customizer] The function to customize merged values.
|
3658 | * @param {Object} [stack] Tracks traversed source values and their merged
|
3659 | * counterparts.
|
3660 | */
|
3661 | function baseMerge(object, source, srcIndex, customizer, stack) {
|
3662 | if (object === source) {
|
3663 | return;
|
3664 | }
|
3665 | baseFor(source, function(srcValue, key) {
|
3666 | stack || (stack = new Stack);
|
3667 | if (isObject(srcValue)) {
|
3668 | baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
3669 | }
|
3670 | else {
|
3671 | var newValue = customizer
|
3672 | ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
|
3673 | : undefined;
|
3674 |
|
3675 | if (newValue === undefined) {
|
3676 | newValue = srcValue;
|
3677 | }
|
3678 | assignMergeValue(object, key, newValue);
|
3679 | }
|
3680 | }, keysIn);
|
3681 | }
|
3682 |
|
3683 | |
3684 |
|
3685 |
|
3686 |
|
3687 |
|
3688 |
|
3689 |
|
3690 |
|
3691 |
|
3692 |
|
3693 |
|
3694 |
|
3695 |
|
3696 |
|
3697 |
|
3698 | function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
3699 | var objValue = safeGet(object, key),
|
3700 | srcValue = safeGet(source, key),
|
3701 | stacked = stack.get(srcValue);
|
3702 |
|
3703 | if (stacked) {
|
3704 | assignMergeValue(object, key, stacked);
|
3705 | return;
|
3706 | }
|
3707 | var newValue = customizer
|
3708 | ? customizer(objValue, srcValue, (key + ''), object, source, stack)
|
3709 | : undefined;
|
3710 |
|
3711 | var isCommon = newValue === undefined;
|
3712 |
|
3713 | if (isCommon) {
|
3714 | var isArr = isArray(srcValue),
|
3715 | isBuff = !isArr && isBuffer(srcValue),
|
3716 | isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
3717 |
|
3718 | newValue = srcValue;
|
3719 | if (isArr || isBuff || isTyped) {
|
3720 | if (isArray(objValue)) {
|
3721 | newValue = objValue;
|
3722 | }
|
3723 | else if (isArrayLikeObject(objValue)) {
|
3724 | newValue = copyArray(objValue);
|
3725 | }
|
3726 | else if (isBuff) {
|
3727 | isCommon = false;
|
3728 | newValue = cloneBuffer(srcValue, true);
|
3729 | }
|
3730 | else if (isTyped) {
|
3731 | isCommon = false;
|
3732 | newValue = cloneTypedArray(srcValue, true);
|
3733 | }
|
3734 | else {
|
3735 | newValue = [];
|
3736 | }
|
3737 | }
|
3738 | else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
3739 | newValue = objValue;
|
3740 | if (isArguments(objValue)) {
|
3741 | newValue = toPlainObject(objValue);
|
3742 | }
|
3743 | else if (!isObject(objValue) || isFunction(objValue)) {
|
3744 | newValue = initCloneObject(srcValue);
|
3745 | }
|
3746 | }
|
3747 | else {
|
3748 | isCommon = false;
|
3749 | }
|
3750 | }
|
3751 | if (isCommon) {
|
3752 |
|
3753 | stack.set(srcValue, newValue);
|
3754 | mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
3755 | stack['delete'](srcValue);
|
3756 | }
|
3757 | assignMergeValue(object, key, newValue);
|
3758 | }
|
3759 |
|
3760 | |
3761 |
|
3762 |
|
3763 |
|
3764 |
|
3765 |
|
3766 |
|
3767 |
|
3768 | function baseNth(array, n) {
|
3769 | var length = array.length;
|
3770 | if (!length) {
|
3771 | return;
|
3772 | }
|
3773 | n += n < 0 ? length : 0;
|
3774 | return isIndex(n, length) ? array[n] : undefined;
|
3775 | }
|
3776 |
|
3777 | |
3778 |
|
3779 |
|
3780 |
|
3781 |
|
3782 |
|
3783 |
|
3784 |
|
3785 |
|
3786 | function baseOrderBy(collection, iteratees, orders) {
|
3787 | var index = -1;
|
3788 | iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
|
3789 |
|
3790 | var result = baseMap(collection, function(value, key, collection) {
|
3791 | var criteria = arrayMap(iteratees, function(iteratee) {
|
3792 | return iteratee(value);
|
3793 | });
|
3794 | return { 'criteria': criteria, 'index': ++index, 'value': value };
|
3795 | });
|
3796 |
|
3797 | return baseSortBy(result, function(object, other) {
|
3798 | return compareMultiple(object, other, orders);
|
3799 | });
|
3800 | }
|
3801 |
|
3802 | |
3803 |
|
3804 |
|
3805 |
|
3806 |
|
3807 |
|
3808 |
|
3809 |
|
3810 |
|
3811 | function basePick(object, paths) {
|
3812 | return basePickBy(object, paths, function(value, path) {
|
3813 | return hasIn(object, path);
|
3814 | });
|
3815 | }
|
3816 |
|
3817 | |
3818 |
|
3819 |
|
3820 |
|
3821 |
|
3822 |
|
3823 |
|
3824 |
|
3825 |
|
3826 | function basePickBy(object, paths, predicate) {
|
3827 | var index = -1,
|
3828 | length = paths.length,
|
3829 | result = {};
|
3830 |
|
3831 | while (++index < length) {
|
3832 | var path = paths[index],
|
3833 | value = baseGet(object, path);
|
3834 |
|
3835 | if (predicate(value, path)) {
|
3836 | baseSet(result, castPath(path, object), value);
|
3837 | }
|
3838 | }
|
3839 | return result;
|
3840 | }
|
3841 |
|
3842 | |
3843 |
|
3844 |
|
3845 |
|
3846 |
|
3847 |
|
3848 |
|
3849 | function basePropertyDeep(path) {
|
3850 | return function(object) {
|
3851 | return baseGet(object, path);
|
3852 | };
|
3853 | }
|
3854 |
|
3855 | |
3856 |
|
3857 |
|
3858 |
|
3859 |
|
3860 |
|
3861 |
|
3862 |
|
3863 |
|
3864 |
|
3865 |
|
3866 | function basePullAll(array, values, iteratee, comparator) {
|
3867 | var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
|
3868 | index = -1,
|
3869 | length = values.length,
|
3870 | seen = array;
|
3871 |
|
3872 | if (array === values) {
|
3873 | values = copyArray(values);
|
3874 | }
|
3875 | if (iteratee) {
|
3876 | seen = arrayMap(array, baseUnary(iteratee));
|
3877 | }
|
3878 | while (++index < length) {
|
3879 | var fromIndex = 0,
|
3880 | value = values[index],
|
3881 | computed = iteratee ? iteratee(value) : value;
|
3882 |
|
3883 | while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
|
3884 | if (seen !== array) {
|
3885 | splice.call(seen, fromIndex, 1);
|
3886 | }
|
3887 | splice.call(array, fromIndex, 1);
|
3888 | }
|
3889 | }
|
3890 | return array;
|
3891 | }
|
3892 |
|
3893 | |
3894 |
|
3895 |
|
3896 |
|
3897 |
|
3898 |
|
3899 |
|
3900 |
|
3901 |
|
3902 | function basePullAt(array, indexes) {
|
3903 | var length = array ? indexes.length : 0,
|
3904 | lastIndex = length - 1;
|
3905 |
|
3906 | while (length--) {
|
3907 | var index = indexes[length];
|
3908 | if (length == lastIndex || index !== previous) {
|
3909 | var previous = index;
|
3910 | if (isIndex(index)) {
|
3911 | splice.call(array, index, 1);
|
3912 | } else {
|
3913 | baseUnset(array, index);
|
3914 | }
|
3915 | }
|
3916 | }
|
3917 | return array;
|
3918 | }
|
3919 |
|
3920 | |
3921 |
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 |
|
3927 |
|
3928 |
|
3929 | function baseRandom(lower, upper) {
|
3930 | return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
|
3931 | }
|
3932 |
|
3933 | |
3934 |
|
3935 |
|
3936 |
|
3937 |
|
3938 |
|
3939 |
|
3940 |
|
3941 |
|
3942 |
|
3943 |
|
3944 | function baseRange(start, end, step, fromRight) {
|
3945 | var index = -1,
|
3946 | length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
|
3947 | result = Array(length);
|
3948 |
|
3949 | while (length--) {
|
3950 | result[fromRight ? length : ++index] = start;
|
3951 | start += step;
|
3952 | }
|
3953 | return result;
|
3954 | }
|
3955 |
|
3956 | |
3957 |
|
3958 |
|
3959 |
|
3960 |
|
3961 |
|
3962 |
|
3963 |
|
3964 | function baseRepeat(string, n) {
|
3965 | var result = '';
|
3966 | if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
|
3967 | return result;
|
3968 | }
|
3969 |
|
3970 |
|
3971 | do {
|
3972 | if (n % 2) {
|
3973 | result += string;
|
3974 | }
|
3975 | n = nativeFloor(n / 2);
|
3976 | if (n) {
|
3977 | string += string;
|
3978 | }
|
3979 | } while (n);
|
3980 |
|
3981 | return result;
|
3982 | }
|
3983 |
|
3984 | |
3985 |
|
3986 |
|
3987 |
|
3988 |
|
3989 |
|
3990 |
|
3991 |
|
3992 | function baseRest(func, start) {
|
3993 | return setToString(overRest(func, start, identity), func + '');
|
3994 | }
|
3995 |
|
3996 | |
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 | function baseSample(collection) {
|
4004 | return arraySample(values(collection));
|
4005 | }
|
4006 |
|
4007 | |
4008 |
|
4009 |
|
4010 |
|
4011 |
|
4012 |
|
4013 |
|
4014 |
|
4015 | function baseSampleSize(collection, n) {
|
4016 | var array = values(collection);
|
4017 | return shuffleSelf(array, baseClamp(n, 0, array.length));
|
4018 | }
|
4019 |
|
4020 | |
4021 |
|
4022 |
|
4023 |
|
4024 |
|
4025 |
|
4026 |
|
4027 |
|
4028 |
|
4029 |
|
4030 | function baseSet(object, path, value, customizer) {
|
4031 | if (!isObject(object)) {
|
4032 | return object;
|
4033 | }
|
4034 | path = castPath(path, object);
|
4035 |
|
4036 | var index = -1,
|
4037 | length = path.length,
|
4038 | lastIndex = length - 1,
|
4039 | nested = object;
|
4040 |
|
4041 | while (nested != null && ++index < length) {
|
4042 | var key = toKey(path[index]),
|
4043 | newValue = value;
|
4044 |
|
4045 | if (index != lastIndex) {
|
4046 | var objValue = nested[key];
|
4047 | newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
4048 | if (newValue === undefined) {
|
4049 | newValue = isObject(objValue)
|
4050 | ? objValue
|
4051 | : (isIndex(path[index + 1]) ? [] : {});
|
4052 | }
|
4053 | }
|
4054 | assignValue(nested, key, newValue);
|
4055 | nested = nested[key];
|
4056 | }
|
4057 | return object;
|
4058 | }
|
4059 |
|
4060 | |
4061 |
|
4062 |
|
4063 |
|
4064 |
|
4065 |
|
4066 |
|
4067 |
|
4068 | var baseSetData = !metaMap ? identity : function(func, data) {
|
4069 | metaMap.set(func, data);
|
4070 | return func;
|
4071 | };
|
4072 |
|
4073 | |
4074 |
|
4075 |
|
4076 |
|
4077 |
|
4078 |
|
4079 |
|
4080 |
|
4081 | var baseSetToString = !defineProperty ? identity : function(func, string) {
|
4082 | return defineProperty(func, 'toString', {
|
4083 | 'configurable': true,
|
4084 | 'enumerable': false,
|
4085 | 'value': constant(string),
|
4086 | 'writable': true
|
4087 | });
|
4088 | };
|
4089 |
|
4090 | |
4091 |
|
4092 |
|
4093 |
|
4094 |
|
4095 |
|
4096 |
|
4097 | function baseShuffle(collection) {
|
4098 | return shuffleSelf(values(collection));
|
4099 | }
|
4100 |
|
4101 | |
4102 |
|
4103 |
|
4104 |
|
4105 |
|
4106 |
|
4107 |
|
4108 |
|
4109 |
|
4110 | function baseSlice(array, start, end) {
|
4111 | var index = -1,
|
4112 | length = array.length;
|
4113 |
|
4114 | if (start < 0) {
|
4115 | start = -start > length ? 0 : (length + start);
|
4116 | }
|
4117 | end = end > length ? length : end;
|
4118 | if (end < 0) {
|
4119 | end += length;
|
4120 | }
|
4121 | length = start > end ? 0 : ((end - start) >>> 0);
|
4122 | start >>>= 0;
|
4123 |
|
4124 | var result = Array(length);
|
4125 | while (++index < length) {
|
4126 | result[index] = array[index + start];
|
4127 | }
|
4128 | return result;
|
4129 | }
|
4130 |
|
4131 | |
4132 |
|
4133 |
|
4134 |
|
4135 |
|
4136 |
|
4137 |
|
4138 |
|
4139 |
|
4140 | function baseSome(collection, predicate) {
|
4141 | var result;
|
4142 |
|
4143 | baseEach(collection, function(value, index, collection) {
|
4144 | result = predicate(value, index, collection);
|
4145 | return !result;
|
4146 | });
|
4147 | return !!result;
|
4148 | }
|
4149 |
|
4150 | |
4151 |
|
4152 |
|
4153 |
|
4154 |
|
4155 |
|
4156 |
|
4157 |
|
4158 |
|
4159 |
|
4160 |
|
4161 |
|
4162 | function baseSortedIndex(array, value, retHighest) {
|
4163 | var low = 0,
|
4164 | high = array == null ? low : array.length;
|
4165 |
|
4166 | if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
|
4167 | while (low < high) {
|
4168 | var mid = (low + high) >>> 1,
|
4169 | computed = array[mid];
|
4170 |
|
4171 | if (computed !== null && !isSymbol(computed) &&
|
4172 | (retHighest ? (computed <= value) : (computed < value))) {
|
4173 | low = mid + 1;
|
4174 | } else {
|
4175 | high = mid;
|
4176 | }
|
4177 | }
|
4178 | return high;
|
4179 | }
|
4180 | return baseSortedIndexBy(array, value, identity, retHighest);
|
4181 | }
|
4182 |
|
4183 | |
4184 |
|
4185 |
|
4186 |
|
4187 |
|
4188 |
|
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 |
|
4194 |
|
4195 |
|
4196 | function baseSortedIndexBy(array, value, iteratee, retHighest) {
|
4197 | value = iteratee(value);
|
4198 |
|
4199 | var low = 0,
|
4200 | high = array == null ? 0 : array.length,
|
4201 | valIsNaN = value !== value,
|
4202 | valIsNull = value === null,
|
4203 | valIsSymbol = isSymbol(value),
|
4204 | valIsUndefined = value === undefined;
|
4205 |
|
4206 | while (low < high) {
|
4207 | var mid = nativeFloor((low + high) / 2),
|
4208 | computed = iteratee(array[mid]),
|
4209 | othIsDefined = computed !== undefined,
|
4210 | othIsNull = computed === null,
|
4211 | othIsReflexive = computed === computed,
|
4212 | othIsSymbol = isSymbol(computed);
|
4213 |
|
4214 | if (valIsNaN) {
|
4215 | var setLow = retHighest || othIsReflexive;
|
4216 | } else if (valIsUndefined) {
|
4217 | setLow = othIsReflexive && (retHighest || othIsDefined);
|
4218 | } else if (valIsNull) {
|
4219 | setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
|
4220 | } else if (valIsSymbol) {
|
4221 | setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
|
4222 | } else if (othIsNull || othIsSymbol) {
|
4223 | setLow = false;
|
4224 | } else {
|
4225 | setLow = retHighest ? (computed <= value) : (computed < value);
|
4226 | }
|
4227 | if (setLow) {
|
4228 | low = mid + 1;
|
4229 | } else {
|
4230 | high = mid;
|
4231 | }
|
4232 | }
|
4233 | return nativeMin(high, MAX_ARRAY_INDEX);
|
4234 | }
|
4235 |
|
4236 | |
4237 |
|
4238 |
|
4239 |
|
4240 |
|
4241 |
|
4242 |
|
4243 |
|
4244 |
|
4245 | function baseSortedUniq(array, iteratee) {
|
4246 | var index = -1,
|
4247 | length = array.length,
|
4248 | resIndex = 0,
|
4249 | result = [];
|
4250 |
|
4251 | while (++index < length) {
|
4252 | var value = array[index],
|
4253 | computed = iteratee ? iteratee(value) : value;
|
4254 |
|
4255 | if (!index || !eq(computed, seen)) {
|
4256 | var seen = computed;
|
4257 | result[resIndex++] = value === 0 ? 0 : value;
|
4258 | }
|
4259 | }
|
4260 | return result;
|
4261 | }
|
4262 |
|
4263 | |
4264 |
|
4265 |
|
4266 |
|
4267 |
|
4268 |
|
4269 |
|
4270 |
|
4271 | function baseToNumber(value) {
|
4272 | if (typeof value == 'number') {
|
4273 | return value;
|
4274 | }
|
4275 | if (isSymbol(value)) {
|
4276 | return NAN;
|
4277 | }
|
4278 | return +value;
|
4279 | }
|
4280 |
|
4281 | |
4282 |
|
4283 |
|
4284 |
|
4285 |
|
4286 |
|
4287 |
|
4288 |
|
4289 | function baseToString(value) {
|
4290 |
|
4291 | if (typeof value == 'string') {
|
4292 | return value;
|
4293 | }
|
4294 | if (isArray(value)) {
|
4295 |
|
4296 | return arrayMap(value, baseToString) + '';
|
4297 | }
|
4298 | if (isSymbol(value)) {
|
4299 | return symbolToString ? symbolToString.call(value) : '';
|
4300 | }
|
4301 | var result = (value + '');
|
4302 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
4303 | }
|
4304 |
|
4305 | |
4306 |
|
4307 |
|
4308 |
|
4309 |
|
4310 |
|
4311 |
|
4312 |
|
4313 |
|
4314 | function baseUniq(array, iteratee, comparator) {
|
4315 | var index = -1,
|
4316 | includes = arrayIncludes,
|
4317 | length = array.length,
|
4318 | isCommon = true,
|
4319 | result = [],
|
4320 | seen = result;
|
4321 |
|
4322 | if (comparator) {
|
4323 | isCommon = false;
|
4324 | includes = arrayIncludesWith;
|
4325 | }
|
4326 | else if (length >= LARGE_ARRAY_SIZE) {
|
4327 | var set = iteratee ? null : createSet(array);
|
4328 | if (set) {
|
4329 | return setToArray(set);
|
4330 | }
|
4331 | isCommon = false;
|
4332 | includes = cacheHas;
|
4333 | seen = new SetCache;
|
4334 | }
|
4335 | else {
|
4336 | seen = iteratee ? [] : result;
|
4337 | }
|
4338 | outer:
|
4339 | while (++index < length) {
|
4340 | var value = array[index],
|
4341 | computed = iteratee ? iteratee(value) : value;
|
4342 |
|
4343 | value = (comparator || value !== 0) ? value : 0;
|
4344 | if (isCommon && computed === computed) {
|
4345 | var seenIndex = seen.length;
|
4346 | while (seenIndex--) {
|
4347 | if (seen[seenIndex] === computed) {
|
4348 | continue outer;
|
4349 | }
|
4350 | }
|
4351 | if (iteratee) {
|
4352 | seen.push(computed);
|
4353 | }
|
4354 | result.push(value);
|
4355 | }
|
4356 | else if (!includes(seen, computed, comparator)) {
|
4357 | if (seen !== result) {
|
4358 | seen.push(computed);
|
4359 | }
|
4360 | result.push(value);
|
4361 | }
|
4362 | }
|
4363 | return result;
|
4364 | }
|
4365 |
|
4366 | |
4367 |
|
4368 |
|
4369 |
|
4370 |
|
4371 |
|
4372 |
|
4373 |
|
4374 | function baseUnset(object, path) {
|
4375 | path = castPath(path, object);
|
4376 | object = parent(object, path);
|
4377 | return object == null || delete object[toKey(last(path))];
|
4378 | }
|
4379 |
|
4380 | |
4381 |
|
4382 |
|
4383 |
|
4384 |
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 |
|
4390 | function baseUpdate(object, path, updater, customizer) {
|
4391 | return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
4392 | }
|
4393 |
|
4394 | |
4395 |
|
4396 |
|
4397 |
|
4398 |
|
4399 |
|
4400 |
|
4401 |
|
4402 |
|
4403 |
|
4404 |
|
4405 | function baseWhile(array, predicate, isDrop, fromRight) {
|
4406 | var length = array.length,
|
4407 | index = fromRight ? length : -1;
|
4408 |
|
4409 | while ((fromRight ? index-- : ++index < length) &&
|
4410 | predicate(array[index], index, array)) {}
|
4411 |
|
4412 | return isDrop
|
4413 | ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
|
4414 | : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
|
4415 | }
|
4416 |
|
4417 | |
4418 |
|
4419 |
|
4420 |
|
4421 |
|
4422 |
|
4423 |
|
4424 |
|
4425 |
|
4426 |
|
4427 | function baseWrapperValue(value, actions) {
|
4428 | var result = value;
|
4429 | if (result instanceof LazyWrapper) {
|
4430 | result = result.value();
|
4431 | }
|
4432 | return arrayReduce(actions, function(result, action) {
|
4433 | return action.func.apply(action.thisArg, arrayPush([result], action.args));
|
4434 | }, result);
|
4435 | }
|
4436 |
|
4437 | |
4438 |
|
4439 |
|
4440 |
|
4441 |
|
4442 |
|
4443 |
|
4444 |
|
4445 |
|
4446 |
|
4447 | function baseXor(arrays, iteratee, comparator) {
|
4448 | var length = arrays.length;
|
4449 | if (length < 2) {
|
4450 | return length ? baseUniq(arrays[0]) : [];
|
4451 | }
|
4452 | var index = -1,
|
4453 | result = Array(length);
|
4454 |
|
4455 | while (++index < length) {
|
4456 | var array = arrays[index],
|
4457 | othIndex = -1;
|
4458 |
|
4459 | while (++othIndex < length) {
|
4460 | if (othIndex != index) {
|
4461 | result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
|
4462 | }
|
4463 | }
|
4464 | }
|
4465 | return baseUniq(baseFlatten(result, 1), iteratee, comparator);
|
4466 | }
|
4467 |
|
4468 | |
4469 |
|
4470 |
|
4471 |
|
4472 |
|
4473 |
|
4474 |
|
4475 |
|
4476 |
|
4477 | function baseZipObject(props, values, assignFunc) {
|
4478 | var index = -1,
|
4479 | length = props.length,
|
4480 | valsLength = values.length,
|
4481 | result = {};
|
4482 |
|
4483 | while (++index < length) {
|
4484 | var value = index < valsLength ? values[index] : undefined;
|
4485 | assignFunc(result, props[index], value);
|
4486 | }
|
4487 | return result;
|
4488 | }
|
4489 |
|
4490 | |
4491 |
|
4492 |
|
4493 |
|
4494 |
|
4495 |
|
4496 |
|
4497 | function castArrayLikeObject(value) {
|
4498 | return isArrayLikeObject(value) ? value : [];
|
4499 | }
|
4500 |
|
4501 | |
4502 |
|
4503 |
|
4504 |
|
4505 |
|
4506 |
|
4507 |
|
4508 | function castFunction(value) {
|
4509 | return typeof value == 'function' ? value : identity;
|
4510 | }
|
4511 |
|
4512 | |
4513 |
|
4514 |
|
4515 |
|
4516 |
|
4517 |
|
4518 |
|
4519 |
|
4520 | function castPath(value, object) {
|
4521 | if (isArray(value)) {
|
4522 | return value;
|
4523 | }
|
4524 | return isKey(value, object) ? [value] : stringToPath(toString(value));
|
4525 | }
|
4526 |
|
4527 | |
4528 |
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 |
|
4534 |
|
4535 |
|
4536 | var castRest = baseRest;
|
4537 |
|
4538 | |
4539 |
|
4540 |
|
4541 |
|
4542 |
|
4543 |
|
4544 |
|
4545 |
|
4546 |
|
4547 | function castSlice(array, start, end) {
|
4548 | var length = array.length;
|
4549 | end = end === undefined ? length : end;
|
4550 | return (!start && end >= length) ? array : baseSlice(array, start, end);
|
4551 | }
|
4552 |
|
4553 | |
4554 |
|
4555 |
|
4556 |
|
4557 |
|
4558 |
|
4559 | var clearTimeout = ctxClearTimeout || function(id) {
|
4560 | return root.clearTimeout(id);
|
4561 | };
|
4562 |
|
4563 | |
4564 |
|
4565 |
|
4566 |
|
4567 |
|
4568 |
|
4569 |
|
4570 |
|
4571 | function cloneBuffer(buffer, isDeep) {
|
4572 | if (isDeep) {
|
4573 | return buffer.slice();
|
4574 | }
|
4575 | var length = buffer.length,
|
4576 | result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
4577 |
|
4578 | buffer.copy(result);
|
4579 | return result;
|
4580 | }
|
4581 |
|
4582 | |
4583 |
|
4584 |
|
4585 |
|
4586 |
|
4587 |
|
4588 |
|
4589 | function cloneArrayBuffer(arrayBuffer) {
|
4590 | var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
4591 | new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
4592 | return result;
|
4593 | }
|
4594 |
|
4595 | |
4596 |
|
4597 |
|
4598 |
|
4599 |
|
4600 |
|
4601 |
|
4602 |
|
4603 | function cloneDataView(dataView, isDeep) {
|
4604 | var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
4605 | return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
4606 | }
|
4607 |
|
4608 | |
4609 |
|
4610 |
|
4611 |
|
4612 |
|
4613 |
|
4614 |
|
4615 | function cloneRegExp(regexp) {
|
4616 | var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
4617 | result.lastIndex = regexp.lastIndex;
|
4618 | return result;
|
4619 | }
|
4620 |
|
4621 | |
4622 |
|
4623 |
|
4624 |
|
4625 |
|
4626 |
|
4627 |
|
4628 | function cloneSymbol(symbol) {
|
4629 | return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
4630 | }
|
4631 |
|
4632 | |
4633 |
|
4634 |
|
4635 |
|
4636 |
|
4637 |
|
4638 |
|
4639 |
|
4640 | function cloneTypedArray(typedArray, isDeep) {
|
4641 | var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
4642 | return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
4643 | }
|
4644 |
|
4645 | |
4646 |
|
4647 |
|
4648 |
|
4649 |
|
4650 |
|
4651 |
|
4652 |
|
4653 | function compareAscending(value, other) {
|
4654 | if (value !== other) {
|
4655 | var valIsDefined = value !== undefined,
|
4656 | valIsNull = value === null,
|
4657 | valIsReflexive = value === value,
|
4658 | valIsSymbol = isSymbol(value);
|
4659 |
|
4660 | var othIsDefined = other !== undefined,
|
4661 | othIsNull = other === null,
|
4662 | othIsReflexive = other === other,
|
4663 | othIsSymbol = isSymbol(other);
|
4664 |
|
4665 | if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
|
4666 | (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
|
4667 | (valIsNull && othIsDefined && othIsReflexive) ||
|
4668 | (!valIsDefined && othIsReflexive) ||
|
4669 | !valIsReflexive) {
|
4670 | return 1;
|
4671 | }
|
4672 | if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
|
4673 | (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
|
4674 | (othIsNull && valIsDefined && valIsReflexive) ||
|
4675 | (!othIsDefined && valIsReflexive) ||
|
4676 | !othIsReflexive) {
|
4677 | return -1;
|
4678 | }
|
4679 | }
|
4680 | return 0;
|
4681 | }
|
4682 |
|
4683 | |
4684 |
|
4685 |
|
4686 |
|
4687 |
|
4688 |
|
4689 |
|
4690 |
|
4691 |
|
4692 |
|
4693 |
|
4694 |
|
4695 |
|
4696 |
|
4697 | function compareMultiple(object, other, orders) {
|
4698 | var index = -1,
|
4699 | objCriteria = object.criteria,
|
4700 | othCriteria = other.criteria,
|
4701 | length = objCriteria.length,
|
4702 | ordersLength = orders.length;
|
4703 |
|
4704 | while (++index < length) {
|
4705 | var result = compareAscending(objCriteria[index], othCriteria[index]);
|
4706 | if (result) {
|
4707 | if (index >= ordersLength) {
|
4708 | return result;
|
4709 | }
|
4710 | var order = orders[index];
|
4711 | return result * (order == 'desc' ? -1 : 1);
|
4712 | }
|
4713 | }
|
4714 |
|
4715 |
|
4716 |
|
4717 |
|
4718 |
|
4719 |
|
4720 |
|
4721 | return object.index - other.index;
|
4722 | }
|
4723 |
|
4724 | |
4725 |
|
4726 |
|
4727 |
|
4728 |
|
4729 |
|
4730 |
|
4731 |
|
4732 |
|
4733 |
|
4734 |
|
4735 | function composeArgs(args, partials, holders, isCurried) {
|
4736 | var argsIndex = -1,
|
4737 | argsLength = args.length,
|
4738 | holdersLength = holders.length,
|
4739 | leftIndex = -1,
|
4740 | leftLength = partials.length,
|
4741 | rangeLength = nativeMax(argsLength - holdersLength, 0),
|
4742 | result = Array(leftLength + rangeLength),
|
4743 | isUncurried = !isCurried;
|
4744 |
|
4745 | while (++leftIndex < leftLength) {
|
4746 | result[leftIndex] = partials[leftIndex];
|
4747 | }
|
4748 | while (++argsIndex < holdersLength) {
|
4749 | if (isUncurried || argsIndex < argsLength) {
|
4750 | result[holders[argsIndex]] = args[argsIndex];
|
4751 | }
|
4752 | }
|
4753 | while (rangeLength--) {
|
4754 | result[leftIndex++] = args[argsIndex++];
|
4755 | }
|
4756 | return result;
|
4757 | }
|
4758 |
|
4759 | |
4760 |
|
4761 |
|
4762 |
|
4763 |
|
4764 |
|
4765 |
|
4766 |
|
4767 |
|
4768 |
|
4769 |
|
4770 | function composeArgsRight(args, partials, holders, isCurried) {
|
4771 | var argsIndex = -1,
|
4772 | argsLength = args.length,
|
4773 | holdersIndex = -1,
|
4774 | holdersLength = holders.length,
|
4775 | rightIndex = -1,
|
4776 | rightLength = partials.length,
|
4777 | rangeLength = nativeMax(argsLength - holdersLength, 0),
|
4778 | result = Array(rangeLength + rightLength),
|
4779 | isUncurried = !isCurried;
|
4780 |
|
4781 | while (++argsIndex < rangeLength) {
|
4782 | result[argsIndex] = args[argsIndex];
|
4783 | }
|
4784 | var offset = argsIndex;
|
4785 | while (++rightIndex < rightLength) {
|
4786 | result[offset + rightIndex] = partials[rightIndex];
|
4787 | }
|
4788 | while (++holdersIndex < holdersLength) {
|
4789 | if (isUncurried || argsIndex < argsLength) {
|
4790 | result[offset + holders[holdersIndex]] = args[argsIndex++];
|
4791 | }
|
4792 | }
|
4793 | return result;
|
4794 | }
|
4795 |
|
4796 | |
4797 |
|
4798 |
|
4799 |
|
4800 |
|
4801 |
|
4802 |
|
4803 |
|
4804 | function copyArray(source, array) {
|
4805 | var index = -1,
|
4806 | length = source.length;
|
4807 |
|
4808 | array || (array = Array(length));
|
4809 | while (++index < length) {
|
4810 | array[index] = source[index];
|
4811 | }
|
4812 | return array;
|
4813 | }
|
4814 |
|
4815 | |
4816 |
|
4817 |
|
4818 |
|
4819 |
|
4820 |
|
4821 |
|
4822 |
|
4823 |
|
4824 |
|
4825 | function copyObject(source, props, object, customizer) {
|
4826 | var isNew = !object;
|
4827 | object || (object = {});
|
4828 |
|
4829 | var index = -1,
|
4830 | length = props.length;
|
4831 |
|
4832 | while (++index < length) {
|
4833 | var key = props[index];
|
4834 |
|
4835 | var newValue = customizer
|
4836 | ? customizer(object[key], source[key], key, object, source)
|
4837 | : undefined;
|
4838 |
|
4839 | if (newValue === undefined) {
|
4840 | newValue = source[key];
|
4841 | }
|
4842 | if (isNew) {
|
4843 | baseAssignValue(object, key, newValue);
|
4844 | } else {
|
4845 | assignValue(object, key, newValue);
|
4846 | }
|
4847 | }
|
4848 | return object;
|
4849 | }
|
4850 |
|
4851 | |
4852 |
|
4853 |
|
4854 |
|
4855 |
|
4856 |
|
4857 |
|
4858 |
|
4859 | function copySymbols(source, object) {
|
4860 | return copyObject(source, getSymbols(source), object);
|
4861 | }
|
4862 |
|
4863 | |
4864 |
|
4865 |
|
4866 |
|
4867 |
|
4868 |
|
4869 |
|
4870 |
|
4871 | function copySymbolsIn(source, object) {
|
4872 | return copyObject(source, getSymbolsIn(source), object);
|
4873 | }
|
4874 |
|
4875 | |
4876 |
|
4877 |
|
4878 |
|
4879 |
|
4880 |
|
4881 |
|
4882 |
|
4883 | function createAggregator(setter, initializer) {
|
4884 | return function(collection, iteratee) {
|
4885 | var func = isArray(collection) ? arrayAggregator : baseAggregator,
|
4886 | accumulator = initializer ? initializer() : {};
|
4887 |
|
4888 | return func(collection, setter, getIteratee(iteratee, 2), accumulator);
|
4889 | };
|
4890 | }
|
4891 |
|
4892 | |
4893 |
|
4894 |
|
4895 |
|
4896 |
|
4897 |
|
4898 |
|
4899 | function createAssigner(assigner) {
|
4900 | return baseRest(function(object, sources) {
|
4901 | var index = -1,
|
4902 | length = sources.length,
|
4903 | customizer = length > 1 ? sources[length - 1] : undefined,
|
4904 | guard = length > 2 ? sources[2] : undefined;
|
4905 |
|
4906 | customizer = (assigner.length > 3 && typeof customizer == 'function')
|
4907 | ? (length--, customizer)
|
4908 | : undefined;
|
4909 |
|
4910 | if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
4911 | customizer = length < 3 ? undefined : customizer;
|
4912 | length = 1;
|
4913 | }
|
4914 | object = Object(object);
|
4915 | while (++index < length) {
|
4916 | var source = sources[index];
|
4917 | if (source) {
|
4918 | assigner(object, source, index, customizer);
|
4919 | }
|
4920 | }
|
4921 | return object;
|
4922 | });
|
4923 | }
|
4924 |
|
4925 | |
4926 |
|
4927 |
|
4928 |
|
4929 |
|
4930 |
|
4931 |
|
4932 |
|
4933 | function createBaseEach(eachFunc, fromRight) {
|
4934 | return function(collection, iteratee) {
|
4935 | if (collection == null) {
|
4936 | return collection;
|
4937 | }
|
4938 | if (!isArrayLike(collection)) {
|
4939 | return eachFunc(collection, iteratee);
|
4940 | }
|
4941 | var length = collection.length,
|
4942 | index = fromRight ? length : -1,
|
4943 | iterable = Object(collection);
|
4944 |
|
4945 | while ((fromRight ? index-- : ++index < length)) {
|
4946 | if (iteratee(iterable[index], index, iterable) === false) {
|
4947 | break;
|
4948 | }
|
4949 | }
|
4950 | return collection;
|
4951 | };
|
4952 | }
|
4953 |
|
4954 | |
4955 |
|
4956 |
|
4957 |
|
4958 |
|
4959 |
|
4960 |
|
4961 | function createBaseFor(fromRight) {
|
4962 | return function(object, iteratee, keysFunc) {
|
4963 | var index = -1,
|
4964 | iterable = Object(object),
|
4965 | props = keysFunc(object),
|
4966 | length = props.length;
|
4967 |
|
4968 | while (length--) {
|
4969 | var key = props[fromRight ? length : ++index];
|
4970 | if (iteratee(iterable[key], key, iterable) === false) {
|
4971 | break;
|
4972 | }
|
4973 | }
|
4974 | return object;
|
4975 | };
|
4976 | }
|
4977 |
|
4978 | |
4979 |
|
4980 |
|
4981 |
|
4982 |
|
4983 |
|
4984 |
|
4985 |
|
4986 |
|
4987 |
|
4988 | function createBind(func, bitmask, thisArg) {
|
4989 | var isBind = bitmask & WRAP_BIND_FLAG,
|
4990 | Ctor = createCtor(func);
|
4991 |
|
4992 | function wrapper() {
|
4993 | var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
4994 | return fn.apply(isBind ? thisArg : this, arguments);
|
4995 | }
|
4996 | return wrapper;
|
4997 | }
|
4998 |
|
4999 | |
5000 |
|
5001 |
|
5002 |
|
5003 |
|
5004 |
|
5005 |
|
5006 | function createCaseFirst(methodName) {
|
5007 | return function(string) {
|
5008 | string = toString(string);
|
5009 |
|
5010 | var strSymbols = hasUnicode(string)
|
5011 | ? stringToArray(string)
|
5012 | : undefined;
|
5013 |
|
5014 | var chr = strSymbols
|
5015 | ? strSymbols[0]
|
5016 | : string.charAt(0);
|
5017 |
|
5018 | var trailing = strSymbols
|
5019 | ? castSlice(strSymbols, 1).join('')
|
5020 | : string.slice(1);
|
5021 |
|
5022 | return chr[methodName]() + trailing;
|
5023 | };
|
5024 | }
|
5025 |
|
5026 | |
5027 |
|
5028 |
|
5029 |
|
5030 |
|
5031 |
|
5032 |
|
5033 | function createCompounder(callback) {
|
5034 | return function(string) {
|
5035 | return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
|
5036 | };
|
5037 | }
|
5038 |
|
5039 | |
5040 |
|
5041 |
|
5042 |
|
5043 |
|
5044 |
|
5045 |
|
5046 |
|
5047 | function createCtor(Ctor) {
|
5048 | return function() {
|
5049 |
|
5050 |
|
5051 |
|
5052 | var args = arguments;
|
5053 | switch (args.length) {
|
5054 | case 0: return new Ctor;
|
5055 | case 1: return new Ctor(args[0]);
|
5056 | case 2: return new Ctor(args[0], args[1]);
|
5057 | case 3: return new Ctor(args[0], args[1], args[2]);
|
5058 | case 4: return new Ctor(args[0], args[1], args[2], args[3]);
|
5059 | case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
5060 | case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
5061 | case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
5062 | }
|
5063 | var thisBinding = baseCreate(Ctor.prototype),
|
5064 | result = Ctor.apply(thisBinding, args);
|
5065 |
|
5066 |
|
5067 |
|
5068 | return isObject(result) ? result : thisBinding;
|
5069 | };
|
5070 | }
|
5071 |
|
5072 | |
5073 |
|
5074 |
|
5075 |
|
5076 |
|
5077 |
|
5078 |
|
5079 |
|
5080 |
|
5081 | function createCurry(func, bitmask, arity) {
|
5082 | var Ctor = createCtor(func);
|
5083 |
|
5084 | function wrapper() {
|
5085 | var length = arguments.length,
|
5086 | args = Array(length),
|
5087 | index = length,
|
5088 | placeholder = getHolder(wrapper);
|
5089 |
|
5090 | while (index--) {
|
5091 | args[index] = arguments[index];
|
5092 | }
|
5093 | var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
|
5094 | ? []
|
5095 | : replaceHolders(args, placeholder);
|
5096 |
|
5097 | length -= holders.length;
|
5098 | if (length < arity) {
|
5099 | return createRecurry(
|
5100 | func, bitmask, createHybrid, wrapper.placeholder, undefined,
|
5101 | args, holders, undefined, undefined, arity - length);
|
5102 | }
|
5103 | var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
5104 | return apply(fn, this, args);
|
5105 | }
|
5106 | return wrapper;
|
5107 | }
|
5108 |
|
5109 | |
5110 |
|
5111 |
|
5112 |
|
5113 |
|
5114 |
|
5115 |
|
5116 | function createFind(findIndexFunc) {
|
5117 | return function(collection, predicate, fromIndex) {
|
5118 | var iterable = Object(collection);
|
5119 | if (!isArrayLike(collection)) {
|
5120 | var iteratee = getIteratee(predicate, 3);
|
5121 | collection = keys(collection);
|
5122 | predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
5123 | }
|
5124 | var index = findIndexFunc(collection, predicate, fromIndex);
|
5125 | return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
5126 | };
|
5127 | }
|
5128 |
|
5129 | |
5130 |
|
5131 |
|
5132 |
|
5133 |
|
5134 |
|
5135 |
|
5136 | function createFlow(fromRight) {
|
5137 | return flatRest(function(funcs) {
|
5138 | var length = funcs.length,
|
5139 | index = length,
|
5140 | prereq = LodashWrapper.prototype.thru;
|
5141 |
|
5142 | if (fromRight) {
|
5143 | funcs.reverse();
|
5144 | }
|
5145 | while (index--) {
|
5146 | var func = funcs[index];
|
5147 | if (typeof func != 'function') {
|
5148 | throw new TypeError(FUNC_ERROR_TEXT);
|
5149 | }
|
5150 | if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
|
5151 | var wrapper = new LodashWrapper([], true);
|
5152 | }
|
5153 | }
|
5154 | index = wrapper ? index : length;
|
5155 | while (++index < length) {
|
5156 | func = funcs[index];
|
5157 |
|
5158 | var funcName = getFuncName(func),
|
5159 | data = funcName == 'wrapper' ? getData(func) : undefined;
|
5160 |
|
5161 | if (data && isLaziable(data[0]) &&
|
5162 | data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
|
5163 | !data[4].length && data[9] == 1
|
5164 | ) {
|
5165 | wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
5166 | } else {
|
5167 | wrapper = (func.length == 1 && isLaziable(func))
|
5168 | ? wrapper[funcName]()
|
5169 | : wrapper.thru(func);
|
5170 | }
|
5171 | }
|
5172 | return function() {
|
5173 | var args = arguments,
|
5174 | value = args[0];
|
5175 |
|
5176 | if (wrapper && args.length == 1 && isArray(value)) {
|
5177 | return wrapper.plant(value).value();
|
5178 | }
|
5179 | var index = 0,
|
5180 | result = length ? funcs[index].apply(this, args) : value;
|
5181 |
|
5182 | while (++index < length) {
|
5183 | result = funcs[index].call(this, result);
|
5184 | }
|
5185 | return result;
|
5186 | };
|
5187 | });
|
5188 | }
|
5189 |
|
5190 | |
5191 |
|
5192 |
|
5193 |
|
5194 |
|
5195 |
|
5196 |
|
5197 |
|
5198 |
|
5199 |
|
5200 |
|
5201 |
|
5202 |
|
5203 |
|
5204 |
|
5205 |
|
5206 |
|
5207 |
|
5208 |
|
5209 | function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
|
5210 | var isAry = bitmask & WRAP_ARY_FLAG,
|
5211 | isBind = bitmask & WRAP_BIND_FLAG,
|
5212 | isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
|
5213 | isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
|
5214 | isFlip = bitmask & WRAP_FLIP_FLAG,
|
5215 | Ctor = isBindKey ? undefined : createCtor(func);
|
5216 |
|
5217 | function wrapper() {
|
5218 | var length = arguments.length,
|
5219 | args = Array(length),
|
5220 | index = length;
|
5221 |
|
5222 | while (index--) {
|
5223 | args[index] = arguments[index];
|
5224 | }
|
5225 | if (isCurried) {
|
5226 | var placeholder = getHolder(wrapper),
|
5227 | holdersCount = countHolders(args, placeholder);
|
5228 | }
|
5229 | if (partials) {
|
5230 | args = composeArgs(args, partials, holders, isCurried);
|
5231 | }
|
5232 | if (partialsRight) {
|
5233 | args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
|
5234 | }
|
5235 | length -= holdersCount;
|
5236 | if (isCurried && length < arity) {
|
5237 | var newHolders = replaceHolders(args, placeholder);
|
5238 | return createRecurry(
|
5239 | func, bitmask, createHybrid, wrapper.placeholder, thisArg,
|
5240 | args, newHolders, argPos, ary, arity - length
|
5241 | );
|
5242 | }
|
5243 | var thisBinding = isBind ? thisArg : this,
|
5244 | fn = isBindKey ? thisBinding[func] : func;
|
5245 |
|
5246 | length = args.length;
|
5247 | if (argPos) {
|
5248 | args = reorder(args, argPos);
|
5249 | } else if (isFlip && length > 1) {
|
5250 | args.reverse();
|
5251 | }
|
5252 | if (isAry && ary < length) {
|
5253 | args.length = ary;
|
5254 | }
|
5255 | if (this && this !== root && this instanceof wrapper) {
|
5256 | fn = Ctor || createCtor(fn);
|
5257 | }
|
5258 | return fn.apply(thisBinding, args);
|
5259 | }
|
5260 | return wrapper;
|
5261 | }
|
5262 |
|
5263 | |
5264 |
|
5265 |
|
5266 |
|
5267 |
|
5268 |
|
5269 |
|
5270 |
|
5271 | function createInverter(setter, toIteratee) {
|
5272 | return function(object, iteratee) {
|
5273 | return baseInverter(object, setter, toIteratee(iteratee), {});
|
5274 | };
|
5275 | }
|
5276 |
|
5277 | |
5278 |
|
5279 |
|
5280 |
|
5281 |
|
5282 |
|
5283 |
|
5284 |
|
5285 | function createMathOperation(operator, defaultValue) {
|
5286 | return function(value, other) {
|
5287 | var result;
|
5288 | if (value === undefined && other === undefined) {
|
5289 | return defaultValue;
|
5290 | }
|
5291 | if (value !== undefined) {
|
5292 | result = value;
|
5293 | }
|
5294 | if (other !== undefined) {
|
5295 | if (result === undefined) {
|
5296 | return other;
|
5297 | }
|
5298 | if (typeof value == 'string' || typeof other == 'string') {
|
5299 | value = baseToString(value);
|
5300 | other = baseToString(other);
|
5301 | } else {
|
5302 | value = baseToNumber(value);
|
5303 | other = baseToNumber(other);
|
5304 | }
|
5305 | result = operator(value, other);
|
5306 | }
|
5307 | return result;
|
5308 | };
|
5309 | }
|
5310 |
|
5311 | |
5312 |
|
5313 |
|
5314 |
|
5315 |
|
5316 |
|
5317 |
|
5318 | function createOver(arrayFunc) {
|
5319 | return flatRest(function(iteratees) {
|
5320 | iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
5321 | return baseRest(function(args) {
|
5322 | var thisArg = this;
|
5323 | return arrayFunc(iteratees, function(iteratee) {
|
5324 | return apply(iteratee, thisArg, args);
|
5325 | });
|
5326 | });
|
5327 | });
|
5328 | }
|
5329 |
|
5330 | |
5331 |
|
5332 |
|
5333 |
|
5334 |
|
5335 |
|
5336 |
|
5337 |
|
5338 |
|
5339 | function createPadding(length, chars) {
|
5340 | chars = chars === undefined ? ' ' : baseToString(chars);
|
5341 |
|
5342 | var charsLength = chars.length;
|
5343 | if (charsLength < 2) {
|
5344 | return charsLength ? baseRepeat(chars, length) : chars;
|
5345 | }
|
5346 | var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
5347 | return hasUnicode(chars)
|
5348 | ? castSlice(stringToArray(result), 0, length).join('')
|
5349 | : result.slice(0, length);
|
5350 | }
|
5351 |
|
5352 | |
5353 |
|
5354 |
|
5355 |
|
5356 |
|
5357 |
|
5358 |
|
5359 |
|
5360 |
|
5361 |
|
5362 |
|
5363 |
|
5364 | function createPartial(func, bitmask, thisArg, partials) {
|
5365 | var isBind = bitmask & WRAP_BIND_FLAG,
|
5366 | Ctor = createCtor(func);
|
5367 |
|
5368 | function wrapper() {
|
5369 | var argsIndex = -1,
|
5370 | argsLength = arguments.length,
|
5371 | leftIndex = -1,
|
5372 | leftLength = partials.length,
|
5373 | args = Array(leftLength + argsLength),
|
5374 | fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
|
5375 |
|
5376 | while (++leftIndex < leftLength) {
|
5377 | args[leftIndex] = partials[leftIndex];
|
5378 | }
|
5379 | while (argsLength--) {
|
5380 | args[leftIndex++] = arguments[++argsIndex];
|
5381 | }
|
5382 | return apply(fn, isBind ? thisArg : this, args);
|
5383 | }
|
5384 | return wrapper;
|
5385 | }
|
5386 |
|
5387 | |
5388 |
|
5389 |
|
5390 |
|
5391 |
|
5392 |
|
5393 |
|
5394 | function createRange(fromRight) {
|
5395 | return function(start, end, step) {
|
5396 | if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
|
5397 | end = step = undefined;
|
5398 | }
|
5399 |
|
5400 | start = toFinite(start);
|
5401 | if (end === undefined) {
|
5402 | end = start;
|
5403 | start = 0;
|
5404 | } else {
|
5405 | end = toFinite(end);
|
5406 | }
|
5407 | step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
|
5408 | return baseRange(start, end, step, fromRight);
|
5409 | };
|
5410 | }
|
5411 |
|
5412 | |
5413 |
|
5414 |
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 | function createRelationalOperation(operator) {
|
5420 | return function(value, other) {
|
5421 | if (!(typeof value == 'string' && typeof other == 'string')) {
|
5422 | value = toNumber(value);
|
5423 | other = toNumber(other);
|
5424 | }
|
5425 | return operator(value, other);
|
5426 | };
|
5427 | }
|
5428 |
|
5429 | |
5430 |
|
5431 |
|
5432 |
|
5433 |
|
5434 |
|
5435 |
|
5436 |
|
5437 |
|
5438 |
|
5439 |
|
5440 |
|
5441 |
|
5442 |
|
5443 |
|
5444 |
|
5445 |
|
5446 | function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
|
5447 | var isCurry = bitmask & WRAP_CURRY_FLAG,
|
5448 | newHolders = isCurry ? holders : undefined,
|
5449 | newHoldersRight = isCurry ? undefined : holders,
|
5450 | newPartials = isCurry ? partials : undefined,
|
5451 | newPartialsRight = isCurry ? undefined : partials;
|
5452 |
|
5453 | bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
|
5454 | bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
|
5455 |
|
5456 | if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
|
5457 | bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
|
5458 | }
|
5459 | var newData = [
|
5460 | func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
|
5461 | newHoldersRight, argPos, ary, arity
|
5462 | ];
|
5463 |
|
5464 | var result = wrapFunc.apply(undefined, newData);
|
5465 | if (isLaziable(func)) {
|
5466 | setData(result, newData);
|
5467 | }
|
5468 | result.placeholder = placeholder;
|
5469 | return setWrapToString(result, func, bitmask);
|
5470 | }
|
5471 |
|
5472 | |
5473 |
|
5474 |
|
5475 |
|
5476 |
|
5477 |
|
5478 |
|
5479 | function createRound(methodName) {
|
5480 | var func = Math[methodName];
|
5481 | return function(number, precision) {
|
5482 | number = toNumber(number);
|
5483 | precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
5484 | if (precision && nativeIsFinite(number)) {
|
5485 |
|
5486 |
|
5487 | var pair = (toString(number) + 'e').split('e'),
|
5488 | value = func(pair[0] + 'e' + (+pair[1] + precision));
|
5489 |
|
5490 | pair = (toString(value) + 'e').split('e');
|
5491 | return +(pair[0] + 'e' + (+pair[1] - precision));
|
5492 | }
|
5493 | return func(number);
|
5494 | };
|
5495 | }
|
5496 |
|
5497 | |
5498 |
|
5499 |
|
5500 |
|
5501 |
|
5502 |
|
5503 |
|
5504 | var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
|
5505 | return new Set(values);
|
5506 | };
|
5507 |
|
5508 | |
5509 |
|
5510 |
|
5511 |
|
5512 |
|
5513 |
|
5514 |
|
5515 | function createToPairs(keysFunc) {
|
5516 | return function(object) {
|
5517 | var tag = getTag(object);
|
5518 | if (tag == mapTag) {
|
5519 | return mapToArray(object);
|
5520 | }
|
5521 | if (tag == setTag) {
|
5522 | return setToPairs(object);
|
5523 | }
|
5524 | return baseToPairs(object, keysFunc(object));
|
5525 | };
|
5526 | }
|
5527 |
|
5528 | |
5529 |
|
5530 |
|
5531 |
|
5532 |
|
5533 |
|
5534 |
|
5535 |
|
5536 |
|
5537 |
|
5538 |
|
5539 |
|
5540 |
|
5541 |
|
5542 |
|
5543 |
|
5544 |
|
5545 |
|
5546 |
|
5547 |
|
5548 |
|
5549 |
|
5550 |
|
5551 |
|
5552 |
|
5553 | function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
|
5554 | var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
|
5555 | if (!isBindKey && typeof func != 'function') {
|
5556 | throw new TypeError(FUNC_ERROR_TEXT);
|
5557 | }
|
5558 | var length = partials ? partials.length : 0;
|
5559 | if (!length) {
|
5560 | bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
|
5561 | partials = holders = undefined;
|
5562 | }
|
5563 | ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
|
5564 | arity = arity === undefined ? arity : toInteger(arity);
|
5565 | length -= holders ? holders.length : 0;
|
5566 |
|
5567 | if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
|
5568 | var partialsRight = partials,
|
5569 | holdersRight = holders;
|
5570 |
|
5571 | partials = holders = undefined;
|
5572 | }
|
5573 | var data = isBindKey ? undefined : getData(func);
|
5574 |
|
5575 | var newData = [
|
5576 | func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
|
5577 | argPos, ary, arity
|
5578 | ];
|
5579 |
|
5580 | if (data) {
|
5581 | mergeData(newData, data);
|
5582 | }
|
5583 | func = newData[0];
|
5584 | bitmask = newData[1];
|
5585 | thisArg = newData[2];
|
5586 | partials = newData[3];
|
5587 | holders = newData[4];
|
5588 | arity = newData[9] = newData[9] === undefined
|
5589 | ? (isBindKey ? 0 : func.length)
|
5590 | : nativeMax(newData[9] - length, 0);
|
5591 |
|
5592 | if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
|
5593 | bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
|
5594 | }
|
5595 | if (!bitmask || bitmask == WRAP_BIND_FLAG) {
|
5596 | var result = createBind(func, bitmask, thisArg);
|
5597 | } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
|
5598 | result = createCurry(func, bitmask, arity);
|
5599 | } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
|
5600 | result = createPartial(func, bitmask, thisArg, partials);
|
5601 | } else {
|
5602 | result = createHybrid.apply(undefined, newData);
|
5603 | }
|
5604 | var setter = data ? baseSetData : setData;
|
5605 | return setWrapToString(setter(result, newData), func, bitmask);
|
5606 | }
|
5607 |
|
5608 | |
5609 |
|
5610 |
|
5611 |
|
5612 |
|
5613 |
|
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 |
|
5619 |
|
5620 | function customDefaultsAssignIn(objValue, srcValue, key, object) {
|
5621 | if (objValue === undefined ||
|
5622 | (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
5623 | return srcValue;
|
5624 | }
|
5625 | return objValue;
|
5626 | }
|
5627 |
|
5628 | |
5629 |
|
5630 |
|
5631 |
|
5632 |
|
5633 |
|
5634 |
|
5635 |
|
5636 |
|
5637 |
|
5638 |
|
5639 |
|
5640 |
|
5641 |
|
5642 | function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
5643 | if (isObject(objValue) && isObject(srcValue)) {
|
5644 |
|
5645 | stack.set(srcValue, objValue);
|
5646 | baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
|
5647 | stack['delete'](srcValue);
|
5648 | }
|
5649 | return objValue;
|
5650 | }
|
5651 |
|
5652 | |
5653 |
|
5654 |
|
5655 |
|
5656 |
|
5657 |
|
5658 |
|
5659 |
|
5660 |
|
5661 | function customOmitClone(value) {
|
5662 | return isPlainObject(value) ? undefined : value;
|
5663 | }
|
5664 |
|
5665 | |
5666 |
|
5667 |
|
5668 |
|
5669 |
|
5670 |
|
5671 |
|
5672 |
|
5673 |
|
5674 |
|
5675 |
|
5676 |
|
5677 |
|
5678 | function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
5679 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
5680 | arrLength = array.length,
|
5681 | othLength = other.length;
|
5682 |
|
5683 | if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
5684 | return false;
|
5685 | }
|
5686 |
|
5687 | var stacked = stack.get(array);
|
5688 | if (stacked && stack.get(other)) {
|
5689 | return stacked == other;
|
5690 | }
|
5691 | var index = -1,
|
5692 | result = true,
|
5693 | seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
|
5694 |
|
5695 | stack.set(array, other);
|
5696 | stack.set(other, array);
|
5697 |
|
5698 |
|
5699 | while (++index < arrLength) {
|
5700 | var arrValue = array[index],
|
5701 | othValue = other[index];
|
5702 |
|
5703 | if (customizer) {
|
5704 | var compared = isPartial
|
5705 | ? customizer(othValue, arrValue, index, other, array, stack)
|
5706 | : customizer(arrValue, othValue, index, array, other, stack);
|
5707 | }
|
5708 | if (compared !== undefined) {
|
5709 | if (compared) {
|
5710 | continue;
|
5711 | }
|
5712 | result = false;
|
5713 | break;
|
5714 | }
|
5715 |
|
5716 | if (seen) {
|
5717 | if (!arraySome(other, function(othValue, othIndex) {
|
5718 | if (!cacheHas(seen, othIndex) &&
|
5719 | (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
5720 | return seen.push(othIndex);
|
5721 | }
|
5722 | })) {
|
5723 | result = false;
|
5724 | break;
|
5725 | }
|
5726 | } else if (!(
|
5727 | arrValue === othValue ||
|
5728 | equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
5729 | )) {
|
5730 | result = false;
|
5731 | break;
|
5732 | }
|
5733 | }
|
5734 | stack['delete'](array);
|
5735 | stack['delete'](other);
|
5736 | return result;
|
5737 | }
|
5738 |
|
5739 | |
5740 |
|
5741 |
|
5742 |
|
5743 |
|
5744 |
|
5745 |
|
5746 |
|
5747 |
|
5748 |
|
5749 |
|
5750 |
|
5751 |
|
5752 |
|
5753 |
|
5754 |
|
5755 |
|
5756 | function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
5757 | switch (tag) {
|
5758 | case dataViewTag:
|
5759 | if ((object.byteLength != other.byteLength) ||
|
5760 | (object.byteOffset != other.byteOffset)) {
|
5761 | return false;
|
5762 | }
|
5763 | object = object.buffer;
|
5764 | other = other.buffer;
|
5765 |
|
5766 | case arrayBufferTag:
|
5767 | if ((object.byteLength != other.byteLength) ||
|
5768 | !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
5769 | return false;
|
5770 | }
|
5771 | return true;
|
5772 |
|
5773 | case boolTag:
|
5774 | case dateTag:
|
5775 | case numberTag:
|
5776 |
|
5777 |
|
5778 | return eq(+object, +other);
|
5779 |
|
5780 | case errorTag:
|
5781 | return object.name == other.name && object.message == other.message;
|
5782 |
|
5783 | case regexpTag:
|
5784 | case stringTag:
|
5785 |
|
5786 |
|
5787 |
|
5788 | return object == (other + '');
|
5789 |
|
5790 | case mapTag:
|
5791 | var convert = mapToArray;
|
5792 |
|
5793 | case setTag:
|
5794 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
5795 | convert || (convert = setToArray);
|
5796 |
|
5797 | if (object.size != other.size && !isPartial) {
|
5798 | return false;
|
5799 | }
|
5800 |
|
5801 | var stacked = stack.get(object);
|
5802 | if (stacked) {
|
5803 | return stacked == other;
|
5804 | }
|
5805 | bitmask |= COMPARE_UNORDERED_FLAG;
|
5806 |
|
5807 |
|
5808 | stack.set(object, other);
|
5809 | var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
5810 | stack['delete'](object);
|
5811 | return result;
|
5812 |
|
5813 | case symbolTag:
|
5814 | if (symbolValueOf) {
|
5815 | return symbolValueOf.call(object) == symbolValueOf.call(other);
|
5816 | }
|
5817 | }
|
5818 | return false;
|
5819 | }
|
5820 |
|
5821 | |
5822 |
|
5823 |
|
5824 |
|
5825 |
|
5826 |
|
5827 |
|
5828 |
|
5829 |
|
5830 |
|
5831 |
|
5832 |
|
5833 |
|
5834 | function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
5835 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
5836 | objProps = getAllKeys(object),
|
5837 | objLength = objProps.length,
|
5838 | othProps = getAllKeys(other),
|
5839 | othLength = othProps.length;
|
5840 |
|
5841 | if (objLength != othLength && !isPartial) {
|
5842 | return false;
|
5843 | }
|
5844 | var index = objLength;
|
5845 | while (index--) {
|
5846 | var key = objProps[index];
|
5847 | if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
5848 | return false;
|
5849 | }
|
5850 | }
|
5851 |
|
5852 | var stacked = stack.get(object);
|
5853 | if (stacked && stack.get(other)) {
|
5854 | return stacked == other;
|
5855 | }
|
5856 | var result = true;
|
5857 | stack.set(object, other);
|
5858 | stack.set(other, object);
|
5859 |
|
5860 | var skipCtor = isPartial;
|
5861 | while (++index < objLength) {
|
5862 | key = objProps[index];
|
5863 | var objValue = object[key],
|
5864 | othValue = other[key];
|
5865 |
|
5866 | if (customizer) {
|
5867 | var compared = isPartial
|
5868 | ? customizer(othValue, objValue, key, other, object, stack)
|
5869 | : customizer(objValue, othValue, key, object, other, stack);
|
5870 | }
|
5871 |
|
5872 | if (!(compared === undefined
|
5873 | ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
5874 | : compared
|
5875 | )) {
|
5876 | result = false;
|
5877 | break;
|
5878 | }
|
5879 | skipCtor || (skipCtor = key == 'constructor');
|
5880 | }
|
5881 | if (result && !skipCtor) {
|
5882 | var objCtor = object.constructor,
|
5883 | othCtor = other.constructor;
|
5884 |
|
5885 |
|
5886 | if (objCtor != othCtor &&
|
5887 | ('constructor' in object && 'constructor' in other) &&
|
5888 | !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
5889 | typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
5890 | result = false;
|
5891 | }
|
5892 | }
|
5893 | stack['delete'](object);
|
5894 | stack['delete'](other);
|
5895 | return result;
|
5896 | }
|
5897 |
|
5898 | |
5899 |
|
5900 |
|
5901 |
|
5902 |
|
5903 |
|
5904 |
|
5905 | function flatRest(func) {
|
5906 | return setToString(overRest(func, undefined, flatten), func + '');
|
5907 | }
|
5908 |
|
5909 | |
5910 |
|
5911 |
|
5912 |
|
5913 |
|
5914 |
|
5915 |
|
5916 | function getAllKeys(object) {
|
5917 | return baseGetAllKeys(object, keys, getSymbols);
|
5918 | }
|
5919 |
|
5920 | |
5921 |
|
5922 |
|
5923 |
|
5924 |
|
5925 |
|
5926 |
|
5927 |
|
5928 | function getAllKeysIn(object) {
|
5929 | return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
5930 | }
|
5931 |
|
5932 | |
5933 |
|
5934 |
|
5935 |
|
5936 |
|
5937 |
|
5938 |
|
5939 | var getData = !metaMap ? noop : function(func) {
|
5940 | return metaMap.get(func);
|
5941 | };
|
5942 |
|
5943 | |
5944 |
|
5945 |
|
5946 |
|
5947 |
|
5948 |
|
5949 |
|
5950 | function getFuncName(func) {
|
5951 | var result = (func.name + ''),
|
5952 | array = realNames[result],
|
5953 | length = hasOwnProperty.call(realNames, result) ? array.length : 0;
|
5954 |
|
5955 | while (length--) {
|
5956 | var data = array[length],
|
5957 | otherFunc = data.func;
|
5958 | if (otherFunc == null || otherFunc == func) {
|
5959 | return data.name;
|
5960 | }
|
5961 | }
|
5962 | return result;
|
5963 | }
|
5964 |
|
5965 | |
5966 |
|
5967 |
|
5968 |
|
5969 |
|
5970 |
|
5971 |
|
5972 | function getHolder(func) {
|
5973 | var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
|
5974 | return object.placeholder;
|
5975 | }
|
5976 |
|
5977 | |
5978 |
|
5979 |
|
5980 |
|
5981 |
|
5982 |
|
5983 |
|
5984 |
|
5985 |
|
5986 |
|
5987 |
|
5988 | function getIteratee() {
|
5989 | var result = lodash.iteratee || iteratee;
|
5990 | result = result === iteratee ? baseIteratee : result;
|
5991 | return arguments.length ? result(arguments[0], arguments[1]) : result;
|
5992 | }
|
5993 |
|
5994 | |
5995 |
|
5996 |
|
5997 |
|
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 | function getMapData(map, key) {
|
6003 | var data = map.__data__;
|
6004 | return isKeyable(key)
|
6005 | ? data[typeof key == 'string' ? 'string' : 'hash']
|
6006 | : data.map;
|
6007 | }
|
6008 |
|
6009 | |
6010 |
|
6011 |
|
6012 |
|
6013 |
|
6014 |
|
6015 |
|
6016 | function getMatchData(object) {
|
6017 | var result = keys(object),
|
6018 | length = result.length;
|
6019 |
|
6020 | while (length--) {
|
6021 | var key = result[length],
|
6022 | value = object[key];
|
6023 |
|
6024 | result[length] = [key, value, isStrictComparable(value)];
|
6025 | }
|
6026 | return result;
|
6027 | }
|
6028 |
|
6029 | |
6030 |
|
6031 |
|
6032 |
|
6033 |
|
6034 |
|
6035 |
|
6036 |
|
6037 | function getNative(object, key) {
|
6038 | var value = getValue(object, key);
|
6039 | return baseIsNative(value) ? value : undefined;
|
6040 | }
|
6041 |
|
6042 | |
6043 |
|
6044 |
|
6045 |
|
6046 |
|
6047 |
|
6048 |
|
6049 | function getRawTag(value) {
|
6050 | var isOwn = hasOwnProperty.call(value, symToStringTag),
|
6051 | tag = value[symToStringTag];
|
6052 |
|
6053 | try {
|
6054 | value[symToStringTag] = undefined;
|
6055 | var unmasked = true;
|
6056 | } catch (e) {}
|
6057 |
|
6058 | var result = nativeObjectToString.call(value);
|
6059 | if (unmasked) {
|
6060 | if (isOwn) {
|
6061 | value[symToStringTag] = tag;
|
6062 | } else {
|
6063 | delete value[symToStringTag];
|
6064 | }
|
6065 | }
|
6066 | return result;
|
6067 | }
|
6068 |
|
6069 | |
6070 |
|
6071 |
|
6072 |
|
6073 |
|
6074 |
|
6075 |
|
6076 | var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
6077 | if (object == null) {
|
6078 | return [];
|
6079 | }
|
6080 | object = Object(object);
|
6081 | return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
6082 | return propertyIsEnumerable.call(object, symbol);
|
6083 | });
|
6084 | };
|
6085 |
|
6086 | |
6087 |
|
6088 |
|
6089 |
|
6090 |
|
6091 |
|
6092 |
|
6093 | var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
6094 | var result = [];
|
6095 | while (object) {
|
6096 | arrayPush(result, getSymbols(object));
|
6097 | object = getPrototype(object);
|
6098 | }
|
6099 | return result;
|
6100 | };
|
6101 |
|
6102 | |
6103 |
|
6104 |
|
6105 |
|
6106 |
|
6107 |
|
6108 |
|
6109 | var getTag = baseGetTag;
|
6110 |
|
6111 |
|
6112 | if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
6113 | (Map && getTag(new Map) != mapTag) ||
|
6114 | (Promise && getTag(Promise.resolve()) != promiseTag) ||
|
6115 | (Set && getTag(new Set) != setTag) ||
|
6116 | (WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
6117 | getTag = function(value) {
|
6118 | var result = baseGetTag(value),
|
6119 | Ctor = result == objectTag ? value.constructor : undefined,
|
6120 | ctorString = Ctor ? toSource(Ctor) : '';
|
6121 |
|
6122 | if (ctorString) {
|
6123 | switch (ctorString) {
|
6124 | case dataViewCtorString: return dataViewTag;
|
6125 | case mapCtorString: return mapTag;
|
6126 | case promiseCtorString: return promiseTag;
|
6127 | case setCtorString: return setTag;
|
6128 | case weakMapCtorString: return weakMapTag;
|
6129 | }
|
6130 | }
|
6131 | return result;
|
6132 | };
|
6133 | }
|
6134 |
|
6135 | |
6136 |
|
6137 |
|
6138 |
|
6139 |
|
6140 |
|
6141 |
|
6142 |
|
6143 |
|
6144 |
|
6145 | function getView(start, end, transforms) {
|
6146 | var index = -1,
|
6147 | length = transforms.length;
|
6148 |
|
6149 | while (++index < length) {
|
6150 | var data = transforms[index],
|
6151 | size = data.size;
|
6152 |
|
6153 | switch (data.type) {
|
6154 | case 'drop': start += size; break;
|
6155 | case 'dropRight': end -= size; break;
|
6156 | case 'take': end = nativeMin(end, start + size); break;
|
6157 | case 'takeRight': start = nativeMax(start, end - size); break;
|
6158 | }
|
6159 | }
|
6160 | return { 'start': start, 'end': end };
|
6161 | }
|
6162 |
|
6163 | |
6164 |
|
6165 |
|
6166 |
|
6167 |
|
6168 |
|
6169 |
|
6170 | function getWrapDetails(source) {
|
6171 | var match = source.match(reWrapDetails);
|
6172 | return match ? match[1].split(reSplitDetails) : [];
|
6173 | }
|
6174 |
|
6175 | |
6176 |
|
6177 |
|
6178 |
|
6179 |
|
6180 |
|
6181 |
|
6182 |
|
6183 |
|
6184 | function hasPath(object, path, hasFunc) {
|
6185 | path = castPath(path, object);
|
6186 |
|
6187 | var index = -1,
|
6188 | length = path.length,
|
6189 | result = false;
|
6190 |
|
6191 | while (++index < length) {
|
6192 | var key = toKey(path[index]);
|
6193 | if (!(result = object != null && hasFunc(object, key))) {
|
6194 | break;
|
6195 | }
|
6196 | object = object[key];
|
6197 | }
|
6198 | if (result || ++index != length) {
|
6199 | return result;
|
6200 | }
|
6201 | length = object == null ? 0 : object.length;
|
6202 | return !!length && isLength(length) && isIndex(key, length) &&
|
6203 | (isArray(object) || isArguments(object));
|
6204 | }
|
6205 |
|
6206 | |
6207 |
|
6208 |
|
6209 |
|
6210 |
|
6211 |
|
6212 |
|
6213 | function initCloneArray(array) {
|
6214 | var length = array.length,
|
6215 | result = new array.constructor(length);
|
6216 |
|
6217 |
|
6218 | if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
6219 | result.index = array.index;
|
6220 | result.input = array.input;
|
6221 | }
|
6222 | return result;
|
6223 | }
|
6224 |
|
6225 | |
6226 |
|
6227 |
|
6228 |
|
6229 |
|
6230 |
|
6231 |
|
6232 | function initCloneObject(object) {
|
6233 | return (typeof object.constructor == 'function' && !isPrototype(object))
|
6234 | ? baseCreate(getPrototype(object))
|
6235 | : {};
|
6236 | }
|
6237 |
|
6238 | |
6239 |
|
6240 |
|
6241 |
|
6242 |
|
6243 |
|
6244 |
|
6245 |
|
6246 |
|
6247 |
|
6248 |
|
6249 |
|
6250 | function initCloneByTag(object, tag, isDeep) {
|
6251 | var Ctor = object.constructor;
|
6252 | switch (tag) {
|
6253 | case arrayBufferTag:
|
6254 | return cloneArrayBuffer(object);
|
6255 |
|
6256 | case boolTag:
|
6257 | case dateTag:
|
6258 | return new Ctor(+object);
|
6259 |
|
6260 | case dataViewTag:
|
6261 | return cloneDataView(object, isDeep);
|
6262 |
|
6263 | case float32Tag: case float64Tag:
|
6264 | case int8Tag: case int16Tag: case int32Tag:
|
6265 | case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
6266 | return cloneTypedArray(object, isDeep);
|
6267 |
|
6268 | case mapTag:
|
6269 | return new Ctor;
|
6270 |
|
6271 | case numberTag:
|
6272 | case stringTag:
|
6273 | return new Ctor(object);
|
6274 |
|
6275 | case regexpTag:
|
6276 | return cloneRegExp(object);
|
6277 |
|
6278 | case setTag:
|
6279 | return new Ctor;
|
6280 |
|
6281 | case symbolTag:
|
6282 | return cloneSymbol(object);
|
6283 | }
|
6284 | }
|
6285 |
|
6286 | |
6287 |
|
6288 |
|
6289 |
|
6290 |
|
6291 |
|
6292 |
|
6293 |
|
6294 | function insertWrapDetails(source, details) {
|
6295 | var length = details.length;
|
6296 | if (!length) {
|
6297 | return source;
|
6298 | }
|
6299 | var lastIndex = length - 1;
|
6300 | details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
|
6301 | details = details.join(length > 2 ? ', ' : ' ');
|
6302 | return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
|
6303 | }
|
6304 |
|
6305 | |
6306 |
|
6307 |
|
6308 |
|
6309 |
|
6310 |
|
6311 |
|
6312 | function isFlattenable(value) {
|
6313 | return isArray(value) || isArguments(value) ||
|
6314 | !!(spreadableSymbol && value && value[spreadableSymbol]);
|
6315 | }
|
6316 |
|
6317 | |
6318 |
|
6319 |
|
6320 |
|
6321 |
|
6322 |
|
6323 |
|
6324 |
|
6325 | function isIndex(value, length) {
|
6326 | var type = typeof value;
|
6327 | length = length == null ? MAX_SAFE_INTEGER : length;
|
6328 |
|
6329 | return !!length &&
|
6330 | (type == 'number' ||
|
6331 | (type != 'symbol' && reIsUint.test(value))) &&
|
6332 | (value > -1 && value % 1 == 0 && value < length);
|
6333 | }
|
6334 |
|
6335 | |
6336 |
|
6337 |
|
6338 |
|
6339 |
|
6340 |
|
6341 |
|
6342 |
|
6343 |
|
6344 |
|
6345 | function isIterateeCall(value, index, object) {
|
6346 | if (!isObject(object)) {
|
6347 | return false;
|
6348 | }
|
6349 | var type = typeof index;
|
6350 | if (type == 'number'
|
6351 | ? (isArrayLike(object) && isIndex(index, object.length))
|
6352 | : (type == 'string' && index in object)
|
6353 | ) {
|
6354 | return eq(object[index], value);
|
6355 | }
|
6356 | return false;
|
6357 | }
|
6358 |
|
6359 | |
6360 |
|
6361 |
|
6362 |
|
6363 |
|
6364 |
|
6365 |
|
6366 |
|
6367 | function isKey(value, object) {
|
6368 | if (isArray(value)) {
|
6369 | return false;
|
6370 | }
|
6371 | var type = typeof value;
|
6372 | if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
6373 | value == null || isSymbol(value)) {
|
6374 | return true;
|
6375 | }
|
6376 | return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
6377 | (object != null && value in Object(object));
|
6378 | }
|
6379 |
|
6380 | |
6381 |
|
6382 |
|
6383 |
|
6384 |
|
6385 |
|
6386 |
|
6387 | function isKeyable(value) {
|
6388 | var type = typeof value;
|
6389 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
6390 | ? (value !== '__proto__')
|
6391 | : (value === null);
|
6392 | }
|
6393 |
|
6394 | |
6395 |
|
6396 |
|
6397 |
|
6398 |
|
6399 |
|
6400 |
|
6401 |
|
6402 | function isLaziable(func) {
|
6403 | var funcName = getFuncName(func),
|
6404 | other = lodash[funcName];
|
6405 |
|
6406 | if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
|
6407 | return false;
|
6408 | }
|
6409 | if (func === other) {
|
6410 | return true;
|
6411 | }
|
6412 | var data = getData(other);
|
6413 | return !!data && func === data[0];
|
6414 | }
|
6415 |
|
6416 | |
6417 |
|
6418 |
|
6419 |
|
6420 |
|
6421 |
|
6422 |
|
6423 | function isMasked(func) {
|
6424 | return !!maskSrcKey && (maskSrcKey in func);
|
6425 | }
|
6426 |
|
6427 | |
6428 |
|
6429 |
|
6430 |
|
6431 |
|
6432 |
|
6433 |
|
6434 | var isMaskable = coreJsData ? isFunction : stubFalse;
|
6435 |
|
6436 | |
6437 |
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 | function isPrototype(value) {
|
6444 | var Ctor = value && value.constructor,
|
6445 | proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
6446 |
|
6447 | return value === proto;
|
6448 | }
|
6449 |
|
6450 | |
6451 |
|
6452 |
|
6453 |
|
6454 |
|
6455 |
|
6456 |
|
6457 |
|
6458 | function isStrictComparable(value) {
|
6459 | return value === value && !isObject(value);
|
6460 | }
|
6461 |
|
6462 | |
6463 |
|
6464 |
|
6465 |
|
6466 |
|
6467 |
|
6468 |
|
6469 |
|
6470 |
|
6471 | function matchesStrictComparable(key, srcValue) {
|
6472 | return function(object) {
|
6473 | if (object == null) {
|
6474 | return false;
|
6475 | }
|
6476 | return object[key] === srcValue &&
|
6477 | (srcValue !== undefined || (key in Object(object)));
|
6478 | };
|
6479 | }
|
6480 |
|
6481 | |
6482 |
|
6483 |
|
6484 |
|
6485 |
|
6486 |
|
6487 |
|
6488 |
|
6489 | function memoizeCapped(func) {
|
6490 | var result = memoize(func, function(key) {
|
6491 | if (cache.size === MAX_MEMOIZE_SIZE) {
|
6492 | cache.clear();
|
6493 | }
|
6494 | return key;
|
6495 | });
|
6496 |
|
6497 | var cache = result.cache;
|
6498 | return result;
|
6499 | }
|
6500 |
|
6501 | |
6502 |
|
6503 |
|
6504 |
|
6505 |
|
6506 |
|
6507 |
|
6508 |
|
6509 |
|
6510 |
|
6511 |
|
6512 |
|
6513 |
|
6514 |
|
6515 |
|
6516 |
|
6517 | function mergeData(data, source) {
|
6518 | var bitmask = data[1],
|
6519 | srcBitmask = source[1],
|
6520 | newBitmask = bitmask | srcBitmask,
|
6521 | isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
|
6522 |
|
6523 | var isCombo =
|
6524 | ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
|
6525 | ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
|
6526 | ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
|
6527 |
|
6528 |
|
6529 | if (!(isCommon || isCombo)) {
|
6530 | return data;
|
6531 | }
|
6532 |
|
6533 | if (srcBitmask & WRAP_BIND_FLAG) {
|
6534 | data[2] = source[2];
|
6535 |
|
6536 | newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
|
6537 | }
|
6538 |
|
6539 | var value = source[3];
|
6540 | if (value) {
|
6541 | var partials = data[3];
|
6542 | data[3] = partials ? composeArgs(partials, value, source[4]) : value;
|
6543 | data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
|
6544 | }
|
6545 |
|
6546 | value = source[5];
|
6547 | if (value) {
|
6548 | partials = data[5];
|
6549 | data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
|
6550 | data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
|
6551 | }
|
6552 |
|
6553 | value = source[7];
|
6554 | if (value) {
|
6555 | data[7] = value;
|
6556 | }
|
6557 |
|
6558 | if (srcBitmask & WRAP_ARY_FLAG) {
|
6559 | data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
|
6560 | }
|
6561 |
|
6562 | if (data[9] == null) {
|
6563 | data[9] = source[9];
|
6564 | }
|
6565 |
|
6566 | data[0] = source[0];
|
6567 | data[1] = newBitmask;
|
6568 |
|
6569 | return data;
|
6570 | }
|
6571 |
|
6572 | |
6573 |
|
6574 |
|
6575 |
|
6576 |
|
6577 |
|
6578 |
|
6579 |
|
6580 |
|
6581 | function nativeKeysIn(object) {
|
6582 | var result = [];
|
6583 | if (object != null) {
|
6584 | for (var key in Object(object)) {
|
6585 | result.push(key);
|
6586 | }
|
6587 | }
|
6588 | return result;
|
6589 | }
|
6590 |
|
6591 | |
6592 |
|
6593 |
|
6594 |
|
6595 |
|
6596 |
|
6597 |
|
6598 | function objectToString(value) {
|
6599 | return nativeObjectToString.call(value);
|
6600 | }
|
6601 |
|
6602 | |
6603 |
|
6604 |
|
6605 |
|
6606 |
|
6607 |
|
6608 |
|
6609 |
|
6610 |
|
6611 | function overRest(func, start, transform) {
|
6612 | start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
6613 | return function() {
|
6614 | var args = arguments,
|
6615 | index = -1,
|
6616 | length = nativeMax(args.length - start, 0),
|
6617 | array = Array(length);
|
6618 |
|
6619 | while (++index < length) {
|
6620 | array[index] = args[start + index];
|
6621 | }
|
6622 | index = -1;
|
6623 | var otherArgs = Array(start + 1);
|
6624 | while (++index < start) {
|
6625 | otherArgs[index] = args[index];
|
6626 | }
|
6627 | otherArgs[start] = transform(array);
|
6628 | return apply(func, this, otherArgs);
|
6629 | };
|
6630 | }
|
6631 |
|
6632 | |
6633 |
|
6634 |
|
6635 |
|
6636 |
|
6637 |
|
6638 |
|
6639 |
|
6640 | function parent(object, path) {
|
6641 | return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
6642 | }
|
6643 |
|
6644 | |
6645 |
|
6646 |
|
6647 |
|
6648 |
|
6649 |
|
6650 |
|
6651 |
|
6652 |
|
6653 |
|
6654 | function reorder(array, indexes) {
|
6655 | var arrLength = array.length,
|
6656 | length = nativeMin(indexes.length, arrLength),
|
6657 | oldArray = copyArray(array);
|
6658 |
|
6659 | while (length--) {
|
6660 | var index = indexes[length];
|
6661 | array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
|
6662 | }
|
6663 | return array;
|
6664 | }
|
6665 |
|
6666 | |
6667 |
|
6668 |
|
6669 |
|
6670 |
|
6671 |
|
6672 |
|
6673 |
|
6674 | function safeGet(object, key) {
|
6675 | if (key === 'constructor' && typeof object[key] === 'function') {
|
6676 | return;
|
6677 | }
|
6678 |
|
6679 | if (key == '__proto__') {
|
6680 | return;
|
6681 | }
|
6682 |
|
6683 | return object[key];
|
6684 | }
|
6685 |
|
6686 | |
6687 |
|
6688 |
|
6689 |
|
6690 |
|
6691 |
|
6692 |
|
6693 |
|
6694 |
|
6695 |
|
6696 |
|
6697 |
|
6698 |
|
6699 |
|
6700 | var setData = shortOut(baseSetData);
|
6701 |
|
6702 | |
6703 |
|
6704 |
|
6705 |
|
6706 |
|
6707 |
|
6708 |
|
6709 |
|
6710 | var setTimeout = ctxSetTimeout || function(func, wait) {
|
6711 | return root.setTimeout(func, wait);
|
6712 | };
|
6713 |
|
6714 | |
6715 |
|
6716 |
|
6717 |
|
6718 |
|
6719 |
|
6720 |
|
6721 |
|
6722 | var setToString = shortOut(baseSetToString);
|
6723 |
|
6724 | |
6725 |
|
6726 |
|
6727 |
|
6728 |
|
6729 |
|
6730 |
|
6731 |
|
6732 |
|
6733 |
|
6734 | function setWrapToString(wrapper, reference, bitmask) {
|
6735 | var source = (reference + '');
|
6736 | return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
|
6737 | }
|
6738 |
|
6739 | |
6740 |
|
6741 |
|
6742 |
|
6743 |
|
6744 |
|
6745 |
|
6746 |
|
6747 |
|
6748 | function shortOut(func) {
|
6749 | var count = 0,
|
6750 | lastCalled = 0;
|
6751 |
|
6752 | return function() {
|
6753 | var stamp = nativeNow(),
|
6754 | remaining = HOT_SPAN - (stamp - lastCalled);
|
6755 |
|
6756 | lastCalled = stamp;
|
6757 | if (remaining > 0) {
|
6758 | if (++count >= HOT_COUNT) {
|
6759 | return arguments[0];
|
6760 | }
|
6761 | } else {
|
6762 | count = 0;
|
6763 | }
|
6764 | return func.apply(undefined, arguments);
|
6765 | };
|
6766 | }
|
6767 |
|
6768 | |
6769 |
|
6770 |
|
6771 |
|
6772 |
|
6773 |
|
6774 |
|
6775 |
|
6776 | function shuffleSelf(array, size) {
|
6777 | var index = -1,
|
6778 | length = array.length,
|
6779 | lastIndex = length - 1;
|
6780 |
|
6781 | size = size === undefined ? length : size;
|
6782 | while (++index < size) {
|
6783 | var rand = baseRandom(index, lastIndex),
|
6784 | value = array[rand];
|
6785 |
|
6786 | array[rand] = array[index];
|
6787 | array[index] = value;
|
6788 | }
|
6789 | array.length = size;
|
6790 | return array;
|
6791 | }
|
6792 |
|
6793 | |
6794 |
|
6795 |
|
6796 |
|
6797 |
|
6798 |
|
6799 |
|
6800 | var stringToPath = memoizeCapped(function(string) {
|
6801 | var result = [];
|
6802 | if (string.charCodeAt(0) === 46 ) {
|
6803 | result.push('');
|
6804 | }
|
6805 | string.replace(rePropName, function(match, number, quote, subString) {
|
6806 | result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
6807 | });
|
6808 | return result;
|
6809 | });
|
6810 |
|
6811 | |
6812 |
|
6813 |
|
6814 |
|
6815 |
|
6816 |
|
6817 |
|
6818 | function toKey(value) {
|
6819 | if (typeof value == 'string' || isSymbol(value)) {
|
6820 | return value;
|
6821 | }
|
6822 | var result = (value + '');
|
6823 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
6824 | }
|
6825 |
|
6826 | |
6827 |
|
6828 |
|
6829 |
|
6830 |
|
6831 |
|
6832 |
|
6833 | function toSource(func) {
|
6834 | if (func != null) {
|
6835 | try {
|
6836 | return funcToString.call(func);
|
6837 | } catch (e) {}
|
6838 | try {
|
6839 | return (func + '');
|
6840 | } catch (e) {}
|
6841 | }
|
6842 | return '';
|
6843 | }
|
6844 |
|
6845 | |
6846 |
|
6847 |
|
6848 |
|
6849 |
|
6850 |
|
6851 |
|
6852 |
|
6853 | function updateWrapDetails(details, bitmask) {
|
6854 | arrayEach(wrapFlags, function(pair) {
|
6855 | var value = '_.' + pair[0];
|
6856 | if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
|
6857 | details.push(value);
|
6858 | }
|
6859 | });
|
6860 | return details.sort();
|
6861 | }
|
6862 |
|
6863 | |
6864 |
|
6865 |
|
6866 |
|
6867 |
|
6868 |
|
6869 |
|
6870 | function wrapperClone(wrapper) {
|
6871 | if (wrapper instanceof LazyWrapper) {
|
6872 | return wrapper.clone();
|
6873 | }
|
6874 | var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
|
6875 | result.__actions__ = copyArray(wrapper.__actions__);
|
6876 | result.__index__ = wrapper.__index__;
|
6877 | result.__values__ = wrapper.__values__;
|
6878 | return result;
|
6879 | }
|
6880 |
|
6881 |
|
6882 |
|
6883 | |
6884 |
|
6885 |
|
6886 |
|
6887 |
|
6888 |
|
6889 |
|
6890 |
|
6891 |
|
6892 |
|
6893 |
|
6894 |
|
6895 |
|
6896 |
|
6897 |
|
6898 |
|
6899 |
|
6900 |
|
6901 |
|
6902 |
|
6903 |
|
6904 | function chunk(array, size, guard) {
|
6905 | if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
|
6906 | size = 1;
|
6907 | } else {
|
6908 | size = nativeMax(toInteger(size), 0);
|
6909 | }
|
6910 | var length = array == null ? 0 : array.length;
|
6911 | if (!length || size < 1) {
|
6912 | return [];
|
6913 | }
|
6914 | var index = 0,
|
6915 | resIndex = 0,
|
6916 | result = Array(nativeCeil(length / size));
|
6917 |
|
6918 | while (index < length) {
|
6919 | result[resIndex++] = baseSlice(array, index, (index += size));
|
6920 | }
|
6921 | return result;
|
6922 | }
|
6923 |
|
6924 | |
6925 |
|
6926 |
|
6927 |
|
6928 |
|
6929 |
|
6930 |
|
6931 |
|
6932 |
|
6933 |
|
6934 |
|
6935 |
|
6936 |
|
6937 |
|
6938 |
|
6939 | function compact(array) {
|
6940 | var index = -1,
|
6941 | length = array == null ? 0 : array.length,
|
6942 | resIndex = 0,
|
6943 | result = [];
|
6944 |
|
6945 | while (++index < length) {
|
6946 | var value = array[index];
|
6947 | if (value) {
|
6948 | result[resIndex++] = value;
|
6949 | }
|
6950 | }
|
6951 | return result;
|
6952 | }
|
6953 |
|
6954 | |
6955 |
|
6956 |
|
6957 |
|
6958 |
|
6959 |
|
6960 |
|
6961 |
|
6962 |
|
6963 |
|
6964 |
|
6965 |
|
6966 |
|
6967 |
|
6968 |
|
6969 |
|
6970 |
|
6971 |
|
6972 |
|
6973 |
|
6974 |
|
6975 |
|
6976 | function concat() {
|
6977 | var length = arguments.length;
|
6978 | if (!length) {
|
6979 | return [];
|
6980 | }
|
6981 | var args = Array(length - 1),
|
6982 | array = arguments[0],
|
6983 | index = length;
|
6984 |
|
6985 | while (index--) {
|
6986 | args[index - 1] = arguments[index];
|
6987 | }
|
6988 | return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
6989 | }
|
6990 |
|
6991 | |
6992 |
|
6993 |
|
6994 |
|
6995 |
|
6996 |
|
6997 |
|
6998 |
|
6999 |
|
7000 |
|
7001 |
|
7002 |
|
7003 |
|
7004 |
|
7005 |
|
7006 |
|
7007 |
|
7008 |
|
7009 |
|
7010 |
|
7011 |
|
7012 | var difference = baseRest(function(array, values) {
|
7013 | return isArrayLikeObject(array)
|
7014 | ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
7015 | : [];
|
7016 | });
|
7017 |
|
7018 | |
7019 |
|
7020 |
|
7021 |
|
7022 |
|
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 |
|
7028 |
|
7029 |
|
7030 |
|
7031 |
|
7032 |
|
7033 |
|
7034 |
|
7035 |
|
7036 |
|
7037 |
|
7038 |
|
7039 |
|
7040 |
|
7041 |
|
7042 |
|
7043 |
|
7044 | var differenceBy = baseRest(function(array, values) {
|
7045 | var iteratee = last(values);
|
7046 | if (isArrayLikeObject(iteratee)) {
|
7047 | iteratee = undefined;
|
7048 | }
|
7049 | return isArrayLikeObject(array)
|
7050 | ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
|
7051 | : [];
|
7052 | });
|
7053 |
|
7054 | |
7055 |
|
7056 |
|
7057 |
|
7058 |
|
7059 |
|
7060 |
|
7061 |
|
7062 |
|
7063 |
|
7064 |
|
7065 |
|
7066 |
|
7067 |
|
7068 |
|
7069 |
|
7070 |
|
7071 |
|
7072 |
|
7073 |
|
7074 |
|
7075 |
|
7076 |
|
7077 | var differenceWith = baseRest(function(array, values) {
|
7078 | var comparator = last(values);
|
7079 | if (isArrayLikeObject(comparator)) {
|
7080 | comparator = undefined;
|
7081 | }
|
7082 | return isArrayLikeObject(array)
|
7083 | ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
|
7084 | : [];
|
7085 | });
|
7086 |
|
7087 | |
7088 |
|
7089 |
|
7090 |
|
7091 |
|
7092 |
|
7093 |
|
7094 |
|
7095 |
|
7096 |
|
7097 |
|
7098 |
|
7099 |
|
7100 |
|
7101 |
|
7102 |
|
7103 |
|
7104 |
|
7105 |
|
7106 |
|
7107 |
|
7108 |
|
7109 |
|
7110 |
|
7111 |
|
7112 | function drop(array, n, guard) {
|
7113 | var length = array == null ? 0 : array.length;
|
7114 | if (!length) {
|
7115 | return [];
|
7116 | }
|
7117 | n = (guard || n === undefined) ? 1 : toInteger(n);
|
7118 | return baseSlice(array, n < 0 ? 0 : n, length);
|
7119 | }
|
7120 |
|
7121 | |
7122 |
|
7123 |
|
7124 |
|
7125 |
|
7126 |
|
7127 |
|
7128 |
|
7129 |
|
7130 |
|
7131 |
|
7132 |
|
7133 |
|
7134 |
|
7135 |
|
7136 |
|
7137 |
|
7138 |
|
7139 |
|
7140 |
|
7141 |
|
7142 |
|
7143 |
|
7144 |
|
7145 |
|
7146 | function dropRight(array, n, guard) {
|
7147 | var length = array == null ? 0 : array.length;
|
7148 | if (!length) {
|
7149 | return [];
|
7150 | }
|
7151 | n = (guard || n === undefined) ? 1 : toInteger(n);
|
7152 | n = length - n;
|
7153 | return baseSlice(array, 0, n < 0 ? 0 : n);
|
7154 | }
|
7155 |
|
7156 | |
7157 |
|
7158 |
|
7159 |
|
7160 |
|
7161 |
|
7162 |
|
7163 |
|
7164 |
|
7165 |
|
7166 |
|
7167 |
|
7168 |
|
7169 |
|
7170 |
|
7171 |
|
7172 |
|
7173 |
|
7174 |
|
7175 |
|
7176 |
|
7177 |
|
7178 |
|
7179 |
|
7180 |
|
7181 |
|
7182 |
|
7183 |
|
7184 |
|
7185 |
|
7186 |
|
7187 |
|
7188 |
|
7189 |
|
7190 |
|
7191 | function dropRightWhile(array, predicate) {
|
7192 | return (array && array.length)
|
7193 | ? baseWhile(array, getIteratee(predicate, 3), true, true)
|
7194 | : [];
|
7195 | }
|
7196 |
|
7197 | |
7198 |
|
7199 |
|
7200 |
|
7201 |
|
7202 |
|
7203 |
|
7204 |
|
7205 |
|
7206 |
|
7207 |
|
7208 |
|
7209 |
|
7210 |
|
7211 |
|
7212 |
|
7213 |
|
7214 |
|
7215 |
|
7216 |
|
7217 |
|
7218 |
|
7219 |
|
7220 |
|
7221 |
|
7222 |
|
7223 |
|
7224 |
|
7225 |
|
7226 |
|
7227 |
|
7228 |
|
7229 |
|
7230 |
|
7231 |
|
7232 | function dropWhile(array, predicate) {
|
7233 | return (array && array.length)
|
7234 | ? baseWhile(array, getIteratee(predicate, 3), true)
|
7235 | : [];
|
7236 | }
|
7237 |
|
7238 | |
7239 |
|
7240 |
|
7241 |
|
7242 |
|
7243 |
|
7244 |
|
7245 |
|
7246 |
|
7247 |
|
7248 |
|
7249 |
|
7250 |
|
7251 |
|
7252 |
|
7253 |
|
7254 |
|
7255 |
|
7256 |
|
7257 |
|
7258 |
|
7259 |
|
7260 |
|
7261 |
|
7262 |
|
7263 |
|
7264 |
|
7265 |
|
7266 |
|
7267 | function fill(array, value, start, end) {
|
7268 | var length = array == null ? 0 : array.length;
|
7269 | if (!length) {
|
7270 | return [];
|
7271 | }
|
7272 | if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
|
7273 | start = 0;
|
7274 | end = length;
|
7275 | }
|
7276 | return baseFill(array, value, start, end);
|
7277 | }
|
7278 |
|
7279 | |
7280 |
|
7281 |
|
7282 |
|
7283 |
|
7284 |
|
7285 |
|
7286 |
|
7287 |
|
7288 |
|
7289 |
|
7290 |
|
7291 |
|
7292 |
|
7293 |
|
7294 |
|
7295 |
|
7296 |
|
7297 |
|
7298 |
|
7299 |
|
7300 |
|
7301 |
|
7302 |
|
7303 |
|
7304 |
|
7305 |
|
7306 |
|
7307 |
|
7308 |
|
7309 |
|
7310 |
|
7311 |
|
7312 |
|
7313 |
|
7314 | function findIndex(array, predicate, fromIndex) {
|
7315 | var length = array == null ? 0 : array.length;
|
7316 | if (!length) {
|
7317 | return -1;
|
7318 | }
|
7319 | var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
7320 | if (index < 0) {
|
7321 | index = nativeMax(length + index, 0);
|
7322 | }
|
7323 | return baseFindIndex(array, getIteratee(predicate, 3), index);
|
7324 | }
|
7325 |
|
7326 | |
7327 |
|
7328 |
|
7329 |
|
7330 |
|
7331 |
|
7332 |
|
7333 |
|
7334 |
|
7335 |
|
7336 |
|
7337 |
|
7338 |
|
7339 |
|
7340 |
|
7341 |
|
7342 |
|
7343 |
|
7344 |
|
7345 |
|
7346 |
|
7347 |
|
7348 |
|
7349 |
|
7350 |
|
7351 |
|
7352 |
|
7353 |
|
7354 |
|
7355 |
|
7356 |
|
7357 |
|
7358 |
|
7359 |
|
7360 |
|
7361 | function findLastIndex(array, predicate, fromIndex) {
|
7362 | var length = array == null ? 0 : array.length;
|
7363 | if (!length) {
|
7364 | return -1;
|
7365 | }
|
7366 | var index = length - 1;
|
7367 | if (fromIndex !== undefined) {
|
7368 | index = toInteger(fromIndex);
|
7369 | index = fromIndex < 0
|
7370 | ? nativeMax(length + index, 0)
|
7371 | : nativeMin(index, length - 1);
|
7372 | }
|
7373 | return baseFindIndex(array, getIteratee(predicate, 3), index, true);
|
7374 | }
|
7375 |
|
7376 | |
7377 |
|
7378 |
|
7379 |
|
7380 |
|
7381 |
|
7382 |
|
7383 |
|
7384 |
|
7385 |
|
7386 |
|
7387 |
|
7388 |
|
7389 |
|
7390 | function flatten(array) {
|
7391 | var length = array == null ? 0 : array.length;
|
7392 | return length ? baseFlatten(array, 1) : [];
|
7393 | }
|
7394 |
|
7395 | |
7396 |
|
7397 |
|
7398 |
|
7399 |
|
7400 |
|
7401 |
|
7402 |
|
7403 |
|
7404 |
|
7405 |
|
7406 |
|
7407 |
|
7408 |
|
7409 | function flattenDeep(array) {
|
7410 | var length = array == null ? 0 : array.length;
|
7411 | return length ? baseFlatten(array, INFINITY) : [];
|
7412 | }
|
7413 |
|
7414 | |
7415 |
|
7416 |
|
7417 |
|
7418 |
|
7419 |
|
7420 |
|
7421 |
|
7422 |
|
7423 |
|
7424 |
|
7425 |
|
7426 |
|
7427 |
|
7428 |
|
7429 |
|
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 | function flattenDepth(array, depth) {
|
7435 | var length = array == null ? 0 : array.length;
|
7436 | if (!length) {
|
7437 | return [];
|
7438 | }
|
7439 | depth = depth === undefined ? 1 : toInteger(depth);
|
7440 | return baseFlatten(array, depth);
|
7441 | }
|
7442 |
|
7443 | |
7444 |
|
7445 |
|
7446 |
|
7447 |
|
7448 |
|
7449 |
|
7450 |
|
7451 |
|
7452 |
|
7453 |
|
7454 |
|
7455 |
|
7456 |
|
7457 |
|
7458 | function fromPairs(pairs) {
|
7459 | var index = -1,
|
7460 | length = pairs == null ? 0 : pairs.length,
|
7461 | result = {};
|
7462 |
|
7463 | while (++index < length) {
|
7464 | var pair = pairs[index];
|
7465 | result[pair[0]] = pair[1];
|
7466 | }
|
7467 | return result;
|
7468 | }
|
7469 |
|
7470 | |
7471 |
|
7472 |
|
7473 |
|
7474 |
|
7475 |
|
7476 |
|
7477 |
|
7478 |
|
7479 |
|
7480 |
|
7481 |
|
7482 |
|
7483 |
|
7484 |
|
7485 |
|
7486 |
|
7487 |
|
7488 | function head(array) {
|
7489 | return (array && array.length) ? array[0] : undefined;
|
7490 | }
|
7491 |
|
7492 | |
7493 |
|
7494 |
|
7495 |
|
7496 |
|
7497 |
|
7498 |
|
7499 |
|
7500 |
|
7501 |
|
7502 |
|
7503 |
|
7504 |
|
7505 |
|
7506 |
|
7507 |
|
7508 |
|
7509 |
|
7510 |
|
7511 |
|
7512 |
|
7513 |
|
7514 |
|
7515 | function indexOf(array, value, fromIndex) {
|
7516 | var length = array == null ? 0 : array.length;
|
7517 | if (!length) {
|
7518 | return -1;
|
7519 | }
|
7520 | var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
7521 | if (index < 0) {
|
7522 | index = nativeMax(length + index, 0);
|
7523 | }
|
7524 | return baseIndexOf(array, value, index);
|
7525 | }
|
7526 |
|
7527 | |
7528 |
|
7529 |
|
7530 |
|
7531 |
|
7532 |
|
7533 |
|
7534 |
|
7535 |
|
7536 |
|
7537 |
|
7538 |
|
7539 |
|
7540 |
|
7541 | function initial(array) {
|
7542 | var length = array == null ? 0 : array.length;
|
7543 | return length ? baseSlice(array, 0, -1) : [];
|
7544 | }
|
7545 |
|
7546 | |
7547 |
|
7548 |
|
7549 |
|
7550 |
|
7551 |
|
7552 |
|
7553 |
|
7554 |
|
7555 |
|
7556 |
|
7557 |
|
7558 |
|
7559 |
|
7560 |
|
7561 |
|
7562 |
|
7563 | var intersection = baseRest(function(arrays) {
|
7564 | var mapped = arrayMap(arrays, castArrayLikeObject);
|
7565 | return (mapped.length && mapped[0] === arrays[0])
|
7566 | ? baseIntersection(mapped)
|
7567 | : [];
|
7568 | });
|
7569 |
|
7570 | |
7571 |
|
7572 |
|
7573 |
|
7574 |
|
7575 |
|
7576 |
|
7577 |
|
7578 |
|
7579 |
|
7580 |
|
7581 |
|
7582 |
|
7583 |
|
7584 |
|
7585 |
|
7586 |
|
7587 |
|
7588 |
|
7589 |
|
7590 |
|
7591 |
|
7592 |
|
7593 | var intersectionBy = baseRest(function(arrays) {
|
7594 | var iteratee = last(arrays),
|
7595 | mapped = arrayMap(arrays, castArrayLikeObject);
|
7596 |
|
7597 | if (iteratee === last(mapped)) {
|
7598 | iteratee = undefined;
|
7599 | } else {
|
7600 | mapped.pop();
|
7601 | }
|
7602 | return (mapped.length && mapped[0] === arrays[0])
|
7603 | ? baseIntersection(mapped, getIteratee(iteratee, 2))
|
7604 | : [];
|
7605 | });
|
7606 |
|
7607 | |
7608 |
|
7609 |
|
7610 |
|
7611 |
|
7612 |
|
7613 |
|
7614 |
|
7615 |
|
7616 |
|
7617 |
|
7618 |
|
7619 |
|
7620 |
|
7621 |
|
7622 |
|
7623 |
|
7624 |
|
7625 |
|
7626 |
|
7627 |
|
7628 | var intersectionWith = baseRest(function(arrays) {
|
7629 | var comparator = last(arrays),
|
7630 | mapped = arrayMap(arrays, castArrayLikeObject);
|
7631 |
|
7632 | comparator = typeof comparator == 'function' ? comparator : undefined;
|
7633 | if (comparator) {
|
7634 | mapped.pop();
|
7635 | }
|
7636 | return (mapped.length && mapped[0] === arrays[0])
|
7637 | ? baseIntersection(mapped, undefined, comparator)
|
7638 | : [];
|
7639 | });
|
7640 |
|
7641 | |
7642 |
|
7643 |
|
7644 |
|
7645 |
|
7646 |
|
7647 |
|
7648 |
|
7649 |
|
7650 |
|
7651 |
|
7652 |
|
7653 |
|
7654 |
|
7655 |
|
7656 | function join(array, separator) {
|
7657 | return array == null ? '' : nativeJoin.call(array, separator);
|
7658 | }
|
7659 |
|
7660 | |
7661 |
|
7662 |
|
7663 |
|
7664 |
|
7665 |
|
7666 |
|
7667 |
|
7668 |
|
7669 |
|
7670 |
|
7671 |
|
7672 |
|
7673 |
|
7674 | function last(array) {
|
7675 | var length = array == null ? 0 : array.length;
|
7676 | return length ? array[length - 1] : undefined;
|
7677 | }
|
7678 |
|
7679 | |
7680 |
|
7681 |
|
7682 |
|
7683 |
|
7684 |
|
7685 |
|
7686 |
|
7687 |
|
7688 |
|
7689 |
|
7690 |
|
7691 |
|
7692 |
|
7693 |
|
7694 |
|
7695 |
|
7696 |
|
7697 |
|
7698 |
|
7699 |
|
7700 | function lastIndexOf(array, value, fromIndex) {
|
7701 | var length = array == null ? 0 : array.length;
|
7702 | if (!length) {
|
7703 | return -1;
|
7704 | }
|
7705 | var index = length;
|
7706 | if (fromIndex !== undefined) {
|
7707 | index = toInteger(fromIndex);
|
7708 | index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
7709 | }
|
7710 | return value === value
|
7711 | ? strictLastIndexOf(array, value, index)
|
7712 | : baseFindIndex(array, baseIsNaN, index, true);
|
7713 | }
|
7714 |
|
7715 | |
7716 |
|
7717 |
|
7718 |
|
7719 |
|
7720 |
|
7721 |
|
7722 |
|
7723 |
|
7724 |
|
7725 |
|
7726 |
|
7727 |
|
7728 |
|
7729 |
|
7730 |
|
7731 |
|
7732 |
|
7733 |
|
7734 |
|
7735 |
|
7736 | function nth(array, n) {
|
7737 | return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
|
7738 | }
|
7739 |
|
7740 | |
7741 |
|
7742 |
|
7743 |
|
7744 |
|
7745 |
|
7746 |
|
7747 |
|
7748 |
|
7749 |
|
7750 |
|
7751 |
|
7752 |
|
7753 |
|
7754 |
|
7755 |
|
7756 |
|
7757 |
|
7758 |
|
7759 |
|
7760 |
|
7761 |
|
7762 |
|
7763 | var pull = baseRest(pullAll);
|
7764 |
|
7765 | |
7766 |
|
7767 |
|
7768 |
|
7769 |
|
7770 |
|
7771 |
|
7772 |
|
7773 |
|
7774 |
|
7775 |
|
7776 |
|
7777 |
|
7778 |
|
7779 |
|
7780 |
|
7781 |
|
7782 |
|
7783 |
|
7784 |
|
7785 | function pullAll(array, values) {
|
7786 | return (array && array.length && values && values.length)
|
7787 | ? basePullAll(array, values)
|
7788 | : array;
|
7789 | }
|
7790 |
|
7791 | |
7792 |
|
7793 |
|
7794 |
|
7795 |
|
7796 |
|
7797 |
|
7798 |
|
7799 |
|
7800 |
|
7801 |
|
7802 |
|
7803 |
|
7804 |
|
7805 |
|
7806 |
|
7807 |
|
7808 |
|
7809 |
|
7810 |
|
7811 |
|
7812 |
|
7813 |
|
7814 | function pullAllBy(array, values, iteratee) {
|
7815 | return (array && array.length && values && values.length)
|
7816 | ? basePullAll(array, values, getIteratee(iteratee, 2))
|
7817 | : array;
|
7818 | }
|
7819 |
|
7820 | |
7821 |
|
7822 |
|
7823 |
|
7824 |
|
7825 |
|
7826 |
|
7827 |
|
7828 |
|
7829 |
|
7830 |
|
7831 |
|
7832 |
|
7833 |
|
7834 |
|
7835 |
|
7836 |
|
7837 |
|
7838 |
|
7839 |
|
7840 |
|
7841 |
|
7842 |
|
7843 | function pullAllWith(array, values, comparator) {
|
7844 | return (array && array.length && values && values.length)
|
7845 | ? basePullAll(array, values, undefined, comparator)
|
7846 | : array;
|
7847 | }
|
7848 |
|
7849 | |
7850 |
|
7851 |
|
7852 |
|
7853 |
|
7854 |
|
7855 |
|
7856 |
|
7857 |
|
7858 |
|
7859 |
|
7860 |
|
7861 |
|
7862 |
|
7863 |
|
7864 |
|
7865 |
|
7866 |
|
7867 |
|
7868 |
|
7869 |
|
7870 |
|
7871 |
|
7872 |
|
7873 | var pullAt = flatRest(function(array, indexes) {
|
7874 | var length = array == null ? 0 : array.length,
|
7875 | result = baseAt(array, indexes);
|
7876 |
|
7877 | basePullAt(array, arrayMap(indexes, function(index) {
|
7878 | return isIndex(index, length) ? +index : index;
|
7879 | }).sort(compareAscending));
|
7880 |
|
7881 | return result;
|
7882 | });
|
7883 |
|
7884 | |
7885 |
|
7886 |
|
7887 |
|
7888 |
|
7889 |
|
7890 |
|
7891 |
|
7892 |
|
7893 |
|
7894 |
|
7895 |
|
7896 |
|
7897 |
|
7898 |
|
7899 |
|
7900 |
|
7901 |
|
7902 |
|
7903 |
|
7904 |
|
7905 |
|
7906 |
|
7907 |
|
7908 |
|
7909 |
|
7910 |
|
7911 |
|
7912 | function remove(array, predicate) {
|
7913 | var result = [];
|
7914 | if (!(array && array.length)) {
|
7915 | return result;
|
7916 | }
|
7917 | var index = -1,
|
7918 | indexes = [],
|
7919 | length = array.length;
|
7920 |
|
7921 | predicate = getIteratee(predicate, 3);
|
7922 | while (++index < length) {
|
7923 | var value = array[index];
|
7924 | if (predicate(value, index, array)) {
|
7925 | result.push(value);
|
7926 | indexes.push(index);
|
7927 | }
|
7928 | }
|
7929 | basePullAt(array, indexes);
|
7930 | return result;
|
7931 | }
|
7932 |
|
7933 | |
7934 |
|
7935 |
|
7936 |
|
7937 |
|
7938 |
|
7939 |
|
7940 |
|
7941 |
|
7942 |
|
7943 |
|
7944 |
|
7945 |
|
7946 |
|
7947 |
|
7948 |
|
7949 |
|
7950 |
|
7951 |
|
7952 |
|
7953 |
|
7954 |
|
7955 |
|
7956 | function reverse(array) {
|
7957 | return array == null ? array : nativeReverse.call(array);
|
7958 | }
|
7959 |
|
7960 | |
7961 |
|
7962 |
|
7963 |
|
7964 |
|
7965 |
|
7966 |
|
7967 |
|
7968 |
|
7969 |
|
7970 |
|
7971 |
|
7972 |
|
7973 |
|
7974 |
|
7975 |
|
7976 | function slice(array, start, end) {
|
7977 | var length = array == null ? 0 : array.length;
|
7978 | if (!length) {
|
7979 | return [];
|
7980 | }
|
7981 | if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
|
7982 | start = 0;
|
7983 | end = length;
|
7984 | }
|
7985 | else {
|
7986 | start = start == null ? 0 : toInteger(start);
|
7987 | end = end === undefined ? length : toInteger(end);
|
7988 | }
|
7989 | return baseSlice(array, start, end);
|
7990 | }
|
7991 |
|
7992 | |
7993 |
|
7994 |
|
7995 |
|
7996 |
|
7997 |
|
7998 |
|
7999 |
|
8000 |
|
8001 |
|
8002 |
|
8003 |
|
8004 |
|
8005 |
|
8006 |
|
8007 |
|
8008 |
|
8009 | function sortedIndex(array, value) {
|
8010 | return baseSortedIndex(array, value);
|
8011 | }
|
8012 |
|
8013 | |
8014 |
|
8015 |
|
8016 |
|
8017 |
|
8018 |
|
8019 |
|
8020 |
|
8021 |
|
8022 |
|
8023 |
|
8024 |
|
8025 |
|
8026 |
|
8027 |
|
8028 |
|
8029 |
|
8030 |
|
8031 |
|
8032 |
|
8033 |
|
8034 |
|
8035 |
|
8036 |
|
8037 |
|
8038 | function sortedIndexBy(array, value, iteratee) {
|
8039 | return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
|
8040 | }
|
8041 |
|
8042 | |
8043 |
|
8044 |
|
8045 |
|
8046 |
|
8047 |
|
8048 |
|
8049 |
|
8050 |
|
8051 |
|
8052 |
|
8053 |
|
8054 |
|
8055 |
|
8056 |
|
8057 |
|
8058 | function sortedIndexOf(array, value) {
|
8059 | var length = array == null ? 0 : array.length;
|
8060 | if (length) {
|
8061 | var index = baseSortedIndex(array, value);
|
8062 | if (index < length && eq(array[index], value)) {
|
8063 | return index;
|
8064 | }
|
8065 | }
|
8066 | return -1;
|
8067 | }
|
8068 |
|
8069 | |
8070 |
|
8071 |
|
8072 |
|
8073 |
|
8074 |
|
8075 |
|
8076 |
|
8077 |
|
8078 |
|
8079 |
|
8080 |
|
8081 |
|
8082 |
|
8083 |
|
8084 |
|
8085 |
|
8086 |
|
8087 | function sortedLastIndex(array, value) {
|
8088 | return baseSortedIndex(array, value, true);
|
8089 | }
|
8090 |
|
8091 | |
8092 |
|
8093 |
|
8094 |
|
8095 |
|
8096 |
|
8097 |
|
8098 |
|
8099 |
|
8100 |
|
8101 |
|
8102 |
|
8103 |
|
8104 |
|
8105 |
|
8106 |
|
8107 |
|
8108 |
|
8109 |
|
8110 |
|
8111 |
|
8112 |
|
8113 |
|
8114 |
|
8115 |
|
8116 | function sortedLastIndexBy(array, value, iteratee) {
|
8117 | return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
|
8118 | }
|
8119 |
|
8120 | |
8121 |
|
8122 |
|
8123 |
|
8124 |
|
8125 |
|
8126 |
|
8127 |
|
8128 |
|
8129 |
|
8130 |
|
8131 |
|
8132 |
|
8133 |
|
8134 |
|
8135 |
|
8136 | function sortedLastIndexOf(array, value) {
|
8137 | var length = array == null ? 0 : array.length;
|
8138 | if (length) {
|
8139 | var index = baseSortedIndex(array, value, true) - 1;
|
8140 | if (eq(array[index], value)) {
|
8141 | return index;
|
8142 | }
|
8143 | }
|
8144 | return -1;
|
8145 | }
|
8146 |
|
8147 | |
8148 |
|
8149 |
|
8150 |
|
8151 |
|
8152 |
|
8153 |
|
8154 |
|
8155 |
|
8156 |
|
8157 |
|
8158 |
|
8159 |
|
8160 |
|
8161 |
|
8162 | function sortedUniq(array) {
|
8163 | return (array && array.length)
|
8164 | ? baseSortedUniq(array)
|
8165 | : [];
|
8166 | }
|
8167 |
|
8168 | |
8169 |
|
8170 |
|
8171 |
|
8172 |
|
8173 |
|
8174 |
|
8175 |
|
8176 |
|
8177 |
|
8178 |
|
8179 |
|
8180 |
|
8181 |
|
8182 |
|
8183 |
|
8184 | function sortedUniqBy(array, iteratee) {
|
8185 | return (array && array.length)
|
8186 | ? baseSortedUniq(array, getIteratee(iteratee, 2))
|
8187 | : [];
|
8188 | }
|
8189 |
|
8190 | |
8191 |
|
8192 |
|
8193 |
|
8194 |
|
8195 |
|
8196 |
|
8197 |
|
8198 |
|
8199 |
|
8200 |
|
8201 |
|
8202 |
|
8203 |
|
8204 | function tail(array) {
|
8205 | var length = array == null ? 0 : array.length;
|
8206 | return length ? baseSlice(array, 1, length) : [];
|
8207 | }
|
8208 |
|
8209 | |
8210 |
|
8211 |
|
8212 |
|
8213 |
|
8214 |
|
8215 |
|
8216 |
|
8217 |
|
8218 |
|
8219 |
|
8220 |
|
8221 |
|
8222 |
|
8223 |
|
8224 |
|
8225 |
|
8226 |
|
8227 |
|
8228 |
|
8229 |
|
8230 |
|
8231 |
|
8232 |
|
8233 |
|
8234 | function take(array, n, guard) {
|
8235 | if (!(array && array.length)) {
|
8236 | return [];
|
8237 | }
|
8238 | n = (guard || n === undefined) ? 1 : toInteger(n);
|
8239 | return baseSlice(array, 0, n < 0 ? 0 : n);
|
8240 | }
|
8241 |
|
8242 | |
8243 |
|
8244 |
|
8245 |
|
8246 |
|
8247 |
|
8248 |
|
8249 |
|
8250 |
|
8251 |
|
8252 |
|
8253 |
|
8254 |
|
8255 |
|
8256 |
|
8257 |
|
8258 |
|
8259 |
|
8260 |
|
8261 |
|
8262 |
|
8263 |
|
8264 |
|
8265 |
|
8266 |
|
8267 | function takeRight(array, n, guard) {
|
8268 | var length = array == null ? 0 : array.length;
|
8269 | if (!length) {
|
8270 | return [];
|
8271 | }
|
8272 | n = (guard || n === undefined) ? 1 : toInteger(n);
|
8273 | n = length - n;
|
8274 | return baseSlice(array, n < 0 ? 0 : n, length);
|
8275 | }
|
8276 |
|
8277 | |
8278 |
|
8279 |
|
8280 |
|
8281 |
|
8282 |
|
8283 |
|
8284 |
|
8285 |
|
8286 |
|
8287 |
|
8288 |
|
8289 |
|
8290 |
|
8291 |
|
8292 |
|
8293 |
|
8294 |
|
8295 |
|
8296 |
|
8297 |
|
8298 |
|
8299 |
|
8300 |
|
8301 |
|
8302 |
|
8303 |
|
8304 |
|
8305 |
|
8306 |
|
8307 |
|
8308 |
|
8309 |
|
8310 |
|
8311 |
|
8312 | function takeRightWhile(array, predicate) {
|
8313 | return (array && array.length)
|
8314 | ? baseWhile(array, getIteratee(predicate, 3), false, true)
|
8315 | : [];
|
8316 | }
|
8317 |
|
8318 | |
8319 |
|
8320 |
|
8321 |
|
8322 |
|
8323 |
|
8324 |
|
8325 |
|
8326 |
|
8327 |
|
8328 |
|
8329 |
|
8330 |
|
8331 |
|
8332 |
|
8333 |
|
8334 |
|
8335 |
|
8336 |
|
8337 |
|
8338 |
|
8339 |
|
8340 |
|
8341 |
|
8342 |
|
8343 |
|
8344 |
|
8345 |
|
8346 |
|
8347 |
|
8348 |
|
8349 |
|
8350 |
|
8351 |
|
8352 |
|
8353 | function takeWhile(array, predicate) {
|
8354 | return (array && array.length)
|
8355 | ? baseWhile(array, getIteratee(predicate, 3))
|
8356 | : [];
|
8357 | }
|
8358 |
|
8359 | |
8360 |
|
8361 |
|
8362 |
|
8363 |
|
8364 |
|
8365 |
|
8366 |
|
8367 |
|
8368 |
|
8369 |
|
8370 |
|
8371 |
|
8372 |
|
8373 |
|
8374 |
|
8375 | var union = baseRest(function(arrays) {
|
8376 | return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
|
8377 | });
|
8378 |
|
8379 | |
8380 |
|
8381 |
|
8382 |
|
8383 |
|
8384 |
|
8385 |
|
8386 |
|
8387 |
|
8388 |
|
8389 |
|
8390 |
|
8391 |
|
8392 |
|
8393 |
|
8394 |
|
8395 |
|
8396 |
|
8397 |
|
8398 |
|
8399 |
|
8400 |
|
8401 |
|
8402 | var unionBy = baseRest(function(arrays) {
|
8403 | var iteratee = last(arrays);
|
8404 | if (isArrayLikeObject(iteratee)) {
|
8405 | iteratee = undefined;
|
8406 | }
|
8407 | return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
|
8408 | });
|
8409 |
|
8410 | |
8411 |
|
8412 |
|
8413 |
|
8414 |
|
8415 |
|
8416 |
|
8417 |
|
8418 |
|
8419 |
|
8420 |
|
8421 |
|
8422 |
|
8423 |
|
8424 |
|
8425 |
|
8426 |
|
8427 |
|
8428 |
|
8429 |
|
8430 |
|
8431 | var unionWith = baseRest(function(arrays) {
|
8432 | var comparator = last(arrays);
|
8433 | comparator = typeof comparator == 'function' ? comparator : undefined;
|
8434 | return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
|
8435 | });
|
8436 |
|
8437 | |
8438 |
|
8439 |
|
8440 |
|
8441 |
|
8442 |
|
8443 |
|
8444 |
|
8445 |
|
8446 |
|
8447 |
|
8448 |
|
8449 |
|
8450 |
|
8451 |
|
8452 |
|
8453 |
|
8454 |
|
8455 | function uniq(array) {
|
8456 | return (array && array.length) ? baseUniq(array) : [];
|
8457 | }
|
8458 |
|
8459 | |
8460 |
|
8461 |
|
8462 |
|
8463 |
|
8464 |
|
8465 |
|
8466 |
|
8467 |
|
8468 |
|
8469 |
|
8470 |
|
8471 |
|
8472 |
|
8473 |
|
8474 |
|
8475 |
|
8476 |
|
8477 |
|
8478 |
|
8479 |
|
8480 |
|
8481 |
|
8482 | function uniqBy(array, iteratee) {
|
8483 | return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
|
8484 | }
|
8485 |
|
8486 | |
8487 |
|
8488 |
|
8489 |
|
8490 |
|
8491 |
|
8492 |
|
8493 |
|
8494 |
|
8495 |
|
8496 |
|
8497 |
|
8498 |
|
8499 |
|
8500 |
|
8501 |
|
8502 |
|
8503 |
|
8504 |
|
8505 |
|
8506 | function uniqWith(array, comparator) {
|
8507 | comparator = typeof comparator == 'function' ? comparator : undefined;
|
8508 | return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
|
8509 | }
|
8510 |
|
8511 | |
8512 |
|
8513 |
|
8514 |
|
8515 |
|
8516 |
|
8517 |
|
8518 |
|
8519 |
|
8520 |
|
8521 |
|
8522 |
|
8523 |
|
8524 |
|
8525 |
|
8526 |
|
8527 |
|
8528 |
|
8529 |
|
8530 | function unzip(array) {
|
8531 | if (!(array && array.length)) {
|
8532 | return [];
|
8533 | }
|
8534 | var length = 0;
|
8535 | array = arrayFilter(array, function(group) {
|
8536 | if (isArrayLikeObject(group)) {
|
8537 | length = nativeMax(group.length, length);
|
8538 | return true;
|
8539 | }
|
8540 | });
|
8541 | return baseTimes(length, function(index) {
|
8542 | return arrayMap(array, baseProperty(index));
|
8543 | });
|
8544 | }
|
8545 |
|
8546 | |
8547 |
|
8548 |
|
8549 |
|
8550 |
|
8551 |
|
8552 |
|
8553 |
|
8554 |
|
8555 |
|
8556 |
|
8557 |
|
8558 |
|
8559 |
|
8560 |
|
8561 |
|
8562 |
|
8563 |
|
8564 |
|
8565 |
|
8566 |
|
8567 | function unzipWith(array, iteratee) {
|
8568 | if (!(array && array.length)) {
|
8569 | return [];
|
8570 | }
|
8571 | var result = unzip(array);
|
8572 | if (iteratee == null) {
|
8573 | return result;
|
8574 | }
|
8575 | return arrayMap(result, function(group) {
|
8576 | return apply(iteratee, undefined, group);
|
8577 | });
|
8578 | }
|
8579 |
|
8580 | |
8581 |
|
8582 |
|
8583 |
|
8584 |
|
8585 |
|
8586 |
|
8587 |
|
8588 |
|
8589 |
|
8590 |
|
8591 |
|
8592 |
|
8593 |
|
8594 |
|
8595 |
|
8596 |
|
8597 |
|
8598 |
|
8599 |
|
8600 | var without = baseRest(function(array, values) {
|
8601 | return isArrayLikeObject(array)
|
8602 | ? baseDifference(array, values)
|
8603 | : [];
|
8604 | });
|
8605 |
|
8606 | |
8607 |
|
8608 |
|
8609 |
|
8610 |
|
8611 |
|
8612 |
|
8613 |
|
8614 |
|
8615 |
|
8616 |
|
8617 |
|
8618 |
|
8619 |
|
8620 |
|
8621 |
|
8622 |
|
8623 |
|
8624 | var xor = baseRest(function(arrays) {
|
8625 | return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
8626 | });
|
8627 |
|
8628 | |
8629 |
|
8630 |
|
8631 |
|
8632 |
|
8633 |
|
8634 |
|
8635 |
|
8636 |
|
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 |
|
8644 |
|
8645 |
|
8646 |
|
8647 |
|
8648 |
|
8649 |
|
8650 |
|
8651 | var xorBy = baseRest(function(arrays) {
|
8652 | var iteratee = last(arrays);
|
8653 | if (isArrayLikeObject(iteratee)) {
|
8654 | iteratee = undefined;
|
8655 | }
|
8656 | return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
|
8657 | });
|
8658 |
|
8659 | |
8660 |
|
8661 |
|
8662 |
|
8663 |
|
8664 |
|
8665 |
|
8666 |
|
8667 |
|
8668 |
|
8669 |
|
8670 |
|
8671 |
|
8672 |
|
8673 |
|
8674 |
|
8675 |
|
8676 |
|
8677 |
|
8678 |
|
8679 |
|
8680 | var xorWith = baseRest(function(arrays) {
|
8681 | var comparator = last(arrays);
|
8682 | comparator = typeof comparator == 'function' ? comparator : undefined;
|
8683 | return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
|
8684 | });
|
8685 |
|
8686 | |
8687 |
|
8688 |
|
8689 |
|
8690 |
|
8691 |
|
8692 |
|
8693 |
|
8694 |
|
8695 |
|
8696 |
|
8697 |
|
8698 |
|
8699 |
|
8700 |
|
8701 |
|
8702 | var zip = baseRest(unzip);
|
8703 |
|
8704 | |
8705 |
|
8706 |
|
8707 |
|
8708 |
|
8709 |
|
8710 |
|
8711 |
|
8712 |
|
8713 |
|
8714 |
|
8715 |
|
8716 |
|
8717 |
|
8718 |
|
8719 |
|
8720 | function zipObject(props, values) {
|
8721 | return baseZipObject(props || [], values || [], assignValue);
|
8722 | }
|
8723 |
|
8724 | |
8725 |
|
8726 |
|
8727 |
|
8728 |
|
8729 |
|
8730 |
|
8731 |
|
8732 |
|
8733 |
|
8734 |
|
8735 |
|
8736 |
|
8737 |
|
8738 |
|
8739 | function zipObjectDeep(props, values) {
|
8740 | return baseZipObject(props || [], values || [], baseSet);
|
8741 | }
|
8742 |
|
8743 | |
8744 |
|
8745 |
|
8746 |
|
8747 |
|
8748 |
|
8749 |
|
8750 |
|
8751 |
|
8752 |
|
8753 |
|
8754 |
|
8755 |
|
8756 |
|
8757 |
|
8758 |
|
8759 |
|
8760 |
|
8761 |
|
8762 |
|
8763 | var zipWith = baseRest(function(arrays) {
|
8764 | var length = arrays.length,
|
8765 | iteratee = length > 1 ? arrays[length - 1] : undefined;
|
8766 |
|
8767 | iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
|
8768 | return unzipWith(arrays, iteratee);
|
8769 | });
|
8770 |
|
8771 |
|
8772 |
|
8773 | |
8774 |
|
8775 |
|
8776 |
|
8777 |
|
8778 |
|
8779 |
|
8780 |
|
8781 |
|
8782 |
|
8783 |
|
8784 |
|
8785 |
|
8786 |
|
8787 |
|
8788 |
|
8789 |
|
8790 |
|
8791 |
|
8792 |
|
8793 |
|
8794 |
|
8795 |
|
8796 |
|
8797 |
|
8798 |
|
8799 |
|
8800 |
|
8801 |
|
8802 | function chain(value) {
|
8803 | var result = lodash(value);
|
8804 | result.__chain__ = true;
|
8805 | return result;
|
8806 | }
|
8807 |
|
8808 | |
8809 |
|
8810 |
|
8811 |
|
8812 |
|
8813 |
|
8814 |
|
8815 |
|
8816 |
|
8817 |
|
8818 |
|
8819 |
|
8820 |
|
8821 |
|
8822 |
|
8823 |
|
8824 |
|
8825 |
|
8826 |
|
8827 |
|
8828 |
|
8829 |
|
8830 |
|
8831 | function tap(value, interceptor) {
|
8832 | interceptor(value);
|
8833 | return value;
|
8834 | }
|
8835 |
|
8836 | |
8837 |
|
8838 |
|
8839 |
|
8840 |
|
8841 |
|
8842 |
|
8843 |
|
8844 |
|
8845 |
|
8846 |
|
8847 |
|
8848 |
|
8849 |
|
8850 |
|
8851 |
|
8852 |
|
8853 |
|
8854 |
|
8855 |
|
8856 |
|
8857 |
|
8858 |
|
8859 | function thru(value, interceptor) {
|
8860 | return interceptor(value);
|
8861 | }
|
8862 |
|
8863 | |
8864 |
|
8865 |
|
8866 |
|
8867 |
|
8868 |
|
8869 |
|
8870 |
|
8871 |
|
8872 |
|
8873 |
|
8874 |
|
8875 |
|
8876 |
|
8877 |
|
8878 |
|
8879 | var wrapperAt = flatRest(function(paths) {
|
8880 | var length = paths.length,
|
8881 | start = length ? paths[0] : 0,
|
8882 | value = this.__wrapped__,
|
8883 | interceptor = function(object) { return baseAt(object, paths); };
|
8884 |
|
8885 | if (length > 1 || this.__actions__.length ||
|
8886 | !(value instanceof LazyWrapper) || !isIndex(start)) {
|
8887 | return this.thru(interceptor);
|
8888 | }
|
8889 | value = value.slice(start, +start + (length ? 1 : 0));
|
8890 | value.__actions__.push({
|
8891 | 'func': thru,
|
8892 | 'args': [interceptor],
|
8893 | 'thisArg': undefined
|
8894 | });
|
8895 | return new LodashWrapper(value, this.__chain__).thru(function(array) {
|
8896 | if (length && !array.length) {
|
8897 | array.push(undefined);
|
8898 | }
|
8899 | return array;
|
8900 | });
|
8901 | });
|
8902 |
|
8903 | |
8904 |
|
8905 |
|
8906 |
|
8907 |
|
8908 |
|
8909 |
|
8910 |
|
8911 |
|
8912 |
|
8913 |
|
8914 |
|
8915 |
|
8916 |
|
8917 |
|
8918 |
|
8919 |
|
8920 |
|
8921 |
|
8922 |
|
8923 |
|
8924 |
|
8925 |
|
8926 |
|
8927 |
|
8928 |
|
8929 |
|
8930 | function wrapperChain() {
|
8931 | return chain(this);
|
8932 | }
|
8933 |
|
8934 | |
8935 |
|
8936 |
|
8937 |
|
8938 |
|
8939 |
|
8940 |
|
8941 |
|
8942 |
|
8943 |
|
8944 |
|
8945 |
|
8946 |
|
8947 |
|
8948 |
|
8949 |
|
8950 |
|
8951 |
|
8952 |
|
8953 |
|
8954 |
|
8955 |
|
8956 |
|
8957 |
|
8958 |
|
8959 |
|
8960 | function wrapperCommit() {
|
8961 | return new LodashWrapper(this.value(), this.__chain__);
|
8962 | }
|
8963 |
|
8964 | |
8965 |
|
8966 |
|
8967 |
|
8968 |
|
8969 |
|
8970 |
|
8971 |
|
8972 |
|
8973 |
|
8974 |
|
8975 |
|
8976 |
|
8977 |
|
8978 |
|
8979 |
|
8980 |
|
8981 |
|
8982 |
|
8983 |
|
8984 |
|
8985 |
|
8986 | function wrapperNext() {
|
8987 | if (this.__values__ === undefined) {
|
8988 | this.__values__ = toArray(this.value());
|
8989 | }
|
8990 | var done = this.__index__ >= this.__values__.length,
|
8991 | value = done ? undefined : this.__values__[this.__index__++];
|
8992 |
|
8993 | return { 'done': done, 'value': value };
|
8994 | }
|
8995 |
|
8996 | |
8997 |
|
8998 |
|
8999 |
|
9000 |
|
9001 |
|
9002 |
|
9003 |
|
9004 |
|
9005 |
|
9006 |
|
9007 |
|
9008 |
|
9009 |
|
9010 |
|
9011 |
|
9012 |
|
9013 |
|
9014 | function wrapperToIterator() {
|
9015 | return this;
|
9016 | }
|
9017 |
|
9018 | |
9019 |
|
9020 |
|
9021 |
|
9022 |
|
9023 |
|
9024 |
|
9025 |
|
9026 |
|
9027 |
|
9028 |
|
9029 |
|
9030 |
|
9031 |
|
9032 |
|
9033 |
|
9034 |
|
9035 |
|
9036 |
|
9037 |
|
9038 |
|
9039 |
|
9040 |
|
9041 |
|
9042 | function wrapperPlant(value) {
|
9043 | var result,
|
9044 | parent = this;
|
9045 |
|
9046 | while (parent instanceof baseLodash) {
|
9047 | var clone = wrapperClone(parent);
|
9048 | clone.__index__ = 0;
|
9049 | clone.__values__ = undefined;
|
9050 | if (result) {
|
9051 | previous.__wrapped__ = clone;
|
9052 | } else {
|
9053 | result = clone;
|
9054 | }
|
9055 | var previous = clone;
|
9056 | parent = parent.__wrapped__;
|
9057 | }
|
9058 | previous.__wrapped__ = value;
|
9059 | return result;
|
9060 | }
|
9061 |
|
9062 | |
9063 |
|
9064 |
|
9065 |
|
9066 |
|
9067 |
|
9068 |
|
9069 |
|
9070 |
|
9071 |
|
9072 |
|
9073 |
|
9074 |
|
9075 |
|
9076 |
|
9077 |
|
9078 |
|
9079 |
|
9080 |
|
9081 |
|
9082 | function wrapperReverse() {
|
9083 | var value = this.__wrapped__;
|
9084 | if (value instanceof LazyWrapper) {
|
9085 | var wrapped = value;
|
9086 | if (this.__actions__.length) {
|
9087 | wrapped = new LazyWrapper(this);
|
9088 | }
|
9089 | wrapped = wrapped.reverse();
|
9090 | wrapped.__actions__.push({
|
9091 | 'func': thru,
|
9092 | 'args': [reverse],
|
9093 | 'thisArg': undefined
|
9094 | });
|
9095 | return new LodashWrapper(wrapped, this.__chain__);
|
9096 | }
|
9097 | return this.thru(reverse);
|
9098 | }
|
9099 |
|
9100 | |
9101 |
|
9102 |
|
9103 |
|
9104 |
|
9105 |
|
9106 |
|
9107 |
|
9108 |
|
9109 |
|
9110 |
|
9111 |
|
9112 |
|
9113 |
|
9114 | function wrapperValue() {
|
9115 | return baseWrapperValue(this.__wrapped__, this.__actions__);
|
9116 | }
|
9117 |
|
9118 |
|
9119 |
|
9120 | |
9121 |
|
9122 |
|
9123 |
|
9124 |
|
9125 |
|
9126 |
|
9127 |
|
9128 |
|
9129 |
|
9130 |
|
9131 |
|
9132 |
|
9133 |
|
9134 |
|
9135 |
|
9136 |
|
9137 |
|
9138 |
|
9139 |
|
9140 |
|
9141 |
|
9142 | var countBy = createAggregator(function(result, value, key) {
|
9143 | if (hasOwnProperty.call(result, key)) {
|
9144 | ++result[key];
|
9145 | } else {
|
9146 | baseAssignValue(result, key, 1);
|
9147 | }
|
9148 | });
|
9149 |
|
9150 | |
9151 |
|
9152 |
|
9153 |
|
9154 |
|
9155 |
|
9156 |
|
9157 |
|
9158 |
|
9159 |
|
9160 |
|
9161 |
|
9162 |
|
9163 |
|
9164 |
|
9165 |
|
9166 |
|
9167 |
|
9168 |
|
9169 |
|
9170 |
|
9171 |
|
9172 |
|
9173 |
|
9174 |
|
9175 |
|
9176 |
|
9177 |
|
9178 |
|
9179 |
|
9180 |
|
9181 |
|
9182 |
|
9183 |
|
9184 |
|
9185 |
|
9186 |
|
9187 |
|
9188 |
|
9189 |
|
9190 |
|
9191 | function every(collection, predicate, guard) {
|
9192 | var func = isArray(collection) ? arrayEvery : baseEvery;
|
9193 | if (guard && isIterateeCall(collection, predicate, guard)) {
|
9194 | predicate = undefined;
|
9195 | }
|
9196 | return func(collection, getIteratee(predicate, 3));
|
9197 | }
|
9198 |
|
9199 | |
9200 |
|
9201 |
|
9202 |
|
9203 |
|
9204 |
|
9205 |
|
9206 |
|
9207 |
|
9208 |
|
9209 |
|
9210 |
|
9211 |
|
9212 |
|
9213 |
|
9214 |
|
9215 |
|
9216 |
|
9217 |
|
9218 |
|
9219 |
|
9220 |
|
9221 |
|
9222 |
|
9223 |
|
9224 |
|
9225 |
|
9226 |
|
9227 |
|
9228 |
|
9229 |
|
9230 |
|
9231 |
|
9232 |
|
9233 |
|
9234 |
|
9235 |
|
9236 | function filter(collection, predicate) {
|
9237 | var func = isArray(collection) ? arrayFilter : baseFilter;
|
9238 | return func(collection, getIteratee(predicate, 3));
|
9239 | }
|
9240 |
|
9241 | |
9242 |
|
9243 |
|
9244 |
|
9245 |
|
9246 |
|
9247 |
|
9248 |
|
9249 |
|
9250 |
|
9251 |
|
9252 |
|
9253 |
|
9254 |
|
9255 |
|
9256 |
|
9257 |
|
9258 |
|
9259 |
|
9260 |
|
9261 |
|
9262 |
|
9263 |
|
9264 |
|
9265 |
|
9266 |
|
9267 |
|
9268 |
|
9269 |
|
9270 |
|
9271 |
|
9272 |
|
9273 |
|
9274 |
|
9275 |
|
9276 |
|
9277 | var find = createFind(findIndex);
|
9278 |
|
9279 | |
9280 |
|
9281 |
|
9282 |
|
9283 |
|
9284 |
|
9285 |
|
9286 |
|
9287 |
|
9288 |
|
9289 |
|
9290 |
|
9291 |
|
9292 |
|
9293 |
|
9294 |
|
9295 |
|
9296 |
|
9297 |
|
9298 | var findLast = createFind(findLastIndex);
|
9299 |
|
9300 | |
9301 |
|
9302 |
|
9303 |
|
9304 |
|
9305 |
|
9306 |
|
9307 |
|
9308 |
|
9309 |
|
9310 |
|
9311 |
|
9312 |
|
9313 |
|
9314 |
|
9315 |
|
9316 |
|
9317 |
|
9318 |
|
9319 |
|
9320 |
|
9321 | function flatMap(collection, iteratee) {
|
9322 | return baseFlatten(map(collection, iteratee), 1);
|
9323 | }
|
9324 |
|
9325 | |
9326 |
|
9327 |
|
9328 |
|
9329 |
|
9330 |
|
9331 |
|
9332 |
|
9333 |
|
9334 |
|
9335 |
|
9336 |
|
9337 |
|
9338 |
|
9339 |
|
9340 |
|
9341 |
|
9342 |
|
9343 |
|
9344 |
|
9345 | function flatMapDeep(collection, iteratee) {
|
9346 | return baseFlatten(map(collection, iteratee), INFINITY);
|
9347 | }
|
9348 |
|
9349 | |
9350 |
|
9351 |
|
9352 |
|
9353 |
|
9354 |
|
9355 |
|
9356 |
|
9357 |
|
9358 |
|
9359 |
|
9360 |
|
9361 |
|
9362 |
|
9363 |
|
9364 |
|
9365 |
|
9366 |
|
9367 |
|
9368 |
|
9369 |
|
9370 | function flatMapDepth(collection, iteratee, depth) {
|
9371 | depth = depth === undefined ? 1 : toInteger(depth);
|
9372 | return baseFlatten(map(collection, iteratee), depth);
|
9373 | }
|
9374 |
|
9375 | |
9376 |
|
9377 |
|
9378 |
|
9379 |
|
9380 |
|
9381 |
|
9382 |
|
9383 |
|
9384 |
|
9385 |
|
9386 |
|
9387 |
|
9388 |
|
9389 |
|
9390 |
|
9391 |
|
9392 |
|
9393 |
|
9394 |
|
9395 |
|
9396 |
|
9397 |
|
9398 |
|
9399 |
|
9400 |
|
9401 |
|
9402 |
|
9403 |
|
9404 |
|
9405 | function forEach(collection, iteratee) {
|
9406 | var func = isArray(collection) ? arrayEach : baseEach;
|
9407 | return func(collection, getIteratee(iteratee, 3));
|
9408 | }
|
9409 |
|
9410 | |
9411 |
|
9412 |
|
9413 |
|
9414 |
|
9415 |
|
9416 |
|
9417 |
|
9418 |
|
9419 |
|
9420 |
|
9421 |
|
9422 |
|
9423 |
|
9424 |
|
9425 |
|
9426 |
|
9427 |
|
9428 |
|
9429 |
|
9430 | function forEachRight(collection, iteratee) {
|
9431 | var func = isArray(collection) ? arrayEachRight : baseEachRight;
|
9432 | return func(collection, getIteratee(iteratee, 3));
|
9433 | }
|
9434 |
|
9435 | |
9436 |
|
9437 |
|
9438 |
|
9439 |
|
9440 |
|
9441 |
|
9442 |
|
9443 |
|
9444 |
|
9445 |
|
9446 |
|
9447 |
|
9448 |
|
9449 |
|
9450 |
|
9451 |
|
9452 |
|
9453 |
|
9454 |
|
9455 |
|
9456 |
|
9457 |
|
9458 | var groupBy = createAggregator(function(result, value, key) {
|
9459 | if (hasOwnProperty.call(result, key)) {
|
9460 | result[key].push(value);
|
9461 | } else {
|
9462 | baseAssignValue(result, key, [value]);
|
9463 | }
|
9464 | });
|
9465 |
|
9466 | |
9467 |
|
9468 |
|
9469 |
|
9470 |
|
9471 |
|
9472 |
|
9473 |
|
9474 |
|
9475 |
|
9476 |
|
9477 |
|
9478 |
|
9479 |
|
9480 |
|
9481 |
|
9482 |
|
9483 |
|
9484 |
|
9485 |
|
9486 |
|
9487 |
|
9488 |
|
9489 |
|
9490 |
|
9491 |
|
9492 |
|
9493 |
|
9494 |
|
9495 |
|
9496 | function includes(collection, value, fromIndex, guard) {
|
9497 | collection = isArrayLike(collection) ? collection : values(collection);
|
9498 | fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
|
9499 |
|
9500 | var length = collection.length;
|
9501 | if (fromIndex < 0) {
|
9502 | fromIndex = nativeMax(length + fromIndex, 0);
|
9503 | }
|
9504 | return isString(collection)
|
9505 | ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
|
9506 | : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
|
9507 | }
|
9508 |
|
9509 | |
9510 |
|
9511 |
|
9512 |
|
9513 |
|
9514 |
|
9515 |
|
9516 |
|
9517 |
|
9518 |
|
9519 |
|
9520 |
|
9521 |
|
9522 |
|
9523 |
|
9524 |
|
9525 |
|
9526 |
|
9527 |
|
9528 |
|
9529 |
|
9530 |
|
9531 |
|
9532 | var invokeMap = baseRest(function(collection, path, args) {
|
9533 | var index = -1,
|
9534 | isFunc = typeof path == 'function',
|
9535 | result = isArrayLike(collection) ? Array(collection.length) : [];
|
9536 |
|
9537 | baseEach(collection, function(value) {
|
9538 | result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
9539 | });
|
9540 | return result;
|
9541 | });
|
9542 |
|
9543 | |
9544 |
|
9545 |
|
9546 |
|
9547 |
|
9548 |
|
9549 |
|
9550 |
|
9551 |
|
9552 |
|
9553 |
|
9554 |
|
9555 |
|
9556 |
|
9557 |
|
9558 |
|
9559 |
|
9560 |
|
9561 |
|
9562 |
|
9563 |
|
9564 |
|
9565 |
|
9566 |
|
9567 |
|
9568 |
|
9569 |
|
9570 |
|
9571 | var keyBy = createAggregator(function(result, value, key) {
|
9572 | baseAssignValue(result, key, value);
|
9573 | });
|
9574 |
|
9575 | |
9576 |
|
9577 |
|
9578 |
|
9579 |
|
9580 |
|
9581 |
|
9582 |
|
9583 |
|
9584 |
|
9585 |
|
9586 |
|
9587 |
|
9588 |
|
9589 |
|
9590 |
|
9591 |
|
9592 |
|
9593 |
|
9594 |
|
9595 |
|
9596 |
|
9597 |
|
9598 |
|
9599 |
|
9600 |
|
9601 |
|
9602 |
|
9603 |
|
9604 |
|
9605 |
|
9606 |
|
9607 |
|
9608 |
|
9609 |
|
9610 |
|
9611 |
|
9612 |
|
9613 |
|
9614 |
|
9615 |
|
9616 |
|
9617 | function map(collection, iteratee) {
|
9618 | var func = isArray(collection) ? arrayMap : baseMap;
|
9619 | return func(collection, getIteratee(iteratee, 3));
|
9620 | }
|
9621 |
|
9622 | |
9623 |
|
9624 |
|
9625 |
|
9626 |
|
9627 |
|
9628 |
|
9629 |
|
9630 |
|
9631 |
|
9632 |
|
9633 |
|
9634 |
|
9635 |
|
9636 |
|
9637 |
|
9638 |
|
9639 |
|
9640 |
|
9641 |
|
9642 |
|
9643 |
|
9644 |
|
9645 |
|
9646 |
|
9647 |
|
9648 |
|
9649 |
|
9650 |
|
9651 | function orderBy(collection, iteratees, orders, guard) {
|
9652 | if (collection == null) {
|
9653 | return [];
|
9654 | }
|
9655 | if (!isArray(iteratees)) {
|
9656 | iteratees = iteratees == null ? [] : [iteratees];
|
9657 | }
|
9658 | orders = guard ? undefined : orders;
|
9659 | if (!isArray(orders)) {
|
9660 | orders = orders == null ? [] : [orders];
|
9661 | }
|
9662 | return baseOrderBy(collection, iteratees, orders);
|
9663 | }
|
9664 |
|
9665 | |
9666 |
|
9667 |
|
9668 |
|
9669 |
|
9670 |
|
9671 |
|
9672 |
|
9673 |
|
9674 |
|
9675 |
|
9676 |
|
9677 |
|
9678 |
|
9679 |
|
9680 |
|
9681 |
|
9682 |
|
9683 |
|
9684 |
|
9685 |
|
9686 |
|
9687 |
|
9688 |
|
9689 |
|
9690 |
|
9691 |
|
9692 |
|
9693 |
|
9694 |
|
9695 |
|
9696 |
|
9697 |
|
9698 |
|
9699 |
|
9700 |
|
9701 | var partition = createAggregator(function(result, value, key) {
|
9702 | result[key ? 0 : 1].push(value);
|
9703 | }, function() { return [[], []]; });
|
9704 |
|
9705 | |
9706 |
|
9707 |
|
9708 |
|
9709 |
|
9710 |
|
9711 |
|
9712 |
|
9713 |
|
9714 |
|
9715 |
|
9716 |
|
9717 |
|
9718 |
|
9719 |
|
9720 |
|
9721 |
|
9722 |
|
9723 |
|
9724 |
|
9725 |
|
9726 |
|
9727 |
|
9728 |
|
9729 |
|
9730 |
|
9731 |
|
9732 |
|
9733 |
|
9734 |
|
9735 |
|
9736 |
|
9737 |
|
9738 |
|
9739 |
|
9740 |
|
9741 |
|
9742 | function reduce(collection, iteratee, accumulator) {
|
9743 | var func = isArray(collection) ? arrayReduce : baseReduce,
|
9744 | initAccum = arguments.length < 3;
|
9745 |
|
9746 | return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
|
9747 | }
|
9748 |
|
9749 | |
9750 |
|
9751 |
|
9752 |
|
9753 |
|
9754 |
|
9755 |
|
9756 |
|
9757 |
|
9758 |
|
9759 |
|
9760 |
|
9761 |
|
9762 |
|
9763 |
|
9764 |
|
9765 |
|
9766 |
|
9767 |
|
9768 |
|
9769 |
|
9770 |
|
9771 | function reduceRight(collection, iteratee, accumulator) {
|
9772 | var func = isArray(collection) ? arrayReduceRight : baseReduce,
|
9773 | initAccum = arguments.length < 3;
|
9774 |
|
9775 | return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
|
9776 | }
|
9777 |
|
9778 | |
9779 |
|
9780 |
|
9781 |
|
9782 |
|
9783 |
|
9784 |
|
9785 |
|
9786 |
|
9787 |
|
9788 |
|
9789 |
|
9790 |
|
9791 |
|
9792 |
|
9793 |
|
9794 |
|
9795 |
|
9796 |
|
9797 |
|
9798 |
|
9799 |
|
9800 |
|
9801 |
|
9802 |
|
9803 |
|
9804 |
|
9805 |
|
9806 |
|
9807 |
|
9808 |
|
9809 |
|
9810 |
|
9811 |
|
9812 | function reject(collection, predicate) {
|
9813 | var func = isArray(collection) ? arrayFilter : baseFilter;
|
9814 | return func(collection, negate(getIteratee(predicate, 3)));
|
9815 | }
|
9816 |
|
9817 | |
9818 |
|
9819 |
|
9820 |
|
9821 |
|
9822 |
|
9823 |
|
9824 |
|
9825 |
|
9826 |
|
9827 |
|
9828 |
|
9829 |
|
9830 |
|
9831 | function sample(collection) {
|
9832 | var func = isArray(collection) ? arraySample : baseSample;
|
9833 | return func(collection);
|
9834 | }
|
9835 |
|
9836 | |
9837 |
|
9838 |
|
9839 |
|
9840 |
|
9841 |
|
9842 |
|
9843 |
|
9844 |
|
9845 |
|
9846 |
|
9847 |
|
9848 |
|
9849 |
|
9850 |
|
9851 |
|
9852 |
|
9853 |
|
9854 |
|
9855 |
|
9856 | function sampleSize(collection, n, guard) {
|
9857 | if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
|
9858 | n = 1;
|
9859 | } else {
|
9860 | n = toInteger(n);
|
9861 | }
|
9862 | var func = isArray(collection) ? arraySampleSize : baseSampleSize;
|
9863 | return func(collection, n);
|
9864 | }
|
9865 |
|
9866 | |
9867 |
|
9868 |
|
9869 |
|
9870 |
|
9871 |
|
9872 |
|
9873 |
|
9874 |
|
9875 |
|
9876 |
|
9877 |
|
9878 |
|
9879 |
|
9880 |
|
9881 | function shuffle(collection) {
|
9882 | var func = isArray(collection) ? arrayShuffle : baseShuffle;
|
9883 | return func(collection);
|
9884 | }
|
9885 |
|
9886 | |
9887 |
|
9888 |
|
9889 |
|
9890 |
|
9891 |
|
9892 |
|
9893 |
|
9894 |
|
9895 |
|
9896 |
|
9897 |
|
9898 |
|
9899 |
|
9900 |
|
9901 |
|
9902 |
|
9903 |
|
9904 |
|
9905 |
|
9906 |
|
9907 | function size(collection) {
|
9908 | if (collection == null) {
|
9909 | return 0;
|
9910 | }
|
9911 | if (isArrayLike(collection)) {
|
9912 | return isString(collection) ? stringSize(collection) : collection.length;
|
9913 | }
|
9914 | var tag = getTag(collection);
|
9915 | if (tag == mapTag || tag == setTag) {
|
9916 | return collection.size;
|
9917 | }
|
9918 | return baseKeys(collection).length;
|
9919 | }
|
9920 |
|
9921 | |
9922 |
|
9923 |
|
9924 |
|
9925 |
|
9926 |
|
9927 |
|
9928 |
|
9929 |
|
9930 |
|
9931 |
|
9932 |
|
9933 |
|
9934 |
|
9935 |
|
9936 |
|
9937 |
|
9938 |
|
9939 |
|
9940 |
|
9941 |
|
9942 |
|
9943 |
|
9944 |
|
9945 |
|
9946 |
|
9947 |
|
9948 |
|
9949 |
|
9950 |
|
9951 |
|
9952 |
|
9953 |
|
9954 |
|
9955 |
|
9956 |
|
9957 | function some(collection, predicate, guard) {
|
9958 | var func = isArray(collection) ? arraySome : baseSome;
|
9959 | if (guard && isIterateeCall(collection, predicate, guard)) {
|
9960 | predicate = undefined;
|
9961 | }
|
9962 | return func(collection, getIteratee(predicate, 3));
|
9963 | }
|
9964 |
|
9965 | |
9966 |
|
9967 |
|
9968 |
|
9969 |
|
9970 |
|
9971 |
|
9972 |
|
9973 |
|
9974 |
|
9975 |
|
9976 |
|
9977 |
|
9978 |
|
9979 |
|
9980 |
|
9981 |
|
9982 |
|
9983 |
|
9984 |
|
9985 |
|
9986 |
|
9987 |
|
9988 |
|
9989 |
|
9990 |
|
9991 |
|
9992 |
|
9993 |
|
9994 | var sortBy = baseRest(function(collection, iteratees) {
|
9995 | if (collection == null) {
|
9996 | return [];
|
9997 | }
|
9998 | var length = iteratees.length;
|
9999 | if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
|
10000 | iteratees = [];
|
10001 | } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
10002 | iteratees = [iteratees[0]];
|
10003 | }
|
10004 | return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
|
10005 | });
|
10006 |
|
10007 |
|
10008 |
|
10009 | |
10010 |
|
10011 |
|
10012 |
|
10013 |
|
10014 |
|
10015 |
|
10016 |
|
10017 |
|
10018 |
|
10019 |
|
10020 |
|
10021 |
|
10022 |
|
10023 |
|
10024 |
|
10025 | var now = ctxNow || function() {
|
10026 | return root.Date.now();
|
10027 | };
|
10028 |
|
10029 |
|
10030 |
|
10031 | |
10032 |
|
10033 |
|
10034 |
|
10035 |
|
10036 |
|
10037 |
|
10038 |
|
10039 |
|
10040 |
|
10041 |
|
10042 |
|
10043 |
|
10044 |
|
10045 |
|
10046 |
|
10047 |
|
10048 |
|
10049 |
|
10050 |
|
10051 |
|
10052 |
|
10053 |
|
10054 |
|
10055 | function after(n, func) {
|
10056 | if (typeof func != 'function') {
|
10057 | throw new TypeError(FUNC_ERROR_TEXT);
|
10058 | }
|
10059 | n = toInteger(n);
|
10060 | return function() {
|
10061 | if (--n < 1) {
|
10062 | return func.apply(this, arguments);
|
10063 | }
|
10064 | };
|
10065 | }
|
10066 |
|
10067 | |
10068 |
|
10069 |
|
10070 |
|
10071 |
|
10072 |
|
10073 |
|
10074 |
|
10075 |
|
10076 |
|
10077 |
|
10078 |
|
10079 |
|
10080 |
|
10081 |
|
10082 |
|
10083 |
|
10084 | function ary(func, n, guard) {
|
10085 | n = guard ? undefined : n;
|
10086 | n = (func && n == null) ? func.length : n;
|
10087 | return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
|
10088 | }
|
10089 |
|
10090 | |
10091 |
|
10092 |
|
10093 |
|
10094 |
|
10095 |
|
10096 |
|
10097 |
|
10098 |
|
10099 |
|
10100 |
|
10101 |
|
10102 |
|
10103 |
|
10104 |
|
10105 |
|
10106 |
|
10107 | function before(n, func) {
|
10108 | var result;
|
10109 | if (typeof func != 'function') {
|
10110 | throw new TypeError(FUNC_ERROR_TEXT);
|
10111 | }
|
10112 | n = toInteger(n);
|
10113 | return function() {
|
10114 | if (--n > 0) {
|
10115 | result = func.apply(this, arguments);
|
10116 | }
|
10117 | if (n <= 1) {
|
10118 | func = undefined;
|
10119 | }
|
10120 | return result;
|
10121 | };
|
10122 | }
|
10123 |
|
10124 | |
10125 |
|
10126 |
|
10127 |
|
10128 |
|
10129 |
|
10130 |
|
10131 |
|
10132 |
|
10133 |
|
10134 |
|
10135 |
|
10136 |
|
10137 |
|
10138 |
|
10139 |
|
10140 |
|
10141 |
|
10142 |
|
10143 |
|
10144 |
|
10145 |
|
10146 |
|
10147 |
|
10148 |
|
10149 |
|
10150 |
|
10151 |
|
10152 |
|
10153 |
|
10154 |
|
10155 |
|
10156 |
|
10157 |
|
10158 |
|
10159 | var bind = baseRest(function(func, thisArg, partials) {
|
10160 | var bitmask = WRAP_BIND_FLAG;
|
10161 | if (partials.length) {
|
10162 | var holders = replaceHolders(partials, getHolder(bind));
|
10163 | bitmask |= WRAP_PARTIAL_FLAG;
|
10164 | }
|
10165 | return createWrap(func, bitmask, thisArg, partials, holders);
|
10166 | });
|
10167 |
|
10168 | |
10169 |
|
10170 |
|
10171 |
|
10172 |
|
10173 |
|
10174 |
|
10175 |
|
10176 |
|
10177 |
|
10178 |
|
10179 |
|
10180 |
|
10181 |
|
10182 |
|
10183 |
|
10184 |
|
10185 |
|
10186 |
|
10187 |
|
10188 |
|
10189 |
|
10190 |
|
10191 |
|
10192 |
|
10193 |
|
10194 |
|
10195 |
|
10196 |
|
10197 |
|
10198 |
|
10199 |
|
10200 |
|
10201 |
|
10202 |
|
10203 |
|
10204 |
|
10205 |
|
10206 |
|
10207 |
|
10208 |
|
10209 |
|
10210 |
|
10211 |
|
10212 |
|
10213 | var bindKey = baseRest(function(object, key, partials) {
|
10214 | var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
|
10215 | if (partials.length) {
|
10216 | var holders = replaceHolders(partials, getHolder(bindKey));
|
10217 | bitmask |= WRAP_PARTIAL_FLAG;
|
10218 | }
|
10219 | return createWrap(key, bitmask, object, partials, holders);
|
10220 | });
|
10221 |
|
10222 | |
10223 |
|
10224 |
|
10225 |
|
10226 |
|
10227 |
|
10228 |
|
10229 |
|
10230 |
|
10231 |
|
10232 |
|
10233 |
|
10234 |
|
10235 |
|
10236 |
|
10237 |
|
10238 |
|
10239 |
|
10240 |
|
10241 |
|
10242 |
|
10243 |
|
10244 |
|
10245 |
|
10246 |
|
10247 |
|
10248 |
|
10249 |
|
10250 |
|
10251 |
|
10252 |
|
10253 |
|
10254 |
|
10255 |
|
10256 |
|
10257 |
|
10258 |
|
10259 |
|
10260 |
|
10261 |
|
10262 |
|
10263 | function curry(func, arity, guard) {
|
10264 | arity = guard ? undefined : arity;
|
10265 | var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
|
10266 | result.placeholder = curry.placeholder;
|
10267 | return result;
|
10268 | }
|
10269 |
|
10270 | |
10271 |
|
10272 |
|
10273 |
|
10274 |
|
10275 |
|
10276 |
|
10277 |
|
10278 |
|
10279 |
|
10280 |
|
10281 |
|
10282 |
|
10283 |
|
10284 |
|
10285 |
|
10286 |
|
10287 |
|
10288 |
|
10289 |
|
10290 |
|
10291 |
|
10292 |
|
10293 |
|
10294 |
|
10295 |
|
10296 |
|
10297 |
|
10298 |
|
10299 |
|
10300 |
|
10301 |
|
10302 |
|
10303 |
|
10304 |
|
10305 |
|
10306 |
|
10307 |
|
10308 | function curryRight(func, arity, guard) {
|
10309 | arity = guard ? undefined : arity;
|
10310 | var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
|
10311 | result.placeholder = curryRight.placeholder;
|
10312 | return result;
|
10313 | }
|
10314 |
|
10315 | |
10316 |
|
10317 |
|
10318 |
|
10319 |
|
10320 |
|
10321 |
|
10322 |
|
10323 |
|
10324 |
|
10325 |
|
10326 |
|
10327 |
|
10328 |
|
10329 |
|
10330 |
|
10331 |
|
10332 |
|
10333 |
|
10334 |
|
10335 |
|
10336 |
|
10337 |
|
10338 |
|
10339 |
|
10340 |
|
10341 |
|
10342 |
|
10343 |
|
10344 |
|
10345 |
|
10346 |
|
10347 |
|
10348 |
|
10349 |
|
10350 |
|
10351 |
|
10352 |
|
10353 |
|
10354 |
|
10355 |
|
10356 |
|
10357 |
|
10358 |
|
10359 |
|
10360 |
|
10361 |
|
10362 |
|
10363 |
|
10364 |
|
10365 |
|
10366 |
|
10367 |
|
10368 |
|
10369 | function debounce(func, wait, options) {
|
10370 | var lastArgs,
|
10371 | lastThis,
|
10372 | maxWait,
|
10373 | result,
|
10374 | timerId,
|
10375 | lastCallTime,
|
10376 | lastInvokeTime = 0,
|
10377 | leading = false,
|
10378 | maxing = false,
|
10379 | trailing = true;
|
10380 |
|
10381 | if (typeof func != 'function') {
|
10382 | throw new TypeError(FUNC_ERROR_TEXT);
|
10383 | }
|
10384 | wait = toNumber(wait) || 0;
|
10385 | if (isObject(options)) {
|
10386 | leading = !!options.leading;
|
10387 | maxing = 'maxWait' in options;
|
10388 | maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
10389 | trailing = 'trailing' in options ? !!options.trailing : trailing;
|
10390 | }
|
10391 |
|
10392 | function invokeFunc(time) {
|
10393 | var args = lastArgs,
|
10394 | thisArg = lastThis;
|
10395 |
|
10396 | lastArgs = lastThis = undefined;
|
10397 | lastInvokeTime = time;
|
10398 | result = func.apply(thisArg, args);
|
10399 | return result;
|
10400 | }
|
10401 |
|
10402 | function leadingEdge(time) {
|
10403 |
|
10404 | lastInvokeTime = time;
|
10405 |
|
10406 | timerId = setTimeout(timerExpired, wait);
|
10407 |
|
10408 | return leading ? invokeFunc(time) : result;
|
10409 | }
|
10410 |
|
10411 | function remainingWait(time) {
|
10412 | var timeSinceLastCall = time - lastCallTime,
|
10413 | timeSinceLastInvoke = time - lastInvokeTime,
|
10414 | timeWaiting = wait - timeSinceLastCall;
|
10415 |
|
10416 | return maxing
|
10417 | ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
10418 | : timeWaiting;
|
10419 | }
|
10420 |
|
10421 | function shouldInvoke(time) {
|
10422 | var timeSinceLastCall = time - lastCallTime,
|
10423 | timeSinceLastInvoke = time - lastInvokeTime;
|
10424 |
|
10425 |
|
10426 |
|
10427 |
|
10428 | return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
10429 | (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
10430 | }
|
10431 |
|
10432 | function timerExpired() {
|
10433 | var time = now();
|
10434 | if (shouldInvoke(time)) {
|
10435 | return trailingEdge(time);
|
10436 | }
|
10437 |
|
10438 | timerId = setTimeout(timerExpired, remainingWait(time));
|
10439 | }
|
10440 |
|
10441 | function trailingEdge(time) {
|
10442 | timerId = undefined;
|
10443 |
|
10444 |
|
10445 |
|
10446 | if (trailing && lastArgs) {
|
10447 | return invokeFunc(time);
|
10448 | }
|
10449 | lastArgs = lastThis = undefined;
|
10450 | return result;
|
10451 | }
|
10452 |
|
10453 | function cancel() {
|
10454 | if (timerId !== undefined) {
|
10455 | clearTimeout(timerId);
|
10456 | }
|
10457 | lastInvokeTime = 0;
|
10458 | lastArgs = lastCallTime = lastThis = timerId = undefined;
|
10459 | }
|
10460 |
|
10461 | function flush() {
|
10462 | return timerId === undefined ? result : trailingEdge(now());
|
10463 | }
|
10464 |
|
10465 | function debounced() {
|
10466 | var time = now(),
|
10467 | isInvoking = shouldInvoke(time);
|
10468 |
|
10469 | lastArgs = arguments;
|
10470 | lastThis = this;
|
10471 | lastCallTime = time;
|
10472 |
|
10473 | if (isInvoking) {
|
10474 | if (timerId === undefined) {
|
10475 | return leadingEdge(lastCallTime);
|
10476 | }
|
10477 | if (maxing) {
|
10478 |
|
10479 | clearTimeout(timerId);
|
10480 | timerId = setTimeout(timerExpired, wait);
|
10481 | return invokeFunc(lastCallTime);
|
10482 | }
|
10483 | }
|
10484 | if (timerId === undefined) {
|
10485 | timerId = setTimeout(timerExpired, wait);
|
10486 | }
|
10487 | return result;
|
10488 | }
|
10489 | debounced.cancel = cancel;
|
10490 | debounced.flush = flush;
|
10491 | return debounced;
|
10492 | }
|
10493 |
|
10494 | |
10495 |
|
10496 |
|
10497 |
|
10498 |
|
10499 |
|
10500 |
|
10501 |
|
10502 |
|
10503 |
|
10504 |
|
10505 |
|
10506 |
|
10507 |
|
10508 |
|
10509 |
|
10510 |
|
10511 |
|
10512 | var defer = baseRest(function(func, args) {
|
10513 | return baseDelay(func, 1, args);
|
10514 | });
|
10515 |
|
10516 | |
10517 |
|
10518 |
|
10519 |
|
10520 |
|
10521 |
|
10522 |
|
10523 |
|
10524 |
|
10525 |
|
10526 |
|
10527 |
|
10528 |
|
10529 |
|
10530 |
|
10531 |
|
10532 |
|
10533 |
|
10534 |
|
10535 | var delay = baseRest(function(func, wait, args) {
|
10536 | return baseDelay(func, toNumber(wait) || 0, args);
|
10537 | });
|
10538 |
|
10539 | |
10540 |
|
10541 |
|
10542 |
|
10543 |
|
10544 |
|
10545 |
|
10546 |
|
10547 |
|
10548 |
|
10549 |
|
10550 |
|
10551 |
|
10552 |
|
10553 |
|
10554 |
|
10555 |
|
10556 |
|
10557 | function flip(func) {
|
10558 | return createWrap(func, WRAP_FLIP_FLAG);
|
10559 | }
|
10560 |
|
10561 | |
10562 |
|
10563 |
|
10564 |
|
10565 |
|
10566 |
|
10567 |
|
10568 |
|
10569 |
|
10570 |
|
10571 |
|
10572 |
|
10573 |
|
10574 |
|
10575 |
|
10576 |
|
10577 |
|
10578 |
|
10579 |
|
10580 |
|
10581 |
|
10582 |
|
10583 |
|
10584 |
|
10585 |
|
10586 |
|
10587 |
|
10588 |
|
10589 |
|
10590 |
|
10591 |
|
10592 |
|
10593 |
|
10594 |
|
10595 |
|
10596 |
|
10597 |
|
10598 |
|
10599 |
|
10600 |
|
10601 |
|
10602 |
|
10603 |
|
10604 |
|
10605 | function memoize(func, resolver) {
|
10606 | if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
10607 | throw new TypeError(FUNC_ERROR_TEXT);
|
10608 | }
|
10609 | var memoized = function() {
|
10610 | var args = arguments,
|
10611 | key = resolver ? resolver.apply(this, args) : args[0],
|
10612 | cache = memoized.cache;
|
10613 |
|
10614 | if (cache.has(key)) {
|
10615 | return cache.get(key);
|
10616 | }
|
10617 | var result = func.apply(this, args);
|
10618 | memoized.cache = cache.set(key, result) || cache;
|
10619 | return result;
|
10620 | };
|
10621 | memoized.cache = new (memoize.Cache || MapCache);
|
10622 | return memoized;
|
10623 | }
|
10624 |
|
10625 |
|
10626 | memoize.Cache = MapCache;
|
10627 |
|
10628 | |
10629 |
|
10630 |
|
10631 |
|
10632 |
|
10633 |
|
10634 |
|
10635 |
|
10636 |
|
10637 |
|
10638 |
|
10639 |
|
10640 |
|
10641 |
|
10642 |
|
10643 |
|
10644 |
|
10645 |
|
10646 |
|
10647 |
|
10648 | function negate(predicate) {
|
10649 | if (typeof predicate != 'function') {
|
10650 | throw new TypeError(FUNC_ERROR_TEXT);
|
10651 | }
|
10652 | return function() {
|
10653 | var args = arguments;
|
10654 | switch (args.length) {
|
10655 | case 0: return !predicate.call(this);
|
10656 | case 1: return !predicate.call(this, args[0]);
|
10657 | case 2: return !predicate.call(this, args[0], args[1]);
|
10658 | case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
10659 | }
|
10660 | return !predicate.apply(this, args);
|
10661 | };
|
10662 | }
|
10663 |
|
10664 | |
10665 |
|
10666 |
|
10667 |
|
10668 |
|
10669 |
|
10670 |
|
10671 |
|
10672 |
|
10673 |
|
10674 |
|
10675 |
|
10676 |
|
10677 |
|
10678 |
|
10679 |
|
10680 |
|
10681 |
|
10682 | function once(func) {
|
10683 | return before(2, func);
|
10684 | }
|
10685 |
|
10686 | |
10687 |
|
10688 |
|
10689 |
|
10690 |
|
10691 |
|
10692 |
|
10693 |
|
10694 |
|
10695 |
|
10696 |
|
10697 |
|
10698 |
|
10699 |
|
10700 |
|
10701 |
|
10702 |
|
10703 |
|
10704 |
|
10705 |
|
10706 |
|
10707 |
|
10708 |
|
10709 |
|
10710 |
|
10711 |
|
10712 |
|
10713 |
|
10714 |
|
10715 |
|
10716 |
|
10717 | var overArgs = castRest(function(func, transforms) {
|
10718 | transforms = (transforms.length == 1 && isArray(transforms[0]))
|
10719 | ? arrayMap(transforms[0], baseUnary(getIteratee()))
|
10720 | : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
10721 |
|
10722 | var funcsLength = transforms.length;
|
10723 | return baseRest(function(args) {
|
10724 | var index = -1,
|
10725 | length = nativeMin(args.length, funcsLength);
|
10726 |
|
10727 | while (++index < length) {
|
10728 | args[index] = transforms[index].call(this, args[index]);
|
10729 | }
|
10730 | return apply(func, this, args);
|
10731 | });
|
10732 | });
|
10733 |
|
10734 | |
10735 |
|
10736 |
|
10737 |
|
10738 |
|
10739 |
|
10740 |
|
10741 |
|
10742 |
|
10743 |
|
10744 |
|
10745 |
|
10746 |
|
10747 |
|
10748 |
|
10749 |
|
10750 |
|
10751 |
|
10752 |
|
10753 |
|
10754 |
|
10755 |
|
10756 |
|
10757 |
|
10758 |
|
10759 |
|
10760 |
|
10761 |
|
10762 |
|
10763 |
|
10764 |
|
10765 |
|
10766 |
|
10767 | var partial = baseRest(function(func, partials) {
|
10768 | var holders = replaceHolders(partials, getHolder(partial));
|
10769 | return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
|
10770 | });
|
10771 |
|
10772 | |
10773 |
|
10774 |
|
10775 |
|
10776 |
|
10777 |
|
10778 |
|
10779 |
|
10780 |
|
10781 |
|
10782 |
|
10783 |
|
10784 |
|
10785 |
|
10786 |
|
10787 |
|
10788 |
|
10789 |
|
10790 |
|
10791 |
|
10792 |
|
10793 |
|
10794 |
|
10795 |
|
10796 |
|
10797 |
|
10798 |
|
10799 |
|
10800 |
|
10801 |
|
10802 |
|
10803 |
|
10804 | var partialRight = baseRest(function(func, partials) {
|
10805 | var holders = replaceHolders(partials, getHolder(partialRight));
|
10806 | return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
|
10807 | });
|
10808 |
|
10809 | |
10810 |
|
10811 |
|
10812 |
|
10813 |
|
10814 |
|
10815 |
|
10816 |
|
10817 |
|
10818 |
|
10819 |
|
10820 |
|
10821 |
|
10822 |
|
10823 |
|
10824 |
|
10825 |
|
10826 |
|
10827 |
|
10828 |
|
10829 |
|
10830 |
|
10831 | var rearg = flatRest(function(func, indexes) {
|
10832 | return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
|
10833 | });
|
10834 |
|
10835 | |
10836 |
|
10837 |
|
10838 |
|
10839 |
|
10840 |
|
10841 |
|
10842 |
|
10843 |
|
10844 |
|
10845 |
|
10846 |
|
10847 |
|
10848 |
|
10849 |
|
10850 |
|
10851 |
|
10852 |
|
10853 |
|
10854 |
|
10855 |
|
10856 |
|
10857 |
|
10858 |
|
10859 |
|
10860 | function rest(func, start) {
|
10861 | if (typeof func != 'function') {
|
10862 | throw new TypeError(FUNC_ERROR_TEXT);
|
10863 | }
|
10864 | start = start === undefined ? start : toInteger(start);
|
10865 | return baseRest(func, start);
|
10866 | }
|
10867 |
|
10868 | |
10869 |
|
10870 |
|
10871 |
|
10872 |
|
10873 |
|
10874 |
|
10875 |
|
10876 |
|
10877 |
|
10878 |
|
10879 |
|
10880 |
|
10881 |
|
10882 |
|
10883 |
|
10884 |
|
10885 |
|
10886 |
|
10887 |
|
10888 |
|
10889 |
|
10890 |
|
10891 |
|
10892 |
|
10893 |
|
10894 |
|
10895 |
|
10896 |
|
10897 |
|
10898 |
|
10899 |
|
10900 |
|
10901 |
|
10902 | function spread(func, start) {
|
10903 | if (typeof func != 'function') {
|
10904 | throw new TypeError(FUNC_ERROR_TEXT);
|
10905 | }
|
10906 | start = start == null ? 0 : nativeMax(toInteger(start), 0);
|
10907 | return baseRest(function(args) {
|
10908 | var array = args[start],
|
10909 | otherArgs = castSlice(args, 0, start);
|
10910 |
|
10911 | if (array) {
|
10912 | arrayPush(otherArgs, array);
|
10913 | }
|
10914 | return apply(func, this, otherArgs);
|
10915 | });
|
10916 | }
|
10917 |
|
10918 | |
10919 |
|
10920 |
|
10921 |
|
10922 |
|
10923 |
|
10924 |
|
10925 |
|
10926 |
|
10927 |
|
10928 |
|
10929 |
|
10930 |
|
10931 |
|
10932 |
|
10933 |
|
10934 |
|
10935 |
|
10936 |
|
10937 |
|
10938 |
|
10939 |
|
10940 |
|
10941 |
|
10942 |
|
10943 |
|
10944 |
|
10945 |
|
10946 |
|
10947 |
|
10948 |
|
10949 |
|
10950 |
|
10951 |
|
10952 |
|
10953 |
|
10954 |
|
10955 |
|
10956 |
|
10957 |
|
10958 |
|
10959 |
|
10960 |
|
10961 |
|
10962 | function throttle(func, wait, options) {
|
10963 | var leading = true,
|
10964 | trailing = true;
|
10965 |
|
10966 | if (typeof func != 'function') {
|
10967 | throw new TypeError(FUNC_ERROR_TEXT);
|
10968 | }
|
10969 | if (isObject(options)) {
|
10970 | leading = 'leading' in options ? !!options.leading : leading;
|
10971 | trailing = 'trailing' in options ? !!options.trailing : trailing;
|
10972 | }
|
10973 | return debounce(func, wait, {
|
10974 | 'leading': leading,
|
10975 | 'maxWait': wait,
|
10976 | 'trailing': trailing
|
10977 | });
|
10978 | }
|
10979 |
|
10980 | |
10981 |
|
10982 |
|
10983 |
|
10984 |
|
10985 |
|
10986 |
|
10987 |
|
10988 |
|
10989 |
|
10990 |
|
10991 |
|
10992 |
|
10993 |
|
10994 |
|
10995 | function unary(func) {
|
10996 | return ary(func, 1);
|
10997 | }
|
10998 |
|
10999 | |
11000 |
|
11001 |
|
11002 |
|
11003 |
|
11004 |
|
11005 |
|
11006 |
|
11007 |
|
11008 |
|
11009 |
|
11010 |
|
11011 |
|
11012 |
|
11013 |
|
11014 |
|
11015 |
|
11016 |
|
11017 |
|
11018 |
|
11019 |
|
11020 |
|
11021 | function wrap(value, wrapper) {
|
11022 | return partial(castFunction(wrapper), value);
|
11023 | }
|
11024 |
|
11025 |
|
11026 |
|
11027 | |
11028 |
|
11029 |
|
11030 |
|
11031 |
|
11032 |
|
11033 |
|
11034 |
|
11035 |
|
11036 |
|
11037 |
|
11038 |
|
11039 |
|
11040 |
|
11041 |
|
11042 |
|
11043 |
|
11044 |
|
11045 |
|
11046 |
|
11047 |
|
11048 |
|
11049 |
|
11050 |
|
11051 |
|
11052 |
|
11053 |
|
11054 |
|
11055 |
|
11056 |
|
11057 |
|
11058 |
|
11059 |
|
11060 | function castArray() {
|
11061 | if (!arguments.length) {
|
11062 | return [];
|
11063 | }
|
11064 | var value = arguments[0];
|
11065 | return isArray(value) ? value : [value];
|
11066 | }
|
11067 |
|
11068 | |
11069 |
|
11070 |
|
11071 |
|
11072 |
|
11073 |
|
11074 |
|
11075 |
|
11076 |
|
11077 |
|
11078 |
|
11079 |
|
11080 |
|
11081 |
|
11082 |
|
11083 |
|
11084 |
|
11085 |
|
11086 |
|
11087 |
|
11088 |
|
11089 |
|
11090 |
|
11091 |
|
11092 |
|
11093 |
|
11094 | function clone(value) {
|
11095 | return baseClone(value, CLONE_SYMBOLS_FLAG);
|
11096 | }
|
11097 |
|
11098 | |
11099 |
|
11100 |
|
11101 |
|
11102 |
|
11103 |
|
11104 |
|
11105 |
|
11106 |
|
11107 |
|
11108 |
|
11109 |
|
11110 |
|
11111 |
|
11112 |
|
11113 |
|
11114 |
|
11115 |
|
11116 |
|
11117 |
|
11118 |
|
11119 |
|
11120 |
|
11121 |
|
11122 |
|
11123 |
|
11124 |
|
11125 |
|
11126 |
|
11127 |
|
11128 |
|
11129 | function cloneWith(value, customizer) {
|
11130 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
11131 | return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
|
11132 | }
|
11133 |
|
11134 | |
11135 |
|
11136 |
|
11137 |
|
11138 |
|
11139 |
|
11140 |
|
11141 |
|
11142 |
|
11143 |
|
11144 |
|
11145 |
|
11146 |
|
11147 |
|
11148 |
|
11149 |
|
11150 |
|
11151 |
|
11152 | function cloneDeep(value) {
|
11153 | return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
11154 | }
|
11155 |
|
11156 | |
11157 |
|
11158 |
|
11159 |
|
11160 |
|
11161 |
|
11162 |
|
11163 |
|
11164 |
|
11165 |
|
11166 |
|
11167 |
|
11168 |
|
11169 |
|
11170 |
|
11171 |
|
11172 |
|
11173 |
|
11174 |
|
11175 |
|
11176 |
|
11177 |
|
11178 |
|
11179 |
|
11180 |
|
11181 |
|
11182 |
|
11183 |
|
11184 | function cloneDeepWith(value, customizer) {
|
11185 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
11186 | return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
|
11187 | }
|
11188 |
|
11189 | |
11190 |
|
11191 |
|
11192 |
|
11193 |
|
11194 |
|
11195 |
|
11196 |
|
11197 |
|
11198 |
|
11199 |
|
11200 |
|
11201 |
|
11202 |
|
11203 |
|
11204 |
|
11205 |
|
11206 |
|
11207 |
|
11208 |
|
11209 |
|
11210 |
|
11211 |
|
11212 |
|
11213 | function conformsTo(object, source) {
|
11214 | return source == null || baseConformsTo(object, source, keys(source));
|
11215 | }
|
11216 |
|
11217 | |
11218 |
|
11219 |
|
11220 |
|
11221 |
|
11222 |
|
11223 |
|
11224 |
|
11225 |
|
11226 |
|
11227 |
|
11228 |
|
11229 |
|
11230 |
|
11231 |
|
11232 |
|
11233 |
|
11234 |
|
11235 |
|
11236 |
|
11237 |
|
11238 |
|
11239 |
|
11240 |
|
11241 |
|
11242 |
|
11243 |
|
11244 |
|
11245 |
|
11246 |
|
11247 |
|
11248 |
|
11249 | function eq(value, other) {
|
11250 | return value === other || (value !== value && other !== other);
|
11251 | }
|
11252 |
|
11253 | |
11254 |
|
11255 |
|
11256 |
|
11257 |
|
11258 |
|
11259 |
|
11260 |
|
11261 |
|
11262 |
|
11263 |
|
11264 |
|
11265 |
|
11266 |
|
11267 |
|
11268 |
|
11269 |
|
11270 |
|
11271 |
|
11272 |
|
11273 |
|
11274 |
|
11275 |
|
11276 | var gt = createRelationalOperation(baseGt);
|
11277 |
|
11278 | |
11279 |
|
11280 |
|
11281 |
|
11282 |
|
11283 |
|
11284 |
|
11285 |
|
11286 |
|
11287 |
|
11288 |
|
11289 |
|
11290 |
|
11291 |
|
11292 |
|
11293 |
|
11294 |
|
11295 |
|
11296 |
|
11297 |
|
11298 |
|
11299 |
|
11300 |
|
11301 | var gte = createRelationalOperation(function(value, other) {
|
11302 | return value >= other;
|
11303 | });
|
11304 |
|
11305 | |
11306 |
|
11307 |
|
11308 |
|
11309 |
|
11310 |
|
11311 |
|
11312 |
|
11313 |
|
11314 |
|
11315 |
|
11316 |
|
11317 |
|
11318 |
|
11319 |
|
11320 |
|
11321 |
|
11322 |
|
11323 | var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
11324 | return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
11325 | !propertyIsEnumerable.call(value, 'callee');
|
11326 | };
|
11327 |
|
11328 | |
11329 |
|
11330 |
|
11331 |
|
11332 |
|
11333 |
|
11334 |
|
11335 |
|
11336 |
|
11337 |
|
11338 |
|
11339 |
|
11340 |
|
11341 |
|
11342 |
|
11343 |
|
11344 |
|
11345 |
|
11346 |
|
11347 |
|
11348 |
|
11349 |
|
11350 |
|
11351 | var isArray = Array.isArray;
|
11352 |
|
11353 | |
11354 |
|
11355 |
|
11356 |
|
11357 |
|
11358 |
|
11359 |
|
11360 |
|
11361 |
|
11362 |
|
11363 |
|
11364 |
|
11365 |
|
11366 |
|
11367 |
|
11368 |
|
11369 |
|
11370 | var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
|
11371 |
|
11372 | |
11373 |
|
11374 |
|
11375 |
|
11376 |
|
11377 |
|
11378 |
|
11379 |
|
11380 |
|
11381 |
|
11382 |
|
11383 |
|
11384 |
|
11385 |
|
11386 |
|
11387 |
|
11388 |
|
11389 |
|
11390 |
|
11391 |
|
11392 |
|
11393 |
|
11394 |
|
11395 |
|
11396 |
|
11397 | function isArrayLike(value) {
|
11398 | return value != null && isLength(value.length) && !isFunction(value);
|
11399 | }
|
11400 |
|
11401 | |
11402 |
|
11403 |
|
11404 |
|
11405 |
|
11406 |
|
11407 |
|
11408 |
|
11409 |
|
11410 |
|
11411 |
|
11412 |
|
11413 |
|
11414 |
|
11415 |
|
11416 |
|
11417 |
|
11418 |
|
11419 |
|
11420 |
|
11421 |
|
11422 |
|
11423 |
|
11424 |
|
11425 |
|
11426 | function isArrayLikeObject(value) {
|
11427 | return isObjectLike(value) && isArrayLike(value);
|
11428 | }
|
11429 |
|
11430 | |
11431 |
|
11432 |
|
11433 |
|
11434 |
|
11435 |
|
11436 |
|
11437 |
|
11438 |
|
11439 |
|
11440 |
|
11441 |
|
11442 |
|
11443 |
|
11444 |
|
11445 |
|
11446 |
|
11447 | function isBoolean(value) {
|
11448 | return value === true || value === false ||
|
11449 | (isObjectLike(value) && baseGetTag(value) == boolTag);
|
11450 | }
|
11451 |
|
11452 | |
11453 |
|
11454 |
|
11455 |
|
11456 |
|
11457 |
|
11458 |
|
11459 |
|
11460 |
|
11461 |
|
11462 |
|
11463 |
|
11464 |
|
11465 |
|
11466 |
|
11467 |
|
11468 |
|
11469 | var isBuffer = nativeIsBuffer || stubFalse;
|
11470 |
|
11471 | |
11472 |
|
11473 |
|
11474 |
|
11475 |
|
11476 |
|
11477 |
|
11478 |
|
11479 |
|
11480 |
|
11481 |
|
11482 |
|
11483 |
|
11484 |
|
11485 |
|
11486 |
|
11487 |
|
11488 | var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
11489 |
|
11490 | |
11491 |
|
11492 |
|
11493 |
|
11494 |
|
11495 |
|
11496 |
|
11497 |
|
11498 |
|
11499 |
|
11500 |
|
11501 |
|
11502 |
|
11503 |
|
11504 |
|
11505 |
|
11506 |
|
11507 | function isElement(value) {
|
11508 | return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
11509 | }
|
11510 |
|
11511 | |
11512 |
|
11513 |
|
11514 |
|
11515 |
|
11516 |
|
11517 |
|
11518 |
|
11519 |
|
11520 |
|
11521 |
|
11522 |
|
11523 |
|
11524 |
|
11525 |
|
11526 |
|
11527 |
|
11528 |
|
11529 |
|
11530 |
|
11531 |
|
11532 |
|
11533 |
|
11534 |
|
11535 |
|
11536 |
|
11537 |
|
11538 |
|
11539 |
|
11540 |
|
11541 |
|
11542 |
|
11543 |
|
11544 | function isEmpty(value) {
|
11545 | if (value == null) {
|
11546 | return true;
|
11547 | }
|
11548 | if (isArrayLike(value) &&
|
11549 | (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
11550 | isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
11551 | return !value.length;
|
11552 | }
|
11553 | var tag = getTag(value);
|
11554 | if (tag == mapTag || tag == setTag) {
|
11555 | return !value.size;
|
11556 | }
|
11557 | if (isPrototype(value)) {
|
11558 | return !baseKeys(value).length;
|
11559 | }
|
11560 | for (var key in value) {
|
11561 | if (hasOwnProperty.call(value, key)) {
|
11562 | return false;
|
11563 | }
|
11564 | }
|
11565 | return true;
|
11566 | }
|
11567 |
|
11568 | |
11569 |
|
11570 |
|
11571 |
|
11572 |
|
11573 |
|
11574 |
|
11575 |
|
11576 |
|
11577 |
|
11578 |
|
11579 |
|
11580 |
|
11581 |
|
11582 |
|
11583 |
|
11584 |
|
11585 |
|
11586 |
|
11587 |
|
11588 |
|
11589 |
|
11590 |
|
11591 |
|
11592 |
|
11593 |
|
11594 |
|
11595 |
|
11596 | function isEqual(value, other) {
|
11597 | return baseIsEqual(value, other);
|
11598 | }
|
11599 |
|
11600 | |
11601 |
|
11602 |
|
11603 |
|
11604 |
|
11605 |
|
11606 |
|
11607 |
|
11608 |
|
11609 |
|
11610 |
|
11611 |
|
11612 |
|
11613 |
|
11614 |
|
11615 |
|
11616 |
|
11617 |
|
11618 |
|
11619 |
|
11620 |
|
11621 |
|
11622 |
|
11623 |
|
11624 |
|
11625 |
|
11626 |
|
11627 |
|
11628 |
|
11629 |
|
11630 |
|
11631 |
|
11632 | function isEqualWith(value, other, customizer) {
|
11633 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
11634 | var result = customizer ? customizer(value, other) : undefined;
|
11635 | return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
|
11636 | }
|
11637 |
|
11638 | |
11639 |
|
11640 |
|
11641 |
|
11642 |
|
11643 |
|
11644 |
|
11645 |
|
11646 |
|
11647 |
|
11648 |
|
11649 |
|
11650 |
|
11651 |
|
11652 |
|
11653 |
|
11654 |
|
11655 |
|
11656 | function isError(value) {
|
11657 | if (!isObjectLike(value)) {
|
11658 | return false;
|
11659 | }
|
11660 | var tag = baseGetTag(value);
|
11661 | return tag == errorTag || tag == domExcTag ||
|
11662 | (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
|
11663 | }
|
11664 |
|
11665 | |
11666 |
|
11667 |
|
11668 |
|
11669 |
|
11670 |
|
11671 |
|
11672 |
|
11673 |
|
11674 |
|
11675 |
|
11676 |
|
11677 |
|
11678 |
|
11679 |
|
11680 |
|
11681 |
|
11682 |
|
11683 |
|
11684 |
|
11685 |
|
11686 |
|
11687 |
|
11688 |
|
11689 |
|
11690 |
|
11691 | function isFinite(value) {
|
11692 | return typeof value == 'number' && nativeIsFinite(value);
|
11693 | }
|
11694 |
|
11695 | |
11696 |
|
11697 |
|
11698 |
|
11699 |
|
11700 |
|
11701 |
|
11702 |
|
11703 |
|
11704 |
|
11705 |
|
11706 |
|
11707 |
|
11708 |
|
11709 |
|
11710 |
|
11711 |
|
11712 | function isFunction(value) {
|
11713 | if (!isObject(value)) {
|
11714 | return false;
|
11715 | }
|
11716 |
|
11717 |
|
11718 | var tag = baseGetTag(value);
|
11719 | return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
11720 | }
|
11721 |
|
11722 | |
11723 |
|
11724 |
|
11725 |
|
11726 |
|
11727 |
|
11728 |
|
11729 |
|
11730 |
|
11731 |
|
11732 |
|
11733 |
|
11734 |
|
11735 |
|
11736 |
|
11737 |
|
11738 |
|
11739 |
|
11740 |
|
11741 |
|
11742 |
|
11743 |
|
11744 |
|
11745 |
|
11746 |
|
11747 |
|
11748 | function isInteger(value) {
|
11749 | return typeof value == 'number' && value == toInteger(value);
|
11750 | }
|
11751 |
|
11752 | |
11753 |
|
11754 |
|
11755 |
|
11756 |
|
11757 |
|
11758 |
|
11759 |
|
11760 |
|
11761 |
|
11762 |
|
11763 |
|
11764 |
|
11765 |
|
11766 |
|
11767 |
|
11768 |
|
11769 |
|
11770 |
|
11771 |
|
11772 |
|
11773 |
|
11774 |
|
11775 |
|
11776 |
|
11777 |
|
11778 | function isLength(value) {
|
11779 | return typeof value == 'number' &&
|
11780 | value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
11781 | }
|
11782 |
|
11783 | |
11784 |
|
11785 |
|
11786 |
|
11787 |
|
11788 |
|
11789 |
|
11790 |
|
11791 |
|
11792 |
|
11793 |
|
11794 |
|
11795 |
|
11796 |
|
11797 |
|
11798 |
|
11799 |
|
11800 |
|
11801 |
|
11802 |
|
11803 |
|
11804 |
|
11805 |
|
11806 |
|
11807 |
|
11808 | function isObject(value) {
|
11809 | var type = typeof value;
|
11810 | return value != null && (type == 'object' || type == 'function');
|
11811 | }
|
11812 |
|
11813 | |
11814 |
|
11815 |
|
11816 |
|
11817 |
|
11818 |
|
11819 |
|
11820 |
|
11821 |
|
11822 |
|
11823 |
|
11824 |
|
11825 |
|
11826 |
|
11827 |
|
11828 |
|
11829 |
|
11830 |
|
11831 |
|
11832 |
|
11833 |
|
11834 |
|
11835 |
|
11836 |
|
11837 | function isObjectLike(value) {
|
11838 | return value != null && typeof value == 'object';
|
11839 | }
|
11840 |
|
11841 | |
11842 |
|
11843 |
|
11844 |
|
11845 |
|
11846 |
|
11847 |
|
11848 |
|
11849 |
|
11850 |
|
11851 |
|
11852 |
|
11853 |
|
11854 |
|
11855 |
|
11856 |
|
11857 |
|
11858 | var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
11859 |
|
11860 | |
11861 |
|
11862 |
|
11863 |
|
11864 |
|
11865 |
|
11866 |
|
11867 |
|
11868 |
|
11869 |
|
11870 |
|
11871 |
|
11872 |
|
11873 |
|
11874 |
|
11875 |
|
11876 |
|
11877 |
|
11878 |
|
11879 |
|
11880 |
|
11881 |
|
11882 |
|
11883 |
|
11884 |
|
11885 |
|
11886 |
|
11887 |
|
11888 | function isMatch(object, source) {
|
11889 | return object === source || baseIsMatch(object, source, getMatchData(source));
|
11890 | }
|
11891 |
|
11892 | |
11893 |
|
11894 |
|
11895 |
|
11896 |
|
11897 |
|
11898 |
|
11899 |
|
11900 |
|
11901 |
|
11902 |
|
11903 |
|
11904 |
|
11905 |
|
11906 |
|
11907 |
|
11908 |
|
11909 |
|
11910 |
|
11911 |
|
11912 |
|
11913 |
|
11914 |
|
11915 |
|
11916 |
|
11917 |
|
11918 |
|
11919 |
|
11920 |
|
11921 |
|
11922 |
|
11923 |
|
11924 | function isMatchWith(object, source, customizer) {
|
11925 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
11926 | return baseIsMatch(object, source, getMatchData(source), customizer);
|
11927 | }
|
11928 |
|
11929 | |
11930 |
|
11931 |
|
11932 |
|
11933 |
|
11934 |
|
11935 |
|
11936 |
|
11937 |
|
11938 |
|
11939 |
|
11940 |
|
11941 |
|
11942 |
|
11943 |
|
11944 |
|
11945 |
|
11946 |
|
11947 |
|
11948 |
|
11949 |
|
11950 |
|
11951 |
|
11952 |
|
11953 |
|
11954 |
|
11955 |
|
11956 |
|
11957 | function isNaN(value) {
|
11958 |
|
11959 |
|
11960 |
|
11961 | return isNumber(value) && value != +value;
|
11962 | }
|
11963 |
|
11964 | |
11965 |
|
11966 |
|
11967 |
|
11968 |
|
11969 |
|
11970 |
|
11971 |
|
11972 |
|
11973 |
|
11974 |
|
11975 |
|
11976 |
|
11977 |
|
11978 |
|
11979 |
|
11980 |
|
11981 |
|
11982 |
|
11983 |
|
11984 |
|
11985 |
|
11986 |
|
11987 |
|
11988 |
|
11989 |
|
11990 | function isNative(value) {
|
11991 | if (isMaskable(value)) {
|
11992 | throw new Error(CORE_ERROR_TEXT);
|
11993 | }
|
11994 | return baseIsNative(value);
|
11995 | }
|
11996 |
|
11997 | |
11998 |
|
11999 |
|
12000 |
|
12001 |
|
12002 |
|
12003 |
|
12004 |
|
12005 |
|
12006 |
|
12007 |
|
12008 |
|
12009 |
|
12010 |
|
12011 |
|
12012 |
|
12013 |
|
12014 | function isNull(value) {
|
12015 | return value === null;
|
12016 | }
|
12017 |
|
12018 | |
12019 |
|
12020 |
|
12021 |
|
12022 |
|
12023 |
|
12024 |
|
12025 |
|
12026 |
|
12027 |
|
12028 |
|
12029 |
|
12030 |
|
12031 |
|
12032 |
|
12033 |
|
12034 |
|
12035 |
|
12036 |
|
12037 |
|
12038 | function isNil(value) {
|
12039 | return value == null;
|
12040 | }
|
12041 |
|
12042 | |
12043 |
|
12044 |
|
12045 |
|
12046 |
|
12047 |
|
12048 |
|
12049 |
|
12050 |
|
12051 |
|
12052 |
|
12053 |
|
12054 |
|
12055 |
|
12056 |
|
12057 |
|
12058 |
|
12059 |
|
12060 |
|
12061 |
|
12062 |
|
12063 |
|
12064 |
|
12065 |
|
12066 |
|
12067 |
|
12068 | function isNumber(value) {
|
12069 | return typeof value == 'number' ||
|
12070 | (isObjectLike(value) && baseGetTag(value) == numberTag);
|
12071 | }
|
12072 |
|
12073 | |
12074 |
|
12075 |
|
12076 |
|
12077 |
|
12078 |
|
12079 |
|
12080 |
|
12081 |
|
12082 |
|
12083 |
|
12084 |
|
12085 |
|
12086 |
|
12087 |
|
12088 |
|
12089 |
|
12090 |
|
12091 |
|
12092 |
|
12093 |
|
12094 |
|
12095 |
|
12096 |
|
12097 |
|
12098 |
|
12099 |
|
12100 |
|
12101 | function isPlainObject(value) {
|
12102 | if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
12103 | return false;
|
12104 | }
|
12105 | var proto = getPrototype(value);
|
12106 | if (proto === null) {
|
12107 | return true;
|
12108 | }
|
12109 | var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
12110 | return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
12111 | funcToString.call(Ctor) == objectCtorString;
|
12112 | }
|
12113 |
|
12114 | |
12115 |
|
12116 |
|
12117 |
|
12118 |
|
12119 |
|
12120 |
|
12121 |
|
12122 |
|
12123 |
|
12124 |
|
12125 |
|
12126 |
|
12127 |
|
12128 |
|
12129 |
|
12130 |
|
12131 | var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
12132 |
|
12133 | |
12134 |
|
12135 |
|
12136 |
|
12137 |
|
12138 |
|
12139 |
|
12140 |
|
12141 |
|
12142 |
|
12143 |
|
12144 |
|
12145 |
|
12146 |
|
12147 |
|
12148 |
|
12149 |
|
12150 |
|
12151 |
|
12152 |
|
12153 |
|
12154 |
|
12155 |
|
12156 |
|
12157 |
|
12158 |
|
12159 |
|
12160 | function isSafeInteger(value) {
|
12161 | return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
12162 | }
|
12163 |
|
12164 | |
12165 |
|
12166 |
|
12167 |
|
12168 |
|
12169 |
|
12170 |
|
12171 |
|
12172 |
|
12173 |
|
12174 |
|
12175 |
|
12176 |
|
12177 |
|
12178 |
|
12179 |
|
12180 |
|
12181 | var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
12182 |
|
12183 | |
12184 |
|
12185 |
|
12186 |
|
12187 |
|
12188 |
|
12189 |
|
12190 |
|
12191 |
|
12192 |
|
12193 |
|
12194 |
|
12195 |
|
12196 |
|
12197 |
|
12198 |
|
12199 |
|
12200 | function isString(value) {
|
12201 | return typeof value == 'string' ||
|
12202 | (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
|
12203 | }
|
12204 |
|
12205 | |
12206 |
|
12207 |
|
12208 |
|
12209 |
|
12210 |
|
12211 |
|
12212 |
|
12213 |
|
12214 |
|
12215 |
|
12216 |
|
12217 |
|
12218 |
|
12219 |
|
12220 |
|
12221 |
|
12222 | function isSymbol(value) {
|
12223 | return typeof value == 'symbol' ||
|
12224 | (isObjectLike(value) && baseGetTag(value) == symbolTag);
|
12225 | }
|
12226 |
|
12227 | |
12228 |
|
12229 |
|
12230 |
|
12231 |
|
12232 |
|
12233 |
|
12234 |
|
12235 |
|
12236 |
|
12237 |
|
12238 |
|
12239 |
|
12240 |
|
12241 |
|
12242 |
|
12243 |
|
12244 | var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
12245 |
|
12246 | |
12247 |
|
12248 |
|
12249 |
|
12250 |
|
12251 |
|
12252 |
|
12253 |
|
12254 |
|
12255 |
|
12256 |
|
12257 |
|
12258 |
|
12259 |
|
12260 |
|
12261 |
|
12262 |
|
12263 | function isUndefined(value) {
|
12264 | return value === undefined;
|
12265 | }
|
12266 |
|
12267 | |
12268 |
|
12269 |
|
12270 |
|
12271 |
|
12272 |
|
12273 |
|
12274 |
|
12275 |
|
12276 |
|
12277 |
|
12278 |
|
12279 |
|
12280 |
|
12281 |
|
12282 |
|
12283 |
|
12284 | function isWeakMap(value) {
|
12285 | return isObjectLike(value) && getTag(value) == weakMapTag;
|
12286 | }
|
12287 |
|
12288 | |
12289 |
|
12290 |
|
12291 |
|
12292 |
|
12293 |
|
12294 |
|
12295 |
|
12296 |
|
12297 |
|
12298 |
|
12299 |
|
12300 |
|
12301 |
|
12302 |
|
12303 |
|
12304 |
|
12305 | function isWeakSet(value) {
|
12306 | return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
12307 | }
|
12308 |
|
12309 | |
12310 |
|
12311 |
|
12312 |
|
12313 |
|
12314 |
|
12315 |
|
12316 |
|
12317 |
|
12318 |
|
12319 |
|
12320 |
|
12321 |
|
12322 |
|
12323 |
|
12324 |
|
12325 |
|
12326 |
|
12327 |
|
12328 |
|
12329 |
|
12330 |
|
12331 |
|
12332 | var lt = createRelationalOperation(baseLt);
|
12333 |
|
12334 | |
12335 |
|
12336 |
|
12337 |
|
12338 |
|
12339 |
|
12340 |
|
12341 |
|
12342 |
|
12343 |
|
12344 |
|
12345 |
|
12346 |
|
12347 |
|
12348 |
|
12349 |
|
12350 |
|
12351 |
|
12352 |
|
12353 |
|
12354 |
|
12355 |
|
12356 |
|
12357 | var lte = createRelationalOperation(function(value, other) {
|
12358 | return value <= other;
|
12359 | });
|
12360 |
|
12361 | |
12362 |
|
12363 |
|
12364 |
|
12365 |
|
12366 |
|
12367 |
|
12368 |
|
12369 |
|
12370 |
|
12371 |
|
12372 |
|
12373 |
|
12374 |
|
12375 |
|
12376 |
|
12377 |
|
12378 |
|
12379 |
|
12380 |
|
12381 |
|
12382 |
|
12383 |
|
12384 | function toArray(value) {
|
12385 | if (!value) {
|
12386 | return [];
|
12387 | }
|
12388 | if (isArrayLike(value)) {
|
12389 | return isString(value) ? stringToArray(value) : copyArray(value);
|
12390 | }
|
12391 | if (symIterator && value[symIterator]) {
|
12392 | return iteratorToArray(value[symIterator]());
|
12393 | }
|
12394 | var tag = getTag(value),
|
12395 | func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
|
12396 |
|
12397 | return func(value);
|
12398 | }
|
12399 |
|
12400 | |
12401 |
|
12402 |
|
12403 |
|
12404 |
|
12405 |
|
12406 |
|
12407 |
|
12408 |
|
12409 |
|
12410 |
|
12411 |
|
12412 |
|
12413 |
|
12414 |
|
12415 |
|
12416 |
|
12417 |
|
12418 |
|
12419 |
|
12420 |
|
12421 |
|
12422 |
|
12423 | function toFinite(value) {
|
12424 | if (!value) {
|
12425 | return value === 0 ? value : 0;
|
12426 | }
|
12427 | value = toNumber(value);
|
12428 | if (value === INFINITY || value === -INFINITY) {
|
12429 | var sign = (value < 0 ? -1 : 1);
|
12430 | return sign * MAX_INTEGER;
|
12431 | }
|
12432 | return value === value ? value : 0;
|
12433 | }
|
12434 |
|
12435 | |
12436 |
|
12437 |
|
12438 |
|
12439 |
|
12440 |
|
12441 |
|
12442 |
|
12443 |
|
12444 |
|
12445 |
|
12446 |
|
12447 |
|
12448 |
|
12449 |
|
12450 |
|
12451 |
|
12452 |
|
12453 |
|
12454 |
|
12455 |
|
12456 |
|
12457 |
|
12458 |
|
12459 |
|
12460 |
|
12461 | function toInteger(value) {
|
12462 | var result = toFinite(value),
|
12463 | remainder = result % 1;
|
12464 |
|
12465 | return result === result ? (remainder ? result - remainder : result) : 0;
|
12466 | }
|
12467 |
|
12468 | |
12469 |
|
12470 |
|
12471 |
|
12472 |
|
12473 |
|
12474 |
|
12475 |
|
12476 |
|
12477 |
|
12478 |
|
12479 |
|
12480 |
|
12481 |
|
12482 |
|
12483 |
|
12484 |
|
12485 |
|
12486 |
|
12487 |
|
12488 |
|
12489 |
|
12490 |
|
12491 |
|
12492 |
|
12493 |
|
12494 |
|
12495 | function toLength(value) {
|
12496 | return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
12497 | }
|
12498 |
|
12499 | |
12500 |
|
12501 |
|
12502 |
|
12503 |
|
12504 |
|
12505 |
|
12506 |
|
12507 |
|
12508 |
|
12509 |
|
12510 |
|
12511 |
|
12512 |
|
12513 |
|
12514 |
|
12515 |
|
12516 |
|
12517 |
|
12518 |
|
12519 |
|
12520 |
|
12521 |
|
12522 | function toNumber(value) {
|
12523 | if (typeof value == 'number') {
|
12524 | return value;
|
12525 | }
|
12526 | if (isSymbol(value)) {
|
12527 | return NAN;
|
12528 | }
|
12529 | if (isObject(value)) {
|
12530 | var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
12531 | value = isObject(other) ? (other + '') : other;
|
12532 | }
|
12533 | if (typeof value != 'string') {
|
12534 | return value === 0 ? value : +value;
|
12535 | }
|
12536 | value = value.replace(reTrim, '');
|
12537 | var isBinary = reIsBinary.test(value);
|
12538 | return (isBinary || reIsOctal.test(value))
|
12539 | ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
12540 | : (reIsBadHex.test(value) ? NAN : +value);
|
12541 | }
|
12542 |
|
12543 | |
12544 |
|
12545 |
|
12546 |
|
12547 |
|
12548 |
|
12549 |
|
12550 |
|
12551 |
|
12552 |
|
12553 |
|
12554 |
|
12555 |
|
12556 |
|
12557 |
|
12558 |
|
12559 |
|
12560 |
|
12561 |
|
12562 |
|
12563 |
|
12564 |
|
12565 |
|
12566 |
|
12567 | function toPlainObject(value) {
|
12568 | return copyObject(value, keysIn(value));
|
12569 | }
|
12570 |
|
12571 | |
12572 |
|
12573 |
|
12574 |
|
12575 |
|
12576 |
|
12577 |
|
12578 |
|
12579 |
|
12580 |
|
12581 |
|
12582 |
|
12583 |
|
12584 |
|
12585 |
|
12586 |
|
12587 |
|
12588 |
|
12589 |
|
12590 |
|
12591 |
|
12592 |
|
12593 |
|
12594 |
|
12595 | function toSafeInteger(value) {
|
12596 | return value
|
12597 | ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
|
12598 | : (value === 0 ? value : 0);
|
12599 | }
|
12600 |
|
12601 | |
12602 |
|
12603 |
|
12604 |
|
12605 |
|
12606 |
|
12607 |
|
12608 |
|
12609 |
|
12610 |
|
12611 |
|
12612 |
|
12613 |
|
12614 |
|
12615 |
|
12616 |
|
12617 |
|
12618 |
|
12619 |
|
12620 |
|
12621 |
|
12622 | function toString(value) {
|
12623 | return value == null ? '' : baseToString(value);
|
12624 | }
|
12625 |
|
12626 |
|
12627 |
|
12628 | |
12629 |
|
12630 |
|
12631 |
|
12632 |
|
12633 |
|
12634 |
|
12635 |
|
12636 |
|
12637 |
|
12638 |
|
12639 |
|
12640 |
|
12641 |
|
12642 |
|
12643 |
|
12644 |
|
12645 |
|
12646 |
|
12647 |
|
12648 |
|
12649 |
|
12650 |
|
12651 |
|
12652 |
|
12653 |
|
12654 |
|
12655 |
|
12656 |
|
12657 |
|
12658 |
|
12659 |
|
12660 | var assign = createAssigner(function(object, source) {
|
12661 | if (isPrototype(source) || isArrayLike(source)) {
|
12662 | copyObject(source, keys(source), object);
|
12663 | return;
|
12664 | }
|
12665 | for (var key in source) {
|
12666 | if (hasOwnProperty.call(source, key)) {
|
12667 | assignValue(object, key, source[key]);
|
12668 | }
|
12669 | }
|
12670 | });
|
12671 |
|
12672 | |
12673 |
|
12674 |
|
12675 |
|
12676 |
|
12677 |
|
12678 |
|
12679 |
|
12680 |
|
12681 |
|
12682 |
|
12683 |
|
12684 |
|
12685 |
|
12686 |
|
12687 |
|
12688 |
|
12689 |
|
12690 |
|
12691 |
|
12692 |
|
12693 |
|
12694 |
|
12695 |
|
12696 |
|
12697 |
|
12698 |
|
12699 |
|
12700 |
|
12701 |
|
12702 |
|
12703 | var assignIn = createAssigner(function(object, source) {
|
12704 | copyObject(source, keysIn(source), object);
|
12705 | });
|
12706 |
|
12707 | |
12708 |
|
12709 |
|
12710 |
|
12711 |
|
12712 |
|
12713 |
|
12714 |
|
12715 |
|
12716 |
|
12717 |
|
12718 |
|
12719 |
|
12720 |
|
12721 |
|
12722 |
|
12723 |
|
12724 |
|
12725 |
|
12726 |
|
12727 |
|
12728 |
|
12729 |
|
12730 |
|
12731 |
|
12732 |
|
12733 |
|
12734 |
|
12735 |
|
12736 | var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
12737 | copyObject(source, keysIn(source), object, customizer);
|
12738 | });
|
12739 |
|
12740 | |
12741 |
|
12742 |
|
12743 |
|
12744 |
|
12745 |
|
12746 |
|
12747 |
|
12748 |
|
12749 |
|
12750 |
|
12751 |
|
12752 |
|
12753 |
|
12754 |
|
12755 |
|
12756 |
|
12757 |
|
12758 |
|
12759 |
|
12760 |
|
12761 |
|
12762 |
|
12763 |
|
12764 |
|
12765 |
|
12766 |
|
12767 |
|
12768 | var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
|
12769 | copyObject(source, keys(source), object, customizer);
|
12770 | });
|
12771 |
|
12772 | |
12773 |
|
12774 |
|
12775 |
|
12776 |
|
12777 |
|
12778 |
|
12779 |
|
12780 |
|
12781 |
|
12782 |
|
12783 |
|
12784 |
|
12785 |
|
12786 |
|
12787 |
|
12788 |
|
12789 | var at = flatRest(baseAt);
|
12790 |
|
12791 | |
12792 |
|
12793 |
|
12794 |
|
12795 |
|
12796 |
|
12797 |
|
12798 |
|
12799 |
|
12800 |
|
12801 |
|
12802 |
|
12803 |
|
12804 |
|
12805 |
|
12806 |
|
12807 |
|
12808 |
|
12809 |
|
12810 |
|
12811 |
|
12812 |
|
12813 |
|
12814 |
|
12815 |
|
12816 |
|
12817 |
|
12818 |
|
12819 |
|
12820 |
|
12821 |
|
12822 |
|
12823 |
|
12824 |
|
12825 | function create(prototype, properties) {
|
12826 | var result = baseCreate(prototype);
|
12827 | return properties == null ? result : baseAssign(result, properties);
|
12828 | }
|
12829 |
|
12830 | |
12831 |
|
12832 |
|
12833 |
|
12834 |
|
12835 |
|
12836 |
|
12837 |
|
12838 |
|
12839 |
|
12840 |
|
12841 |
|
12842 |
|
12843 |
|
12844 |
|
12845 |
|
12846 |
|
12847 |
|
12848 |
|
12849 |
|
12850 |
|
12851 | var defaults = baseRest(function(object, sources) {
|
12852 | object = Object(object);
|
12853 |
|
12854 | var index = -1;
|
12855 | var length = sources.length;
|
12856 | var guard = length > 2 ? sources[2] : undefined;
|
12857 |
|
12858 | if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
12859 | length = 1;
|
12860 | }
|
12861 |
|
12862 | while (++index < length) {
|
12863 | var source = sources[index];
|
12864 | var props = keysIn(source);
|
12865 | var propsIndex = -1;
|
12866 | var propsLength = props.length;
|
12867 |
|
12868 | while (++propsIndex < propsLength) {
|
12869 | var key = props[propsIndex];
|
12870 | var value = object[key];
|
12871 |
|
12872 | if (value === undefined ||
|
12873 | (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
12874 | object[key] = source[key];
|
12875 | }
|
12876 | }
|
12877 | }
|
12878 |
|
12879 | return object;
|
12880 | });
|
12881 |
|
12882 | |
12883 |
|
12884 |
|
12885 |
|
12886 |
|
12887 |
|
12888 |
|
12889 |
|
12890 |
|
12891 |
|
12892 |
|
12893 |
|
12894 |
|
12895 |
|
12896 |
|
12897 |
|
12898 |
|
12899 |
|
12900 |
|
12901 | var defaultsDeep = baseRest(function(args) {
|
12902 | args.push(undefined, customDefaultsMerge);
|
12903 | return apply(mergeWith, undefined, args);
|
12904 | });
|
12905 |
|
12906 | |
12907 |
|
12908 |
|
12909 |
|
12910 |
|
12911 |
|
12912 |
|
12913 |
|
12914 |
|
12915 |
|
12916 |
|
12917 |
|
12918 |
|
12919 |
|
12920 |
|
12921 |
|
12922 |
|
12923 |
|
12924 |
|
12925 |
|
12926 |
|
12927 |
|
12928 |
|
12929 |
|
12930 |
|
12931 |
|
12932 |
|
12933 |
|
12934 |
|
12935 |
|
12936 |
|
12937 |
|
12938 |
|
12939 |
|
12940 |
|
12941 | function findKey(object, predicate) {
|
12942 | return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
|
12943 | }
|
12944 |
|
12945 | |
12946 |
|
12947 |
|
12948 |
|
12949 |
|
12950 |
|
12951 |
|
12952 |
|
12953 |
|
12954 |
|
12955 |
|
12956 |
|
12957 |
|
12958 |
|
12959 |
|
12960 |
|
12961 |
|
12962 |
|
12963 |
|
12964 |
|
12965 |
|
12966 |
|
12967 |
|
12968 |
|
12969 |
|
12970 |
|
12971 |
|
12972 |
|
12973 |
|
12974 |
|
12975 |
|
12976 |
|
12977 |
|
12978 |
|
12979 |
|
12980 | function findLastKey(object, predicate) {
|
12981 | return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
|
12982 | }
|
12983 |
|
12984 | |
12985 |
|
12986 |
|
12987 |
|
12988 |
|
12989 |
|
12990 |
|
12991 |
|
12992 |
|
12993 |
|
12994 |
|
12995 |
|
12996 |
|
12997 |
|
12998 |
|
12999 |
|
13000 |
|
13001 |
|
13002 |
|
13003 |
|
13004 |
|
13005 |
|
13006 |
|
13007 |
|
13008 |
|
13009 |
|
13010 |
|
13011 |
|
13012 | function forIn(object, iteratee) {
|
13013 | return object == null
|
13014 | ? object
|
13015 | : baseFor(object, getIteratee(iteratee, 3), keysIn);
|
13016 | }
|
13017 |
|
13018 | |
13019 |
|
13020 |
|
13021 |
|
13022 |
|
13023 |
|
13024 |
|
13025 |
|
13026 |
|
13027 |
|
13028 |
|
13029 |
|
13030 |
|
13031 |
|
13032 |
|
13033 |
|
13034 |
|
13035 |
|
13036 |
|
13037 |
|
13038 |
|
13039 |
|
13040 |
|
13041 |
|
13042 |
|
13043 |
|
13044 | function forInRight(object, iteratee) {
|
13045 | return object == null
|
13046 | ? object
|
13047 | : baseForRight(object, getIteratee(iteratee, 3), keysIn);
|
13048 | }
|
13049 |
|
13050 | |
13051 |
|
13052 |
|
13053 |
|
13054 |
|
13055 |
|
13056 |
|
13057 |
|
13058 |
|
13059 |
|
13060 |
|
13061 |
|
13062 |
|
13063 |
|
13064 |
|
13065 |
|
13066 |
|
13067 |
|
13068 |
|
13069 |
|
13070 |
|
13071 |
|
13072 |
|
13073 |
|
13074 |
|
13075 |
|
13076 |
|
13077 |
|
13078 | function forOwn(object, iteratee) {
|
13079 | return object && baseForOwn(object, getIteratee(iteratee, 3));
|
13080 | }
|
13081 |
|
13082 | |
13083 |
|
13084 |
|
13085 |
|
13086 |
|
13087 |
|
13088 |
|
13089 |
|
13090 |
|
13091 |
|
13092 |
|
13093 |
|
13094 |
|
13095 |
|
13096 |
|
13097 |
|
13098 |
|
13099 |
|
13100 |
|
13101 |
|
13102 |
|
13103 |
|
13104 |
|
13105 |
|
13106 |
|
13107 |
|
13108 | function forOwnRight(object, iteratee) {
|
13109 | return object && baseForOwnRight(object, getIteratee(iteratee, 3));
|
13110 | }
|
13111 |
|
13112 | |
13113 |
|
13114 |
|
13115 |
|
13116 |
|
13117 |
|
13118 |
|
13119 |
|
13120 |
|
13121 |
|
13122 |
|
13123 |
|
13124 |
|
13125 |
|
13126 |
|
13127 |
|
13128 |
|
13129 |
|
13130 |
|
13131 |
|
13132 |
|
13133 |
|
13134 |
|
13135 | function functions(object) {
|
13136 | return object == null ? [] : baseFunctions(object, keys(object));
|
13137 | }
|
13138 |
|
13139 | |
13140 |
|
13141 |
|
13142 |
|
13143 |
|
13144 |
|
13145 |
|
13146 |
|
13147 |
|
13148 |
|
13149 |
|
13150 |
|
13151 |
|
13152 |
|
13153 |
|
13154 |
|
13155 |
|
13156 |
|
13157 |
|
13158 |
|
13159 |
|
13160 |
|
13161 |
|
13162 | function functionsIn(object) {
|
13163 | return object == null ? [] : baseFunctions(object, keysIn(object));
|
13164 | }
|
13165 |
|
13166 | |
13167 |
|
13168 |
|
13169 |
|
13170 |
|
13171 |
|
13172 |
|
13173 |
|
13174 |
|
13175 |
|
13176 |
|
13177 |
|
13178 |
|
13179 |
|
13180 |
|
13181 |
|
13182 |
|
13183 |
|
13184 |
|
13185 |
|
13186 |
|
13187 |
|
13188 |
|
13189 |
|
13190 |
|
13191 | function get(object, path, defaultValue) {
|
13192 | var result = object == null ? undefined : baseGet(object, path);
|
13193 | return result === undefined ? defaultValue : result;
|
13194 | }
|
13195 |
|
13196 | |
13197 |
|
13198 |
|
13199 |
|
13200 |
|
13201 |
|
13202 |
|
13203 |
|
13204 |
|
13205 |
|
13206 |
|
13207 |
|
13208 |
|
13209 |
|
13210 |
|
13211 |
|
13212 |
|
13213 |
|
13214 |
|
13215 |
|
13216 |
|
13217 |
|
13218 |
|
13219 |
|
13220 |
|
13221 |
|
13222 |
|
13223 | function has(object, path) {
|
13224 | return object != null && hasPath(object, path, baseHas);
|
13225 | }
|
13226 |
|
13227 | |
13228 |
|
13229 |
|
13230 |
|
13231 |
|
13232 |
|
13233 |
|
13234 |
|
13235 |
|
13236 |
|
13237 |
|
13238 |
|
13239 |
|
13240 |
|
13241 |
|
13242 |
|
13243 |
|
13244 |
|
13245 |
|
13246 |
|
13247 |
|
13248 |
|
13249 |
|
13250 |
|
13251 |
|
13252 |
|
13253 | function hasIn(object, path) {
|
13254 | return object != null && hasPath(object, path, baseHasIn);
|
13255 | }
|
13256 |
|
13257 | |
13258 |
|
13259 |
|
13260 |
|
13261 |
|
13262 |
|
13263 |
|
13264 |
|
13265 |
|
13266 |
|
13267 |
|
13268 |
|
13269 |
|
13270 |
|
13271 |
|
13272 |
|
13273 |
|
13274 |
|
13275 | var invert = createInverter(function(result, value, key) {
|
13276 | if (value != null &&
|
13277 | typeof value.toString != 'function') {
|
13278 | value = nativeObjectToString.call(value);
|
13279 | }
|
13280 |
|
13281 | result[value] = key;
|
13282 | }, constant(identity));
|
13283 |
|
13284 | |
13285 |
|
13286 |
|
13287 |
|
13288 |
|
13289 |
|
13290 |
|
13291 |
|
13292 |
|
13293 |
|
13294 |
|
13295 |
|
13296 |
|
13297 |
|
13298 |
|
13299 |
|
13300 |
|
13301 |
|
13302 |
|
13303 |
|
13304 |
|
13305 |
|
13306 |
|
13307 |
|
13308 |
|
13309 |
|
13310 | var invertBy = createInverter(function(result, value, key) {
|
13311 | if (value != null &&
|
13312 | typeof value.toString != 'function') {
|
13313 | value = nativeObjectToString.call(value);
|
13314 | }
|
13315 |
|
13316 | if (hasOwnProperty.call(result, value)) {
|
13317 | result[value].push(key);
|
13318 | } else {
|
13319 | result[value] = [key];
|
13320 | }
|
13321 | }, getIteratee);
|
13322 |
|
13323 | |
13324 |
|
13325 |
|
13326 |
|
13327 |
|
13328 |
|
13329 |
|
13330 |
|
13331 |
|
13332 |
|
13333 |
|
13334 |
|
13335 |
|
13336 |
|
13337 |
|
13338 |
|
13339 |
|
13340 |
|
13341 | var invoke = baseRest(baseInvoke);
|
13342 |
|
13343 | |
13344 |
|
13345 |
|
13346 |
|
13347 |
|
13348 |
|
13349 |
|
13350 |
|
13351 |
|
13352 |
|
13353 |
|
13354 |
|
13355 |
|
13356 |
|
13357 |
|
13358 |
|
13359 |
|
13360 |
|
13361 |
|
13362 |
|
13363 |
|
13364 |
|
13365 |
|
13366 |
|
13367 |
|
13368 |
|
13369 |
|
13370 |
|
13371 | function keys(object) {
|
13372 | return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
13373 | }
|
13374 |
|
13375 | |
13376 |
|
13377 |
|
13378 |
|
13379 |
|
13380 |
|
13381 |
|
13382 |
|
13383 |
|
13384 |
|
13385 |
|
13386 |
|
13387 |
|
13388 |
|
13389 |
|
13390 |
|
13391 |
|
13392 |
|
13393 |
|
13394 |
|
13395 |
|
13396 |
|
13397 |
|
13398 | function keysIn(object) {
|
13399 | return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
13400 | }
|
13401 |
|
13402 | |
13403 |
|
13404 |
|
13405 |
|
13406 |
|
13407 |
|
13408 |
|
13409 |
|
13410 |
|
13411 |
|
13412 |
|
13413 |
|
13414 |
|
13415 |
|
13416 |
|
13417 |
|
13418 |
|
13419 |
|
13420 |
|
13421 |
|
13422 |
|
13423 | function mapKeys(object, iteratee) {
|
13424 | var result = {};
|
13425 | iteratee = getIteratee(iteratee, 3);
|
13426 |
|
13427 | baseForOwn(object, function(value, key, object) {
|
13428 | baseAssignValue(result, iteratee(value, key, object), value);
|
13429 | });
|
13430 | return result;
|
13431 | }
|
13432 |
|
13433 | |
13434 |
|
13435 |
|
13436 |
|
13437 |
|
13438 |
|
13439 |
|
13440 |
|
13441 |
|
13442 |
|
13443 |
|
13444 |
|
13445 |
|
13446 |
|
13447 |
|
13448 |
|
13449 |
|
13450 |
|
13451 |
|
13452 |
|
13453 |
|
13454 |
|
13455 |
|
13456 |
|
13457 |
|
13458 |
|
13459 |
|
13460 |
|
13461 | function mapValues(object, iteratee) {
|
13462 | var result = {};
|
13463 | iteratee = getIteratee(iteratee, 3);
|
13464 |
|
13465 | baseForOwn(object, function(value, key, object) {
|
13466 | baseAssignValue(result, key, iteratee(value, key, object));
|
13467 | });
|
13468 | return result;
|
13469 | }
|
13470 |
|
13471 | |
13472 |
|
13473 |
|
13474 |
|
13475 |
|
13476 |
|
13477 |
|
13478 |
|
13479 |
|
13480 |
|
13481 |
|
13482 |
|
13483 |
|
13484 |
|
13485 |
|
13486 |
|
13487 |
|
13488 |
|
13489 |
|
13490 |
|
13491 |
|
13492 |
|
13493 |
|
13494 |
|
13495 |
|
13496 |
|
13497 |
|
13498 |
|
13499 |
|
13500 |
|
13501 |
|
13502 | var merge = createAssigner(function(object, source, srcIndex) {
|
13503 | baseMerge(object, source, srcIndex);
|
13504 | });
|
13505 |
|
13506 | |
13507 |
|
13508 |
|
13509 |
|
13510 |
|
13511 |
|
13512 |
|
13513 |
|
13514 |
|
13515 |
|
13516 |
|
13517 |
|
13518 |
|
13519 |
|
13520 |
|
13521 |
|
13522 |
|
13523 |
|
13524 |
|
13525 |
|
13526 |
|
13527 |
|
13528 |
|
13529 |
|
13530 |
|
13531 |
|
13532 |
|
13533 |
|
13534 |
|
13535 |
|
13536 |
|
13537 | var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
|
13538 | baseMerge(object, source, srcIndex, customizer);
|
13539 | });
|
13540 |
|
13541 | |
13542 |
|
13543 |
|
13544 |
|
13545 |
|
13546 |
|
13547 |
|
13548 |
|
13549 |
|
13550 |
|
13551 |
|
13552 |
|
13553 |
|
13554 |
|
13555 |
|
13556 |
|
13557 |
|
13558 |
|
13559 |
|
13560 |
|
13561 | var omit = flatRest(function(object, paths) {
|
13562 | var result = {};
|
13563 | if (object == null) {
|
13564 | return result;
|
13565 | }
|
13566 | var isDeep = false;
|
13567 | paths = arrayMap(paths, function(path) {
|
13568 | path = castPath(path, object);
|
13569 | isDeep || (isDeep = path.length > 1);
|
13570 | return path;
|
13571 | });
|
13572 | copyObject(object, getAllKeysIn(object), result);
|
13573 | if (isDeep) {
|
13574 | result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
13575 | }
|
13576 | var length = paths.length;
|
13577 | while (length--) {
|
13578 | baseUnset(result, paths[length]);
|
13579 | }
|
13580 | return result;
|
13581 | });
|
13582 |
|
13583 | |
13584 |
|
13585 |
|
13586 |
|
13587 |
|
13588 |
|
13589 |
|
13590 |
|
13591 |
|
13592 |
|
13593 |
|
13594 |
|
13595 |
|
13596 |
|
13597 |
|
13598 |
|
13599 |
|
13600 |
|
13601 |
|
13602 |
|
13603 | function omitBy(object, predicate) {
|
13604 | return pickBy(object, negate(getIteratee(predicate)));
|
13605 | }
|
13606 |
|
13607 | |
13608 |
|
13609 |
|
13610 |
|
13611 |
|
13612 |
|
13613 |
|
13614 |
|
13615 |
|
13616 |
|
13617 |
|
13618 |
|
13619 |
|
13620 |
|
13621 |
|
13622 |
|
13623 |
|
13624 | var pick = flatRest(function(object, paths) {
|
13625 | return object == null ? {} : basePick(object, paths);
|
13626 | });
|
13627 |
|
13628 | |
13629 |
|
13630 |
|
13631 |
|
13632 |
|
13633 |
|
13634 |
|
13635 |
|
13636 |
|
13637 |
|
13638 |
|
13639 |
|
13640 |
|
13641 |
|
13642 |
|
13643 |
|
13644 |
|
13645 |
|
13646 | function pickBy(object, predicate) {
|
13647 | if (object == null) {
|
13648 | return {};
|
13649 | }
|
13650 | var props = arrayMap(getAllKeysIn(object), function(prop) {
|
13651 | return [prop];
|
13652 | });
|
13653 | predicate = getIteratee(predicate);
|
13654 | return basePickBy(object, props, function(value, path) {
|
13655 | return predicate(value, path[0]);
|
13656 | });
|
13657 | }
|
13658 |
|
13659 | |
13660 |
|
13661 |
|
13662 |
|
13663 |
|
13664 |
|
13665 |
|
13666 |
|
13667 |
|
13668 |
|
13669 |
|
13670 |
|
13671 |
|
13672 |
|
13673 |
|
13674 |
|
13675 |
|
13676 |
|
13677 |
|
13678 |
|
13679 |
|
13680 |
|
13681 |
|
13682 |
|
13683 |
|
13684 |
|
13685 |
|
13686 |
|
13687 |
|
13688 | function result(object, path, defaultValue) {
|
13689 | path = castPath(path, object);
|
13690 |
|
13691 | var index = -1,
|
13692 | length = path.length;
|
13693 |
|
13694 |
|
13695 | if (!length) {
|
13696 | length = 1;
|
13697 | object = undefined;
|
13698 | }
|
13699 | while (++index < length) {
|
13700 | var value = object == null ? undefined : object[toKey(path[index])];
|
13701 | if (value === undefined) {
|
13702 | index = length;
|
13703 | value = defaultValue;
|
13704 | }
|
13705 | object = isFunction(value) ? value.call(object) : value;
|
13706 | }
|
13707 | return object;
|
13708 | }
|
13709 |
|
13710 | |
13711 |
|
13712 |
|
13713 |
|
13714 |
|
13715 |
|
13716 |
|
13717 |
|
13718 |
|
13719 |
|
13720 |
|
13721 |
|
13722 |
|
13723 |
|
13724 |
|
13725 |
|
13726 |
|
13727 |
|
13728 |
|
13729 |
|
13730 |
|
13731 |
|
13732 |
|
13733 |
|
13734 |
|
13735 |
|
13736 |
|
13737 |
|
13738 | function set(object, path, value) {
|
13739 | return object == null ? object : baseSet(object, path, value);
|
13740 | }
|
13741 |
|
13742 | |
13743 |
|
13744 |
|
13745 |
|
13746 |
|
13747 |
|
13748 |
|
13749 |
|
13750 |
|
13751 |
|
13752 |
|
13753 |
|
13754 |
|
13755 |
|
13756 |
|
13757 |
|
13758 |
|
13759 |
|
13760 |
|
13761 |
|
13762 |
|
13763 |
|
13764 |
|
13765 |
|
13766 | function setWith(object, path, value, customizer) {
|
13767 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
13768 | return object == null ? object : baseSet(object, path, value, customizer);
|
13769 | }
|
13770 |
|
13771 | |
13772 |
|
13773 |
|
13774 |
|
13775 |
|
13776 |
|
13777 |
|
13778 |
|
13779 |
|
13780 |
|
13781 |
|
13782 |
|
13783 |
|
13784 |
|
13785 |
|
13786 |
|
13787 |
|
13788 |
|
13789 |
|
13790 |
|
13791 |
|
13792 |
|
13793 |
|
13794 |
|
13795 | var toPairs = createToPairs(keys);
|
13796 |
|
13797 | |
13798 |
|
13799 |
|
13800 |
|
13801 |
|
13802 |
|
13803 |
|
13804 |
|
13805 |
|
13806 |
|
13807 |
|
13808 |
|
13809 |
|
13810 |
|
13811 |
|
13812 |
|
13813 |
|
13814 |
|
13815 |
|
13816 |
|
13817 |
|
13818 |
|
13819 |
|
13820 |
|
13821 | var toPairsIn = createToPairs(keysIn);
|
13822 |
|
13823 | |
13824 |
|
13825 |
|
13826 |
|
13827 |
|
13828 |
|
13829 |
|
13830 |
|
13831 |
|
13832 |
|
13833 |
|
13834 |
|
13835 |
|
13836 |
|
13837 |
|
13838 |
|
13839 |
|
13840 |
|
13841 |
|
13842 |
|
13843 |
|
13844 |
|
13845 |
|
13846 |
|
13847 |
|
13848 |
|
13849 |
|
13850 |
|
13851 |
|
13852 |
|
13853 | function transform(object, iteratee, accumulator) {
|
13854 | var isArr = isArray(object),
|
13855 | isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
13856 |
|
13857 | iteratee = getIteratee(iteratee, 4);
|
13858 | if (accumulator == null) {
|
13859 | var Ctor = object && object.constructor;
|
13860 | if (isArrLike) {
|
13861 | accumulator = isArr ? new Ctor : [];
|
13862 | }
|
13863 | else if (isObject(object)) {
|
13864 | accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
13865 | }
|
13866 | else {
|
13867 | accumulator = {};
|
13868 | }
|
13869 | }
|
13870 | (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
|
13871 | return iteratee(accumulator, value, index, object);
|
13872 | });
|
13873 | return accumulator;
|
13874 | }
|
13875 |
|
13876 | |
13877 |
|
13878 |
|
13879 |
|
13880 |
|
13881 |
|
13882 |
|
13883 |
|
13884 |
|
13885 |
|
13886 |
|
13887 |
|
13888 |
|
13889 |
|
13890 |
|
13891 |
|
13892 |
|
13893 |
|
13894 |
|
13895 |
|
13896 |
|
13897 |
|
13898 |
|
13899 |
|
13900 |
|
13901 |
|
13902 |
|
13903 | function unset(object, path) {
|
13904 | return object == null ? true : baseUnset(object, path);
|
13905 | }
|
13906 |
|
13907 | |
13908 |
|
13909 |
|
13910 |
|
13911 |
|
13912 |
|
13913 |
|
13914 |
|
13915 |
|
13916 |
|
13917 |
|
13918 |
|
13919 |
|
13920 |
|
13921 |
|
13922 |
|
13923 |
|
13924 |
|
13925 |
|
13926 |
|
13927 |
|
13928 |
|
13929 |
|
13930 |
|
13931 |
|
13932 |
|
13933 |
|
13934 | function update(object, path, updater) {
|
13935 | return object == null ? object : baseUpdate(object, path, castFunction(updater));
|
13936 | }
|
13937 |
|
13938 | |
13939 |
|
13940 |
|
13941 |
|
13942 |
|
13943 |
|
13944 |
|
13945 |
|
13946 |
|
13947 |
|
13948 |
|
13949 |
|
13950 |
|
13951 |
|
13952 |
|
13953 |
|
13954 |
|
13955 |
|
13956 |
|
13957 |
|
13958 |
|
13959 |
|
13960 |
|
13961 |
|
13962 | function updateWith(object, path, updater, customizer) {
|
13963 | customizer = typeof customizer == 'function' ? customizer : undefined;
|
13964 | return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
|
13965 | }
|
13966 |
|
13967 | |
13968 |
|
13969 |
|
13970 |
|
13971 |
|
13972 |
|
13973 |
|
13974 |
|
13975 |
|
13976 |
|
13977 |
|
13978 |
|
13979 |
|
13980 |
|
13981 |
|
13982 |
|
13983 |
|
13984 |
|
13985 |
|
13986 |
|
13987 |
|
13988 |
|
13989 |
|
13990 |
|
13991 |
|
13992 |
|
13993 | function values(object) {
|
13994 | return object == null ? [] : baseValues(object, keys(object));
|
13995 | }
|
13996 |
|
13997 | |
13998 |
|
13999 |
|
14000 |
|
14001 |
|
14002 |
|
14003 |
|
14004 |
|
14005 |
|
14006 |
|
14007 |
|
14008 |
|
14009 |
|
14010 |
|
14011 |
|
14012 |
|
14013 |
|
14014 |
|
14015 |
|
14016 |
|
14017 |
|
14018 |
|
14019 |
|
14020 |
|
14021 | function valuesIn(object) {
|
14022 | return object == null ? [] : baseValues(object, keysIn(object));
|
14023 | }
|
14024 |
|
14025 |
|
14026 |
|
14027 | |
14028 |
|
14029 |
|
14030 |
|
14031 |
|
14032 |
|
14033 |
|
14034 |
|
14035 |
|
14036 |
|
14037 |
|
14038 |
|
14039 |
|
14040 |
|
14041 |
|
14042 |
|
14043 |
|
14044 |
|
14045 |
|
14046 | function clamp(number, lower, upper) {
|
14047 | if (upper === undefined) {
|
14048 | upper = lower;
|
14049 | lower = undefined;
|
14050 | }
|
14051 | if (upper !== undefined) {
|
14052 | upper = toNumber(upper);
|
14053 | upper = upper === upper ? upper : 0;
|
14054 | }
|
14055 | if (lower !== undefined) {
|
14056 | lower = toNumber(lower);
|
14057 | lower = lower === lower ? lower : 0;
|
14058 | }
|
14059 | return baseClamp(toNumber(number), lower, upper);
|
14060 | }
|
14061 |
|
14062 | |
14063 |
|
14064 |
|
14065 |
|
14066 |
|
14067 |
|
14068 |
|
14069 |
|
14070 |
|
14071 |
|
14072 |
|
14073 |
|
14074 |
|
14075 |
|
14076 |
|
14077 |
|
14078 |
|
14079 |
|
14080 |
|
14081 |
|
14082 |
|
14083 |
|
14084 |
|
14085 |
|
14086 |
|
14087 |
|
14088 |
|
14089 |
|
14090 |
|
14091 |
|
14092 |
|
14093 |
|
14094 |
|
14095 |
|
14096 |
|
14097 |
|
14098 |
|
14099 |
|
14100 | function inRange(number, start, end) {
|
14101 | start = toFinite(start);
|
14102 | if (end === undefined) {
|
14103 | end = start;
|
14104 | start = 0;
|
14105 | } else {
|
14106 | end = toFinite(end);
|
14107 | }
|
14108 | number = toNumber(number);
|
14109 | return baseInRange(number, start, end);
|
14110 | }
|
14111 |
|
14112 | |
14113 |
|
14114 |
|
14115 |
|
14116 |
|
14117 |
|
14118 |
|
14119 |
|
14120 |
|
14121 |
|
14122 |
|
14123 |
|
14124 |
|
14125 |
|
14126 |
|
14127 |
|
14128 |
|
14129 |
|
14130 |
|
14131 |
|
14132 |
|
14133 |
|
14134 |
|
14135 |
|
14136 |
|
14137 |
|
14138 |
|
14139 |
|
14140 |
|
14141 |
|
14142 |
|
14143 | function random(lower, upper, floating) {
|
14144 | if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
|
14145 | upper = floating = undefined;
|
14146 | }
|
14147 | if (floating === undefined) {
|
14148 | if (typeof upper == 'boolean') {
|
14149 | floating = upper;
|
14150 | upper = undefined;
|
14151 | }
|
14152 | else if (typeof lower == 'boolean') {
|
14153 | floating = lower;
|
14154 | lower = undefined;
|
14155 | }
|
14156 | }
|
14157 | if (lower === undefined && upper === undefined) {
|
14158 | lower = 0;
|
14159 | upper = 1;
|
14160 | }
|
14161 | else {
|
14162 | lower = toFinite(lower);
|
14163 | if (upper === undefined) {
|
14164 | upper = lower;
|
14165 | lower = 0;
|
14166 | } else {
|
14167 | upper = toFinite(upper);
|
14168 | }
|
14169 | }
|
14170 | if (lower > upper) {
|
14171 | var temp = lower;
|
14172 | lower = upper;
|
14173 | upper = temp;
|
14174 | }
|
14175 | if (floating || lower % 1 || upper % 1) {
|
14176 | var rand = nativeRandom();
|
14177 | return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
|
14178 | }
|
14179 | return baseRandom(lower, upper);
|
14180 | }
|
14181 |
|
14182 |
|
14183 |
|
14184 | |
14185 |
|
14186 |
|
14187 |
|
14188 |
|
14189 |
|
14190 |
|
14191 |
|
14192 |
|
14193 |
|
14194 |
|
14195 |
|
14196 |
|
14197 |
|
14198 |
|
14199 |
|
14200 |
|
14201 |
|
14202 |
|
14203 |
|
14204 | var camelCase = createCompounder(function(result, word, index) {
|
14205 | word = word.toLowerCase();
|
14206 | return result + (index ? capitalize(word) : word);
|
14207 | });
|
14208 |
|
14209 | |
14210 |
|
14211 |
|
14212 |
|
14213 |
|
14214 |
|
14215 |
|
14216 |
|
14217 |
|
14218 |
|
14219 |
|
14220 |
|
14221 |
|
14222 |
|
14223 |
|
14224 | function capitalize(string) {
|
14225 | return upperFirst(toString(string).toLowerCase());
|
14226 | }
|
14227 |
|
14228 | |
14229 |
|
14230 |
|
14231 |
|
14232 |
|
14233 |
|
14234 |
|
14235 |
|
14236 |
|
14237 |
|
14238 |
|
14239 |
|
14240 |
|
14241 |
|
14242 |
|
14243 |
|
14244 |
|
14245 |
|
14246 | function deburr(string) {
|
14247 | string = toString(string);
|
14248 | return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
|
14249 | }
|
14250 |
|
14251 | |
14252 |
|
14253 |
|
14254 |
|
14255 |
|
14256 |
|
14257 |
|
14258 |
|
14259 |
|
14260 |
|
14261 |
|
14262 |
|
14263 |
|
14264 |
|
14265 |
|
14266 |
|
14267 |
|
14268 |
|
14269 |
|
14270 |
|
14271 |
|
14272 |
|
14273 |
|
14274 | function endsWith(string, target, position) {
|
14275 | string = toString(string);
|
14276 | target = baseToString(target);
|
14277 |
|
14278 | var length = string.length;
|
14279 | position = position === undefined
|
14280 | ? length
|
14281 | : baseClamp(toInteger(position), 0, length);
|
14282 |
|
14283 | var end = position;
|
14284 | position -= target.length;
|
14285 | return position >= 0 && string.slice(position, end) == target;
|
14286 | }
|
14287 |
|
14288 | |
14289 |
|
14290 |
|
14291 |
|
14292 |
|
14293 |
|
14294 |
|
14295 |
|
14296 |
|
14297 |
|
14298 |
|
14299 |
|
14300 |
|
14301 |
|
14302 |
|
14303 |
|
14304 |
|
14305 |
|
14306 |
|
14307 |
|
14308 |
|
14309 |
|
14310 |
|
14311 |
|
14312 |
|
14313 |
|
14314 |
|
14315 |
|
14316 | function escape(string) {
|
14317 | string = toString(string);
|
14318 | return (string && reHasUnescapedHtml.test(string))
|
14319 | ? string.replace(reUnescapedHtml, escapeHtmlChar)
|
14320 | : string;
|
14321 | }
|
14322 |
|
14323 | |
14324 |
|
14325 |
|
14326 |
|
14327 |
|
14328 |
|
14329 |
|
14330 |
|
14331 |
|
14332 |
|
14333 |
|
14334 |
|
14335 |
|
14336 |
|
14337 |
|
14338 | function escapeRegExp(string) {
|
14339 | string = toString(string);
|
14340 | return (string && reHasRegExpChar.test(string))
|
14341 | ? string.replace(reRegExpChar, '\\$&')
|
14342 | : string;
|
14343 | }
|
14344 |
|
14345 | |
14346 |
|
14347 |
|
14348 |
|
14349 |
|
14350 |
|
14351 |
|
14352 |
|
14353 |
|
14354 |
|
14355 |
|
14356 |
|
14357 |
|
14358 |
|
14359 |
|
14360 |
|
14361 |
|
14362 |
|
14363 |
|
14364 |
|
14365 |
|
14366 | var kebabCase = createCompounder(function(result, word, index) {
|
14367 | return result + (index ? '-' : '') + word.toLowerCase();
|
14368 | });
|
14369 |
|
14370 | |
14371 |
|
14372 |
|
14373 |
|
14374 |
|
14375 |
|
14376 |
|
14377 |
|
14378 |
|
14379 |
|
14380 |
|
14381 |
|
14382 |
|
14383 |
|
14384 |
|
14385 |
|
14386 |
|
14387 |
|
14388 |
|
14389 |
|
14390 | var lowerCase = createCompounder(function(result, word, index) {
|
14391 | return result + (index ? ' ' : '') + word.toLowerCase();
|
14392 | });
|
14393 |
|
14394 | |
14395 |
|
14396 |
|
14397 |
|
14398 |
|
14399 |
|
14400 |
|
14401 |
|
14402 |
|
14403 |
|
14404 |
|
14405 |
|
14406 |
|
14407 |
|
14408 |
|
14409 |
|
14410 |
|
14411 | var lowerFirst = createCaseFirst('toLowerCase');
|
14412 |
|
14413 | |
14414 |
|
14415 |
|
14416 |
|
14417 |
|
14418 |
|
14419 |
|
14420 |
|
14421 |
|
14422 |
|
14423 |
|
14424 |
|
14425 |
|
14426 |
|
14427 |
|
14428 |
|
14429 |
|
14430 |
|
14431 |
|
14432 |
|
14433 |
|
14434 |
|
14435 |
|
14436 | function pad(string, length, chars) {
|
14437 | string = toString(string);
|
14438 | length = toInteger(length);
|
14439 |
|
14440 | var strLength = length ? stringSize(string) : 0;
|
14441 | if (!length || strLength >= length) {
|
14442 | return string;
|
14443 | }
|
14444 | var mid = (length - strLength) / 2;
|
14445 | return (
|
14446 | createPadding(nativeFloor(mid), chars) +
|
14447 | string +
|
14448 | createPadding(nativeCeil(mid), chars)
|
14449 | );
|
14450 | }
|
14451 |
|
14452 | |
14453 |
|
14454 |
|
14455 |
|
14456 |
|
14457 |
|
14458 |
|
14459 |
|
14460 |
|
14461 |
|
14462 |
|
14463 |
|
14464 |
|
14465 |
|
14466 |
|
14467 |
|
14468 |
|
14469 |
|
14470 |
|
14471 |
|
14472 |
|
14473 |
|
14474 |
|
14475 | function padEnd(string, length, chars) {
|
14476 | string = toString(string);
|
14477 | length = toInteger(length);
|
14478 |
|
14479 | var strLength = length ? stringSize(string) : 0;
|
14480 | return (length && strLength < length)
|
14481 | ? (string + createPadding(length - strLength, chars))
|
14482 | : string;
|
14483 | }
|
14484 |
|
14485 | |
14486 |
|
14487 |
|
14488 |
|
14489 |
|
14490 |
|
14491 |
|
14492 |
|
14493 |
|
14494 |
|
14495 |
|
14496 |
|
14497 |
|
14498 |
|
14499 |
|
14500 |
|
14501 |
|
14502 |
|
14503 |
|
14504 |
|
14505 |
|
14506 |
|
14507 |
|
14508 | function padStart(string, length, chars) {
|
14509 | string = toString(string);
|
14510 | length = toInteger(length);
|
14511 |
|
14512 | var strLength = length ? stringSize(string) : 0;
|
14513 | return (length && strLength < length)
|
14514 | ? (createPadding(length - strLength, chars) + string)
|
14515 | : string;
|
14516 | }
|
14517 |
|
14518 | |
14519 |
|
14520 |
|
14521 |
|
14522 |
|
14523 |
|
14524 |
|
14525 |
|
14526 |
|
14527 |
|
14528 |
|
14529 |
|
14530 |
|
14531 |
|
14532 |
|
14533 |
|
14534 |
|
14535 |
|
14536 |
|
14537 |
|
14538 |
|
14539 |
|
14540 |
|
14541 |
|
14542 | function parseInt(string, radix, guard) {
|
14543 | if (guard || radix == null) {
|
14544 | radix = 0;
|
14545 | } else if (radix) {
|
14546 | radix = +radix;
|
14547 | }
|
14548 | return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
|
14549 | }
|
14550 |
|
14551 | |
14552 |
|
14553 |
|
14554 |
|
14555 |
|
14556 |
|
14557 |
|
14558 |
|
14559 |
|
14560 |
|
14561 |
|
14562 |
|
14563 |
|
14564 |
|
14565 |
|
14566 |
|
14567 |
|
14568 |
|
14569 |
|
14570 |
|
14571 |
|
14572 |
|
14573 | function repeat(string, n, guard) {
|
14574 | if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
|
14575 | n = 1;
|
14576 | } else {
|
14577 | n = toInteger(n);
|
14578 | }
|
14579 | return baseRepeat(toString(string), n);
|
14580 | }
|
14581 |
|
14582 | |
14583 |
|
14584 |
|
14585 |
|
14586 |
|
14587 |
|
14588 |
|
14589 |
|
14590 |
|
14591 |
|
14592 |
|
14593 |
|
14594 |
|
14595 |
|
14596 |
|
14597 |
|
14598 |
|
14599 |
|
14600 |
|
14601 | function replace() {
|
14602 | var args = arguments,
|
14603 | string = toString(args[0]);
|
14604 |
|
14605 | return args.length < 3 ? string : string.replace(args[1], args[2]);
|
14606 | }
|
14607 |
|
14608 | |
14609 |
|
14610 |
|
14611 |
|
14612 |
|
14613 |
|
14614 |
|
14615 |
|
14616 |
|
14617 |
|
14618 |
|
14619 |
|
14620 |
|
14621 |
|
14622 |
|
14623 |
|
14624 |
|
14625 |
|
14626 |
|
14627 |
|
14628 |
|
14629 | var snakeCase = createCompounder(function(result, word, index) {
|
14630 | return result + (index ? '_' : '') + word.toLowerCase();
|
14631 | });
|
14632 |
|
14633 | |
14634 |
|
14635 |
|
14636 |
|
14637 |
|
14638 |
|
14639 |
|
14640 |
|
14641 |
|
14642 |
|
14643 |
|
14644 |
|
14645 |
|
14646 |
|
14647 |
|
14648 |
|
14649 |
|
14650 |
|
14651 |
|
14652 | function split(string, separator, limit) {
|
14653 | if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
|
14654 | separator = limit = undefined;
|
14655 | }
|
14656 | limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
|
14657 | if (!limit) {
|
14658 | return [];
|
14659 | }
|
14660 | string = toString(string);
|
14661 | if (string && (
|
14662 | typeof separator == 'string' ||
|
14663 | (separator != null && !isRegExp(separator))
|
14664 | )) {
|
14665 | separator = baseToString(separator);
|
14666 | if (!separator && hasUnicode(string)) {
|
14667 | return castSlice(stringToArray(string), 0, limit);
|
14668 | }
|
14669 | }
|
14670 | return string.split(separator, limit);
|
14671 | }
|
14672 |
|
14673 | |
14674 |
|
14675 |
|
14676 |
|
14677 |
|
14678 |
|
14679 |
|
14680 |
|
14681 |
|
14682 |
|
14683 |
|
14684 |
|
14685 |
|
14686 |
|
14687 |
|
14688 |
|
14689 |
|
14690 |
|
14691 |
|
14692 |
|
14693 |
|
14694 | var startCase = createCompounder(function(result, word, index) {
|
14695 | return result + (index ? ' ' : '') + upperFirst(word);
|
14696 | });
|
14697 |
|
14698 | |
14699 |
|
14700 |
|
14701 |
|
14702 |
|
14703 |
|
14704 |
|
14705 |
|
14706 |
|
14707 |
|
14708 |
|
14709 |
|
14710 |
|
14711 |
|
14712 |
|
14713 |
|
14714 |
|
14715 |
|
14716 |
|
14717 |
|
14718 |
|
14719 |
|
14720 |
|
14721 | function startsWith(string, target, position) {
|
14722 | string = toString(string);
|
14723 | position = position == null
|
14724 | ? 0
|
14725 | : baseClamp(toInteger(position), 0, string.length);
|
14726 |
|
14727 | target = baseToString(target);
|
14728 | return string.slice(position, position + target.length) == target;
|
14729 | }
|
14730 |
|
14731 | |
14732 |
|
14733 |
|
14734 |
|
14735 |
|
14736 |
|
14737 |
|
14738 |
|
14739 |
|
14740 |
|
14741 |
|
14742 |
|
14743 |
|
14744 |
|
14745 |
|
14746 |
|
14747 |
|
14748 |
|
14749 |
|
14750 |
|
14751 |
|
14752 |
|
14753 |
|
14754 |
|
14755 |
|
14756 |
|
14757 |
|
14758 |
|
14759 |
|
14760 |
|
14761 |
|
14762 |
|
14763 |
|
14764 |
|
14765 |
|
14766 |
|
14767 |
|
14768 |
|
14769 |
|
14770 |
|
14771 |
|
14772 |
|
14773 |
|
14774 |
|
14775 |
|
14776 |
|
14777 |
|
14778 |
|
14779 |
|
14780 |
|
14781 |
|
14782 |
|
14783 |
|
14784 |
|
14785 |
|
14786 |
|
14787 |
|
14788 |
|
14789 |
|
14790 |
|
14791 |
|
14792 |
|
14793 |
|
14794 |
|
14795 |
|
14796 |
|
14797 |
|
14798 |
|
14799 |
|
14800 |
|
14801 |
|
14802 |
|
14803 |
|
14804 |
|
14805 |
|
14806 |
|
14807 |
|
14808 |
|
14809 |
|
14810 |
|
14811 |
|
14812 |
|
14813 |
|
14814 |
|
14815 |
|
14816 |
|
14817 |
|
14818 |
|
14819 |
|
14820 |
|
14821 |
|
14822 |
|
14823 |
|
14824 |
|
14825 |
|
14826 |
|
14827 |
|
14828 |
|
14829 |
|
14830 |
|
14831 |
|
14832 |
|
14833 |
|
14834 |
|
14835 | function template(string, options, guard) {
|
14836 |
|
14837 |
|
14838 |
|
14839 | var settings = lodash.templateSettings;
|
14840 |
|
14841 | if (guard && isIterateeCall(string, options, guard)) {
|
14842 | options = undefined;
|
14843 | }
|
14844 | string = toString(string);
|
14845 | options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
14846 |
|
14847 | var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
|
14848 | importsKeys = keys(imports),
|
14849 | importsValues = baseValues(imports, importsKeys);
|
14850 |
|
14851 | var isEscaping,
|
14852 | isEvaluating,
|
14853 | index = 0,
|
14854 | interpolate = options.interpolate || reNoMatch,
|
14855 | source = "__p += '";
|
14856 |
|
14857 |
|
14858 | var reDelimiters = RegExp(
|
14859 | (options.escape || reNoMatch).source + '|' +
|
14860 | interpolate.source + '|' +
|
14861 | (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
|
14862 | (options.evaluate || reNoMatch).source + '|$'
|
14863 | , 'g');
|
14864 |
|
14865 |
|
14866 |
|
14867 |
|
14868 |
|
14869 | var sourceURL = '//# sourceURL=' +
|
14870 | (hasOwnProperty.call(options, 'sourceURL')
|
14871 | ? (options.sourceURL + '').replace(/[\r\n]/g, ' ')
|
14872 | : ('lodash.templateSources[' + (++templateCounter) + ']')
|
14873 | ) + '\n';
|
14874 |
|
14875 | string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
14876 | interpolateValue || (interpolateValue = esTemplateValue);
|
14877 |
|
14878 |
|
14879 | source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
|
14880 |
|
14881 |
|
14882 | if (escapeValue) {
|
14883 | isEscaping = true;
|
14884 | source += "' +\n__e(" + escapeValue + ") +\n'";
|
14885 | }
|
14886 | if (evaluateValue) {
|
14887 | isEvaluating = true;
|
14888 | source += "';\n" + evaluateValue + ";\n__p += '";
|
14889 | }
|
14890 | if (interpolateValue) {
|
14891 | source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
|
14892 | }
|
14893 | index = offset + match.length;
|
14894 |
|
14895 |
|
14896 |
|
14897 | return match;
|
14898 | });
|
14899 |
|
14900 | source += "';\n";
|
14901 |
|
14902 |
|
14903 |
|
14904 |
|
14905 |
|
14906 | var variable = hasOwnProperty.call(options, 'variable') && options.variable;
|
14907 | if (!variable) {
|
14908 | source = 'with (obj) {\n' + source + '\n}\n';
|
14909 | }
|
14910 |
|
14911 | source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
14912 | .replace(reEmptyStringMiddle, '$1')
|
14913 | .replace(reEmptyStringTrailing, '$1;');
|
14914 |
|
14915 |
|
14916 | source = 'function(' + (variable || 'obj') + ') {\n' +
|
14917 | (variable
|
14918 | ? ''
|
14919 | : 'obj || (obj = {});\n'
|
14920 | ) +
|
14921 | "var __t, __p = ''" +
|
14922 | (isEscaping
|
14923 | ? ', __e = _.escape'
|
14924 | : ''
|
14925 | ) +
|
14926 | (isEvaluating
|
14927 | ? ', __j = Array.prototype.join;\n' +
|
14928 | "function print() { __p += __j.call(arguments, '') }\n"
|
14929 | : ';\n'
|
14930 | ) +
|
14931 | source +
|
14932 | 'return __p\n}';
|
14933 |
|
14934 | var result = attempt(function() {
|
14935 | return Function(importsKeys, sourceURL + 'return ' + source)
|
14936 | .apply(undefined, importsValues);
|
14937 | });
|
14938 |
|
14939 |
|
14940 |
|
14941 | result.source = source;
|
14942 | if (isError(result)) {
|
14943 | throw result;
|
14944 | }
|
14945 | return result;
|
14946 | }
|
14947 |
|
14948 | |
14949 |
|
14950 |
|
14951 |
|
14952 |
|
14953 |
|
14954 |
|
14955 |
|
14956 |
|
14957 |
|
14958 |
|
14959 |
|
14960 |
|
14961 |
|
14962 |
|
14963 |
|
14964 |
|
14965 |
|
14966 |
|
14967 |
|
14968 |
|
14969 | function toLower(value) {
|
14970 | return toString(value).toLowerCase();
|
14971 | }
|
14972 |
|
14973 | |
14974 |
|
14975 |
|
14976 |
|
14977 |
|
14978 |
|
14979 |
|
14980 |
|
14981 |
|
14982 |
|
14983 |
|
14984 |
|
14985 |
|
14986 |
|
14987 |
|
14988 |
|
14989 |
|
14990 |
|
14991 |
|
14992 |
|
14993 |
|
14994 | function toUpper(value) {
|
14995 | return toString(value).toUpperCase();
|
14996 | }
|
14997 |
|
14998 | |
14999 |
|
15000 |
|
15001 |
|
15002 |
|
15003 |
|
15004 |
|
15005 |
|
15006 |
|
15007 |
|
15008 |
|
15009 |
|
15010 |
|
15011 |
|
15012 |
|
15013 |
|
15014 |
|
15015 |
|
15016 |
|
15017 |
|
15018 |
|
15019 |
|
15020 | function trim(string, chars, guard) {
|
15021 | string = toString(string);
|
15022 | if (string && (guard || chars === undefined)) {
|
15023 | return string.replace(reTrim, '');
|
15024 | }
|
15025 | if (!string || !(chars = baseToString(chars))) {
|
15026 | return string;
|
15027 | }
|
15028 | var strSymbols = stringToArray(string),
|
15029 | chrSymbols = stringToArray(chars),
|
15030 | start = charsStartIndex(strSymbols, chrSymbols),
|
15031 | end = charsEndIndex(strSymbols, chrSymbols) + 1;
|
15032 |
|
15033 | return castSlice(strSymbols, start, end).join('');
|
15034 | }
|
15035 |
|
15036 | |
15037 |
|
15038 |
|
15039 |
|
15040 |
|
15041 |
|
15042 |
|
15043 |
|
15044 |
|
15045 |
|
15046 |
|
15047 |
|
15048 |
|
15049 |
|
15050 |
|
15051 |
|
15052 |
|
15053 |
|
15054 |
|
15055 | function trimEnd(string, chars, guard) {
|
15056 | string = toString(string);
|
15057 | if (string && (guard || chars === undefined)) {
|
15058 | return string.replace(reTrimEnd, '');
|
15059 | }
|
15060 | if (!string || !(chars = baseToString(chars))) {
|
15061 | return string;
|
15062 | }
|
15063 | var strSymbols = stringToArray(string),
|
15064 | end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
|
15065 |
|
15066 | return castSlice(strSymbols, 0, end).join('');
|
15067 | }
|
15068 |
|
15069 | |
15070 |
|
15071 |
|
15072 |
|
15073 |
|
15074 |
|
15075 |
|
15076 |
|
15077 |
|
15078 |
|
15079 |
|
15080 |
|
15081 |
|
15082 |
|
15083 |
|
15084 |
|
15085 |
|
15086 |
|
15087 |
|
15088 | function trimStart(string, chars, guard) {
|
15089 | string = toString(string);
|
15090 | if (string && (guard || chars === undefined)) {
|
15091 | return string.replace(reTrimStart, '');
|
15092 | }
|
15093 | if (!string || !(chars = baseToString(chars))) {
|
15094 | return string;
|
15095 | }
|
15096 | var strSymbols = stringToArray(string),
|
15097 | start = charsStartIndex(strSymbols, stringToArray(chars));
|
15098 |
|
15099 | return castSlice(strSymbols, start).join('');
|
15100 | }
|
15101 |
|
15102 | |
15103 |
|
15104 |
|
15105 |
|
15106 |
|
15107 |
|
15108 |
|
15109 |
|
15110 |
|
15111 |
|
15112 |
|
15113 |
|
15114 |
|
15115 |
|
15116 |
|
15117 |
|
15118 |
|
15119 |
|
15120 |
|
15121 |
|
15122 |
|
15123 |
|
15124 |
|
15125 |
|
15126 |
|
15127 |
|
15128 |
|
15129 |
|
15130 |
|
15131 |
|
15132 |
|
15133 |
|
15134 |
|
15135 |
|
15136 |
|
15137 |
|
15138 |
|
15139 | function truncate(string, options) {
|
15140 | var length = DEFAULT_TRUNC_LENGTH,
|
15141 | omission = DEFAULT_TRUNC_OMISSION;
|
15142 |
|
15143 | if (isObject(options)) {
|
15144 | var separator = 'separator' in options ? options.separator : separator;
|
15145 | length = 'length' in options ? toInteger(options.length) : length;
|
15146 | omission = 'omission' in options ? baseToString(options.omission) : omission;
|
15147 | }
|
15148 | string = toString(string);
|
15149 |
|
15150 | var strLength = string.length;
|
15151 | if (hasUnicode(string)) {
|
15152 | var strSymbols = stringToArray(string);
|
15153 | strLength = strSymbols.length;
|
15154 | }
|
15155 | if (length >= strLength) {
|
15156 | return string;
|
15157 | }
|
15158 | var end = length - stringSize(omission);
|
15159 | if (end < 1) {
|
15160 | return omission;
|
15161 | }
|
15162 | var result = strSymbols
|
15163 | ? castSlice(strSymbols, 0, end).join('')
|
15164 | : string.slice(0, end);
|
15165 |
|
15166 | if (separator === undefined) {
|
15167 | return result + omission;
|
15168 | }
|
15169 | if (strSymbols) {
|
15170 | end += (result.length - end);
|
15171 | }
|
15172 | if (isRegExp(separator)) {
|
15173 | if (string.slice(end).search(separator)) {
|
15174 | var match,
|
15175 | substring = result;
|
15176 |
|
15177 | if (!separator.global) {
|
15178 | separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
|
15179 | }
|
15180 | separator.lastIndex = 0;
|
15181 | while ((match = separator.exec(substring))) {
|
15182 | var newEnd = match.index;
|
15183 | }
|
15184 | result = result.slice(0, newEnd === undefined ? end : newEnd);
|
15185 | }
|
15186 | } else if (string.indexOf(baseToString(separator), end) != end) {
|
15187 | var index = result.lastIndexOf(separator);
|
15188 | if (index > -1) {
|
15189 | result = result.slice(0, index);
|
15190 | }
|
15191 | }
|
15192 | return result + omission;
|
15193 | }
|
15194 |
|
15195 | |
15196 |
|
15197 |
|
15198 |
|
15199 |
|
15200 |
|
15201 |
|
15202 |
|
15203 |
|
15204 |
|
15205 |
|
15206 |
|
15207 |
|
15208 |
|
15209 |
|
15210 |
|
15211 |
|
15212 |
|
15213 |
|
15214 | function unescape(string) {
|
15215 | string = toString(string);
|
15216 | return (string && reHasEscapedHtml.test(string))
|
15217 | ? string.replace(reEscapedHtml, unescapeHtmlChar)
|
15218 | : string;
|
15219 | }
|
15220 |
|
15221 | |
15222 |
|
15223 |
|
15224 |
|
15225 |
|
15226 |
|
15227 |
|
15228 |
|
15229 |
|
15230 |
|
15231 |
|
15232 |
|
15233 |
|
15234 |
|
15235 |
|
15236 |
|
15237 |
|
15238 |
|
15239 |
|
15240 |
|
15241 | var upperCase = createCompounder(function(result, word, index) {
|
15242 | return result + (index ? ' ' : '') + word.toUpperCase();
|
15243 | });
|
15244 |
|
15245 | |
15246 |
|
15247 |
|
15248 |
|
15249 |
|
15250 |
|
15251 |
|
15252 |
|
15253 |
|
15254 |
|
15255 |
|
15256 |
|
15257 |
|
15258 |
|
15259 |
|
15260 |
|
15261 |
|
15262 | var upperFirst = createCaseFirst('toUpperCase');
|
15263 |
|
15264 | |
15265 |
|
15266 |
|
15267 |
|
15268 |
|
15269 |
|
15270 |
|
15271 |
|
15272 |
|
15273 |
|
15274 |
|
15275 |
|
15276 |
|
15277 |
|
15278 |
|
15279 |
|
15280 |
|
15281 |
|
15282 |
|
15283 | function words(string, pattern, guard) {
|
15284 | string = toString(string);
|
15285 | pattern = guard ? undefined : pattern;
|
15286 |
|
15287 | if (pattern === undefined) {
|
15288 | return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
15289 | }
|
15290 | return string.match(pattern) || [];
|
15291 | }
|
15292 |
|
15293 |
|
15294 |
|
15295 | |
15296 |
|
15297 |
|
15298 |
|
15299 |
|
15300 |
|
15301 |
|
15302 |
|
15303 |
|
15304 |
|
15305 |
|
15306 |
|
15307 |
|
15308 |
|
15309 |
|
15310 |
|
15311 |
|
15312 |
|
15313 |
|
15314 |
|
15315 |
|
15316 |
|
15317 | var attempt = baseRest(function(func, args) {
|
15318 | try {
|
15319 | return apply(func, undefined, args);
|
15320 | } catch (e) {
|
15321 | return isError(e) ? e : new Error(e);
|
15322 | }
|
15323 | });
|
15324 |
|
15325 | |
15326 |
|
15327 |
|
15328 |
|
15329 |
|
15330 |
|
15331 |
|
15332 |
|
15333 |
|
15334 |
|
15335 |
|
15336 |
|
15337 |
|
15338 |
|
15339 |
|
15340 |
|
15341 |
|
15342 |
|
15343 |
|
15344 |
|
15345 |
|
15346 |
|
15347 |
|
15348 |
|
15349 |
|
15350 |
|
15351 | var bindAll = flatRest(function(object, methodNames) {
|
15352 | arrayEach(methodNames, function(key) {
|
15353 | key = toKey(key);
|
15354 | baseAssignValue(object, key, bind(object[key], object));
|
15355 | });
|
15356 | return object;
|
15357 | });
|
15358 |
|
15359 | |
15360 |
|
15361 |
|
15362 |
|
15363 |
|
15364 |
|
15365 |
|
15366 |
|
15367 |
|
15368 |
|
15369 |
|
15370 |
|
15371 |
|
15372 |
|
15373 |
|
15374 |
|
15375 |
|
15376 |
|
15377 |
|
15378 |
|
15379 |
|
15380 |
|
15381 |
|
15382 |
|
15383 |
|
15384 |
|
15385 |
|
15386 |
|
15387 |
|
15388 | function cond(pairs) {
|
15389 | var length = pairs == null ? 0 : pairs.length,
|
15390 | toIteratee = getIteratee();
|
15391 |
|
15392 | pairs = !length ? [] : arrayMap(pairs, function(pair) {
|
15393 | if (typeof pair[1] != 'function') {
|
15394 | throw new TypeError(FUNC_ERROR_TEXT);
|
15395 | }
|
15396 | return [toIteratee(pair[0]), pair[1]];
|
15397 | });
|
15398 |
|
15399 | return baseRest(function(args) {
|
15400 | var index = -1;
|
15401 | while (++index < length) {
|
15402 | var pair = pairs[index];
|
15403 | if (apply(pair[0], this, args)) {
|
15404 | return apply(pair[1], this, args);
|
15405 | }
|
15406 | }
|
15407 | });
|
15408 | }
|
15409 |
|
15410 | |
15411 |
|
15412 |
|
15413 |
|
15414 |
|
15415 |
|
15416 |
|
15417 |
|
15418 |
|
15419 |
|
15420 |
|
15421 |
|
15422 |
|
15423 |
|
15424 |
|
15425 |
|
15426 |
|
15427 |
|
15428 |
|
15429 |
|
15430 |
|
15431 |
|
15432 |
|
15433 |
|
15434 | function conforms(source) {
|
15435 | return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
|
15436 | }
|
15437 |
|
15438 | |
15439 |
|
15440 |
|
15441 |
|
15442 |
|
15443 |
|
15444 |
|
15445 |
|
15446 |
|
15447 |
|
15448 |
|
15449 |
|
15450 |
|
15451 |
|
15452 |
|
15453 |
|
15454 |
|
15455 |
|
15456 |
|
15457 | function constant(value) {
|
15458 | return function() {
|
15459 | return value;
|
15460 | };
|
15461 | }
|
15462 |
|
15463 | |
15464 |
|
15465 |
|
15466 |
|
15467 |
|
15468 |
|
15469 |
|
15470 |
|
15471 |
|
15472 |
|
15473 |
|
15474 |
|
15475 |
|
15476 |
|
15477 |
|
15478 |
|
15479 |
|
15480 |
|
15481 |
|
15482 |
|
15483 | function defaultTo(value, defaultValue) {
|
15484 | return (value == null || value !== value) ? defaultValue : value;
|
15485 | }
|
15486 |
|
15487 | |
15488 |
|
15489 |
|
15490 |
|
15491 |
|
15492 |
|
15493 |
|
15494 |
|
15495 |
|
15496 |
|
15497 |
|
15498 |
|
15499 |
|
15500 |
|
15501 |
|
15502 |
|
15503 |
|
15504 |
|
15505 |
|
15506 |
|
15507 |
|
15508 |
|
15509 | var flow = createFlow();
|
15510 |
|
15511 | |
15512 |
|
15513 |
|
15514 |
|
15515 |
|
15516 |
|
15517 |
|
15518 |
|
15519 |
|
15520 |
|
15521 |
|
15522 |
|
15523 |
|
15524 |
|
15525 |
|
15526 |
|
15527 |
|
15528 |
|
15529 |
|
15530 |
|
15531 |
|
15532 | var flowRight = createFlow(true);
|
15533 |
|
15534 | |
15535 |
|
15536 |
|
15537 |
|
15538 |
|
15539 |
|
15540 |
|
15541 |
|
15542 |
|
15543 |
|
15544 |
|
15545 |
|
15546 |
|
15547 |
|
15548 |
|
15549 |
|
15550 | function identity(value) {
|
15551 | return value;
|
15552 | }
|
15553 |
|
15554 | |
15555 |
|
15556 |
|
15557 |
|
15558 |
|
15559 |
|
15560 |
|
15561 |
|
15562 |
|
15563 |
|
15564 |
|
15565 |
|
15566 |
|
15567 |
|
15568 |
|
15569 |
|
15570 |
|
15571 |
|
15572 |
|
15573 |
|
15574 |
|
15575 |
|
15576 |
|
15577 |
|
15578 |
|
15579 |
|
15580 |
|
15581 |
|
15582 |
|
15583 |
|
15584 |
|
15585 |
|
15586 |
|
15587 |
|
15588 |
|
15589 |
|
15590 |
|
15591 |
|
15592 |
|
15593 |
|
15594 |
|
15595 |
|
15596 | function iteratee(func) {
|
15597 | return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
|
15598 | }
|
15599 |
|
15600 | |
15601 |
|
15602 |
|
15603 |
|
15604 |
|
15605 |
|
15606 |
|
15607 |
|
15608 |
|
15609 |
|
15610 |
|
15611 |
|
15612 |
|
15613 |
|
15614 |
|
15615 |
|
15616 |
|
15617 |
|
15618 |
|
15619 |
|
15620 |
|
15621 |
|
15622 |
|
15623 |
|
15624 |
|
15625 |
|
15626 |
|
15627 |
|
15628 | function matches(source) {
|
15629 | return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
15630 | }
|
15631 |
|
15632 | |
15633 |
|
15634 |
|
15635 |
|
15636 |
|
15637 |
|
15638 |
|
15639 |
|
15640 |
|
15641 |
|
15642 |
|
15643 |
|
15644 |
|
15645 |
|
15646 |
|
15647 |
|
15648 |
|
15649 |
|
15650 |
|
15651 |
|
15652 |
|
15653 |
|
15654 |
|
15655 |
|
15656 |
|
15657 |
|
15658 | function matchesProperty(path, srcValue) {
|
15659 | return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
15660 | }
|
15661 |
|
15662 | |
15663 |
|
15664 |
|
15665 |
|
15666 |
|
15667 |
|
15668 |
|
15669 |
|
15670 |
|
15671 |
|
15672 |
|
15673 |
|
15674 |
|
15675 |
|
15676 |
|
15677 |
|
15678 |
|
15679 |
|
15680 |
|
15681 |
|
15682 |
|
15683 |
|
15684 |
|
15685 |
|
15686 | var method = baseRest(function(path, args) {
|
15687 | return function(object) {
|
15688 | return baseInvoke(object, path, args);
|
15689 | };
|
15690 | });
|
15691 |
|
15692 | |
15693 |
|
15694 |
|
15695 |
|
15696 |
|
15697 |
|
15698 |
|
15699 |
|
15700 |
|
15701 |
|
15702 |
|
15703 |
|
15704 |
|
15705 |
|
15706 |
|
15707 |
|
15708 |
|
15709 |
|
15710 |
|
15711 |
|
15712 |
|
15713 |
|
15714 |
|
15715 | var methodOf = baseRest(function(object, args) {
|
15716 | return function(path) {
|
15717 | return baseInvoke(object, path, args);
|
15718 | };
|
15719 | });
|
15720 |
|
15721 | |
15722 |
|
15723 |
|
15724 |
|
15725 |
|
15726 |
|
15727 |
|
15728 |
|
15729 |
|
15730 |
|
15731 |
|
15732 |
|
15733 |
|
15734 |
|
15735 |
|
15736 |
|
15737 |
|
15738 |
|
15739 |
|
15740 |
|
15741 |
|
15742 |
|
15743 |
|
15744 |
|
15745 |
|
15746 |
|
15747 |
|
15748 |
|
15749 |
|
15750 |
|
15751 |
|
15752 |
|
15753 |
|
15754 |
|
15755 |
|
15756 |
|
15757 | function mixin(object, source, options) {
|
15758 | var props = keys(source),
|
15759 | methodNames = baseFunctions(source, props);
|
15760 |
|
15761 | if (options == null &&
|
15762 | !(isObject(source) && (methodNames.length || !props.length))) {
|
15763 | options = source;
|
15764 | source = object;
|
15765 | object = this;
|
15766 | methodNames = baseFunctions(source, keys(source));
|
15767 | }
|
15768 | var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
|
15769 | isFunc = isFunction(object);
|
15770 |
|
15771 | arrayEach(methodNames, function(methodName) {
|
15772 | var func = source[methodName];
|
15773 | object[methodName] = func;
|
15774 | if (isFunc) {
|
15775 | object.prototype[methodName] = function() {
|
15776 | var chainAll = this.__chain__;
|
15777 | if (chain || chainAll) {
|
15778 | var result = object(this.__wrapped__),
|
15779 | actions = result.__actions__ = copyArray(this.__actions__);
|
15780 |
|
15781 | actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
|
15782 | result.__chain__ = chainAll;
|
15783 | return result;
|
15784 | }
|
15785 | return func.apply(object, arrayPush([this.value()], arguments));
|
15786 | };
|
15787 | }
|
15788 | });
|
15789 |
|
15790 | return object;
|
15791 | }
|
15792 |
|
15793 | |
15794 |
|
15795 |
|
15796 |
|
15797 |
|
15798 |
|
15799 |
|
15800 |
|
15801 |
|
15802 |
|
15803 |
|
15804 |
|
15805 |
|
15806 | function noConflict() {
|
15807 | if (root._ === this) {
|
15808 | root._ = oldDash;
|
15809 | }
|
15810 | return this;
|
15811 | }
|
15812 |
|
15813 | |
15814 |
|
15815 |
|
15816 |
|
15817 |
|
15818 |
|
15819 |
|
15820 |
|
15821 |
|
15822 |
|
15823 |
|
15824 |
|
15825 | function noop() {
|
15826 |
|
15827 | }
|
15828 |
|
15829 | |
15830 |
|
15831 |
|
15832 |
|
15833 |
|
15834 |
|
15835 |
|
15836 |
|
15837 |
|
15838 |
|
15839 |
|
15840 |
|
15841 |
|
15842 |
|
15843 |
|
15844 |
|
15845 |
|
15846 |
|
15847 |
|
15848 |
|
15849 | function nthArg(n) {
|
15850 | n = toInteger(n);
|
15851 | return baseRest(function(args) {
|
15852 | return baseNth(args, n);
|
15853 | });
|
15854 | }
|
15855 |
|
15856 | |
15857 |
|
15858 |
|
15859 |
|
15860 |
|
15861 |
|
15862 |
|
15863 |
|
15864 |
|
15865 |
|
15866 |
|
15867 |
|
15868 |
|
15869 |
|
15870 |
|
15871 |
|
15872 |
|
15873 |
|
15874 | var over = createOver(arrayMap);
|
15875 |
|
15876 | |
15877 |
|
15878 |
|
15879 |
|
15880 |
|
15881 |
|
15882 |
|
15883 |
|
15884 |
|
15885 |
|
15886 |
|
15887 |
|
15888 |
|
15889 |
|
15890 |
|
15891 |
|
15892 |
|
15893 |
|
15894 |
|
15895 |
|
15896 |
|
15897 |
|
15898 |
|
15899 |
|
15900 | var overEvery = createOver(arrayEvery);
|
15901 |
|
15902 | |
15903 |
|
15904 |
|
15905 |
|
15906 |
|
15907 |
|
15908 |
|
15909 |
|
15910 |
|
15911 |
|
15912 |
|
15913 |
|
15914 |
|
15915 |
|
15916 |
|
15917 |
|
15918 |
|
15919 |
|
15920 |
|
15921 |
|
15922 |
|
15923 |
|
15924 |
|
15925 |
|
15926 | var overSome = createOver(arraySome);
|
15927 |
|
15928 | |
15929 |
|
15930 |
|
15931 |
|
15932 |
|
15933 |
|
15934 |
|
15935 |
|
15936 |
|
15937 |
|
15938 |
|
15939 |
|
15940 |
|
15941 |
|
15942 |
|
15943 |
|
15944 |
|
15945 |
|
15946 |
|
15947 |
|
15948 |
|
15949 |
|
15950 | function property(path) {
|
15951 | return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
15952 | }
|
15953 |
|
15954 | |
15955 |
|
15956 |
|
15957 |
|
15958 |
|
15959 |
|
15960 |
|
15961 |
|
15962 |
|
15963 |
|
15964 |
|
15965 |
|
15966 |
|
15967 |
|
15968 |
|
15969 |
|
15970 |
|
15971 |
|
15972 |
|
15973 |
|
15974 |
|
15975 | function propertyOf(object) {
|
15976 | return function(path) {
|
15977 | return object == null ? undefined : baseGet(object, path);
|
15978 | };
|
15979 | }
|
15980 |
|
15981 | |
15982 |
|
15983 |
|
15984 |
|
15985 |
|
15986 |
|
15987 |
|
15988 |
|
15989 |
|
15990 |
|
15991 |
|
15992 |
|
15993 |
|
15994 |
|
15995 |
|
15996 |
|
15997 |
|
15998 |
|
15999 |
|
16000 |
|
16001 |
|
16002 |
|
16003 |
|
16004 |
|
16005 |
|
16006 |
|
16007 |
|
16008 |
|
16009 |
|
16010 |
|
16011 |
|
16012 |
|
16013 |
|
16014 |
|
16015 |
|
16016 |
|
16017 |
|
16018 |
|
16019 |
|
16020 |
|
16021 |
|
16022 | var range = createRange();
|
16023 |
|
16024 | |
16025 |
|
16026 |
|
16027 |
|
16028 |
|
16029 |
|
16030 |
|
16031 |
|
16032 |
|
16033 |
|
16034 |
|
16035 |
|
16036 |
|
16037 |
|
16038 |
|
16039 |
|
16040 |
|
16041 |
|
16042 |
|
16043 |
|
16044 |
|
16045 |
|
16046 |
|
16047 |
|
16048 |
|
16049 |
|
16050 |
|
16051 |
|
16052 |
|
16053 |
|
16054 |
|
16055 |
|
16056 |
|
16057 |
|
16058 |
|
16059 |
|
16060 | var rangeRight = createRange(true);
|
16061 |
|
16062 | |
16063 |
|
16064 |
|
16065 |
|
16066 |
|
16067 |
|
16068 |
|
16069 |
|
16070 |
|
16071 |
|
16072 |
|
16073 |
|
16074 |
|
16075 |
|
16076 |
|
16077 |
|
16078 |
|
16079 |
|
16080 | function stubArray() {
|
16081 | return [];
|
16082 | }
|
16083 |
|
16084 | |
16085 |
|
16086 |
|
16087 |
|
16088 |
|
16089 |
|
16090 |
|
16091 |
|
16092 |
|
16093 |
|
16094 |
|
16095 |
|
16096 |
|
16097 | function stubFalse() {
|
16098 | return false;
|
16099 | }
|
16100 |
|
16101 | |
16102 |
|
16103 |
|
16104 |
|
16105 |
|
16106 |
|
16107 |
|
16108 |
|
16109 |
|
16110 |
|
16111 |
|
16112 |
|
16113 |
|
16114 |
|
16115 |
|
16116 |
|
16117 |
|
16118 |
|
16119 | function stubObject() {
|
16120 | return {};
|
16121 | }
|
16122 |
|
16123 | |
16124 |
|
16125 |
|
16126 |
|
16127 |
|
16128 |
|
16129 |
|
16130 |
|
16131 |
|
16132 |
|
16133 |
|
16134 |
|
16135 |
|
16136 | function stubString() {
|
16137 | return '';
|
16138 | }
|
16139 |
|
16140 | |
16141 |
|
16142 |
|
16143 |
|
16144 |
|
16145 |
|
16146 |
|
16147 |
|
16148 |
|
16149 |
|
16150 |
|
16151 |
|
16152 |
|
16153 | function stubTrue() {
|
16154 | return true;
|
16155 | }
|
16156 |
|
16157 | |
16158 |
|
16159 |
|
16160 |
|
16161 |
|
16162 |
|
16163 |
|
16164 |
|
16165 |
|
16166 |
|
16167 |
|
16168 |
|
16169 |
|
16170 |
|
16171 |
|
16172 |
|
16173 |
|
16174 |
|
16175 |
|
16176 | function times(n, iteratee) {
|
16177 | n = toInteger(n);
|
16178 | if (n < 1 || n > MAX_SAFE_INTEGER) {
|
16179 | return [];
|
16180 | }
|
16181 | var index = MAX_ARRAY_LENGTH,
|
16182 | length = nativeMin(n, MAX_ARRAY_LENGTH);
|
16183 |
|
16184 | iteratee = getIteratee(iteratee);
|
16185 | n -= MAX_ARRAY_LENGTH;
|
16186 |
|
16187 | var result = baseTimes(length, iteratee);
|
16188 | while (++index < n) {
|
16189 | iteratee(index);
|
16190 | }
|
16191 | return result;
|
16192 | }
|
16193 |
|
16194 | |
16195 |
|
16196 |
|
16197 |
|
16198 |
|
16199 |
|
16200 |
|
16201 |
|
16202 |
|
16203 |
|
16204 |
|
16205 |
|
16206 |
|
16207 |
|
16208 |
|
16209 |
|
16210 |
|
16211 | function toPath(value) {
|
16212 | if (isArray(value)) {
|
16213 | return arrayMap(value, toKey);
|
16214 | }
|
16215 | return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
|
16216 | }
|
16217 |
|
16218 | |
16219 |
|
16220 |
|
16221 |
|
16222 |
|
16223 |
|
16224 |
|
16225 |
|
16226 |
|
16227 |
|
16228 |
|
16229 |
|
16230 |
|
16231 |
|
16232 |
|
16233 |
|
16234 |
|
16235 | function uniqueId(prefix) {
|
16236 | var id = ++idCounter;
|
16237 | return toString(prefix) + id;
|
16238 | }
|
16239 |
|
16240 |
|
16241 |
|
16242 | |
16243 |
|
16244 |
|
16245 |
|
16246 |
|
16247 |
|
16248 |
|
16249 |
|
16250 |
|
16251 |
|
16252 |
|
16253 |
|
16254 |
|
16255 |
|
16256 |
|
16257 | var add = createMathOperation(function(augend, addend) {
|
16258 | return augend + addend;
|
16259 | }, 0);
|
16260 |
|
16261 | |
16262 |
|
16263 |
|
16264 |
|
16265 |
|
16266 |
|
16267 |
|
16268 |
|
16269 |
|
16270 |
|
16271 |
|
16272 |
|
16273 |
|
16274 |
|
16275 |
|
16276 |
|
16277 |
|
16278 |
|
16279 |
|
16280 |
|
16281 |
|
16282 | var ceil = createRound('ceil');
|
16283 |
|
16284 | |
16285 |
|
16286 |
|
16287 |
|
16288 |
|
16289 |
|
16290 |
|
16291 |
|
16292 |
|
16293 |
|
16294 |
|
16295 |
|
16296 |
|
16297 |
|
16298 |
|
16299 | var divide = createMathOperation(function(dividend, divisor) {
|
16300 | return dividend / divisor;
|
16301 | }, 1);
|
16302 |
|
16303 | |
16304 |
|
16305 |
|
16306 |
|
16307 |
|
16308 |
|
16309 |
|
16310 |
|
16311 |
|
16312 |
|
16313 |
|
16314 |
|
16315 |
|
16316 |
|
16317 |
|
16318 |
|
16319 |
|
16320 |
|
16321 |
|
16322 |
|
16323 |
|
16324 | var floor = createRound('floor');
|
16325 |
|
16326 | |
16327 |
|
16328 |
|
16329 |
|
16330 |
|
16331 |
|
16332 |
|
16333 |
|
16334 |
|
16335 |
|
16336 |
|
16337 |
|
16338 |
|
16339 |
|
16340 |
|
16341 |
|
16342 |
|
16343 |
|
16344 | function max(array) {
|
16345 | return (array && array.length)
|
16346 | ? baseExtremum(array, identity, baseGt)
|
16347 | : undefined;
|
16348 | }
|
16349 |
|
16350 | |
16351 |
|
16352 |
|
16353 |
|
16354 |
|
16355 |
|
16356 |
|
16357 |
|
16358 |
|
16359 |
|
16360 |
|
16361 |
|
16362 |
|
16363 |
|
16364 |
|
16365 |
|
16366 |
|
16367 |
|
16368 |
|
16369 |
|
16370 |
|
16371 |
|
16372 |
|
16373 | function maxBy(array, iteratee) {
|
16374 | return (array && array.length)
|
16375 | ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
|
16376 | : undefined;
|
16377 | }
|
16378 |
|
16379 | |
16380 |
|
16381 |
|
16382 |
|
16383 |
|
16384 |
|
16385 |
|
16386 |
|
16387 |
|
16388 |
|
16389 |
|
16390 |
|
16391 |
|
16392 |
|
16393 | function mean(array) {
|
16394 | return baseMean(array, identity);
|
16395 | }
|
16396 |
|
16397 | |
16398 |
|
16399 |
|
16400 |
|
16401 |
|
16402 |
|
16403 |
|
16404 |
|
16405 |
|
16406 |
|
16407 |
|
16408 |
|
16409 |
|
16410 |
|
16411 |
|
16412 |
|
16413 |
|
16414 |
|
16415 |
|
16416 |
|
16417 |
|
16418 |
|
16419 |
|
16420 | function meanBy(array, iteratee) {
|
16421 | return baseMean(array, getIteratee(iteratee, 2));
|
16422 | }
|
16423 |
|
16424 | |
16425 |
|
16426 |
|
16427 |
|
16428 |
|
16429 |
|
16430 |
|
16431 |
|
16432 |
|
16433 |
|
16434 |
|
16435 |
|
16436 |
|
16437 |
|
16438 |
|
16439 |
|
16440 |
|
16441 |
|
16442 | function min(array) {
|
16443 | return (array && array.length)
|
16444 | ? baseExtremum(array, identity, baseLt)
|
16445 | : undefined;
|
16446 | }
|
16447 |
|
16448 | |
16449 |
|
16450 |
|
16451 |
|
16452 |
|
16453 |
|
16454 |
|
16455 |
|
16456 |
|
16457 |
|
16458 |
|
16459 |
|
16460 |
|
16461 |
|
16462 |
|
16463 |
|
16464 |
|
16465 |
|
16466 |
|
16467 |
|
16468 |
|
16469 |
|
16470 |
|
16471 | function minBy(array, iteratee) {
|
16472 | return (array && array.length)
|
16473 | ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
|
16474 | : undefined;
|
16475 | }
|
16476 |
|
16477 | |
16478 |
|
16479 |
|
16480 |
|
16481 |
|
16482 |
|
16483 |
|
16484 |
|
16485 |
|
16486 |
|
16487 |
|
16488 |
|
16489 |
|
16490 |
|
16491 |
|
16492 | var multiply = createMathOperation(function(multiplier, multiplicand) {
|
16493 | return multiplier * multiplicand;
|
16494 | }, 1);
|
16495 |
|
16496 | |
16497 |
|
16498 |
|
16499 |
|
16500 |
|
16501 |
|
16502 |
|
16503 |
|
16504 |
|
16505 |
|
16506 |
|
16507 |
|
16508 |
|
16509 |
|
16510 |
|
16511 |
|
16512 |
|
16513 |
|
16514 |
|
16515 |
|
16516 |
|
16517 | var round = createRound('round');
|
16518 |
|
16519 | |
16520 |
|
16521 |
|
16522 |
|
16523 |
|
16524 |
|
16525 |
|
16526 |
|
16527 |
|
16528 |
|
16529 |
|
16530 |
|
16531 |
|
16532 |
|
16533 |
|
16534 | var subtract = createMathOperation(function(minuend, subtrahend) {
|
16535 | return minuend - subtrahend;
|
16536 | }, 0);
|
16537 |
|
16538 | |
16539 |
|
16540 |
|
16541 |
|
16542 |
|
16543 |
|
16544 |
|
16545 |
|
16546 |
|
16547 |
|
16548 |
|
16549 |
|
16550 |
|
16551 |
|
16552 | function sum(array) {
|
16553 | return (array && array.length)
|
16554 | ? baseSum(array, identity)
|
16555 | : 0;
|
16556 | }
|
16557 |
|
16558 | |
16559 |
|
16560 |
|
16561 |
|
16562 |
|
16563 |
|
16564 |
|
16565 |
|
16566 |
|
16567 |
|
16568 |
|
16569 |
|
16570 |
|
16571 |
|
16572 |
|
16573 |
|
16574 |
|
16575 |
|
16576 |
|
16577 |
|
16578 |
|
16579 |
|
16580 |
|
16581 | function sumBy(array, iteratee) {
|
16582 | return (array && array.length)
|
16583 | ? baseSum(array, getIteratee(iteratee, 2))
|
16584 | : 0;
|
16585 | }
|
16586 |
|
16587 |
|
16588 |
|
16589 |
|
16590 | lodash.after = after;
|
16591 | lodash.ary = ary;
|
16592 | lodash.assign = assign;
|
16593 | lodash.assignIn = assignIn;
|
16594 | lodash.assignInWith = assignInWith;
|
16595 | lodash.assignWith = assignWith;
|
16596 | lodash.at = at;
|
16597 | lodash.before = before;
|
16598 | lodash.bind = bind;
|
16599 | lodash.bindAll = bindAll;
|
16600 | lodash.bindKey = bindKey;
|
16601 | lodash.castArray = castArray;
|
16602 | lodash.chain = chain;
|
16603 | lodash.chunk = chunk;
|
16604 | lodash.compact = compact;
|
16605 | lodash.concat = concat;
|
16606 | lodash.cond = cond;
|
16607 | lodash.conforms = conforms;
|
16608 | lodash.constant = constant;
|
16609 | lodash.countBy = countBy;
|
16610 | lodash.create = create;
|
16611 | lodash.curry = curry;
|
16612 | lodash.curryRight = curryRight;
|
16613 | lodash.debounce = debounce;
|
16614 | lodash.defaults = defaults;
|
16615 | lodash.defaultsDeep = defaultsDeep;
|
16616 | lodash.defer = defer;
|
16617 | lodash.delay = delay;
|
16618 | lodash.difference = difference;
|
16619 | lodash.differenceBy = differenceBy;
|
16620 | lodash.differenceWith = differenceWith;
|
16621 | lodash.drop = drop;
|
16622 | lodash.dropRight = dropRight;
|
16623 | lodash.dropRightWhile = dropRightWhile;
|
16624 | lodash.dropWhile = dropWhile;
|
16625 | lodash.fill = fill;
|
16626 | lodash.filter = filter;
|
16627 | lodash.flatMap = flatMap;
|
16628 | lodash.flatMapDeep = flatMapDeep;
|
16629 | lodash.flatMapDepth = flatMapDepth;
|
16630 | lodash.flatten = flatten;
|
16631 | lodash.flattenDeep = flattenDeep;
|
16632 | lodash.flattenDepth = flattenDepth;
|
16633 | lodash.flip = flip;
|
16634 | lodash.flow = flow;
|
16635 | lodash.flowRight = flowRight;
|
16636 | lodash.fromPairs = fromPairs;
|
16637 | lodash.functions = functions;
|
16638 | lodash.functionsIn = functionsIn;
|
16639 | lodash.groupBy = groupBy;
|
16640 | lodash.initial = initial;
|
16641 | lodash.intersection = intersection;
|
16642 | lodash.intersectionBy = intersectionBy;
|
16643 | lodash.intersectionWith = intersectionWith;
|
16644 | lodash.invert = invert;
|
16645 | lodash.invertBy = invertBy;
|
16646 | lodash.invokeMap = invokeMap;
|
16647 | lodash.iteratee = iteratee;
|
16648 | lodash.keyBy = keyBy;
|
16649 | lodash.keys = keys;
|
16650 | lodash.keysIn = keysIn;
|
16651 | lodash.map = map;
|
16652 | lodash.mapKeys = mapKeys;
|
16653 | lodash.mapValues = mapValues;
|
16654 | lodash.matches = matches;
|
16655 | lodash.matchesProperty = matchesProperty;
|
16656 | lodash.memoize = memoize;
|
16657 | lodash.merge = merge;
|
16658 | lodash.mergeWith = mergeWith;
|
16659 | lodash.method = method;
|
16660 | lodash.methodOf = methodOf;
|
16661 | lodash.mixin = mixin;
|
16662 | lodash.negate = negate;
|
16663 | lodash.nthArg = nthArg;
|
16664 | lodash.omit = omit;
|
16665 | lodash.omitBy = omitBy;
|
16666 | lodash.once = once;
|
16667 | lodash.orderBy = orderBy;
|
16668 | lodash.over = over;
|
16669 | lodash.overArgs = overArgs;
|
16670 | lodash.overEvery = overEvery;
|
16671 | lodash.overSome = overSome;
|
16672 | lodash.partial = partial;
|
16673 | lodash.partialRight = partialRight;
|
16674 | lodash.partition = partition;
|
16675 | lodash.pick = pick;
|
16676 | lodash.pickBy = pickBy;
|
16677 | lodash.property = property;
|
16678 | lodash.propertyOf = propertyOf;
|
16679 | lodash.pull = pull;
|
16680 | lodash.pullAll = pullAll;
|
16681 | lodash.pullAllBy = pullAllBy;
|
16682 | lodash.pullAllWith = pullAllWith;
|
16683 | lodash.pullAt = pullAt;
|
16684 | lodash.range = range;
|
16685 | lodash.rangeRight = rangeRight;
|
16686 | lodash.rearg = rearg;
|
16687 | lodash.reject = reject;
|
16688 | lodash.remove = remove;
|
16689 | lodash.rest = rest;
|
16690 | lodash.reverse = reverse;
|
16691 | lodash.sampleSize = sampleSize;
|
16692 | lodash.set = set;
|
16693 | lodash.setWith = setWith;
|
16694 | lodash.shuffle = shuffle;
|
16695 | lodash.slice = slice;
|
16696 | lodash.sortBy = sortBy;
|
16697 | lodash.sortedUniq = sortedUniq;
|
16698 | lodash.sortedUniqBy = sortedUniqBy;
|
16699 | lodash.split = split;
|
16700 | lodash.spread = spread;
|
16701 | lodash.tail = tail;
|
16702 | lodash.take = take;
|
16703 | lodash.takeRight = takeRight;
|
16704 | lodash.takeRightWhile = takeRightWhile;
|
16705 | lodash.takeWhile = takeWhile;
|
16706 | lodash.tap = tap;
|
16707 | lodash.throttle = throttle;
|
16708 | lodash.thru = thru;
|
16709 | lodash.toArray = toArray;
|
16710 | lodash.toPairs = toPairs;
|
16711 | lodash.toPairsIn = toPairsIn;
|
16712 | lodash.toPath = toPath;
|
16713 | lodash.toPlainObject = toPlainObject;
|
16714 | lodash.transform = transform;
|
16715 | lodash.unary = unary;
|
16716 | lodash.union = union;
|
16717 | lodash.unionBy = unionBy;
|
16718 | lodash.unionWith = unionWith;
|
16719 | lodash.uniq = uniq;
|
16720 | lodash.uniqBy = uniqBy;
|
16721 | lodash.uniqWith = uniqWith;
|
16722 | lodash.unset = unset;
|
16723 | lodash.unzip = unzip;
|
16724 | lodash.unzipWith = unzipWith;
|
16725 | lodash.update = update;
|
16726 | lodash.updateWith = updateWith;
|
16727 | lodash.values = values;
|
16728 | lodash.valuesIn = valuesIn;
|
16729 | lodash.without = without;
|
16730 | lodash.words = words;
|
16731 | lodash.wrap = wrap;
|
16732 | lodash.xor = xor;
|
16733 | lodash.xorBy = xorBy;
|
16734 | lodash.xorWith = xorWith;
|
16735 | lodash.zip = zip;
|
16736 | lodash.zipObject = zipObject;
|
16737 | lodash.zipObjectDeep = zipObjectDeep;
|
16738 | lodash.zipWith = zipWith;
|
16739 |
|
16740 | // Add aliases.
|
16741 | lodash.entries = toPairs;
|
16742 | lodash.entriesIn = toPairsIn;
|
16743 | lodash.extend = assignIn;
|
16744 | lodash.extendWith = assignInWith;
|
16745 |
|
16746 | // Add methods to `lodash.prototype`.
|
16747 | mixin(lodash, lodash);
|
16748 |
|
16749 | /*------------------------------------------------------------------------*/
|
16750 |
|
16751 | // Add methods that return unwrapped values in chain sequences.
|
16752 | lodash.add = add;
|
16753 | lodash.attempt = attempt;
|
16754 | lodash.camelCase = camelCase;
|
16755 | lodash.capitalize = capitalize;
|
16756 | lodash.ceil = ceil;
|
16757 | lodash.clamp = clamp;
|
16758 | lodash.clone = clone;
|
16759 | lodash.cloneDeep = cloneDeep;
|
16760 | lodash.cloneDeepWith = cloneDeepWith;
|
16761 | lodash.cloneWith = cloneWith;
|
16762 | lodash.conformsTo = conformsTo;
|
16763 | lodash.deburr = deburr;
|
16764 | lodash.defaultTo = defaultTo;
|
16765 | lodash.divide = divide;
|
16766 | lodash.endsWith = endsWith;
|
16767 | lodash.eq = eq;
|
16768 | lodash.escape = escape;
|
16769 | lodash.escapeRegExp = escapeRegExp;
|
16770 | lodash.every = every;
|
16771 | lodash.find = find;
|
16772 | lodash.findIndex = findIndex;
|
16773 | lodash.findKey = findKey;
|
16774 | lodash.findLast = findLast;
|
16775 | lodash.findLastIndex = findLastIndex;
|
16776 | lodash.findLastKey = findLastKey;
|
16777 | lodash.floor = floor;
|
16778 | lodash.forEach = forEach;
|
16779 | lodash.forEachRight = forEachRight;
|
16780 | lodash.forIn = forIn;
|
16781 | lodash.forInRight = forInRight;
|
16782 | lodash.forOwn = forOwn;
|
16783 | lodash.forOwnRight = forOwnRight;
|
16784 | lodash.get = get;
|
16785 | lodash.gt = gt;
|
16786 | lodash.gte = gte;
|
16787 | lodash.has = has;
|
16788 | lodash.hasIn = hasIn;
|
16789 | lodash.head = head;
|
16790 | lodash.identity = identity;
|
16791 | lodash.includes = includes;
|
16792 | lodash.indexOf = indexOf;
|
16793 | lodash.inRange = inRange;
|
16794 | lodash.invoke = invoke;
|
16795 | lodash.isArguments = isArguments;
|
16796 | lodash.isArray = isArray;
|
16797 | lodash.isArrayBuffer = isArrayBuffer;
|
16798 | lodash.isArrayLike = isArrayLike;
|
16799 | lodash.isArrayLikeObject = isArrayLikeObject;
|
16800 | lodash.isBoolean = isBoolean;
|
16801 | lodash.isBuffer = isBuffer;
|
16802 | lodash.isDate = isDate;
|
16803 | lodash.isElement = isElement;
|
16804 | lodash.isEmpty = isEmpty;
|
16805 | lodash.isEqual = isEqual;
|
16806 | lodash.isEqualWith = isEqualWith;
|
16807 | lodash.isError = isError;
|
16808 | lodash.isFinite = isFinite;
|
16809 | lodash.isFunction = isFunction;
|
16810 | lodash.isInteger = isInteger;
|
16811 | lodash.isLength = isLength;
|
16812 | lodash.isMap = isMap;
|
16813 | lodash.isMatch = isMatch;
|
16814 | lodash.isMatchWith = isMatchWith;
|
16815 | lodash.isNaN = isNaN;
|
16816 | lodash.isNative = isNative;
|
16817 | lodash.isNil = isNil;
|
16818 | lodash.isNull = isNull;
|
16819 | lodash.isNumber = isNumber;
|
16820 | lodash.isObject = isObject;
|
16821 | lodash.isObjectLike = isObjectLike;
|
16822 | lodash.isPlainObject = isPlainObject;
|
16823 | lodash.isRegExp = isRegExp;
|
16824 | lodash.isSafeInteger = isSafeInteger;
|
16825 | lodash.isSet = isSet;
|
16826 | lodash.isString = isString;
|
16827 | lodash.isSymbol = isSymbol;
|
16828 | lodash.isTypedArray = isTypedArray;
|
16829 | lodash.isUndefined = isUndefined;
|
16830 | lodash.isWeakMap = isWeakMap;
|
16831 | lodash.isWeakSet = isWeakSet;
|
16832 | lodash.join = join;
|
16833 | lodash.kebabCase = kebabCase;
|
16834 | lodash.last = last;
|
16835 | lodash.lastIndexOf = lastIndexOf;
|
16836 | lodash.lowerCase = lowerCase;
|
16837 | lodash.lowerFirst = lowerFirst;
|
16838 | lodash.lt = lt;
|
16839 | lodash.lte = lte;
|
16840 | lodash.max = max;
|
16841 | lodash.maxBy = maxBy;
|
16842 | lodash.mean = mean;
|
16843 | lodash.meanBy = meanBy;
|
16844 | lodash.min = min;
|
16845 | lodash.minBy = minBy;
|
16846 | lodash.stubArray = stubArray;
|
16847 | lodash.stubFalse = stubFalse;
|
16848 | lodash.stubObject = stubObject;
|
16849 | lodash.stubString = stubString;
|
16850 | lodash.stubTrue = stubTrue;
|
16851 | lodash.multiply = multiply;
|
16852 | lodash.nth = nth;
|
16853 | lodash.noConflict = noConflict;
|
16854 | lodash.noop = noop;
|
16855 | lodash.now = now;
|
16856 | lodash.pad = pad;
|
16857 | lodash.padEnd = padEnd;
|
16858 | lodash.padStart = padStart;
|
16859 | lodash.parseInt = parseInt;
|
16860 | lodash.random = random;
|
16861 | lodash.reduce = reduce;
|
16862 | lodash.reduceRight = reduceRight;
|
16863 | lodash.repeat = repeat;
|
16864 | lodash.replace = replace;
|
16865 | lodash.result = result;
|
16866 | lodash.round = round;
|
16867 | lodash.runInContext = runInContext;
|
16868 | lodash.sample = sample;
|
16869 | lodash.size = size;
|
16870 | lodash.snakeCase = snakeCase;
|
16871 | lodash.some = some;
|
16872 | lodash.sortedIndex = sortedIndex;
|
16873 | lodash.sortedIndexBy = sortedIndexBy;
|
16874 | lodash.sortedIndexOf = sortedIndexOf;
|
16875 | lodash.sortedLastIndex = sortedLastIndex;
|
16876 | lodash.sortedLastIndexBy = sortedLastIndexBy;
|
16877 | lodash.sortedLastIndexOf = sortedLastIndexOf;
|
16878 | lodash.startCase = startCase;
|
16879 | lodash.startsWith = startsWith;
|
16880 | lodash.subtract = subtract;
|
16881 | lodash.sum = sum;
|
16882 | lodash.sumBy = sumBy;
|
16883 | lodash.template = template;
|
16884 | lodash.times = times;
|
16885 | lodash.toFinite = toFinite;
|
16886 | lodash.toInteger = toInteger;
|
16887 | lodash.toLength = toLength;
|
16888 | lodash.toLower = toLower;
|
16889 | lodash.toNumber = toNumber;
|
16890 | lodash.toSafeInteger = toSafeInteger;
|
16891 | lodash.toString = toString;
|
16892 | lodash.toUpper = toUpper;
|
16893 | lodash.trim = trim;
|
16894 | lodash.trimEnd = trimEnd;
|
16895 | lodash.trimStart = trimStart;
|
16896 | lodash.truncate = truncate;
|
16897 | lodash.unescape = unescape;
|
16898 | lodash.uniqueId = uniqueId;
|
16899 | lodash.upperCase = upperCase;
|
16900 | lodash.upperFirst = upperFirst;
|
16901 |
|
16902 | // Add aliases.
|
16903 | lodash.each = forEach;
|
16904 | lodash.eachRight = forEachRight;
|
16905 | lodash.first = head;
|
16906 |
|
16907 | mixin(lodash, (function() {
|
16908 | var source = {};
|
16909 | baseForOwn(lodash, function(func, methodName) {
|
16910 | if (!hasOwnProperty.call(lodash.prototype, methodName)) {
|
16911 | source[methodName] = func;
|
16912 | }
|
16913 | });
|
16914 | return source;
|
16915 | }()), { 'chain': false });
|
16916 |
|
16917 |
|
16918 |
|
16919 | |
16920 |
|
16921 |
|
16922 |
|
16923 |
|
16924 |
|
16925 |
|
16926 | lodash.VERSION = VERSION;
|
16927 |
|
16928 |
|
16929 | arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
|
16930 | lodash[methodName].placeholder = lodash;
|
16931 | });
|
16932 |
|
16933 |
|
16934 | arrayEach(['drop', 'take'], function(methodName, index) {
|
16935 | LazyWrapper.prototype[methodName] = function(n) {
|
16936 | n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
|
16937 |
|
16938 | var result = (this.__filtered__ && !index)
|
16939 | ? new LazyWrapper(this)
|
16940 | : this.clone();
|
16941 |
|
16942 | if (result.__filtered__) {
|
16943 | result.__takeCount__ = nativeMin(n, result.__takeCount__);
|
16944 | } else {
|
16945 | result.__views__.push({
|
16946 | 'size': nativeMin(n, MAX_ARRAY_LENGTH),
|
16947 | 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
|
16948 | });
|
16949 | }
|
16950 | return result;
|
16951 | };
|
16952 |
|
16953 | LazyWrapper.prototype[methodName + 'Right'] = function(n) {
|
16954 | return this.reverse()[methodName](n).reverse();
|
16955 | };
|
16956 | });
|
16957 |
|
16958 |
|
16959 | arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
|
16960 | var type = index + 1,
|
16961 | isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
|
16962 |
|
16963 | LazyWrapper.prototype[methodName] = function(iteratee) {
|
16964 | var result = this.clone();
|
16965 | result.__iteratees__.push({
|
16966 | 'iteratee': getIteratee(iteratee, 3),
|
16967 | 'type': type
|
16968 | });
|
16969 | result.__filtered__ = result.__filtered__ || isFilter;
|
16970 | return result;
|
16971 | };
|
16972 | });
|
16973 |
|
16974 |
|
16975 | arrayEach(['head', 'last'], function(methodName, index) {
|
16976 | var takeName = 'take' + (index ? 'Right' : '');
|
16977 |
|
16978 | LazyWrapper.prototype[methodName] = function() {
|
16979 | return this[takeName](1).value()[0];
|
16980 | };
|
16981 | });
|
16982 |
|
16983 |
|
16984 | arrayEach(['initial', 'tail'], function(methodName, index) {
|
16985 | var dropName = 'drop' + (index ? '' : 'Right');
|
16986 |
|
16987 | LazyWrapper.prototype[methodName] = function() {
|
16988 | return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
16989 | };
|
16990 | });
|
16991 |
|
16992 | LazyWrapper.prototype.compact = function() {
|
16993 | return this.filter(identity);
|
16994 | };
|
16995 |
|
16996 | LazyWrapper.prototype.find = function(predicate) {
|
16997 | return this.filter(predicate).head();
|
16998 | };
|
16999 |
|
17000 | LazyWrapper.prototype.findLast = function(predicate) {
|
17001 | return this.reverse().find(predicate);
|
17002 | };
|
17003 |
|
17004 | LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
|
17005 | if (typeof path == 'function') {
|
17006 | return new LazyWrapper(this);
|
17007 | }
|
17008 | return this.map(function(value) {
|
17009 | return baseInvoke(value, path, args);
|
17010 | });
|
17011 | });
|
17012 |
|
17013 | LazyWrapper.prototype.reject = function(predicate) {
|
17014 | return this.filter(negate(getIteratee(predicate)));
|
17015 | };
|
17016 |
|
17017 | LazyWrapper.prototype.slice = function(start, end) {
|
17018 | start = toInteger(start);
|
17019 |
|
17020 | var result = this;
|
17021 | if (result.__filtered__ && (start > 0 || end < 0)) {
|
17022 | return new LazyWrapper(result);
|
17023 | }
|
17024 | if (start < 0) {
|
17025 | result = result.takeRight(-start);
|
17026 | } else if (start) {
|
17027 | result = result.drop(start);
|
17028 | }
|
17029 | if (end !== undefined) {
|
17030 | end = toInteger(end);
|
17031 | result = end < 0 ? result.dropRight(-end) : result.take(end - start);
|
17032 | }
|
17033 | return result;
|
17034 | };
|
17035 |
|
17036 | LazyWrapper.prototype.takeRightWhile = function(predicate) {
|
17037 | return this.reverse().takeWhile(predicate).reverse();
|
17038 | };
|
17039 |
|
17040 | LazyWrapper.prototype.toArray = function() {
|
17041 | return this.take(MAX_ARRAY_LENGTH);
|
17042 | };
|
17043 |
|
17044 |
|
17045 | baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
17046 | var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
|
17047 | isTaker = /^(?:head|last)$/.test(methodName),
|
17048 | lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
|
17049 | retUnwrapped = isTaker || /^find/.test(methodName);
|
17050 |
|
17051 | if (!lodashFunc) {
|
17052 | return;
|
17053 | }
|
17054 | lodash.prototype[methodName] = function() {
|
17055 | var value = this.__wrapped__,
|
17056 | args = isTaker ? [1] : arguments,
|
17057 | isLazy = value instanceof LazyWrapper,
|
17058 | iteratee = args[0],
|
17059 | useLazy = isLazy || isArray(value);
|
17060 |
|
17061 | var interceptor = function(value) {
|
17062 | var result = lodashFunc.apply(lodash, arrayPush([value], args));
|
17063 | return (isTaker && chainAll) ? result[0] : result;
|
17064 | };
|
17065 |
|
17066 | if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
|
17067 |
|
17068 | isLazy = useLazy = false;
|
17069 | }
|
17070 | var chainAll = this.__chain__,
|
17071 | isHybrid = !!this.__actions__.length,
|
17072 | isUnwrapped = retUnwrapped && !chainAll,
|
17073 | onlyLazy = isLazy && !isHybrid;
|
17074 |
|
17075 | if (!retUnwrapped && useLazy) {
|
17076 | value = onlyLazy ? value : new LazyWrapper(this);
|
17077 | var result = func.apply(value, args);
|
17078 | result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
|
17079 | return new LodashWrapper(result, chainAll);
|
17080 | }
|
17081 | if (isUnwrapped && onlyLazy) {
|
17082 | return func.apply(this, args);
|
17083 | }
|
17084 | result = this.thru(interceptor);
|
17085 | return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
|
17086 | };
|
17087 | });
|
17088 |
|
17089 |
|
17090 | arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
|
17091 | var func = arrayProto[methodName],
|
17092 | chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
|
17093 | retUnwrapped = /^(?:pop|shift)$/.test(methodName);
|
17094 |
|
17095 | lodash.prototype[methodName] = function() {
|
17096 | var args = arguments;
|
17097 | if (retUnwrapped && !this.__chain__) {
|
17098 | var value = this.value();
|
17099 | return func.apply(isArray(value) ? value : [], args);
|
17100 | }
|
17101 | return this[chainName](function(value) {
|
17102 | return func.apply(isArray(value) ? value : [], args);
|
17103 | });
|
17104 | };
|
17105 | });
|
17106 |
|
17107 |
|
17108 | baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
17109 | var lodashFunc = lodash[methodName];
|
17110 | if (lodashFunc) {
|
17111 | var key = lodashFunc.name + '';
|
17112 | if (!hasOwnProperty.call(realNames, key)) {
|
17113 | realNames[key] = [];
|
17114 | }
|
17115 | realNames[key].push({ 'name': methodName, 'func': lodashFunc });
|
17116 | }
|
17117 | });
|
17118 |
|
17119 | realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
|
17120 | 'name': 'wrapper',
|
17121 | 'func': undefined
|
17122 | }];
|
17123 |
|
17124 |
|
17125 | LazyWrapper.prototype.clone = lazyClone;
|
17126 | LazyWrapper.prototype.reverse = lazyReverse;
|
17127 | LazyWrapper.prototype.value = lazyValue;
|
17128 |
|
17129 |
|
17130 | lodash.prototype.at = wrapperAt;
|
17131 | lodash.prototype.chain = wrapperChain;
|
17132 | lodash.prototype.commit = wrapperCommit;
|
17133 | lodash.prototype.next = wrapperNext;
|
17134 | lodash.prototype.plant = wrapperPlant;
|
17135 | lodash.prototype.reverse = wrapperReverse;
|
17136 | lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
|
17137 |
|
17138 |
|
17139 | lodash.prototype.first = lodash.prototype.head;
|
17140 |
|
17141 | if (symIterator) {
|
17142 | lodash.prototype[symIterator] = wrapperToIterator;
|
17143 | }
|
17144 | return lodash;
|
17145 | });
|
17146 |
|
17147 |
|
17148 |
|
17149 |
|
17150 | var _ = runInContext();
|
17151 |
|
17152 |
|
17153 | if (freeModule) {
|
17154 |
|
17155 | (freeModule.exports = _)._ = _;
|
17156 |
|
17157 | freeExports._ = _;
|
17158 | }
|
17159 | else {
|
17160 |
|
17161 | root._ = _;
|
17162 | }
|
17163 | }.call(commonjsGlobal));
|
17164 | });
|
17165 |
|
17166 | var Html5 = videojs$1.getTech('Html5');
|
17167 | var backup = {
|
17168 | Html5: {
|
17169 | isSupported: Html5.isSupported,
|
17170 | setSource: Html5.prototype.setSource
|
17171 | }
|
17172 | };
|
17173 | var common = {
|
17174 | beforeEach: function beforeEach() {
|
17175 |
|
17176 | Html5.isSupported = function () {
|
17177 | return true;
|
17178 | };
|
17179 |
|
17180 | delete Html5.setSource;
|
17181 | this.sandbox = sinon.sandbox.create();
|
17182 |
|
17183 | this.clock = sinon.useFakeTimers();
|
17184 |
|
17185 | this.video = document_1.createElement('video');
|
17186 |
|
17187 | if (/phantom/i.test(window_1.navigator.userAgent)) {
|
17188 | this.video.removeAttribute = function (attr) {
|
17189 | this[attr] = '';
|
17190 | };
|
17191 |
|
17192 | this.video.load = function () {};
|
17193 |
|
17194 | this.video.play = function () {};
|
17195 |
|
17196 | this.video.pause = function () {};
|
17197 | }
|
17198 |
|
17199 | document_1.getElementById('qunit-fixture').appendChild(this.video);
|
17200 | this.player = videojs$1(this.video);
|
17201 |
|
17202 | this.clock.tick(1000);
|
17203 |
|
17204 | this.player.buffered = function () {
|
17205 | return videojs$1.createTimeRange(0, 0);
|
17206 | };
|
17207 |
|
17208 | this.player.ads(this.adsOptions);
|
17209 | },
|
17210 | afterEach: function afterEach() {
|
17211 |
|
17212 | Html5.isSupported = backup.Html5.isSupported;
|
17213 | Html5.prototype.setSource = backup.Html5.setSource;
|
17214 |
|
17215 | this.clock.restore();
|
17216 |
|
17217 | this.player.dispose();
|
17218 |
|
17219 | this.contentPlaybackSpy = this.contentPlaybackReason = null;
|
17220 | this.sandbox.restore();
|
17221 | }
|
17222 | };
|
17223 | |
17224 |
|
17225 |
|
17226 |
|
17227 |
|
17228 |
|
17229 |
|
17230 |
|
17231 |
|
17232 |
|
17233 | var sharedModuleHooks = function sharedModuleHooks(hooks) {
|
17234 | hooks = hooks || {};
|
17235 | return {
|
17236 | beforeEach: lodash.flow(common.beforeEach, hooks.beforeEach || lodash.noop),
|
17237 | afterEach: lodash.flow(common.afterEach, hooks.afterEach || lodash.noop)
|
17238 | };
|
17239 | };
|
17240 |
|
17241 | QUnit.module('Contrib Ads', sharedModuleHooks());
|
17242 | QUnit.test('begins in BeforePreroll', function (assert) {
|
17243 | assert.equal(this.player.ads._state.constructor.name, 'BeforePreroll');
|
17244 | });
|
17245 | QUnit.test('adstart is fired before a preroll', function (assert) {
|
17246 | var spy = sinon.spy();
|
17247 | assert.expect(1);
|
17248 | this.player.on('adstart', spy);
|
17249 | this.player.trigger('adsready');
|
17250 | this.player.trigger('play');
|
17251 | this.player.ads.startLinearAdMode();
|
17252 | assert.strictEqual(spy.callCount, 1, 'a preroll triggers adstart');
|
17253 | });
|
17254 | QUnit.test('player has the .vjs-has-started class once a preroll begins', function (assert) {
|
17255 | assert.expect(1);
|
17256 | this.player.trigger('adsready');
|
17257 |
|
17258 | this.player.tech_.trigger('play');
|
17259 | this.player.ads.startLinearAdMode();
|
17260 | assert.ok(this.player.hasClass('vjs-has-started'), 'player has .vjs-has-started class');
|
17261 | });
|
17262 | QUnit.test('calls start immediately on play when ads are ready', function (assert) {
|
17263 | var readyForPrerollSpy = sinon.spy();
|
17264 | assert.expect(1);
|
17265 | this.player.on('readyforpreroll', readyForPrerollSpy);
|
17266 | this.player.trigger('adsready');
|
17267 | this.player.trigger('loadstart');
|
17268 | this.player.trigger('play');
|
17269 | assert.strictEqual(readyForPrerollSpy.callCount, 1, 'readyforpreroll was fired');
|
17270 | });
|
17271 | QUnit.test('adds the ad-mode class when a preroll plays', function (assert) {
|
17272 | assert.expect(1);
|
17273 | this.player.trigger('adsready');
|
17274 | this.player.trigger('play');
|
17275 | this.player.ads.startLinearAdMode();
|
17276 | var el = this.player.el();
|
17277 | assert.ok(this.player.hasClass('vjs-ad-playing'), 'the ad class should be in "' + el.className + '"');
|
17278 | });
|
17279 | QUnit.test('removes the ad-mode class when a preroll finishes', function (assert) {
|
17280 | this.player.trigger('adsready');
|
17281 | this.player.trigger('play');
|
17282 | this.player.ads.startLinearAdMode();
|
17283 | this.player.ads.endLinearAdMode();
|
17284 | var el = this.player.el();
|
17285 | assert.notOk(this.player.hasClass('vjs-ad-playing'), 'the ad class should not be in "' + el.className + '"');
|
17286 | this.player.trigger('playing');
|
17287 | });
|
17288 | QUnit.test('adds a class while waiting for an ad plugin to load', function (assert) {
|
17289 | assert.expect(1);
|
17290 | this.player.trigger('play');
|
17291 | var el = this.player.el();
|
17292 | assert.ok(this.player.hasClass('vjs-ad-loading'), 'the ad loading class should be in "' + el.className + '"');
|
17293 | });
|
17294 | QUnit.test('adds a class while waiting for a preroll', function (assert) {
|
17295 | assert.expect(1);
|
17296 | this.player.trigger('adsready');
|
17297 | this.player.trigger('play');
|
17298 | var el = this.player.el();
|
17299 | assert.ok(this.player.hasClass('vjs-ad-loading'), 'the ad loading class should be in "' + el.className + '"');
|
17300 | });
|
17301 | QUnit.test('removes the loading class when the preroll begins', function (assert) {
|
17302 | assert.expect(1);
|
17303 | this.player.trigger('adsready');
|
17304 | this.player.trigger('play');
|
17305 | this.player.ads.startLinearAdMode();
|
17306 | this.player.trigger('ads-ad-started');
|
17307 | var el = this.player.el();
|
17308 | assert.notOk(this.player.hasClass('vjs-ad-loading'), 'there should be no ad loading class present in "' + el.className + '"');
|
17309 | });
|
17310 | QUnit.test('removes the loading class when the preroll times out', function (assert) {
|
17311 | this.player.trigger('loadstart');
|
17312 | this.player.trigger('adsready');
|
17313 | this.player.trigger('play');
|
17314 | this.player.trigger('adtimeout');
|
17315 | this.player.trigger('playing');
|
17316 | var el = this.player.el();
|
17317 | assert.notOk(this.player.hasClass('vjs-ad-loading'), 'there should be no ad loading class present in "' + el.className + '"');
|
17318 | });
|
17319 | QUnit.test('begins resuming to content if there is no preroll', function (assert) {
|
17320 | this.player.trigger('loadstart');
|
17321 | this.player.trigger('adsready');
|
17322 | this.player.trigger('play');
|
17323 | this.clock.tick(1);
|
17324 | this.player.trigger('adtimeout');
|
17325 | assert.strictEqual(this.player.ads.inAdBreak(), false, 'should not be in an ad break');
|
17326 | assert.strictEqual(this.player.ads.isContentResuming(), true, 'should be resuming content');
|
17327 | assert.strictEqual(this.player.ads.isInAdMode(), true, 'should be in ad mode');
|
17328 | });
|
17329 | QUnit.test('removes the poster attribute so it does not flash between videos', function (assert) {
|
17330 | this.video.poster = 'http://www.videojs.com/img/poster.jpg';
|
17331 | assert.ok(this.video.poster, 'the poster is present initially');
|
17332 | this.player.trigger('adsready');
|
17333 | this.player.trigger('play');
|
17334 | this.player.ads.startLinearAdMode();
|
17335 | assert.strictEqual(this.video.poster, '', 'poster is removed');
|
17336 | });
|
17337 | QUnit.test('changing the src triggers "contentupdate"', function (assert) {
|
17338 | var spy = sinon.spy();
|
17339 | assert.expect(1);
|
17340 | this.player.on('contentupdate', spy);
|
17341 |
|
17342 | this.player.currentSrc = function () {
|
17343 | return 'AH HA!!! I AM NOT A REAL SOURCE';
|
17344 | };
|
17345 |
|
17346 | this.player.trigger('loadstart');
|
17347 | assert.strictEqual(spy.callCount, 1, 'one contentupdate event fired');
|
17348 | });
|
17349 | QUnit.test('"contentupdate" should fire when src is changed after postroll', function (assert) {
|
17350 | var contentupdateSpy = sinon.spy();
|
17351 | this.player.on('contentupdate', contentupdateSpy);
|
17352 | this.player.trigger('adsready');
|
17353 | this.player.trigger('play');
|
17354 | this.player.trigger('adtimeout');
|
17355 | this.player.trigger('ended');
|
17356 | this.player.trigger('adtimeout');
|
17357 |
|
17358 | this.player.src({
|
17359 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
17360 | type: 'video/webm'
|
17361 | });
|
17362 | this.player.trigger('loadstart');
|
17363 | assert.strictEqual(contentupdateSpy.callCount, 1, 'one contentupdate event fired');
|
17364 | });
|
17365 | QUnit.test('"contentupdate" should fire when src is changed after postroll', function (assert) {
|
17366 | var contentupdateSpy = sinon.spy();
|
17367 | this.player.on('contentupdate', contentupdateSpy);
|
17368 | this.player.trigger('adsready');
|
17369 | this.player.trigger('play');
|
17370 | this.player.trigger('adtimeout');
|
17371 | this.player.trigger('ended');
|
17372 | this.player.trigger('adtimeout');
|
17373 | this.player.trigger('ended');
|
17374 |
|
17375 | this.player.src({
|
17376 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
17377 | type: 'video/webm'
|
17378 | });
|
17379 | this.player.trigger('loadstart');
|
17380 | assert.strictEqual(contentupdateSpy.callCount, 1, 'one contentupdate event fired');
|
17381 | });
|
17382 | QUnit.test('changing src does not trigger "contentupdate" during ad playback', function (assert) {
|
17383 | var spy = sinon.spy();
|
17384 | this.player.on('contentupdate', spy);
|
17385 |
|
17386 | this.player.trigger('adsready');
|
17387 | this.player.trigger('play');
|
17388 | this.player.ads.startLinearAdMode();
|
17389 |
|
17390 | this.player.src({
|
17391 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
17392 | type: 'video/webm'
|
17393 | });
|
17394 | this.player.trigger('loadstart');
|
17395 |
|
17396 | this.player.ads.endLinearAdMode();
|
17397 | assert.strictEqual(spy.callCount, 0, 'no contentupdate events fired');
|
17398 | });
|
17399 | QUnit.test('the `_playRequested` flag is set on the first play request', function (assert) {
|
17400 | this.player.trigger('loadstart');
|
17401 | this.player.trigger('adsready');
|
17402 | assert.strictEqual(this.player.ads._playRequested, false, 'initially set to false');
|
17403 | assert.strictEqual(this.player.ads.isInAdMode(), false, 'starts in a content state');
|
17404 | this.player.trigger('play');
|
17405 | assert.strictEqual(this.player.ads._playRequested, true, '_playRequested is now true');
|
17406 | assert.strictEqual(this.player.ads.isInAdMode(), true, 'now in ad state');
|
17407 | });
|
17408 | QUnit.test('ended event happens after postroll errors out', function (assert) {
|
17409 | var endedSpy = sinon.spy();
|
17410 | this.player.on('ended', endedSpy);
|
17411 | this.player.trigger('loadstart');
|
17412 | this.player.trigger('adsready');
|
17413 | this.player.trigger('play');
|
17414 | this.player.trigger('adtimeout');
|
17415 |
|
17416 | this.player.trigger('playing');
|
17417 | this.player.trigger('ended');
|
17418 | this.player.trigger('adserror');
|
17419 | this.clock.tick(1);
|
17420 | assert.strictEqual(endedSpy.callCount, 1, 'ended event happened');
|
17421 | });
|
17422 | QUnit.test('ended event happens after postroll timed out', function (assert) {
|
17423 | var endedSpy = sinon.spy();
|
17424 | this.player.on('ended', endedSpy);
|
17425 | this.player.trigger('loadstart');
|
17426 | this.player.trigger('adsready');
|
17427 | this.player.trigger('play');
|
17428 | this.player.trigger('adtimeout');
|
17429 |
|
17430 | this.player.trigger('playing');
|
17431 | this.player.trigger('ended');
|
17432 | this.player.trigger('adtimeout');
|
17433 | this.clock.tick(1);
|
17434 | assert.strictEqual(endedSpy.callCount, 1, 'ended event happened');
|
17435 | });
|
17436 | QUnit.test('ended event happens after postroll skipped', function (assert) {
|
17437 | var endedSpy = sinon.spy();
|
17438 | this.player.on('ended', endedSpy);
|
17439 | this.player.trigger('loadstart');
|
17440 | this.player.trigger('adsready');
|
17441 | this.player.trigger('play');
|
17442 |
|
17443 | this.player.trigger('adtimeout');
|
17444 |
|
17445 | this.player.trigger('playing');
|
17446 |
|
17447 | this.player.trigger('ended');
|
17448 | this.player.ads.skipLinearAdMode();
|
17449 | this.clock.tick(1);
|
17450 | assert.strictEqual(endedSpy.callCount, 1, 'ended event happened');
|
17451 | });
|
17452 | QUnit.test('an "ended" event is fired after postroll if not fired naturally', function (assert) {
|
17453 | var endedSpy = sinon.spy();
|
17454 | this.player.on('ended', endedSpy);
|
17455 | this.player.trigger('loadstart');
|
17456 | this.player.trigger('adsready');
|
17457 | this.player.trigger('play');
|
17458 |
|
17459 | this.player.trigger('adtimeout');
|
17460 |
|
17461 | this.player.trigger('playing');
|
17462 |
|
17463 | this.player.trigger('ended');
|
17464 | assert.strictEqual(endedSpy.callCount, 0, 'no ended event before postroll');
|
17465 |
|
17466 | this.player.ads.startLinearAdMode();
|
17467 | this.player.ads.endLinearAdMode();
|
17468 | this.player.trigger('resumeended');
|
17469 | assert.strictEqual(endedSpy.callCount, 1, 'ended event happened');
|
17470 | });
|
17471 | QUnit.test('ended events when content ends first and second time', function (assert) {
|
17472 | var endedSpy = sinon.spy();
|
17473 | this.player.on('ended', endedSpy);
|
17474 | this.player.trigger('loadstart');
|
17475 | this.player.trigger('adsready');
|
17476 | this.player.trigger('play');
|
17477 |
|
17478 | this.player.trigger('adtimeout');
|
17479 |
|
17480 | this.player.trigger('playing');
|
17481 |
|
17482 | this.player.trigger('ended');
|
17483 |
|
17484 | this.player.ads.startLinearAdMode();
|
17485 | this.player.ads.endLinearAdMode();
|
17486 | this.player.trigger('resumeended');
|
17487 | assert.strictEqual(endedSpy.callCount, 1, 'ended event after postroll');
|
17488 | this.player.trigger('ended');
|
17489 | assert.strictEqual(endedSpy.callCount, 2, 'ended event after ads done');
|
17490 | });
|
17491 | QUnit.test('endLinearAdMode during ad break triggers adend', function (assert) {
|
17492 | var adendSpy = sinon.spy();
|
17493 | this.player.on('adend', adendSpy);
|
17494 | this.player.trigger('loadstart');
|
17495 | this.player.trigger('adsready');
|
17496 | this.player.trigger('play');
|
17497 | this.player.ads.startLinearAdMode();
|
17498 | assert.strictEqual(adendSpy.callCount, 0, 'no adend yet');
|
17499 | this.player.ads.endLinearAdMode();
|
17500 | assert.strictEqual(adendSpy.callCount, 1, 'adend happened');
|
17501 | });
|
17502 | QUnit.test('calling startLinearAdMode() when already in ad-playback does not trigger adstart', function (assert) {
|
17503 | var spy = sinon.spy();
|
17504 | this.player.on('adstart', spy);
|
17505 | this.player.trigger('adsready');
|
17506 | this.player.trigger('play');
|
17507 | this.player.ads.startLinearAdMode();
|
17508 | assert.strictEqual(spy.callCount, 1, 'adstart should have fired');
|
17509 |
|
17510 | this.player.ads.startLinearAdMode();
|
17511 | assert.strictEqual(spy.callCount, 1, 'adstart should not have fired');
|
17512 |
|
17513 | this.player.ads.endLinearAdMode();
|
17514 | this.player.trigger('playing');
|
17515 | this.player.ads.startLinearAdMode();
|
17516 | assert.strictEqual(spy.callCount, 2, 'adstart should have fired');
|
17517 | });
|
17518 | QUnit.test('calling endLinearAdMode() outside of linear ad mode does not trigger adend', function (assert) {
|
17519 | var adendSpy = sinon.spy();
|
17520 | this.player.on('adend', adendSpy);
|
17521 | this.player.ads.endLinearAdMode();
|
17522 | assert.strictEqual(adendSpy.callCount, 0, 'adend should not have fired right away');
|
17523 | this.player.trigger('adsready');
|
17524 | this.player.ads.endLinearAdMode();
|
17525 | assert.strictEqual(adendSpy.callCount, 0, 'adend should not have fired after adsready');
|
17526 | this.player.trigger('play');
|
17527 | this.player.ads.endLinearAdMode();
|
17528 | assert.strictEqual(adendSpy.callCount, 0, 'adend should not have fired after play');
|
17529 | this.player.trigger('adtimeout');
|
17530 | this.player.ads.endLinearAdMode();
|
17531 | assert.strictEqual(adendSpy.callCount, 0, 'adend should not have fired after adtimeout');
|
17532 | this.player.ads.startLinearAdMode();
|
17533 | this.player.ads.endLinearAdMode();
|
17534 | assert.strictEqual(adendSpy.callCount, 1, 'adend should have fired after preroll');
|
17535 | });
|
17536 | QUnit.test('skipLinearAdMode during ad playback does not trigger adskip', function (assert) {
|
17537 | var adskipSpy = sinon.spy();
|
17538 | this.player.on('adskip', adskipSpy);
|
17539 | this.player.trigger('adsready');
|
17540 | this.player.trigger('play');
|
17541 | this.player.ads.startLinearAdMode();
|
17542 | this.player.ads.skipLinearAdMode();
|
17543 | assert.strictEqual(adskipSpy.callCount, 0, 'adskip event should not trigger when skipLinearAdMode is called during an ad');
|
17544 | });
|
17545 | QUnit.test('adsready in content-playback triggers readyforpreroll', function (assert) {
|
17546 | var spy = sinon.spy();
|
17547 | this.player.on('readyforpreroll', spy);
|
17548 | this.player.trigger('loadstart');
|
17549 | this.player.trigger('play');
|
17550 | this.player.trigger('adtimeout');
|
17551 |
|
17552 | this.player.trigger('playing');
|
17553 | this.player.trigger('adsready');
|
17554 | assert.strictEqual(spy.callCount, 1, 'readyforpreroll should have been triggered.');
|
17555 | });
|
17556 | QUnit.test('adsready while preroll content resuming triggers readyforpreroll', function (assert) {
|
17557 | var spy = sinon.spy();
|
17558 | this.player.on('readyforpreroll', spy);
|
17559 | this.player.trigger('loadstart');
|
17560 | this.player.trigger('play');
|
17561 | this.player.trigger('adtimeout');
|
17562 | assert.strictEqual(this.player.ads.isContentResuming(), true, 'should be resuming to content');
|
17563 | this.player.trigger('adsready');
|
17564 | assert.strictEqual(spy.callCount, 1, 'readyforpreroll should have been triggered.');
|
17565 | });
|
17566 |
|
17567 |
|
17568 |
|
17569 | QUnit.test('player events during prerolls are prefixed if tech is reused for ad', function (assert) {
|
17570 | var sawLoadstart = sinon.spy();
|
17571 | var sawPlaying = sinon.spy();
|
17572 | var sawPause = sinon.spy();
|
17573 | var sawEnded = sinon.spy();
|
17574 | var sawFirstplay = sinon.spy();
|
17575 | var sawLoadedalldata = sinon.spy();
|
17576 | var sawAdloadstart = sinon.spy();
|
17577 | var sawAdpause = sinon.spy();
|
17578 | var sawAdended = sinon.spy();
|
17579 | var sawAdfirstplay = sinon.spy();
|
17580 | var sawAdloadedalldata = sinon.spy();
|
17581 |
|
17582 | this.player.on('readyforpreroll', function () {
|
17583 | this.ads.startLinearAdMode();
|
17584 | });
|
17585 | this.player.trigger('play');
|
17586 | this.player.trigger('loadstart');
|
17587 | this.player.trigger('adsready');
|
17588 | this.player.ads.snapshot = {
|
17589 | currentSrc: 'something'
|
17590 | };
|
17591 |
|
17592 | this.player.on('loadstart', sawLoadstart);
|
17593 | this.player.on('playing', sawPlaying);
|
17594 | this.player.on('pause', sawPause);
|
17595 | this.player.on('ended', sawEnded);
|
17596 | this.player.on('firstplay', sawFirstplay);
|
17597 | this.player.on('loadedalldata', sawLoadedalldata);
|
17598 | this.player.on('adloadstart', sawAdloadstart);
|
17599 | this.player.on('adpause', sawAdpause);
|
17600 | this.player.on('adended', sawAdended);
|
17601 | this.player.on('adfirstplay', sawAdfirstplay);
|
17602 | this.player.on('adloadedalldata', sawAdloadedalldata);
|
17603 | this.player.trigger('firstplay');
|
17604 | this.player.trigger('loadstart');
|
17605 | this.player.trigger('playing');
|
17606 | this.player.trigger('loadedalldata');
|
17607 | this.player.trigger('pause');
|
17608 | this.player.trigger('ended');
|
17609 | assert.strictEqual(sawLoadstart.callCount, 0, 'no loadstart fired');
|
17610 | assert.strictEqual(sawPlaying.callCount, 0, 'no playing fired');
|
17611 | assert.strictEqual(sawPause.callCount, 0, 'no pause fired');
|
17612 | assert.strictEqual(sawEnded.callCount, 0, 'no ended fired');
|
17613 | assert.strictEqual(sawFirstplay.callCount, 0, 'no firstplay fired');
|
17614 | assert.strictEqual(sawLoadedalldata.callCount, 0, 'no loadedalldata fired');
|
17615 | assert.strictEqual(sawAdloadstart.callCount, 1, 'adloadstart fired');
|
17616 | assert.strictEqual(sawAdpause.callCount, 1, 'adpause fired');
|
17617 | assert.strictEqual(sawAdended.callCount, 1, 'adended fired');
|
17618 | assert.strictEqual(sawAdfirstplay.callCount, 1, 'adfirstplay fired');
|
17619 | assert.strictEqual(sawAdloadedalldata.callCount, 1, 'adloadedalldata fired');
|
17620 | });
|
17621 | QUnit.test('player events during midrolls are prefixed if tech is reused for ad', function (assert) {
|
17622 | assert.expect(2);
|
17623 | var prefixed = sinon.spy();
|
17624 | var unprefixed = sinon.spy();
|
17625 |
|
17626 | this.player.trigger('play');
|
17627 | this.player.trigger('loadstart');
|
17628 | this.player.trigger('adsready');
|
17629 | this.player.trigger('adtimeout');
|
17630 |
|
17631 | this.player.trigger('playing');
|
17632 | this.player.ads.startLinearAdMode();
|
17633 | this.player.ads.snapshot = {
|
17634 | currentSrc: 'something'
|
17635 | };
|
17636 |
|
17637 | this.player.on(['loadstart', 'playing', 'pause', 'ended', 'firstplay', 'loadedalldata'], unprefixed);
|
17638 | this.player.on(['adloadstart', 'adpause', 'adended', 'adfirstplay', 'adloadedalldata'], prefixed);
|
17639 | this.player.trigger('firstplay');
|
17640 | this.player.trigger('loadstart');
|
17641 | this.player.trigger('playing');
|
17642 | this.player.trigger('loadedalldata');
|
17643 | this.player.trigger('pause');
|
17644 | this.player.trigger('ended');
|
17645 | assert.strictEqual(unprefixed.callCount, 0, 'no unprefixed events fired');
|
17646 | assert.strictEqual(prefixed.callCount, 5, 'prefixed events fired');
|
17647 | });
|
17648 | QUnit.test('player events during postrolls are prefixed if tech is reused for ad', function (assert) {
|
17649 | assert.expect(2);
|
17650 | var prefixed = sinon.spy();
|
17651 | var unprefixed = sinon.spy();
|
17652 |
|
17653 | this.player.trigger('play');
|
17654 | this.player.trigger('loadstart');
|
17655 | this.player.trigger('adsready');
|
17656 | this.player.trigger('adtimeout');
|
17657 |
|
17658 | this.player.trigger('playing');
|
17659 | this.player.trigger('ended');
|
17660 | this.player.ads.startLinearAdMode();
|
17661 | this.player.ads.snapshot = {
|
17662 | currentSrc: 'something'
|
17663 | };
|
17664 |
|
17665 | this.player.on(['loadstart', 'playing', 'pause', 'ended', 'firstplay', 'loadedalldata'], unprefixed);
|
17666 | this.player.on(['adloadstart', 'adpause', 'adended', 'adfirstplay', 'adloadedalldata'], prefixed);
|
17667 | this.player.trigger('firstplay');
|
17668 | this.player.trigger('loadstart');
|
17669 | this.player.trigger('playing');
|
17670 | this.player.trigger('loadedalldata');
|
17671 | this.player.trigger('pause');
|
17672 | this.player.trigger('ended');
|
17673 | assert.strictEqual(unprefixed.callCount, 0, 'no unprefixed events fired');
|
17674 | assert.strictEqual(prefixed.callCount, 5, 'prefixed events fired');
|
17675 | });
|
17676 | QUnit.test('player events during stitched ads are prefixed', function (assert) {
|
17677 | assert.expect(2);
|
17678 | var prefixed = sinon.spy();
|
17679 | var unprefixed = sinon.spy();
|
17680 | this.player.ads.stitchedAds(true);
|
17681 |
|
17682 | this.player.trigger('play');
|
17683 | this.player.trigger('loadstart');
|
17684 | this.player.trigger('adsready');
|
17685 | this.player.trigger('adtimeout');
|
17686 | this.player.trigger('playing');
|
17687 | this.player.ads.startLinearAdMode();
|
17688 |
|
17689 | this.player.on(['loadstart', 'playing', 'pause', 'ended', 'firstplay', 'loadedalldata'], unprefixed);
|
17690 | this.player.on(['adloadstart', 'adplaying', 'adpause', 'adended', 'adfirstplay', 'adloadedalldata'], prefixed);
|
17691 | this.player.trigger('firstplay');
|
17692 | this.player.trigger('loadstart');
|
17693 | this.player.trigger('playing');
|
17694 | this.player.trigger('loadedalldata');
|
17695 | this.player.trigger('pause');
|
17696 | this.player.trigger('ended');
|
17697 | assert.strictEqual(unprefixed.callCount, 0, 'no unprefixed events fired');
|
17698 | assert.strictEqual(prefixed.callCount, 6, 'prefixed events fired');
|
17699 | });
|
17700 | QUnit.test('player events during content playback are not prefixed', function (assert) {
|
17701 | assert.expect(3);
|
17702 | var prefixed = sinon.spy();
|
17703 | var unprefixed = sinon.spy();
|
17704 |
|
17705 | this.player.trigger('loadstart');
|
17706 | this.player.trigger('play');
|
17707 | this.player.trigger('adsready');
|
17708 | this.player.trigger('adtimeout');
|
17709 | this.player.trigger('playing');
|
17710 | this.player.trigger('loadedalldata');
|
17711 |
|
17712 | this.player.on(['seeked', 'playing', 'pause', 'ended', 'firstplay', 'loadedalldata'], unprefixed);
|
17713 | this.player.on(['adseeked', 'adplaying', 'adpause', 'adended', 'contentended', 'adfirstplay', 'adloadedalldata'], prefixed);
|
17714 | this.player.trigger('firstplay');
|
17715 | this.player.trigger('seeked');
|
17716 | this.player.trigger('playing');
|
17717 | this.player.trigger('loadedalldata');
|
17718 | this.player.trigger('pause');
|
17719 | this.player.trigger('ended');
|
17720 | assert.strictEqual(unprefixed.callCount, 5, 'unprefixed events fired');
|
17721 | assert.strictEqual(prefixed.callCount, 1, 'prefixed events fired');
|
17722 | assert.strictEqual(prefixed.getCall(0).args[0].type, 'contentended', 'prefixed the ended event');
|
17723 | });
|
17724 | QUnit.test('startLinearAdMode should only trigger adstart from correct states', function (assert) {
|
17725 | var adstart = sinon.spy();
|
17726 | this.player.on('adstart', adstart);
|
17727 | this.player.ads.startLinearAdMode();
|
17728 | assert.strictEqual(adstart.callCount, 0, 'Before play');
|
17729 | this.player.trigger('play');
|
17730 | this.player.ads.startLinearAdMode();
|
17731 | assert.strictEqual(adstart.callCount, 0, 'Before adsready');
|
17732 | this.player.trigger('adsready');
|
17733 | this.player.ads.startLinearAdMode();
|
17734 | assert.strictEqual(adstart.callCount, 1, 'Preroll');
|
17735 | this.player.ads.startLinearAdMode();
|
17736 | assert.strictEqual(adstart.callCount, 1, 'During preroll playback');
|
17737 | this.player.ads.endLinearAdMode();
|
17738 | this.player.trigger('playing');
|
17739 | this.player.ads.startLinearAdMode();
|
17740 | assert.strictEqual(adstart.callCount, 2, 'Midroll');
|
17741 | this.player.ads.startLinearAdMode();
|
17742 | assert.strictEqual(adstart.callCount, 2, 'During midroll playback');
|
17743 | this.player.ads.endLinearAdMode();
|
17744 | this.player.trigger('playing');
|
17745 | this.player.trigger('ended');
|
17746 | this.player.ads.startLinearAdMode();
|
17747 | assert.strictEqual(adstart.callCount, 3, 'Postroll');
|
17748 | this.player.ads.startLinearAdMode();
|
17749 | assert.strictEqual(adstart.callCount, 3, 'During postroll playback');
|
17750 | this.player.ads.endLinearAdMode();
|
17751 | assert.strictEqual(adstart.callCount, 3, 'Ads done');
|
17752 | });
|
17753 | QUnit.test('ad impl can notify contrib-ads there is no preroll', function (assert) {
|
17754 | this.player.trigger('loadstart');
|
17755 | this.player.trigger('nopreroll');
|
17756 | this.player.trigger('play');
|
17757 | this.player.trigger('adsready');
|
17758 | assert.strictEqual(this.player.ads.isInAdMode(), true, 'in ad mode');
|
17759 | assert.strictEqual(this.player.ads.isContentResuming(), true, 'content is resuming');
|
17760 | });
|
17761 |
|
17762 | QUnit.test('ad impl can notify contrib-ads there is no preroll 2', function (assert) {
|
17763 | this.player.trigger('loadstart');
|
17764 | this.player.trigger('nopreroll');
|
17765 | this.player.trigger('adsready');
|
17766 | this.player.trigger('play');
|
17767 | assert.strictEqual(this.player.ads.isInAdMode(), true, 'not in ad mode');
|
17768 | assert.strictEqual(this.player.ads.isContentResuming(), true, 'content is resuming');
|
17769 | });
|
17770 | QUnit.test('ad impl can notify contrib-ads there is no preroll 3', function (assert) {
|
17771 | this.player.trigger('loadstart');
|
17772 | this.player.trigger('play');
|
17773 | this.player.trigger('nopreroll');
|
17774 | this.player.trigger('adsready');
|
17775 | assert.strictEqual(this.player.ads.isInAdMode(), true, 'not in ad mode');
|
17776 | assert.strictEqual(this.player.ads.isContentResuming(), true, 'content is resuming');
|
17777 | });
|
17778 | QUnit.test('ad impl can notify contrib-ads there is no preroll 4', function (assert) {
|
17779 | this.player.trigger('loadstart');
|
17780 | this.player.trigger('adsready');
|
17781 | this.player.trigger('nopreroll');
|
17782 | this.player.trigger('play');
|
17783 | assert.strictEqual(this.player.ads.isInAdMode(), true, 'not in ad mode');
|
17784 | assert.strictEqual(this.player.ads.isContentResuming(), true, 'content is resuming');
|
17785 | });
|
17786 | QUnit.test('ended event is sent after nopostroll', function (assert) {
|
17787 | var ended = sinon.spy();
|
17788 | this.player.on('ended', ended);
|
17789 | this.player.trigger('loadstart');
|
17790 | this.player.trigger('nopostroll');
|
17791 | this.player.trigger('play');
|
17792 | this.player.trigger('adsready');
|
17793 | this.player.ads.skipLinearAdMode();
|
17794 | this.player.trigger('playing');
|
17795 | this.player.trigger('readyforpostroll');
|
17796 | this.clock.tick(1);
|
17797 | assert.ok(ended.calledOnce, 'Ended triggered');
|
17798 | });
|
17799 | QUnit.test('ended event is sent with postroll', function (assert) {
|
17800 | this.player.trigger('loadstart');
|
17801 | this.player.trigger('adsready');
|
17802 | this.player.trigger('play');
|
17803 | this.player.ads.skipLinearAdMode();
|
17804 | this.player.trigger('playing');
|
17805 | var ended = sinon.spy();
|
17806 | this.player.on('ended', ended);
|
17807 | this.player.trigger('readyforpostroll');
|
17808 | this.clock.tick(10000);
|
17809 | assert.ok(ended.calledOnce, 'Ended triggered');
|
17810 | });
|
17811 | QUnit.test('isLive', function (assert) {
|
17812 |
|
17813 | videojs$1.browser = _extends({}, videojs$1.browser);
|
17814 |
|
17815 | this.player.duration = function () {
|
17816 | return 0;
|
17817 | };
|
17818 |
|
17819 | videojs$1.browser.IOS_VERSION = '8';
|
17820 | assert.strictEqual(this.player.ads.isLive(this.player), true);
|
17821 |
|
17822 | this.player.duration = function () {
|
17823 | return 5;
|
17824 | };
|
17825 |
|
17826 | videojs$1.browser.IOS_VERSION = '8';
|
17827 | assert.strictEqual(this.player.ads.isLive(this.player), false);
|
17828 |
|
17829 | this.player.duration = function () {
|
17830 | return Infinity;
|
17831 | };
|
17832 |
|
17833 | videojs$1.browser.IOS_VERSION = '8';
|
17834 | assert.strictEqual(this.player.ads.isLive(this.player), true);
|
17835 |
|
17836 | this.player.duration = function () {
|
17837 | return 0;
|
17838 | };
|
17839 |
|
17840 | videojs$1.browser.IOS_VERSION = undefined;
|
17841 | assert.strictEqual(this.player.ads.isLive(this.player), false);
|
17842 |
|
17843 | this.player.duration = function () {
|
17844 | return 5;
|
17845 | };
|
17846 |
|
17847 | videojs$1.browser.IOS_VERSION = undefined;
|
17848 | assert.strictEqual(this.player.ads.isLive(this.player), false);
|
17849 |
|
17850 | this.player.duration = function () {
|
17851 | return Infinity;
|
17852 | };
|
17853 |
|
17854 | videojs$1.browser.IOS_VERSION = undefined;
|
17855 | assert.strictEqual(this.player.ads.isLive(this.player), true);
|
17856 | });
|
17857 | QUnit.test('shouldPlayContentBehindAd', function (assert) {
|
17858 |
|
17859 | videojs$1.browser = _extends({}, videojs$1.browser);
|
17860 |
|
17861 | this.player.duration = function () {
|
17862 | return Infinity;
|
17863 | };
|
17864 |
|
17865 | videojs$1.browser.IS_IOS = true;
|
17866 | videojs$1.browser.IS_ANDROID = true;
|
17867 | assert.strictEqual(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
17868 |
|
17869 | this.player.duration = function () {
|
17870 | return Infinity;
|
17871 | };
|
17872 |
|
17873 | videojs$1.browser.IS_IOS = true;
|
17874 | videojs$1.browser.IS_ANDROID = false;
|
17875 | assert.strictEqual(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
17876 |
|
17877 | this.player.duration = function () {
|
17878 | return Infinity;
|
17879 | };
|
17880 |
|
17881 | videojs$1.browser.IS_IOS = false;
|
17882 | videojs$1.browser.IS_ANDROID = true;
|
17883 | assert.strictEqual(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
17884 |
|
17885 | this.player.duration = function () {
|
17886 | return Infinity;
|
17887 | };
|
17888 |
|
17889 | videojs$1.browser.IS_IOS = false;
|
17890 | videojs$1.browser.IS_ANDROID = false;
|
17891 | assert.strictEqual(this.player.ads.shouldPlayContentBehindAd(this.player), true);
|
17892 |
|
17893 | this.player.duration = function () {
|
17894 | return 5;
|
17895 | };
|
17896 |
|
17897 | videojs$1.browser.IS_IOS = true;
|
17898 | videojs$1.browser.IS_ANDROID = true;
|
17899 | assert.strictEqual(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
17900 |
|
17901 | this.player.duration = function () {
|
17902 | return 5;
|
17903 | };
|
17904 |
|
17905 | videojs$1.browser.IS_IOS = true;
|
17906 | videojs$1.browser.IS_ANDROID = false;
|
17907 | assert.strictEqual(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
17908 |
|
17909 | this.player.duration = function () {
|
17910 | return 5;
|
17911 | };
|
17912 |
|
17913 | videojs$1.browser.IS_IOS = false;
|
17914 | videojs$1.browser.IS_ANDROID = true;
|
17915 | assert.strictEqual(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
17916 |
|
17917 | this.player.duration = function () {
|
17918 | return 5;
|
17919 | };
|
17920 |
|
17921 | videojs$1.browser.IS_IOS = false;
|
17922 | videojs$1.browser.IS_ANDROID = false;
|
17923 | assert.strictEqual(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
17924 |
|
17925 | this.player.duration = function () {
|
17926 | return Infinity;
|
17927 | };
|
17928 |
|
17929 | videojs$1.browser.IS_IOS = false;
|
17930 | videojs$1.browser.IS_ANDROID = false;
|
17931 |
|
17932 | try {
|
17933 | this.player.ads.shouldPlayContentBehindAd();
|
17934 | } catch (error) {
|
17935 | assert.strictEqual(error.message, 'shouldPlayContentBehindAd requires a player as a param');
|
17936 | }
|
17937 |
|
17938 | this.player.duration = function () {
|
17939 | return Infinity;
|
17940 | };
|
17941 |
|
17942 | videojs$1.browser.IS_IOS = false;
|
17943 | videojs$1.browser.IS_ANDROID = false;
|
17944 | this.player.ads.settings.liveCuePoints = false;
|
17945 | assert.strictEqual(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
17946 | });
|
17947 | QUnit.test('Check incorrect addition of vjs-live during ad-playback', function (assert) {
|
17948 | this.player.trigger('play');
|
17949 | this.player.ads.startLinearAdMode();
|
17950 | assert.strictEqual(this.player.hasClass('vjs-live'), false, 'We have the correct class');
|
17951 | });
|
17952 | QUnit.test('Check for existence of vjs-live after ad-end for LIVE videos', function (assert) {
|
17953 | this.player.trigger('loadstart');
|
17954 | this.player.trigger('adsready');
|
17955 | this.player.trigger('play');
|
17956 | this.player.ads.startLinearAdMode();
|
17957 |
|
17958 | this.player.duration = function () {
|
17959 | return Infinity;
|
17960 | };
|
17961 |
|
17962 | this.player.ads.endLinearAdMode();
|
17963 | this.player.trigger('playing');
|
17964 | assert.strictEqual(this.player.ads.isLive(this.player), true, 'Content is LIVE');
|
17965 | assert.ok(this.player.hasClass('vjs-live'), 'We should be having vjs-live class here');
|
17966 | });
|
17967 | QUnit.test('Plugin state resets after contentchanged', function (assert) {
|
17968 | assert.equal(this.player.ads.disableNextSnapshotRestore, false);
|
17969 | assert.equal(this.player.ads._contentHasEnded, false);
|
17970 | assert.equal(this.player.ads.snapshot, null);
|
17971 | assert.equal(this.player.ads.snapshot, null);
|
17972 | assert.equal(this.player.ads.nopreroll_, null);
|
17973 | assert.equal(this.player.ads.nopostroll_, null);
|
17974 | this.player.ads.disableNextSnapshotRestore = true;
|
17975 | this.player.ads._contentHasEnded = true;
|
17976 | this.player.ads.snapshot = {};
|
17977 | this.player.ads.nopreroll_ = true;
|
17978 | this.player.ads.nopostroll_ = true;
|
17979 | this.player.trigger('contentchanged');
|
17980 | assert.equal(this.player.ads.disableNextSnapshotRestore, false);
|
17981 | assert.equal(this.player.ads._contentHasEnded, false);
|
17982 | assert.equal(this.player.ads.snapshot, null);
|
17983 | assert.equal(this.player.ads.nopreroll_, false);
|
17984 | assert.equal(this.player.ads.nopostroll_, false);
|
17985 | });
|
17986 | QUnit.test('Plugin sets adType as expected', function (assert) {
|
17987 |
|
17988 | assert.strictEqual(this.player.ads.adType, null);
|
17989 |
|
17990 | this.player.trigger('loadstart');
|
17991 | this.player.trigger('adsready');
|
17992 | assert.strictEqual(this.player.ads.adType, null);
|
17993 | this.player.trigger('play');
|
17994 | assert.strictEqual(this.player.ads.adType, null);
|
17995 |
|
17996 | this.player.ads.startLinearAdMode();
|
17997 | assert.strictEqual(this.player.ads.adType, 'preroll');
|
17998 | this.player.ads.endLinearAdMode();
|
17999 | assert.strictEqual(this.player.ads.adType, null);
|
18000 |
|
18001 | this.player.trigger('playing');
|
18002 | this.player.ads.startLinearAdMode();
|
18003 | assert.strictEqual(this.player.ads.adType, 'midroll');
|
18004 |
|
18005 | this.player.ads.endLinearAdMode();
|
18006 | assert.strictEqual(this.player.ads.adType, null);
|
18007 | this.player.trigger('playing');
|
18008 |
|
18009 | this.player.trigger('readyforpostroll');
|
18010 | this.player.ads.startLinearAdMode();
|
18011 | assert.strictEqual(this.player.ads.adType, 'postroll');
|
18012 |
|
18013 | this.player.ads.endLinearAdMode();
|
18014 | assert.strictEqual(this.player.ads.adType, null);
|
18015 |
|
18016 | this.player.trigger('contentchanged');
|
18017 | assert.strictEqual(this.player.ads.adType, null);
|
18018 |
|
18019 | this.player.trigger('play');
|
18020 | assert.strictEqual(this.player.ads.adType, null);
|
18021 | this.player.trigger('adsready');
|
18022 | assert.strictEqual(this.player.ads.adType, null);
|
18023 | this.player.ads.startLinearAdMode();
|
18024 | assert.strictEqual(this.player.ads.adType, 'preroll');
|
18025 | });
|
18026 |
|
18027 | if (videojs$1.browser.IS_IOS) {
|
18028 | QUnit.test('Check the textTrackChangeHandler takes effect on iOS', function (assert) {
|
18029 | var tracks = this.player.textTracks();
|
18030 |
|
18031 | tracks.on('addtrack', function () {
|
18032 |
|
18033 | assert.equal(tracks.length, 1);
|
18034 | tracks[0].mode = 'showing';
|
18035 | assert.equal(tracks[0].mode, 'showing', 'Initial state is showing');
|
18036 |
|
18037 | this.player.ads.startLinearAdMode();
|
18038 | assert.equal(tracks[0].mode, 'disabled', 'Snapshot sets tracks to disabled');
|
18039 |
|
18040 | tracks[0].mode = 'showing';
|
18041 | }.bind(this));
|
18042 |
|
18043 |
|
18044 | tracks.on('change', function () {
|
18045 | assert.equal(tracks[0].mode, 'disabled', 'Mode is reset to disabled');
|
18046 |
|
18047 | this.player.ads.endLinearAdMode();
|
18048 | assert.equal(tracks[0].mode, 'showing', 'Mode is restored after ad');
|
18049 | }.bind(this));
|
18050 | this.player.trigger('play');
|
18051 | this.player.trigger('adsready');
|
18052 | this.player.addTextTrack('captions', 'English', 'en');
|
18053 | });
|
18054 | }
|
18055 |
|
18056 | var sharedHooks = sharedModuleHooks();
|
18057 |
|
18058 | var timerExists = function timerExists(env, id) {
|
18059 | return env.clock.timers.hasOwnProperty(id);
|
18060 | };
|
18061 |
|
18062 |
|
18063 | var fakeVideojs = function fakeVideojs() {
|
18064 | this.videojs = sinon.stub(videojs$1, 'browser').get(function () {
|
18065 | return {
|
18066 | IS_ANDROID: true,
|
18067 | IS_IOS: true
|
18068 | };
|
18069 | });
|
18070 | };
|
18071 |
|
18072 |
|
18073 | var restoreVideojs = function restoreVideojs() {
|
18074 | this.videojs.restore();
|
18075 | };
|
18076 |
|
18077 |
|
18078 |
|
18079 | QUnit.module('Cancel Content Play', {
|
18080 | beforeEach: lodash.flow(function () {
|
18081 | this.adsOptions = {};
|
18082 | }, fakeVideojs, sharedHooks.beforeEach),
|
18083 | afterEach: lodash.flow(function () {
|
18084 | this.adsOptions = null;
|
18085 | }, restoreVideojs, sharedHooks.afterEach)
|
18086 | });
|
18087 | QUnit.test('pauses to wait for prerolls when the plugin loads BEFORE play', function (assert) {
|
18088 | var spy = sinon.spy(this.player, 'pause');
|
18089 |
|
18090 | this.player.paused = function () {
|
18091 | return false;
|
18092 | };
|
18093 |
|
18094 | this.player.trigger('adsready');
|
18095 | this.player.trigger('play');
|
18096 | this.clock.tick(1);
|
18097 | this.player.trigger('play');
|
18098 | this.clock.tick(1);
|
18099 | assert.strictEqual(spy.callCount, 2, 'play attempts are paused');
|
18100 | });
|
18101 | QUnit.test('pauses to wait for prerolls when the plugin loads AFTER play', function (assert) {
|
18102 | var pauseSpy = sinon.spy(this.player, 'pause');
|
18103 |
|
18104 | this.player.paused = function () {
|
18105 | return false;
|
18106 | };
|
18107 |
|
18108 | this.player.trigger('play');
|
18109 | this.clock.tick(1);
|
18110 | this.player.trigger('play');
|
18111 | this.clock.tick(1);
|
18112 | assert.equal(pauseSpy.callCount, 2, 'play attempts are paused');
|
18113 | });
|
18114 | QUnit.test('stops canceling play events when an ad is playing', function (assert) {
|
18115 | var setTimeoutSpy = sinon.spy(window_1, 'setTimeout');
|
18116 | var pauseSpy = sinon.spy(this.player, 'pause');
|
18117 |
|
18118 |
|
18119 |
|
18120 | assert.notOk(this.player.ads._cancelledPlay, 'we have not canceled a play event');
|
18121 |
|
18122 | this.player.paused = function () {
|
18123 | return false;
|
18124 | };
|
18125 |
|
18126 | this.player.trigger('play');
|
18127 | assert.strictEqual(setTimeoutSpy.callCount, 1, 'one timer was created (`_prerollTimeout`)');
|
18128 | assert.ok(timerExists(this, this.player.ads._state._timeout), 'preroll timeout exists after play');
|
18129 | assert.equal(this.player.ads._cancelledPlay, true);
|
18130 | this.clock.tick(1);
|
18131 | assert.equal(pauseSpy.callCount, 1);
|
18132 | this.player.trigger('adsready');
|
18133 | assert.ok(timerExists(this, this.player.ads._state._timeout), 'preroll timeout exists after adsready');
|
18134 | this.player.ads.startLinearAdMode();
|
18135 | assert.notOk(timerExists(this, this.player.ads._state._timeout), 'preroll timeout no longer exists');
|
18136 | this.player.trigger('play');
|
18137 | assert.equal(pauseSpy.callCount, 1, 'pause is not called while in an ad break');
|
18138 | window_1.setTimeout.restore();
|
18139 | });
|
18140 | QUnit.test("cancelContentPlay doesn\'t block play in content playback", function (assert) {
|
18141 | var pauseSpy = sinon.spy(this.player, 'pause');
|
18142 | this.player.trigger('loadstart');
|
18143 | this.player.trigger('adscanceled');
|
18144 |
|
18145 | this.player.paused = function () {
|
18146 | return false;
|
18147 | };
|
18148 |
|
18149 | this.player.trigger('play');
|
18150 | assert.strictEqual(pauseSpy.callCount, 1, 'pause should have been called');
|
18151 | assert.strictEqual(this.player.ads._cancelledPlay, true, 'cancelContentPlay is called while resuming');
|
18152 |
|
18153 | this.player.trigger('playing');
|
18154 | this.player.trigger('play');
|
18155 | assert.strictEqual(pauseSpy.callCount, 1, 'pause should not have been called again');
|
18156 | assert.notOk(this.player.ads._cancelledPlay, 'cancelContentPlay does nothing in content playback');
|
18157 | });
|
18158 | QUnit.test('content is resumed after ads if a user initiated play event is canceled', function (assert) {
|
18159 | var playSpy = sinon.spy(this.player, 'play');
|
18160 | var setTimeoutSpy = sinon.spy(window_1, 'setTimeout');
|
18161 | var pauseSpy = sinon.spy(this.player, 'pause');
|
18162 |
|
18163 | this.player.paused = function () {
|
18164 | return false;
|
18165 | };
|
18166 |
|
18167 | this.player.trigger('play');
|
18168 | this.player.trigger('adsready');
|
18169 | assert.strictEqual(setTimeoutSpy.callCount, 1, 'one timer was created (`_prerollTimeout`)');
|
18170 | assert.ok(timerExists(this, this.player.ads._state._timeout), 'preroll timeout exists');
|
18171 | assert.ok(this.player.ads._cancelledPlay, true, 'play has been canceled');
|
18172 | assert.ok(pauseSpy.callCount, 1, 'pause was called');
|
18173 | this.player.ads.startLinearAdMode();
|
18174 | this.player.ads.endLinearAdMode();
|
18175 | assert.strictEqual(playSpy.callCount, 1, 'play should be called by the snapshot restore');
|
18176 | this.player.trigger('play');
|
18177 | assert.ok(pauseSpy.callCount, 1, 'pause was not called again');
|
18178 | });
|
18179 |
|
18180 |
|
18181 | QUnit.module('Cancel Content Play (w/ Stitched Ads)', {
|
18182 | beforeEach: lodash.flow(function () {
|
18183 | this.adsOptions = {
|
18184 | stitchedAds: true
|
18185 | };
|
18186 | }, fakeVideojs, sharedHooks.beforeEach),
|
18187 | afterEach: lodash.flow(function () {
|
18188 | this.adsOptions = null;
|
18189 | }, restoreVideojs, sharedHooks.afterEach)
|
18190 | });
|
18191 | QUnit.test('does not pause to wait for prerolls when the plugin loads BEFORE play', function (assert) {
|
18192 | var spy = sinon.spy(this.player, 'pause');
|
18193 |
|
18194 | this.player.paused = function () {
|
18195 | return false;
|
18196 | };
|
18197 |
|
18198 | this.player.trigger('adsready');
|
18199 | this.player.trigger('play');
|
18200 | this.clock.tick(1);
|
18201 | this.player.trigger('play');
|
18202 | this.clock.tick(1);
|
18203 | assert.strictEqual(spy.callCount, 0, 'play attempts are not paused');
|
18204 | });
|
18205 | QUnit.test('does not pause to wait for prerolls when the plugin loads AFTER play', function (assert) {
|
18206 | var pauseSpy = sinon.spy(this.player, 'pause');
|
18207 |
|
18208 | this.player.paused = function () {
|
18209 | return false;
|
18210 | };
|
18211 |
|
18212 | this.player.trigger('play');
|
18213 | this.clock.tick(1);
|
18214 | this.player.trigger('play');
|
18215 | this.clock.tick(1);
|
18216 | assert.equal(pauseSpy.callCount, 0, 'play attempts are not paused');
|
18217 | });
|
18218 |
|
18219 | QUnit.module('Cue Metadata Text Tracks', sharedModuleHooks({
|
18220 | beforeEach: function beforeEach() {
|
18221 | this.tt = {
|
18222 | player: this.player,
|
18223 | kind: 'metadata',
|
18224 | mode: 'hidden',
|
18225 | id: '1',
|
18226 | startTime: 1,
|
18227 | endTime: 2,
|
18228 | addEventListener: function addEventListener(event, cb) {
|
18229 | if (event === 'cuechange') {
|
18230 | cb.apply(this, [this]);
|
18231 | }
|
18232 | },
|
18233 | activeCues: []
|
18234 | };
|
18235 | },
|
18236 | afterEach: function afterEach() {
|
18237 | this.player.ads.cueTextTracks.getSupportedAdCue = function (player, cue) {
|
18238 | return cue;
|
18239 | };
|
18240 |
|
18241 | this.player.ads.cueTextTracks.getCueId = function (cue) {
|
18242 | return cue.id;
|
18243 | };
|
18244 |
|
18245 | this.player.ads.cueTextTracks.setMetadataTrackMode = function (track) {
|
18246 | track.mode = 'hidden';
|
18247 | };
|
18248 | }
|
18249 | }));
|
18250 | QUnit.test('runs processMetadataTrack callback as tracks are added', function (assert) {
|
18251 | var tt = this.tt;
|
18252 | var processMetadataTrackSpy = sinon.spy();
|
18253 | var cueTextTracks = this.player.ads.cueTextTracks;
|
18254 |
|
18255 | this.player.addRemoteTextTrack(tt);
|
18256 | cueTextTracks.processMetadataTracks(this.player, processMetadataTrackSpy);
|
18257 | assert.strictEqual(processMetadataTrackSpy.callCount, 1);
|
18258 |
|
18259 | this.player.textTracks().trigger({
|
18260 | track: this.tt,
|
18261 | type: 'addtrack'
|
18262 | });
|
18263 | assert.strictEqual(processMetadataTrackSpy.callCount, 2);
|
18264 | });
|
18265 | QUnit.test('does not call processMetadataTrack callback until tracks available', function (assert) {
|
18266 | var processMetadataTrackSpy = sinon.spy();
|
18267 | var cueTextTracks = this.player.ads.cueTextTracks;
|
18268 | cueTextTracks.processMetadataTracks(this.player, processMetadataTrackSpy);
|
18269 | assert.strictEqual(processMetadataTrackSpy.callCount, 0);
|
18270 | var addTrackEvent = {
|
18271 | track: this.tt,
|
18272 | type: 'addtrack'
|
18273 | };
|
18274 | this.player.textTracks().trigger(addTrackEvent);
|
18275 | assert.strictEqual(processMetadataTrackSpy.callCount, 1);
|
18276 | });
|
18277 | QUnit.test('setMetadataTrackMode should work when overriden', function (assert) {
|
18278 | var tt = this.tt;
|
18279 | var cueTextTracks = this.player.ads.cueTextTracks;
|
18280 | cueTextTracks.setMetadataTrackMode(tt);
|
18281 | assert.strictEqual(tt.mode, 'hidden');
|
18282 |
|
18283 | cueTextTracks.setMetadataTrackMode = function (track) {
|
18284 | track.mode = 'disabled';
|
18285 | };
|
18286 |
|
18287 | cueTextTracks.setMetadataTrackMode(tt);
|
18288 | assert.strictEqual(tt.mode, 'disabled');
|
18289 | });
|
18290 | QUnit.test('getSupportedAdCue should work when overriden', function (assert) {
|
18291 | var cue = {
|
18292 | startTime: 0,
|
18293 | endTime: 1
|
18294 | };
|
18295 | var cueTextTracks = this.player.ads.cueTextTracks;
|
18296 | var supportedCue = cueTextTracks.getSupportedAdCue(this.player, cue);
|
18297 | assert.strictEqual(supportedCue, cue);
|
18298 |
|
18299 | cueTextTracks.getSupportedAdCue = function (player, subcue) {
|
18300 | return -1;
|
18301 | };
|
18302 |
|
18303 | supportedCue = cueTextTracks.getSupportedAdCue(this.player, cue);
|
18304 | assert.strictEqual(supportedCue, -1);
|
18305 | });
|
18306 | QUnit.test('getCueId should work when overriden', function (assert) {
|
18307 | var originalTextTracks = this.player.textTracks;
|
18308 | var cue = {
|
18309 | startTime: 0,
|
18310 | endTime: 1,
|
18311 | id: 1,
|
18312 | inner: {
|
18313 | id: 2
|
18314 | }
|
18315 | };
|
18316 | var tt = this.tt;
|
18317 | tt.activeCues = [cue];
|
18318 |
|
18319 | this.player.textTracks = function () {
|
18320 | return {
|
18321 | length: 1,
|
18322 | 0: tt
|
18323 | };
|
18324 | };
|
18325 |
|
18326 | var cueTextTracks = this.player.ads.cueTextTracks;
|
18327 | var cueId = cueTextTracks.getCueId(cue);
|
18328 | assert.strictEqual(cueId, 1);
|
18329 |
|
18330 | cueTextTracks.getCueId = function (subcue) {
|
18331 | return subcue.inner.id;
|
18332 | };
|
18333 |
|
18334 | cueId = cueTextTracks.getCueId(cue);
|
18335 | assert.strictEqual(cueId, 2);
|
18336 |
|
18337 | this.player.textTracks = originalTextTracks;
|
18338 | });
|
18339 | QUnit.test('processAdTrack runs processCue callback', function (assert) {
|
18340 | var processCueSpy = sinon.spy();
|
18341 | var cueTextTracks = this.player.ads.cueTextTracks;
|
18342 | var cues = [{
|
18343 | startTime: 0,
|
18344 | endTime: 1,
|
18345 | id: 1,
|
18346 | callCount: 0
|
18347 | }];
|
18348 | cueTextTracks.processAdTrack(this.player, cues, processCueSpy);
|
18349 | assert.strictEqual(processCueSpy.callCount, 1);
|
18350 |
|
18351 | var processCue = function processCue(player, cueData, cueId, startTime) {
|
18352 | cueData.callCount += 1;
|
18353 | };
|
18354 |
|
18355 | cueTextTracks.processAdTrack(this.player, cues, processCue);
|
18356 | assert.strictEqual(cues[0].callCount, 1);
|
18357 | });
|
18358 | QUnit.test('processAdTrack runs cancelAds callback', function (assert) {
|
18359 | var cancelAdsSpy = sinon.spy();
|
18360 | var cueTextTracks = this.player.ads.cueTextTracks;
|
18361 | var cues = [{
|
18362 | startTime: 0,
|
18363 | endTime: 1,
|
18364 | id: 1,
|
18365 | callCount: 0
|
18366 | }];
|
18367 |
|
18368 | var processCue = function processCue(player, cueData, cueId, startTime) {
|
18369 | return;
|
18370 | };
|
18371 |
|
18372 | var cancelAds = function cancelAds(player, cueData, cueId, startTime) {
|
18373 | cueData.callCount += 1;
|
18374 | };
|
18375 |
|
18376 | cueTextTracks.processAdTrack(this.player, cues, processCue, cancelAdsSpy);
|
18377 | assert.strictEqual(cancelAdsSpy.callCount, 1);
|
18378 | cueTextTracks.processAdTrack(this.player, cues, processCue, cancelAds);
|
18379 | assert.strictEqual(cues[0].callCount, 1);
|
18380 | });
|
18381 |
|
18382 | var cov_1yw202mp9x = function () {
|
18383 | var path = "/Users/poneill/dev/videojs-contrib-ads/examples/basic-ad-plugin/example-plugin.js",
|
18384 | hash = "619b33fb3026ad77159e71a7f6b48e1c03f78f27",
|
18385 | Function = function () {}.constructor,
|
18386 | global = new Function('return this')(),
|
18387 | gcv = "__coverage__",
|
18388 | coverageData = {
|
18389 | path: "/Users/poneill/dev/videojs-contrib-ads/examples/basic-ad-plugin/example-plugin.js",
|
18390 | statementMap: {
|
18391 | "0": {
|
18392 | start: {
|
18393 | line: 7,
|
18394 | column: 0
|
18395 | },
|
18396 | end: {
|
18397 | line: 152,
|
18398 | column: 30
|
18399 | }
|
18400 | },
|
18401 | "1": {
|
18402 | start: {
|
18403 | line: 10,
|
18404 | column: 23
|
18405 | },
|
18406 | end: {
|
18407 | line: 10,
|
18408 | column: 55
|
18409 | }
|
18410 | },
|
18411 | "2": {
|
18412 | start: {
|
18413 | line: 18,
|
18414 | column: 2
|
18415 | },
|
18416 | end: {
|
18417 | line: 150,
|
18418 | column: 5
|
18419 | }
|
18420 | },
|
18421 | "3": {
|
18422 | start: {
|
18423 | line: 22,
|
18424 | column: 15
|
18425 | },
|
18426 | end: {
|
18427 | line: 22,
|
18428 | column: 19
|
18429 | }
|
18430 | },
|
18431 | "4": {
|
18432 | start: {
|
18433 | line: 31,
|
18434 | column: 14
|
18435 | },
|
18436 | end: {
|
18437 | line: 31,
|
18438 | column: 16
|
18439 | }
|
18440 | },
|
18441 | "5": {
|
18442 | start: {
|
18443 | line: 35,
|
18444 | column: 20
|
18445 | },
|
18446 | end: {
|
18447 | line: 35,
|
18448 | column: 72
|
18449 | }
|
18450 | },
|
18451 | "6": {
|
18452 | start: {
|
18453 | line: 36,
|
18454 | column: 21
|
18455 | },
|
18456 | end: {
|
18457 | line: 36,
|
18458 | column: 60
|
18459 | }
|
18460 | },
|
18461 | "7": {
|
18462 | start: {
|
18463 | line: 37,
|
18464 | column: 20
|
18465 | },
|
18466 | end: {
|
18467 | line: 37,
|
18468 | column: 93
|
18469 | }
|
18470 | },
|
18471 | "8": {
|
18472 | start: {
|
18473 | line: 38,
|
18474 | column: 20
|
18475 | },
|
18476 | end: {
|
18477 | line: 38,
|
18478 | column: 93
|
18479 | }
|
18480 | },
|
18481 | "9": {
|
18482 | start: {
|
18483 | line: 39,
|
18484 | column: 21
|
18485 | },
|
18486 | end: {
|
18487 | line: 39,
|
18488 | column: 96
|
18489 | }
|
18490 | },
|
18491 | "10": {
|
18492 | start: {
|
18493 | line: 42,
|
18494 | column: 19
|
18495 | },
|
18496 | end: {
|
18497 | line: 64,
|
18498 | column: 7
|
18499 | }
|
18500 | },
|
18501 | "11": {
|
18502 | start: {
|
18503 | line: 45,
|
18504 | column: 8
|
18505 | },
|
18506 | end: {
|
18507 | line: 45,
|
18508 | column: 19
|
18509 | }
|
18510 | },
|
18511 | "12": {
|
18512 | start: {
|
18513 | line: 50,
|
18514 | column: 18
|
18515 | },
|
18516 | end: {
|
18517 | line: 50,
|
18518 | column: 38
|
18519 | }
|
18520 | },
|
18521 | "13": {
|
18522 | start: {
|
18523 | line: 51,
|
18524 | column: 8
|
18525 | },
|
18526 | end: {
|
18527 | line: 51,
|
18528 | column: 89
|
18529 | }
|
18530 | },
|
18531 | "14": {
|
18532 | start: {
|
18533 | line: 52,
|
18534 | column: 8
|
18535 | },
|
18536 | end: {
|
18537 | line: 61,
|
18538 | column: 10
|
18539 | }
|
18540 | },
|
18541 | "15": {
|
18542 | start: {
|
18543 | line: 53,
|
18544 | column: 10
|
18545 | },
|
18546 | end: {
|
18547 | line: 60,
|
18548 | column: 11
|
18549 | }
|
18550 | },
|
18551 | "16": {
|
18552 | start: {
|
18553 | line: 54,
|
18554 | column: 12
|
18555 | },
|
18556 | end: {
|
18557 | line: 59,
|
18558 | column: 13
|
18559 | }
|
18560 | },
|
18561 | "17": {
|
18562 | start: {
|
18563 | line: 55,
|
18564 | column: 14
|
18565 | },
|
18566 | end: {
|
18567 | line: 55,
|
18568 | column: 61
|
18569 | }
|
18570 | },
|
18571 | "18": {
|
18572 | start: {
|
18573 | line: 56,
|
18574 | column: 14
|
18575 | },
|
18576 | end: {
|
18577 | line: 56,
|
18578 | column: 41
|
18579 | }
|
18580 | },
|
18581 | "19": {
|
18582 | start: {
|
18583 | line: 58,
|
18584 | column: 14
|
18585 | },
|
18586 | end: {
|
18587 | line: 58,
|
18588 | column: 76
|
18589 | }
|
18590 | },
|
18591 | "20": {
|
18592 | start: {
|
18593 | line: 62,
|
18594 | column: 8
|
18595 | },
|
18596 | end: {
|
18597 | line: 62,
|
18598 | column: 23
|
18599 | }
|
18600 | },
|
18601 | "21": {
|
18602 | start: {
|
18603 | line: 67,
|
18604 | column: 15
|
18605 | },
|
18606 | end: {
|
18607 | line: 92,
|
18608 | column: 7
|
18609 | }
|
18610 | },
|
18611 | "22": {
|
18612 | start: {
|
18613 | line: 70,
|
18614 | column: 8
|
18615 | },
|
18616 | end: {
|
18617 | line: 73,
|
18618 | column: 9
|
18619 | }
|
18620 | },
|
18621 | "23": {
|
18622 | start: {
|
18623 | line: 71,
|
18624 | column: 10
|
18625 | },
|
18626 | end: {
|
18627 | line: 71,
|
18628 | column: 47
|
18629 | }
|
18630 | },
|
18631 | "24": {
|
18632 | start: {
|
18633 | line: 72,
|
18634 | column: 10
|
18635 | },
|
18636 | end: {
|
18637 | line: 72,
|
18638 | column: 17
|
18639 | }
|
18640 | },
|
18641 | "25": {
|
18642 | start: {
|
18643 | line: 76,
|
18644 | column: 8
|
18645 | },
|
18646 | end: {
|
18647 | line: 76,
|
18648 | column: 39
|
18649 | }
|
18650 | },
|
18651 | "26": {
|
18652 | start: {
|
18653 | line: 77,
|
18654 | column: 8
|
18655 | },
|
18656 | end: {
|
18657 | line: 77,
|
18658 | column: 31
|
18659 | }
|
18660 | },
|
18661 | "27": {
|
18662 | start: {
|
18663 | line: 80,
|
18664 | column: 20
|
18665 | },
|
18666 | end: {
|
18667 | line: 80,
|
18668 | column: 87
|
18669 | }
|
18670 | },
|
18671 | "28": {
|
18672 | start: {
|
18673 | line: 81,
|
18674 | column: 8
|
18675 | },
|
18676 | end: {
|
18677 | line: 81,
|
18678 | column: 26
|
18679 | }
|
18680 | },
|
18681 | "29": {
|
18682 | start: {
|
18683 | line: 82,
|
18684 | column: 8
|
18685 | },
|
18686 | end: {
|
18687 | line: 82,
|
18688 | column: 41
|
18689 | }
|
18690 | },
|
18691 | "30": {
|
18692 | start: {
|
18693 | line: 85,
|
18694 | column: 8
|
18695 | },
|
18696 | end: {
|
18697 | line: 90,
|
18698 | column: 11
|
18699 | }
|
18700 | },
|
18701 | "31": {
|
18702 | start: {
|
18703 | line: 86,
|
18704 | column: 10
|
18705 | },
|
18706 | end: {
|
18707 | line: 86,
|
18708 | column: 41
|
18709 | }
|
18710 | },
|
18711 | "32": {
|
18712 | start: {
|
18713 | line: 88,
|
18714 | column: 10
|
18715 | },
|
18716 | end: {
|
18717 | line: 88,
|
18718 | column: 39
|
18719 | }
|
18720 | },
|
18721 | "33": {
|
18722 | start: {
|
18723 | line: 89,
|
18724 | column: 10
|
18725 | },
|
18726 | end: {
|
18727 | line: 89,
|
18728 | column: 34
|
18729 | }
|
18730 | },
|
18731 | "34": {
|
18732 | start: {
|
18733 | line: 95,
|
18734 | column: 4
|
18735 | },
|
18736 | end: {
|
18737 | line: 95,
|
18738 | column: 24
|
18739 | }
|
18740 | },
|
18741 | "35": {
|
18742 | start: {
|
18743 | line: 98,
|
18744 | column: 4
|
18745 | },
|
18746 | end: {
|
18747 | line: 98,
|
18748 | column: 17
|
18749 | }
|
18750 | },
|
18751 | "36": {
|
18752 | start: {
|
18753 | line: 100,
|
18754 | column: 4
|
18755 | },
|
18756 | end: {
|
18757 | line: 104,
|
18758 | column: 7
|
18759 | }
|
18760 | },
|
18761 | "37": {
|
18762 | start: {
|
18763 | line: 101,
|
18764 | column: 6
|
18765 | },
|
18766 | end: {
|
18767 | line: 103,
|
18768 | column: 7
|
18769 | }
|
18770 | },
|
18771 | "38": {
|
18772 | start: {
|
18773 | line: 102,
|
18774 | column: 8
|
18775 | },
|
18776 | end: {
|
18777 | line: 102,
|
18778 | column: 36
|
18779 | }
|
18780 | },
|
18781 | "39": {
|
18782 | start: {
|
18783 | line: 107,
|
18784 | column: 4
|
18785 | },
|
18786 | end: {
|
18787 | line: 109,
|
18788 | column: 7
|
18789 | }
|
18790 | },
|
18791 | "40": {
|
18792 | start: {
|
18793 | line: 108,
|
18794 | column: 6
|
18795 | },
|
18796 | end: {
|
18797 | line: 108,
|
18798 | column: 19
|
18799 | }
|
18800 | },
|
18801 | "41": {
|
18802 | start: {
|
18803 | line: 111,
|
18804 | column: 4
|
18805 | },
|
18806 | end: {
|
18807 | line: 118,
|
18808 | column: 7
|
18809 | }
|
18810 | },
|
18811 | "42": {
|
18812 | start: {
|
18813 | line: 112,
|
18814 | column: 6
|
18815 | },
|
18816 | end: {
|
18817 | line: 117,
|
18818 | column: 7
|
18819 | }
|
18820 | },
|
18821 | "43": {
|
18822 | start: {
|
18823 | line: 113,
|
18824 | column: 8
|
18825 | },
|
18826 | end: {
|
18827 | line: 113,
|
18828 | column: 36
|
18829 | }
|
18830 | },
|
18831 | "44": {
|
18832 | start: {
|
18833 | line: 114,
|
18834 | column: 8
|
18835 | },
|
18836 | end: {
|
18837 | line: 114,
|
18838 | column: 17
|
18839 | }
|
18840 | },
|
18841 | "45": {
|
18842 | start: {
|
18843 | line: 116,
|
18844 | column: 8
|
18845 | },
|
18846 | end: {
|
18847 | line: 116,
|
18848 | column: 37
|
18849 | }
|
18850 | },
|
18851 | "46": {
|
18852 | start: {
|
18853 | line: 121,
|
18854 | column: 4
|
18855 | },
|
18856 | end: {
|
18857 | line: 126,
|
18858 | column: 7
|
18859 | }
|
18860 | },
|
18861 | "47": {
|
18862 | start: {
|
18863 | line: 122,
|
18864 | column: 6
|
18865 | },
|
18866 | end: {
|
18867 | line: 125,
|
18868 | column: 7
|
18869 | }
|
18870 | },
|
18871 | "48": {
|
18872 | start: {
|
18873 | line: 123,
|
18874 | column: 8
|
18875 | },
|
18876 | end: {
|
18877 | line: 123,
|
18878 | column: 35
|
18879 | }
|
18880 | },
|
18881 | "49": {
|
18882 | start: {
|
18883 | line: 124,
|
18884 | column: 8
|
18885 | },
|
18886 | end: {
|
18887 | line: 124,
|
18888 | column: 17
|
18889 | }
|
18890 | },
|
18891 | "50": {
|
18892 | start: {
|
18893 | line: 130,
|
18894 | column: 4
|
18895 | },
|
18896 | end: {
|
18897 | line: 148,
|
18898 | column: 7
|
18899 | }
|
18900 | },
|
18901 | "51": {
|
18902 | start: {
|
18903 | line: 132,
|
18904 | column: 6
|
18905 | },
|
18906 | end: {
|
18907 | line: 134,
|
18908 | column: 7
|
18909 | }
|
18910 | },
|
18911 | "52": {
|
18912 | start: {
|
18913 | line: 133,
|
18914 | column: 8
|
18915 | },
|
18916 | end: {
|
18917 | line: 133,
|
18918 | column: 15
|
18919 | }
|
18920 | },
|
18921 | "53": {
|
18922 | start: {
|
18923 | line: 136,
|
18924 | column: 24
|
18925 | },
|
18926 | end: {
|
18927 | line: 136,
|
18928 | column: 44
|
18929 | }
|
18930 | },
|
18931 | "54": {
|
18932 | start: {
|
18933 | line: 138,
|
18934 | column: 6
|
18935 | },
|
18936 | end: {
|
18937 | line: 140,
|
18938 | column: 7
|
18939 | }
|
18940 | },
|
18941 | "55": {
|
18942 | start: {
|
18943 | line: 139,
|
18944 | column: 8
|
18945 | },
|
18946 | end: {
|
18947 | line: 139,
|
18948 | column: 82
|
18949 | }
|
18950 | },
|
18951 | "56": {
|
18952 | start: {
|
18953 | line: 142,
|
18954 | column: 6
|
18955 | },
|
18956 | end: {
|
18957 | line: 142,
|
18958 | column: 35
|
18959 | }
|
18960 | },
|
18961 | "57": {
|
18962 | start: {
|
18963 | line: 143,
|
18964 | column: 6
|
18965 | },
|
18966 | end: {
|
18967 | line: 146,
|
18968 | column: 7
|
18969 | }
|
18970 | },
|
18971 | "58": {
|
18972 | start: {
|
18973 | line: 144,
|
18974 | column: 8
|
18975 | },
|
18976 | end: {
|
18977 | line: 144,
|
18978 | column: 35
|
18979 | }
|
18980 | },
|
18981 | "59": {
|
18982 | start: {
|
18983 | line: 145,
|
18984 | column: 8
|
18985 | },
|
18986 | end: {
|
18987 | line: 145,
|
18988 | column: 17
|
18989 | }
|
18990 | }
|
18991 | },
|
18992 | fnMap: {
|
18993 | "0": {
|
18994 | name: "(anonymous_0)",
|
18995 | decl: {
|
18996 | start: {
|
18997 | line: 7,
|
18998 | column: 1
|
18999 | },
|
19000 | end: {
|
19001 | line: 7,
|
19002 | column: 2
|
19003 | }
|
19004 | },
|
19005 | loc: {
|
19006 | start: {
|
19007 | line: 7,
|
19008 | column: 44
|
19009 | },
|
19010 | end: {
|
19011 | line: 152,
|
19012 | column: 1
|
19013 | }
|
19014 | },
|
19015 | line: 7
|
19016 | },
|
19017 | "1": {
|
19018 | name: "(anonymous_1)",
|
19019 | decl: {
|
19020 | start: {
|
19021 | line: 18,
|
19022 | column: 31
|
19023 | },
|
19024 | end: {
|
19025 | line: 18,
|
19026 | column: 32
|
19027 | }
|
19028 | },
|
19029 | loc: {
|
19030 | start: {
|
19031 | line: 18,
|
19032 | column: 48
|
19033 | },
|
19034 | end: {
|
19035 | line: 150,
|
19036 | column: 3
|
19037 | }
|
19038 | },
|
19039 | line: 18
|
19040 | },
|
19041 | "2": {
|
19042 | name: "(anonymous_2)",
|
19043 | decl: {
|
19044 | start: {
|
19045 | line: 42,
|
19046 | column: 19
|
19047 | },
|
19048 | end: {
|
19049 | line: 42,
|
19050 | column: 20
|
19051 | }
|
19052 | },
|
19053 | loc: {
|
19054 | start: {
|
19055 | line: 42,
|
19056 | column: 30
|
19057 | },
|
19058 | end: {
|
19059 | line: 64,
|
19060 | column: 7
|
19061 | }
|
19062 | },
|
19063 | line: 42
|
19064 | },
|
19065 | "3": {
|
19066 | name: "(anonymous_3)",
|
19067 | decl: {
|
19068 | start: {
|
19069 | line: 52,
|
19070 | column: 33
|
19071 | },
|
19072 | end: {
|
19073 | line: 52,
|
19074 | column: 34
|
19075 | }
|
19076 | },
|
19077 | loc: {
|
19078 | start: {
|
19079 | line: 52,
|
19080 | column: 44
|
19081 | },
|
19082 | end: {
|
19083 | line: 61,
|
19084 | column: 9
|
19085 | }
|
19086 | },
|
19087 | line: 52
|
19088 | },
|
19089 | "4": {
|
19090 | name: "(anonymous_4)",
|
19091 | decl: {
|
19092 | start: {
|
19093 | line: 67,
|
19094 | column: 15
|
19095 | },
|
19096 | end: {
|
19097 | line: 67,
|
19098 | column: 16
|
19099 | }
|
19100 | },
|
19101 | loc: {
|
19102 | start: {
|
19103 | line: 67,
|
19104 | column: 26
|
19105 | },
|
19106 | end: {
|
19107 | line: 92,
|
19108 | column: 7
|
19109 | }
|
19110 | },
|
19111 | line: 67
|
19112 | },
|
19113 | "5": {
|
19114 | name: "(anonymous_5)",
|
19115 | decl: {
|
19116 | start: {
|
19117 | line: 85,
|
19118 | column: 30
|
19119 | },
|
19120 | end: {
|
19121 | line: 85,
|
19122 | column: 31
|
19123 | }
|
19124 | },
|
19125 | loc: {
|
19126 | start: {
|
19127 | line: 85,
|
19128 | column: 41
|
19129 | },
|
19130 | end: {
|
19131 | line: 90,
|
19132 | column: 9
|
19133 | }
|
19134 | },
|
19135 | line: 85
|
19136 | },
|
19137 | "6": {
|
19138 | name: "(anonymous_6)",
|
19139 | decl: {
|
19140 | start: {
|
19141 | line: 100,
|
19142 | column: 26
|
19143 | },
|
19144 | end: {
|
19145 | line: 100,
|
19146 | column: 27
|
19147 | }
|
19148 | },
|
19149 | loc: {
|
19150 | start: {
|
19151 | line: 100,
|
19152 | column: 37
|
19153 | },
|
19154 | end: {
|
19155 | line: 104,
|
19156 | column: 5
|
19157 | }
|
19158 | },
|
19159 | line: 100
|
19160 | },
|
19161 | "7": {
|
19162 | name: "(anonymous_7)",
|
19163 | decl: {
|
19164 | start: {
|
19165 | line: 107,
|
19166 | column: 32
|
19167 | },
|
19168 | end: {
|
19169 | line: 107,
|
19170 | column: 33
|
19171 | }
|
19172 | },
|
19173 | loc: {
|
19174 | start: {
|
19175 | line: 107,
|
19176 | column: 43
|
19177 | },
|
19178 | end: {
|
19179 | line: 109,
|
19180 | column: 5
|
19181 | }
|
19182 | },
|
19183 | line: 107
|
19184 | },
|
19185 | "8": {
|
19186 | name: "(anonymous_8)",
|
19187 | decl: {
|
19188 | start: {
|
19189 | line: 111,
|
19190 | column: 34
|
19191 | },
|
19192 | end: {
|
19193 | line: 111,
|
19194 | column: 35
|
19195 | }
|
19196 | },
|
19197 | loc: {
|
19198 | start: {
|
19199 | line: 111,
|
19200 | column: 45
|
19201 | },
|
19202 | end: {
|
19203 | line: 118,
|
19204 | column: 5
|
19205 | }
|
19206 | },
|
19207 | line: 111
|
19208 | },
|
19209 | "9": {
|
19210 | name: "(anonymous_9)",
|
19211 | decl: {
|
19212 | start: {
|
19213 | line: 121,
|
19214 | column: 33
|
19215 | },
|
19216 | end: {
|
19217 | line: 121,
|
19218 | column: 34
|
19219 | }
|
19220 | },
|
19221 | loc: {
|
19222 | start: {
|
19223 | line: 121,
|
19224 | column: 44
|
19225 | },
|
19226 | end: {
|
19227 | line: 126,
|
19228 | column: 5
|
19229 | }
|
19230 | },
|
19231 | line: 121
|
19232 | },
|
19233 | "10": {
|
19234 | name: "(anonymous_10)",
|
19235 | decl: {
|
19236 | start: {
|
19237 | line: 130,
|
19238 | column: 28
|
19239 | },
|
19240 | end: {
|
19241 | line: 130,
|
19242 | column: 29
|
19243 | }
|
19244 | },
|
19245 | loc: {
|
19246 | start: {
|
19247 | line: 130,
|
19248 | column: 44
|
19249 | },
|
19250 | end: {
|
19251 | line: 148,
|
19252 | column: 5
|
19253 | }
|
19254 | },
|
19255 | line: 130
|
19256 | }
|
19257 | },
|
19258 | branchMap: {
|
19259 | "0": {
|
19260 | loc: {
|
19261 | start: {
|
19262 | line: 10,
|
19263 | column: 23
|
19264 | },
|
19265 | end: {
|
19266 | line: 10,
|
19267 | column: 55
|
19268 | }
|
19269 | },
|
19270 | type: "binary-expr",
|
19271 | locations: [{
|
19272 | start: {
|
19273 | line: 10,
|
19274 | column: 23
|
19275 | },
|
19276 | end: {
|
19277 | line: 10,
|
19278 | column: 41
|
19279 | }
|
19280 | }, {
|
19281 | start: {
|
19282 | line: 10,
|
19283 | column: 45
|
19284 | },
|
19285 | end: {
|
19286 | line: 10,
|
19287 | column: 55
|
19288 | }
|
19289 | }],
|
19290 | line: 10
|
19291 | },
|
19292 | "1": {
|
19293 | loc: {
|
19294 | start: {
|
19295 | line: 35,
|
19296 | column: 20
|
19297 | },
|
19298 | end: {
|
19299 | line: 35,
|
19300 | column: 72
|
19301 | }
|
19302 | },
|
19303 | type: "binary-expr",
|
19304 | locations: [{
|
19305 | start: {
|
19306 | line: 35,
|
19307 | column: 21
|
19308 | },
|
19309 | end: {
|
19310 | line: 35,
|
19311 | column: 28
|
19312 | }
|
19313 | }, {
|
19314 | start: {
|
19315 | line: 35,
|
19316 | column: 32
|
19317 | },
|
19318 | end: {
|
19319 | line: 35,
|
19320 | column: 51
|
19321 | }
|
19322 | }, {
|
19323 | start: {
|
19324 | line: 35,
|
19325 | column: 56
|
19326 | },
|
19327 | end: {
|
19328 | line: 35,
|
19329 | column: 72
|
19330 | }
|
19331 | }],
|
19332 | line: 35
|
19333 | },
|
19334 | "2": {
|
19335 | loc: {
|
19336 | start: {
|
19337 | line: 36,
|
19338 | column: 21
|
19339 | },
|
19340 | end: {
|
19341 | line: 36,
|
19342 | column: 60
|
19343 | }
|
19344 | },
|
19345 | type: "binary-expr",
|
19346 | locations: [{
|
19347 | start: {
|
19348 | line: 36,
|
19349 | column: 22
|
19350 | },
|
19351 | end: {
|
19352 | line: 36,
|
19353 | column: 29
|
19354 | }
|
19355 | }, {
|
19356 | start: {
|
19357 | line: 36,
|
19358 | column: 33
|
19359 | },
|
19360 | end: {
|
19361 | line: 36,
|
19362 | column: 53
|
19363 | }
|
19364 | }, {
|
19365 | start: {
|
19366 | line: 36,
|
19367 | column: 58
|
19368 | },
|
19369 | end: {
|
19370 | line: 36,
|
19371 | column: 60
|
19372 | }
|
19373 | }],
|
19374 | line: 36
|
19375 | },
|
19376 | "3": {
|
19377 | loc: {
|
19378 | start: {
|
19379 | line: 37,
|
19380 | column: 20
|
19381 | },
|
19382 | end: {
|
19383 | line: 37,
|
19384 | column: 93
|
19385 | }
|
19386 | },
|
19387 | type: "cond-expr",
|
19388 | locations: [{
|
19389 | start: {
|
19390 | line: 37,
|
19391 | column: 67
|
19392 | },
|
19393 | end: {
|
19394 | line: 37,
|
19395 | column: 86
|
19396 | }
|
19397 | }, {
|
19398 | start: {
|
19399 | line: 37,
|
19400 | column: 89
|
19401 | },
|
19402 | end: {
|
19403 | line: 37,
|
19404 | column: 93
|
19405 | }
|
19406 | }],
|
19407 | line: 37
|
19408 | },
|
19409 | "4": {
|
19410 | loc: {
|
19411 | start: {
|
19412 | line: 37,
|
19413 | column: 20
|
19414 | },
|
19415 | end: {
|
19416 | line: 37,
|
19417 | column: 64
|
19418 | }
|
19419 | },
|
19420 | type: "binary-expr",
|
19421 | locations: [{
|
19422 | start: {
|
19423 | line: 37,
|
19424 | column: 20
|
19425 | },
|
19426 | end: {
|
19427 | line: 37,
|
19428 | column: 27
|
19429 | }
|
19430 | }, {
|
19431 | start: {
|
19432 | line: 37,
|
19433 | column: 31
|
19434 | },
|
19435 | end: {
|
19436 | line: 37,
|
19437 | column: 64
|
19438 | }
|
19439 | }],
|
19440 | line: 37
|
19441 | },
|
19442 | "5": {
|
19443 | loc: {
|
19444 | start: {
|
19445 | line: 38,
|
19446 | column: 20
|
19447 | },
|
19448 | end: {
|
19449 | line: 38,
|
19450 | column: 93
|
19451 | }
|
19452 | },
|
19453 | type: "cond-expr",
|
19454 | locations: [{
|
19455 | start: {
|
19456 | line: 38,
|
19457 | column: 67
|
19458 | },
|
19459 | end: {
|
19460 | line: 38,
|
19461 | column: 86
|
19462 | }
|
19463 | }, {
|
19464 | start: {
|
19465 | line: 38,
|
19466 | column: 89
|
19467 | },
|
19468 | end: {
|
19469 | line: 38,
|
19470 | column: 93
|
19471 | }
|
19472 | }],
|
19473 | line: 38
|
19474 | },
|
19475 | "6": {
|
19476 | loc: {
|
19477 | start: {
|
19478 | line: 38,
|
19479 | column: 20
|
19480 | },
|
19481 | end: {
|
19482 | line: 38,
|
19483 | column: 64
|
19484 | }
|
19485 | },
|
19486 | type: "binary-expr",
|
19487 | locations: [{
|
19488 | start: {
|
19489 | line: 38,
|
19490 | column: 20
|
19491 | },
|
19492 | end: {
|
19493 | line: 38,
|
19494 | column: 27
|
19495 | }
|
19496 | }, {
|
19497 | start: {
|
19498 | line: 38,
|
19499 | column: 31
|
19500 | },
|
19501 | end: {
|
19502 | line: 38,
|
19503 | column: 64
|
19504 | }
|
19505 | }],
|
19506 | line: 38
|
19507 | },
|
19508 | "7": {
|
19509 | loc: {
|
19510 | start: {
|
19511 | line: 39,
|
19512 | column: 21
|
19513 | },
|
19514 | end: {
|
19515 | line: 39,
|
19516 | column: 96
|
19517 | }
|
19518 | },
|
19519 | type: "cond-expr",
|
19520 | locations: [{
|
19521 | start: {
|
19522 | line: 39,
|
19523 | column: 69
|
19524 | },
|
19525 | end: {
|
19526 | line: 39,
|
19527 | column: 89
|
19528 | }
|
19529 | }, {
|
19530 | start: {
|
19531 | line: 39,
|
19532 | column: 92
|
19533 | },
|
19534 | end: {
|
19535 | line: 39,
|
19536 | column: 96
|
19537 | }
|
19538 | }],
|
19539 | line: 39
|
19540 | },
|
19541 | "8": {
|
19542 | loc: {
|
19543 | start: {
|
19544 | line: 39,
|
19545 | column: 21
|
19546 | },
|
19547 | end: {
|
19548 | line: 39,
|
19549 | column: 66
|
19550 | }
|
19551 | },
|
19552 | type: "binary-expr",
|
19553 | locations: [{
|
19554 | start: {
|
19555 | line: 39,
|
19556 | column: 21
|
19557 | },
|
19558 | end: {
|
19559 | line: 39,
|
19560 | column: 28
|
19561 | }
|
19562 | }, {
|
19563 | start: {
|
19564 | line: 39,
|
19565 | column: 32
|
19566 | },
|
19567 | end: {
|
19568 | line: 39,
|
19569 | column: 66
|
19570 | }
|
19571 | }],
|
19572 | line: 39
|
19573 | },
|
19574 | "9": {
|
19575 | loc: {
|
19576 | start: {
|
19577 | line: 53,
|
19578 | column: 10
|
19579 | },
|
19580 | end: {
|
19581 | line: 60,
|
19582 | column: 11
|
19583 | }
|
19584 | },
|
19585 | type: "if",
|
19586 | locations: [{
|
19587 | start: {
|
19588 | line: 53,
|
19589 | column: 10
|
19590 | },
|
19591 | end: {
|
19592 | line: 60,
|
19593 | column: 11
|
19594 | }
|
19595 | }, {
|
19596 | start: {
|
19597 | line: 53,
|
19598 | column: 10
|
19599 | },
|
19600 | end: {
|
19601 | line: 60,
|
19602 | column: 11
|
19603 | }
|
19604 | }],
|
19605 | line: 53
|
19606 | },
|
19607 | "10": {
|
19608 | loc: {
|
19609 | start: {
|
19610 | line: 70,
|
19611 | column: 8
|
19612 | },
|
19613 | end: {
|
19614 | line: 73,
|
19615 | column: 9
|
19616 | }
|
19617 | },
|
19618 | type: "if",
|
19619 | locations: [{
|
19620 | start: {
|
19621 | line: 70,
|
19622 | column: 8
|
19623 | },
|
19624 | end: {
|
19625 | line: 73,
|
19626 | column: 9
|
19627 | }
|
19628 | }, {
|
19629 | start: {
|
19630 | line: 70,
|
19631 | column: 8
|
19632 | },
|
19633 | end: {
|
19634 | line: 73,
|
19635 | column: 9
|
19636 | }
|
19637 | }],
|
19638 | line: 70
|
19639 | },
|
19640 | "11": {
|
19641 | loc: {
|
19642 | start: {
|
19643 | line: 70,
|
19644 | column: 12
|
19645 | },
|
19646 | end: {
|
19647 | line: 70,
|
19648 | column: 60
|
19649 | }
|
19650 | },
|
19651 | type: "binary-expr",
|
19652 | locations: [{
|
19653 | start: {
|
19654 | line: 70,
|
19655 | column: 12
|
19656 | },
|
19657 | end: {
|
19658 | line: 70,
|
19659 | column: 28
|
19660 | }
|
19661 | }, {
|
19662 | start: {
|
19663 | line: 70,
|
19664 | column: 32
|
19665 | },
|
19666 | end: {
|
19667 | line: 70,
|
19668 | column: 60
|
19669 | }
|
19670 | }],
|
19671 | line: 70
|
19672 | },
|
19673 | "12": {
|
19674 | loc: {
|
19675 | start: {
|
19676 | line: 101,
|
19677 | column: 6
|
19678 | },
|
19679 | end: {
|
19680 | line: 103,
|
19681 | column: 7
|
19682 | }
|
19683 | },
|
19684 | type: "if",
|
19685 | locations: [{
|
19686 | start: {
|
19687 | line: 101,
|
19688 | column: 6
|
19689 | },
|
19690 | end: {
|
19691 | line: 103,
|
19692 | column: 7
|
19693 | }
|
19694 | }, {
|
19695 | start: {
|
19696 | line: 101,
|
19697 | column: 6
|
19698 | },
|
19699 | end: {
|
19700 | line: 103,
|
19701 | column: 7
|
19702 | }
|
19703 | }],
|
19704 | line: 101
|
19705 | },
|
19706 | "13": {
|
19707 | loc: {
|
19708 | start: {
|
19709 | line: 112,
|
19710 | column: 6
|
19711 | },
|
19712 | end: {
|
19713 | line: 117,
|
19714 | column: 7
|
19715 | }
|
19716 | },
|
19717 | type: "if",
|
19718 | locations: [{
|
19719 | start: {
|
19720 | line: 112,
|
19721 | column: 6
|
19722 | },
|
19723 | end: {
|
19724 | line: 117,
|
19725 | column: 7
|
19726 | }
|
19727 | }, {
|
19728 | start: {
|
19729 | line: 112,
|
19730 | column: 6
|
19731 | },
|
19732 | end: {
|
19733 | line: 117,
|
19734 | column: 7
|
19735 | }
|
19736 | }],
|
19737 | line: 112
|
19738 | },
|
19739 | "14": {
|
19740 | loc: {
|
19741 | start: {
|
19742 | line: 112,
|
19743 | column: 10
|
19744 | },
|
19745 | end: {
|
19746 | line: 112,
|
19747 | column: 47
|
19748 | }
|
19749 | },
|
19750 | type: "binary-expr",
|
19751 | locations: [{
|
19752 | start: {
|
19753 | line: 112,
|
19754 | column: 10
|
19755 | },
|
19756 | end: {
|
19757 | line: 112,
|
19758 | column: 31
|
19759 | }
|
19760 | }, {
|
19761 | start: {
|
19762 | line: 112,
|
19763 | column: 35
|
19764 | },
|
19765 | end: {
|
19766 | line: 112,
|
19767 | column: 47
|
19768 | }
|
19769 | }],
|
19770 | line: 112
|
19771 | },
|
19772 | "15": {
|
19773 | loc: {
|
19774 | start: {
|
19775 | line: 122,
|
19776 | column: 6
|
19777 | },
|
19778 | end: {
|
19779 | line: 125,
|
19780 | column: 7
|
19781 | }
|
19782 | },
|
19783 | type: "if",
|
19784 | locations: [{
|
19785 | start: {
|
19786 | line: 122,
|
19787 | column: 6
|
19788 | },
|
19789 | end: {
|
19790 | line: 125,
|
19791 | column: 7
|
19792 | }
|
19793 | }, {
|
19794 | start: {
|
19795 | line: 122,
|
19796 | column: 6
|
19797 | },
|
19798 | end: {
|
19799 | line: 125,
|
19800 | column: 7
|
19801 | }
|
19802 | }],
|
19803 | line: 122
|
19804 | },
|
19805 | "16": {
|
19806 | loc: {
|
19807 | start: {
|
19808 | line: 122,
|
19809 | column: 10
|
19810 | },
|
19811 | end: {
|
19812 | line: 122,
|
19813 | column: 45
|
19814 | }
|
19815 | },
|
19816 | type: "binary-expr",
|
19817 | locations: [{
|
19818 | start: {
|
19819 | line: 122,
|
19820 | column: 10
|
19821 | },
|
19822 | end: {
|
19823 | line: 122,
|
19824 | column: 30
|
19825 | }
|
19826 | }, {
|
19827 | start: {
|
19828 | line: 122,
|
19829 | column: 34
|
19830 | },
|
19831 | end: {
|
19832 | line: 122,
|
19833 | column: 45
|
19834 | }
|
19835 | }],
|
19836 | line: 122
|
19837 | },
|
19838 | "17": {
|
19839 | loc: {
|
19840 | start: {
|
19841 | line: 132,
|
19842 | column: 6
|
19843 | },
|
19844 | end: {
|
19845 | line: 134,
|
19846 | column: 7
|
19847 | }
|
19848 | },
|
19849 | type: "if",
|
19850 | locations: [{
|
19851 | start: {
|
19852 | line: 132,
|
19853 | column: 6
|
19854 | },
|
19855 | end: {
|
19856 | line: 134,
|
19857 | column: 7
|
19858 | }
|
19859 | }, {
|
19860 | start: {
|
19861 | line: 132,
|
19862 | column: 6
|
19863 | },
|
19864 | end: {
|
19865 | line: 134,
|
19866 | column: 7
|
19867 | }
|
19868 | }],
|
19869 | line: 132
|
19870 | },
|
19871 | "18": {
|
19872 | loc: {
|
19873 | start: {
|
19874 | line: 138,
|
19875 | column: 6
|
19876 | },
|
19877 | end: {
|
19878 | line: 140,
|
19879 | column: 7
|
19880 | }
|
19881 | },
|
19882 | type: "if",
|
19883 | locations: [{
|
19884 | start: {
|
19885 | line: 138,
|
19886 | column: 6
|
19887 | },
|
19888 | end: {
|
19889 | line: 140,
|
19890 | column: 7
|
19891 | }
|
19892 | }, {
|
19893 | start: {
|
19894 | line: 138,
|
19895 | column: 6
|
19896 | },
|
19897 | end: {
|
19898 | line: 140,
|
19899 | column: 7
|
19900 | }
|
19901 | }],
|
19902 | line: 138
|
19903 | },
|
19904 | "19": {
|
19905 | loc: {
|
19906 | start: {
|
19907 | line: 139,
|
19908 | column: 22
|
19909 | },
|
19910 | end: {
|
19911 | line: 139,
|
19912 | column: 81
|
19913 | }
|
19914 | },
|
19915 | type: "binary-expr",
|
19916 | locations: [{
|
19917 | start: {
|
19918 | line: 139,
|
19919 | column: 22
|
19920 | },
|
19921 | end: {
|
19922 | line: 139,
|
19923 | column: 48
|
19924 | }
|
19925 | }, {
|
19926 | start: {
|
19927 | line: 139,
|
19928 | column: 52
|
19929 | },
|
19930 | end: {
|
19931 | line: 139,
|
19932 | column: 81
|
19933 | }
|
19934 | }],
|
19935 | line: 139
|
19936 | },
|
19937 | "20": {
|
19938 | loc: {
|
19939 | start: {
|
19940 | line: 143,
|
19941 | column: 6
|
19942 | },
|
19943 | end: {
|
19944 | line: 146,
|
19945 | column: 7
|
19946 | }
|
19947 | },
|
19948 | type: "if",
|
19949 | locations: [{
|
19950 | start: {
|
19951 | line: 143,
|
19952 | column: 6
|
19953 | },
|
19954 | end: {
|
19955 | line: 146,
|
19956 | column: 7
|
19957 | }
|
19958 | }, {
|
19959 | start: {
|
19960 | line: 143,
|
19961 | column: 6
|
19962 | },
|
19963 | end: {
|
19964 | line: 146,
|
19965 | column: 7
|
19966 | }
|
19967 | }],
|
19968 | line: 143
|
19969 | },
|
19970 | "21": {
|
19971 | loc: {
|
19972 | start: {
|
19973 | line: 143,
|
19974 | column: 10
|
19975 | },
|
19976 | end: {
|
19977 | line: 143,
|
19978 | column: 36
|
19979 | }
|
19980 | },
|
19981 | type: "binary-expr",
|
19982 | locations: [{
|
19983 | start: {
|
19984 | line: 143,
|
19985 | column: 10
|
19986 | },
|
19987 | end: {
|
19988 | line: 143,
|
19989 | column: 21
|
19990 | }
|
19991 | }, {
|
19992 | start: {
|
19993 | line: 143,
|
19994 | column: 25
|
19995 | },
|
19996 | end: {
|
19997 | line: 143,
|
19998 | column: 36
|
19999 | }
|
20000 | }],
|
20001 | line: 143
|
20002 | }
|
20003 | },
|
20004 | s: {
|
20005 | "0": 0,
|
20006 | "1": 0,
|
20007 | "2": 0,
|
20008 | "3": 0,
|
20009 | "4": 0,
|
20010 | "5": 0,
|
20011 | "6": 0,
|
20012 | "7": 0,
|
20013 | "8": 0,
|
20014 | "9": 0,
|
20015 | "10": 0,
|
20016 | "11": 0,
|
20017 | "12": 0,
|
20018 | "13": 0,
|
20019 | "14": 0,
|
20020 | "15": 0,
|
20021 | "16": 0,
|
20022 | "17": 0,
|
20023 | "18": 0,
|
20024 | "19": 0,
|
20025 | "20": 0,
|
20026 | "21": 0,
|
20027 | "22": 0,
|
20028 | "23": 0,
|
20029 | "24": 0,
|
20030 | "25": 0,
|
20031 | "26": 0,
|
20032 | "27": 0,
|
20033 | "28": 0,
|
20034 | "29": 0,
|
20035 | "30": 0,
|
20036 | "31": 0,
|
20037 | "32": 0,
|
20038 | "33": 0,
|
20039 | "34": 0,
|
20040 | "35": 0,
|
20041 | "36": 0,
|
20042 | "37": 0,
|
20043 | "38": 0,
|
20044 | "39": 0,
|
20045 | "40": 0,
|
20046 | "41": 0,
|
20047 | "42": 0,
|
20048 | "43": 0,
|
20049 | "44": 0,
|
20050 | "45": 0,
|
20051 | "46": 0,
|
20052 | "47": 0,
|
20053 | "48": 0,
|
20054 | "49": 0,
|
20055 | "50": 0,
|
20056 | "51": 0,
|
20057 | "52": 0,
|
20058 | "53": 0,
|
20059 | "54": 0,
|
20060 | "55": 0,
|
20061 | "56": 0,
|
20062 | "57": 0,
|
20063 | "58": 0,
|
20064 | "59": 0
|
20065 | },
|
20066 | f: {
|
20067 | "0": 0,
|
20068 | "1": 0,
|
20069 | "2": 0,
|
20070 | "3": 0,
|
20071 | "4": 0,
|
20072 | "5": 0,
|
20073 | "6": 0,
|
20074 | "7": 0,
|
20075 | "8": 0,
|
20076 | "9": 0,
|
20077 | "10": 0
|
20078 | },
|
20079 | b: {
|
20080 | "0": [0, 0],
|
20081 | "1": [0, 0, 0],
|
20082 | "2": [0, 0, 0],
|
20083 | "3": [0, 0],
|
20084 | "4": [0, 0],
|
20085 | "5": [0, 0],
|
20086 | "6": [0, 0],
|
20087 | "7": [0, 0],
|
20088 | "8": [0, 0],
|
20089 | "9": [0, 0],
|
20090 | "10": [0, 0],
|
20091 | "11": [0, 0],
|
20092 | "12": [0, 0],
|
20093 | "13": [0, 0],
|
20094 | "14": [0, 0],
|
20095 | "15": [0, 0],
|
20096 | "16": [0, 0],
|
20097 | "17": [0, 0],
|
20098 | "18": [0, 0],
|
20099 | "19": [0, 0],
|
20100 | "20": [0, 0],
|
20101 | "21": [0, 0]
|
20102 | },
|
20103 | _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
|
20104 | },
|
20105 | coverage = global[gcv] || (global[gcv] = {});
|
20106 |
|
20107 | if (coverage[path] && coverage[path].hash === hash) {
|
20108 | return coverage[path];
|
20109 | }
|
20110 |
|
20111 | coverageData.hash = hash;
|
20112 | return coverage[path] = coverageData;
|
20113 | }();
|
20114 |
|
20115 | cov_1yw202mp9x.s[0]++;
|
20116 |
|
20117 | (function (window, document, vjs, undefined) {
|
20118 |
|
20119 | cov_1yw202mp9x.f[0]++;
|
20120 | var registerPlugin = (cov_1yw202mp9x.s[1]++, (cov_1yw202mp9x.b[0][0]++, vjs.registerPlugin) || (cov_1yw202mp9x.b[0][1]++, vjs.plugin));
|
20121 | cov_1yw202mp9x.s[2]++;
|
20122 | registerPlugin('exampleAds', function (options) {
|
20123 | cov_1yw202mp9x.f[1]++;
|
20124 | cov_1yw202mp9x.s[10]++;
|
20125 | cov_1yw202mp9x.s[21]++;
|
20126 |
|
20127 | var player = (cov_1yw202mp9x.s[3]++, this),
|
20128 | state = (cov_1yw202mp9x.s[4]++, {}),
|
20129 | adServerUrl = (cov_1yw202mp9x.s[5]++, (cov_1yw202mp9x.b[1][0]++, options) && (cov_1yw202mp9x.b[1][1]++, options.adServerUrl) || (cov_1yw202mp9x.b[1][2]++, "inventory.json")),
|
20130 | midrollPoint = (cov_1yw202mp9x.s[6]++, (cov_1yw202mp9x.b[2][0]++, options) && (cov_1yw202mp9x.b[2][1]++, options.midrollPoint) || (cov_1yw202mp9x.b[2][2]++, 15)),
|
20131 | playPreroll = (cov_1yw202mp9x.s[7]++, (cov_1yw202mp9x.b[4][0]++, options) && (cov_1yw202mp9x.b[4][1]++, options.playPreroll !== undefined) ? (cov_1yw202mp9x.b[3][0]++, options.playPreroll) : (cov_1yw202mp9x.b[3][1]++, true)),
|
20132 | playMidroll = (cov_1yw202mp9x.s[8]++, (cov_1yw202mp9x.b[6][0]++, options) && (cov_1yw202mp9x.b[6][1]++, options.playMidroll !== undefined) ? (cov_1yw202mp9x.b[5][0]++, options.playMidroll) : (cov_1yw202mp9x.b[5][1]++, true)),
|
20133 | playPostroll = (cov_1yw202mp9x.s[9]++, (cov_1yw202mp9x.b[8][0]++, options) && (cov_1yw202mp9x.b[8][1]++, options.playPostroll !== undefined) ? (cov_1yw202mp9x.b[7][0]++, options.playPostroll) : (cov_1yw202mp9x.b[7][1]++, true)),
|
20134 | requestAds = function requestAds() {
|
20135 | cov_1yw202mp9x.f[2]++;
|
20136 | cov_1yw202mp9x.s[11]++;
|
20137 | state = {};
|
20138 | var xhr = (cov_1yw202mp9x.s[12]++, new XMLHttpRequest());
|
20139 | cov_1yw202mp9x.s[13]++;
|
20140 | xhr.open("GET", adServerUrl + "?src=" + encodeURIComponent(player.currentSrc()));
|
20141 | cov_1yw202mp9x.s[14]++;
|
20142 |
|
20143 | xhr.onreadystatechange = function () {
|
20144 | cov_1yw202mp9x.f[3]++;
|
20145 | cov_1yw202mp9x.s[15]++;
|
20146 |
|
20147 | if (xhr.readyState === 4) {
|
20148 | cov_1yw202mp9x.b[9][0]++;
|
20149 | cov_1yw202mp9x.s[16]++;
|
20150 |
|
20151 | try {
|
20152 | cov_1yw202mp9x.s[17]++;
|
20153 | state.inventory = JSON.parse(xhr.responseText);
|
20154 | cov_1yw202mp9x.s[18]++;
|
20155 | player.trigger('adsready');
|
20156 | } catch (err) {
|
20157 | cov_1yw202mp9x.s[19]++;
|
20158 | throw new Error('Couldn\'t parse inventory response as JSON');
|
20159 | }
|
20160 | } else {
|
20161 | cov_1yw202mp9x.b[9][1]++;
|
20162 | }
|
20163 | };
|
20164 |
|
20165 | cov_1yw202mp9x.s[20]++;
|
20166 | xhr.send(null);
|
20167 | },
|
20168 | playAd = function playAd() {
|
20169 | cov_1yw202mp9x.f[4]++;
|
20170 | cov_1yw202mp9x.s[22]++;
|
20171 |
|
20172 | if ((cov_1yw202mp9x.b[11][0]++, !state.inventory) || (cov_1yw202mp9x.b[11][1]++, state.inventory.length === 0)) {
|
20173 | cov_1yw202mp9x.b[10][0]++;
|
20174 | cov_1yw202mp9x.s[23]++;
|
20175 | videojs.log('No inventory to play.');
|
20176 | cov_1yw202mp9x.s[24]++;
|
20177 | return;
|
20178 | } else {
|
20179 | cov_1yw202mp9x.b[10][1]++;
|
20180 | }
|
20181 |
|
20182 | cov_1yw202mp9x.s[25]++;
|
20183 | player.ads.startLinearAdMode();
|
20184 | cov_1yw202mp9x.s[26]++;
|
20185 | state.adPlaying = true;
|
20186 | var media = (cov_1yw202mp9x.s[27]++, state.inventory[Math.floor(Math.random() * state.inventory.length)]);
|
20187 | cov_1yw202mp9x.s[28]++;
|
20188 | player.src(media);
|
20189 | cov_1yw202mp9x.s[29]++;
|
20190 | player.trigger('ads-ad-started');
|
20191 | cov_1yw202mp9x.s[30]++;
|
20192 | player.one('adended', function () {
|
20193 | cov_1yw202mp9x.f[5]++;
|
20194 | cov_1yw202mp9x.s[31]++;
|
20195 | player.trigger('ads-ad-ended');
|
20196 | cov_1yw202mp9x.s[32]++;
|
20197 | player.ads.endLinearAdMode();
|
20198 | cov_1yw202mp9x.s[33]++;
|
20199 | state.adPlaying = false;
|
20200 | });
|
20201 | };
|
20202 |
|
20203 | cov_1yw202mp9x.s[34]++;
|
20204 | player.ads(options);
|
20205 | cov_1yw202mp9x.s[35]++;
|
20206 | requestAds();
|
20207 | cov_1yw202mp9x.s[36]++;
|
20208 | player.on('adsready', function () {
|
20209 | cov_1yw202mp9x.f[6]++;
|
20210 | cov_1yw202mp9x.s[37]++;
|
20211 |
|
20212 | if (!playPreroll) {
|
20213 | cov_1yw202mp9x.b[12][0]++;
|
20214 | cov_1yw202mp9x.s[38]++;
|
20215 | player.trigger('nopreroll');
|
20216 | } else {
|
20217 | cov_1yw202mp9x.b[12][1]++;
|
20218 | }
|
20219 | });
|
20220 | cov_1yw202mp9x.s[39]++;
|
20221 | player.on('contentchanged', function () {
|
20222 | cov_1yw202mp9x.f[7]++;
|
20223 | cov_1yw202mp9x.s[40]++;
|
20224 | requestAds();
|
20225 | });
|
20226 | cov_1yw202mp9x.s[41]++;
|
20227 | player.on('readyforpostroll', function () {
|
20228 | cov_1yw202mp9x.f[8]++;
|
20229 | cov_1yw202mp9x.s[42]++;
|
20230 |
|
20231 | if ((cov_1yw202mp9x.b[14][0]++, !state.postrollPlayed) && (cov_1yw202mp9x.b[14][1]++, playPostroll)) {
|
20232 | cov_1yw202mp9x.b[13][0]++;
|
20233 | cov_1yw202mp9x.s[43]++;
|
20234 | state.postrollPlayed = true;
|
20235 | cov_1yw202mp9x.s[44]++;
|
20236 | playAd();
|
20237 | } else {
|
20238 | cov_1yw202mp9x.b[13][1]++;
|
20239 | cov_1yw202mp9x.s[45]++;
|
20240 | player.trigger('nopostroll');
|
20241 | }
|
20242 | });
|
20243 | cov_1yw202mp9x.s[46]++;
|
20244 | player.on('readyforpreroll', function () {
|
20245 | cov_1yw202mp9x.f[9]++;
|
20246 | cov_1yw202mp9x.s[47]++;
|
20247 |
|
20248 | if ((cov_1yw202mp9x.b[16][0]++, !state.prerollPlayed) && (cov_1yw202mp9x.b[16][1]++, playPreroll)) {
|
20249 | cov_1yw202mp9x.b[15][0]++;
|
20250 | cov_1yw202mp9x.s[48]++;
|
20251 | state.prerollPlayed = true;
|
20252 | cov_1yw202mp9x.s[49]++;
|
20253 | playAd();
|
20254 | } else {
|
20255 | cov_1yw202mp9x.b[15][1]++;
|
20256 | }
|
20257 | });
|
20258 | cov_1yw202mp9x.s[50]++;
|
20259 | player.on('timeupdate', function (event) {
|
20260 | cov_1yw202mp9x.f[10]++;
|
20261 | cov_1yw202mp9x.s[51]++;
|
20262 |
|
20263 | if (state.midrollPlayed) {
|
20264 | cov_1yw202mp9x.b[17][0]++;
|
20265 | cov_1yw202mp9x.s[52]++;
|
20266 | return;
|
20267 | } else {
|
20268 | cov_1yw202mp9x.b[17][1]++;
|
20269 | }
|
20270 |
|
20271 | var currentTime = (cov_1yw202mp9x.s[53]++, player.currentTime()),
|
20272 | opportunity;
|
20273 | cov_1yw202mp9x.s[54]++;
|
20274 |
|
20275 | if ('lastTime' in state) {
|
20276 | cov_1yw202mp9x.b[18][0]++;
|
20277 | cov_1yw202mp9x.s[55]++;
|
20278 | opportunity = (cov_1yw202mp9x.b[19][0]++, currentTime > midrollPoint) && (cov_1yw202mp9x.b[19][1]++, state.lastTime < midrollPoint);
|
20279 | } else {
|
20280 | cov_1yw202mp9x.b[18][1]++;
|
20281 | }
|
20282 |
|
20283 | cov_1yw202mp9x.s[56]++;
|
20284 | state.lastTime = currentTime;
|
20285 | cov_1yw202mp9x.s[57]++;
|
20286 |
|
20287 | if ((cov_1yw202mp9x.b[21][0]++, opportunity) && (cov_1yw202mp9x.b[21][1]++, playMidroll)) {
|
20288 | cov_1yw202mp9x.b[20][0]++;
|
20289 | cov_1yw202mp9x.s[58]++;
|
20290 | state.midrollPlayed = true;
|
20291 | cov_1yw202mp9x.s[59]++;
|
20292 | playAd();
|
20293 | } else {
|
20294 | cov_1yw202mp9x.b[20][1]++;
|
20295 | }
|
20296 | });
|
20297 | });
|
20298 | })(window, document, videojs);
|
20299 |
|
20300 | |
20301 |
|
20302 |
|
20303 |
|
20304 |
|
20305 |
|
20306 |
|
20307 |
|
20308 | QUnit.module('Events and Midrolls', {
|
20309 | beforeEach: function beforeEach() {
|
20310 | this.video = document_1.createElement('video');
|
20311 | this.fixture = document_1.querySelector('#qunit-fixture');
|
20312 | this.fixture.appendChild(this.video);
|
20313 | this.player = videojs$1(this.video);
|
20314 | this.player.exampleAds({
|
20315 | adServerUrl: '/test/integration/lib/inventory.json',
|
20316 | playPreroll: false,
|
20317 | midrollPoint: 1
|
20318 | });
|
20319 | this.player.src({
|
20320 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
20321 | type: 'video/webm'
|
20322 | });
|
20323 |
|
20324 | this.player.muted(true);
|
20325 | },
|
20326 | afterEach: function afterEach() {
|
20327 | this.player.dispose();
|
20328 | }
|
20329 | });
|
20330 | QUnit.test('Midrolls', function (assert) {
|
20331 | var _this = this;
|
20332 |
|
20333 | var done = assert.async();
|
20334 | var beforeMidroll = true;
|
20335 | var seenInAdMode = [];
|
20336 | var seenInContentResuming = [];
|
20337 | var seenOutsideAdModeBefore = [];
|
20338 | var seenOutsideAdModeAfter = [];
|
20339 | this.player.on('adend', function () {
|
20340 | beforeMidroll = false;
|
20341 | });
|
20342 | var events = ['suspend', 'abort', 'error', 'emptied', 'stalled', 'canplay', 'canplaythrough', 'waiting', 'seeking', 'durationchange', 'progress', 'pause', 'ratechange', 'volumechange', 'firstplay', 'suspend', 'playing', 'ended'];
|
20343 | events = events.concat(events.map(function (e) {
|
20344 | return 'ad' + e;
|
20345 | }));
|
20346 | events = events.concat(events.map(function (e) {
|
20347 | return 'content' + e;
|
20348 | }));
|
20349 | this.player.on(events, function (e) {
|
20350 | var str = e.type;
|
20351 |
|
20352 | if (_this.player.ads.isInAdMode()) {
|
20353 | if (_this.player.ads.isContentResuming()) {
|
20354 | seenInContentResuming.push(str);
|
20355 | } else {
|
20356 | seenInAdMode.push(str);
|
20357 | }
|
20358 | } else if (beforeMidroll) {
|
20359 | seenOutsideAdModeBefore.push(str);
|
20360 | } else {
|
20361 | seenOutsideAdModeAfter.push(str);
|
20362 | }
|
20363 | });
|
20364 | this.player.on(['error', 'aderror'], function () {
|
20365 | assert.ok(false, 'no errors');
|
20366 | done();
|
20367 | });
|
20368 | this.player.on('timeupdate', function () {
|
20369 | videojs$1.log(_this.player.currentTime(), _this.player.currentSrc());
|
20370 |
|
20371 | if (_this.player.currentTime() > 1.1) {
|
20372 | seenOutsideAdModeBefore.forEach(function (event) {
|
20373 | assert.ok(!/^ad/.test(event), event + ' has no ad prefix before midroll');
|
20374 | assert.ok(!/^content/.test(event), event + ' has no content prefix before midroll');
|
20375 | });
|
20376 | seenInAdMode.forEach(function (event) {
|
20377 | assert.ok(/^ad/.test(event), event + ' has ad prefix during midroll');
|
20378 | });
|
20379 | seenInContentResuming.forEach(function (event) {
|
20380 | assert.ok(/^content/.test(event), event + ' has content prefix during midroll');
|
20381 | });
|
20382 | seenOutsideAdModeAfter.forEach(function (event) {
|
20383 | assert.ok(!/^ad/.test(event), event + ' has no ad prefix after midroll');
|
20384 | assert.ok(!/^content/.test(event), event + ' has no content prefix after midroll');
|
20385 | });
|
20386 | done();
|
20387 | }
|
20388 | });
|
20389 |
|
20390 | this.player.one('playing', function () {
|
20391 | _this.player.currentTime(0.9);
|
20392 | });
|
20393 | this.player.ready(this.player.play);
|
20394 | });
|
20395 |
|
20396 | QUnit.module('Final Events With No Postroll', {
|
20397 | beforeEach: function beforeEach() {
|
20398 | this.video = document_1.createElement('video');
|
20399 | this.fixture = document_1.querySelector('#qunit-fixture');
|
20400 | this.fixture.appendChild(this.video);
|
20401 | this.player = videojs$1(this.video);
|
20402 | this.player.exampleAds({
|
20403 | adServerUrl: '/test/integration/lib/inventory.json',
|
20404 | playPreroll: false,
|
20405 | playMidroll: false,
|
20406 | playPostroll: false
|
20407 | });
|
20408 | this.player.src({
|
20409 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
20410 | type: 'video/webm'
|
20411 | });
|
20412 |
|
20413 | this.player.muted(true);
|
20414 | },
|
20415 | afterEach: function afterEach() {
|
20416 | this.player.dispose();
|
20417 | }
|
20418 | });
|
20419 | QUnit.test('final ended event with no postroll: just 1', function (assert) {
|
20420 | var _this = this;
|
20421 |
|
20422 | var done = assert.async();
|
20423 | var endedEvents = 0;
|
20424 |
|
20425 | this.player.ads.settings.postrollTimeout = 1;
|
20426 | this.player.on('ended', function () {
|
20427 | endedEvents++;
|
20428 | });
|
20429 | this.player.on(['error', 'aderror'], function () {
|
20430 | assert.ok(false, 'no errors');
|
20431 | done();
|
20432 | });
|
20433 | this.player.one('ended', function () {
|
20434 |
|
20435 | setTimeout(function () {
|
20436 | assert.equal(endedEvents, 1, 'exactly one ended with no postroll');
|
20437 | done();
|
20438 | }, 1000);
|
20439 | });
|
20440 |
|
20441 | this.player.one('playing', function () {
|
20442 | _this.player.currentTime(46);
|
20443 | });
|
20444 | this.player.ready(this.player.play);
|
20445 | });
|
20446 |
|
20447 | QUnit.module('Initial Events With No Preroll', {
|
20448 | beforeEach: function beforeEach() {
|
20449 | this.video = document_1.createElement('video');
|
20450 | this.fixture = document_1.querySelector('#qunit-fixture');
|
20451 | this.fixture.appendChild(this.video);
|
20452 | this.player = videojs$1(this.video);
|
20453 | this.player.exampleAds({
|
20454 | adServerUrl: '/test/integration/lib/inventory.json',
|
20455 | playPreroll: false,
|
20456 | playMidroll: false
|
20457 | });
|
20458 | this.player.src({
|
20459 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
20460 | type: 'video/webm'
|
20461 | });
|
20462 |
|
20463 | this.player.muted(true);
|
20464 | },
|
20465 | afterEach: function afterEach() {
|
20466 | this.player.dispose();
|
20467 | }
|
20468 | });
|
20469 | QUnit.test('initial play event with no preroll: one please', function (assert) {
|
20470 | var _this = this;
|
20471 |
|
20472 | var done = assert.async();
|
20473 | var playEvents = 0;
|
20474 | this.player.on('play', function () {
|
20475 | playEvents++;
|
20476 | });
|
20477 | this.player.on(['error', 'aderror'], function () {
|
20478 | assert.ok(false, 'no errors');
|
20479 | done();
|
20480 | });
|
20481 | this.player.on('timeupdate', function () {
|
20482 | if (_this.player.currentTime() > 1) {
|
20483 | assert.equal(playEvents, 1, '1 play event');
|
20484 | done();
|
20485 | }
|
20486 | });
|
20487 | this.player.ready(this.player.play);
|
20488 | });
|
20489 | QUnit.test('initial playing event with no preroll: 1+', function (assert) {
|
20490 | var _this2 = this;
|
20491 |
|
20492 | var done = assert.async();
|
20493 | var playingEvents = 0;
|
20494 | this.player.on('playing', function () {
|
20495 | playingEvents++;
|
20496 | });
|
20497 | this.player.on(['error', 'aderror'], function () {
|
20498 | assert.ok(false, 'no errors');
|
20499 | done();
|
20500 | });
|
20501 | this.player.on('timeupdate', function () {
|
20502 | if (_this2.player.currentTime() > 1) {
|
20503 | assert.ok(playingEvents >= 1, '1+ playing events');
|
20504 | done();
|
20505 | }
|
20506 | });
|
20507 | this.player.ready(this.player.play);
|
20508 | });
|
20509 | QUnit.test('no ended event at start if video with no preroll', function (assert) {
|
20510 | var _this3 = this;
|
20511 |
|
20512 | var done = assert.async();
|
20513 | var endedEvents = 0;
|
20514 | this.player.on('ended', function () {
|
20515 | endedEvents++;
|
20516 | });
|
20517 | this.player.on(['error', 'aderror'], function () {
|
20518 | assert.ok(false, 'no errors');
|
20519 | done();
|
20520 | });
|
20521 | this.player.on('timeupdate', function () {
|
20522 | if (_this3.player.currentTime() > 1) {
|
20523 | assert.equal(endedEvents, 0, 'no ended events');
|
20524 | done();
|
20525 | }
|
20526 | });
|
20527 | this.player.ready(this.player.play);
|
20528 | });
|
20529 | QUnit.test('initial loadstart event with no preroll: one please', function (assert) {
|
20530 | var _this4 = this;
|
20531 |
|
20532 | var done = assert.async();
|
20533 | var loadstartEvents = 0;
|
20534 | this.player.on('loadstart', function () {
|
20535 | loadstartEvents++;
|
20536 | });
|
20537 | this.player.on(['error', 'aderror'], function () {
|
20538 | assert.ok(false, 'no errors');
|
20539 | done();
|
20540 | });
|
20541 | this.player.on('timeupdate', function () {
|
20542 | if (_this4.player.currentTime() > 1) {
|
20543 | assert.equal(loadstartEvents, 1, '1 loadstart event');
|
20544 | done();
|
20545 | }
|
20546 | });
|
20547 | this.player.ready(this.player.play);
|
20548 | });
|
20549 |
|
20550 | |
20551 |
|
20552 |
|
20553 |
|
20554 |
|
20555 |
|
20556 |
|
20557 |
|
20558 |
|
20559 | QUnit.module('Events and Postrolls', {
|
20560 | beforeEach: function beforeEach() {
|
20561 | this.video = document_1.createElement('video');
|
20562 | this.fixture = document_1.querySelector('#qunit-fixture');
|
20563 | this.fixture.appendChild(this.video);
|
20564 | this.player = videojs$1(this.video);
|
20565 | this.player.exampleAds({
|
20566 | adServerUrl: '/test/integration/lib/inventory.json',
|
20567 | playPreroll: false,
|
20568 | playMidroll: false
|
20569 | });
|
20570 | this.player.src({
|
20571 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
20572 | type: 'video/webm'
|
20573 | });
|
20574 |
|
20575 | this.player.muted(true);
|
20576 | },
|
20577 | afterEach: function afterEach() {
|
20578 | this.player.dispose();
|
20579 | }
|
20580 | });
|
20581 | QUnit.test('ended event and postrolls: 0 before postroll, 1 after', function (assert) {
|
20582 | var _this = this;
|
20583 |
|
20584 | var done = assert.async();
|
20585 | var beforePostroll = true;
|
20586 | var endedBeforePostroll = 0;
|
20587 | var endedAfterPostroll = 0;
|
20588 | this.player.on('adend', function () {
|
20589 | beforePostroll = false;
|
20590 | });
|
20591 | this.player.on('ended', function () {
|
20592 | if (beforePostroll) {
|
20593 | endedBeforePostroll++;
|
20594 | } else {
|
20595 | endedAfterPostroll++;
|
20596 | }
|
20597 | });
|
20598 | this.player.on(['error', 'aderror'], function () {
|
20599 | assert.ok(false, 'no errors');
|
20600 | done();
|
20601 | });
|
20602 | this.player.one('ended', function () {
|
20603 | if (beforePostroll) {
|
20604 | assert.ok(false, 'ended before postroll!');
|
20605 | }
|
20606 |
|
20607 |
|
20608 | setTimeout(function () {
|
20609 | assert.equal(endedBeforePostroll, 0, 'no ended before postroll');
|
20610 | assert.equal(endedAfterPostroll, 1, 'exactly one ended after postroll');
|
20611 | done();
|
20612 | }, 1000);
|
20613 | });
|
20614 | this.player.ready(function () {
|
20615 | _this.player.play();
|
20616 |
|
20617 | _this.player.currentTime(46);
|
20618 | });
|
20619 | });
|
20620 | QUnit.test('Event prefixing and postrolls', function (assert) {
|
20621 | var _this2 = this;
|
20622 |
|
20623 | var done = assert.async();
|
20624 | var beforePostroll = true;
|
20625 | var seenInAdMode = [];
|
20626 | var seenInContentResuming = [];
|
20627 | var seenOutsideAdModeBefore = [];
|
20628 | var seenOutsideAdModeAfter = [];
|
20629 | this.player.on('adend', function () {
|
20630 | beforePostroll = false;
|
20631 | });
|
20632 | var events = ['suspend', 'abort', 'error', 'emptied', 'stalled', 'canplay', 'canplaythrough', 'waiting', 'seeking', 'durationchange', 'progress', 'pause', 'ratechange', 'volumechange', 'firstplay', 'suspend', 'playing', 'ended'];
|
20633 | events = events.concat(events.map(function (e) {
|
20634 | return 'ad' + e;
|
20635 | }));
|
20636 | events = events.concat(events.map(function (e) {
|
20637 | return 'content' + e;
|
20638 | }));
|
20639 | this.player.on(events, function (e) {
|
20640 | if (e.type === 'contentended') {
|
20641 | return;
|
20642 | }
|
20643 |
|
20644 | var str = e.type;
|
20645 |
|
20646 | if (_this2.player.ads.isInAdMode()) {
|
20647 | if (_this2.player.ads.isContentResuming()) {
|
20648 | seenInContentResuming.push(str);
|
20649 | } else {
|
20650 | seenInAdMode.push(str);
|
20651 | }
|
20652 | } else if (beforePostroll) {
|
20653 | seenOutsideAdModeBefore.push(str);
|
20654 | } else {
|
20655 | seenOutsideAdModeAfter.push(str);
|
20656 | }
|
20657 | });
|
20658 | this.player.on(['error', 'aderror'], function () {
|
20659 | assert.ok(false, 'no errors');
|
20660 | done();
|
20661 | });
|
20662 | this.player.on('ended', function () {
|
20663 | seenOutsideAdModeBefore.forEach(function (event) {
|
20664 | assert.ok(!/^ad/.test(event), event + ' has no ad prefix before postroll');
|
20665 | assert.ok(!/^content/.test(event), event + ' has no content prefix before postroll');
|
20666 | });
|
20667 | seenInAdMode.forEach(function (event) {
|
20668 | assert.ok(/^ad/.test(event), event + ' has ad prefix during postroll');
|
20669 | });
|
20670 | seenInContentResuming.forEach(function (event) {
|
20671 | assert.ok(/^content/.test(event), event + ' has content prefix during postroll');
|
20672 | });
|
20673 | seenOutsideAdModeAfter.forEach(function (event) {
|
20674 | assert.ok(!/^ad/.test(event), event + ' has no ad prefix after postroll');
|
20675 | assert.ok(!/^content/.test(event), event + ' has no content prefix after postroll');
|
20676 | });
|
20677 | done();
|
20678 | });
|
20679 |
|
20680 | this.player.one('playing', function () {
|
20681 | _this2.player.currentTime(46);
|
20682 | });
|
20683 | this.player.ready(this.player.play);
|
20684 | });
|
20685 |
|
20686 | |
20687 |
|
20688 |
|
20689 |
|
20690 |
|
20691 |
|
20692 |
|
20693 |
|
20694 |
|
20695 | QUnit.module('Events and Prerolls', {
|
20696 | beforeEach: function beforeEach() {
|
20697 | this.video = document_1.createElement('video');
|
20698 | this.fixture = document_1.querySelector('#qunit-fixture');
|
20699 | this.fixture.appendChild(this.video);
|
20700 | this.player = videojs$1(this.video);
|
20701 | this.player.exampleAds({
|
20702 | adServerUrl: '/test/integration/lib/inventory.json'
|
20703 | });
|
20704 | this.player.src({
|
20705 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
20706 | type: 'video/webm'
|
20707 | });
|
20708 |
|
20709 | this.player.muted(true);
|
20710 | },
|
20711 | afterEach: function afterEach() {
|
20712 | this.player.dispose();
|
20713 | }
|
20714 | });
|
20715 | QUnit.test('playing event and prerolls: 0 before preroll, 1+ after', function (assert) {
|
20716 | var _this = this;
|
20717 |
|
20718 | var done = assert.async();
|
20719 | var beforePreroll = true;
|
20720 | var playingBeforePreroll = 0;
|
20721 | var playingAfterPreroll = 0;
|
20722 | this.player.on('adend', function () {
|
20723 | beforePreroll = false;
|
20724 | });
|
20725 | this.player.on('playing', function () {
|
20726 | if (beforePreroll) {
|
20727 | playingBeforePreroll++;
|
20728 | } else {
|
20729 | playingAfterPreroll++;
|
20730 | }
|
20731 | });
|
20732 | this.player.on(['error', 'aderror'], function () {
|
20733 | assert.ok(false, 'no errors');
|
20734 | done();
|
20735 | });
|
20736 | this.player.on('timeupdate', function () {
|
20737 | if (_this.player.currentTime() > 1) {
|
20738 | assert.equal(playingBeforePreroll, 0, 'no playing before preroll');
|
20739 | assert.ok(playingAfterPreroll > 0, 'playing after preroll');
|
20740 | done();
|
20741 | }
|
20742 | });
|
20743 | this.player.ready(this.player.play);
|
20744 | });
|
20745 | QUnit.test('ended event and prerolls: not even once', function (assert) {
|
20746 | var _this2 = this;
|
20747 |
|
20748 | var done = assert.async();
|
20749 | var ended = 0;
|
20750 | this.player.on('ended', function () {
|
20751 | ended++;
|
20752 | });
|
20753 | this.player.on(['error', 'aderror'], function () {
|
20754 | assert.ok(false, 'no errors');
|
20755 | done();
|
20756 | });
|
20757 | this.player.on('timeupdate', function () {
|
20758 | if (_this2.player.currentTime() > 1) {
|
20759 | assert.equal(ended, 0, 'no ended events');
|
20760 | done();
|
20761 | }
|
20762 | });
|
20763 | this.player.ready(this.player.play);
|
20764 | });
|
20765 | QUnit.test('loadstart event and prerolls: 1 before preroll, 0 after', function (assert) {
|
20766 | var _this3 = this;
|
20767 |
|
20768 | var done = assert.async();
|
20769 | var beforePreroll = true;
|
20770 | var loadstartBeforePreroll = 0;
|
20771 | var loadstartAfterPreroll = 0;
|
20772 | this.player.on('adend', function () {
|
20773 | beforePreroll = false;
|
20774 | });
|
20775 | this.player.on('loadstart', function (e) {
|
20776 | if (beforePreroll) {
|
20777 | loadstartBeforePreroll++;
|
20778 | } else {
|
20779 | loadstartAfterPreroll++;
|
20780 | }
|
20781 | });
|
20782 | this.player.on(['error', 'aderror'], function () {
|
20783 | assert.ok(false, 'no errors');
|
20784 | done();
|
20785 | });
|
20786 | this.player.on('timeupdate', function (e) {
|
20787 | if (_this3.player.currentTime() > 1) {
|
20788 | assert.equal(loadstartBeforePreroll, 1, 'loadstart before preroll');
|
20789 | assert.equal(loadstartAfterPreroll, 0, 'loadstart after preroll');
|
20790 | done();
|
20791 | }
|
20792 | });
|
20793 | this.player.ready(this.player.play);
|
20794 | });
|
20795 | QUnit.test('loadedmetadata event and prerolls: 1 before preroll, 0 after', function (assert) {
|
20796 | var _this4 = this;
|
20797 |
|
20798 | var done = assert.async();
|
20799 | var beforePreroll = true;
|
20800 | var loadedmetadataBeforePreroll = 0;
|
20801 | var loadedmetadataAfterPreroll = 0;
|
20802 | this.player.on('adend', function () {
|
20803 | beforePreroll = false;
|
20804 | });
|
20805 | this.player.on('loadedmetadata', function (e) {
|
20806 | if (beforePreroll) {
|
20807 | loadedmetadataBeforePreroll++;
|
20808 | } else {
|
20809 | loadedmetadataAfterPreroll++;
|
20810 | }
|
20811 | });
|
20812 | this.player.on(['error', 'aderror'], function () {
|
20813 | assert.ok(false, 'no errors');
|
20814 | done();
|
20815 | });
|
20816 | this.player.on('timeupdate', function (e) {
|
20817 | if (_this4.player.currentTime() > 1) {
|
20818 | assert.equal(loadedmetadataBeforePreroll, 1, 'loadedmetadata before preroll');
|
20819 | assert.equal(loadedmetadataAfterPreroll, 0, 'loadedmetadata after preroll');
|
20820 | done();
|
20821 | }
|
20822 | });
|
20823 | this.player.ready(this.player.play);
|
20824 | });
|
20825 | QUnit.test('loadeddata event and prerolls: 1 before preroll, 0 after', function (assert) {
|
20826 | var _this5 = this;
|
20827 |
|
20828 | var done = assert.async();
|
20829 | var beforePreroll = true;
|
20830 | var loadeddataBeforePreroll = 0;
|
20831 | var loadeddataAfterPreroll = 0;
|
20832 | this.player.on('adend', function () {
|
20833 | beforePreroll = false;
|
20834 | });
|
20835 | this.player.on('loadeddata', function (e) {
|
20836 | if (beforePreroll) {
|
20837 | loadeddataBeforePreroll++;
|
20838 | } else {
|
20839 | loadeddataAfterPreroll++;
|
20840 | }
|
20841 | });
|
20842 | this.player.on(['error', 'aderror'], function () {
|
20843 | assert.ok(false, 'no errors');
|
20844 | done();
|
20845 | });
|
20846 | this.player.on('timeupdate', function (e) {
|
20847 | if (_this5.player.currentTime() > 1) {
|
20848 | assert.equal(loadeddataBeforePreroll, 1, 'loadeddata before preroll');
|
20849 | assert.equal(loadeddataAfterPreroll, 0, 'loadeddata after preroll');
|
20850 | done();
|
20851 | }
|
20852 | });
|
20853 | this.player.ready(this.player.play);
|
20854 | });
|
20855 | QUnit.test('play event and prerolls: 1 before preroll, 0 after', function (assert) {
|
20856 | var _this6 = this;
|
20857 |
|
20858 | var done = assert.async();
|
20859 | var beforePreroll = true;
|
20860 | var playBeforePreroll = 0;
|
20861 | var playAfterPreroll = 0;
|
20862 | this.player.on('adend', function () {
|
20863 | beforePreroll = false;
|
20864 | });
|
20865 | this.player.on('play', function () {
|
20866 | if (beforePreroll) {
|
20867 | playBeforePreroll++;
|
20868 | } else {
|
20869 | playAfterPreroll++;
|
20870 | }
|
20871 | });
|
20872 | this.player.on(['error', 'aderror'], function () {
|
20873 | assert.ok(false, 'no errors');
|
20874 | done();
|
20875 | });
|
20876 | this.player.on('timeupdate', function () {
|
20877 | if (_this6.player.currentTime() > 1) {
|
20878 |
|
20879 | assert.equal(playBeforePreroll, 1, 'play before preroll');
|
20880 | assert.equal(playAfterPreroll, 0, 'play after preroll');
|
20881 | done();
|
20882 | }
|
20883 | });
|
20884 | this.player.ready(this.player.play);
|
20885 | });
|
20886 | QUnit.test('Event prefixing and prerolls', function (assert) {
|
20887 | var _this7 = this;
|
20888 |
|
20889 | var done = assert.async();
|
20890 | var beforePreroll = true;
|
20891 | var seenInAdMode = [];
|
20892 | var seenInContentResuming = [];
|
20893 | var seenOutsideAdModeBefore = [];
|
20894 | var seenOutsideAdModeAfter = [];
|
20895 | this.player.on('adend', function () {
|
20896 | beforePreroll = false;
|
20897 | });
|
20898 | var events = ['suspend', 'abort', 'error', 'emptied', 'stalled', 'canplay', 'canplaythrough', 'waiting', 'seeking', 'durationchange', 'timeupdate', 'progress', 'pause', 'ratechange', 'volumechange', 'firstplay', 'suspend'];
|
20899 | events = events.concat(events.map(function (e) {
|
20900 | return 'ad' + e;
|
20901 | }));
|
20902 | events = events.concat(events.map(function (e) {
|
20903 | return 'content' + e;
|
20904 | }));
|
20905 | this.player.on(events, function (e) {
|
20906 | var str = e.type;
|
20907 |
|
20908 | if (_this7.player.ads.isInAdMode()) {
|
20909 | if (_this7.player.ads.isContentResuming()) {
|
20910 | seenInContentResuming.push(str);
|
20911 | } else {
|
20912 | seenInAdMode.push(str);
|
20913 | }
|
20914 | } else if (beforePreroll) {
|
20915 | seenOutsideAdModeBefore.push(str);
|
20916 | } else {
|
20917 | seenOutsideAdModeAfter.push(str);
|
20918 | }
|
20919 | });
|
20920 | this.player.on(['error', 'aderror'], function () {
|
20921 | assert.ok(false, 'no errors');
|
20922 | done();
|
20923 | });
|
20924 | this.player.on('timeupdate', function () {
|
20925 | if (_this7.player.currentTime() > 0) {
|
20926 | seenOutsideAdModeBefore.forEach(function (event) {
|
20927 | assert.ok(!/^ad/.test(event), event + ' has no ad prefix before preroll');
|
20928 | assert.ok(!/^content/.test(event), event + ' has no content prefix before preroll');
|
20929 | });
|
20930 | seenInAdMode.forEach(function (event) {
|
20931 | assert.ok(/^ad/.test(event), event + ' has ad prefix during preroll');
|
20932 | });
|
20933 | seenInContentResuming.forEach(function (event) {
|
20934 | assert.ok(/^content/.test(event), event + ' has content prefix during preroll');
|
20935 | });
|
20936 | seenOutsideAdModeAfter.forEach(function (event) {
|
20937 | assert.ok(!/^ad/.test(event), event + ' has no ad prefix after preroll');
|
20938 | assert.ok(!/^content/.test(event), event + ' has no content prefix after preroll');
|
20939 | });
|
20940 | done();
|
20941 | }
|
20942 | });
|
20943 | this.player.ready(this.player.play);
|
20944 | });
|
20945 |
|
20946 | QUnit.module('Ad Macros', sharedModuleHooks({}));
|
20947 | QUnit.test('player.id', function (assert) {
|
20948 | this.player.options_['data-player'] = '12345';
|
20949 | var result = this.player.ads.adMacroReplacement('{player.id}');
|
20950 | assert.equal(result, '12345');
|
20951 | });
|
20952 | QUnit.test('player dimensions', function (assert) {
|
20953 | this.player.options_['data-player'] = '12345';
|
20954 | this.player.dimensions(200, 100);
|
20955 | var resultHeight = this.player.ads.adMacroReplacement('{player.height}');
|
20956 | var resultWidth = this.player.ads.adMacroReplacement('{player.width}');
|
20957 | assert.equal(resultHeight, 100, 'player.height was replaced');
|
20958 | assert.equal(resultWidth, 200, 'player.width was replaced');
|
20959 | });
|
20960 | QUnit.test('mediainfo', function (assert) {
|
20961 |
|
20962 | this.player.mediainfo = {
|
20963 | id: 1,
|
20964 | name: 2,
|
20965 | description: 3,
|
20966 | tags: 4,
|
20967 | reference_id: 5,
|
20968 | duration: 6,
|
20969 | ad_keys: 7
|
20970 | };
|
20971 |
|
20972 |
|
20973 | var result = this.player.ads.adMacroReplacement('{mediainfo.id}' + '{mediainfo.name}' + '{mediainfo.description}' + '{mediainfo.tags}' + '{mediainfo.reference_id}' + '{mediainfo.duration}' + '{mediainfo.ad_keys}');
|
20974 | assert.equal(result, '1234567');
|
20975 | });
|
20976 | QUnit.test('playlistinfo', function (assert) {
|
20977 | this.player.playlistinfo = {
|
20978 | id: 1,
|
20979 | name: 2
|
20980 | };
|
20981 | var result = this.player.ads.adMacroReplacement('{playlistinfo.id}' + '{playlistinfo.name}');
|
20982 | assert.equal(result, '12');
|
20983 | });
|
20984 | QUnit.test('player.duration', function (assert) {
|
20985 | this.player.duration = function () {
|
20986 | return 5;
|
20987 | };
|
20988 |
|
20989 | var result = this.player.ads.adMacroReplacement('{player.duration}');
|
20990 | assert.equal(result, 5);
|
20991 | });
|
20992 | QUnit.test('player.pageUrl', function (assert) {
|
20993 | var result = this.player.ads.adMacroReplacement('{player.pageUrl}');
|
20994 | assert.equal(result, document_1.referrer, 'tests run in iframe, so referrer should be used');
|
20995 | });
|
20996 | QUnit.test('timestamp', function (assert) {
|
20997 | this.player.duration = function () {
|
20998 | return 5;
|
20999 | };
|
21000 |
|
21001 | var result = this.player.ads.adMacroReplacement('{timestamp}');
|
21002 | assert.equal(result, new Date().getTime());
|
21003 | });
|
21004 | QUnit.test('document.referrer', function (assert) {
|
21005 | var result = this.player.ads.adMacroReplacement('{document.referrer}');
|
21006 | assert.equal(result, document_1.referrer, '"' + result + '" was the document.referrer');
|
21007 | });
|
21008 | QUnit.test('window.location.href', function (assert) {
|
21009 | var result = this.player.ads.adMacroReplacement('{window.location.href}');
|
21010 | assert.equal(result, window_1.location.href, '"' + result + '" was the window.location.href');
|
21011 | });
|
21012 | QUnit.test('random', function (assert) {
|
21013 | var result = this.player.ads.adMacroReplacement('{random}');
|
21014 | assert.ok(result.match(/^\d+$/), '"' + result + '" is a random number');
|
21015 | });
|
21016 | QUnit.test('mediainfo.custom_fields', function (assert) {
|
21017 |
|
21018 | this.player.mediainfo = {
|
21019 | custom_fields: {
|
21020 | dog: 1,
|
21021 | cat: 2,
|
21022 | guinea_pig: 3
|
21023 | },
|
21024 | customFields: {
|
21025 | dog: 1,
|
21026 | cat: 2,
|
21027 | guinea_pig: 3
|
21028 | }
|
21029 | };
|
21030 |
|
21031 |
|
21032 | var result = this.player.ads.adMacroReplacement('{mediainfo.custom_fields.dog}' + '{mediainfo.custom_fields.cat}' + '{mediainfo.custom_fields.guinea_pig}' + '{mediainfo.customFields.dog}' + '{mediainfo.customFields.cat}' + '{mediainfo.customFields.guinea_pig}');
|
21033 | assert.equal(result, '123123');
|
21034 | });
|
21035 | QUnit.test('pageVariables', function (assert) {
|
21036 | window_1.animal = {
|
21037 | dog: 'Old Buddy',
|
21038 | cat: {
|
21039 | maineCoon: 'Huge the Cat',
|
21040 | champion: {
|
21041 | name: 'Champ'
|
21042 | }
|
21043 | }
|
21044 | };
|
21045 | window_1.bird = null;
|
21046 | window_1.isAwesome = true;
|
21047 |
|
21048 | window_1.foo = function () {};
|
21049 |
|
21050 | window_1.bar = {};
|
21051 | var result = this.player.ads.adMacroReplacement('Number: {pageVariable.scrollX}, ' + 'Boolean: {pageVariable.isAwesome}, ' + 'Null: {pageVariable.bird}, ' + 'Undefined: {pageVariable.thisDoesNotExist}, ' + 'Function: {pageVariable.foo}, ' + 'Object: {pageVariable.bar}, ' + 'Nested 2x: {pageVariable.animal.dog}, ' + 'Nested 3x: {pageVariable.animal.cat.maineCoon}, ' + 'Nested 4x: {pageVariable.animal.cat.champion.name}');
|
21052 | assert.equal(result, 'Number: 0, ' + 'Boolean: true, ' + 'Null: null, ' + 'Undefined: , ' + 'Function: , ' + 'Object: , ' + 'Nested 2x: Old Buddy, ' + 'Nested 3x: Huge the Cat, ' + 'Nested 4x: Champ');
|
21053 | });
|
21054 | QUnit.test('uriEncode', function (assert) {
|
21055 |
|
21056 | this.player.mediainfo = {
|
21057 | custom_fields: {
|
21058 | urlParam: '? &'
|
21059 | }
|
21060 | };
|
21061 |
|
21062 |
|
21063 | window_1.foo = '& ?';
|
21064 | var result = this.player.ads.adMacroReplacement('{mediainfo.custom_fields.urlParam}{pageVariable.foo}', true);
|
21065 | assert.equal(result, '%3F%20%26%26%20%3F');
|
21066 | });
|
21067 | QUnit.test('customMacros', function (assert) {
|
21068 | var result = this.player.ads.adMacroReplacement('The sky is {skyColor}. {exclamation}!', false, {
|
21069 | '{skyColor}': 'blue',
|
21070 | '{exclamation}': 'Hooray'
|
21071 | });
|
21072 | assert.equal(result, 'The sky is blue. Hooray!');
|
21073 | });
|
21074 | QUnit.test('default values', function (assert) {
|
21075 |
|
21076 | this.player.mediainfo = {
|
21077 | customFields: {
|
21078 | set: 1
|
21079 | },
|
21080 | reference_id: 'abc'
|
21081 | };
|
21082 | /* eslint-enable camelcase */
|
21083 |
|
21084 | window_1.testvar1 = 'a';
|
21085 | assert.equal(this.player.ads.adMacroReplacement('{mediainfo.customFields.set=other}'), '1', 'custom fields: set value is not replaced by default');
|
21086 | assert.equal(this.player.ads.adMacroReplacement('{mediainfo.customFields.unsset=2}'), '2', 'custom fields: unset value is replaced by default');
|
21087 | assert.equal(this.player.ads.adMacroReplacement('{mediainfo.ad_keys=key=value}'), 'key=value', 'equals in default value preserved');
|
21088 | assert.equal(this.player.ads.adMacroReplacement('{mediainfo.reference_id=Other}'), 'abc', 'mediainfo: set value is not replaced by default');
|
21089 | assert.equal(this.player.ads.adMacroReplacement('{mediainfo.description=xyz}'), 'xyz', 'mediainfo: unset value is replaced by default');
|
21090 | assert.equal(this.player.ads.adMacroReplacement('{pageVariable.testvar1=b}'), 'a', 'pageVariable: set value is not replaced by default');
|
21091 | assert.equal(this.player.ads.adMacroReplacement('{pageVariable.testvar2=c}'), 'c', 'pageVariable: unset value is replaced by default');
|
21092 | });
|
21093 |
|
21094 | QUnit.module('Integration: play middleware', {
|
21095 | beforeEach: function beforeEach() {
|
21096 | this.video = document_1.createElement('video');
|
21097 | this.fixture = document_1.querySelector('#qunit-fixture');
|
21098 | this.fixture.appendChild(this.video);
|
21099 | this.player = videojs$1(this.video);
|
21100 | this.player.exampleAds({
|
21101 | adServerUrl: '/test/integration/lib/inventory.json'
|
21102 | });
|
21103 |
|
21104 | this.player.muted(true);
|
21105 | },
|
21106 | afterEach: function afterEach() {
|
21107 | this.player.dispose();
|
21108 | }
|
21109 | });
|
21110 | QUnit.test('the `_playRequested` flag is set on the first play request', function (assert) {
|
21111 | var _this = this;
|
21112 |
|
21113 | var done = assert.async();
|
21114 | var finish;
|
21115 | this.player.src({
|
21116 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
21117 | type: 'video/webm'
|
21118 | });
|
21119 |
|
21120 | var onAdstart = function onAdstart() {
|
21121 | assert.strictEqual(_this.player.ads._playRequested, true, '_playRequested is true when the play method is used');
|
21122 | finish();
|
21123 | };
|
21124 |
|
21125 | var onTimeupdate = function onTimeupdate() {
|
21126 | if (_this.player.currentTime() > 0) {
|
21127 | assert.strictEqual(_this.player.ads._playRequested, true, '_playRequested is true when the play method is used');
|
21128 | finish();
|
21129 | }
|
21130 | };
|
21131 |
|
21132 | finish = function finish() {
|
21133 | _this.player.off('adstart', onAdstart);
|
21134 |
|
21135 | _this.player.off('timeupdate', onTimeupdate);
|
21136 |
|
21137 | done();
|
21138 | };
|
21139 |
|
21140 |
|
21141 | this.player.on('adstart', onAdstart);
|
21142 |
|
21143 | this.player.on('timeupdate', onTimeupdate);
|
21144 | this.player.ready(this.player.play);
|
21145 | });
|
21146 | QUnit.test('blocks calls to play to wait for prerolls if adsready BEFORE play', function (assert) {
|
21147 | var _this2 = this;
|
21148 |
|
21149 | var done = assert.async();
|
21150 | var techPlaySpy = sinon.spy(this.video, 'play');
|
21151 | var playEventSpy = sinon.spy();
|
21152 | var seenAdsReady = false;
|
21153 | var finish;
|
21154 | this.player.on('play', playEventSpy);
|
21155 | this.player.on('adsready', function () {
|
21156 | seenAdsReady = true;
|
21157 | });
|
21158 |
|
21159 | var onTimeupdate = function onTimeupdate() {
|
21160 | if (_this2.player.currentTime() > 0) {
|
21161 | assert.strictEqual(techPlaySpy.callCount, 0, "tech play shouldn't be called while waiting for prerolls");
|
21162 | assert.strictEqual(playEventSpy.callCount, 1, 'play event should be triggered');
|
21163 | finish();
|
21164 | }
|
21165 | };
|
21166 |
|
21167 | var onAdstart = function onAdstart() {
|
21168 |
|
21169 | window_1.setTimeout(function () {
|
21170 | assert.strictEqual(techPlaySpy.callCount, 0, "tech play shouldn't be called while waiting for prerolls");
|
21171 | assert.strictEqual(playEventSpy.callCount, 1, 'play event should be triggered');
|
21172 | finish();
|
21173 | }, 1);
|
21174 | };
|
21175 |
|
21176 | var onError = function onError() {
|
21177 | assert.ok(false, 'no errors, or adtimeout');
|
21178 | finish();
|
21179 | };
|
21180 |
|
21181 | finish = function finish() {
|
21182 | _this2.player.off('adstart', onAdstart);
|
21183 |
|
21184 | _this2.player.off('timeupdate', onTimeupdate);
|
21185 |
|
21186 | _this2.player.off(['error', 'aderror', 'adtimeout'], onError);
|
21187 |
|
21188 | done();
|
21189 | };
|
21190 |
|
21191 |
|
21192 | this.player.on('adstart', onAdstart);
|
21193 |
|
21194 | this.player.on('timeupdate', onTimeupdate);
|
21195 | this.player.on(['error', 'aderror', 'adtimeout'], onError);
|
21196 | this.player.src({
|
21197 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
21198 | type: 'video/webm'
|
21199 | });
|
21200 | this.player.ready(function () {
|
21201 | if (seenAdsReady) {
|
21202 | _this2.player.play();
|
21203 | } else {
|
21204 | _this2.player.on('adsready', _this2.player.play);
|
21205 | }
|
21206 | });
|
21207 | });
|
21208 | QUnit.test('stops blocking play when an ad is playing', function (assert) {
|
21209 | var _this3 = this;
|
21210 |
|
21211 | var done = assert.async();
|
21212 | this.player.on('adstart', function () {
|
21213 | assert.strictEqual(_this3.player.ads._shouldBlockPlay, true);
|
21214 | });
|
21215 |
|
21216 | this.player.on('ads-ad-started', function () {
|
21217 | assert.strictEqual(_this3.player.ads._shouldBlockPlay, false, 'should stop blocking once in an adbreak');
|
21218 | done();
|
21219 | });
|
21220 | this.player.src({
|
21221 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
21222 | type: 'video/webm'
|
21223 | });
|
21224 | this.player.ready(this.player.play);
|
21225 | });
|
21226 | QUnit.test("playMiddleware doesn\'t block play in content playback", function (assert) {
|
21227 | var _this4 = this;
|
21228 |
|
21229 | var done = assert.async();
|
21230 | this.player.on('adstart', function () {
|
21231 | assert.strictEqual(_this4.player.ads._shouldBlockPlay, true);
|
21232 | });
|
21233 |
|
21234 | var onTimeupdate = function onTimeupdate() {
|
21235 | if (_this4.player.currentTime() > 0) {
|
21236 | assert.strictEqual(_this4.player.ads._shouldBlockPlay, false, 'should stop blocking in content');
|
21237 |
|
21238 | _this4.player.off('timeupdate', onTimeupdate);
|
21239 |
|
21240 | done();
|
21241 | }
|
21242 | };
|
21243 |
|
21244 |
|
21245 | this.player.on('timeupdate', onTimeupdate);
|
21246 | this.player.src({
|
21247 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
21248 | type: 'video/webm'
|
21249 | });
|
21250 | this.player.ready(this.player.play);
|
21251 | });
|
21252 | QUnit.test("don't trigger play event if another middleware terminates", function (assert) {
|
21253 | var done = assert.async();
|
21254 | var fixture = document_1.querySelector('#qunit-fixture');
|
21255 | var vid = document_1.createElement('video');
|
21256 | var playSpy = sinon.spy();
|
21257 | var shouldTerminate = true;
|
21258 |
|
21259 | var anotherMiddleware = function anotherMiddleware(player) {
|
21260 | return {
|
21261 | setSource: function setSource(srcObj, next) {
|
21262 | next(null, srcObj);
|
21263 | },
|
21264 | callPlay: function callPlay() {
|
21265 | if (shouldTerminate === true) {
|
21266 | shouldTerminate = false;
|
21267 | return videojs$1.middleware.TERMINATOR;
|
21268 | }
|
21269 | },
|
21270 | play: function play(terminated, value) {}
|
21271 | };
|
21272 | };
|
21273 |
|
21274 |
|
21275 | videojs$1.use('video/webm', anotherMiddleware);
|
21276 |
|
21277 | fixture.appendChild(vid);
|
21278 | var localPlayer = videojs$1(vid);
|
21279 |
|
21280 | localPlayer.on('nopreroll', function () {
|
21281 | localPlayer.ready(localPlayer.play);
|
21282 | });
|
21283 |
|
21284 | localPlayer.exampleAds({
|
21285 | adServerUrl: '/test/integration/lib/inventory.json',
|
21286 | playPreroll: false
|
21287 | });
|
21288 | localPlayer.on('play', playSpy);
|
21289 |
|
21290 | localPlayer.setTimeout(function () {
|
21291 | assert.strictEqual(localPlayer.ads._playBlocked, false, 'play should not have been blocked');
|
21292 | assert.strictEqual(playSpy.callCount, 0, 'play event should not be triggered');
|
21293 | done();
|
21294 | }, 1);
|
21295 | localPlayer.src({
|
21296 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
21297 | type: 'video/webm'
|
21298 | });
|
21299 | });
|
21300 |
|
21301 | var cov_260ini1tec = function () {
|
21302 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/snapshot.js',
|
21303 | hash = 'ee6cc02f4d2c6deb67cb5ec0df167cd251b1d45d',
|
21304 | Function = function () {}.constructor,
|
21305 | global = new Function('return this')(),
|
21306 | gcv = '__coverage__',
|
21307 | coverageData = {
|
21308 | path: '/Users/poneill/dev/videojs-contrib-ads/src/snapshot.js',
|
21309 | statementMap: {
|
21310 | '0': {
|
21311 | start: {
|
21312 | line: 20,
|
21313 | column: 2
|
21314 | },
|
21315 | end: {
|
21316 | line: 29,
|
21317 | column: 3
|
21318 | }
|
21319 | },
|
21320 | '1': {
|
21321 | start: {
|
21322 | line: 22,
|
21323 | column: 4
|
21324 | },
|
21325 | end: {
|
21326 | line: 26,
|
21327 | column: 5
|
21328 | }
|
21329 | },
|
21330 | '2': {
|
21331 | start: {
|
21332 | line: 23,
|
21333 | column: 6
|
21334 | },
|
21335 | end: {
|
21336 | line: 23,
|
21337 | column: 68
|
21338 | }
|
21339 | },
|
21340 | '3': {
|
21341 | start: {
|
21342 | line: 25,
|
21343 | column: 6
|
21344 | },
|
21345 | end: {
|
21346 | line: 25,
|
21347 | column: 41
|
21348 | }
|
21349 | },
|
21350 | '4': {
|
21351 | start: {
|
21352 | line: 28,
|
21353 | column: 4
|
21354 | },
|
21355 | end: {
|
21356 | line: 28,
|
21357 | column: 39
|
21358 | }
|
21359 | },
|
21360 | '5': {
|
21361 | start: {
|
21362 | line: 31,
|
21363 | column: 15
|
21364 | },
|
21365 | end: {
|
21366 | line: 31,
|
21367 | column: 36
|
21368 | }
|
21369 | },
|
21370 | '6': {
|
21371 | start: {
|
21372 | line: 32,
|
21373 | column: 17
|
21374 | },
|
21375 | end: {
|
21376 | line: 32,
|
21377 | column: 61
|
21378 | }
|
21379 | },
|
21380 | '7': {
|
21381 | start: {
|
21382 | line: 33,
|
21383 | column: 27
|
21384 | },
|
21385 | end: {
|
21386 | line: 33,
|
21387 | column: 29
|
21388 | }
|
21389 | },
|
21390 | '8': {
|
21391 | start: {
|
21392 | line: 34,
|
21393 | column: 25
|
21394 | },
|
21395 | end: {
|
21396 | line: 41,
|
21397 | column: 3
|
21398 | }
|
21399 | },
|
21400 | '9': {
|
21401 | start: {
|
21402 | line: 43,
|
21403 | column: 2
|
21404 | },
|
21405 | end: {
|
21406 | line: 45,
|
21407 | column: 3
|
21408 | }
|
21409 | },
|
21410 | '10': {
|
21411 | start: {
|
21412 | line: 44,
|
21413 | column: 4
|
21414 | },
|
21415 | end: {
|
21416 | line: 44,
|
21417 | column: 54
|
21418 | }
|
21419 | },
|
21420 | '11': {
|
21421 | start: {
|
21422 | line: 47,
|
21423 | column: 2
|
21424 | },
|
21425 | end: {
|
21426 | line: 55,
|
21427 | column: 3
|
21428 | }
|
21429 | },
|
21430 | '12': {
|
21431 | start: {
|
21432 | line: 48,
|
21433 | column: 18
|
21434 | },
|
21435 | end: {
|
21436 | line: 48,
|
21437 | column: 27
|
21438 | }
|
21439 | },
|
21440 | '13': {
|
21441 | start: {
|
21442 | line: 50,
|
21443 | column: 4
|
21444 | },
|
21445 | end: {
|
21446 | line: 53,
|
21447 | column: 7
|
21448 | }
|
21449 | },
|
21450 | '14': {
|
21451 | start: {
|
21452 | line: 54,
|
21453 | column: 4
|
21454 | },
|
21455 | end: {
|
21456 | line: 54,
|
21457 | column: 28
|
21458 | }
|
21459 | },
|
21460 | '15': {
|
21461 | start: {
|
21462 | line: 56,
|
21463 | column: 2
|
21464 | },
|
21465 | end: {
|
21466 | line: 56,
|
21467 | column: 53
|
21468 | }
|
21469 | },
|
21470 | '16': {
|
21471 | start: {
|
21472 | line: 58,
|
21473 | column: 2
|
21474 | },
|
21475 | end: {
|
21476 | line: 58,
|
21477 | column: 24
|
21478 | }
|
21479 | },
|
21480 | '17': {
|
21481 | start: {
|
21482 | line: 68,
|
21483 | column: 25
|
21484 | },
|
21485 | end: {
|
21486 | line: 68,
|
21487 | column: 44
|
21488 | }
|
21489 | },
|
21490 | '18': {
|
21491 | start: {
|
21492 | line: 70,
|
21493 | column: 2
|
21494 | },
|
21495 | end: {
|
21496 | line: 72,
|
21497 | column: 3
|
21498 | }
|
21499 | },
|
21500 | '19': {
|
21501 | start: {
|
21502 | line: 71,
|
21503 | column: 4
|
21504 | },
|
21505 | end: {
|
21506 | line: 71,
|
21507 | column: 24
|
21508 | }
|
21509 | },
|
21510 | '20': {
|
21511 | start: {
|
21512 | line: 74,
|
21513 | column: 2
|
21514 | },
|
21515 | end: {
|
21516 | line: 79,
|
21517 | column: 3
|
21518 | }
|
21519 | },
|
21520 | '21': {
|
21521 | start: {
|
21522 | line: 75,
|
21523 | column: 4
|
21524 | },
|
21525 | end: {
|
21526 | line: 75,
|
21527 | column: 50
|
21528 | }
|
21529 | },
|
21530 | '22': {
|
21531 | start: {
|
21532 | line: 76,
|
21533 | column: 4
|
21534 | },
|
21535 | end: {
|
21536 | line: 76,
|
21537 | column: 31
|
21538 | }
|
21539 | },
|
21540 | '23': {
|
21541 | start: {
|
21542 | line: 77,
|
21543 | column: 4
|
21544 | },
|
21545 | end: {
|
21546 | line: 77,
|
21547 | column: 15
|
21548 | }
|
21549 | },
|
21550 | '24': {
|
21551 | start: {
|
21552 | line: 78,
|
21553 | column: 4
|
21554 | },
|
21555 | end: {
|
21556 | line: 78,
|
21557 | column: 11
|
21558 | }
|
21559 | },
|
21560 | '25': {
|
21561 | start: {
|
21562 | line: 82,
|
21563 | column: 13
|
21564 | },
|
21565 | end: {
|
21566 | line: 82,
|
21567 | column: 34
|
21568 | }
|
21569 | },
|
21570 | '26': {
|
21571 | start: {
|
21572 | line: 85,
|
21573 | column: 17
|
21574 | },
|
21575 | end: {
|
21576 | line: 85,
|
21577 | column: 19
|
21578 | }
|
21579 | },
|
21580 | '27': {
|
21581 | start: {
|
21582 | line: 87,
|
21583 | column: 27
|
21584 | },
|
21585 | end: {
|
21586 | line: 87,
|
21587 | column: 58
|
21588 | }
|
21589 | },
|
21590 | '28': {
|
21591 | start: {
|
21592 | line: 90,
|
21593 | column: 24
|
21594 | },
|
21595 | end: {
|
21596 | line: 95,
|
21597 | column: 3
|
21598 | }
|
21599 | },
|
21600 | '29': {
|
21601 | start: {
|
21602 | line: 91,
|
21603 | column: 4
|
21604 | },
|
21605 | end: {
|
21606 | line: 94,
|
21607 | column: 5
|
21608 | }
|
21609 | },
|
21610 | '30': {
|
21611 | start: {
|
21612 | line: 92,
|
21613 | column: 6
|
21614 | },
|
21615 | end: {
|
21616 | line: 92,
|
21617 | column: 42
|
21618 | }
|
21619 | },
|
21620 | '31': {
|
21621 | start: {
|
21622 | line: 93,
|
21623 | column: 6
|
21624 | },
|
21625 | end: {
|
21626 | line: 93,
|
21627 | column: 52
|
21628 | }
|
21629 | },
|
21630 | '32': {
|
21631 | start: {
|
21632 | line: 99,
|
21633 | column: 17
|
21634 | },
|
21635 | end: {
|
21636 | line: 154,
|
21637 | column: 3
|
21638 | }
|
21639 | },
|
21640 | '33': {
|
21641 | start: {
|
21642 | line: 104,
|
21643 | column: 4
|
21644 | },
|
21645 | end: {
|
21646 | line: 146,
|
21647 | column: 5
|
21648 | }
|
21649 | },
|
21650 | '34': {
|
21651 | start: {
|
21652 | line: 105,
|
21653 | column: 6
|
21654 | },
|
21655 | end: {
|
21656 | line: 114,
|
21657 | column: 7
|
21658 | }
|
21659 | },
|
21660 | '35': {
|
21661 | start: {
|
21662 | line: 107,
|
21663 | column: 8
|
21664 | },
|
21665 | end: {
|
21666 | line: 111,
|
21667 | column: 9
|
21668 | }
|
21669 | },
|
21670 | '36': {
|
21671 | start: {
|
21672 | line: 108,
|
21673 | column: 10
|
21674 | },
|
21675 | end: {
|
21676 | line: 108,
|
21677 | column: 78
|
21678 | }
|
21679 | },
|
21680 | '37': {
|
21681 | start: {
|
21682 | line: 110,
|
21683 | column: 10
|
21684 | },
|
21685 | end: {
|
21686 | line: 110,
|
21687 | column: 45
|
21688 | }
|
21689 | },
|
21690 | '38': {
|
21691 | start: {
|
21692 | line: 112,
|
21693 | column: 8
|
21694 | },
|
21695 | end: {
|
21696 | line: 112,
|
21697 | column: 40
|
21698 | }
|
21699 | },
|
21700 | '39': {
|
21701 | start: {
|
21702 | line: 118,
|
21703 | column: 6
|
21704 | },
|
21705 | end: {
|
21706 | line: 126,
|
21707 | column: 7
|
21708 | }
|
21709 | },
|
21710 | '40': {
|
21711 | start: {
|
21712 | line: 119,
|
21713 | column: 28
|
21714 | },
|
21715 | end: {
|
21716 | line: 119,
|
21717 | column: 41
|
21718 | }
|
21719 | },
|
21720 | '41': {
|
21721 | start: {
|
21722 | line: 121,
|
21723 | column: 8
|
21724 | },
|
21725 | end: {
|
21726 | line: 125,
|
21727 | column: 9
|
21728 | }
|
21729 | },
|
21730 | '42': {
|
21731 | start: {
|
21732 | line: 122,
|
21733 | column: 10
|
21734 | },
|
21735 | end: {
|
21736 | line: 124,
|
21737 | column: 13
|
21738 | }
|
21739 | },
|
21740 | '43': {
|
21741 | start: {
|
21742 | line: 123,
|
21743 | column: 12
|
21744 | },
|
21745 | end: {
|
21746 | line: 123,
|
21747 | column: 84
|
21748 | }
|
21749 | },
|
21750 | '44': {
|
21751 | start: {
|
21752 | line: 131,
|
21753 | column: 11
|
21754 | },
|
21755 | end: {
|
21756 | line: 146,
|
21757 | column: 5
|
21758 | }
|
21759 | },
|
21760 | '45': {
|
21761 | start: {
|
21762 | line: 135,
|
21763 | column: 6
|
21764 | },
|
21765 | end: {
|
21766 | line: 135,
|
21767 | column: 44
|
21768 | }
|
21769 | },
|
21770 | '46': {
|
21771 | start: {
|
21772 | line: 138,
|
21773 | column: 6
|
21774 | },
|
21775 | end: {
|
21776 | line: 138,
|
21777 | column: 53
|
21778 | }
|
21779 | },
|
21780 | '47': {
|
21781 | start: {
|
21782 | line: 139,
|
21783 | column: 26
|
21784 | },
|
21785 | end: {
|
21786 | line: 139,
|
21787 | column: 39
|
21788 | }
|
21789 | },
|
21790 | '48': {
|
21791 | start: {
|
21792 | line: 141,
|
21793 | column: 6
|
21794 | },
|
21795 | end: {
|
21796 | line: 145,
|
21797 | column: 7
|
21798 | }
|
21799 | },
|
21800 | '49': {
|
21801 | start: {
|
21802 | line: 142,
|
21803 | column: 8
|
21804 | },
|
21805 | end: {
|
21806 | line: 144,
|
21807 | column: 11
|
21808 | }
|
21809 | },
|
21810 | '50': {
|
21811 | start: {
|
21812 | line: 143,
|
21813 | column: 10
|
21814 | },
|
21815 | end: {
|
21816 | line: 143,
|
21817 | column: 78
|
21818 | }
|
21819 | },
|
21820 | '51': {
|
21821 | start: {
|
21822 | line: 150,
|
21823 | column: 4
|
21824 | },
|
21825 | end: {
|
21826 | line: 153,
|
21827 | column: 5
|
21828 | }
|
21829 | },
|
21830 | '52': {
|
21831 | start: {
|
21832 | line: 151,
|
21833 | column: 6
|
21834 | },
|
21835 | end: {
|
21836 | line: 151,
|
21837 | column: 29
|
21838 | }
|
21839 | },
|
21840 | '53': {
|
21841 | start: {
|
21842 | line: 152,
|
21843 | column: 6
|
21844 | },
|
21845 | end: {
|
21846 | line: 152,
|
21847 | column: 47
|
21848 | }
|
21849 | },
|
21850 | '54': {
|
21851 | start: {
|
21852 | line: 159,
|
21853 | column: 22
|
21854 | },
|
21855 | end: {
|
21856 | line: 202,
|
21857 | column: 3
|
21858 | }
|
21859 | },
|
21860 | '55': {
|
21861 | start: {
|
21862 | line: 166,
|
21863 | column: 4
|
21864 | },
|
21865 | end: {
|
21866 | line: 166,
|
21867 | column: 46
|
21868 | }
|
21869 | },
|
21870 | '56': {
|
21871 | start: {
|
21872 | line: 167,
|
21873 | column: 4
|
21874 | },
|
21875 | end: {
|
21876 | line: 169,
|
21877 | column: 5
|
21878 | }
|
21879 | },
|
21880 | '57': {
|
21881 | start: {
|
21882 | line: 168,
|
21883 | column: 6
|
21884 | },
|
21885 | end: {
|
21886 | line: 168,
|
21887 | column: 47
|
21888 | }
|
21889 | },
|
21890 | '58': {
|
21891 | start: {
|
21892 | line: 173,
|
21893 | column: 4
|
21894 | },
|
21895 | end: {
|
21896 | line: 173,
|
21897 | column: 50
|
21898 | }
|
21899 | },
|
21900 | '59': {
|
21901 | start: {
|
21902 | line: 175,
|
21903 | column: 4
|
21904 | },
|
21905 | end: {
|
21906 | line: 179,
|
21907 | column: 5
|
21908 | }
|
21909 | },
|
21910 | '60': {
|
21911 | start: {
|
21912 | line: 178,
|
21913 | column: 6
|
21914 | },
|
21915 | end: {
|
21916 | line: 178,
|
21917 | column: 22
|
21918 | }
|
21919 | },
|
21920 | '61': {
|
21921 | start: {
|
21922 | line: 181,
|
21923 | column: 4
|
21924 | },
|
21925 | end: {
|
21926 | line: 185,
|
21927 | column: 5
|
21928 | }
|
21929 | },
|
21930 | '62': {
|
21931 | start: {
|
21932 | line: 184,
|
21933 | column: 6
|
21934 | },
|
21935 | end: {
|
21936 | line: 184,
|
21937 | column: 22
|
21938 | }
|
21939 | },
|
21940 | '63': {
|
21941 | start: {
|
21942 | line: 187,
|
21943 | column: 4
|
21944 | },
|
21945 | end: {
|
21946 | line: 190,
|
21947 | column: 5
|
21948 | }
|
21949 | },
|
21950 | '64': {
|
21951 | start: {
|
21952 | line: 189,
|
21953 | column: 6
|
21954 | },
|
21955 | end: {
|
21956 | line: 189,
|
21957 | column: 22
|
21958 | }
|
21959 | },
|
21960 | '65': {
|
21961 | start: {
|
21962 | line: 193,
|
21963 | column: 4
|
21964 | },
|
21965 | end: {
|
21966 | line: 201,
|
21967 | column: 5
|
21968 | }
|
21969 | },
|
21970 | '66': {
|
21971 | start: {
|
21972 | line: 194,
|
21973 | column: 6
|
21974 | },
|
21975 | end: {
|
21976 | line: 194,
|
21977 | column: 41
|
21978 | }
|
21979 | },
|
21980 | '67': {
|
21981 | start: {
|
21982 | line: 196,
|
21983 | column: 6
|
21984 | },
|
21985 | end: {
|
21986 | line: 200,
|
21987 | column: 7
|
21988 | }
|
21989 | },
|
21990 | '68': {
|
21991 | start: {
|
21992 | line: 197,
|
21993 | column: 8
|
21994 | },
|
21995 | end: {
|
21996 | line: 197,
|
21997 | column: 17
|
21998 | }
|
21999 | },
|
22000 | '69': {
|
22001 | start: {
|
22002 | line: 199,
|
22003 | column: 8
|
22004 | },
|
22005 | end: {
|
22006 | line: 199,
|
22007 | column: 83
|
22008 | }
|
22009 | },
|
22010 | '70': {
|
22011 | start: {
|
22012 | line: 204,
|
22013 | column: 2
|
22014 | },
|
22015 | end: {
|
22016 | line: 207,
|
22017 | column: 3
|
22018 | }
|
22019 | },
|
22020 | '71': {
|
22021 | start: {
|
22022 | line: 206,
|
22023 | column: 4
|
22024 | },
|
22025 | end: {
|
22026 | line: 206,
|
22027 | column: 59
|
22028 | }
|
22029 | },
|
22030 | '72': {
|
22031 | start: {
|
22032 | line: 214,
|
22033 | column: 2
|
22034 | },
|
22035 | end: {
|
22036 | line: 263,
|
22037 | column: 3
|
22038 | }
|
22039 | },
|
22040 | '73': {
|
22041 | start: {
|
22042 | line: 216,
|
22043 | column: 4
|
22044 | },
|
22045 | end: {
|
22046 | line: 219,
|
22047 | column: 7
|
22048 | }
|
22049 | },
|
22050 | '74': {
|
22051 | start: {
|
22052 | line: 217,
|
22053 | column: 6
|
22054 | },
|
22055 | end: {
|
22056 | line: 217,
|
22057 | column: 33
|
22058 | }
|
22059 | },
|
22060 | '75': {
|
22061 | start: {
|
22062 | line: 218,
|
22063 | column: 6
|
22064 | },
|
22065 | end: {
|
22066 | line: 218,
|
22067 | column: 17
|
22068 | }
|
22069 | },
|
22070 | '76': {
|
22071 | start: {
|
22072 | line: 222,
|
22073 | column: 4
|
22074 | },
|
22075 | end: {
|
22076 | line: 222,
|
22077 | column: 55
|
22078 | }
|
22079 | },
|
22080 | '77': {
|
22081 | start: {
|
22082 | line: 226,
|
22083 | column: 4
|
22084 | },
|
22085 | end: {
|
22086 | line: 232,
|
22087 | column: 5
|
22088 | }
|
22089 | },
|
22090 | '78': {
|
22091 | start: {
|
22092 | line: 227,
|
22093 | column: 6
|
22094 | },
|
22095 | end: {
|
22096 | line: 227,
|
22097 | column: 28
|
22098 | }
|
22099 | },
|
22100 | '79': {
|
22101 | start: {
|
22102 | line: 231,
|
22103 | column: 6
|
22104 | },
|
22105 | end: {
|
22106 | line: 231,
|
22107 | column: 46
|
22108 | }
|
22109 | },
|
22110 | '80': {
|
22111 | start: {
|
22112 | line: 235,
|
22113 | column: 4
|
22114 | },
|
22115 | end: {
|
22116 | line: 235,
|
22117 | column: 39
|
22118 | }
|
22119 | },
|
22120 | '81': {
|
22121 | start: {
|
22122 | line: 240,
|
22123 | column: 4
|
22124 | },
|
22125 | end: {
|
22126 | line: 240,
|
22127 | column: 46
|
22128 | }
|
22129 | },
|
22130 | '82': {
|
22131 | start: {
|
22132 | line: 241,
|
22133 | column: 4
|
22134 | },
|
22135 | end: {
|
22136 | line: 241,
|
22137 | column: 63
|
22138 | }
|
22139 | },
|
22140 | '83': {
|
22141 | start: {
|
22142 | line: 244,
|
22143 | column: 4
|
22144 | },
|
22145 | end: {
|
22146 | line: 244,
|
22147 | column: 20
|
22148 | }
|
22149 | },
|
22150 | '84': {
|
22151 | start: {
|
22152 | line: 248,
|
22153 | column: 4
|
22154 | },
|
22155 | end: {
|
22156 | line: 258,
|
22157 | column: 5
|
22158 | }
|
22159 | },
|
22160 | '85': {
|
22161 | start: {
|
22162 | line: 251,
|
22163 | column: 26
|
22164 | },
|
22165 | end: {
|
22166 | line: 251,
|
22167 | column: 39
|
22168 | }
|
22169 | },
|
22170 | '86': {
|
22171 | start: {
|
22172 | line: 253,
|
22173 | column: 6
|
22174 | },
|
22175 | end: {
|
22176 | line: 257,
|
22177 | column: 7
|
22178 | }
|
22179 | },
|
22180 | '87': {
|
22181 | start: {
|
22182 | line: 254,
|
22183 | column: 8
|
22184 | },
|
22185 | end: {
|
22186 | line: 256,
|
22187 | column: 11
|
22188 | }
|
22189 | },
|
22190 | '88': {
|
22191 | start: {
|
22192 | line: 255,
|
22193 | column: 10
|
22194 | },
|
22195 | end: {
|
22196 | line: 255,
|
22197 | column: 79
|
22198 | }
|
22199 | },
|
22200 | '89': {
|
22201 | start: {
|
22202 | line: 261,
|
22203 | column: 4
|
22204 | },
|
22205 | end: {
|
22206 | line: 261,
|
22207 | column: 31
|
22208 | }
|
22209 | },
|
22210 | '90': {
|
22211 | start: {
|
22212 | line: 262,
|
22213 | column: 4
|
22214 | },
|
22215 | end: {
|
22216 | line: 262,
|
22217 | column: 15
|
22218 | }
|
22219 | }
|
22220 | },
|
22221 | fnMap: {
|
22222 | '0': {
|
22223 | name: 'getPlayerSnapshot',
|
22224 | decl: {
|
22225 | start: {
|
22226 | line: 17,
|
22227 | column: 16
|
22228 | },
|
22229 | end: {
|
22230 | line: 17,
|
22231 | column: 33
|
22232 | }
|
22233 | },
|
22234 | loc: {
|
22235 | start: {
|
22236 | line: 17,
|
22237 | column: 42
|
22238 | },
|
22239 | end: {
|
22240 | line: 59,
|
22241 | column: 1
|
22242 | }
|
22243 | },
|
22244 | line: 17
|
22245 | },
|
22246 | '1': {
|
22247 | name: 'restorePlayerSnapshot',
|
22248 | decl: {
|
22249 | start: {
|
22250 | line: 67,
|
22251 | column: 16
|
22252 | },
|
22253 | end: {
|
22254 | line: 67,
|
22255 | column: 37
|
22256 | }
|
22257 | },
|
22258 | loc: {
|
22259 | start: {
|
22260 | line: 67,
|
22261 | column: 56
|
22262 | },
|
22263 | end: {
|
22264 | line: 264,
|
22265 | column: 1
|
22266 | }
|
22267 | },
|
22268 | line: 67
|
22269 | },
|
22270 | '2': {
|
22271 | name: '(anonymous_2)',
|
22272 | decl: {
|
22273 | start: {
|
22274 | line: 71,
|
22275 | column: 15
|
22276 | },
|
22277 | end: {
|
22278 | line: 71,
|
22279 | column: 16
|
22280 | }
|
22281 | },
|
22282 | loc: {
|
22283 | start: {
|
22284 | line: 71,
|
22285 | column: 21
|
22286 | },
|
22287 | end: {
|
22288 | line: 71,
|
22289 | column: 23
|
22290 | }
|
22291 | },
|
22292 | line: 71
|
22293 | },
|
22294 | '3': {
|
22295 | name: '(anonymous_3)',
|
22296 | decl: {
|
22297 | start: {
|
22298 | line: 90,
|
22299 | column: 24
|
22300 | },
|
22301 | end: {
|
22302 | line: 90,
|
22303 | column: 25
|
22304 | }
|
22305 | },
|
22306 | loc: {
|
22307 | start: {
|
22308 | line: 90,
|
22309 | column: 35
|
22310 | },
|
22311 | end: {
|
22312 | line: 95,
|
22313 | column: 3
|
22314 | }
|
22315 | },
|
22316 | line: 90
|
22317 | },
|
22318 | '4': {
|
22319 | name: '(anonymous_4)',
|
22320 | decl: {
|
22321 | start: {
|
22322 | line: 99,
|
22323 | column: 17
|
22324 | },
|
22325 | end: {
|
22326 | line: 99,
|
22327 | column: 18
|
22328 | }
|
22329 | },
|
22330 | loc: {
|
22331 | start: {
|
22332 | line: 99,
|
22333 | column: 28
|
22334 | },
|
22335 | end: {
|
22336 | line: 154,
|
22337 | column: 3
|
22338 | }
|
22339 | },
|
22340 | line: 99
|
22341 | },
|
22342 | '5': {
|
22343 | name: '(anonymous_5)',
|
22344 | decl: {
|
22345 | start: {
|
22346 | line: 122,
|
22347 | column: 28
|
22348 | },
|
22349 | end: {
|
22350 | line: 122,
|
22351 | column: 29
|
22352 | }
|
22353 | },
|
22354 | loc: {
|
22355 | start: {
|
22356 | line: 122,
|
22357 | column: 39
|
22358 | },
|
22359 | end: {
|
22360 | line: 124,
|
22361 | column: 11
|
22362 | }
|
22363 | },
|
22364 | line: 122
|
22365 | },
|
22366 | '6': {
|
22367 | name: '(anonymous_6)',
|
22368 | decl: {
|
22369 | start: {
|
22370 | line: 142,
|
22371 | column: 26
|
22372 | },
|
22373 | end: {
|
22374 | line: 142,
|
22375 | column: 27
|
22376 | }
|
22377 | },
|
22378 | loc: {
|
22379 | start: {
|
22380 | line: 142,
|
22381 | column: 37
|
22382 | },
|
22383 | end: {
|
22384 | line: 144,
|
22385 | column: 9
|
22386 | }
|
22387 | },
|
22388 | line: 142
|
22389 | },
|
22390 | '7': {
|
22391 | name: '(anonymous_7)',
|
22392 | decl: {
|
22393 | start: {
|
22394 | line: 159,
|
22395 | column: 22
|
22396 | },
|
22397 | end: {
|
22398 | line: 159,
|
22399 | column: 23
|
22400 | }
|
22401 | },
|
22402 | loc: {
|
22403 | start: {
|
22404 | line: 159,
|
22405 | column: 33
|
22406 | },
|
22407 | end: {
|
22408 | line: 202,
|
22409 | column: 3
|
22410 | }
|
22411 | },
|
22412 | line: 159
|
22413 | },
|
22414 | '8': {
|
22415 | name: '(anonymous_8)',
|
22416 | decl: {
|
22417 | start: {
|
22418 | line: 216,
|
22419 | column: 30
|
22420 | },
|
22421 | end: {
|
22422 | line: 216,
|
22423 | column: 31
|
22424 | }
|
22425 | },
|
22426 | loc: {
|
22427 | start: {
|
22428 | line: 216,
|
22429 | column: 36
|
22430 | },
|
22431 | end: {
|
22432 | line: 219,
|
22433 | column: 5
|
22434 | }
|
22435 | },
|
22436 | line: 216
|
22437 | },
|
22438 | '9': {
|
22439 | name: '(anonymous_9)',
|
22440 | decl: {
|
22441 | start: {
|
22442 | line: 254,
|
22443 | column: 26
|
22444 | },
|
22445 | end: {
|
22446 | line: 254,
|
22447 | column: 27
|
22448 | }
|
22449 | },
|
22450 | loc: {
|
22451 | start: {
|
22452 | line: 254,
|
22453 | column: 37
|
22454 | },
|
22455 | end: {
|
22456 | line: 256,
|
22457 | column: 9
|
22458 | }
|
22459 | },
|
22460 | line: 254
|
22461 | }
|
22462 | },
|
22463 | branchMap: {
|
22464 | '0': {
|
22465 | loc: {
|
22466 | start: {
|
22467 | line: 20,
|
22468 | column: 2
|
22469 | },
|
22470 | end: {
|
22471 | line: 29,
|
22472 | column: 3
|
22473 | }
|
22474 | },
|
22475 | type: 'if',
|
22476 | locations: [{
|
22477 | start: {
|
22478 | line: 20,
|
22479 | column: 2
|
22480 | },
|
22481 | end: {
|
22482 | line: 29,
|
22483 | column: 3
|
22484 | }
|
22485 | }, {
|
22486 | start: {
|
22487 | line: 20,
|
22488 | column: 2
|
22489 | },
|
22490 | end: {
|
22491 | line: 29,
|
22492 | column: 3
|
22493 | }
|
22494 | }],
|
22495 | line: 20
|
22496 | },
|
22497 | '1': {
|
22498 | loc: {
|
22499 | start: {
|
22500 | line: 20,
|
22501 | column: 6
|
22502 | },
|
22503 | end: {
|
22504 | line: 20,
|
22505 | column: 57
|
22506 | }
|
22507 | },
|
22508 | type: 'binary-expr',
|
22509 | locations: [{
|
22510 | start: {
|
22511 | line: 20,
|
22512 | column: 6
|
22513 | },
|
22514 | end: {
|
22515 | line: 20,
|
22516 | column: 28
|
22517 | }
|
22518 | }, {
|
22519 | start: {
|
22520 | line: 20,
|
22521 | column: 32
|
22522 | },
|
22523 | end: {
|
22524 | line: 20,
|
22525 | column: 57
|
22526 | }
|
22527 | }],
|
22528 | line: 20
|
22529 | },
|
22530 | '2': {
|
22531 | loc: {
|
22532 | start: {
|
22533 | line: 22,
|
22534 | column: 4
|
22535 | },
|
22536 | end: {
|
22537 | line: 26,
|
22538 | column: 5
|
22539 | }
|
22540 | },
|
22541 | type: 'if',
|
22542 | locations: [{
|
22543 | start: {
|
22544 | line: 22,
|
22545 | column: 4
|
22546 | },
|
22547 | end: {
|
22548 | line: 26,
|
22549 | column: 5
|
22550 | }
|
22551 | }, {
|
22552 | start: {
|
22553 | line: 22,
|
22554 | column: 4
|
22555 | },
|
22556 | end: {
|
22557 | line: 26,
|
22558 | column: 5
|
22559 | }
|
22560 | }],
|
22561 | line: 22
|
22562 | },
|
22563 | '3': {
|
22564 | loc: {
|
22565 | start: {
|
22566 | line: 32,
|
22567 | column: 17
|
22568 | },
|
22569 | end: {
|
22570 | line: 32,
|
22571 | column: 61
|
22572 | }
|
22573 | },
|
22574 | type: 'cond-expr',
|
22575 | locations: [{
|
22576 | start: {
|
22577 | line: 32,
|
22578 | column: 37
|
22579 | },
|
22580 | end: {
|
22581 | line: 32,
|
22582 | column: 56
|
22583 | }
|
22584 | }, {
|
22585 | start: {
|
22586 | line: 32,
|
22587 | column: 59
|
22588 | },
|
22589 | end: {
|
22590 | line: 32,
|
22591 | column: 61
|
22592 | }
|
22593 | }],
|
22594 | line: 32
|
22595 | },
|
22596 | '4': {
|
22597 | loc: {
|
22598 | start: {
|
22599 | line: 43,
|
22600 | column: 2
|
22601 | },
|
22602 | end: {
|
22603 | line: 45,
|
22604 | column: 3
|
22605 | }
|
22606 | },
|
22607 | type: 'if',
|
22608 | locations: [{
|
22609 | start: {
|
22610 | line: 43,
|
22611 | column: 2
|
22612 | },
|
22613 | end: {
|
22614 | line: 45,
|
22615 | column: 3
|
22616 | }
|
22617 | }, {
|
22618 | start: {
|
22619 | line: 43,
|
22620 | column: 2
|
22621 | },
|
22622 | end: {
|
22623 | line: 45,
|
22624 | column: 3
|
22625 | }
|
22626 | }],
|
22627 | line: 43
|
22628 | },
|
22629 | '5': {
|
22630 | loc: {
|
22631 | start: {
|
22632 | line: 70,
|
22633 | column: 2
|
22634 | },
|
22635 | end: {
|
22636 | line: 72,
|
22637 | column: 3
|
22638 | }
|
22639 | },
|
22640 | type: 'if',
|
22641 | locations: [{
|
22642 | start: {
|
22643 | line: 70,
|
22644 | column: 2
|
22645 | },
|
22646 | end: {
|
22647 | line: 72,
|
22648 | column: 3
|
22649 | }
|
22650 | }, {
|
22651 | start: {
|
22652 | line: 70,
|
22653 | column: 2
|
22654 | },
|
22655 | end: {
|
22656 | line: 72,
|
22657 | column: 3
|
22658 | }
|
22659 | }],
|
22660 | line: 70
|
22661 | },
|
22662 | '6': {
|
22663 | loc: {
|
22664 | start: {
|
22665 | line: 74,
|
22666 | column: 2
|
22667 | },
|
22668 | end: {
|
22669 | line: 79,
|
22670 | column: 3
|
22671 | }
|
22672 | },
|
22673 | type: 'if',
|
22674 | locations: [{
|
22675 | start: {
|
22676 | line: 74,
|
22677 | column: 2
|
22678 | },
|
22679 | end: {
|
22680 | line: 79,
|
22681 | column: 3
|
22682 | }
|
22683 | }, {
|
22684 | start: {
|
22685 | line: 74,
|
22686 | column: 2
|
22687 | },
|
22688 | end: {
|
22689 | line: 79,
|
22690 | column: 3
|
22691 | }
|
22692 | }],
|
22693 | line: 74
|
22694 | },
|
22695 | '7': {
|
22696 | loc: {
|
22697 | start: {
|
22698 | line: 104,
|
22699 | column: 4
|
22700 | },
|
22701 | end: {
|
22702 | line: 146,
|
22703 | column: 5
|
22704 | }
|
22705 | },
|
22706 | type: 'if',
|
22707 | locations: [{
|
22708 | start: {
|
22709 | line: 104,
|
22710 | column: 4
|
22711 | },
|
22712 | end: {
|
22713 | line: 146,
|
22714 | column: 5
|
22715 | }
|
22716 | }, {
|
22717 | start: {
|
22718 | line: 104,
|
22719 | column: 4
|
22720 | },
|
22721 | end: {
|
22722 | line: 146,
|
22723 | column: 5
|
22724 | }
|
22725 | }],
|
22726 | line: 104
|
22727 | },
|
22728 | '8': {
|
22729 | loc: {
|
22730 | start: {
|
22731 | line: 104,
|
22732 | column: 8
|
22733 | },
|
22734 | end: {
|
22735 | line: 104,
|
22736 | column: 59
|
22737 | }
|
22738 | },
|
22739 | type: 'binary-expr',
|
22740 | locations: [{
|
22741 | start: {
|
22742 | line: 104,
|
22743 | column: 8
|
22744 | },
|
22745 | end: {
|
22746 | line: 104,
|
22747 | column: 30
|
22748 | }
|
22749 | }, {
|
22750 | start: {
|
22751 | line: 104,
|
22752 | column: 34
|
22753 | },
|
22754 | end: {
|
22755 | line: 104,
|
22756 | column: 59
|
22757 | }
|
22758 | }],
|
22759 | line: 104
|
22760 | },
|
22761 | '9': {
|
22762 | loc: {
|
22763 | start: {
|
22764 | line: 105,
|
22765 | column: 6
|
22766 | },
|
22767 | end: {
|
22768 | line: 114,
|
22769 | column: 7
|
22770 | }
|
22771 | },
|
22772 | type: 'if',
|
22773 | locations: [{
|
22774 | start: {
|
22775 | line: 105,
|
22776 | column: 6
|
22777 | },
|
22778 | end: {
|
22779 | line: 114,
|
22780 | column: 7
|
22781 | }
|
22782 | }, {
|
22783 | start: {
|
22784 | line: 105,
|
22785 | column: 6
|
22786 | },
|
22787 | end: {
|
22788 | line: 114,
|
22789 | column: 7
|
22790 | }
|
22791 | }],
|
22792 | line: 105
|
22793 | },
|
22794 | '10': {
|
22795 | loc: {
|
22796 | start: {
|
22797 | line: 107,
|
22798 | column: 8
|
22799 | },
|
22800 | end: {
|
22801 | line: 111,
|
22802 | column: 9
|
22803 | }
|
22804 | },
|
22805 | type: 'if',
|
22806 | locations: [{
|
22807 | start: {
|
22808 | line: 107,
|
22809 | column: 8
|
22810 | },
|
22811 | end: {
|
22812 | line: 111,
|
22813 | column: 9
|
22814 | }
|
22815 | }, {
|
22816 | start: {
|
22817 | line: 107,
|
22818 | column: 8
|
22819 | },
|
22820 | end: {
|
22821 | line: 111,
|
22822 | column: 9
|
22823 | }
|
22824 | }],
|
22825 | line: 107
|
22826 | },
|
22827 | '11': {
|
22828 | loc: {
|
22829 | start: {
|
22830 | line: 118,
|
22831 | column: 6
|
22832 | },
|
22833 | end: {
|
22834 | line: 126,
|
22835 | column: 7
|
22836 | }
|
22837 | },
|
22838 | type: 'if',
|
22839 | locations: [{
|
22840 | start: {
|
22841 | line: 118,
|
22842 | column: 6
|
22843 | },
|
22844 | end: {
|
22845 | line: 126,
|
22846 | column: 7
|
22847 | }
|
22848 | }, {
|
22849 | start: {
|
22850 | line: 118,
|
22851 | column: 6
|
22852 | },
|
22853 | end: {
|
22854 | line: 126,
|
22855 | column: 7
|
22856 | }
|
22857 | }],
|
22858 | line: 118
|
22859 | },
|
22860 | '12': {
|
22861 | loc: {
|
22862 | start: {
|
22863 | line: 121,
|
22864 | column: 8
|
22865 | },
|
22866 | end: {
|
22867 | line: 125,
|
22868 | column: 9
|
22869 | }
|
22870 | },
|
22871 | type: 'if',
|
22872 | locations: [{
|
22873 | start: {
|
22874 | line: 121,
|
22875 | column: 8
|
22876 | },
|
22877 | end: {
|
22878 | line: 125,
|
22879 | column: 9
|
22880 | }
|
22881 | }, {
|
22882 | start: {
|
22883 | line: 121,
|
22884 | column: 8
|
22885 | },
|
22886 | end: {
|
22887 | line: 125,
|
22888 | column: 9
|
22889 | }
|
22890 | }],
|
22891 | line: 121
|
22892 | },
|
22893 | '13': {
|
22894 | loc: {
|
22895 | start: {
|
22896 | line: 121,
|
22897 | column: 12
|
22898 | },
|
22899 | end: {
|
22900 | line: 121,
|
22901 | column: 44
|
22902 | }
|
22903 | },
|
22904 | type: 'binary-expr',
|
22905 | locations: [{
|
22906 | start: {
|
22907 | line: 121,
|
22908 | column: 12
|
22909 | },
|
22910 | end: {
|
22911 | line: 121,
|
22912 | column: 23
|
22913 | }
|
22914 | }, {
|
22915 | start: {
|
22916 | line: 121,
|
22917 | column: 27
|
22918 | },
|
22919 | end: {
|
22920 | line: 121,
|
22921 | column: 44
|
22922 | }
|
22923 | }],
|
22924 | line: 121
|
22925 | },
|
22926 | '14': {
|
22927 | loc: {
|
22928 | start: {
|
22929 | line: 131,
|
22930 | column: 11
|
22931 | },
|
22932 | end: {
|
22933 | line: 146,
|
22934 | column: 5
|
22935 | }
|
22936 | },
|
22937 | type: 'if',
|
22938 | locations: [{
|
22939 | start: {
|
22940 | line: 131,
|
22941 | column: 11
|
22942 | },
|
22943 | end: {
|
22944 | line: 146,
|
22945 | column: 5
|
22946 | }
|
22947 | }, {
|
22948 | start: {
|
22949 | line: 131,
|
22950 | column: 11
|
22951 | },
|
22952 | end: {
|
22953 | line: 146,
|
22954 | column: 5
|
22955 | }
|
22956 | }],
|
22957 | line: 131
|
22958 | },
|
22959 | '15': {
|
22960 | loc: {
|
22961 | start: {
|
22962 | line: 141,
|
22963 | column: 6
|
22964 | },
|
22965 | end: {
|
22966 | line: 145,
|
22967 | column: 7
|
22968 | }
|
22969 | },
|
22970 | type: 'if',
|
22971 | locations: [{
|
22972 | start: {
|
22973 | line: 141,
|
22974 | column: 6
|
22975 | },
|
22976 | end: {
|
22977 | line: 145,
|
22978 | column: 7
|
22979 | }
|
22980 | }, {
|
22981 | start: {
|
22982 | line: 141,
|
22983 | column: 6
|
22984 | },
|
22985 | end: {
|
22986 | line: 145,
|
22987 | column: 7
|
22988 | }
|
22989 | }],
|
22990 | line: 141
|
22991 | },
|
22992 | '16': {
|
22993 | loc: {
|
22994 | start: {
|
22995 | line: 141,
|
22996 | column: 10
|
22997 | },
|
22998 | end: {
|
22999 | line: 141,
|
23000 | column: 42
|
23001 | }
|
23002 | },
|
23003 | type: 'binary-expr',
|
23004 | locations: [{
|
23005 | start: {
|
23006 | line: 141,
|
23007 | column: 10
|
23008 | },
|
23009 | end: {
|
23010 | line: 141,
|
23011 | column: 21
|
23012 | }
|
23013 | }, {
|
23014 | start: {
|
23015 | line: 141,
|
23016 | column: 25
|
23017 | },
|
23018 | end: {
|
23019 | line: 141,
|
23020 | column: 42
|
23021 | }
|
23022 | }],
|
23023 | line: 141
|
23024 | },
|
23025 | '17': {
|
23026 | loc: {
|
23027 | start: {
|
23028 | line: 150,
|
23029 | column: 4
|
23030 | },
|
23031 | end: {
|
23032 | line: 153,
|
23033 | column: 5
|
23034 | }
|
23035 | },
|
23036 | type: 'if',
|
23037 | locations: [{
|
23038 | start: {
|
23039 | line: 150,
|
23040 | column: 4
|
23041 | },
|
23042 | end: {
|
23043 | line: 153,
|
23044 | column: 5
|
23045 | }
|
23046 | }, {
|
23047 | start: {
|
23048 | line: 150,
|
23049 | column: 4
|
23050 | },
|
23051 | end: {
|
23052 | line: 153,
|
23053 | column: 5
|
23054 | }
|
23055 | }],
|
23056 | line: 150
|
23057 | },
|
23058 | '18': {
|
23059 | loc: {
|
23060 | start: {
|
23061 | line: 167,
|
23062 | column: 4
|
23063 | },
|
23064 | end: {
|
23065 | line: 169,
|
23066 | column: 5
|
23067 | }
|
23068 | },
|
23069 | type: 'if',
|
23070 | locations: [{
|
23071 | start: {
|
23072 | line: 167,
|
23073 | column: 4
|
23074 | },
|
23075 | end: {
|
23076 | line: 169,
|
23077 | column: 5
|
23078 | }
|
23079 | }, {
|
23080 | start: {
|
23081 | line: 167,
|
23082 | column: 4
|
23083 | },
|
23084 | end: {
|
23085 | line: 169,
|
23086 | column: 5
|
23087 | }
|
23088 | }],
|
23089 | line: 167
|
23090 | },
|
23091 | '19': {
|
23092 | loc: {
|
23093 | start: {
|
23094 | line: 175,
|
23095 | column: 4
|
23096 | },
|
23097 | end: {
|
23098 | line: 179,
|
23099 | column: 5
|
23100 | }
|
23101 | },
|
23102 | type: 'if',
|
23103 | locations: [{
|
23104 | start: {
|
23105 | line: 175,
|
23106 | column: 4
|
23107 | },
|
23108 | end: {
|
23109 | line: 179,
|
23110 | column: 5
|
23111 | }
|
23112 | }, {
|
23113 | start: {
|
23114 | line: 175,
|
23115 | column: 4
|
23116 | },
|
23117 | end: {
|
23118 | line: 179,
|
23119 | column: 5
|
23120 | }
|
23121 | }],
|
23122 | line: 175
|
23123 | },
|
23124 | '20': {
|
23125 | loc: {
|
23126 | start: {
|
23127 | line: 181,
|
23128 | column: 4
|
23129 | },
|
23130 | end: {
|
23131 | line: 185,
|
23132 | column: 5
|
23133 | }
|
23134 | },
|
23135 | type: 'if',
|
23136 | locations: [{
|
23137 | start: {
|
23138 | line: 181,
|
23139 | column: 4
|
23140 | },
|
23141 | end: {
|
23142 | line: 185,
|
23143 | column: 5
|
23144 | }
|
23145 | }, {
|
23146 | start: {
|
23147 | line: 181,
|
23148 | column: 4
|
23149 | },
|
23150 | end: {
|
23151 | line: 185,
|
23152 | column: 5
|
23153 | }
|
23154 | }],
|
23155 | line: 181
|
23156 | },
|
23157 | '21': {
|
23158 | loc: {
|
23159 | start: {
|
23160 | line: 187,
|
23161 | column: 4
|
23162 | },
|
23163 | end: {
|
23164 | line: 190,
|
23165 | column: 5
|
23166 | }
|
23167 | },
|
23168 | type: 'if',
|
23169 | locations: [{
|
23170 | start: {
|
23171 | line: 187,
|
23172 | column: 4
|
23173 | },
|
23174 | end: {
|
23175 | line: 190,
|
23176 | column: 5
|
23177 | }
|
23178 | }, {
|
23179 | start: {
|
23180 | line: 187,
|
23181 | column: 4
|
23182 | },
|
23183 | end: {
|
23184 | line: 190,
|
23185 | column: 5
|
23186 | }
|
23187 | }],
|
23188 | line: 187
|
23189 | },
|
23190 | '22': {
|
23191 | loc: {
|
23192 | start: {
|
23193 | line: 193,
|
23194 | column: 4
|
23195 | },
|
23196 | end: {
|
23197 | line: 201,
|
23198 | column: 5
|
23199 | }
|
23200 | },
|
23201 | type: 'if',
|
23202 | locations: [{
|
23203 | start: {
|
23204 | line: 193,
|
23205 | column: 4
|
23206 | },
|
23207 | end: {
|
23208 | line: 201,
|
23209 | column: 5
|
23210 | }
|
23211 | }, {
|
23212 | start: {
|
23213 | line: 193,
|
23214 | column: 4
|
23215 | },
|
23216 | end: {
|
23217 | line: 201,
|
23218 | column: 5
|
23219 | }
|
23220 | }],
|
23221 | line: 193
|
23222 | },
|
23223 | '23': {
|
23224 | loc: {
|
23225 | start: {
|
23226 | line: 204,
|
23227 | column: 2
|
23228 | },
|
23229 | end: {
|
23230 | line: 207,
|
23231 | column: 3
|
23232 | }
|
23233 | },
|
23234 | type: 'if',
|
23235 | locations: [{
|
23236 | start: {
|
23237 | line: 204,
|
23238 | column: 2
|
23239 | },
|
23240 | end: {
|
23241 | line: 207,
|
23242 | column: 3
|
23243 | }
|
23244 | }, {
|
23245 | start: {
|
23246 | line: 204,
|
23247 | column: 2
|
23248 | },
|
23249 | end: {
|
23250 | line: 207,
|
23251 | column: 3
|
23252 | }
|
23253 | }],
|
23254 | line: 204
|
23255 | },
|
23256 | '24': {
|
23257 | loc: {
|
23258 | start: {
|
23259 | line: 206,
|
23260 | column: 31
|
23261 | },
|
23262 | end: {
|
23263 | line: 206,
|
23264 | column: 57
|
23265 | }
|
23266 | },
|
23267 | type: 'binary-expr',
|
23268 | locations: [{
|
23269 | start: {
|
23270 | line: 206,
|
23271 | column: 31
|
23272 | },
|
23273 | end: {
|
23274 | line: 206,
|
23275 | column: 51
|
23276 | }
|
23277 | }, {
|
23278 | start: {
|
23279 | line: 206,
|
23280 | column: 55
|
23281 | },
|
23282 | end: {
|
23283 | line: 206,
|
23284 | column: 57
|
23285 | }
|
23286 | }],
|
23287 | line: 206
|
23288 | },
|
23289 | '25': {
|
23290 | loc: {
|
23291 | start: {
|
23292 | line: 214,
|
23293 | column: 2
|
23294 | },
|
23295 | end: {
|
23296 | line: 263,
|
23297 | column: 3
|
23298 | }
|
23299 | },
|
23300 | type: 'if',
|
23301 | locations: [{
|
23302 | start: {
|
23303 | line: 214,
|
23304 | column: 2
|
23305 | },
|
23306 | end: {
|
23307 | line: 263,
|
23308 | column: 3
|
23309 | }
|
23310 | }, {
|
23311 | start: {
|
23312 | line: 214,
|
23313 | column: 2
|
23314 | },
|
23315 | end: {
|
23316 | line: 263,
|
23317 | column: 3
|
23318 | }
|
23319 | }],
|
23320 | line: 214
|
23321 | },
|
23322 | '26': {
|
23323 | loc: {
|
23324 | start: {
|
23325 | line: 226,
|
23326 | column: 4
|
23327 | },
|
23328 | end: {
|
23329 | line: 232,
|
23330 | column: 5
|
23331 | }
|
23332 | },
|
23333 | type: 'if',
|
23334 | locations: [{
|
23335 | start: {
|
23336 | line: 226,
|
23337 | column: 4
|
23338 | },
|
23339 | end: {
|
23340 | line: 232,
|
23341 | column: 5
|
23342 | }
|
23343 | }, {
|
23344 | start: {
|
23345 | line: 226,
|
23346 | column: 4
|
23347 | },
|
23348 | end: {
|
23349 | line: 232,
|
23350 | column: 5
|
23351 | }
|
23352 | }],
|
23353 | line: 226
|
23354 | },
|
23355 | '27': {
|
23356 | loc: {
|
23357 | start: {
|
23358 | line: 226,
|
23359 | column: 8
|
23360 | },
|
23361 | end: {
|
23362 | line: 226,
|
23363 | column: 52
|
23364 | }
|
23365 | },
|
23366 | type: 'binary-expr',
|
23367 | locations: [{
|
23368 | start: {
|
23369 | line: 226,
|
23370 | column: 8
|
23371 | },
|
23372 | end: {
|
23373 | line: 226,
|
23374 | column: 30
|
23375 | }
|
23376 | }, {
|
23377 | start: {
|
23378 | line: 226,
|
23379 | column: 34
|
23380 | },
|
23381 | end: {
|
23382 | line: 226,
|
23383 | column: 52
|
23384 | }
|
23385 | }],
|
23386 | line: 226
|
23387 | },
|
23388 | '28': {
|
23389 | loc: {
|
23390 | start: {
|
23391 | line: 248,
|
23392 | column: 4
|
23393 | },
|
23394 | end: {
|
23395 | line: 258,
|
23396 | column: 5
|
23397 | }
|
23398 | },
|
23399 | type: 'if',
|
23400 | locations: [{
|
23401 | start: {
|
23402 | line: 248,
|
23403 | column: 4
|
23404 | },
|
23405 | end: {
|
23406 | line: 258,
|
23407 | column: 5
|
23408 | }
|
23409 | }, {
|
23410 | start: {
|
23411 | line: 248,
|
23412 | column: 4
|
23413 | },
|
23414 | end: {
|
23415 | line: 258,
|
23416 | column: 5
|
23417 | }
|
23418 | }],
|
23419 | line: 248
|
23420 | },
|
23421 | '29': {
|
23422 | loc: {
|
23423 | start: {
|
23424 | line: 253,
|
23425 | column: 6
|
23426 | },
|
23427 | end: {
|
23428 | line: 257,
|
23429 | column: 7
|
23430 | }
|
23431 | },
|
23432 | type: 'if',
|
23433 | locations: [{
|
23434 | start: {
|
23435 | line: 253,
|
23436 | column: 6
|
23437 | },
|
23438 | end: {
|
23439 | line: 257,
|
23440 | column: 7
|
23441 | }
|
23442 | }, {
|
23443 | start: {
|
23444 | line: 253,
|
23445 | column: 6
|
23446 | },
|
23447 | end: {
|
23448 | line: 257,
|
23449 | column: 7
|
23450 | }
|
23451 | }],
|
23452 | line: 253
|
23453 | },
|
23454 | '30': {
|
23455 | loc: {
|
23456 | start: {
|
23457 | line: 253,
|
23458 | column: 10
|
23459 | },
|
23460 | end: {
|
23461 | line: 253,
|
23462 | column: 42
|
23463 | }
|
23464 | },
|
23465 | type: 'binary-expr',
|
23466 | locations: [{
|
23467 | start: {
|
23468 | line: 253,
|
23469 | column: 10
|
23470 | },
|
23471 | end: {
|
23472 | line: 253,
|
23473 | column: 21
|
23474 | }
|
23475 | }, {
|
23476 | start: {
|
23477 | line: 253,
|
23478 | column: 25
|
23479 | },
|
23480 | end: {
|
23481 | line: 253,
|
23482 | column: 42
|
23483 | }
|
23484 | }],
|
23485 | line: 253
|
23486 | }
|
23487 | },
|
23488 | s: {
|
23489 | '0': 0,
|
23490 | '1': 0,
|
23491 | '2': 0,
|
23492 | '3': 0,
|
23493 | '4': 0,
|
23494 | '5': 0,
|
23495 | '6': 0,
|
23496 | '7': 0,
|
23497 | '8': 0,
|
23498 | '9': 0,
|
23499 | '10': 0,
|
23500 | '11': 0,
|
23501 | '12': 0,
|
23502 | '13': 0,
|
23503 | '14': 0,
|
23504 | '15': 0,
|
23505 | '16': 0,
|
23506 | '17': 0,
|
23507 | '18': 0,
|
23508 | '19': 0,
|
23509 | '20': 0,
|
23510 | '21': 0,
|
23511 | '22': 0,
|
23512 | '23': 0,
|
23513 | '24': 0,
|
23514 | '25': 0,
|
23515 | '26': 0,
|
23516 | '27': 0,
|
23517 | '28': 0,
|
23518 | '29': 0,
|
23519 | '30': 0,
|
23520 | '31': 0,
|
23521 | '32': 0,
|
23522 | '33': 0,
|
23523 | '34': 0,
|
23524 | '35': 0,
|
23525 | '36': 0,
|
23526 | '37': 0,
|
23527 | '38': 0,
|
23528 | '39': 0,
|
23529 | '40': 0,
|
23530 | '41': 0,
|
23531 | '42': 0,
|
23532 | '43': 0,
|
23533 | '44': 0,
|
23534 | '45': 0,
|
23535 | '46': 0,
|
23536 | '47': 0,
|
23537 | '48': 0,
|
23538 | '49': 0,
|
23539 | '50': 0,
|
23540 | '51': 0,
|
23541 | '52': 0,
|
23542 | '53': 0,
|
23543 | '54': 0,
|
23544 | '55': 0,
|
23545 | '56': 0,
|
23546 | '57': 0,
|
23547 | '58': 0,
|
23548 | '59': 0,
|
23549 | '60': 0,
|
23550 | '61': 0,
|
23551 | '62': 0,
|
23552 | '63': 0,
|
23553 | '64': 0,
|
23554 | '65': 0,
|
23555 | '66': 0,
|
23556 | '67': 0,
|
23557 | '68': 0,
|
23558 | '69': 0,
|
23559 | '70': 0,
|
23560 | '71': 0,
|
23561 | '72': 0,
|
23562 | '73': 0,
|
23563 | '74': 0,
|
23564 | '75': 0,
|
23565 | '76': 0,
|
23566 | '77': 0,
|
23567 | '78': 0,
|
23568 | '79': 0,
|
23569 | '80': 0,
|
23570 | '81': 0,
|
23571 | '82': 0,
|
23572 | '83': 0,
|
23573 | '84': 0,
|
23574 | '85': 0,
|
23575 | '86': 0,
|
23576 | '87': 0,
|
23577 | '88': 0,
|
23578 | '89': 0,
|
23579 | '90': 0
|
23580 | },
|
23581 | f: {
|
23582 | '0': 0,
|
23583 | '1': 0,
|
23584 | '2': 0,
|
23585 | '3': 0,
|
23586 | '4': 0,
|
23587 | '5': 0,
|
23588 | '6': 0,
|
23589 | '7': 0,
|
23590 | '8': 0,
|
23591 | '9': 0
|
23592 | },
|
23593 | b: {
|
23594 | '0': [0, 0],
|
23595 | '1': [0, 0],
|
23596 | '2': [0, 0],
|
23597 | '3': [0, 0],
|
23598 | '4': [0, 0],
|
23599 | '5': [0, 0],
|
23600 | '6': [0, 0],
|
23601 | '7': [0, 0],
|
23602 | '8': [0, 0],
|
23603 | '9': [0, 0],
|
23604 | '10': [0, 0],
|
23605 | '11': [0, 0],
|
23606 | '12': [0, 0],
|
23607 | '13': [0, 0],
|
23608 | '14': [0, 0],
|
23609 | '15': [0, 0],
|
23610 | '16': [0, 0],
|
23611 | '17': [0, 0],
|
23612 | '18': [0, 0],
|
23613 | '19': [0, 0],
|
23614 | '20': [0, 0],
|
23615 | '21': [0, 0],
|
23616 | '22': [0, 0],
|
23617 | '23': [0, 0],
|
23618 | '24': [0, 0],
|
23619 | '25': [0, 0],
|
23620 | '26': [0, 0],
|
23621 | '27': [0, 0],
|
23622 | '28': [0, 0],
|
23623 | '29': [0, 0],
|
23624 | '30': [0, 0]
|
23625 | },
|
23626 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
23627 | },
|
23628 | coverage = global[gcv] || (global[gcv] = {});
|
23629 |
|
23630 | if (coverage[path] && coverage[path].hash === hash) {
|
23631 | return coverage[path];
|
23632 | }
|
23633 |
|
23634 | coverageData.hash = hash;
|
23635 | return coverage[path] = coverageData;
|
23636 | }();
|
23637 | var tryToResumeTimeout_;
|
23638 | function getPlayerSnapshot(player) {
|
23639 | cov_260ini1tec.f[0]++;
|
23640 | var currentTime;
|
23641 | cov_260ini1tec.s[0]++;
|
23642 |
|
23643 | if ((cov_260ini1tec.b[1][0]++, videojs$1.browser.IS_IOS) && (cov_260ini1tec.b[1][1]++, player.ads.isLive(player))) {
|
23644 | cov_260ini1tec.b[0][0]++;
|
23645 | cov_260ini1tec.s[1]++;
|
23646 |
|
23647 | if (player.seekable().length > 0) {
|
23648 | cov_260ini1tec.b[2][0]++;
|
23649 | cov_260ini1tec.s[2]++;
|
23650 | currentTime = player.currentTime() - player.seekable().end(0);
|
23651 | } else {
|
23652 | cov_260ini1tec.b[2][1]++;
|
23653 | cov_260ini1tec.s[3]++;
|
23654 | currentTime = player.currentTime();
|
23655 | }
|
23656 | } else {
|
23657 | cov_260ini1tec.b[0][1]++;
|
23658 | cov_260ini1tec.s[4]++;
|
23659 | currentTime = player.currentTime();
|
23660 | }
|
23661 |
|
23662 | var tech = (cov_260ini1tec.s[5]++, player.$('.vjs-tech'));
|
23663 | var tracks = (cov_260ini1tec.s[6]++, player.textTracks ? (cov_260ini1tec.b[3][0]++, player.textTracks()) : (cov_260ini1tec.b[3][1]++, []));
|
23664 | var suppressedTracks = (cov_260ini1tec.s[7]++, []);
|
23665 | var snapshotObject = (cov_260ini1tec.s[8]++, {
|
23666 | ended: player.ended(),
|
23667 | currentSrc: player.currentSrc(),
|
23668 | sources: player.currentSources(),
|
23669 | src: player.tech_.src(),
|
23670 | currentTime: currentTime,
|
23671 | type: player.currentType()
|
23672 | });
|
23673 | cov_260ini1tec.s[9]++;
|
23674 |
|
23675 | if (tech) {
|
23676 | cov_260ini1tec.b[4][0]++;
|
23677 | cov_260ini1tec.s[10]++;
|
23678 | snapshotObject.style = tech.getAttribute('style');
|
23679 | } else {
|
23680 | cov_260ini1tec.b[4][1]++;
|
23681 | }
|
23682 |
|
23683 | cov_260ini1tec.s[11]++;
|
23684 |
|
23685 | for (var i = 0; i < tracks.length; i++) {
|
23686 | var track = (cov_260ini1tec.s[12]++, tracks[i]);
|
23687 | cov_260ini1tec.s[13]++;
|
23688 | suppressedTracks.push({
|
23689 | track: track,
|
23690 | mode: track.mode
|
23691 | });
|
23692 | cov_260ini1tec.s[14]++;
|
23693 | track.mode = 'disabled';
|
23694 | }
|
23695 |
|
23696 | cov_260ini1tec.s[15]++;
|
23697 | snapshotObject.suppressedTracks = suppressedTracks;
|
23698 | cov_260ini1tec.s[16]++;
|
23699 | return snapshotObject;
|
23700 | }
|
23701 | function restorePlayerSnapshot(player, callback) {
|
23702 | cov_260ini1tec.f[1]++;
|
23703 | var snapshotObject = (cov_260ini1tec.s[17]++, player.ads.snapshot);
|
23704 | cov_260ini1tec.s[18]++;
|
23705 |
|
23706 | if (callback === undefined) {
|
23707 | cov_260ini1tec.b[5][0]++;
|
23708 | cov_260ini1tec.s[19]++;
|
23709 |
|
23710 | callback = function callback() {
|
23711 | cov_260ini1tec.f[2]++;
|
23712 | };
|
23713 | } else {
|
23714 | cov_260ini1tec.b[5][1]++;
|
23715 | }
|
23716 |
|
23717 | cov_260ini1tec.s[20]++;
|
23718 |
|
23719 | if (player.ads.disableNextSnapshotRestore === true) {
|
23720 | cov_260ini1tec.b[6][0]++;
|
23721 | cov_260ini1tec.s[21]++;
|
23722 | player.ads.disableNextSnapshotRestore = false;
|
23723 | cov_260ini1tec.s[22]++;
|
23724 | delete player.ads.snapshot;
|
23725 | cov_260ini1tec.s[23]++;
|
23726 | callback();
|
23727 | cov_260ini1tec.s[24]++;
|
23728 | return;
|
23729 | } else {
|
23730 | cov_260ini1tec.b[6][1]++;
|
23731 | }
|
23732 |
|
23733 | var tech = (cov_260ini1tec.s[25]++, player.$('.vjs-tech'));
|
23734 | var attempts = (cov_260ini1tec.s[26]++, 20);
|
23735 | var suppressedTracks = (cov_260ini1tec.s[27]++, snapshotObject.suppressedTracks);
|
23736 | var trackSnapshot;
|
23737 | cov_260ini1tec.s[28]++;
|
23738 |
|
23739 | var restoreTracks = function restoreTracks() {
|
23740 | cov_260ini1tec.f[3]++;
|
23741 | cov_260ini1tec.s[29]++;
|
23742 |
|
23743 | for (var i = 0; i < suppressedTracks.length; i++) {
|
23744 | cov_260ini1tec.s[30]++;
|
23745 | trackSnapshot = suppressedTracks[i];
|
23746 | cov_260ini1tec.s[31]++;
|
23747 | trackSnapshot.track.mode = trackSnapshot.mode;
|
23748 | }
|
23749 | };
|
23750 |
|
23751 | cov_260ini1tec.s[32]++;
|
23752 |
|
23753 | var resume = function resume() {
|
23754 | cov_260ini1tec.f[4]++;
|
23755 | var currentTime;
|
23756 | cov_260ini1tec.s[33]++;
|
23757 |
|
23758 | if ((cov_260ini1tec.b[8][0]++, videojs$1.browser.IS_IOS) && (cov_260ini1tec.b[8][1]++, player.ads.isLive(player))) {
|
23759 | cov_260ini1tec.b[7][0]++;
|
23760 | cov_260ini1tec.s[34]++;
|
23761 |
|
23762 | if (snapshotObject.currentTime < 0) {
|
23763 | cov_260ini1tec.b[9][0]++;
|
23764 | cov_260ini1tec.s[35]++;
|
23765 |
|
23766 | if (player.seekable().length > 0) {
|
23767 | cov_260ini1tec.b[10][0]++;
|
23768 | cov_260ini1tec.s[36]++;
|
23769 | currentTime = player.seekable().end(0) + snapshotObject.currentTime;
|
23770 | } else {
|
23771 | cov_260ini1tec.b[10][1]++;
|
23772 | cov_260ini1tec.s[37]++;
|
23773 | currentTime = player.currentTime();
|
23774 | }
|
23775 |
|
23776 | cov_260ini1tec.s[38]++;
|
23777 | player.currentTime(currentTime);
|
23778 | } else {
|
23779 | cov_260ini1tec.b[9][1]++;
|
23780 | }
|
23781 |
|
23782 | cov_260ini1tec.s[39]++;
|
23783 |
|
23784 | if (player.paused()) {
|
23785 | cov_260ini1tec.b[11][0]++;
|
23786 | var playPromise = (cov_260ini1tec.s[40]++, player.play());
|
23787 | cov_260ini1tec.s[41]++;
|
23788 |
|
23789 | if ((cov_260ini1tec.b[13][0]++, playPromise) && (cov_260ini1tec.b[13][1]++, playPromise.catch)) {
|
23790 | cov_260ini1tec.b[12][0]++;
|
23791 | cov_260ini1tec.s[42]++;
|
23792 | playPromise.catch(function (error) {
|
23793 | cov_260ini1tec.f[5]++;
|
23794 | cov_260ini1tec.s[43]++;
|
23795 | videojs$1.log.warn('Play promise rejected in IOS snapshot resume', error);
|
23796 | });
|
23797 | } else {
|
23798 | cov_260ini1tec.b[12][1]++;
|
23799 | }
|
23800 | } else {
|
23801 | cov_260ini1tec.b[11][1]++;
|
23802 | }
|
23803 | } else {
|
23804 | cov_260ini1tec.b[7][1]++;
|
23805 | cov_260ini1tec.s[44]++;
|
23806 |
|
23807 | if (snapshotObject.ended) {
|
23808 | cov_260ini1tec.b[14][0]++;
|
23809 | cov_260ini1tec.s[45]++;
|
23810 | player.currentTime(player.duration());
|
23811 | } else {
|
23812 | cov_260ini1tec.b[14][1]++;
|
23813 | cov_260ini1tec.s[46]++;
|
23814 | player.currentTime(snapshotObject.currentTime);
|
23815 |
|
23816 | var _playPromise = (cov_260ini1tec.s[47]++, player.play());
|
23817 |
|
23818 | cov_260ini1tec.s[48]++;
|
23819 |
|
23820 | if ((cov_260ini1tec.b[16][0]++, _playPromise) && (cov_260ini1tec.b[16][1]++, _playPromise.catch)) {
|
23821 | cov_260ini1tec.b[15][0]++;
|
23822 | cov_260ini1tec.s[49]++;
|
23823 |
|
23824 | _playPromise.catch(function (error) {
|
23825 | cov_260ini1tec.f[6]++;
|
23826 | cov_260ini1tec.s[50]++;
|
23827 | videojs$1.log.warn('Play promise rejected in snapshot resume', error);
|
23828 | });
|
23829 | } else {
|
23830 | cov_260ini1tec.b[15][1]++;
|
23831 | }
|
23832 | }
|
23833 | }
|
23834 |
|
23835 | cov_260ini1tec.s[51]++;
|
23836 |
|
23837 | if (player.ads.shouldRemoveAutoplay_) {
|
23838 | cov_260ini1tec.b[17][0]++;
|
23839 | cov_260ini1tec.s[52]++;
|
23840 | player.autoplay(false);
|
23841 | cov_260ini1tec.s[53]++;
|
23842 | player.ads.shouldRemoveAutoplay_ = false;
|
23843 | } else {
|
23844 | cov_260ini1tec.b[17][1]++;
|
23845 | }
|
23846 | };
|
23847 |
|
23848 | cov_260ini1tec.s[54]++;
|
23849 |
|
23850 | var tryToResume = function tryToResume() {
|
23851 | cov_260ini1tec.f[7]++;
|
23852 | cov_260ini1tec.s[55]++;
|
23853 | player.off('contentcanplay', tryToResume);
|
23854 | cov_260ini1tec.s[56]++;
|
23855 |
|
23856 | if (tryToResumeTimeout_) {
|
23857 | cov_260ini1tec.b[18][0]++;
|
23858 | cov_260ini1tec.s[57]++;
|
23859 | player.clearTimeout(tryToResumeTimeout_);
|
23860 | } else {
|
23861 | cov_260ini1tec.b[18][1]++;
|
23862 | }
|
23863 |
|
23864 | cov_260ini1tec.s[58]++;
|
23865 | tech = player.el().querySelector('.vjs-tech');
|
23866 | cov_260ini1tec.s[59]++;
|
23867 |
|
23868 | if (tech.readyState > 1) {
|
23869 | cov_260ini1tec.b[19][0]++;
|
23870 | cov_260ini1tec.s[60]++;
|
23871 | return resume();
|
23872 | } else {
|
23873 | cov_260ini1tec.b[19][1]++;
|
23874 | }
|
23875 |
|
23876 | cov_260ini1tec.s[61]++;
|
23877 |
|
23878 | if (tech.seekable === undefined) {
|
23879 | cov_260ini1tec.b[20][0]++;
|
23880 | cov_260ini1tec.s[62]++;
|
23881 | return resume();
|
23882 | } else {
|
23883 | cov_260ini1tec.b[20][1]++;
|
23884 | }
|
23885 |
|
23886 | cov_260ini1tec.s[63]++;
|
23887 |
|
23888 | if (tech.seekable.length > 0) {
|
23889 | cov_260ini1tec.b[21][0]++;
|
23890 | cov_260ini1tec.s[64]++;
|
23891 | return resume();
|
23892 | } else {
|
23893 | cov_260ini1tec.b[21][1]++;
|
23894 | }
|
23895 |
|
23896 | cov_260ini1tec.s[65]++;
|
23897 |
|
23898 | if (attempts--) {
|
23899 | cov_260ini1tec.b[22][0]++;
|
23900 | cov_260ini1tec.s[66]++;
|
23901 | player.setTimeout(tryToResume, 50);
|
23902 | } else {
|
23903 | cov_260ini1tec.b[22][1]++;
|
23904 | cov_260ini1tec.s[67]++;
|
23905 |
|
23906 | try {
|
23907 | cov_260ini1tec.s[68]++;
|
23908 | resume();
|
23909 | } catch (e) {
|
23910 | cov_260ini1tec.s[69]++;
|
23911 | videojs$1.log.warn('Failed to resume the content after an advertisement', e);
|
23912 | }
|
23913 | }
|
23914 | };
|
23915 |
|
23916 | cov_260ini1tec.s[70]++;
|
23917 |
|
23918 | if ('style' in snapshotObject) {
|
23919 | cov_260ini1tec.b[23][0]++;
|
23920 | cov_260ini1tec.s[71]++;
|
23921 | tech.setAttribute('style', (cov_260ini1tec.b[24][0]++, snapshotObject.style) || (cov_260ini1tec.b[24][1]++, ''));
|
23922 | } else {
|
23923 | cov_260ini1tec.b[23][1]++;
|
23924 | }
|
23925 |
|
23926 | cov_260ini1tec.s[72]++;
|
23927 |
|
23928 | if (player.ads.videoElementRecycled()) {
|
23929 | cov_260ini1tec.b[25][0]++;
|
23930 | cov_260ini1tec.s[73]++;
|
23931 | player.one('resumeended', function () {
|
23932 | cov_260ini1tec.f[8]++;
|
23933 | cov_260ini1tec.s[74]++;
|
23934 | delete player.ads.snapshot;
|
23935 | cov_260ini1tec.s[75]++;
|
23936 | callback();
|
23937 | });
|
23938 | cov_260ini1tec.s[76]++;
|
23939 | player.one('contentloadedmetadata', restoreTracks);
|
23940 | cov_260ini1tec.s[77]++;
|
23941 |
|
23942 | if ((cov_260ini1tec.b[27][0]++, videojs$1.browser.IS_IOS) && (cov_260ini1tec.b[27][1]++, !player.autoplay())) {
|
23943 | cov_260ini1tec.b[26][0]++;
|
23944 | cov_260ini1tec.s[78]++;
|
23945 | player.autoplay(true);
|
23946 | cov_260ini1tec.s[79]++;
|
23947 | player.ads.shouldRemoveAutoplay_ = true;
|
23948 | } else {
|
23949 | cov_260ini1tec.b[26][1]++;
|
23950 | }
|
23951 |
|
23952 | cov_260ini1tec.s[80]++;
|
23953 | player.src(snapshotObject.sources);
|
23954 | cov_260ini1tec.s[81]++;
|
23955 | player.one('contentcanplay', tryToResume);
|
23956 | cov_260ini1tec.s[82]++;
|
23957 | tryToResumeTimeout_ = player.setTimeout(tryToResume, 2000);
|
23958 | } else {
|
23959 | cov_260ini1tec.b[25][1]++;
|
23960 | cov_260ini1tec.s[83]++;
|
23961 | restoreTracks();
|
23962 | cov_260ini1tec.s[84]++;
|
23963 |
|
23964 | if (!player.ended()) {
|
23965 | cov_260ini1tec.b[28][0]++;
|
23966 | var playPromise = (cov_260ini1tec.s[85]++, player.play());
|
23967 | cov_260ini1tec.s[86]++;
|
23968 |
|
23969 | if ((cov_260ini1tec.b[30][0]++, playPromise) && (cov_260ini1tec.b[30][1]++, playPromise.catch)) {
|
23970 | cov_260ini1tec.b[29][0]++;
|
23971 | cov_260ini1tec.s[87]++;
|
23972 | playPromise.catch(function (error) {
|
23973 | cov_260ini1tec.f[9]++;
|
23974 | cov_260ini1tec.s[88]++;
|
23975 | videojs$1.log.warn('Play promise rejected in snapshot restore', error);
|
23976 | });
|
23977 | } else {
|
23978 | cov_260ini1tec.b[29][1]++;
|
23979 | }
|
23980 | } else {
|
23981 | cov_260ini1tec.b[28][1]++;
|
23982 | }
|
23983 |
|
23984 | cov_260ini1tec.s[89]++;
|
23985 | delete player.ads.snapshot;
|
23986 | cov_260ini1tec.s[90]++;
|
23987 | callback();
|
23988 | }
|
23989 | }
|
23990 |
|
23991 | QUnit.module('Video Snapshot', sharedModuleHooks({
|
23992 | beforeEach: function beforeEach() {
|
23993 | var captionTrack = document_1.createElement('track');
|
23994 | var otherTrack = document_1.createElement('track');
|
23995 | captionTrack.setAttribute('kind', 'captions');
|
23996 | captionTrack.setAttribute('src', '/test/integration/lib/testcaption.vtt');
|
23997 | otherTrack.setAttribute('src', '/test/integration/lib/testcaption.vtt');
|
23998 | this.video.appendChild(captionTrack);
|
23999 | this.video.appendChild(otherTrack);
|
24000 |
|
24001 | this.player.ended = function () {
|
24002 | return false;
|
24003 | };
|
24004 | }
|
24005 | }));
|
24006 | QUnit.test('restores the original video src after ads', function (assert) {
|
24007 | var originalSrc = {
|
24008 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
24009 | type: 'video/webm'
|
24010 | };
|
24011 | this.player.src(originalSrc);
|
24012 | this.player.trigger('adsready');
|
24013 | this.player.trigger('play');
|
24014 | this.player.ads.startLinearAdMode();
|
24015 | this.player.src({
|
24016 | src: '//example.com/ad.webm',
|
24017 | type: 'video/webm'
|
24018 | });
|
24019 | this.player.ads.endLinearAdMode();
|
24020 | assert.strictEqual(this.player.currentSrc(), originalSrc.src, 'the original src is restored');
|
24021 | });
|
24022 | QUnit.test('waits for the video to become seekable before restoring the time', function (assert) {
|
24023 | assert.expect(2);
|
24024 | this.player.trigger('adsready');
|
24025 | this.player.trigger('play');
|
24026 |
|
24027 | var setTimeoutSpy = sinon.spy(window_1, 'setTimeout');
|
24028 | this.video.currentTime = 100;
|
24029 | this.player.ads.startLinearAdMode();
|
24030 | this.player.src({
|
24031 | src: '//example.com/ad.webm',
|
24032 | type: 'video/webm'
|
24033 | });
|
24034 |
|
24035 | this.video.currentTime = 0;
|
24036 | this.player.ads.endLinearAdMode();
|
24037 |
|
24038 | setTimeoutSpy.reset();
|
24039 | this.player.trigger('canplay');
|
24040 | assert.strictEqual(setTimeoutSpy.callCount, 1, 'restoring the time should be delayed');
|
24041 | assert.strictEqual(this.video.currentTime, 0, 'currentTime is not modified');
|
24042 | window_1.setTimeout.restore();
|
24043 | });
|
24044 | QUnit.test('the current time is restored at the end of an ad', function (assert) {
|
24045 | assert.expect(1);
|
24046 | this.player.trigger('adsready');
|
24047 | this.video.currentTime = 100;
|
24048 | this.player.trigger('play');
|
24049 |
|
24050 | this.player.ads.startLinearAdMode();
|
24051 | this.player.src({
|
24052 | src: '//example.com/ad.webm',
|
24053 | type: 'video/webm'
|
24054 | });
|
24055 |
|
24056 | this.video.currentTime = 0;
|
24057 | this.player.ads.endLinearAdMode();
|
24058 | this.player.trigger('canplay');
|
24059 | this.clock.tick(1000);
|
24060 | assert.strictEqual(this.video.currentTime, 100, 'currentTime was restored');
|
24061 | });
|
24062 | QUnit.test('only restores the player snapshot if the src changed', function (assert) {
|
24063 | this.player.trigger('adsready');
|
24064 | this.player.trigger('play');
|
24065 | var playSpy = sinon.spy(this.player, 'play');
|
24066 | var srcSpy = sinon.spy(this.player, 'src');
|
24067 | var currentTimeSpy = sinon.spy(this.player, 'currentTime');
|
24068 |
|
24069 |
|
24070 |
|
24071 | this.player.ads.startLinearAdMode();
|
24072 | this.player.ads.endLinearAdMode();
|
24073 | assert.ok(playSpy.called, 'content playback resumed');
|
24074 | assert.ok(srcSpy.alwaysCalledWithExactly(), 'the src was not reset');
|
24075 | this.player.trigger('playing');
|
24076 |
|
24077 |
|
24078 | this.player.trigger('loadedmetadata');
|
24079 | assert.ok(currentTimeSpy.alwaysCalledWithExactly(), 'no seeking occurred');
|
24080 | });
|
24081 | QUnit.test('snapshot does not resume playback after post-rolls', function (assert) {
|
24082 | var playSpy = sinon.spy(this.player, 'play');
|
24083 |
|
24084 | this.player.src({
|
24085 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
24086 | type: 'video/webm'
|
24087 | });
|
24088 | this.player.trigger('loadstart');
|
24089 | this.player.trigger('loadedmetadata');
|
24090 | this.player.trigger('adsready');
|
24091 | this.player.tech_.trigger('play');
|
24092 |
|
24093 | this.player.ads.startLinearAdMode();
|
24094 | this.player.src({
|
24095 | src: '//example.com/ad.webm',
|
24096 | type: 'video/webm'
|
24097 | });
|
24098 | this.player.trigger('loadstart');
|
24099 | this.player.trigger('loadedmetadata');
|
24100 | this.player.ads.endLinearAdMode();
|
24101 |
|
24102 | this.player.src({
|
24103 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
24104 | type: 'video/webm'
|
24105 | });
|
24106 | this.player.trigger('loadstart');
|
24107 | this.player.trigger('canplay');
|
24108 |
|
24109 |
|
24110 |
|
24111 | this.clock.tick(1000);
|
24112 | assert.strictEqual(playSpy.callCount, 1, 'content playback resumed');
|
24113 | this.player.trigger('playing');
|
24114 |
|
24115 |
|
24116 |
|
24117 | this.player.ended = function () {
|
24118 | return true;
|
24119 | };
|
24120 |
|
24121 | this.player.trigger('ended');
|
24122 | playSpy.reset();
|
24123 |
|
24124 | this.player.ads.startLinearAdMode();
|
24125 | this.player.src({
|
24126 | src: '//example.com/ad.webm',
|
24127 | type: 'video/webm'
|
24128 | });
|
24129 | this.player.trigger('loadstart');
|
24130 | this.player.trigger('loadedmetadata');
|
24131 | this.player.ads.endLinearAdMode();
|
24132 | this.player.trigger('playing');
|
24133 | this.player.trigger('ended');
|
24134 | assert.strictEqual(playSpy.callCount, 0, 'content playback should not have been resumed');
|
24135 | });
|
24136 | QUnit.test('snapshot does not resume playback after a burned-in post-roll', function (assert) {
|
24137 | this.player.trigger('adsready');
|
24138 | this.player.trigger('play');
|
24139 | var playSpy = sinon.spy(this.player, 'play');
|
24140 | var loadSpy = sinon.spy(this.player, 'load');
|
24141 | this.player.ads.startLinearAdMode();
|
24142 | this.player.ads.endLinearAdMode();
|
24143 | this.player.trigger('playing');
|
24144 | assert.ok(playSpy.called, 'content playback resumed');
|
24145 |
|
24146 |
|
24147 |
|
24148 | this.player.ended = function () {
|
24149 | return true;
|
24150 | };
|
24151 |
|
24152 | this.player.trigger('ended');
|
24153 | playSpy.reset();
|
24154 |
|
24155 | this.player.currentTime(30);
|
24156 | this.player.ads.startLinearAdMode();
|
24157 | this.player.currentTime(50);
|
24158 | this.player.ads.endLinearAdMode();
|
24159 | this.player.trigger('ended');
|
24160 | assert.strictEqual(this.player.currentTime(), 50, 'currentTime should not be reset using burned in ads');
|
24161 | assert.notOk(loadSpy.called, 'player.load() should not be called if the player is ended.');
|
24162 | assert.notOk(playSpy.called, 'content playback should not have been resumed');
|
24163 | });
|
24164 | QUnit.test('snapshot does not resume playback after multiple post-rolls', function (assert) {
|
24165 | this.player.src({
|
24166 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
24167 | type: 'video/webm'
|
24168 | });
|
24169 | this.player.trigger('loadstart');
|
24170 | this.player.trigger('adsready');
|
24171 | this.player.trigger('play');
|
24172 | var playSpy = sinon.spy(this.player, 'play');
|
24173 |
|
24174 |
|
24175 |
|
24176 | this.player.ads.startLinearAdMode();
|
24177 | this.player.ads.endLinearAdMode();
|
24178 | this.player.trigger('playing');
|
24179 | assert.ok(playSpy.called, 'content playback resumed');
|
24180 |
|
24181 |
|
24182 |
|
24183 | this.player.ended = function () {
|
24184 | return true;
|
24185 | };
|
24186 |
|
24187 | this.player.trigger('ended');
|
24188 | playSpy.reset();
|
24189 |
|
24190 | this.player.ads.startLinearAdMode();
|
24191 | this.player.src({
|
24192 | src: 'http://example.com/ad1.webm',
|
24193 | type: 'video/webm'
|
24194 | });
|
24195 | this.player.trigger('loadstart');
|
24196 | this.player.src({
|
24197 | src: 'http://example.com/ad2.webm',
|
24198 | type: 'video/webm'
|
24199 | });
|
24200 | this.player.trigger('loadstart');
|
24201 | this.player.ads.endLinearAdMode();
|
24202 | this.player.trigger('playing');
|
24203 | this.player.trigger('ended');
|
24204 | assert.notOk(playSpy.called, 'content playback should not resume');
|
24205 | });
|
24206 | QUnit.test('changing the source and then timing out does not restore a snapshot', function (assert) {
|
24207 | this.player.paused = function () {
|
24208 | return false;
|
24209 | };
|
24210 |
|
24211 |
|
24212 | this.player.src({
|
24213 | src: 'http://example.com/movie.webm',
|
24214 | type: 'video/webm'
|
24215 | });
|
24216 | this.player.trigger('loadstart');
|
24217 | this.player.trigger('play');
|
24218 | this.player.trigger('adsready');
|
24219 |
|
24220 | this.player.ads.startLinearAdMode();
|
24221 | this.player.ads.endLinearAdMode();
|
24222 | this.player.trigger('playing');
|
24223 |
|
24224 | this.player.src({
|
24225 | src: 'http://example.com/movie2.webm',
|
24226 | type: 'video/webm'
|
24227 | });
|
24228 | this.player.trigger('loadstart');
|
24229 | this.player.trigger('adtimeout');
|
24230 | assert.strictEqual('http://example.com/movie2.webm', this.player.currentSrc(), 'playing the second video');
|
24231 | });
|
24232 |
|
24233 |
|
24234 |
|
24235 | QUnit.test('checks for a src attribute change that isn\'t reflected in currentSrc', function (assert) {
|
24236 | var updatedSrc;
|
24237 |
|
24238 | this.player.currentSource = function () {
|
24239 | return {
|
24240 | src: 'content.webm',
|
24241 | type: 'video/webm'
|
24242 | };
|
24243 | };
|
24244 |
|
24245 | this.player.trigger('adsready');
|
24246 | this.player.trigger('play');
|
24247 | this.player.ads.startLinearAdMode();
|
24248 |
|
24249 |
|
24250 |
|
24251 | this.player.tech_.src = function (source) {
|
24252 | if (source === undefined) {
|
24253 | return 'ad.webm';
|
24254 | }
|
24255 |
|
24256 | updatedSrc = source;
|
24257 | };
|
24258 |
|
24259 | this.player.src = function (source) {
|
24260 | if (source === undefined) {
|
24261 | return 'ad.webm';
|
24262 | }
|
24263 |
|
24264 | updatedSrc = source;
|
24265 | };
|
24266 |
|
24267 | this.player.ads.endLinearAdMode();
|
24268 | this.player.trigger('playing');
|
24269 | assert.deepEqual(updatedSrc, [this.player.currentSource()], 'restored src attribute');
|
24270 | });
|
24271 | QUnit.test('When captions are enabled, the content\'s tracks will be disabled during the ad', function (assert) {
|
24272 | var trackSrc = '/test/integration/lib/testcaption.vtt';
|
24273 |
|
24274 | var remoteTrack = this.player.addRemoteTextTrack({
|
24275 | kind: 'captions',
|
24276 | language: 'fr',
|
24277 | label: 'French',
|
24278 | src: trackSrc
|
24279 | });
|
24280 | var tracks = this.player.textTracks ? this.player.textTracks() : [];
|
24281 | var showing = 0;
|
24282 | var disabled = 0;
|
24283 | var i;
|
24284 |
|
24285 | if (tracks.length <= 0) {
|
24286 | assert.expect(0);
|
24287 | videojs$1.log.warn('Did not detect text track support, skipping');
|
24288 | return;
|
24289 | }
|
24290 |
|
24291 | assert.expect(3);
|
24292 | this.player.trigger('adsready');
|
24293 | this.player.trigger('play');
|
24294 |
|
24295 | for (i = 0; i < tracks.length; i++) {
|
24296 | tracks[i].mode = 'showing';
|
24297 | }
|
24298 |
|
24299 | for (i = 0; i < tracks.length; i++) {
|
24300 | if (tracks[i].mode === 'showing') {
|
24301 | showing++;
|
24302 | }
|
24303 | }
|
24304 |
|
24305 | assert.strictEqual(showing, tracks.length, 'all tracks should be showing');
|
24306 | showing = 0;
|
24307 | this.player.ads.startLinearAdMode();
|
24308 |
|
24309 | for (i = 0; i < tracks.length; i++) {
|
24310 | if (tracks[i].mode === 'disabled') {
|
24311 | disabled++;
|
24312 | }
|
24313 | }
|
24314 |
|
24315 | assert.strictEqual(disabled, tracks.length, 'all tracks should be disabled');
|
24316 | this.player.ads.endLinearAdMode();
|
24317 |
|
24318 | for (i = 0; i < tracks.length; i++) {
|
24319 | if (tracks[i].mode === 'showing') {
|
24320 | showing++;
|
24321 | }
|
24322 | }
|
24323 |
|
24324 | assert.strictEqual(showing, tracks.length, 'all tracks should be showing');
|
24325 |
|
24326 | this.player.textTracks().removeTrack(remoteTrack);
|
24327 | });
|
24328 | QUnit.test('No snapshot if duration is Infinity', function (assert) {
|
24329 | var originalSrc = 'foobar';
|
24330 | var newSrc = 'barbaz';
|
24331 | this.player.duration(Infinity);
|
24332 | this.player.src({
|
24333 | src: originalSrc,
|
24334 | type: 'video/webm'
|
24335 | });
|
24336 | this.player.trigger('adsready');
|
24337 | this.player.play();
|
24338 | this.player.ads.startLinearAdMode();
|
24339 | this.player.src({
|
24340 | src: newSrc,
|
24341 | type: 'video/webm'
|
24342 | });
|
24343 | this.player.ads.endLinearAdMode();
|
24344 | assert.strictEqual(this.player.currentSrc(), newSrc, 'source is not reset');
|
24345 | });
|
24346 | QUnit.test('Snapshot and text tracks', function (assert) {
|
24347 | var trackSrc = '/test/integration/lib/testcaption.vtt';
|
24348 | var originalAddTrack = this.player.addTextTrack;
|
24349 | var originalTextTracks = this.player.textTracks;
|
24350 |
|
24351 | assert.equal(this.player.textTracks().length, 0);
|
24352 | this.player.addTextTrack('captions', 'Spanish', 'es');
|
24353 |
|
24354 | var remoteTrack = this.player.addRemoteTextTrack({
|
24355 | kind: 'captions',
|
24356 | language: 'fr',
|
24357 | label: 'French',
|
24358 | src: trackSrc
|
24359 | });
|
24360 |
|
24361 | this.player.textTracks()[0].mode = 'showing';
|
24362 | this.player.textTracks()[1].mode = 'showing';
|
24363 |
|
24364 | assert.equal(this.player.textTracks().length, 2);
|
24365 | assert.equal(this.player.textTracks()[0].kind, 'captions');
|
24366 | assert.equal(this.player.textTracks()[0].language, 'es');
|
24367 | assert.equal(this.player.textTracks()[0].mode, 'showing');
|
24368 | assert.equal(this.player.remoteTextTrackEls().trackElements_[0].src, trackSrc);
|
24369 | assert.equal(this.player.textTracks()[1].kind, 'captions');
|
24370 | assert.equal(this.player.textTracks()[1].language, 'fr');
|
24371 | assert.equal(this.player.textTracks()[1].mode, 'showing');
|
24372 |
|
24373 | this.player.ads.snapshot = getPlayerSnapshot(this.player);
|
24374 |
|
24375 | assert.equal(this.player.ads.snapshot.suppressedTracks.length, 2);
|
24376 | assert.equal(this.player.ads.snapshot.suppressedTracks[0].track.kind, 'captions');
|
24377 | assert.equal(this.player.ads.snapshot.suppressedTracks[0].track.language, 'es');
|
24378 | assert.equal(this.player.ads.snapshot.suppressedTracks[0].mode, 'showing');
|
24379 | assert.equal(this.player.ads.snapshot.suppressedTracks[1].track.kind, 'captions');
|
24380 | assert.equal(this.player.ads.snapshot.suppressedTracks[1].track.language, 'fr');
|
24381 | assert.equal(this.player.ads.snapshot.suppressedTracks[1].mode, 'showing');
|
24382 |
|
24383 | assert.equal(this.player.textTracks().length, 2);
|
24384 | assert.equal(this.player.textTracks()[0].kind, 'captions');
|
24385 | assert.equal(this.player.textTracks()[0].language, 'es');
|
24386 | assert.equal(this.player.textTracks()[0].mode, 'disabled');
|
24387 | assert.equal(this.player.remoteTextTrackEls().trackElements_[0].src, trackSrc);
|
24388 | assert.equal(this.player.textTracks()[1].kind, 'captions');
|
24389 | assert.equal(this.player.textTracks()[1].language, 'fr');
|
24390 | assert.equal(this.player.textTracks()[1].mode, 'disabled');
|
24391 |
|
24392 | this.clock.tick(3000);
|
24393 | assert.equal(this.player.textTracks()[0].mode, 'disabled');
|
24394 | assert.equal(this.player.textTracks()[1].mode, 'disabled');
|
24395 |
|
24396 | restorePlayerSnapshot(this.player);
|
24397 |
|
24398 | assert.equal(this.player.textTracks().length, 2);
|
24399 | assert.equal(this.player.textTracks()[0].kind, 'captions');
|
24400 | assert.equal(this.player.textTracks()[0].language, 'es');
|
24401 | assert.equal(this.player.textTracks()[0].mode, 'showing');
|
24402 | assert.equal(this.player.remoteTextTrackEls().trackElements_[0].src, trackSrc);
|
24403 | assert.equal(this.player.textTracks()[1].kind, 'captions');
|
24404 | assert.equal(this.player.textTracks()[1].language, 'fr');
|
24405 | assert.equal(this.player.textTracks()[1].mode, 'showing');
|
24406 |
|
24407 | this.player.textTracks().removeTrack(remoteTrack);
|
24408 | this.player.addTextTrack = originalAddTrack;
|
24409 | this.player.textTracks = originalTextTracks;
|
24410 | });
|
24411 | QUnit.test('Snapshot object is cleaned up', function (assert) {
|
24412 | assert.equal(typeof this.player.ads.snapshot, 'undefined', 'no snapshot before ad');
|
24413 | this.player.ads.snapshot = getPlayerSnapshot(this.player);
|
24414 | assert.equal(typeof this.player.ads.snapshot, 'object', 'snapshot during ad');
|
24415 | restorePlayerSnapshot(this.player);
|
24416 | assert.equal(typeof this.player.ads.snapshot, 'undefined', 'no snapshot after ad');
|
24417 | });
|
24418 | QUnit.test('Call play after live preroll on iOS', function (assert) {
|
24419 | var played = 0;
|
24420 | this.player.duration(Infinity);
|
24421 |
|
24422 | this.player.ads.videoElementRecycled = function () {
|
24423 | return true;
|
24424 | };
|
24425 |
|
24426 | videojs$1.browser = {
|
24427 | IS_IOS: true
|
24428 | };
|
24429 |
|
24430 | this.player.play = function () {
|
24431 | played++;
|
24432 | };
|
24433 |
|
24434 | this.player.trigger('loadstart');
|
24435 | this.player.trigger('adsready');
|
24436 | this.player.trigger('play');
|
24437 | this.player.ads.startLinearAdMode();
|
24438 | this.player.ads.endLinearAdMode();
|
24439 |
|
24440 | this.player.el().querySelector = function (query) {
|
24441 | if (query === '.vjs-tech') {
|
24442 | return {
|
24443 | seekable: {
|
24444 | length: 1
|
24445 | }
|
24446 | };
|
24447 | }
|
24448 | };
|
24449 |
|
24450 | assert.strictEqual(played, 0, 'No play yet');
|
24451 | this.player.trigger('contentcanplay');
|
24452 | assert.strictEqual(played, 1, 'Play happened');
|
24453 | });
|
24454 |
|
24455 | var cov_1hkqlehx01 = function () {
|
24456 | var path = '/Users/poneill/dev/videojs-contrib-ads/examples/stitched-ad-plugin/plugin.js',
|
24457 | hash = '110855b4e069b06920ecbe2bb20574656b366001',
|
24458 | Function = function () {}.constructor,
|
24459 | global = new Function('return this')(),
|
24460 | gcv = '__coverage__',
|
24461 | coverageData = {
|
24462 | path: '/Users/poneill/dev/videojs-contrib-ads/examples/stitched-ad-plugin/plugin.js',
|
24463 | statementMap: {
|
24464 | '0': {
|
24465 | start: {
|
24466 | line: 11,
|
24467 | column: 0
|
24468 | },
|
24469 | end: {
|
24470 | line: 68,
|
24471 | column: 3
|
24472 | }
|
24473 | },
|
24474 | '1': {
|
24475 | start: {
|
24476 | line: 12,
|
24477 | column: 15
|
24478 | },
|
24479 | end: {
|
24480 | line: 12,
|
24481 | column: 19
|
24482 | }
|
24483 | },
|
24484 | '2': {
|
24485 | start: {
|
24486 | line: 14,
|
24487 | column: 2
|
24488 | },
|
24489 | end: {
|
24490 | line: 14,
|
24491 | column: 26
|
24492 | }
|
24493 | },
|
24494 | '3': {
|
24495 | start: {
|
24496 | line: 15,
|
24497 | column: 2
|
24498 | },
|
24499 | end: {
|
24500 | line: 15,
|
24501 | column: 29
|
24502 | }
|
24503 | },
|
24504 | '4': {
|
24505 | start: {
|
24506 | line: 18,
|
24507 | column: 2
|
24508 | },
|
24509 | end: {
|
24510 | line: 18,
|
24511 | column: 22
|
24512 | }
|
24513 | },
|
24514 | '5': {
|
24515 | start: {
|
24516 | line: 20,
|
24517 | column: 2
|
24518 | },
|
24519 | end: {
|
24520 | line: 67,
|
24521 | column: 5
|
24522 | }
|
24523 | },
|
24524 | '6': {
|
24525 | start: {
|
24526 | line: 21,
|
24527 | column: 4
|
24528 | },
|
24529 | end: {
|
24530 | line: 66,
|
24531 | column: 7
|
24532 | }
|
24533 | },
|
24534 | '7': {
|
24535 | start: {
|
24536 | line: 22,
|
24537 | column: 30
|
24538 | },
|
24539 | end: {
|
24540 | line: 22,
|
24541 | column: 35
|
24542 | }
|
24543 | },
|
24544 | '8': {
|
24545 | start: {
|
24546 | line: 23,
|
24547 | column: 31
|
24548 | },
|
24549 | end: {
|
24550 | line: 23,
|
24551 | column: 36
|
24552 | }
|
24553 | },
|
24554 | '9': {
|
24555 | start: {
|
24556 | line: 24,
|
24557 | column: 32
|
24558 | },
|
24559 | end: {
|
24560 | line: 24,
|
24561 | column: 37
|
24562 | }
|
24563 | },
|
24564 | '10': {
|
24565 | start: {
|
24566 | line: 25,
|
24567 | column: 30
|
24568 | },
|
24569 | end: {
|
24570 | line: 25,
|
24571 | column: 35
|
24572 | }
|
24573 | },
|
24574 | '11': {
|
24575 | start: {
|
24576 | line: 28,
|
24577 | column: 6
|
24578 | },
|
24579 | end: {
|
24580 | line: 28,
|
24581 | column: 37
|
24582 | }
|
24583 | },
|
24584 | '12': {
|
24585 | start: {
|
24586 | line: 33,
|
24587 | column: 6
|
24588 | },
|
24589 | end: {
|
24590 | line: 65,
|
24591 | column: 9
|
24592 | }
|
24593 | },
|
24594 | '13': {
|
24595 | start: {
|
24596 | line: 34,
|
24597 | column: 26
|
24598 | },
|
24599 | end: {
|
24600 | line: 34,
|
24601 | column: 46
|
24602 | }
|
24603 | },
|
24604 | '14': {
|
24605 | start: {
|
24606 | line: 35,
|
24607 | column: 23
|
24608 | },
|
24609 | end: {
|
24610 | line: 35,
|
24611 | column: 40
|
24612 | }
|
24613 | },
|
24614 | '15': {
|
24615 | start: {
|
24616 | line: 38,
|
24617 | column: 8
|
24618 | },
|
24619 | end: {
|
24620 | line: 42,
|
24621 | column: 9
|
24622 | }
|
24623 | },
|
24624 | '16': {
|
24625 | start: {
|
24626 | line: 39,
|
24627 | column: 10
|
24628 | },
|
24629 | end: {
|
24630 | line: 39,
|
24631 | column: 35
|
24632 | }
|
24633 | },
|
24634 | '17': {
|
24635 | start: {
|
24636 | line: 40,
|
24637 | column: 10
|
24638 | },
|
24639 | end: {
|
24640 | line: 40,
|
24641 | column: 39
|
24642 | }
|
24643 | },
|
24644 | '18': {
|
24645 | start: {
|
24646 | line: 41,
|
24647 | column: 10
|
24648 | },
|
24649 | end: {
|
24650 | line: 41,
|
24651 | column: 17
|
24652 | }
|
24653 | },
|
24654 | '19': {
|
24655 | start: {
|
24656 | line: 45,
|
24657 | column: 8
|
24658 | },
|
24659 | end: {
|
24660 | line: 49,
|
24661 | column: 9
|
24662 | }
|
24663 | },
|
24664 | '20': {
|
24665 | start: {
|
24666 | line: 46,
|
24667 | column: 10
|
24668 | },
|
24669 | end: {
|
24670 | line: 46,
|
24671 | column: 36
|
24672 | }
|
24673 | },
|
24674 | '21': {
|
24675 | start: {
|
24676 | line: 47,
|
24677 | column: 10
|
24678 | },
|
24679 | end: {
|
24680 | line: 47,
|
24681 | column: 41
|
24682 | }
|
24683 | },
|
24684 | '22': {
|
24685 | start: {
|
24686 | line: 48,
|
24687 | column: 10
|
24688 | },
|
24689 | end: {
|
24690 | line: 48,
|
24691 | column: 17
|
24692 | }
|
24693 | },
|
24694 | '23': {
|
24695 | start: {
|
24696 | line: 52,
|
24697 | column: 8
|
24698 | },
|
24699 | end: {
|
24700 | line: 56,
|
24701 | column: 9
|
24702 | }
|
24703 | },
|
24704 | '24': {
|
24705 | start: {
|
24706 | line: 53,
|
24707 | column: 10
|
24708 | },
|
24709 | end: {
|
24710 | line: 53,
|
24711 | column: 35
|
24712 | }
|
24713 | },
|
24714 | '25': {
|
24715 | start: {
|
24716 | line: 54,
|
24717 | column: 10
|
24718 | },
|
24719 | end: {
|
24720 | line: 54,
|
24721 | column: 39
|
24722 | }
|
24723 | },
|
24724 | '26': {
|
24725 | start: {
|
24726 | line: 55,
|
24727 | column: 10
|
24728 | },
|
24729 | end: {
|
24730 | line: 55,
|
24731 | column: 17
|
24732 | }
|
24733 | },
|
24734 | '27': {
|
24735 | start: {
|
24736 | line: 60,
|
24737 | column: 8
|
24738 | },
|
24739 | end: {
|
24740 | line: 64,
|
24741 | column: 9
|
24742 | }
|
24743 | },
|
24744 | '28': {
|
24745 | start: {
|
24746 | line: 61,
|
24747 | column: 10
|
24748 | },
|
24749 | end: {
|
24750 | line: 61,
|
24751 | column: 37
|
24752 | }
|
24753 | },
|
24754 | '29': {
|
24755 | start: {
|
24756 | line: 62,
|
24757 | column: 10
|
24758 | },
|
24759 | end: {
|
24760 | line: 62,
|
24761 | column: 41
|
24762 | }
|
24763 | },
|
24764 | '30': {
|
24765 | start: {
|
24766 | line: 63,
|
24767 | column: 10
|
24768 | },
|
24769 | end: {
|
24770 | line: 63,
|
24771 | column: 17
|
24772 | }
|
24773 | }
|
24774 | },
|
24775 | fnMap: {
|
24776 | '0': {
|
24777 | name: '(anonymous_0)',
|
24778 | decl: {
|
24779 | start: {
|
24780 | line: 11,
|
24781 | column: 45
|
24782 | },
|
24783 | end: {
|
24784 | line: 11,
|
24785 | column: 46
|
24786 | }
|
24787 | },
|
24788 | loc: {
|
24789 | start: {
|
24790 | line: 11,
|
24791 | column: 63
|
24792 | },
|
24793 | end: {
|
24794 | line: 68,
|
24795 | column: 1
|
24796 | }
|
24797 | },
|
24798 | line: 11
|
24799 | },
|
24800 | '1': {
|
24801 | name: '(anonymous_1)',
|
24802 | decl: {
|
24803 | start: {
|
24804 | line: 20,
|
24805 | column: 23
|
24806 | },
|
24807 | end: {
|
24808 | line: 20,
|
24809 | column: 24
|
24810 | }
|
24811 | },
|
24812 | loc: {
|
24813 | start: {
|
24814 | line: 20,
|
24815 | column: 34
|
24816 | },
|
24817 | end: {
|
24818 | line: 67,
|
24819 | column: 3
|
24820 | }
|
24821 | },
|
24822 | line: 20
|
24823 | },
|
24824 | '2': {
|
24825 | name: '(anonymous_2)',
|
24826 | decl: {
|
24827 | start: {
|
24828 | line: 21,
|
24829 | column: 26
|
24830 | },
|
24831 | end: {
|
24832 | line: 21,
|
24833 | column: 27
|
24834 | }
|
24835 | },
|
24836 | loc: {
|
24837 | start: {
|
24838 | line: 21,
|
24839 | column: 37
|
24840 | },
|
24841 | end: {
|
24842 | line: 66,
|
24843 | column: 5
|
24844 | }
|
24845 | },
|
24846 | line: 21
|
24847 | },
|
24848 | '3': {
|
24849 | name: '(anonymous_3)',
|
24850 | decl: {
|
24851 | start: {
|
24852 | line: 33,
|
24853 | column: 48
|
24854 | },
|
24855 | end: {
|
24856 | line: 33,
|
24857 | column: 49
|
24858 | }
|
24859 | },
|
24860 | loc: {
|
24861 | start: {
|
24862 | line: 33,
|
24863 | column: 60
|
24864 | },
|
24865 | end: {
|
24866 | line: 65,
|
24867 | column: 7
|
24868 | }
|
24869 | },
|
24870 | line: 33
|
24871 | }
|
24872 | },
|
24873 | branchMap: {
|
24874 | '0': {
|
24875 | loc: {
|
24876 | start: {
|
24877 | line: 14,
|
24878 | column: 12
|
24879 | },
|
24880 | end: {
|
24881 | line: 14,
|
24882 | column: 25
|
24883 | }
|
24884 | },
|
24885 | type: 'binary-expr',
|
24886 | locations: [{
|
24887 | start: {
|
24888 | line: 14,
|
24889 | column: 12
|
24890 | },
|
24891 | end: {
|
24892 | line: 14,
|
24893 | column: 19
|
24894 | }
|
24895 | }, {
|
24896 | start: {
|
24897 | line: 14,
|
24898 | column: 23
|
24899 | },
|
24900 | end: {
|
24901 | line: 14,
|
24902 | column: 25
|
24903 | }
|
24904 | }],
|
24905 | line: 14
|
24906 | },
|
24907 | '1': {
|
24908 | loc: {
|
24909 | start: {
|
24910 | line: 38,
|
24911 | column: 8
|
24912 | },
|
24913 | end: {
|
24914 | line: 42,
|
24915 | column: 9
|
24916 | }
|
24917 | },
|
24918 | type: 'if',
|
24919 | locations: [{
|
24920 | start: {
|
24921 | line: 38,
|
24922 | column: 8
|
24923 | },
|
24924 | end: {
|
24925 | line: 42,
|
24926 | column: 9
|
24927 | }
|
24928 | }, {
|
24929 | start: {
|
24930 | line: 38,
|
24931 | column: 8
|
24932 | },
|
24933 | end: {
|
24934 | line: 42,
|
24935 | column: 9
|
24936 | }
|
24937 | }],
|
24938 | line: 38
|
24939 | },
|
24940 | '2': {
|
24941 | loc: {
|
24942 | start: {
|
24943 | line: 38,
|
24944 | column: 12
|
24945 | },
|
24946 | end: {
|
24947 | line: 38,
|
24948 | column: 50
|
24949 | }
|
24950 | },
|
24951 | type: 'binary-expr',
|
24952 | locations: [{
|
24953 | start: {
|
24954 | line: 38,
|
24955 | column: 12
|
24956 | },
|
24957 | end: {
|
24958 | line: 38,
|
24959 | column: 30
|
24960 | }
|
24961 | }, {
|
24962 | start: {
|
24963 | line: 38,
|
24964 | column: 34
|
24965 | },
|
24966 | end: {
|
24967 | line: 38,
|
24968 | column: 50
|
24969 | }
|
24970 | }],
|
24971 | line: 38
|
24972 | },
|
24973 | '3': {
|
24974 | loc: {
|
24975 | start: {
|
24976 | line: 45,
|
24977 | column: 8
|
24978 | },
|
24979 | end: {
|
24980 | line: 49,
|
24981 | column: 9
|
24982 | }
|
24983 | },
|
24984 | type: 'if',
|
24985 | locations: [{
|
24986 | start: {
|
24987 | line: 45,
|
24988 | column: 8
|
24989 | },
|
24990 | end: {
|
24991 | line: 49,
|
24992 | column: 9
|
24993 | }
|
24994 | }, {
|
24995 | start: {
|
24996 | line: 45,
|
24997 | column: 8
|
24998 | },
|
24999 | end: {
|
25000 | line: 49,
|
25001 | column: 9
|
25002 | }
|
25003 | }],
|
25004 | line: 45
|
25005 | },
|
25006 | '4': {
|
25007 | loc: {
|
25008 | start: {
|
25009 | line: 45,
|
25010 | column: 12
|
25011 | },
|
25012 | end: {
|
25013 | line: 45,
|
25014 | column: 52
|
25015 | }
|
25016 | },
|
25017 | type: 'binary-expr',
|
25018 | locations: [{
|
25019 | start: {
|
25020 | line: 45,
|
25021 | column: 12
|
25022 | },
|
25023 | end: {
|
25024 | line: 45,
|
25025 | column: 31
|
25026 | }
|
25027 | }, {
|
25028 | start: {
|
25029 | line: 45,
|
25030 | column: 35
|
25031 | },
|
25032 | end: {
|
25033 | line: 45,
|
25034 | column: 52
|
25035 | }
|
25036 | }],
|
25037 | line: 45
|
25038 | },
|
25039 | '5': {
|
25040 | loc: {
|
25041 | start: {
|
25042 | line: 52,
|
25043 | column: 8
|
25044 | },
|
25045 | end: {
|
25046 | line: 56,
|
25047 | column: 9
|
25048 | }
|
25049 | },
|
25050 | type: 'if',
|
25051 | locations: [{
|
25052 | start: {
|
25053 | line: 52,
|
25054 | column: 8
|
25055 | },
|
25056 | end: {
|
25057 | line: 56,
|
25058 | column: 9
|
25059 | }
|
25060 | }, {
|
25061 | start: {
|
25062 | line: 52,
|
25063 | column: 8
|
25064 | },
|
25065 | end: {
|
25066 | line: 56,
|
25067 | column: 9
|
25068 | }
|
25069 | }],
|
25070 | line: 52
|
25071 | },
|
25072 | '6': {
|
25073 | loc: {
|
25074 | start: {
|
25075 | line: 52,
|
25076 | column: 12
|
25077 | },
|
25078 | end: {
|
25079 | line: 52,
|
25080 | column: 51
|
25081 | }
|
25082 | },
|
25083 | type: 'binary-expr',
|
25084 | locations: [{
|
25085 | start: {
|
25086 | line: 52,
|
25087 | column: 12
|
25088 | },
|
25089 | end: {
|
25090 | line: 52,
|
25091 | column: 30
|
25092 | }
|
25093 | }, {
|
25094 | start: {
|
25095 | line: 52,
|
25096 | column: 34
|
25097 | },
|
25098 | end: {
|
25099 | line: 52,
|
25100 | column: 51
|
25101 | }
|
25102 | }],
|
25103 | line: 52
|
25104 | },
|
25105 | '7': {
|
25106 | loc: {
|
25107 | start: {
|
25108 | line: 60,
|
25109 | column: 8
|
25110 | },
|
25111 | end: {
|
25112 | line: 64,
|
25113 | column: 9
|
25114 | }
|
25115 | },
|
25116 | type: 'if',
|
25117 | locations: [{
|
25118 | start: {
|
25119 | line: 60,
|
25120 | column: 8
|
25121 | },
|
25122 | end: {
|
25123 | line: 64,
|
25124 | column: 9
|
25125 | }
|
25126 | }, {
|
25127 | start: {
|
25128 | line: 60,
|
25129 | column: 8
|
25130 | },
|
25131 | end: {
|
25132 | line: 64,
|
25133 | column: 9
|
25134 | }
|
25135 | }],
|
25136 | line: 60
|
25137 | },
|
25138 | '8': {
|
25139 | loc: {
|
25140 | start: {
|
25141 | line: 60,
|
25142 | column: 12
|
25143 | },
|
25144 | end: {
|
25145 | line: 60,
|
25146 | column: 63
|
25147 | }
|
25148 | },
|
25149 | type: 'binary-expr',
|
25150 | locations: [{
|
25151 | start: {
|
25152 | line: 60,
|
25153 | column: 12
|
25154 | },
|
25155 | end: {
|
25156 | line: 60,
|
25157 | column: 32
|
25158 | }
|
25159 | }, {
|
25160 | start: {
|
25161 | line: 60,
|
25162 | column: 36
|
25163 | },
|
25164 | end: {
|
25165 | line: 60,
|
25166 | column: 63
|
25167 | }
|
25168 | }],
|
25169 | line: 60
|
25170 | }
|
25171 | },
|
25172 | s: {
|
25173 | '0': 0,
|
25174 | '1': 0,
|
25175 | '2': 0,
|
25176 | '3': 0,
|
25177 | '4': 0,
|
25178 | '5': 0,
|
25179 | '6': 0,
|
25180 | '7': 0,
|
25181 | '8': 0,
|
25182 | '9': 0,
|
25183 | '10': 0,
|
25184 | '11': 0,
|
25185 | '12': 0,
|
25186 | '13': 0,
|
25187 | '14': 0,
|
25188 | '15': 0,
|
25189 | '16': 0,
|
25190 | '17': 0,
|
25191 | '18': 0,
|
25192 | '19': 0,
|
25193 | '20': 0,
|
25194 | '21': 0,
|
25195 | '22': 0,
|
25196 | '23': 0,
|
25197 | '24': 0,
|
25198 | '25': 0,
|
25199 | '26': 0,
|
25200 | '27': 0,
|
25201 | '28': 0,
|
25202 | '29': 0,
|
25203 | '30': 0
|
25204 | },
|
25205 | f: {
|
25206 | '0': 0,
|
25207 | '1': 0,
|
25208 | '2': 0,
|
25209 | '3': 0
|
25210 | },
|
25211 | b: {
|
25212 | '0': [0, 0],
|
25213 | '1': [0, 0],
|
25214 | '2': [0, 0],
|
25215 | '3': [0, 0],
|
25216 | '4': [0, 0],
|
25217 | '5': [0, 0],
|
25218 | '6': [0, 0],
|
25219 | '7': [0, 0],
|
25220 | '8': [0, 0]
|
25221 | },
|
25222 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
25223 | },
|
25224 | coverage = global[gcv] || (global[gcv] = {});
|
25225 |
|
25226 | if (coverage[path] && coverage[path].hash === hash) {
|
25227 | return coverage[path];
|
25228 | }
|
25229 |
|
25230 | coverageData.hash = hash;
|
25231 | return coverage[path] = coverageData;
|
25232 | }();
|
25233 |
|
25234 | cov_1hkqlehx01.s[0]++;
|
25235 | videojs.registerPlugin('exampleStitchedAds', function (options) {
|
25236 | cov_1hkqlehx01.f[0]++;
|
25237 | var player = (cov_1hkqlehx01.s[1]++, this);
|
25238 | cov_1hkqlehx01.s[2]++;
|
25239 | options = (cov_1hkqlehx01.b[0][0]++, options) || (cov_1hkqlehx01.b[0][1]++, {});
|
25240 | cov_1hkqlehx01.s[3]++;
|
25241 | options.stitchedAds = true;
|
25242 | cov_1hkqlehx01.s[4]++;
|
25243 | player.ads(options);
|
25244 | cov_1hkqlehx01.s[5]++;
|
25245 | player.on('canplay', function () {
|
25246 | cov_1hkqlehx01.f[1]++;
|
25247 | cov_1hkqlehx01.s[6]++;
|
25248 | player.one('playing', function () {
|
25249 | cov_1hkqlehx01.f[2]++;
|
25250 | var havePlayedPreroll = (cov_1hkqlehx01.s[7]++, false);
|
25251 | var haveStartedMidroll = (cov_1hkqlehx01.s[8]++, false);
|
25252 | var haveStartedPostroll = (cov_1hkqlehx01.s[9]++, false);
|
25253 | var havePlayedMidroll = (cov_1hkqlehx01.s[10]++, false);
|
25254 | cov_1hkqlehx01.s[11]++;
|
25255 | player.ads.startLinearAdMode();
|
25256 | cov_1hkqlehx01.s[12]++;
|
25257 | player.on(['timeupdate', 'adtimeupdate'], function (e) {
|
25258 | cov_1hkqlehx01.f[3]++;
|
25259 | var currentTime = (cov_1hkqlehx01.s[13]++, player.currentTime());
|
25260 | var duration = (cov_1hkqlehx01.s[14]++, player.duration());
|
25261 | cov_1hkqlehx01.s[15]++;
|
25262 |
|
25263 | if ((cov_1hkqlehx01.b[2][0]++, !havePlayedPreroll) && (cov_1hkqlehx01.b[2][1]++, currentTime >= 5)) {
|
25264 | cov_1hkqlehx01.b[1][0]++;
|
25265 | cov_1hkqlehx01.s[16]++;
|
25266 | havePlayedPreroll = true;
|
25267 | cov_1hkqlehx01.s[17]++;
|
25268 | player.ads.endLinearAdMode();
|
25269 | cov_1hkqlehx01.s[18]++;
|
25270 | return;
|
25271 | } else {
|
25272 | cov_1hkqlehx01.b[1][1]++;
|
25273 | }
|
25274 |
|
25275 | cov_1hkqlehx01.s[19]++;
|
25276 |
|
25277 | if ((cov_1hkqlehx01.b[4][0]++, !haveStartedMidroll) && (cov_1hkqlehx01.b[4][1]++, currentTime >= 15)) {
|
25278 | cov_1hkqlehx01.b[3][0]++;
|
25279 | cov_1hkqlehx01.s[20]++;
|
25280 | haveStartedMidroll = true;
|
25281 | cov_1hkqlehx01.s[21]++;
|
25282 | player.ads.startLinearAdMode();
|
25283 | cov_1hkqlehx01.s[22]++;
|
25284 | return;
|
25285 | } else {
|
25286 | cov_1hkqlehx01.b[3][1]++;
|
25287 | }
|
25288 |
|
25289 | cov_1hkqlehx01.s[23]++;
|
25290 |
|
25291 | if ((cov_1hkqlehx01.b[6][0]++, !havePlayedMidroll) && (cov_1hkqlehx01.b[6][1]++, currentTime >= 20)) {
|
25292 | cov_1hkqlehx01.b[5][0]++;
|
25293 | cov_1hkqlehx01.s[24]++;
|
25294 | havePlayedMidroll = true;
|
25295 | cov_1hkqlehx01.s[25]++;
|
25296 | player.ads.endLinearAdMode();
|
25297 | cov_1hkqlehx01.s[26]++;
|
25298 | return;
|
25299 | } else {
|
25300 | cov_1hkqlehx01.b[5][1]++;
|
25301 | }
|
25302 |
|
25303 | cov_1hkqlehx01.s[27]++;
|
25304 |
|
25305 | if ((cov_1hkqlehx01.b[8][0]++, !haveStartedPostroll) && (cov_1hkqlehx01.b[8][1]++, currentTime >= duration - 5)) {
|
25306 | cov_1hkqlehx01.b[7][0]++;
|
25307 | cov_1hkqlehx01.s[28]++;
|
25308 | haveStartedPostroll = true;
|
25309 | cov_1hkqlehx01.s[29]++;
|
25310 | player.ads.startLinearAdMode();
|
25311 | cov_1hkqlehx01.s[30]++;
|
25312 | return;
|
25313 | } else {
|
25314 | cov_1hkqlehx01.b[7][1]++;
|
25315 | }
|
25316 | });
|
25317 | });
|
25318 | });
|
25319 | });
|
25320 |
|
25321 | |
25322 |
|
25323 |
|
25324 |
|
25325 |
|
25326 |
|
25327 |
|
25328 |
|
25329 | var originalTestTimeout = QUnit.config.testTimeout;
|
25330 | QUnit.module('Events and Stitched Ads', {
|
25331 | before: function before() {
|
25332 | QUnit.config.testTimeout = 30000;
|
25333 | },
|
25334 | beforeEach: function beforeEach() {
|
25335 | this.video = document_1.createElement('video');
|
25336 | this.fixture = document_1.querySelector('#qunit-fixture');
|
25337 | this.fixture.appendChild(this.video);
|
25338 | this.player = videojs$1(this.video);
|
25339 | this.player.exampleStitchedAds();
|
25340 | this.player.src({
|
25341 | src: 'http://vjs.zencdn.net/v/oceans.webm',
|
25342 | type: 'video/webm'
|
25343 | });
|
25344 |
|
25345 | this.player.muted(true);
|
25346 | },
|
25347 | afterEach: function afterEach() {
|
25348 | this.player.dispose();
|
25349 | },
|
25350 | after: function after() {
|
25351 | QUnit.config.testTimeout = originalTestTimeout;
|
25352 | }
|
25353 | });
|
25354 | QUnit.test('Stitched Ads', function (assert) {
|
25355 | var done = assert.async();
|
25356 | var seenBeforePreroll = [];
|
25357 | var seenDuringPreroll = [];
|
25358 | var seenAfterPreroll = [];
|
25359 | var seenDuringMidroll = [];
|
25360 | var seenAfterMidroll = [];
|
25361 | var currentEventLog = seenBeforePreroll;
|
25362 | var finish;
|
25363 | var events = ['suspend', 'abort', 'error', 'emptied', 'stalled', 'canplay', 'canplaythrough', 'waiting', 'seeking', 'durationchange', 'progress', 'pause', 'ratechange', 'volumechange', 'firstplay', 'suspend', 'playing', 'ended'];
|
25364 | events = events.concat(events.map(function (e) {
|
25365 | return 'ad' + e;
|
25366 | })).concat(events.map(function (e) {
|
25367 | return 'content' + e;
|
25368 | }));
|
25369 | var player = this.player;
|
25370 | player.on('adstart', function () {
|
25371 | if (currentEventLog === seenBeforePreroll) {
|
25372 | currentEventLog = seenDuringPreroll;
|
25373 | } else {
|
25374 | currentEventLog = seenDuringMidroll;
|
25375 | }
|
25376 | });
|
25377 | player.on('adend', function () {
|
25378 | if (currentEventLog === seenDuringPreroll) {
|
25379 | currentEventLog = seenAfterPreroll;
|
25380 | } else {
|
25381 | currentEventLog = seenAfterMidroll;
|
25382 | }
|
25383 | });
|
25384 | player.on(events, function (e) {
|
25385 | return currentEventLog.push(e.type);
|
25386 | });
|
25387 |
|
25388 | var onError = function onError() {
|
25389 | assert.ok(false, 'no errors');
|
25390 | finish();
|
25391 | };
|
25392 |
|
25393 | var onTimeupdate = function onTimeupdate() {
|
25394 | videojs$1.log(player.currentTime(), player.currentSrc());
|
25395 |
|
25396 | if (player.currentTime() > 21) {
|
25397 | seenBeforePreroll.forEach(function (event) {
|
25398 | assert.ok(!/^ad/.test(event), event + ' has no ad prefix before preroll');
|
25399 | assert.ok(!/^content/.test(event), event + ' has no content prefix before preroll');
|
25400 | });
|
25401 | seenDuringPreroll.forEach(function (event) {
|
25402 | assert.ok(/^ad/.test(event), event + ' has ad prefix during preroll');
|
25403 | });
|
25404 | seenAfterPreroll.forEach(function (event) {
|
25405 | assert.ok(!/^ad/.test(event), event + ' has no ad prefix after preroll');
|
25406 | assert.ok(!/^content/.test(event), event + ' has no content prefix after preroll');
|
25407 | });
|
25408 | seenDuringMidroll.forEach(function (event) {
|
25409 | assert.ok(/^ad/.test(event), event + ' has ad prefix during midroll');
|
25410 | });
|
25411 | seenAfterMidroll.forEach(function (event) {
|
25412 | assert.ok(!/^ad/.test(event), event + ' has no ad prefix after midroll');
|
25413 | assert.ok(!/^content/.test(event), event + ' has no content prefix after midroll');
|
25414 | });
|
25415 | finish();
|
25416 | }
|
25417 | };
|
25418 |
|
25419 | finish = function finish() {
|
25420 | player.off('timeupdate', onTimeupdate);
|
25421 | player.off(['error', 'aderror'], onError);
|
25422 | done();
|
25423 | };
|
25424 |
|
25425 | player.on(['error', 'aderror'], onError);
|
25426 | player.on('timeupdate', onTimeupdate);
|
25427 | player.ready(player.play);
|
25428 | });
|
25429 |
|
25430 | var cov_14dmox0qm2 = function () {
|
25431 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states.js',
|
25432 | hash = '35062c79bfb5e34bd72bd6d2cdc3104145d3ea8a',
|
25433 | Function = function () {}.constructor,
|
25434 | global = new Function('return this')(),
|
25435 | gcv = '__coverage__',
|
25436 | coverageData = {
|
25437 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states.js',
|
25438 | statementMap: {
|
25439 | '0': {
|
25440 | start: {
|
25441 | line: 3,
|
25442 | column: 4
|
25443 | },
|
25444 | end: {
|
25445 | line: 5,
|
25446 | column: 5
|
25447 | }
|
25448 | },
|
25449 | '1': {
|
25450 | start: {
|
25451 | line: 4,
|
25452 | column: 6
|
25453 | },
|
25454 | end: {
|
25455 | line: 4,
|
25456 | column: 13
|
25457 | }
|
25458 | },
|
25459 | '2': {
|
25460 | start: {
|
25461 | line: 7,
|
25462 | column: 4
|
25463 | },
|
25464 | end: {
|
25465 | line: 9,
|
25466 | column: 5
|
25467 | }
|
25468 | },
|
25469 | '3': {
|
25470 | start: {
|
25471 | line: 8,
|
25472 | column: 6
|
25473 | },
|
25474 | end: {
|
25475 | line: 8,
|
25476 | column: 34
|
25477 | }
|
25478 | },
|
25479 | '4': {
|
25480 | start: {
|
25481 | line: 13,
|
25482 | column: 4
|
25483 | },
|
25484 | end: {
|
25485 | line: 15,
|
25486 | column: 5
|
25487 | }
|
25488 | },
|
25489 | '5': {
|
25490 | start: {
|
25491 | line: 14,
|
25492 | column: 6
|
25493 | },
|
25494 | end: {
|
25495 | line: 14,
|
25496 | column: 84
|
25497 | }
|
25498 | },
|
25499 | '6': {
|
25500 | start: {
|
25501 | line: 17,
|
25502 | column: 4
|
25503 | },
|
25504 | end: {
|
25505 | line: 19,
|
25506 | column: 5
|
25507 | }
|
25508 | },
|
25509 | '7': {
|
25510 | start: {
|
25511 | line: 18,
|
25512 | column: 6
|
25513 | },
|
25514 | end: {
|
25515 | line: 18,
|
25516 | column: 26
|
25517 | }
|
25518 | },
|
25519 | '8': {
|
25520 | start: {
|
25521 | line: 21,
|
25522 | column: 4
|
25523 | },
|
25524 | end: {
|
25525 | line: 21,
|
25526 | column: 43
|
25527 | }
|
25528 | },
|
25529 | '9': {
|
25530 | start: {
|
25531 | line: 23,
|
25532 | column: 4
|
25533 | },
|
25534 | end: {
|
25535 | line: 23,
|
25536 | column: 27
|
25537 | }
|
25538 | }
|
25539 | },
|
25540 | fnMap: {
|
25541 | '0': {
|
25542 | name: '(anonymous_0)',
|
25543 | decl: {
|
25544 | start: {
|
25545 | line: 2,
|
25546 | column: 2
|
25547 | },
|
25548 | end: {
|
25549 | line: 2,
|
25550 | column: 3
|
25551 | }
|
25552 | },
|
25553 | loc: {
|
25554 | start: {
|
25555 | line: 2,
|
25556 | column: 24
|
25557 | },
|
25558 | end: {
|
25559 | line: 10,
|
25560 | column: 3
|
25561 | }
|
25562 | },
|
25563 | line: 2
|
25564 | },
|
25565 | '1': {
|
25566 | name: '(anonymous_1)',
|
25567 | decl: {
|
25568 | start: {
|
25569 | line: 12,
|
25570 | column: 2
|
25571 | },
|
25572 | end: {
|
25573 | line: 12,
|
25574 | column: 3
|
25575 | }
|
25576 | },
|
25577 | loc: {
|
25578 | start: {
|
25579 | line: 12,
|
25580 | column: 46
|
25581 | },
|
25582 | end: {
|
25583 | line: 24,
|
25584 | column: 3
|
25585 | }
|
25586 | },
|
25587 | line: 12
|
25588 | }
|
25589 | },
|
25590 | branchMap: {
|
25591 | '0': {
|
25592 | loc: {
|
25593 | start: {
|
25594 | line: 3,
|
25595 | column: 4
|
25596 | },
|
25597 | end: {
|
25598 | line: 5,
|
25599 | column: 5
|
25600 | }
|
25601 | },
|
25602 | type: 'if',
|
25603 | locations: [{
|
25604 | start: {
|
25605 | line: 3,
|
25606 | column: 4
|
25607 | },
|
25608 | end: {
|
25609 | line: 5,
|
25610 | column: 5
|
25611 | }
|
25612 | }, {
|
25613 | start: {
|
25614 | line: 3,
|
25615 | column: 4
|
25616 | },
|
25617 | end: {
|
25618 | line: 5,
|
25619 | column: 5
|
25620 | }
|
25621 | }],
|
25622 | line: 3
|
25623 | },
|
25624 | '1': {
|
25625 | loc: {
|
25626 | start: {
|
25627 | line: 7,
|
25628 | column: 4
|
25629 | },
|
25630 | end: {
|
25631 | line: 9,
|
25632 | column: 5
|
25633 | }
|
25634 | },
|
25635 | type: 'if',
|
25636 | locations: [{
|
25637 | start: {
|
25638 | line: 7,
|
25639 | column: 4
|
25640 | },
|
25641 | end: {
|
25642 | line: 9,
|
25643 | column: 5
|
25644 | }
|
25645 | }, {
|
25646 | start: {
|
25647 | line: 7,
|
25648 | column: 4
|
25649 | },
|
25650 | end: {
|
25651 | line: 9,
|
25652 | column: 5
|
25653 | }
|
25654 | }],
|
25655 | line: 7
|
25656 | },
|
25657 | '2': {
|
25658 | loc: {
|
25659 | start: {
|
25660 | line: 7,
|
25661 | column: 8
|
25662 | },
|
25663 | end: {
|
25664 | line: 7,
|
25665 | column: 46
|
25666 | }
|
25667 | },
|
25668 | type: 'binary-expr',
|
25669 | locations: [{
|
25670 | start: {
|
25671 | line: 7,
|
25672 | column: 8
|
25673 | },
|
25674 | end: {
|
25675 | line: 7,
|
25676 | column: 22
|
25677 | }
|
25678 | }, {
|
25679 | start: {
|
25680 | line: 7,
|
25681 | column: 26
|
25682 | },
|
25683 | end: {
|
25684 | line: 7,
|
25685 | column: 46
|
25686 | }
|
25687 | }],
|
25688 | line: 7
|
25689 | },
|
25690 | '3': {
|
25691 | loc: {
|
25692 | start: {
|
25693 | line: 13,
|
25694 | column: 4
|
25695 | },
|
25696 | end: {
|
25697 | line: 15,
|
25698 | column: 5
|
25699 | }
|
25700 | },
|
25701 | type: 'if',
|
25702 | locations: [{
|
25703 | start: {
|
25704 | line: 13,
|
25705 | column: 4
|
25706 | },
|
25707 | end: {
|
25708 | line: 15,
|
25709 | column: 5
|
25710 | }
|
25711 | }, {
|
25712 | start: {
|
25713 | line: 13,
|
25714 | column: 4
|
25715 | },
|
25716 | end: {
|
25717 | line: 15,
|
25718 | column: 5
|
25719 | }
|
25720 | }],
|
25721 | line: 13
|
25722 | },
|
25723 | '4': {
|
25724 | loc: {
|
25725 | start: {
|
25726 | line: 13,
|
25727 | column: 8
|
25728 | },
|
25729 | end: {
|
25730 | line: 13,
|
25731 | column: 41
|
25732 | }
|
25733 | },
|
25734 | type: 'binary-expr',
|
25735 | locations: [{
|
25736 | start: {
|
25737 | line: 13,
|
25738 | column: 8
|
25739 | },
|
25740 | end: {
|
25741 | line: 13,
|
25742 | column: 32
|
25743 | }
|
25744 | }, {
|
25745 | start: {
|
25746 | line: 13,
|
25747 | column: 36
|
25748 | },
|
25749 | end: {
|
25750 | line: 13,
|
25751 | column: 41
|
25752 | }
|
25753 | }],
|
25754 | line: 13
|
25755 | },
|
25756 | '5': {
|
25757 | loc: {
|
25758 | start: {
|
25759 | line: 17,
|
25760 | column: 4
|
25761 | },
|
25762 | end: {
|
25763 | line: 19,
|
25764 | column: 5
|
25765 | }
|
25766 | },
|
25767 | type: 'if',
|
25768 | locations: [{
|
25769 | start: {
|
25770 | line: 17,
|
25771 | column: 4
|
25772 | },
|
25773 | end: {
|
25774 | line: 19,
|
25775 | column: 5
|
25776 | }
|
25777 | }, {
|
25778 | start: {
|
25779 | line: 17,
|
25780 | column: 4
|
25781 | },
|
25782 | end: {
|
25783 | line: 19,
|
25784 | column: 5
|
25785 | }
|
25786 | }],
|
25787 | line: 17
|
25788 | }
|
25789 | },
|
25790 | s: {
|
25791 | '0': 0,
|
25792 | '1': 0,
|
25793 | '2': 0,
|
25794 | '3': 0,
|
25795 | '4': 0,
|
25796 | '5': 0,
|
25797 | '6': 0,
|
25798 | '7': 0,
|
25799 | '8': 0,
|
25800 | '9': 0
|
25801 | },
|
25802 | f: {
|
25803 | '0': 0,
|
25804 | '1': 0
|
25805 | },
|
25806 | b: {
|
25807 | '0': [0, 0],
|
25808 | '1': [0, 0],
|
25809 | '2': [0, 0],
|
25810 | '3': [0, 0],
|
25811 | '4': [0, 0],
|
25812 | '5': [0, 0]
|
25813 | },
|
25814 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
25815 | },
|
25816 | coverage = global[gcv] || (global[gcv] = {});
|
25817 |
|
25818 | if (coverage[path] && coverage[path].hash === hash) {
|
25819 | return coverage[path];
|
25820 | }
|
25821 |
|
25822 | coverageData.hash = hash;
|
25823 | return coverage[path] = coverageData;
|
25824 | }();
|
25825 |
|
25826 | var States =
|
25827 |
|
25828 | function () {
|
25829 | function States() {}
|
25830 |
|
25831 | States.getState = function getState(name) {
|
25832 | cov_14dmox0qm2.f[0]++;
|
25833 | cov_14dmox0qm2.s[0]++;
|
25834 |
|
25835 | if (!name) {
|
25836 | cov_14dmox0qm2.b[0][0]++;
|
25837 | cov_14dmox0qm2.s[1]++;
|
25838 | return;
|
25839 | } else {
|
25840 | cov_14dmox0qm2.b[0][1]++;
|
25841 | }
|
25842 |
|
25843 | cov_14dmox0qm2.s[2]++;
|
25844 |
|
25845 | if ((cov_14dmox0qm2.b[2][0]++, States.states_) && (cov_14dmox0qm2.b[2][1]++, States.states_[name])) {
|
25846 | cov_14dmox0qm2.b[1][0]++;
|
25847 | cov_14dmox0qm2.s[3]++;
|
25848 | return States.states_[name];
|
25849 | } else {
|
25850 | cov_14dmox0qm2.b[1][1]++;
|
25851 | }
|
25852 | };
|
25853 |
|
25854 | States.registerState = function registerState(name, StateToRegister) {
|
25855 | cov_14dmox0qm2.f[1]++;
|
25856 | cov_14dmox0qm2.s[4]++;
|
25857 |
|
25858 | if ((cov_14dmox0qm2.b[4][0]++, typeof name !== 'string') || (cov_14dmox0qm2.b[4][1]++, !name)) {
|
25859 | cov_14dmox0qm2.b[3][0]++;
|
25860 | cov_14dmox0qm2.s[5]++;
|
25861 | throw new Error("Illegal state name, \"" + name + "\"; must be a non-empty string.");
|
25862 | } else {
|
25863 | cov_14dmox0qm2.b[3][1]++;
|
25864 | }
|
25865 |
|
25866 | cov_14dmox0qm2.s[6]++;
|
25867 |
|
25868 | if (!States.states_) {
|
25869 | cov_14dmox0qm2.b[5][0]++;
|
25870 | cov_14dmox0qm2.s[7]++;
|
25871 | States.states_ = {};
|
25872 | } else {
|
25873 | cov_14dmox0qm2.b[5][1]++;
|
25874 | }
|
25875 |
|
25876 | cov_14dmox0qm2.s[8]++;
|
25877 | States.states_[name] = StateToRegister;
|
25878 | cov_14dmox0qm2.s[9]++;
|
25879 | return StateToRegister;
|
25880 | };
|
25881 |
|
25882 | return States;
|
25883 | }();
|
25884 |
|
25885 | var cov_1s44q16xbr = function () {
|
25886 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/abstract/State.js',
|
25887 | hash = 'b35d4554304184bf989243491596265a24b2897b',
|
25888 | Function = function () {}.constructor,
|
25889 | global = new Function('return this')(),
|
25890 | gcv = '__coverage__',
|
25891 | coverageData = {
|
25892 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/abstract/State.js',
|
25893 | statementMap: {
|
25894 | '0': {
|
25895 | start: {
|
25896 | line: 7,
|
25897 | column: 4
|
25898 | },
|
25899 | end: {
|
25900 | line: 7,
|
25901 | column: 29
|
25902 | }
|
25903 | },
|
25904 | '1': {
|
25905 | start: {
|
25906 | line: 11,
|
25907 | column: 4
|
25908 | },
|
25909 | end: {
|
25910 | line: 11,
|
25911 | column: 25
|
25912 | }
|
25913 | },
|
25914 | '2': {
|
25915 | start: {
|
25916 | line: 20,
|
25917 | column: 19
|
25918 | },
|
25919 | end: {
|
25920 | line: 20,
|
25921 | column: 30
|
25922 | }
|
25923 | },
|
25924 | '3': {
|
25925 | start: {
|
25926 | line: 24,
|
25927 | column: 4
|
25928 | },
|
25929 | end: {
|
25930 | line: 24,
|
25931 | column: 25
|
25932 | }
|
25933 | },
|
25934 | '4': {
|
25935 | start: {
|
25936 | line: 25,
|
25937 | column: 21
|
25938 | },
|
25939 | end: {
|
25940 | line: 25,
|
25941 | column: 41
|
25942 | }
|
25943 | },
|
25944 | '5': {
|
25945 | start: {
|
25946 | line: 27,
|
25947 | column: 4
|
25948 | },
|
25949 | end: {
|
25950 | line: 27,
|
25951 | column: 33
|
25952 | }
|
25953 | },
|
25954 | '6': {
|
25955 | start: {
|
25956 | line: 28,
|
25957 | column: 4
|
25958 | },
|
25959 | end: {
|
25960 | line: 29,
|
25961 | column: 39
|
25962 | }
|
25963 | },
|
25964 | '7': {
|
25965 | start: {
|
25966 | line: 30,
|
25967 | column: 4
|
25968 | },
|
25969 | end: {
|
25970 | line: 30,
|
25971 | column: 35
|
25972 | }
|
25973 | },
|
25974 | '8': {
|
25975 | start: {
|
25976 | line: 53,
|
25977 | column: 4
|
25978 | },
|
25979 | end: {
|
25980 | line: 53,
|
25981 | column: 50
|
25982 | }
|
25983 | },
|
25984 | '9': {
|
25985 | start: {
|
25986 | line: 62,
|
25987 | column: 4
|
25988 | },
|
25989 | end: {
|
25990 | line: 62,
|
25991 | column: 58
|
25992 | }
|
25993 | },
|
25994 | '10': {
|
25995 | start: {
|
25996 | line: 71,
|
25997 | column: 4
|
25998 | },
|
25999 | end: {
|
26000 | line: 72,
|
26001 | column: 57
|
26002 | }
|
26003 | },
|
26004 | '11': {
|
26005 | start: {
|
26006 | line: 75,
|
26007 | column: 4
|
26008 | },
|
26009 | end: {
|
26010 | line: 76,
|
26011 | column: 57
|
26012 | }
|
26013 | },
|
26014 | '12': {
|
26015 | start: {
|
26016 | line: 79,
|
26017 | column: 4
|
26018 | },
|
26019 | end: {
|
26020 | line: 80,
|
26021 | column: 57
|
26022 | }
|
26023 | },
|
26024 | '13': {
|
26025 | start: {
|
26026 | line: 87,
|
26027 | column: 4
|
26028 | },
|
26029 | end: {
|
26030 | line: 87,
|
26031 | column: 82
|
26032 | }
|
26033 | },
|
26034 | '14': {
|
26035 | start: {
|
26036 | line: 95,
|
26037 | column: 4
|
26038 | },
|
26039 | end: {
|
26040 | line: 95,
|
26041 | column: 17
|
26042 | }
|
26043 | },
|
26044 | '15': {
|
26045 | start: {
|
26046 | line: 102,
|
26047 | column: 4
|
26048 | },
|
26049 | end: {
|
26050 | line: 102,
|
26051 | column: 17
|
26052 | }
|
26053 | },
|
26054 | '16': {
|
26055 | start: {
|
26056 | line: 106,
|
26057 | column: 4
|
26058 | },
|
26059 | end: {
|
26060 | line: 106,
|
26061 | column: 17
|
26062 | }
|
26063 | },
|
26064 | '17': {
|
26065 | start: {
|
26066 | line: 113,
|
26067 | column: 19
|
26068 | },
|
26069 | end: {
|
26070 | line: 113,
|
26071 | column: 30
|
26072 | }
|
26073 | },
|
26074 | '18': {
|
26075 | start: {
|
26076 | line: 115,
|
26077 | column: 4
|
26078 | },
|
26079 | end: {
|
26080 | line: 143,
|
26081 | column: 5
|
26082 | }
|
26083 | },
|
26084 | '19': {
|
26085 | start: {
|
26086 | line: 116,
|
26087 | column: 6
|
26088 | },
|
26089 | end: {
|
26090 | line: 116,
|
26091 | column: 26
|
26092 | }
|
26093 | },
|
26094 | '20': {
|
26095 | start: {
|
26096 | line: 117,
|
26097 | column: 11
|
26098 | },
|
26099 | end: {
|
26100 | line: 143,
|
26101 | column: 5
|
26102 | }
|
26103 | },
|
26104 | '21': {
|
26105 | start: {
|
26106 | line: 118,
|
26107 | column: 6
|
26108 | },
|
26109 | end: {
|
26110 | line: 118,
|
26111 | column: 30
|
26112 | }
|
26113 | },
|
26114 | '22': {
|
26115 | start: {
|
26116 | line: 119,
|
26117 | column: 11
|
26118 | },
|
26119 | end: {
|
26120 | line: 143,
|
26121 | column: 5
|
26122 | }
|
26123 | },
|
26124 | '23': {
|
26125 | start: {
|
26126 | line: 120,
|
26127 | column: 6
|
26128 | },
|
26129 | end: {
|
26130 | line: 120,
|
26131 | column: 30
|
26132 | }
|
26133 | },
|
26134 | '24': {
|
26135 | start: {
|
26136 | line: 121,
|
26137 | column: 11
|
26138 | },
|
26139 | end: {
|
26140 | line: 143,
|
26141 | column: 5
|
26142 | }
|
26143 | },
|
26144 | '25': {
|
26145 | start: {
|
26146 | line: 122,
|
26147 | column: 6
|
26148 | },
|
26149 | end: {
|
26150 | line: 122,
|
26151 | column: 33
|
26152 | }
|
26153 | },
|
26154 | '26': {
|
26155 | start: {
|
26156 | line: 123,
|
26157 | column: 11
|
26158 | },
|
26159 | end: {
|
26160 | line: 143,
|
26161 | column: 5
|
26162 | }
|
26163 | },
|
26164 | '27': {
|
26165 | start: {
|
26166 | line: 124,
|
26167 | column: 6
|
26168 | },
|
26169 | end: {
|
26170 | line: 124,
|
26171 | column: 31
|
26172 | }
|
26173 | },
|
26174 | '28': {
|
26175 | start: {
|
26176 | line: 125,
|
26177 | column: 11
|
26178 | },
|
26179 | end: {
|
26180 | line: 143,
|
26181 | column: 5
|
26182 | }
|
26183 | },
|
26184 | '29': {
|
26185 | start: {
|
26186 | line: 126,
|
26187 | column: 6
|
26188 | },
|
26189 | end: {
|
26190 | line: 126,
|
26191 | column: 31
|
26192 | }
|
26193 | },
|
26194 | '30': {
|
26195 | start: {
|
26196 | line: 127,
|
26197 | column: 11
|
26198 | },
|
26199 | end: {
|
26200 | line: 143,
|
26201 | column: 5
|
26202 | }
|
26203 | },
|
26204 | '31': {
|
26205 | start: {
|
26206 | line: 128,
|
26207 | column: 6
|
26208 | },
|
26209 | end: {
|
26210 | line: 128,
|
26211 | column: 36
|
26212 | }
|
26213 | },
|
26214 | '32': {
|
26215 | start: {
|
26216 | line: 129,
|
26217 | column: 11
|
26218 | },
|
26219 | end: {
|
26220 | line: 143,
|
26221 | column: 5
|
26222 | }
|
26223 | },
|
26224 | '33': {
|
26225 | start: {
|
26226 | line: 130,
|
26227 | column: 6
|
26228 | },
|
26229 | end: {
|
26230 | line: 130,
|
26231 | column: 36
|
26232 | }
|
26233 | },
|
26234 | '34': {
|
26235 | start: {
|
26236 | line: 131,
|
26237 | column: 11
|
26238 | },
|
26239 | end: {
|
26240 | line: 143,
|
26241 | column: 5
|
26242 | }
|
26243 | },
|
26244 | '35': {
|
26245 | start: {
|
26246 | line: 132,
|
26247 | column: 6
|
26248 | },
|
26249 | end: {
|
26250 | line: 132,
|
26251 | column: 38
|
26252 | }
|
26253 | },
|
26254 | '36': {
|
26255 | start: {
|
26256 | line: 133,
|
26257 | column: 11
|
26258 | },
|
26259 | end: {
|
26260 | line: 143,
|
26261 | column: 5
|
26262 | }
|
26263 | },
|
26264 | '37': {
|
26265 | start: {
|
26266 | line: 134,
|
26267 | column: 6
|
26268 | },
|
26269 | end: {
|
26270 | line: 134,
|
26271 | column: 29
|
26272 | }
|
26273 | },
|
26274 | '38': {
|
26275 | start: {
|
26276 | line: 135,
|
26277 | column: 11
|
26278 | },
|
26279 | end: {
|
26280 | line: 143,
|
26281 | column: 5
|
26282 | }
|
26283 | },
|
26284 | '39': {
|
26285 | start: {
|
26286 | line: 136,
|
26287 | column: 6
|
26288 | },
|
26289 | end: {
|
26290 | line: 136,
|
26291 | column: 27
|
26292 | }
|
26293 | },
|
26294 | '40': {
|
26295 | start: {
|
26296 | line: 137,
|
26297 | column: 11
|
26298 | },
|
26299 | end: {
|
26300 | line: 143,
|
26301 | column: 5
|
26302 | }
|
26303 | },
|
26304 | '41': {
|
26305 | start: {
|
26306 | line: 138,
|
26307 | column: 6
|
26308 | },
|
26309 | end: {
|
26310 | line: 138,
|
26311 | column: 31
|
26312 | }
|
26313 | },
|
26314 | '42': {
|
26315 | start: {
|
26316 | line: 139,
|
26317 | column: 11
|
26318 | },
|
26319 | end: {
|
26320 | line: 143,
|
26321 | column: 5
|
26322 | }
|
26323 | },
|
26324 | '43': {
|
26325 | start: {
|
26326 | line: 140,
|
26327 | column: 6
|
26328 | },
|
26329 | end: {
|
26330 | line: 140,
|
26331 | column: 32
|
26332 | }
|
26333 | },
|
26334 | '44': {
|
26335 | start: {
|
26336 | line: 141,
|
26337 | column: 11
|
26338 | },
|
26339 | end: {
|
26340 | line: 143,
|
26341 | column: 5
|
26342 | }
|
26343 | },
|
26344 | '45': {
|
26345 | start: {
|
26346 | line: 142,
|
26347 | column: 6
|
26348 | },
|
26349 | end: {
|
26350 | line: 142,
|
26351 | column: 29
|
26352 | }
|
26353 | },
|
26354 | '46': {
|
26355 | start: {
|
26356 | line: 148,
|
26357 | column: 0
|
26358 | },
|
26359 | end: {
|
26360 | line: 148,
|
26361 | column: 37
|
26362 | }
|
26363 | }
|
26364 | },
|
26365 | fnMap: {
|
26366 | '0': {
|
26367 | name: '(anonymous_0)',
|
26368 | decl: {
|
26369 | start: {
|
26370 | line: 6,
|
26371 | column: 2
|
26372 | },
|
26373 | end: {
|
26374 | line: 6,
|
26375 | column: 3
|
26376 | }
|
26377 | },
|
26378 | loc: {
|
26379 | start: {
|
26380 | line: 6,
|
26381 | column: 20
|
26382 | },
|
26383 | end: {
|
26384 | line: 8,
|
26385 | column: 3
|
26386 | }
|
26387 | },
|
26388 | line: 6
|
26389 | },
|
26390 | '1': {
|
26391 | name: '(anonymous_1)',
|
26392 | decl: {
|
26393 | start: {
|
26394 | line: 10,
|
26395 | column: 2
|
26396 | },
|
26397 | end: {
|
26398 | line: 10,
|
26399 | column: 3
|
26400 | }
|
26401 | },
|
26402 | loc: {
|
26403 | start: {
|
26404 | line: 10,
|
26405 | column: 22
|
26406 | },
|
26407 | end: {
|
26408 | line: 12,
|
26409 | column: 3
|
26410 | }
|
26411 | },
|
26412 | line: 10
|
26413 | },
|
26414 | '2': {
|
26415 | name: '(anonymous_2)',
|
26416 | decl: {
|
26417 | start: {
|
26418 | line: 19,
|
26419 | column: 2
|
26420 | },
|
26421 | end: {
|
26422 | line: 19,
|
26423 | column: 3
|
26424 | }
|
26425 | },
|
26426 | loc: {
|
26427 | start: {
|
26428 | line: 19,
|
26429 | column: 34
|
26430 | },
|
26431 | end: {
|
26432 | line: 31,
|
26433 | column: 3
|
26434 | }
|
26435 | },
|
26436 | line: 19
|
26437 | },
|
26438 | '3': {
|
26439 | name: '(anonymous_3)',
|
26440 | decl: {
|
26441 | start: {
|
26442 | line: 37,
|
26443 | column: 2
|
26444 | },
|
26445 | end: {
|
26446 | line: 37,
|
26447 | column: 3
|
26448 | }
|
26449 | },
|
26450 | loc: {
|
26451 | start: {
|
26452 | line: 37,
|
26453 | column: 9
|
26454 | },
|
26455 | end: {
|
26456 | line: 37,
|
26457 | column: 11
|
26458 | }
|
26459 | },
|
26460 | line: 37
|
26461 | },
|
26462 | '4': {
|
26463 | name: '(anonymous_4)',
|
26464 | decl: {
|
26465 | start: {
|
26466 | line: 43,
|
26467 | column: 2
|
26468 | },
|
26469 | end: {
|
26470 | line: 43,
|
26471 | column: 3
|
26472 | }
|
26473 | },
|
26474 | loc: {
|
26475 | start: {
|
26476 | line: 43,
|
26477 | column: 12
|
26478 | },
|
26479 | end: {
|
26480 | line: 43,
|
26481 | column: 14
|
26482 | }
|
26483 | },
|
26484 | line: 43
|
26485 | },
|
26486 | '5': {
|
26487 | name: '(anonymous_5)',
|
26488 | decl: {
|
26489 | start: {
|
26490 | line: 48,
|
26491 | column: 2
|
26492 | },
|
26493 | end: {
|
26494 | line: 48,
|
26495 | column: 3
|
26496 | }
|
26497 | },
|
26498 | loc: {
|
26499 | start: {
|
26500 | line: 48,
|
26501 | column: 11
|
26502 | },
|
26503 | end: {
|
26504 | line: 48,
|
26505 | column: 13
|
26506 | }
|
26507 | },
|
26508 | line: 48
|
26509 | },
|
26510 | '6': {
|
26511 | name: '(anonymous_6)',
|
26512 | decl: {
|
26513 | start: {
|
26514 | line: 49,
|
26515 | column: 2
|
26516 | },
|
26517 | end: {
|
26518 | line: 49,
|
26519 | column: 3
|
26520 | }
|
26521 | },
|
26522 | loc: {
|
26523 | start: {
|
26524 | line: 49,
|
26525 | column: 14
|
26526 | },
|
26527 | end: {
|
26528 | line: 49,
|
26529 | column: 16
|
26530 | }
|
26531 | },
|
26532 | line: 49
|
26533 | },
|
26534 | '7': {
|
26535 | name: '(anonymous_7)',
|
26536 | decl: {
|
26537 | start: {
|
26538 | line: 50,
|
26539 | column: 2
|
26540 | },
|
26541 | end: {
|
26542 | line: 50,
|
26543 | column: 3
|
26544 | }
|
26545 | },
|
26546 | loc: {
|
26547 | start: {
|
26548 | line: 50,
|
26549 | column: 12
|
26550 | },
|
26551 | end: {
|
26552 | line: 50,
|
26553 | column: 14
|
26554 | }
|
26555 | },
|
26556 | line: 50
|
26557 | },
|
26558 | '8': {
|
26559 | name: '(anonymous_8)',
|
26560 | decl: {
|
26561 | start: {
|
26562 | line: 51,
|
26563 | column: 2
|
26564 | },
|
26565 | end: {
|
26566 | line: 51,
|
26567 | column: 3
|
26568 | }
|
26569 | },
|
26570 | loc: {
|
26571 | start: {
|
26572 | line: 51,
|
26573 | column: 14
|
26574 | },
|
26575 | end: {
|
26576 | line: 51,
|
26577 | column: 16
|
26578 | }
|
26579 | },
|
26580 | line: 51
|
26581 | },
|
26582 | '9': {
|
26583 | name: '(anonymous_9)',
|
26584 | decl: {
|
26585 | start: {
|
26586 | line: 52,
|
26587 | column: 2
|
26588 | },
|
26589 | end: {
|
26590 | line: 52,
|
26591 | column: 3
|
26592 | }
|
26593 | },
|
26594 | loc: {
|
26595 | start: {
|
26596 | line: 52,
|
26597 | column: 15
|
26598 | },
|
26599 | end: {
|
26600 | line: 54,
|
26601 | column: 3
|
26602 | }
|
26603 | },
|
26604 | line: 52
|
26605 | },
|
26606 | '10': {
|
26607 | name: '(anonymous_10)',
|
26608 | decl: {
|
26609 | start: {
|
26610 | line: 55,
|
26611 | column: 2
|
26612 | },
|
26613 | end: {
|
26614 | line: 55,
|
26615 | column: 3
|
26616 | }
|
26617 | },
|
26618 | loc: {
|
26619 | start: {
|
26620 | line: 55,
|
26621 | column: 15
|
26622 | },
|
26623 | end: {
|
26624 | line: 55,
|
26625 | column: 17
|
26626 | }
|
26627 | },
|
26628 | line: 55
|
26629 | },
|
26630 | '11': {
|
26631 | name: '(anonymous_11)',
|
26632 | decl: {
|
26633 | start: {
|
26634 | line: 56,
|
26635 | column: 2
|
26636 | },
|
26637 | end: {
|
26638 | line: 56,
|
26639 | column: 3
|
26640 | }
|
26641 | },
|
26642 | loc: {
|
26643 | start: {
|
26644 | line: 56,
|
26645 | column: 18
|
26646 | },
|
26647 | end: {
|
26648 | line: 56,
|
26649 | column: 20
|
26650 | }
|
26651 | },
|
26652 | line: 56
|
26653 | },
|
26654 | '12': {
|
26655 | name: '(anonymous_12)',
|
26656 | decl: {
|
26657 | start: {
|
26658 | line: 57,
|
26659 | column: 2
|
26660 | },
|
26661 | end: {
|
26662 | line: 57,
|
26663 | column: 3
|
26664 | }
|
26665 | },
|
26666 | loc: {
|
26667 | start: {
|
26668 | line: 57,
|
26669 | column: 16
|
26670 | },
|
26671 | end: {
|
26672 | line: 57,
|
26673 | column: 18
|
26674 | }
|
26675 | },
|
26676 | line: 57
|
26677 | },
|
26678 | '13': {
|
26679 | name: '(anonymous_13)',
|
26680 | decl: {
|
26681 | start: {
|
26682 | line: 58,
|
26683 | column: 2
|
26684 | },
|
26685 | end: {
|
26686 | line: 58,
|
26687 | column: 3
|
26688 | }
|
26689 | },
|
26690 | loc: {
|
26691 | start: {
|
26692 | line: 58,
|
26693 | column: 16
|
26694 | },
|
26695 | end: {
|
26696 | line: 58,
|
26697 | column: 18
|
26698 | }
|
26699 | },
|
26700 | line: 58
|
26701 | },
|
26702 | '14': {
|
26703 | name: '(anonymous_14)',
|
26704 | decl: {
|
26705 | start: {
|
26706 | line: 59,
|
26707 | column: 2
|
26708 | },
|
26709 | end: {
|
26710 | line: 59,
|
26711 | column: 3
|
26712 | }
|
26713 | },
|
26714 | loc: {
|
26715 | start: {
|
26716 | line: 59,
|
26717 | column: 21
|
26718 | },
|
26719 | end: {
|
26720 | line: 59,
|
26721 | column: 23
|
26722 | }
|
26723 | },
|
26724 | line: 59
|
26725 | },
|
26726 | '15': {
|
26727 | name: '(anonymous_15)',
|
26728 | decl: {
|
26729 | start: {
|
26730 | line: 60,
|
26731 | column: 2
|
26732 | },
|
26733 | end: {
|
26734 | line: 60,
|
26735 | column: 3
|
26736 | }
|
26737 | },
|
26738 | loc: {
|
26739 | start: {
|
26740 | line: 60,
|
26741 | column: 21
|
26742 | },
|
26743 | end: {
|
26744 | line: 60,
|
26745 | column: 23
|
26746 | }
|
26747 | },
|
26748 | line: 60
|
26749 | },
|
26750 | '16': {
|
26751 | name: '(anonymous_16)',
|
26752 | decl: {
|
26753 | start: {
|
26754 | line: 61,
|
26755 | column: 2
|
26756 | },
|
26757 | end: {
|
26758 | line: 61,
|
26759 | column: 3
|
26760 | }
|
26761 | },
|
26762 | loc: {
|
26763 | start: {
|
26764 | line: 61,
|
26765 | column: 23
|
26766 | },
|
26767 | end: {
|
26768 | line: 63,
|
26769 | column: 3
|
26770 | }
|
26771 | },
|
26772 | line: 61
|
26773 | },
|
26774 | '17': {
|
26775 | name: '(anonymous_17)',
|
26776 | decl: {
|
26777 | start: {
|
26778 | line: 64,
|
26779 | column: 2
|
26780 | },
|
26781 | end: {
|
26782 | line: 64,
|
26783 | column: 3
|
26784 | }
|
26785 | },
|
26786 | loc: {
|
26787 | start: {
|
26788 | line: 64,
|
26789 | column: 16
|
26790 | },
|
26791 | end: {
|
26792 | line: 64,
|
26793 | column: 18
|
26794 | }
|
26795 | },
|
26796 | line: 64
|
26797 | },
|
26798 | '18': {
|
26799 | name: '(anonymous_18)',
|
26800 | decl: {
|
26801 | start: {
|
26802 | line: 65,
|
26803 | column: 2
|
26804 | },
|
26805 | end: {
|
26806 | line: 65,
|
26807 | column: 3
|
26808 | }
|
26809 | },
|
26810 | loc: {
|
26811 | start: {
|
26812 | line: 65,
|
26813 | column: 17
|
26814 | },
|
26815 | end: {
|
26816 | line: 65,
|
26817 | column: 19
|
26818 | }
|
26819 | },
|
26820 | line: 65
|
26821 | },
|
26822 | '19': {
|
26823 | name: '(anonymous_19)',
|
26824 | decl: {
|
26825 | start: {
|
26826 | line: 70,
|
26827 | column: 2
|
26828 | },
|
26829 | end: {
|
26830 | line: 70,
|
26831 | column: 3
|
26832 | }
|
26833 | },
|
26834 | loc: {
|
26835 | start: {
|
26836 | line: 70,
|
26837 | column: 22
|
26838 | },
|
26839 | end: {
|
26840 | line: 73,
|
26841 | column: 3
|
26842 | }
|
26843 | },
|
26844 | line: 70
|
26845 | },
|
26846 | '20': {
|
26847 | name: '(anonymous_20)',
|
26848 | decl: {
|
26849 | start: {
|
26850 | line: 74,
|
26851 | column: 2
|
26852 | },
|
26853 | end: {
|
26854 | line: 74,
|
26855 | column: 3
|
26856 | }
|
26857 | },
|
26858 | loc: {
|
26859 | start: {
|
26860 | line: 74,
|
26861 | column: 20
|
26862 | },
|
26863 | end: {
|
26864 | line: 77,
|
26865 | column: 3
|
26866 | }
|
26867 | },
|
26868 | line: 74
|
26869 | },
|
26870 | '21': {
|
26871 | name: '(anonymous_21)',
|
26872 | decl: {
|
26873 | start: {
|
26874 | line: 78,
|
26875 | column: 2
|
26876 | },
|
26877 | end: {
|
26878 | line: 78,
|
26879 | column: 3
|
26880 | }
|
26881 | },
|
26882 | loc: {
|
26883 | start: {
|
26884 | line: 78,
|
26885 | column: 21
|
26886 | },
|
26887 | end: {
|
26888 | line: 81,
|
26889 | column: 3
|
26890 | }
|
26891 | },
|
26892 | line: 78
|
26893 | },
|
26894 | '22': {
|
26895 | name: '(anonymous_22)',
|
26896 | decl: {
|
26897 | start: {
|
26898 | line: 86,
|
26899 | column: 2
|
26900 | },
|
26901 | end: {
|
26902 | line: 86,
|
26903 | column: 3
|
26904 | }
|
26905 | },
|
26906 | loc: {
|
26907 | start: {
|
26908 | line: 86,
|
26909 | column: 14
|
26910 | },
|
26911 | end: {
|
26912 | line: 88,
|
26913 | column: 3
|
26914 | }
|
26915 | },
|
26916 | line: 86
|
26917 | },
|
26918 | '23': {
|
26919 | name: '(anonymous_23)',
|
26920 | decl: {
|
26921 | start: {
|
26922 | line: 94,
|
26923 | column: 2
|
26924 | },
|
26925 | end: {
|
26926 | line: 94,
|
26927 | column: 3
|
26928 | }
|
26929 | },
|
26930 | loc: {
|
26931 | start: {
|
26932 | line: 94,
|
26933 | column: 24
|
26934 | },
|
26935 | end: {
|
26936 | line: 96,
|
26937 | column: 3
|
26938 | }
|
26939 | },
|
26940 | line: 94
|
26941 | },
|
26942 | '24': {
|
26943 | name: '(anonymous_24)',
|
26944 | decl: {
|
26945 | start: {
|
26946 | line: 101,
|
26947 | column: 2
|
26948 | },
|
26949 | end: {
|
26950 | line: 101,
|
26951 | column: 3
|
26952 | }
|
26953 | },
|
26954 | loc: {
|
26955 | start: {
|
26956 | line: 101,
|
26957 | column: 22
|
26958 | },
|
26959 | end: {
|
26960 | line: 103,
|
26961 | column: 3
|
26962 | }
|
26963 | },
|
26964 | line: 101
|
26965 | },
|
26966 | '25': {
|
26967 | name: '(anonymous_25)',
|
26968 | decl: {
|
26969 | start: {
|
26970 | line: 105,
|
26971 | column: 2
|
26972 | },
|
26973 | end: {
|
26974 | line: 105,
|
26975 | column: 3
|
26976 | }
|
26977 | },
|
26978 | loc: {
|
26979 | start: {
|
26980 | line: 105,
|
26981 | column: 14
|
26982 | },
|
26983 | end: {
|
26984 | line: 107,
|
26985 | column: 3
|
26986 | }
|
26987 | },
|
26988 | line: 105
|
26989 | },
|
26990 | '26': {
|
26991 | name: '(anonymous_26)',
|
26992 | decl: {
|
26993 | start: {
|
26994 | line: 112,
|
26995 | column: 2
|
26996 | },
|
26997 | end: {
|
26998 | line: 112,
|
26999 | column: 3
|
27000 | }
|
27001 | },
|
27002 | loc: {
|
27003 | start: {
|
27004 | line: 112,
|
27005 | column: 20
|
27006 | },
|
27007 | end: {
|
27008 | line: 144,
|
27009 | column: 3
|
27010 | }
|
27011 | },
|
27012 | line: 112
|
27013 | }
|
27014 | },
|
27015 | branchMap: {
|
27016 | '0': {
|
27017 | loc: {
|
27018 | start: {
|
27019 | line: 115,
|
27020 | column: 4
|
27021 | },
|
27022 | end: {
|
27023 | line: 143,
|
27024 | column: 5
|
27025 | }
|
27026 | },
|
27027 | type: 'if',
|
27028 | locations: [{
|
27029 | start: {
|
27030 | line: 115,
|
27031 | column: 4
|
27032 | },
|
27033 | end: {
|
27034 | line: 143,
|
27035 | column: 5
|
27036 | }
|
27037 | }, {
|
27038 | start: {
|
27039 | line: 115,
|
27040 | column: 4
|
27041 | },
|
27042 | end: {
|
27043 | line: 143,
|
27044 | column: 5
|
27045 | }
|
27046 | }],
|
27047 | line: 115
|
27048 | },
|
27049 | '1': {
|
27050 | loc: {
|
27051 | start: {
|
27052 | line: 117,
|
27053 | column: 11
|
27054 | },
|
27055 | end: {
|
27056 | line: 143,
|
27057 | column: 5
|
27058 | }
|
27059 | },
|
27060 | type: 'if',
|
27061 | locations: [{
|
27062 | start: {
|
27063 | line: 117,
|
27064 | column: 11
|
27065 | },
|
27066 | end: {
|
27067 | line: 143,
|
27068 | column: 5
|
27069 | }
|
27070 | }, {
|
27071 | start: {
|
27072 | line: 117,
|
27073 | column: 11
|
27074 | },
|
27075 | end: {
|
27076 | line: 143,
|
27077 | column: 5
|
27078 | }
|
27079 | }],
|
27080 | line: 117
|
27081 | },
|
27082 | '2': {
|
27083 | loc: {
|
27084 | start: {
|
27085 | line: 119,
|
27086 | column: 11
|
27087 | },
|
27088 | end: {
|
27089 | line: 143,
|
27090 | column: 5
|
27091 | }
|
27092 | },
|
27093 | type: 'if',
|
27094 | locations: [{
|
27095 | start: {
|
27096 | line: 119,
|
27097 | column: 11
|
27098 | },
|
27099 | end: {
|
27100 | line: 143,
|
27101 | column: 5
|
27102 | }
|
27103 | }, {
|
27104 | start: {
|
27105 | line: 119,
|
27106 | column: 11
|
27107 | },
|
27108 | end: {
|
27109 | line: 143,
|
27110 | column: 5
|
27111 | }
|
27112 | }],
|
27113 | line: 119
|
27114 | },
|
27115 | '3': {
|
27116 | loc: {
|
27117 | start: {
|
27118 | line: 121,
|
27119 | column: 11
|
27120 | },
|
27121 | end: {
|
27122 | line: 143,
|
27123 | column: 5
|
27124 | }
|
27125 | },
|
27126 | type: 'if',
|
27127 | locations: [{
|
27128 | start: {
|
27129 | line: 121,
|
27130 | column: 11
|
27131 | },
|
27132 | end: {
|
27133 | line: 143,
|
27134 | column: 5
|
27135 | }
|
27136 | }, {
|
27137 | start: {
|
27138 | line: 121,
|
27139 | column: 11
|
27140 | },
|
27141 | end: {
|
27142 | line: 143,
|
27143 | column: 5
|
27144 | }
|
27145 | }],
|
27146 | line: 121
|
27147 | },
|
27148 | '4': {
|
27149 | loc: {
|
27150 | start: {
|
27151 | line: 123,
|
27152 | column: 11
|
27153 | },
|
27154 | end: {
|
27155 | line: 143,
|
27156 | column: 5
|
27157 | }
|
27158 | },
|
27159 | type: 'if',
|
27160 | locations: [{
|
27161 | start: {
|
27162 | line: 123,
|
27163 | column: 11
|
27164 | },
|
27165 | end: {
|
27166 | line: 143,
|
27167 | column: 5
|
27168 | }
|
27169 | }, {
|
27170 | start: {
|
27171 | line: 123,
|
27172 | column: 11
|
27173 | },
|
27174 | end: {
|
27175 | line: 143,
|
27176 | column: 5
|
27177 | }
|
27178 | }],
|
27179 | line: 123
|
27180 | },
|
27181 | '5': {
|
27182 | loc: {
|
27183 | start: {
|
27184 | line: 125,
|
27185 | column: 11
|
27186 | },
|
27187 | end: {
|
27188 | line: 143,
|
27189 | column: 5
|
27190 | }
|
27191 | },
|
27192 | type: 'if',
|
27193 | locations: [{
|
27194 | start: {
|
27195 | line: 125,
|
27196 | column: 11
|
27197 | },
|
27198 | end: {
|
27199 | line: 143,
|
27200 | column: 5
|
27201 | }
|
27202 | }, {
|
27203 | start: {
|
27204 | line: 125,
|
27205 | column: 11
|
27206 | },
|
27207 | end: {
|
27208 | line: 143,
|
27209 | column: 5
|
27210 | }
|
27211 | }],
|
27212 | line: 125
|
27213 | },
|
27214 | '6': {
|
27215 | loc: {
|
27216 | start: {
|
27217 | line: 127,
|
27218 | column: 11
|
27219 | },
|
27220 | end: {
|
27221 | line: 143,
|
27222 | column: 5
|
27223 | }
|
27224 | },
|
27225 | type: 'if',
|
27226 | locations: [{
|
27227 | start: {
|
27228 | line: 127,
|
27229 | column: 11
|
27230 | },
|
27231 | end: {
|
27232 | line: 143,
|
27233 | column: 5
|
27234 | }
|
27235 | }, {
|
27236 | start: {
|
27237 | line: 127,
|
27238 | column: 11
|
27239 | },
|
27240 | end: {
|
27241 | line: 143,
|
27242 | column: 5
|
27243 | }
|
27244 | }],
|
27245 | line: 127
|
27246 | },
|
27247 | '7': {
|
27248 | loc: {
|
27249 | start: {
|
27250 | line: 129,
|
27251 | column: 11
|
27252 | },
|
27253 | end: {
|
27254 | line: 143,
|
27255 | column: 5
|
27256 | }
|
27257 | },
|
27258 | type: 'if',
|
27259 | locations: [{
|
27260 | start: {
|
27261 | line: 129,
|
27262 | column: 11
|
27263 | },
|
27264 | end: {
|
27265 | line: 143,
|
27266 | column: 5
|
27267 | }
|
27268 | }, {
|
27269 | start: {
|
27270 | line: 129,
|
27271 | column: 11
|
27272 | },
|
27273 | end: {
|
27274 | line: 143,
|
27275 | column: 5
|
27276 | }
|
27277 | }],
|
27278 | line: 129
|
27279 | },
|
27280 | '8': {
|
27281 | loc: {
|
27282 | start: {
|
27283 | line: 131,
|
27284 | column: 11
|
27285 | },
|
27286 | end: {
|
27287 | line: 143,
|
27288 | column: 5
|
27289 | }
|
27290 | },
|
27291 | type: 'if',
|
27292 | locations: [{
|
27293 | start: {
|
27294 | line: 131,
|
27295 | column: 11
|
27296 | },
|
27297 | end: {
|
27298 | line: 143,
|
27299 | column: 5
|
27300 | }
|
27301 | }, {
|
27302 | start: {
|
27303 | line: 131,
|
27304 | column: 11
|
27305 | },
|
27306 | end: {
|
27307 | line: 143,
|
27308 | column: 5
|
27309 | }
|
27310 | }],
|
27311 | line: 131
|
27312 | },
|
27313 | '9': {
|
27314 | loc: {
|
27315 | start: {
|
27316 | line: 133,
|
27317 | column: 11
|
27318 | },
|
27319 | end: {
|
27320 | line: 143,
|
27321 | column: 5
|
27322 | }
|
27323 | },
|
27324 | type: 'if',
|
27325 | locations: [{
|
27326 | start: {
|
27327 | line: 133,
|
27328 | column: 11
|
27329 | },
|
27330 | end: {
|
27331 | line: 143,
|
27332 | column: 5
|
27333 | }
|
27334 | }, {
|
27335 | start: {
|
27336 | line: 133,
|
27337 | column: 11
|
27338 | },
|
27339 | end: {
|
27340 | line: 143,
|
27341 | column: 5
|
27342 | }
|
27343 | }],
|
27344 | line: 133
|
27345 | },
|
27346 | '10': {
|
27347 | loc: {
|
27348 | start: {
|
27349 | line: 135,
|
27350 | column: 11
|
27351 | },
|
27352 | end: {
|
27353 | line: 143,
|
27354 | column: 5
|
27355 | }
|
27356 | },
|
27357 | type: 'if',
|
27358 | locations: [{
|
27359 | start: {
|
27360 | line: 135,
|
27361 | column: 11
|
27362 | },
|
27363 | end: {
|
27364 | line: 143,
|
27365 | column: 5
|
27366 | }
|
27367 | }, {
|
27368 | start: {
|
27369 | line: 135,
|
27370 | column: 11
|
27371 | },
|
27372 | end: {
|
27373 | line: 143,
|
27374 | column: 5
|
27375 | }
|
27376 | }],
|
27377 | line: 135
|
27378 | },
|
27379 | '11': {
|
27380 | loc: {
|
27381 | start: {
|
27382 | line: 137,
|
27383 | column: 11
|
27384 | },
|
27385 | end: {
|
27386 | line: 143,
|
27387 | column: 5
|
27388 | }
|
27389 | },
|
27390 | type: 'if',
|
27391 | locations: [{
|
27392 | start: {
|
27393 | line: 137,
|
27394 | column: 11
|
27395 | },
|
27396 | end: {
|
27397 | line: 143,
|
27398 | column: 5
|
27399 | }
|
27400 | }, {
|
27401 | start: {
|
27402 | line: 137,
|
27403 | column: 11
|
27404 | },
|
27405 | end: {
|
27406 | line: 143,
|
27407 | column: 5
|
27408 | }
|
27409 | }],
|
27410 | line: 137
|
27411 | },
|
27412 | '12': {
|
27413 | loc: {
|
27414 | start: {
|
27415 | line: 139,
|
27416 | column: 11
|
27417 | },
|
27418 | end: {
|
27419 | line: 143,
|
27420 | column: 5
|
27421 | }
|
27422 | },
|
27423 | type: 'if',
|
27424 | locations: [{
|
27425 | start: {
|
27426 | line: 139,
|
27427 | column: 11
|
27428 | },
|
27429 | end: {
|
27430 | line: 143,
|
27431 | column: 5
|
27432 | }
|
27433 | }, {
|
27434 | start: {
|
27435 | line: 139,
|
27436 | column: 11
|
27437 | },
|
27438 | end: {
|
27439 | line: 143,
|
27440 | column: 5
|
27441 | }
|
27442 | }],
|
27443 | line: 139
|
27444 | },
|
27445 | '13': {
|
27446 | loc: {
|
27447 | start: {
|
27448 | line: 141,
|
27449 | column: 11
|
27450 | },
|
27451 | end: {
|
27452 | line: 143,
|
27453 | column: 5
|
27454 | }
|
27455 | },
|
27456 | type: 'if',
|
27457 | locations: [{
|
27458 | start: {
|
27459 | line: 141,
|
27460 | column: 11
|
27461 | },
|
27462 | end: {
|
27463 | line: 143,
|
27464 | column: 5
|
27465 | }
|
27466 | }, {
|
27467 | start: {
|
27468 | line: 141,
|
27469 | column: 11
|
27470 | },
|
27471 | end: {
|
27472 | line: 143,
|
27473 | column: 5
|
27474 | }
|
27475 | }],
|
27476 | line: 141
|
27477 | }
|
27478 | },
|
27479 | s: {
|
27480 | '0': 0,
|
27481 | '1': 0,
|
27482 | '2': 0,
|
27483 | '3': 0,
|
27484 | '4': 0,
|
27485 | '5': 0,
|
27486 | '6': 0,
|
27487 | '7': 0,
|
27488 | '8': 0,
|
27489 | '9': 0,
|
27490 | '10': 0,
|
27491 | '11': 0,
|
27492 | '12': 0,
|
27493 | '13': 0,
|
27494 | '14': 0,
|
27495 | '15': 0,
|
27496 | '16': 0,
|
27497 | '17': 0,
|
27498 | '18': 0,
|
27499 | '19': 0,
|
27500 | '20': 0,
|
27501 | '21': 0,
|
27502 | '22': 0,
|
27503 | '23': 0,
|
27504 | '24': 0,
|
27505 | '25': 0,
|
27506 | '26': 0,
|
27507 | '27': 0,
|
27508 | '28': 0,
|
27509 | '29': 0,
|
27510 | '30': 0,
|
27511 | '31': 0,
|
27512 | '32': 0,
|
27513 | '33': 0,
|
27514 | '34': 0,
|
27515 | '35': 0,
|
27516 | '36': 0,
|
27517 | '37': 0,
|
27518 | '38': 0,
|
27519 | '39': 0,
|
27520 | '40': 0,
|
27521 | '41': 0,
|
27522 | '42': 0,
|
27523 | '43': 0,
|
27524 | '44': 0,
|
27525 | '45': 0,
|
27526 | '46': 0
|
27527 | },
|
27528 | f: {
|
27529 | '0': 0,
|
27530 | '1': 0,
|
27531 | '2': 0,
|
27532 | '3': 0,
|
27533 | '4': 0,
|
27534 | '5': 0,
|
27535 | '6': 0,
|
27536 | '7': 0,
|
27537 | '8': 0,
|
27538 | '9': 0,
|
27539 | '10': 0,
|
27540 | '11': 0,
|
27541 | '12': 0,
|
27542 | '13': 0,
|
27543 | '14': 0,
|
27544 | '15': 0,
|
27545 | '16': 0,
|
27546 | '17': 0,
|
27547 | '18': 0,
|
27548 | '19': 0,
|
27549 | '20': 0,
|
27550 | '21': 0,
|
27551 | '22': 0,
|
27552 | '23': 0,
|
27553 | '24': 0,
|
27554 | '25': 0,
|
27555 | '26': 0
|
27556 | },
|
27557 | b: {
|
27558 | '0': [0, 0],
|
27559 | '1': [0, 0],
|
27560 | '2': [0, 0],
|
27561 | '3': [0, 0],
|
27562 | '4': [0, 0],
|
27563 | '5': [0, 0],
|
27564 | '6': [0, 0],
|
27565 | '7': [0, 0],
|
27566 | '8': [0, 0],
|
27567 | '9': [0, 0],
|
27568 | '10': [0, 0],
|
27569 | '11': [0, 0],
|
27570 | '12': [0, 0],
|
27571 | '13': [0, 0]
|
27572 | },
|
27573 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
27574 | },
|
27575 | coverage = global[gcv] || (global[gcv] = {});
|
27576 |
|
27577 | if (coverage[path] && coverage[path].hash === hash) {
|
27578 | return coverage[path];
|
27579 | }
|
27580 |
|
27581 | coverageData.hash = hash;
|
27582 | return coverage[path] = coverageData;
|
27583 | }();
|
27584 |
|
27585 | var State =
|
27586 |
|
27587 | function () {
|
27588 | State._getName = function _getName() {
|
27589 | cov_1s44q16xbr.f[0]++;
|
27590 | cov_1s44q16xbr.s[0]++;
|
27591 | return 'Anonymous State';
|
27592 | };
|
27593 |
|
27594 | function State(player) {
|
27595 | cov_1s44q16xbr.f[1]++;
|
27596 | cov_1s44q16xbr.s[1]++;
|
27597 | this.player = player;
|
27598 | }
|
27599 |
|
27600 | var _proto = State.prototype;
|
27601 |
|
27602 | _proto.transitionTo = function transitionTo(NewState) {
|
27603 | cov_1s44q16xbr.f[2]++;
|
27604 | var player = (cov_1s44q16xbr.s[2]++, this.player);
|
27605 | cov_1s44q16xbr.s[3]++;
|
27606 | this.cleanup(player);
|
27607 | var newState = (cov_1s44q16xbr.s[4]++, new NewState(player));
|
27608 | cov_1s44q16xbr.s[5]++;
|
27609 | player.ads._state = newState;
|
27610 | cov_1s44q16xbr.s[6]++;
|
27611 | player.ads.debug(this.constructor._getName() + ' -> ' + newState.constructor._getName());
|
27612 | cov_1s44q16xbr.s[7]++;
|
27613 |
|
27614 | for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
27615 | args[_key - 1] = arguments[_key];
|
27616 | }
|
27617 |
|
27618 | newState.init.apply(newState, [player].concat(args));
|
27619 | };
|
27620 |
|
27621 | _proto.init = function init() {
|
27622 | cov_1s44q16xbr.f[3]++;
|
27623 | };
|
27624 |
|
27625 | _proto.cleanup = function cleanup() {
|
27626 | cov_1s44q16xbr.f[4]++;
|
27627 | };
|
27628 |
|
27629 | _proto.onPlay = function onPlay() {
|
27630 | cov_1s44q16xbr.f[5]++;
|
27631 | };
|
27632 |
|
27633 | _proto.onPlaying = function onPlaying() {
|
27634 | cov_1s44q16xbr.f[6]++;
|
27635 | };
|
27636 |
|
27637 | _proto.onEnded = function onEnded() {
|
27638 | cov_1s44q16xbr.f[7]++;
|
27639 | };
|
27640 |
|
27641 | _proto.onAdEnded = function onAdEnded() {
|
27642 | cov_1s44q16xbr.f[8]++;
|
27643 | };
|
27644 |
|
27645 | _proto.onAdsReady = function onAdsReady() {
|
27646 | cov_1s44q16xbr.f[9]++;
|
27647 | cov_1s44q16xbr.s[8]++;
|
27648 | videojs$1.log.warn('Unexpected adsready event');
|
27649 | };
|
27650 |
|
27651 | _proto.onAdsError = function onAdsError() {
|
27652 | cov_1s44q16xbr.f[10]++;
|
27653 | };
|
27654 |
|
27655 | _proto.onAdsCanceled = function onAdsCanceled() {
|
27656 | cov_1s44q16xbr.f[11]++;
|
27657 | };
|
27658 |
|
27659 | _proto.onAdTimeout = function onAdTimeout() {
|
27660 | cov_1s44q16xbr.f[12]++;
|
27661 | };
|
27662 |
|
27663 | _proto.onAdStarted = function onAdStarted() {
|
27664 | cov_1s44q16xbr.f[13]++;
|
27665 | };
|
27666 |
|
27667 | _proto.onContentChanged = function onContentChanged() {
|
27668 | cov_1s44q16xbr.f[14]++;
|
27669 | };
|
27670 |
|
27671 | _proto.onContentResumed = function onContentResumed() {
|
27672 | cov_1s44q16xbr.f[15]++;
|
27673 | };
|
27674 |
|
27675 | _proto.onReadyForPostroll = function onReadyForPostroll() {
|
27676 | cov_1s44q16xbr.f[16]++;
|
27677 | cov_1s44q16xbr.s[9]++;
|
27678 | videojs$1.log.warn('Unexpected readyforpostroll event');
|
27679 | };
|
27680 |
|
27681 | _proto.onNoPreroll = function onNoPreroll() {
|
27682 | cov_1s44q16xbr.f[17]++;
|
27683 | };
|
27684 |
|
27685 | _proto.onNoPostroll = function onNoPostroll() {
|
27686 | cov_1s44q16xbr.f[18]++;
|
27687 | };
|
27688 |
|
27689 | _proto.startLinearAdMode = function startLinearAdMode() {
|
27690 | cov_1s44q16xbr.f[19]++;
|
27691 | cov_1s44q16xbr.s[10]++;
|
27692 | videojs$1.log.warn('Unexpected startLinearAdMode invocation ' + '(State via ' + this.constructor._getName() + ')');
|
27693 | };
|
27694 |
|
27695 | _proto.endLinearAdMode = function endLinearAdMode() {
|
27696 | cov_1s44q16xbr.f[20]++;
|
27697 | cov_1s44q16xbr.s[11]++;
|
27698 | videojs$1.log.warn('Unexpected endLinearAdMode invocation ' + '(State via ' + this.constructor._getName() + ')');
|
27699 | };
|
27700 |
|
27701 | _proto.skipLinearAdMode = function skipLinearAdMode() {
|
27702 | cov_1s44q16xbr.f[21]++;
|
27703 | cov_1s44q16xbr.s[12]++;
|
27704 | videojs$1.log.warn('Unexpected skipLinearAdMode invocation ' + '(State via ' + this.constructor._getName() + ')');
|
27705 | };
|
27706 |
|
27707 | _proto.isAdState = function isAdState() {
|
27708 | cov_1s44q16xbr.f[22]++;
|
27709 | cov_1s44q16xbr.s[13]++;
|
27710 | throw new Error('isAdState unimplemented for ' + this.constructor._getName());
|
27711 | };
|
27712 |
|
27713 | _proto.isWaitingForAdBreak = function isWaitingForAdBreak() {
|
27714 | cov_1s44q16xbr.f[23]++;
|
27715 | cov_1s44q16xbr.s[14]++;
|
27716 | return false;
|
27717 | };
|
27718 |
|
27719 | _proto.isContentResuming = function isContentResuming() {
|
27720 | cov_1s44q16xbr.f[24]++;
|
27721 | cov_1s44q16xbr.s[15]++;
|
27722 | return false;
|
27723 | };
|
27724 |
|
27725 | _proto.inAdBreak = function inAdBreak() {
|
27726 | cov_1s44q16xbr.f[25]++;
|
27727 | cov_1s44q16xbr.s[16]++;
|
27728 | return false;
|
27729 | };
|
27730 |
|
27731 | _proto.handleEvent = function handleEvent(type) {
|
27732 | cov_1s44q16xbr.f[26]++;
|
27733 | var player = (cov_1s44q16xbr.s[17]++, this.player);
|
27734 | cov_1s44q16xbr.s[18]++;
|
27735 |
|
27736 | if (type === 'play') {
|
27737 | cov_1s44q16xbr.b[0][0]++;
|
27738 | cov_1s44q16xbr.s[19]++;
|
27739 | this.onPlay(player);
|
27740 | } else {
|
27741 | cov_1s44q16xbr.b[0][1]++;
|
27742 | cov_1s44q16xbr.s[20]++;
|
27743 |
|
27744 | if (type === 'adsready') {
|
27745 | cov_1s44q16xbr.b[1][0]++;
|
27746 | cov_1s44q16xbr.s[21]++;
|
27747 | this.onAdsReady(player);
|
27748 | } else {
|
27749 | cov_1s44q16xbr.b[1][1]++;
|
27750 | cov_1s44q16xbr.s[22]++;
|
27751 |
|
27752 | if (type === 'adserror') {
|
27753 | cov_1s44q16xbr.b[2][0]++;
|
27754 | cov_1s44q16xbr.s[23]++;
|
27755 | this.onAdsError(player);
|
27756 | } else {
|
27757 | cov_1s44q16xbr.b[2][1]++;
|
27758 | cov_1s44q16xbr.s[24]++;
|
27759 |
|
27760 | if (type === 'adscanceled') {
|
27761 | cov_1s44q16xbr.b[3][0]++;
|
27762 | cov_1s44q16xbr.s[25]++;
|
27763 | this.onAdsCanceled(player);
|
27764 | } else {
|
27765 | cov_1s44q16xbr.b[3][1]++;
|
27766 | cov_1s44q16xbr.s[26]++;
|
27767 |
|
27768 | if (type === 'adtimeout') {
|
27769 | cov_1s44q16xbr.b[4][0]++;
|
27770 | cov_1s44q16xbr.s[27]++;
|
27771 | this.onAdTimeout(player);
|
27772 | } else {
|
27773 | cov_1s44q16xbr.b[4][1]++;
|
27774 | cov_1s44q16xbr.s[28]++;
|
27775 |
|
27776 | if (type === 'ads-ad-started') {
|
27777 | cov_1s44q16xbr.b[5][0]++;
|
27778 | cov_1s44q16xbr.s[29]++;
|
27779 | this.onAdStarted(player);
|
27780 | } else {
|
27781 | cov_1s44q16xbr.b[5][1]++;
|
27782 | cov_1s44q16xbr.s[30]++;
|
27783 |
|
27784 | if (type === 'contentchanged') {
|
27785 | cov_1s44q16xbr.b[6][0]++;
|
27786 | cov_1s44q16xbr.s[31]++;
|
27787 | this.onContentChanged(player);
|
27788 | } else {
|
27789 | cov_1s44q16xbr.b[6][1]++;
|
27790 | cov_1s44q16xbr.s[32]++;
|
27791 |
|
27792 | if (type === 'contentresumed') {
|
27793 | cov_1s44q16xbr.b[7][0]++;
|
27794 | cov_1s44q16xbr.s[33]++;
|
27795 | this.onContentResumed(player);
|
27796 | } else {
|
27797 | cov_1s44q16xbr.b[7][1]++;
|
27798 | cov_1s44q16xbr.s[34]++;
|
27799 |
|
27800 | if (type === 'readyforpostroll') {
|
27801 | cov_1s44q16xbr.b[8][0]++;
|
27802 | cov_1s44q16xbr.s[35]++;
|
27803 | this.onReadyForPostroll(player);
|
27804 | } else {
|
27805 | cov_1s44q16xbr.b[8][1]++;
|
27806 | cov_1s44q16xbr.s[36]++;
|
27807 |
|
27808 | if (type === 'playing') {
|
27809 | cov_1s44q16xbr.b[9][0]++;
|
27810 | cov_1s44q16xbr.s[37]++;
|
27811 | this.onPlaying(player);
|
27812 | } else {
|
27813 | cov_1s44q16xbr.b[9][1]++;
|
27814 | cov_1s44q16xbr.s[38]++;
|
27815 |
|
27816 | if (type === 'ended') {
|
27817 | cov_1s44q16xbr.b[10][0]++;
|
27818 | cov_1s44q16xbr.s[39]++;
|
27819 | this.onEnded(player);
|
27820 | } else {
|
27821 | cov_1s44q16xbr.b[10][1]++;
|
27822 | cov_1s44q16xbr.s[40]++;
|
27823 |
|
27824 | if (type === 'nopreroll') {
|
27825 | cov_1s44q16xbr.b[11][0]++;
|
27826 | cov_1s44q16xbr.s[41]++;
|
27827 | this.onNoPreroll(player);
|
27828 | } else {
|
27829 | cov_1s44q16xbr.b[11][1]++;
|
27830 | cov_1s44q16xbr.s[42]++;
|
27831 |
|
27832 | if (type === 'nopostroll') {
|
27833 | cov_1s44q16xbr.b[12][0]++;
|
27834 | cov_1s44q16xbr.s[43]++;
|
27835 | this.onNoPostroll(player);
|
27836 | } else {
|
27837 | cov_1s44q16xbr.b[12][1]++;
|
27838 | cov_1s44q16xbr.s[44]++;
|
27839 |
|
27840 | if (type === 'adended') {
|
27841 | cov_1s44q16xbr.b[13][0]++;
|
27842 | cov_1s44q16xbr.s[45]++;
|
27843 | this.onAdEnded(player);
|
27844 | } else {
|
27845 | cov_1s44q16xbr.b[13][1]++;
|
27846 | }
|
27847 | }
|
27848 | }
|
27849 | }
|
27850 | }
|
27851 | }
|
27852 | }
|
27853 | }
|
27854 | }
|
27855 | }
|
27856 | }
|
27857 | }
|
27858 | }
|
27859 | }
|
27860 | };
|
27861 |
|
27862 | return State;
|
27863 | }();
|
27864 |
|
27865 | cov_1s44q16xbr.s[46]++;
|
27866 | States.registerState('State', State);
|
27867 |
|
27868 | var cov_pvxb1alnj = function () {
|
27869 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/abstract/AdState.js',
|
27870 | hash = '7458cea1b4c42cdfdb7de35db0dedd250df06e23',
|
27871 | Function = function () {}.constructor,
|
27872 | global = new Function('return this')(),
|
27873 | gcv = '__coverage__',
|
27874 | coverageData = {
|
27875 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/abstract/AdState.js',
|
27876 | statementMap: {
|
27877 | '0': {
|
27878 | start: {
|
27879 | line: 12,
|
27880 | column: 4
|
27881 | },
|
27882 | end: {
|
27883 | line: 12,
|
27884 | column: 18
|
27885 | }
|
27886 | },
|
27887 | '1': {
|
27888 | start: {
|
27889 | line: 13,
|
27890 | column: 4
|
27891 | },
|
27892 | end: {
|
27893 | line: 13,
|
27894 | column: 33
|
27895 | }
|
27896 | },
|
27897 | '2': {
|
27898 | start: {
|
27899 | line: 14,
|
27900 | column: 4
|
27901 | },
|
27902 | end: {
|
27903 | line: 14,
|
27904 | column: 35
|
27905 | }
|
27906 | },
|
27907 | '3': {
|
27908 | start: {
|
27909 | line: 21,
|
27910 | column: 4
|
27911 | },
|
27912 | end: {
|
27913 | line: 21,
|
27914 | column: 16
|
27915 | }
|
27916 | },
|
27917 | '4': {
|
27918 | start: {
|
27919 | line: 29,
|
27920 | column: 28
|
27921 | },
|
27922 | end: {
|
27923 | line: 29,
|
27924 | column: 62
|
27925 | }
|
27926 | },
|
27927 | '5': {
|
27928 | start: {
|
27929 | line: 31,
|
27930 | column: 4
|
27931 | },
|
27932 | end: {
|
27933 | line: 33,
|
27934 | column: 5
|
27935 | }
|
27936 | },
|
27937 | '6': {
|
27938 | start: {
|
27939 | line: 32,
|
27940 | column: 6
|
27941 | },
|
27942 | end: {
|
27943 | line: 32,
|
27944 | column: 41
|
27945 | }
|
27946 | },
|
27947 | '7': {
|
27948 | start: {
|
27949 | line: 42,
|
27950 | column: 28
|
27951 | },
|
27952 | end: {
|
27953 | line: 42,
|
27954 | column: 62
|
27955 | }
|
27956 | },
|
27957 | '8': {
|
27958 | start: {
|
27959 | line: 44,
|
27960 | column: 4
|
27961 | },
|
27962 | end: {
|
27963 | line: 46,
|
27964 | column: 5
|
27965 | }
|
27966 | },
|
27967 | '9': {
|
27968 | start: {
|
27969 | line: 45,
|
27970 | column: 6
|
27971 | },
|
27972 | end: {
|
27973 | line: 45,
|
27974 | column: 41
|
27975 | }
|
27976 | },
|
27977 | '10': {
|
27978 | start: {
|
27979 | line: 54,
|
27980 | column: 4
|
27981 | },
|
27982 | end: {
|
27983 | line: 54,
|
27984 | column: 34
|
27985 | }
|
27986 | },
|
27987 | '11': {
|
27988 | start: {
|
27989 | line: 61,
|
27990 | column: 4
|
27991 | },
|
27992 | end: {
|
27993 | line: 61,
|
27994 | column: 32
|
27995 | }
|
27996 | },
|
27997 | '12': {
|
27998 | start: {
|
27999 | line: 68,
|
28000 | column: 4
|
28001 | },
|
28002 | end: {
|
28003 | line: 68,
|
28004 | column: 52
|
28005 | }
|
28006 | },
|
28007 | '13': {
|
28008 | start: {
|
28009 | line: 73,
|
28010 | column: 0
|
28011 | },
|
28012 | end: {
|
28013 | line: 73,
|
28014 | column: 41
|
28015 | }
|
28016 | }
|
28017 | },
|
28018 | fnMap: {
|
28019 | '0': {
|
28020 | name: '(anonymous_0)',
|
28021 | decl: {
|
28022 | start: {
|
28023 | line: 11,
|
28024 | column: 2
|
28025 | },
|
28026 | end: {
|
28027 | line: 11,
|
28028 | column: 3
|
28029 | }
|
28030 | },
|
28031 | loc: {
|
28032 | start: {
|
28033 | line: 11,
|
28034 | column: 22
|
28035 | },
|
28036 | end: {
|
28037 | line: 15,
|
28038 | column: 3
|
28039 | }
|
28040 | },
|
28041 | line: 11
|
28042 | },
|
28043 | '1': {
|
28044 | name: '(anonymous_1)',
|
28045 | decl: {
|
28046 | start: {
|
28047 | line: 20,
|
28048 | column: 2
|
28049 | },
|
28050 | end: {
|
28051 | line: 20,
|
28052 | column: 3
|
28053 | }
|
28054 | },
|
28055 | loc: {
|
28056 | start: {
|
28057 | line: 20,
|
28058 | column: 14
|
28059 | },
|
28060 | end: {
|
28061 | line: 22,
|
28062 | column: 3
|
28063 | }
|
28064 | },
|
28065 | line: 20
|
28066 | },
|
28067 | '2': {
|
28068 | name: '(anonymous_2)',
|
28069 | decl: {
|
28070 | start: {
|
28071 | line: 28,
|
28072 | column: 2
|
28073 | },
|
28074 | end: {
|
28075 | line: 28,
|
28076 | column: 3
|
28077 | }
|
28078 | },
|
28079 | loc: {
|
28080 | start: {
|
28081 | line: 28,
|
28082 | column: 14
|
28083 | },
|
28084 | end: {
|
28085 | line: 34,
|
28086 | column: 3
|
28087 | }
|
28088 | },
|
28089 | line: 28
|
28090 | },
|
28091 | '3': {
|
28092 | name: '(anonymous_3)',
|
28093 | decl: {
|
28094 | start: {
|
28095 | line: 41,
|
28096 | column: 2
|
28097 | },
|
28098 | end: {
|
28099 | line: 41,
|
28100 | column: 3
|
28101 | }
|
28102 | },
|
28103 | loc: {
|
28104 | start: {
|
28105 | line: 41,
|
28106 | column: 21
|
28107 | },
|
28108 | end: {
|
28109 | line: 47,
|
28110 | column: 3
|
28111 | }
|
28112 | },
|
28113 | line: 41
|
28114 | },
|
28115 | '4': {
|
28116 | name: '(anonymous_4)',
|
28117 | decl: {
|
28118 | start: {
|
28119 | line: 53,
|
28120 | column: 2
|
28121 | },
|
28122 | end: {
|
28123 | line: 53,
|
28124 | column: 3
|
28125 | }
|
28126 | },
|
28127 | loc: {
|
28128 | start: {
|
28129 | line: 53,
|
28130 | column: 24
|
28131 | },
|
28132 | end: {
|
28133 | line: 55,
|
28134 | column: 3
|
28135 | }
|
28136 | },
|
28137 | line: 53
|
28138 | },
|
28139 | '5': {
|
28140 | name: '(anonymous_5)',
|
28141 | decl: {
|
28142 | start: {
|
28143 | line: 60,
|
28144 | column: 2
|
28145 | },
|
28146 | end: {
|
28147 | line: 60,
|
28148 | column: 3
|
28149 | }
|
28150 | },
|
28151 | loc: {
|
28152 | start: {
|
28153 | line: 60,
|
28154 | column: 22
|
28155 | },
|
28156 | end: {
|
28157 | line: 62,
|
28158 | column: 3
|
28159 | }
|
28160 | },
|
28161 | line: 60
|
28162 | },
|
28163 | '6': {
|
28164 | name: '(anonymous_6)',
|
28165 | decl: {
|
28166 | start: {
|
28167 | line: 67,
|
28168 | column: 2
|
28169 | },
|
28170 | end: {
|
28171 | line: 67,
|
28172 | column: 3
|
28173 | }
|
28174 | },
|
28175 | loc: {
|
28176 | start: {
|
28177 | line: 67,
|
28178 | column: 14
|
28179 | },
|
28180 | end: {
|
28181 | line: 69,
|
28182 | column: 3
|
28183 | }
|
28184 | },
|
28185 | line: 67
|
28186 | }
|
28187 | },
|
28188 | branchMap: {
|
28189 | '0': {
|
28190 | loc: {
|
28191 | start: {
|
28192 | line: 31,
|
28193 | column: 4
|
28194 | },
|
28195 | end: {
|
28196 | line: 33,
|
28197 | column: 5
|
28198 | }
|
28199 | },
|
28200 | type: 'if',
|
28201 | locations: [{
|
28202 | start: {
|
28203 | line: 31,
|
28204 | column: 4
|
28205 | },
|
28206 | end: {
|
28207 | line: 33,
|
28208 | column: 5
|
28209 | }
|
28210 | }, {
|
28211 | start: {
|
28212 | line: 31,
|
28213 | column: 4
|
28214 | },
|
28215 | end: {
|
28216 | line: 33,
|
28217 | column: 5
|
28218 | }
|
28219 | }],
|
28220 | line: 31
|
28221 | },
|
28222 | '1': {
|
28223 | loc: {
|
28224 | start: {
|
28225 | line: 44,
|
28226 | column: 4
|
28227 | },
|
28228 | end: {
|
28229 | line: 46,
|
28230 | column: 5
|
28231 | }
|
28232 | },
|
28233 | type: 'if',
|
28234 | locations: [{
|
28235 | start: {
|
28236 | line: 44,
|
28237 | column: 4
|
28238 | },
|
28239 | end: {
|
28240 | line: 46,
|
28241 | column: 5
|
28242 | }
|
28243 | }, {
|
28244 | start: {
|
28245 | line: 44,
|
28246 | column: 4
|
28247 | },
|
28248 | end: {
|
28249 | line: 46,
|
28250 | column: 5
|
28251 | }
|
28252 | }],
|
28253 | line: 44
|
28254 | }
|
28255 | },
|
28256 | s: {
|
28257 | '0': 0,
|
28258 | '1': 0,
|
28259 | '2': 0,
|
28260 | '3': 0,
|
28261 | '4': 0,
|
28262 | '5': 0,
|
28263 | '6': 0,
|
28264 | '7': 0,
|
28265 | '8': 0,
|
28266 | '9': 0,
|
28267 | '10': 0,
|
28268 | '11': 0,
|
28269 | '12': 0,
|
28270 | '13': 0
|
28271 | },
|
28272 | f: {
|
28273 | '0': 0,
|
28274 | '1': 0,
|
28275 | '2': 0,
|
28276 | '3': 0,
|
28277 | '4': 0,
|
28278 | '5': 0,
|
28279 | '6': 0
|
28280 | },
|
28281 | b: {
|
28282 | '0': [0, 0],
|
28283 | '1': [0, 0]
|
28284 | },
|
28285 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
28286 | },
|
28287 | coverage = global[gcv] || (global[gcv] = {});
|
28288 |
|
28289 | if (coverage[path] && coverage[path].hash === hash) {
|
28290 | return coverage[path];
|
28291 | }
|
28292 |
|
28293 | coverageData.hash = hash;
|
28294 | return coverage[path] = coverageData;
|
28295 | }();
|
28296 |
|
28297 | var AdState =
|
28298 |
|
28299 | function (_State) {
|
28300 | _inheritsLoose(AdState, _State);
|
28301 |
|
28302 | function AdState(player) {
|
28303 | var _this;
|
28304 |
|
28305 | cov_pvxb1alnj.f[0]++;
|
28306 | cov_pvxb1alnj.s[0]++;
|
28307 | _this = _State.call(this, player) || this;
|
28308 | cov_pvxb1alnj.s[1]++;
|
28309 | _this.contentResuming = false;
|
28310 | cov_pvxb1alnj.s[2]++;
|
28311 | _this.waitingForAdBreak = false;
|
28312 | return _this;
|
28313 | }
|
28314 |
|
28315 | var _proto = AdState.prototype;
|
28316 |
|
28317 | _proto.isAdState = function isAdState() {
|
28318 | cov_pvxb1alnj.f[1]++;
|
28319 | cov_pvxb1alnj.s[3]++;
|
28320 | return true;
|
28321 | };
|
28322 |
|
28323 | _proto.onPlaying = function onPlaying() {
|
28324 | cov_pvxb1alnj.f[2]++;
|
28325 | var ContentPlayback = (cov_pvxb1alnj.s[4]++, States.getState('ContentPlayback'));
|
28326 | cov_pvxb1alnj.s[5]++;
|
28327 |
|
28328 | if (this.contentResuming) {
|
28329 | cov_pvxb1alnj.b[0][0]++;
|
28330 | cov_pvxb1alnj.s[6]++;
|
28331 | this.transitionTo(ContentPlayback);
|
28332 | } else {
|
28333 | cov_pvxb1alnj.b[0][1]++;
|
28334 | }
|
28335 | };
|
28336 |
|
28337 | _proto.onContentResumed = function onContentResumed() {
|
28338 | cov_pvxb1alnj.f[3]++;
|
28339 | var ContentPlayback = (cov_pvxb1alnj.s[7]++, States.getState('ContentPlayback'));
|
28340 | cov_pvxb1alnj.s[8]++;
|
28341 |
|
28342 | if (this.contentResuming) {
|
28343 | cov_pvxb1alnj.b[1][0]++;
|
28344 | cov_pvxb1alnj.s[9]++;
|
28345 | this.transitionTo(ContentPlayback);
|
28346 | } else {
|
28347 | cov_pvxb1alnj.b[1][1]++;
|
28348 | }
|
28349 | };
|
28350 |
|
28351 | _proto.isWaitingForAdBreak = function isWaitingForAdBreak() {
|
28352 | cov_pvxb1alnj.f[4]++;
|
28353 | cov_pvxb1alnj.s[10]++;
|
28354 | return this.waitingForAdBreak;
|
28355 | };
|
28356 |
|
28357 | _proto.isContentResuming = function isContentResuming() {
|
28358 | cov_pvxb1alnj.f[5]++;
|
28359 | cov_pvxb1alnj.s[11]++;
|
28360 | return this.contentResuming;
|
28361 | };
|
28362 |
|
28363 | _proto.inAdBreak = function inAdBreak() {
|
28364 | cov_pvxb1alnj.f[6]++;
|
28365 | cov_pvxb1alnj.s[12]++;
|
28366 | return this.player.ads._inLinearAdMode === true;
|
28367 | };
|
28368 |
|
28369 | return AdState;
|
28370 | }(State);
|
28371 |
|
28372 | cov_pvxb1alnj.s[13]++;
|
28373 | States.registerState('AdState', AdState);
|
28374 |
|
28375 | |
28376 |
|
28377 |
|
28378 |
|
28379 |
|
28380 | QUnit.module('AdState', {
|
28381 | beforeEach: function beforeEach() {
|
28382 | var _this = this;
|
28383 |
|
28384 | this.player = {
|
28385 | ads: {}
|
28386 | };
|
28387 | this.adState = new AdState(this.player);
|
28388 |
|
28389 | this.adState.transitionTo = function (newState) {
|
28390 | _this.newState = newState.name;
|
28391 | };
|
28392 | }
|
28393 | });
|
28394 | QUnit.test('does not start out with content resuming', function (assert) {
|
28395 | assert.equal(this.adState.contentResuming, false);
|
28396 | });
|
28397 | QUnit.test('is an ad state', function (assert) {
|
28398 | assert.equal(this.adState.isAdState(), true);
|
28399 | });
|
28400 | QUnit.test('transitions to ContentPlayback on playing if content resuming', function (assert) {
|
28401 | this.adState.contentResuming = true;
|
28402 | this.adState.onPlaying();
|
28403 | assert.equal(this.newState, 'ContentPlayback');
|
28404 | });
|
28405 | QUnit.test('doesn\'t transition on playing if content not resuming', function (assert) {
|
28406 | this.adState.onPlaying();
|
28407 | assert.equal(this.newState, undefined, 'no transition');
|
28408 | });
|
28409 | QUnit.test('transitions to ContentPlayback on contentresumed if content resuming', function (assert) {
|
28410 | this.adState.contentResuming = true;
|
28411 | this.adState.onContentResumed();
|
28412 | assert.equal(this.newState, 'ContentPlayback');
|
28413 | });
|
28414 | QUnit.test('doesn\'t transition on contentresumed if content not resuming', function (assert) {
|
28415 | this.adState.onContentResumed();
|
28416 | assert.equal(this.newState, undefined, 'no transition');
|
28417 | });
|
28418 | QUnit.test('can check if content is resuming', function (assert) {
|
28419 | assert.equal(this.adState.isContentResuming(), false, 'not resuming');
|
28420 | this.adState.contentResuming = true;
|
28421 | assert.equal(this.adState.isContentResuming(), true, 'resuming');
|
28422 | });
|
28423 | QUnit.test('can check if in ad break', function (assert) {
|
28424 | assert.equal(this.adState.inAdBreak(), false, 'not in ad break');
|
28425 | this.player.ads._inLinearAdMode = true;
|
28426 | assert.equal(this.adState.inAdBreak(), true, 'in ad break');
|
28427 | });
|
28428 |
|
28429 | var cov_283ysf3ldf = function () {
|
28430 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/abstract/ContentState.js',
|
28431 | hash = '525b8e77d1677caca5b982ab943089f8e0efc8da',
|
28432 | Function = function () {}.constructor,
|
28433 | global = new Function('return this')(),
|
28434 | gcv = '__coverage__',
|
28435 | coverageData = {
|
28436 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/abstract/ContentState.js',
|
28437 | statementMap: {
|
28438 | '0': {
|
28439 | start: {
|
28440 | line: 10,
|
28441 | column: 4
|
28442 | },
|
28443 | end: {
|
28444 | line: 10,
|
28445 | column: 17
|
28446 | }
|
28447 | },
|
28448 | '1': {
|
28449 | start: {
|
28450 | line: 18,
|
28451 | column: 26
|
28452 | },
|
28453 | end: {
|
28454 | line: 18,
|
28455 | column: 58
|
28456 | }
|
28457 | },
|
28458 | '2': {
|
28459 | start: {
|
28460 | line: 19,
|
28461 | column: 20
|
28462 | },
|
28463 | end: {
|
28464 | line: 19,
|
28465 | column: 46
|
28466 | }
|
28467 | },
|
28468 | '3': {
|
28469 | start: {
|
28470 | line: 21,
|
28471 | column: 4
|
28472 | },
|
28473 | end: {
|
28474 | line: 21,
|
28475 | column: 69
|
28476 | }
|
28477 | },
|
28478 | '4': {
|
28479 | start: {
|
28480 | line: 22,
|
28481 | column: 4
|
28482 | },
|
28483 | end: {
|
28484 | line: 28,
|
28485 | column: 5
|
28486 | }
|
28487 | },
|
28488 | '5': {
|
28489 | start: {
|
28490 | line: 23,
|
28491 | column: 6
|
28492 | },
|
28493 | end: {
|
28494 | line: 23,
|
28495 | column: 39
|
28496 | }
|
28497 | },
|
28498 | '6': {
|
28499 | start: {
|
28500 | line: 25,
|
28501 | column: 6
|
28502 | },
|
28503 | end: {
|
28504 | line: 25,
|
28505 | column: 40
|
28506 | }
|
28507 | },
|
28508 | '7': {
|
28509 | start: {
|
28510 | line: 26,
|
28511 | column: 6
|
28512 | },
|
28513 | end: {
|
28514 | line: 26,
|
28515 | column: 21
|
28516 | }
|
28517 | },
|
28518 | '8': {
|
28519 | start: {
|
28520 | line: 27,
|
28521 | column: 6
|
28522 | },
|
28523 | end: {
|
28524 | line: 27,
|
28525 | column: 47
|
28526 | }
|
28527 | },
|
28528 | '9': {
|
28529 | start: {
|
28530 | line: 33,
|
28531 | column: 0
|
28532 | },
|
28533 | end: {
|
28534 | line: 33,
|
28535 | column: 51
|
28536 | }
|
28537 | }
|
28538 | },
|
28539 | fnMap: {
|
28540 | '0': {
|
28541 | name: '(anonymous_0)',
|
28542 | decl: {
|
28543 | start: {
|
28544 | line: 9,
|
28545 | column: 2
|
28546 | },
|
28547 | end: {
|
28548 | line: 9,
|
28549 | column: 3
|
28550 | }
|
28551 | },
|
28552 | loc: {
|
28553 | start: {
|
28554 | line: 9,
|
28555 | column: 14
|
28556 | },
|
28557 | end: {
|
28558 | line: 11,
|
28559 | column: 3
|
28560 | }
|
28561 | },
|
28562 | line: 9
|
28563 | },
|
28564 | '1': {
|
28565 | name: '(anonymous_1)',
|
28566 | decl: {
|
28567 | start: {
|
28568 | line: 17,
|
28569 | column: 2
|
28570 | },
|
28571 | end: {
|
28572 | line: 17,
|
28573 | column: 3
|
28574 | }
|
28575 | },
|
28576 | loc: {
|
28577 | start: {
|
28578 | line: 17,
|
28579 | column: 27
|
28580 | },
|
28581 | end: {
|
28582 | line: 29,
|
28583 | column: 3
|
28584 | }
|
28585 | },
|
28586 | line: 17
|
28587 | }
|
28588 | },
|
28589 | branchMap: {
|
28590 | '0': {
|
28591 | loc: {
|
28592 | start: {
|
28593 | line: 22,
|
28594 | column: 4
|
28595 | },
|
28596 | end: {
|
28597 | line: 28,
|
28598 | column: 5
|
28599 | }
|
28600 | },
|
28601 | type: 'if',
|
28602 | locations: [{
|
28603 | start: {
|
28604 | line: 22,
|
28605 | column: 4
|
28606 | },
|
28607 | end: {
|
28608 | line: 28,
|
28609 | column: 5
|
28610 | }
|
28611 | }, {
|
28612 | start: {
|
28613 | line: 22,
|
28614 | column: 4
|
28615 | },
|
28616 | end: {
|
28617 | line: 28,
|
28618 | column: 5
|
28619 | }
|
28620 | }],
|
28621 | line: 22
|
28622 | }
|
28623 | },
|
28624 | s: {
|
28625 | '0': 0,
|
28626 | '1': 0,
|
28627 | '2': 0,
|
28628 | '3': 0,
|
28629 | '4': 0,
|
28630 | '5': 0,
|
28631 | '6': 0,
|
28632 | '7': 0,
|
28633 | '8': 0,
|
28634 | '9': 0
|
28635 | },
|
28636 | f: {
|
28637 | '0': 0,
|
28638 | '1': 0
|
28639 | },
|
28640 | b: {
|
28641 | '0': [0, 0]
|
28642 | },
|
28643 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
28644 | },
|
28645 | coverage = global[gcv] || (global[gcv] = {});
|
28646 |
|
28647 | if (coverage[path] && coverage[path].hash === hash) {
|
28648 | return coverage[path];
|
28649 | }
|
28650 |
|
28651 | coverageData.hash = hash;
|
28652 | return coverage[path] = coverageData;
|
28653 | }();
|
28654 |
|
28655 | var ContentState =
|
28656 |
|
28657 | function (_State) {
|
28658 | _inheritsLoose(ContentState, _State);
|
28659 |
|
28660 | function ContentState() {
|
28661 | return _State.apply(this, arguments) || this;
|
28662 | }
|
28663 |
|
28664 | var _proto = ContentState.prototype;
|
28665 |
|
28666 | _proto.isAdState = function isAdState() {
|
28667 | cov_283ysf3ldf.f[0]++;
|
28668 | cov_283ysf3ldf.s[0]++;
|
28669 | return false;
|
28670 | };
|
28671 |
|
28672 | _proto.onContentChanged = function onContentChanged(player) {
|
28673 | cov_283ysf3ldf.f[1]++;
|
28674 | var BeforePreroll = (cov_283ysf3ldf.s[1]++, States.getState('BeforePreroll'));
|
28675 | var Preroll = (cov_283ysf3ldf.s[2]++, States.getState('Preroll'));
|
28676 | cov_283ysf3ldf.s[3]++;
|
28677 | player.ads.debug('Received contentchanged event (ContentState)');
|
28678 | cov_283ysf3ldf.s[4]++;
|
28679 |
|
28680 | if (player.paused()) {
|
28681 | cov_283ysf3ldf.b[0][0]++;
|
28682 | cov_283ysf3ldf.s[5]++;
|
28683 | this.transitionTo(BeforePreroll);
|
28684 | } else {
|
28685 | cov_283ysf3ldf.b[0][1]++;
|
28686 | cov_283ysf3ldf.s[6]++;
|
28687 | this.transitionTo(Preroll, false);
|
28688 | cov_283ysf3ldf.s[7]++;
|
28689 | player.pause();
|
28690 | cov_283ysf3ldf.s[8]++;
|
28691 | player.ads._pausedOnContentupdate = true;
|
28692 | }
|
28693 | };
|
28694 |
|
28695 | return ContentState;
|
28696 | }(State);
|
28697 |
|
28698 | cov_283ysf3ldf.s[9]++;
|
28699 | States.registerState('ContentState', ContentState);
|
28700 |
|
28701 | |
28702 |
|
28703 |
|
28704 |
|
28705 |
|
28706 | QUnit.module('ContentState', {
|
28707 | beforeEach: function beforeEach() {
|
28708 | var _this = this;
|
28709 |
|
28710 | this.player = {
|
28711 | ads: {
|
28712 | debug: function debug() {}
|
28713 | }
|
28714 | };
|
28715 | this.contentState = new ContentState(this.player);
|
28716 |
|
28717 | this.contentState.transitionTo = function (newState) {
|
28718 | _this.newState = newState.name;
|
28719 | };
|
28720 | }
|
28721 | });
|
28722 | QUnit.test('is not an ad state', function (assert) {
|
28723 | assert.equal(this.contentState.isAdState(), false);
|
28724 | });
|
28725 | QUnit.test('handles content changed when not playing', function (assert) {
|
28726 | this.player.paused = function () {
|
28727 | return true;
|
28728 | };
|
28729 |
|
28730 | this.player.pause = sinon.stub();
|
28731 | this.contentState.onContentChanged(this.player);
|
28732 | assert.equal(this.newState, 'BeforePreroll');
|
28733 | assert.equal(this.player.pause.callCount, 0, 'did not pause player');
|
28734 | assert.ok(!this.player.ads._pausedOnContentupdate, 'did not set _pausedOnContentupdate');
|
28735 | });
|
28736 | QUnit.test('handles content changed when playing', function (assert) {
|
28737 | this.player.paused = function () {
|
28738 | return false;
|
28739 | };
|
28740 |
|
28741 | this.player.pause = sinon.stub();
|
28742 | this.contentState.onContentChanged(this.player);
|
28743 | assert.equal(this.newState, 'Preroll');
|
28744 | assert.equal(this.player.pause.callCount, 1, 'paused player');
|
28745 | assert.equal(this.player.ads._pausedOnContentupdate, true, 'set _pausedOnContentupdate');
|
28746 | });
|
28747 |
|
28748 | |
28749 |
|
28750 |
|
28751 |
|
28752 |
|
28753 | QUnit.module('State', {
|
28754 | beforeEach: function beforeEach() {
|
28755 | this.player = {
|
28756 | ads: {
|
28757 | debug: function debug() {}
|
28758 | }
|
28759 | };
|
28760 | this.state = new State(this.player);
|
28761 | }
|
28762 | });
|
28763 | QUnit.test('sets this.player', function (assert) {
|
28764 | assert.equal(this.state.player, this.player);
|
28765 | });
|
28766 | QUnit.test('can transition to another state', function (assert) {
|
28767 | var mockStateInit = false;
|
28768 |
|
28769 | var MockState =
|
28770 |
|
28771 | function () {
|
28772 | function MockState() {}
|
28773 |
|
28774 | MockState._getName = function _getName() {
|
28775 | return 'MockState';
|
28776 | };
|
28777 |
|
28778 | var _proto = MockState.prototype;
|
28779 |
|
28780 | _proto.init = function init() {
|
28781 | mockStateInit = true;
|
28782 | };
|
28783 |
|
28784 | return MockState;
|
28785 | }();
|
28786 |
|
28787 | this.state.cleanup = sinon.stub();
|
28788 | this.state.transitionTo(MockState);
|
28789 | assert.ok(this.state.cleanup.calledOnce, 'cleaned up old state');
|
28790 | assert.equal(this.player.ads._state.constructor.name, 'MockState', 'set ads._state');
|
28791 | assert.equal(mockStateInit, true, 'initialized new state');
|
28792 | });
|
28793 | QUnit.test('throws error if isAdState is not implemented', function (assert) {
|
28794 | var error;
|
28795 |
|
28796 | try {
|
28797 | this.state.isAdState();
|
28798 | } catch (e) {
|
28799 | error = e;
|
28800 | }
|
28801 |
|
28802 | assert.equal(error.message, 'isAdState unimplemented for Anonymous State');
|
28803 | });
|
28804 | QUnit.test('is not resuming content by default', function (assert) {
|
28805 | assert.equal(this.state.isContentResuming(), false);
|
28806 | });
|
28807 | QUnit.test('is not in an ad break by default', function (assert) {
|
28808 | assert.equal(this.state.inAdBreak(), false);
|
28809 | });
|
28810 | QUnit.test('handles events', function (assert) {
|
28811 | this.state.onPlay = sinon.stub();
|
28812 | this.state.handleEvent('play');
|
28813 | assert.ok(this.state.onPlay.calledOnce);
|
28814 | });
|
28815 |
|
28816 | var cov_1bstehdhzk = function () {
|
28817 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/AdsDone.js',
|
28818 | hash = '4da80d8576178a0e986f82b9f484604bad55304f',
|
28819 | Function = function () {}.constructor,
|
28820 | global = new Function('return this')(),
|
28821 | gcv = '__coverage__',
|
28822 | coverageData = {
|
28823 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/AdsDone.js',
|
28824 | statementMap: {
|
28825 | '0': {
|
28826 | start: {
|
28827 | line: 4,
|
28828 | column: 21
|
28829 | },
|
28830 | end: {
|
28831 | line: 4,
|
28832 | column: 52
|
28833 | }
|
28834 | },
|
28835 | '1': {
|
28836 | start: {
|
28837 | line: 12,
|
28838 | column: 4
|
28839 | },
|
28840 | end: {
|
28841 | line: 12,
|
28842 | column: 21
|
28843 | }
|
28844 | },
|
28845 | '2': {
|
28846 | start: {
|
28847 | line: 21,
|
28848 | column: 4
|
28849 | },
|
28850 | end: {
|
28851 | line: 21,
|
28852 | column: 39
|
28853 | }
|
28854 | },
|
28855 | '3': {
|
28856 | start: {
|
28857 | line: 22,
|
28858 | column: 4
|
28859 | },
|
28860 | end: {
|
28861 | line: 22,
|
28862 | column: 28
|
28863 | }
|
28864 | },
|
28865 | '4': {
|
28866 | start: {
|
28867 | line: 29,
|
28868 | column: 4
|
28869 | },
|
28870 | end: {
|
28871 | line: 29,
|
28872 | column: 74
|
28873 | }
|
28874 | },
|
28875 | '5': {
|
28876 | start: {
|
28877 | line: 34,
|
28878 | column: 0
|
28879 | },
|
28880 | end: {
|
28881 | line: 34,
|
28882 | column: 41
|
28883 | }
|
28884 | }
|
28885 | },
|
28886 | fnMap: {
|
28887 | '0': {
|
28888 | name: '(anonymous_0)',
|
28889 | decl: {
|
28890 | start: {
|
28891 | line: 11,
|
28892 | column: 2
|
28893 | },
|
28894 | end: {
|
28895 | line: 11,
|
28896 | column: 3
|
28897 | }
|
28898 | },
|
28899 | loc: {
|
28900 | start: {
|
28901 | line: 11,
|
28902 | column: 20
|
28903 | },
|
28904 | end: {
|
28905 | line: 13,
|
28906 | column: 3
|
28907 | }
|
28908 | },
|
28909 | line: 11
|
28910 | },
|
28911 | '1': {
|
28912 | name: '(anonymous_1)',
|
28913 | decl: {
|
28914 | start: {
|
28915 | line: 19,
|
28916 | column: 2
|
28917 | },
|
28918 | end: {
|
28919 | line: 19,
|
28920 | column: 3
|
28921 | }
|
28922 | },
|
28923 | loc: {
|
28924 | start: {
|
28925 | line: 19,
|
28926 | column: 15
|
28927 | },
|
28928 | end: {
|
28929 | line: 23,
|
28930 | column: 3
|
28931 | }
|
28932 | },
|
28933 | line: 19
|
28934 | },
|
28935 | '2': {
|
28936 | name: '(anonymous_2)',
|
28937 | decl: {
|
28938 | start: {
|
28939 | line: 28,
|
28940 | column: 2
|
28941 | },
|
28942 | end: {
|
28943 | line: 28,
|
28944 | column: 3
|
28945 | }
|
28946 | },
|
28947 | loc: {
|
28948 | start: {
|
28949 | line: 28,
|
28950 | column: 22
|
28951 | },
|
28952 | end: {
|
28953 | line: 30,
|
28954 | column: 3
|
28955 | }
|
28956 | },
|
28957 | line: 28
|
28958 | }
|
28959 | },
|
28960 | branchMap: {},
|
28961 | s: {
|
28962 | '0': 0,
|
28963 | '1': 0,
|
28964 | '2': 0,
|
28965 | '3': 0,
|
28966 | '4': 0,
|
28967 | '5': 0
|
28968 | },
|
28969 | f: {
|
28970 | '0': 0,
|
28971 | '1': 0,
|
28972 | '2': 0
|
28973 | },
|
28974 | b: {},
|
28975 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
28976 | },
|
28977 | coverage = global[gcv] || (global[gcv] = {});
|
28978 |
|
28979 | if (coverage[path] && coverage[path].hash === hash) {
|
28980 | return coverage[path];
|
28981 | }
|
28982 |
|
28983 | coverageData.hash = hash;
|
28984 | return coverage[path] = coverageData;
|
28985 | }();
|
28986 | var ContentState$1 = (cov_1bstehdhzk.s[0]++, States.getState('ContentState'));
|
28987 |
|
28988 | var AdsDone =
|
28989 |
|
28990 | function (_ContentState) {
|
28991 | _inheritsLoose(AdsDone, _ContentState);
|
28992 |
|
28993 | function AdsDone() {
|
28994 | return _ContentState.apply(this, arguments) || this;
|
28995 | }
|
28996 |
|
28997 | AdsDone._getName = function _getName() {
|
28998 | cov_1bstehdhzk.f[0]++;
|
28999 | cov_1bstehdhzk.s[1]++;
|
29000 | return 'AdsDone';
|
29001 | };
|
29002 |
|
29003 | var _proto = AdsDone.prototype;
|
29004 |
|
29005 | _proto.init = function init(player) {
|
29006 | cov_1bstehdhzk.f[1]++;
|
29007 | cov_1bstehdhzk.s[2]++;
|
29008 | player.ads._contentHasEnded = true;
|
29009 | cov_1bstehdhzk.s[3]++;
|
29010 | player.trigger('ended');
|
29011 | };
|
29012 |
|
29013 | _proto.startLinearAdMode = function startLinearAdMode() {
|
29014 | cov_1bstehdhzk.f[2]++;
|
29015 | cov_1bstehdhzk.s[4]++;
|
29016 | videojs$1.log.warn('Unexpected startLinearAdMode invocation (AdsDone)');
|
29017 | };
|
29018 |
|
29019 | return AdsDone;
|
29020 | }(ContentState$1);
|
29021 |
|
29022 | cov_1bstehdhzk.s[5]++;
|
29023 | States.registerState('AdsDone', AdsDone);
|
29024 |
|
29025 | |
29026 |
|
29027 |
|
29028 |
|
29029 |
|
29030 | QUnit.module('AdsDone', {
|
29031 | beforeEach: function beforeEach() {
|
29032 | var _this = this;
|
29033 |
|
29034 | this.events = [];
|
29035 | this.player = {
|
29036 | trigger: function trigger(event) {
|
29037 | _this.events.push(event);
|
29038 | },
|
29039 | ads: {}
|
29040 | };
|
29041 | this.adsDone = new AdsDone(this.player);
|
29042 | }
|
29043 | });
|
29044 | QUnit.test('sets _contentHasEnded on init', function (assert) {
|
29045 | this.adsDone.init(this.player);
|
29046 | assert.equal(this.player.ads._contentHasEnded, true, 'content has ended');
|
29047 | });
|
29048 | QUnit.test('ended event on init', function (assert) {
|
29049 | this.adsDone.init(this.player);
|
29050 | assert.equal(this.events[0], 'ended', 'content has ended');
|
29051 | });
|
29052 | QUnit.test('does not play midrolls', function (assert) {
|
29053 | this.adsDone.transitionTo = sinon.spy();
|
29054 | this.adsDone.init(this.player);
|
29055 | this.adsDone.startLinearAdMode();
|
29056 | assert.equal(this.adsDone.transitionTo.callCount, 0, 'no transition');
|
29057 | });
|
29058 |
|
29059 | var cov_ckiglpgg0 = function () {
|
29060 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/BeforePreroll.js',
|
29061 | hash = '27f30c1279a05d096f716202131ea468948f5327',
|
29062 | Function = function () {}.constructor,
|
29063 | global = new Function('return this')(),
|
29064 | gcv = '__coverage__',
|
29065 | coverageData = {
|
29066 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/BeforePreroll.js',
|
29067 | statementMap: {
|
29068 | '0': {
|
29069 | start: {
|
29070 | line: 3,
|
29071 | column: 21
|
29072 | },
|
29073 | end: {
|
29074 | line: 3,
|
29075 | column: 52
|
29076 | }
|
29077 | },
|
29078 | '1': {
|
29079 | start: {
|
29080 | line: 17,
|
29081 | column: 4
|
29082 | },
|
29083 | end: {
|
29084 | line: 17,
|
29085 | column: 27
|
29086 | }
|
29087 | },
|
29088 | '2': {
|
29089 | start: {
|
29090 | line: 25,
|
29091 | column: 4
|
29092 | },
|
29093 | end: {
|
29094 | line: 25,
|
29095 | column: 26
|
29096 | }
|
29097 | },
|
29098 | '3': {
|
29099 | start: {
|
29100 | line: 26,
|
29101 | column: 4
|
29102 | },
|
29103 | end: {
|
29104 | line: 26,
|
29105 | column: 39
|
29106 | }
|
29107 | },
|
29108 | '4': {
|
29109 | start: {
|
29110 | line: 30,
|
29111 | column: 4
|
29112 | },
|
29113 | end: {
|
29114 | line: 30,
|
29115 | column: 39
|
29116 | }
|
29117 | },
|
29118 | '5': {
|
29119 | start: {
|
29120 | line: 38,
|
29121 | column: 4
|
29122 | },
|
29123 | end: {
|
29124 | line: 38,
|
29125 | column: 64
|
29126 | }
|
29127 | },
|
29128 | '6': {
|
29129 | start: {
|
29130 | line: 39,
|
29131 | column: 4
|
29132 | },
|
29133 | end: {
|
29134 | line: 39,
|
29135 | column: 25
|
29136 | }
|
29137 | },
|
29138 | '7': {
|
29139 | start: {
|
29140 | line: 47,
|
29141 | column: 20
|
29142 | },
|
29143 | end: {
|
29144 | line: 47,
|
29145 | column: 46
|
29146 | }
|
29147 | },
|
29148 | '8': {
|
29149 | start: {
|
29150 | line: 49,
|
29151 | column: 4
|
29152 | },
|
29153 | end: {
|
29154 | line: 49,
|
29155 | column: 60
|
29156 | }
|
29157 | },
|
29158 | '9': {
|
29159 | start: {
|
29160 | line: 52,
|
29161 | column: 4
|
29162 | },
|
29163 | end: {
|
29164 | line: 52,
|
29165 | column: 74
|
29166 | }
|
29167 | },
|
29168 | '10': {
|
29169 | start: {
|
29170 | line: 59,
|
29171 | column: 4
|
29172 | },
|
29173 | end: {
|
29174 | line: 59,
|
29175 | column: 52
|
29176 | }
|
29177 | },
|
29178 | '11': {
|
29179 | start: {
|
29180 | line: 60,
|
29181 | column: 4
|
29182 | },
|
29183 | end: {
|
29184 | line: 60,
|
29185 | column: 38
|
29186 | }
|
29187 | },
|
29188 | '12': {
|
29189 | start: {
|
29190 | line: 67,
|
29191 | column: 4
|
29192 | },
|
29193 | end: {
|
29194 | line: 67,
|
29195 | column: 54
|
29196 | }
|
29197 | },
|
29198 | '13': {
|
29199 | start: {
|
29200 | line: 68,
|
29201 | column: 4
|
29202 | },
|
29203 | end: {
|
29204 | line: 68,
|
29205 | column: 38
|
29206 | }
|
29207 | },
|
29208 | '14': {
|
29209 | start: {
|
29210 | line: 75,
|
29211 | column: 4
|
29212 | },
|
29213 | end: {
|
29214 | line: 75,
|
29215 | column: 86
|
29216 | }
|
29217 | },
|
29218 | '15': {
|
29219 | start: {
|
29220 | line: 76,
|
29221 | column: 4
|
29222 | },
|
29223 | end: {
|
29224 | line: 76,
|
29225 | column: 38
|
29226 | }
|
29227 | },
|
29228 | '16': {
|
29229 | start: {
|
29230 | line: 83,
|
29231 | column: 19
|
29232 | },
|
29233 | end: {
|
29234 | line: 83,
|
29235 | column: 30
|
29236 | }
|
29237 | },
|
29238 | '17': {
|
29239 | start: {
|
29240 | line: 85,
|
29241 | column: 4
|
29242 | },
|
29243 | end: {
|
29244 | line: 85,
|
29245 | column: 29
|
29246 | }
|
29247 | },
|
29248 | '18': {
|
29249 | start: {
|
29250 | line: 86,
|
29251 | column: 4
|
29252 | },
|
29253 | end: {
|
29254 | line: 86,
|
29255 | column: 57
|
29256 | }
|
29257 | },
|
29258 | '19': {
|
29259 | start: {
|
29260 | line: 87,
|
29261 | column: 4
|
29262 | },
|
29263 | end: {
|
29264 | line: 87,
|
29265 | column: 38
|
29266 | }
|
29267 | },
|
29268 | '20': {
|
29269 | start: {
|
29270 | line: 91,
|
29271 | column: 4
|
29272 | },
|
29273 | end: {
|
29274 | line: 91,
|
29275 | column: 27
|
29276 | }
|
29277 | },
|
29278 | '21': {
|
29279 | start: {
|
29280 | line: 96,
|
29281 | column: 0
|
29282 | },
|
29283 | end: {
|
29284 | line: 96,
|
29285 | column: 53
|
29286 | }
|
29287 | }
|
29288 | },
|
29289 | fnMap: {
|
29290 | '0': {
|
29291 | name: '(anonymous_0)',
|
29292 | decl: {
|
29293 | start: {
|
29294 | line: 16,
|
29295 | column: 2
|
29296 | },
|
29297 | end: {
|
29298 | line: 16,
|
29299 | column: 3
|
29300 | }
|
29301 | },
|
29302 | loc: {
|
29303 | start: {
|
29304 | line: 16,
|
29305 | column: 20
|
29306 | },
|
29307 | end: {
|
29308 | line: 18,
|
29309 | column: 3
|
29310 | }
|
29311 | },
|
29312 | line: 16
|
29313 | },
|
29314 | '1': {
|
29315 | name: '(anonymous_1)',
|
29316 | decl: {
|
29317 | start: {
|
29318 | line: 24,
|
29319 | column: 2
|
29320 | },
|
29321 | end: {
|
29322 | line: 24,
|
29323 | column: 3
|
29324 | }
|
29325 | },
|
29326 | loc: {
|
29327 | start: {
|
29328 | line: 24,
|
29329 | column: 15
|
29330 | },
|
29331 | end: {
|
29332 | line: 31,
|
29333 | column: 3
|
29334 | }
|
29335 | },
|
29336 | line: 24
|
29337 | },
|
29338 | '2': {
|
29339 | name: '(anonymous_2)',
|
29340 | decl: {
|
29341 | start: {
|
29342 | line: 37,
|
29343 | column: 2
|
29344 | },
|
29345 | end: {
|
29346 | line: 37,
|
29347 | column: 3
|
29348 | }
|
29349 | },
|
29350 | loc: {
|
29351 | start: {
|
29352 | line: 37,
|
29353 | column: 21
|
29354 | },
|
29355 | end: {
|
29356 | line: 40,
|
29357 | column: 3
|
29358 | }
|
29359 | },
|
29360 | line: 37
|
29361 | },
|
29362 | '3': {
|
29363 | name: '(anonymous_3)',
|
29364 | decl: {
|
29365 | start: {
|
29366 | line: 46,
|
29367 | column: 2
|
29368 | },
|
29369 | end: {
|
29370 | line: 46,
|
29371 | column: 3
|
29372 | }
|
29373 | },
|
29374 | loc: {
|
29375 | start: {
|
29376 | line: 46,
|
29377 | column: 17
|
29378 | },
|
29379 | end: {
|
29380 | line: 53,
|
29381 | column: 3
|
29382 | }
|
29383 | },
|
29384 | line: 46
|
29385 | },
|
29386 | '4': {
|
29387 | name: '(anonymous_4)',
|
29388 | decl: {
|
29389 | start: {
|
29390 | line: 58,
|
29391 | column: 2
|
29392 | },
|
29393 | end: {
|
29394 | line: 58,
|
29395 | column: 3
|
29396 | }
|
29397 | },
|
29398 | loc: {
|
29399 | start: {
|
29400 | line: 58,
|
29401 | column: 24
|
29402 | },
|
29403 | end: {
|
29404 | line: 61,
|
29405 | column: 3
|
29406 | }
|
29407 | },
|
29408 | line: 58
|
29409 | },
|
29410 | '5': {
|
29411 | name: '(anonymous_5)',
|
29412 | decl: {
|
29413 | start: {
|
29414 | line: 66,
|
29415 | column: 2
|
29416 | },
|
29417 | end: {
|
29418 | line: 66,
|
29419 | column: 3
|
29420 | }
|
29421 | },
|
29422 | loc: {
|
29423 | start: {
|
29424 | line: 66,
|
29425 | column: 15
|
29426 | },
|
29427 | end: {
|
29428 | line: 69,
|
29429 | column: 3
|
29430 | }
|
29431 | },
|
29432 | line: 66
|
29433 | },
|
29434 | '6': {
|
29435 | name: '(anonymous_6)',
|
29436 | decl: {
|
29437 | start: {
|
29438 | line: 74,
|
29439 | column: 2
|
29440 | },
|
29441 | end: {
|
29442 | line: 74,
|
29443 | column: 3
|
29444 | }
|
29445 | },
|
29446 | loc: {
|
29447 | start: {
|
29448 | line: 74,
|
29449 | column: 16
|
29450 | },
|
29451 | end: {
|
29452 | line: 77,
|
29453 | column: 3
|
29454 | }
|
29455 | },
|
29456 | line: 74
|
29457 | },
|
29458 | '7': {
|
29459 | name: '(anonymous_7)',
|
29460 | decl: {
|
29461 | start: {
|
29462 | line: 82,
|
29463 | column: 2
|
29464 | },
|
29465 | end: {
|
29466 | line: 82,
|
29467 | column: 3
|
29468 | }
|
29469 | },
|
29470 | loc: {
|
29471 | start: {
|
29472 | line: 82,
|
29473 | column: 21
|
29474 | },
|
29475 | end: {
|
29476 | line: 88,
|
29477 | column: 3
|
29478 | }
|
29479 | },
|
29480 | line: 82
|
29481 | },
|
29482 | '8': {
|
29483 | name: '(anonymous_8)',
|
29484 | decl: {
|
29485 | start: {
|
29486 | line: 90,
|
29487 | column: 2
|
29488 | },
|
29489 | end: {
|
29490 | line: 90,
|
29491 | column: 3
|
29492 | }
|
29493 | },
|
29494 | loc: {
|
29495 | start: {
|
29496 | line: 90,
|
29497 | column: 21
|
29498 | },
|
29499 | end: {
|
29500 | line: 92,
|
29501 | column: 3
|
29502 | }
|
29503 | },
|
29504 | line: 90
|
29505 | }
|
29506 | },
|
29507 | branchMap: {},
|
29508 | s: {
|
29509 | '0': 0,
|
29510 | '1': 0,
|
29511 | '2': 0,
|
29512 | '3': 0,
|
29513 | '4': 0,
|
29514 | '5': 0,
|
29515 | '6': 0,
|
29516 | '7': 0,
|
29517 | '8': 0,
|
29518 | '9': 0,
|
29519 | '10': 0,
|
29520 | '11': 0,
|
29521 | '12': 0,
|
29522 | '13': 0,
|
29523 | '14': 0,
|
29524 | '15': 0,
|
29525 | '16': 0,
|
29526 | '17': 0,
|
29527 | '18': 0,
|
29528 | '19': 0,
|
29529 | '20': 0,
|
29530 | '21': 0
|
29531 | },
|
29532 | f: {
|
29533 | '0': 0,
|
29534 | '1': 0,
|
29535 | '2': 0,
|
29536 | '3': 0,
|
29537 | '4': 0,
|
29538 | '5': 0,
|
29539 | '6': 0,
|
29540 | '7': 0,
|
29541 | '8': 0
|
29542 | },
|
29543 | b: {},
|
29544 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
29545 | },
|
29546 | coverage = global[gcv] || (global[gcv] = {});
|
29547 |
|
29548 | if (coverage[path] && coverage[path].hash === hash) {
|
29549 | return coverage[path];
|
29550 | }
|
29551 |
|
29552 | coverageData.hash = hash;
|
29553 | return coverage[path] = coverageData;
|
29554 | }();
|
29555 | var ContentState$2 = (cov_ckiglpgg0.s[0]++, States.getState('ContentState'));
|
29556 |
|
29557 | var BeforePreroll =
|
29558 |
|
29559 | function (_ContentState) {
|
29560 | _inheritsLoose(BeforePreroll, _ContentState);
|
29561 |
|
29562 | function BeforePreroll() {
|
29563 | return _ContentState.apply(this, arguments) || this;
|
29564 | }
|
29565 |
|
29566 | BeforePreroll._getName = function _getName() {
|
29567 | cov_ckiglpgg0.f[0]++;
|
29568 | cov_ckiglpgg0.s[1]++;
|
29569 | return 'BeforePreroll';
|
29570 | };
|
29571 |
|
29572 | var _proto = BeforePreroll.prototype;
|
29573 |
|
29574 | _proto.init = function init(player) {
|
29575 | cov_ckiglpgg0.f[1]++;
|
29576 | cov_ckiglpgg0.s[2]++;
|
29577 | this.adsReady = false;
|
29578 | cov_ckiglpgg0.s[3]++;
|
29579 | this.shouldResumeToContent = false;
|
29580 | cov_ckiglpgg0.s[4]++;
|
29581 | player.ads._shouldBlockPlay = true;
|
29582 | };
|
29583 |
|
29584 | _proto.onAdsReady = function onAdsReady(player) {
|
29585 | cov_ckiglpgg0.f[2]++;
|
29586 | cov_ckiglpgg0.s[5]++;
|
29587 | player.ads.debug('Received adsready event (BeforePreroll)');
|
29588 | cov_ckiglpgg0.s[6]++;
|
29589 | this.adsReady = true;
|
29590 | };
|
29591 |
|
29592 | _proto.onPlay = function onPlay(player) {
|
29593 | cov_ckiglpgg0.f[3]++;
|
29594 | var Preroll = (cov_ckiglpgg0.s[7]++, States.getState('Preroll'));
|
29595 | cov_ckiglpgg0.s[8]++;
|
29596 | player.ads.debug('Received play event (BeforePreroll)');
|
29597 | cov_ckiglpgg0.s[9]++;
|
29598 | this.transitionTo(Preroll, this.adsReady, this.shouldResumeToContent);
|
29599 | };
|
29600 |
|
29601 | _proto.onAdsCanceled = function onAdsCanceled(player) {
|
29602 | cov_ckiglpgg0.f[4]++;
|
29603 | cov_ckiglpgg0.s[10]++;
|
29604 | player.ads.debug('adscanceled (BeforePreroll)');
|
29605 | cov_ckiglpgg0.s[11]++;
|
29606 | this.shouldResumeToContent = true;
|
29607 | };
|
29608 |
|
29609 | _proto.onAdsError = function onAdsError() {
|
29610 | cov_ckiglpgg0.f[5]++;
|
29611 | cov_ckiglpgg0.s[12]++;
|
29612 | this.player.ads.debug('adserror (BeforePreroll)');
|
29613 | cov_ckiglpgg0.s[13]++;
|
29614 | this.shouldResumeToContent = true;
|
29615 | };
|
29616 |
|
29617 | _proto.onNoPreroll = function onNoPreroll() {
|
29618 | cov_ckiglpgg0.f[6]++;
|
29619 | cov_ckiglpgg0.s[14]++;
|
29620 | this.player.ads.debug('Skipping prerolls due to nopreroll event (BeforePreroll)');
|
29621 | cov_ckiglpgg0.s[15]++;
|
29622 | this.shouldResumeToContent = true;
|
29623 | };
|
29624 |
|
29625 | _proto.skipLinearAdMode = function skipLinearAdMode() {
|
29626 | cov_ckiglpgg0.f[7]++;
|
29627 | var player = (cov_ckiglpgg0.s[16]++, this.player);
|
29628 | cov_ckiglpgg0.s[17]++;
|
29629 | player.trigger('adskip');
|
29630 | cov_ckiglpgg0.s[18]++;
|
29631 | player.ads.debug('skipLinearAdMode (BeforePreroll)');
|
29632 | cov_ckiglpgg0.s[19]++;
|
29633 | this.shouldResumeToContent = true;
|
29634 | };
|
29635 |
|
29636 | _proto.onContentChanged = function onContentChanged() {
|
29637 | cov_ckiglpgg0.f[8]++;
|
29638 | cov_ckiglpgg0.s[20]++;
|
29639 | this.init(this.player);
|
29640 | };
|
29641 |
|
29642 | return BeforePreroll;
|
29643 | }(ContentState$2);
|
29644 |
|
29645 | cov_ckiglpgg0.s[21]++;
|
29646 | States.registerState('BeforePreroll', BeforePreroll);
|
29647 |
|
29648 | var cov_64k5m0vho = function () {
|
29649 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/cancelContentPlay.js',
|
29650 | hash = '880f8d0c5d7934e51de5df2ad81fec1648e0e2a1',
|
29651 | Function = function () {}.constructor,
|
29652 | global = new Function('return this')(),
|
29653 | gcv = '__coverage__',
|
29654 | coverageData = {
|
29655 | path: '/Users/poneill/dev/videojs-contrib-ads/src/cancelContentPlay.js',
|
29656 | statementMap: {
|
29657 | '0': {
|
29658 | start: {
|
29659 | line: 4,
|
29660 | column: 2
|
29661 | },
|
29662 | end: {
|
29663 | line: 6,
|
29664 | column: 3
|
29665 | }
|
29666 | },
|
29667 | '1': {
|
29668 | start: {
|
29669 | line: 5,
|
29670 | column: 4
|
29671 | },
|
29672 | end: {
|
29673 | line: 5,
|
29674 | column: 69
|
29675 | }
|
29676 | },
|
29677 | '2': {
|
29678 | start: {
|
29679 | line: 9,
|
29680 | column: 2
|
29681 | },
|
29682 | end: {
|
29683 | line: 9,
|
29684 | column: 39
|
29685 | }
|
29686 | },
|
29687 | '3': {
|
29688 | start: {
|
29689 | line: 22,
|
29690 | column: 2
|
29691 | },
|
29692 | end: {
|
29693 | line: 27,
|
29694 | column: 3
|
29695 | }
|
29696 | },
|
29697 | '4': {
|
29698 | start: {
|
29699 | line: 26,
|
29700 | column: 4
|
29701 | },
|
29702 | end: {
|
29703 | line: 26,
|
29704 | column: 11
|
29705 | }
|
29706 | },
|
29707 | '5': {
|
29708 | start: {
|
29709 | line: 30,
|
29710 | column: 2
|
29711 | },
|
29712 | end: {
|
29713 | line: 33,
|
29714 | column: 3
|
29715 | }
|
29716 | },
|
29717 | '6': {
|
29718 | start: {
|
29719 | line: 31,
|
29720 | column: 4
|
29721 | },
|
29722 | end: {
|
29723 | line: 31,
|
29724 | column: 65
|
29725 | }
|
29726 | },
|
29727 | '7': {
|
29728 | start: {
|
29729 | line: 32,
|
29730 | column: 4
|
29731 | },
|
29732 | end: {
|
29733 | line: 32,
|
29734 | column: 17
|
29735 | }
|
29736 | },
|
29737 | '8': {
|
29738 | start: {
|
29739 | line: 37,
|
29740 | column: 2
|
29741 | },
|
29742 | end: {
|
29743 | line: 37,
|
29744 | column: 33
|
29745 | }
|
29746 | }
|
29747 | },
|
29748 | fnMap: {
|
29749 | '0': {
|
29750 | name: 'initCancelContentPlay',
|
29751 | decl: {
|
29752 | start: {
|
29753 | line: 3,
|
29754 | column: 24
|
29755 | },
|
29756 | end: {
|
29757 | line: 3,
|
29758 | column: 45
|
29759 | }
|
29760 | },
|
29761 | loc: {
|
29762 | start: {
|
29763 | line: 3,
|
29764 | column: 61
|
29765 | },
|
29766 | end: {
|
29767 | line: 10,
|
29768 | column: 1
|
29769 | }
|
29770 | },
|
29771 | line: 3
|
29772 | },
|
29773 | '1': {
|
29774 | name: 'cancelContentPlay',
|
29775 | decl: {
|
29776 | start: {
|
29777 | line: 19,
|
29778 | column: 9
|
29779 | },
|
29780 | end: {
|
29781 | line: 19,
|
29782 | column: 26
|
29783 | }
|
29784 | },
|
29785 | loc: {
|
29786 | start: {
|
29787 | line: 19,
|
29788 | column: 29
|
29789 | },
|
29790 | end: {
|
29791 | line: 38,
|
29792 | column: 1
|
29793 | }
|
29794 | },
|
29795 | line: 19
|
29796 | }
|
29797 | },
|
29798 | branchMap: {
|
29799 | '0': {
|
29800 | loc: {
|
29801 | start: {
|
29802 | line: 4,
|
29803 | column: 2
|
29804 | },
|
29805 | end: {
|
29806 | line: 6,
|
29807 | column: 3
|
29808 | }
|
29809 | },
|
29810 | type: 'if',
|
29811 | locations: [{
|
29812 | start: {
|
29813 | line: 4,
|
29814 | column: 2
|
29815 | },
|
29816 | end: {
|
29817 | line: 6,
|
29818 | column: 3
|
29819 | }
|
29820 | }, {
|
29821 | start: {
|
29822 | line: 4,
|
29823 | column: 2
|
29824 | },
|
29825 | end: {
|
29826 | line: 6,
|
29827 | column: 3
|
29828 | }
|
29829 | }],
|
29830 | line: 4
|
29831 | },
|
29832 | '1': {
|
29833 | loc: {
|
29834 | start: {
|
29835 | line: 22,
|
29836 | column: 2
|
29837 | },
|
29838 | end: {
|
29839 | line: 27,
|
29840 | column: 3
|
29841 | }
|
29842 | },
|
29843 | type: 'if',
|
29844 | locations: [{
|
29845 | start: {
|
29846 | line: 22,
|
29847 | column: 2
|
29848 | },
|
29849 | end: {
|
29850 | line: 27,
|
29851 | column: 3
|
29852 | }
|
29853 | }, {
|
29854 | start: {
|
29855 | line: 22,
|
29856 | column: 2
|
29857 | },
|
29858 | end: {
|
29859 | line: 27,
|
29860 | column: 3
|
29861 | }
|
29862 | }],
|
29863 | line: 22
|
29864 | },
|
29865 | '2': {
|
29866 | loc: {
|
29867 | start: {
|
29868 | line: 30,
|
29869 | column: 2
|
29870 | },
|
29871 | end: {
|
29872 | line: 33,
|
29873 | column: 3
|
29874 | }
|
29875 | },
|
29876 | type: 'if',
|
29877 | locations: [{
|
29878 | start: {
|
29879 | line: 30,
|
29880 | column: 2
|
29881 | },
|
29882 | end: {
|
29883 | line: 33,
|
29884 | column: 3
|
29885 | }
|
29886 | }, {
|
29887 | start: {
|
29888 | line: 30,
|
29889 | column: 2
|
29890 | },
|
29891 | end: {
|
29892 | line: 33,
|
29893 | column: 3
|
29894 | }
|
29895 | }],
|
29896 | line: 30
|
29897 | }
|
29898 | },
|
29899 | s: {
|
29900 | '0': 0,
|
29901 | '1': 0,
|
29902 | '2': 0,
|
29903 | '3': 0,
|
29904 | '4': 0,
|
29905 | '5': 0,
|
29906 | '6': 0,
|
29907 | '7': 0,
|
29908 | '8': 0
|
29909 | },
|
29910 | f: {
|
29911 | '0': 0,
|
29912 | '1': 0
|
29913 | },
|
29914 | b: {
|
29915 | '0': [0, 0],
|
29916 | '1': [0, 0],
|
29917 | '2': [0, 0]
|
29918 | },
|
29919 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
29920 | },
|
29921 | coverage = global[gcv] || (global[gcv] = {});
|
29922 |
|
29923 | if (coverage[path] && coverage[path].hash === hash) {
|
29924 | return coverage[path];
|
29925 | }
|
29926 |
|
29927 | coverageData.hash = hash;
|
29928 | return coverage[path] = coverageData;
|
29929 | }();
|
29930 | function initCancelContentPlay(player, debug) {
|
29931 | cov_64k5m0vho.f[0]++;
|
29932 | cov_64k5m0vho.s[0]++;
|
29933 |
|
29934 | if (debug) {
|
29935 | cov_64k5m0vho.b[0][0]++;
|
29936 | cov_64k5m0vho.s[1]++;
|
29937 | videojs$1.log('Using cancelContentPlay to block content playback');
|
29938 | } else {
|
29939 | cov_64k5m0vho.b[0][1]++;
|
29940 | }
|
29941 |
|
29942 | cov_64k5m0vho.s[2]++;
|
29943 | player.on('play', cancelContentPlay);
|
29944 | }
|
29945 |
|
29946 | function cancelContentPlay() {
|
29947 | cov_64k5m0vho.f[1]++;
|
29948 | cov_64k5m0vho.s[3]++;
|
29949 |
|
29950 | if (this.ads._shouldBlockPlay === false) {
|
29951 | cov_64k5m0vho.b[1][0]++;
|
29952 | cov_64k5m0vho.s[4]++;
|
29953 | return;
|
29954 | } else {
|
29955 | cov_64k5m0vho.b[1][1]++;
|
29956 | }
|
29957 |
|
29958 | cov_64k5m0vho.s[5]++;
|
29959 |
|
29960 | if (!this.paused()) {
|
29961 | cov_64k5m0vho.b[2][0]++;
|
29962 | cov_64k5m0vho.s[6]++;
|
29963 | this.ads.debug('Playback was canceled by cancelContentPlay');
|
29964 | cov_64k5m0vho.s[7]++;
|
29965 | this.pause();
|
29966 | } else {
|
29967 | cov_64k5m0vho.b[2][1]++;
|
29968 | }
|
29969 |
|
29970 | cov_64k5m0vho.s[8]++;
|
29971 | this.ads._cancelledPlay = true;
|
29972 | }
|
29973 |
|
29974 | var CancelContentPlay = Object.freeze({
|
29975 | default: initCancelContentPlay
|
29976 | });
|
29977 |
|
29978 | |
29979 |
|
29980 |
|
29981 |
|
29982 |
|
29983 | QUnit.module('BeforePreroll', {
|
29984 | beforeEach: function beforeEach() {
|
29985 | var _this = this;
|
29986 |
|
29987 | this.events = [];
|
29988 | this.player = {
|
29989 | ads: {
|
29990 | debug: function debug() {},
|
29991 | _shouldBlockPlay: false
|
29992 | },
|
29993 | setTimeout: function setTimeout() {},
|
29994 | trigger: function trigger(event) {
|
29995 | _this.events.push(event);
|
29996 | }
|
29997 | };
|
29998 | this.beforePreroll = new BeforePreroll(this.player);
|
29999 |
|
30000 | this.beforePreroll.transitionTo = function (newState, arg, arg2) {
|
30001 | _this.newState = newState.name;
|
30002 | _this.transitionArg = arg;
|
30003 | _this.transitionArg2 = arg2;
|
30004 | };
|
30005 |
|
30006 | this.cancelContentPlayStub = sinon.stub(CancelContentPlay, 'cancelContentPlay');
|
30007 | },
|
30008 | afterEach: function afterEach() {
|
30009 | this.cancelContentPlayStub.restore();
|
30010 | }
|
30011 | });
|
30012 | QUnit.test('transitions to Preroll (adsready first)', function (assert) {
|
30013 | this.beforePreroll.init(this.player);
|
30014 | assert.equal(this.beforePreroll.adsReady, false);
|
30015 | this.beforePreroll.onAdsReady(this.player);
|
30016 | assert.equal(this.beforePreroll.adsReady, true);
|
30017 | this.beforePreroll.onPlay(this.player);
|
30018 | assert.equal(this.newState, 'Preroll');
|
30019 | assert.equal(this.transitionArg, true);
|
30020 | });
|
30021 | QUnit.test('transitions to Preroll (play first)', function (assert) {
|
30022 | this.beforePreroll.init(this.player);
|
30023 | assert.equal(this.beforePreroll.adsReady, false);
|
30024 | this.beforePreroll.onPlay(this.player);
|
30025 | assert.equal(this.newState, 'Preroll');
|
30026 | assert.equal(this.transitionArg, false);
|
30027 | });
|
30028 | QUnit.test('cancels ads', function (assert) {
|
30029 | this.beforePreroll.init(this.player);
|
30030 | this.beforePreroll.onAdsCanceled(this.player);
|
30031 | assert.equal(this.beforePreroll.shouldResumeToContent, true);
|
30032 | this.beforePreroll.onPlay(this.player);
|
30033 | assert.equal(this.newState, 'Preroll');
|
30034 | assert.equal(this.transitionArg, false);
|
30035 | assert.equal(this.transitionArg2, true);
|
30036 | });
|
30037 | QUnit.test('transitions to content resuming in preroll on error', function (assert) {
|
30038 | this.beforePreroll.init(this.player);
|
30039 | this.beforePreroll.onAdsError(this.player);
|
30040 | assert.equal(this.beforePreroll.shouldResumeToContent, true);
|
30041 | this.beforePreroll.onPlay(this.player);
|
30042 | assert.equal(this.newState, 'Preroll');
|
30043 | assert.equal(this.transitionArg, false);
|
30044 | assert.equal(this.transitionArg2, true);
|
30045 | });
|
30046 | QUnit.test('has no preroll', function (assert) {
|
30047 | this.beforePreroll.init(this.player);
|
30048 | this.beforePreroll.onNoPreroll(this.player);
|
30049 | assert.equal(this.beforePreroll.shouldResumeToContent, true);
|
30050 | this.beforePreroll.onPlay(this.player);
|
30051 | assert.equal(this.newState, 'Preroll');
|
30052 | assert.equal(this.transitionArg, false);
|
30053 | assert.equal(this.transitionArg2, true);
|
30054 | });
|
30055 | QUnit.test('skips the preroll', function (assert) {
|
30056 | this.beforePreroll.init(this.player);
|
30057 | this.beforePreroll.skipLinearAdMode();
|
30058 | assert.equal(this.events[0], 'adskip');
|
30059 | assert.equal(this.beforePreroll.shouldResumeToContent, true);
|
30060 | this.beforePreroll.onPlay(this.player);
|
30061 | assert.equal(this.newState, 'Preroll');
|
30062 | assert.equal(this.transitionArg, false);
|
30063 | assert.equal(this.transitionArg2, true);
|
30064 | });
|
30065 | QUnit.test('handles content change', function (assert) {
|
30066 | sinon.spy(this.beforePreroll, 'init');
|
30067 | this.beforePreroll.onContentChanged(this.player);
|
30068 | assert.equal(this.beforePreroll.init.calledOnce, true);
|
30069 | });
|
30070 | QUnit.test('sets _shouldBlockPlay to true', function (assert) {
|
30071 | this.beforePreroll.init(this.player);
|
30072 | assert.equal(this.player.ads._shouldBlockPlay, true);
|
30073 | });
|
30074 | QUnit.test('updates `shouldResumeToContent` on `nopreroll`', function (assert) {
|
30075 | this.beforePreroll.init(this.player);
|
30076 | this.beforePreroll.onNoPreroll();
|
30077 | assert.strictEqual(this.beforePreroll.shouldResumeToContent, true);
|
30078 | });
|
30079 | QUnit.test('updates `shouldResumeToContent` on `adserror`', function (assert) {
|
30080 | this.beforePreroll.init(this.player);
|
30081 | this.beforePreroll.onAdsError();
|
30082 | assert.strictEqual(this.beforePreroll.shouldResumeToContent, true);
|
30083 | });
|
30084 | QUnit.test('updates `shouldResumeToContent` on `adscanceled`', function (assert) {
|
30085 | this.beforePreroll.init(this.player);
|
30086 | this.beforePreroll.onAdsCanceled(this.player);
|
30087 | assert.strictEqual(this.beforePreroll.shouldResumeToContent, true);
|
30088 | });
|
30089 | QUnit.test('updates `shouldResumeToContent` on `skipLinearAdMode`', function (assert) {
|
30090 | this.beforePreroll.init(this.player);
|
30091 | this.beforePreroll.skipLinearAdMode();
|
30092 | assert.strictEqual(this.beforePreroll.shouldResumeToContent, true);
|
30093 | });
|
30094 |
|
30095 | var cov_rypmtilwj = function () {
|
30096 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/ContentPlayback.js',
|
30097 | hash = '86b8ecafea5633af057e81308a1de1440b9d24e0',
|
30098 | Function = function () {}.constructor,
|
30099 | global = new Function('return this')(),
|
30100 | gcv = '__coverage__',
|
30101 | coverageData = {
|
30102 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/ContentPlayback.js',
|
30103 | statementMap: {
|
30104 | '0': {
|
30105 | start: {
|
30106 | line: 3,
|
30107 | column: 21
|
30108 | },
|
30109 | end: {
|
30110 | line: 3,
|
30111 | column: 52
|
30112 | }
|
30113 | },
|
30114 | '1': {
|
30115 | start: {
|
30116 | line: 16,
|
30117 | column: 4
|
30118 | },
|
30119 | end: {
|
30120 | line: 16,
|
30121 | column: 29
|
30122 | }
|
30123 | },
|
30124 | '2': {
|
30125 | start: {
|
30126 | line: 25,
|
30127 | column: 4
|
30128 | },
|
30129 | end: {
|
30130 | line: 25,
|
30131 | column: 40
|
30132 | }
|
30133 | },
|
30134 | '3': {
|
30135 | start: {
|
30136 | line: 34,
|
30137 | column: 4
|
30138 | },
|
30139 | end: {
|
30140 | line: 34,
|
30141 | column: 66
|
30142 | }
|
30143 | },
|
30144 | '4': {
|
30145 | start: {
|
30146 | line: 36,
|
30147 | column: 4
|
30148 | },
|
30149 | end: {
|
30150 | line: 39,
|
30151 | column: 5
|
30152 | }
|
30153 | },
|
30154 | '5': {
|
30155 | start: {
|
30156 | line: 37,
|
30157 | column: 6
|
30158 | },
|
30159 | end: {
|
30160 | line: 37,
|
30161 | column: 76
|
30162 | }
|
30163 | },
|
30164 | '6': {
|
30165 | start: {
|
30166 | line: 38,
|
30167 | column: 6
|
30168 | },
|
30169 | end: {
|
30170 | line: 38,
|
30171 | column: 40
|
30172 | }
|
30173 | },
|
30174 | '7': {
|
30175 | start: {
|
30176 | line: 46,
|
30177 | column: 21
|
30178 | },
|
30179 | end: {
|
30180 | line: 46,
|
30181 | column: 48
|
30182 | }
|
30183 | },
|
30184 | '8': {
|
30185 | start: {
|
30186 | line: 48,
|
30187 | column: 4
|
30188 | },
|
30189 | end: {
|
30190 | line: 48,
|
30191 | column: 56
|
30192 | }
|
30193 | },
|
30194 | '9': {
|
30195 | start: {
|
30196 | line: 49,
|
30197 | column: 4
|
30198 | },
|
30199 | end: {
|
30200 | line: 49,
|
30201 | column: 32
|
30202 | }
|
30203 | },
|
30204 | '10': {
|
30205 | start: {
|
30206 | line: 56,
|
30207 | column: 20
|
30208 | },
|
30209 | end: {
|
30210 | line: 56,
|
30211 | column: 46
|
30212 | }
|
30213 | },
|
30214 | '11': {
|
30215 | start: {
|
30216 | line: 58,
|
30217 | column: 4
|
30218 | },
|
30219 | end: {
|
30220 | line: 58,
|
30221 | column: 31
|
30222 | }
|
30223 | },
|
30224 | '12': {
|
30225 | start: {
|
30226 | line: 63,
|
30227 | column: 0
|
30228 | },
|
30229 | end: {
|
30230 | line: 63,
|
30231 | column: 57
|
30232 | }
|
30233 | }
|
30234 | },
|
30235 | fnMap: {
|
30236 | '0': {
|
30237 | name: '(anonymous_0)',
|
30238 | decl: {
|
30239 | start: {
|
30240 | line: 15,
|
30241 | column: 2
|
30242 | },
|
30243 | end: {
|
30244 | line: 15,
|
30245 | column: 3
|
30246 | }
|
30247 | },
|
30248 | loc: {
|
30249 | start: {
|
30250 | line: 15,
|
30251 | column: 20
|
30252 | },
|
30253 | end: {
|
30254 | line: 17,
|
30255 | column: 3
|
30256 | }
|
30257 | },
|
30258 | line: 15
|
30259 | },
|
30260 | '1': {
|
30261 | name: '(anonymous_1)',
|
30262 | decl: {
|
30263 | start: {
|
30264 | line: 23,
|
30265 | column: 2
|
30266 | },
|
30267 | end: {
|
30268 | line: 23,
|
30269 | column: 3
|
30270 | }
|
30271 | },
|
30272 | loc: {
|
30273 | start: {
|
30274 | line: 23,
|
30275 | column: 15
|
30276 | },
|
30277 | end: {
|
30278 | line: 26,
|
30279 | column: 3
|
30280 | }
|
30281 | },
|
30282 | line: 23
|
30283 | },
|
30284 | '2': {
|
30285 | name: '(anonymous_2)',
|
30286 | decl: {
|
30287 | start: {
|
30288 | line: 33,
|
30289 | column: 2
|
30290 | },
|
30291 | end: {
|
30292 | line: 33,
|
30293 | column: 3
|
30294 | }
|
30295 | },
|
30296 | loc: {
|
30297 | start: {
|
30298 | line: 33,
|
30299 | column: 21
|
30300 | },
|
30301 | end: {
|
30302 | line: 40,
|
30303 | column: 3
|
30304 | }
|
30305 | },
|
30306 | line: 33
|
30307 | },
|
30308 | '3': {
|
30309 | name: '(anonymous_3)',
|
30310 | decl: {
|
30311 | start: {
|
30312 | line: 45,
|
30313 | column: 2
|
30314 | },
|
30315 | end: {
|
30316 | line: 45,
|
30317 | column: 3
|
30318 | }
|
30319 | },
|
30320 | loc: {
|
30321 | start: {
|
30322 | line: 45,
|
30323 | column: 29
|
30324 | },
|
30325 | end: {
|
30326 | line: 50,
|
30327 | column: 3
|
30328 | }
|
30329 | },
|
30330 | line: 45
|
30331 | },
|
30332 | '4': {
|
30333 | name: '(anonymous_4)',
|
30334 | decl: {
|
30335 | start: {
|
30336 | line: 55,
|
30337 | column: 2
|
30338 | },
|
30339 | end: {
|
30340 | line: 55,
|
30341 | column: 3
|
30342 | }
|
30343 | },
|
30344 | loc: {
|
30345 | start: {
|
30346 | line: 55,
|
30347 | column: 22
|
30348 | },
|
30349 | end: {
|
30350 | line: 59,
|
30351 | column: 3
|
30352 | }
|
30353 | },
|
30354 | line: 55
|
30355 | }
|
30356 | },
|
30357 | branchMap: {
|
30358 | '0': {
|
30359 | loc: {
|
30360 | start: {
|
30361 | line: 36,
|
30362 | column: 4
|
30363 | },
|
30364 | end: {
|
30365 | line: 39,
|
30366 | column: 5
|
30367 | }
|
30368 | },
|
30369 | type: 'if',
|
30370 | locations: [{
|
30371 | start: {
|
30372 | line: 36,
|
30373 | column: 4
|
30374 | },
|
30375 | end: {
|
30376 | line: 39,
|
30377 | column: 5
|
30378 | }
|
30379 | }, {
|
30380 | start: {
|
30381 | line: 36,
|
30382 | column: 4
|
30383 | },
|
30384 | end: {
|
30385 | line: 39,
|
30386 | column: 5
|
30387 | }
|
30388 | }],
|
30389 | line: 36
|
30390 | }
|
30391 | },
|
30392 | s: {
|
30393 | '0': 0,
|
30394 | '1': 0,
|
30395 | '2': 0,
|
30396 | '3': 0,
|
30397 | '4': 0,
|
30398 | '5': 0,
|
30399 | '6': 0,
|
30400 | '7': 0,
|
30401 | '8': 0,
|
30402 | '9': 0,
|
30403 | '10': 0,
|
30404 | '11': 0,
|
30405 | '12': 0
|
30406 | },
|
30407 | f: {
|
30408 | '0': 0,
|
30409 | '1': 0,
|
30410 | '2': 0,
|
30411 | '3': 0,
|
30412 | '4': 0
|
30413 | },
|
30414 | b: {
|
30415 | '0': [0, 0]
|
30416 | },
|
30417 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
30418 | },
|
30419 | coverage = global[gcv] || (global[gcv] = {});
|
30420 |
|
30421 | if (coverage[path] && coverage[path].hash === hash) {
|
30422 | return coverage[path];
|
30423 | }
|
30424 |
|
30425 | coverageData.hash = hash;
|
30426 | return coverage[path] = coverageData;
|
30427 | }();
|
30428 | var ContentState$3 = (cov_rypmtilwj.s[0]++, States.getState('ContentState'));
|
30429 |
|
30430 | var ContentPlayback =
|
30431 |
|
30432 | function (_ContentState) {
|
30433 | _inheritsLoose(ContentPlayback, _ContentState);
|
30434 |
|
30435 | function ContentPlayback() {
|
30436 | return _ContentState.apply(this, arguments) || this;
|
30437 | }
|
30438 |
|
30439 | ContentPlayback._getName = function _getName() {
|
30440 | cov_rypmtilwj.f[0]++;
|
30441 | cov_rypmtilwj.s[1]++;
|
30442 | return 'ContentPlayback';
|
30443 | };
|
30444 |
|
30445 | var _proto = ContentPlayback.prototype;
|
30446 |
|
30447 | _proto.init = function init(player) {
|
30448 | cov_rypmtilwj.f[1]++;
|
30449 | cov_rypmtilwj.s[2]++;
|
30450 | player.ads._shouldBlockPlay = false;
|
30451 | };
|
30452 |
|
30453 | _proto.onAdsReady = function onAdsReady(player) {
|
30454 | cov_rypmtilwj.f[2]++;
|
30455 | cov_rypmtilwj.s[3]++;
|
30456 | player.ads.debug('Received adsready event (ContentPlayback)');
|
30457 | cov_rypmtilwj.s[4]++;
|
30458 |
|
30459 | if (!player.ads.nopreroll_) {
|
30460 | cov_rypmtilwj.b[0][0]++;
|
30461 | cov_rypmtilwj.s[5]++;
|
30462 | player.ads.debug('Triggered readyforpreroll event (ContentPlayback)');
|
30463 | cov_rypmtilwj.s[6]++;
|
30464 | player.trigger('readyforpreroll');
|
30465 | } else {
|
30466 | cov_rypmtilwj.b[0][1]++;
|
30467 | }
|
30468 | };
|
30469 |
|
30470 | _proto.onReadyForPostroll = function onReadyForPostroll(player) {
|
30471 | cov_rypmtilwj.f[3]++;
|
30472 | var Postroll = (cov_rypmtilwj.s[7]++, States.getState('Postroll'));
|
30473 | cov_rypmtilwj.s[8]++;
|
30474 | player.ads.debug('Received readyforpostroll event');
|
30475 | cov_rypmtilwj.s[9]++;
|
30476 | this.transitionTo(Postroll);
|
30477 | };
|
30478 |
|
30479 | _proto.startLinearAdMode = function startLinearAdMode() {
|
30480 | cov_rypmtilwj.f[4]++;
|
30481 | var Midroll = (cov_rypmtilwj.s[10]++, States.getState('Midroll'));
|
30482 | cov_rypmtilwj.s[11]++;
|
30483 | this.transitionTo(Midroll);
|
30484 | };
|
30485 |
|
30486 | return ContentPlayback;
|
30487 | }(ContentState$3);
|
30488 |
|
30489 | cov_rypmtilwj.s[12]++;
|
30490 | States.registerState('ContentPlayback', ContentPlayback);
|
30491 |
|
30492 | |
30493 |
|
30494 |
|
30495 |
|
30496 |
|
30497 | QUnit.module('ContentPlayback', {
|
30498 | beforeEach: function beforeEach() {
|
30499 | var _this = this;
|
30500 |
|
30501 | this.events = [];
|
30502 | this.playTriggered = false;
|
30503 | this.player = {
|
30504 | paused: function paused() {
|
30505 | return false;
|
30506 | },
|
30507 | play: function play() {},
|
30508 | trigger: function trigger(event) {
|
30509 | _this.events.push(event);
|
30510 | },
|
30511 | ads: {
|
30512 | debug: function debug() {},
|
30513 | _shouldBlockPlay: true
|
30514 | }
|
30515 | };
|
30516 | this.contentPlayback = new ContentPlayback(this.player);
|
30517 |
|
30518 | this.contentPlayback.transitionTo = function (newState) {
|
30519 | _this.newState = newState.name;
|
30520 | };
|
30521 | }
|
30522 | });
|
30523 | QUnit.test('adsready triggers readyforpreroll', function (assert) {
|
30524 | this.contentPlayback.init(this.player);
|
30525 | this.contentPlayback.onAdsReady(this.player);
|
30526 | assert.equal(this.events[0], 'readyforpreroll');
|
30527 | });
|
30528 | QUnit.test('no readyforpreroll if nopreroll_', function (assert) {
|
30529 | this.player.ads.nopreroll_ = true;
|
30530 | this.contentPlayback.init(this.player);
|
30531 | this.contentPlayback.onAdsReady(this.player);
|
30532 | assert.equal(this.events.length, 0, 'no events triggered');
|
30533 | });
|
30534 | QUnit.test('transitions to Postroll on readyforpostroll', function (assert) {
|
30535 | this.contentPlayback.init(this.player, false);
|
30536 | this.contentPlayback.onReadyForPostroll(this.player);
|
30537 | assert.equal(this.newState, 'Postroll', 'transitioned to Postroll');
|
30538 | });
|
30539 | QUnit.test('transitions to Midroll on startlinearadmode', function (assert) {
|
30540 | this.contentPlayback.init(this.player, false);
|
30541 | this.contentPlayback.startLinearAdMode();
|
30542 | assert.equal(this.newState, 'Midroll', 'transitioned to Midroll');
|
30543 | });
|
30544 | QUnit.test('sets _shouldBlockPlay to false on init', function (assert) {
|
30545 | assert.equal(this.player.ads._shouldBlockPlay, true);
|
30546 | this.contentPlayback.init(this.player);
|
30547 | assert.equal(this.player.ads._shouldBlockPlay, false);
|
30548 | });
|
30549 |
|
30550 | var cov_5ogg9cucy = function () {
|
30551 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/adBreak.js',
|
30552 | hash = 'e3943e506a56a517c4efa0319a0eb007f84b007b',
|
30553 | Function = function () {}.constructor,
|
30554 | global = new Function('return this')(),
|
30555 | gcv = '__coverage__',
|
30556 | coverageData = {
|
30557 | path: '/Users/poneill/dev/videojs-contrib-ads/src/adBreak.js',
|
30558 | statementMap: {
|
30559 | '0': {
|
30560 | start: {
|
30561 | line: 10,
|
30562 | column: 2
|
30563 | },
|
30564 | end: {
|
30565 | line: 10,
|
30566 | column: 40
|
30567 | }
|
30568 | },
|
30569 | '1': {
|
30570 | start: {
|
30571 | line: 12,
|
30572 | column: 2
|
30573 | },
|
30574 | end: {
|
30575 | line: 12,
|
30576 | column: 36
|
30577 | }
|
30578 | },
|
30579 | '2': {
|
30580 | start: {
|
30581 | line: 15,
|
30582 | column: 2
|
30583 | },
|
30584 | end: {
|
30585 | line: 15,
|
30586 | column: 28
|
30587 | }
|
30588 | },
|
30589 | '3': {
|
30590 | start: {
|
30591 | line: 18,
|
30592 | column: 2
|
30593 | },
|
30594 | end: {
|
30595 | line: 20,
|
30596 | column: 3
|
30597 | }
|
30598 | },
|
30599 | '4': {
|
30600 | start: {
|
30601 | line: 19,
|
30602 | column: 4
|
30603 | },
|
30604 | end: {
|
30605 | line: 19,
|
30606 | column: 61
|
30607 | }
|
30608 | },
|
30609 | '5': {
|
30610 | start: {
|
30611 | line: 23,
|
30612 | column: 2
|
30613 | },
|
30614 | end: {
|
30615 | line: 26,
|
30616 | column: 3
|
30617 | }
|
30618 | },
|
30619 | '6': {
|
30620 | start: {
|
30621 | line: 24,
|
30622 | column: 4
|
30623 | },
|
30624 | end: {
|
30625 | line: 24,
|
30626 | column: 46
|
30627 | }
|
30628 | },
|
30629 | '7': {
|
30630 | start: {
|
30631 | line: 25,
|
30632 | column: 4
|
30633 | },
|
30634 | end: {
|
30635 | line: 25,
|
30636 | column: 21
|
30637 | }
|
30638 | },
|
30639 | '8': {
|
30640 | start: {
|
30641 | line: 29,
|
30642 | column: 2
|
30643 | },
|
30644 | end: {
|
30645 | line: 29,
|
30646 | column: 36
|
30647 | }
|
30648 | },
|
30649 | '9': {
|
30650 | start: {
|
30651 | line: 34,
|
30652 | column: 2
|
30653 | },
|
30654 | end: {
|
30655 | line: 36,
|
30656 | column: 3
|
30657 | }
|
30658 | },
|
30659 | '10': {
|
30660 | start: {
|
30661 | line: 35,
|
30662 | column: 4
|
30663 | },
|
30664 | end: {
|
30665 | line: 35,
|
30666 | column: 35
|
30667 | }
|
30668 | },
|
30669 | '11': {
|
30670 | start: {
|
30671 | line: 40,
|
30672 | column: 2
|
30673 | },
|
30674 | end: {
|
30675 | line: 40,
|
30676 | column: 34
|
30677 | }
|
30678 | },
|
30679 | '12': {
|
30680 | start: {
|
30681 | line: 44,
|
30682 | column: 2
|
30683 | },
|
30684 | end: {
|
30685 | line: 44,
|
30686 | column: 38
|
30687 | }
|
30688 | },
|
30689 | '13': {
|
30690 | start: {
|
30691 | line: 46,
|
30692 | column: 2
|
30693 | },
|
30694 | end: {
|
30695 | line: 48,
|
30696 | column: 3
|
30697 | }
|
30698 | },
|
30699 | '14': {
|
30700 | start: {
|
30701 | line: 47,
|
30702 | column: 4
|
30703 | },
|
30704 | end: {
|
30705 | line: 47,
|
30706 | column: 24
|
30707 | }
|
30708 | },
|
30709 | '15': {
|
30710 | start: {
|
30711 | line: 50,
|
30712 | column: 2
|
30713 | },
|
30714 | end: {
|
30715 | line: 50,
|
30716 | column: 27
|
30717 | }
|
30718 | },
|
30719 | '16': {
|
30720 | start: {
|
30721 | line: 52,
|
30722 | column: 2
|
30723 | },
|
30724 | end: {
|
30725 | line: 52,
|
30726 | column: 37
|
30727 | }
|
30728 | },
|
30729 | '17': {
|
30730 | start: {
|
30731 | line: 55,
|
30732 | column: 2
|
30733 | },
|
30734 | end: {
|
30735 | line: 55,
|
30736 | column: 26
|
30737 | }
|
30738 | },
|
30739 | '18': {
|
30740 | start: {
|
30741 | line: 57,
|
30742 | column: 2
|
30743 | },
|
30744 | end: {
|
30745 | line: 57,
|
30746 | column: 39
|
30747 | }
|
30748 | },
|
30749 | '19': {
|
30750 | start: {
|
30751 | line: 62,
|
30752 | column: 2
|
30753 | },
|
30754 | end: {
|
30755 | line: 64,
|
30756 | column: 3
|
30757 | }
|
30758 | },
|
30759 | '20': {
|
30760 | start: {
|
30761 | line: 63,
|
30762 | column: 4
|
30763 | },
|
30764 | end: {
|
30765 | line: 63,
|
30766 | column: 32
|
30767 | }
|
30768 | },
|
30769 | '21': {
|
30770 | start: {
|
30771 | line: 67,
|
30772 | column: 2
|
30773 | },
|
30774 | end: {
|
30775 | line: 74,
|
30776 | column: 3
|
30777 | }
|
30778 | },
|
30779 | '22': {
|
30780 | start: {
|
30781 | line: 68,
|
30782 | column: 4
|
30783 | },
|
30784 | end: {
|
30785 | line: 68,
|
30786 | column: 53
|
30787 | }
|
30788 | },
|
30789 | '23': {
|
30790 | start: {
|
30791 | line: 72,
|
30792 | column: 4
|
30793 | },
|
30794 | end: {
|
30795 | line: 72,
|
30796 | column: 43
|
30797 | }
|
30798 | },
|
30799 | '24': {
|
30800 | start: {
|
30801 | line: 73,
|
30802 | column: 4
|
30803 | },
|
30804 | end: {
|
30805 | line: 73,
|
30806 | column: 15
|
30807 | }
|
30808 | },
|
30809 | '25': {
|
30810 | start: {
|
30811 | line: 78,
|
30812 | column: 12
|
30813 | },
|
30814 | end: {
|
30815 | line: 78,
|
30816 | column: 24
|
30817 | }
|
30818 | }
|
30819 | },
|
30820 | fnMap: {
|
30821 | '0': {
|
30822 | name: 'start',
|
30823 | decl: {
|
30824 | start: {
|
30825 | line: 9,
|
30826 | column: 9
|
30827 | },
|
30828 | end: {
|
30829 | line: 9,
|
30830 | column: 14
|
30831 | }
|
30832 | },
|
30833 | loc: {
|
30834 | start: {
|
30835 | line: 9,
|
30836 | column: 23
|
30837 | },
|
30838 | end: {
|
30839 | line: 41,
|
30840 | column: 1
|
30841 | }
|
30842 | },
|
30843 | line: 9
|
30844 | },
|
30845 | '1': {
|
30846 | name: 'end',
|
30847 | decl: {
|
30848 | start: {
|
30849 | line: 43,
|
30850 | column: 9
|
30851 | },
|
30852 | end: {
|
30853 | line: 43,
|
30854 | column: 12
|
30855 | }
|
30856 | },
|
30857 | loc: {
|
30858 | start: {
|
30859 | line: 43,
|
30860 | column: 31
|
30861 | },
|
30862 | end: {
|
30863 | line: 76,
|
30864 | column: 1
|
30865 | }
|
30866 | },
|
30867 | line: 43
|
30868 | },
|
30869 | '2': {
|
30870 | name: '(anonymous_2)',
|
30871 | decl: {
|
30872 | start: {
|
30873 | line: 47,
|
30874 | column: 15
|
30875 | },
|
30876 | end: {
|
30877 | line: 47,
|
30878 | column: 16
|
30879 | }
|
30880 | },
|
30881 | loc: {
|
30882 | start: {
|
30883 | line: 47,
|
30884 | column: 21
|
30885 | },
|
30886 | end: {
|
30887 | line: 47,
|
30888 | column: 23
|
30889 | }
|
30890 | },
|
30891 | line: 47
|
30892 | }
|
30893 | },
|
30894 | branchMap: {
|
30895 | '0': {
|
30896 | loc: {
|
30897 | start: {
|
30898 | line: 18,
|
30899 | column: 2
|
30900 | },
|
30901 | end: {
|
30902 | line: 20,
|
30903 | column: 3
|
30904 | }
|
30905 | },
|
30906 | type: 'if',
|
30907 | locations: [{
|
30908 | start: {
|
30909 | line: 18,
|
30910 | column: 2
|
30911 | },
|
30912 | end: {
|
30913 | line: 20,
|
30914 | column: 3
|
30915 | }
|
30916 | }, {
|
30917 | start: {
|
30918 | line: 18,
|
30919 | column: 2
|
30920 | },
|
30921 | end: {
|
30922 | line: 20,
|
30923 | column: 3
|
30924 | }
|
30925 | }],
|
30926 | line: 18
|
30927 | },
|
30928 | '1': {
|
30929 | loc: {
|
30930 | start: {
|
30931 | line: 23,
|
30932 | column: 2
|
30933 | },
|
30934 | end: {
|
30935 | line: 26,
|
30936 | column: 3
|
30937 | }
|
30938 | },
|
30939 | type: 'if',
|
30940 | locations: [{
|
30941 | start: {
|
30942 | line: 23,
|
30943 | column: 2
|
30944 | },
|
30945 | end: {
|
30946 | line: 26,
|
30947 | column: 3
|
30948 | }
|
30949 | }, {
|
30950 | start: {
|
30951 | line: 23,
|
30952 | column: 2
|
30953 | },
|
30954 | end: {
|
30955 | line: 26,
|
30956 | column: 3
|
30957 | }
|
30958 | }],
|
30959 | line: 23
|
30960 | },
|
30961 | '2': {
|
30962 | loc: {
|
30963 | start: {
|
30964 | line: 34,
|
30965 | column: 2
|
30966 | },
|
30967 | end: {
|
30968 | line: 36,
|
30969 | column: 3
|
30970 | }
|
30971 | },
|
30972 | type: 'if',
|
30973 | locations: [{
|
30974 | start: {
|
30975 | line: 34,
|
30976 | column: 2
|
30977 | },
|
30978 | end: {
|
30979 | line: 36,
|
30980 | column: 3
|
30981 | }
|
30982 | }, {
|
30983 | start: {
|
30984 | line: 34,
|
30985 | column: 2
|
30986 | },
|
30987 | end: {
|
30988 | line: 36,
|
30989 | column: 3
|
30990 | }
|
30991 | }],
|
30992 | line: 34
|
30993 | },
|
30994 | '3': {
|
30995 | loc: {
|
30996 | start: {
|
30997 | line: 46,
|
30998 | column: 2
|
30999 | },
|
31000 | end: {
|
31001 | line: 48,
|
31002 | column: 3
|
31003 | }
|
31004 | },
|
31005 | type: 'if',
|
31006 | locations: [{
|
31007 | start: {
|
31008 | line: 46,
|
31009 | column: 2
|
31010 | },
|
31011 | end: {
|
31012 | line: 48,
|
31013 | column: 3
|
31014 | }
|
31015 | }, {
|
31016 | start: {
|
31017 | line: 46,
|
31018 | column: 2
|
31019 | },
|
31020 | end: {
|
31021 | line: 48,
|
31022 | column: 3
|
31023 | }
|
31024 | }],
|
31025 | line: 46
|
31026 | },
|
31027 | '4': {
|
31028 | loc: {
|
31029 | start: {
|
31030 | line: 62,
|
31031 | column: 2
|
31032 | },
|
31033 | end: {
|
31034 | line: 64,
|
31035 | column: 3
|
31036 | }
|
31037 | },
|
31038 | type: 'if',
|
31039 | locations: [{
|
31040 | start: {
|
31041 | line: 62,
|
31042 | column: 2
|
31043 | },
|
31044 | end: {
|
31045 | line: 64,
|
31046 | column: 3
|
31047 | }
|
31048 | }, {
|
31049 | start: {
|
31050 | line: 62,
|
31051 | column: 2
|
31052 | },
|
31053 | end: {
|
31054 | line: 64,
|
31055 | column: 3
|
31056 | }
|
31057 | }],
|
31058 | line: 62
|
31059 | },
|
31060 | '5': {
|
31061 | loc: {
|
31062 | start: {
|
31063 | line: 67,
|
31064 | column: 2
|
31065 | },
|
31066 | end: {
|
31067 | line: 74,
|
31068 | column: 3
|
31069 | }
|
31070 | },
|
31071 | type: 'if',
|
31072 | locations: [{
|
31073 | start: {
|
31074 | line: 67,
|
31075 | column: 2
|
31076 | },
|
31077 | end: {
|
31078 | line: 74,
|
31079 | column: 3
|
31080 | }
|
31081 | }, {
|
31082 | start: {
|
31083 | line: 67,
|
31084 | column: 2
|
31085 | },
|
31086 | end: {
|
31087 | line: 74,
|
31088 | column: 3
|
31089 | }
|
31090 | }],
|
31091 | line: 67
|
31092 | }
|
31093 | },
|
31094 | s: {
|
31095 | '0': 0,
|
31096 | '1': 0,
|
31097 | '2': 0,
|
31098 | '3': 0,
|
31099 | '4': 0,
|
31100 | '5': 0,
|
31101 | '6': 0,
|
31102 | '7': 0,
|
31103 | '8': 0,
|
31104 | '9': 0,
|
31105 | '10': 0,
|
31106 | '11': 0,
|
31107 | '12': 0,
|
31108 | '13': 0,
|
31109 | '14': 0,
|
31110 | '15': 0,
|
31111 | '16': 0,
|
31112 | '17': 0,
|
31113 | '18': 0,
|
31114 | '19': 0,
|
31115 | '20': 0,
|
31116 | '21': 0,
|
31117 | '22': 0,
|
31118 | '23': 0,
|
31119 | '24': 0,
|
31120 | '25': 0
|
31121 | },
|
31122 | f: {
|
31123 | '0': 0,
|
31124 | '1': 0,
|
31125 | '2': 0
|
31126 | },
|
31127 | b: {
|
31128 | '0': [0, 0],
|
31129 | '1': [0, 0],
|
31130 | '2': [0, 0],
|
31131 | '3': [0, 0],
|
31132 | '4': [0, 0],
|
31133 | '5': [0, 0]
|
31134 | },
|
31135 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
31136 | },
|
31137 | coverage = global[gcv] || (global[gcv] = {});
|
31138 |
|
31139 | if (coverage[path] && coverage[path].hash === hash) {
|
31140 | return coverage[path];
|
31141 | }
|
31142 |
|
31143 | coverageData.hash = hash;
|
31144 | return coverage[path] = coverageData;
|
31145 | }();
|
31146 |
|
31147 | function start(player) {
|
31148 | cov_5ogg9cucy.f[0]++;
|
31149 | cov_5ogg9cucy.s[0]++;
|
31150 | player.ads.debug('Starting ad break');
|
31151 | cov_5ogg9cucy.s[1]++;
|
31152 | player.ads._inLinearAdMode = true;
|
31153 | cov_5ogg9cucy.s[2]++;
|
31154 | player.trigger('adstart');
|
31155 | cov_5ogg9cucy.s[3]++;
|
31156 |
|
31157 | if (player.ads.shouldTakeSnapshots()) {
|
31158 | cov_5ogg9cucy.b[0][0]++;
|
31159 | cov_5ogg9cucy.s[4]++;
|
31160 | player.ads.snapshot = getPlayerSnapshot(player);
|
31161 | } else {
|
31162 | cov_5ogg9cucy.b[0][1]++;
|
31163 | }
|
31164 |
|
31165 | cov_5ogg9cucy.s[5]++;
|
31166 |
|
31167 | if (player.ads.shouldPlayContentBehindAd(player)) {
|
31168 | cov_5ogg9cucy.b[1][0]++;
|
31169 | cov_5ogg9cucy.s[6]++;
|
31170 | player.ads.preAdVolume_ = player.volume();
|
31171 | cov_5ogg9cucy.s[7]++;
|
31172 | player.volume(0);
|
31173 | } else {
|
31174 | cov_5ogg9cucy.b[1][1]++;
|
31175 | }
|
31176 |
|
31177 | cov_5ogg9cucy.s[8]++;
|
31178 | player.addClass('vjs-ad-playing');
|
31179 | cov_5ogg9cucy.s[9]++;
|
31180 |
|
31181 | if (player.hasClass('vjs-live')) {
|
31182 | cov_5ogg9cucy.b[2][0]++;
|
31183 | cov_5ogg9cucy.s[10]++;
|
31184 | player.removeClass('vjs-live');
|
31185 | } else {
|
31186 | cov_5ogg9cucy.b[2][1]++;
|
31187 | }
|
31188 |
|
31189 | cov_5ogg9cucy.s[11]++;
|
31190 | player.ads.removeNativePoster();
|
31191 | }
|
31192 |
|
31193 | function end(player, callback) {
|
31194 | cov_5ogg9cucy.f[1]++;
|
31195 | cov_5ogg9cucy.s[12]++;
|
31196 | player.ads.debug('Ending ad break');
|
31197 | cov_5ogg9cucy.s[13]++;
|
31198 |
|
31199 | if (callback === undefined) {
|
31200 | cov_5ogg9cucy.b[3][0]++;
|
31201 | cov_5ogg9cucy.s[14]++;
|
31202 |
|
31203 | callback = function callback() {
|
31204 | cov_5ogg9cucy.f[2]++;
|
31205 | };
|
31206 | } else {
|
31207 | cov_5ogg9cucy.b[3][1]++;
|
31208 | }
|
31209 |
|
31210 | cov_5ogg9cucy.s[15]++;
|
31211 | player.ads.adType = null;
|
31212 | cov_5ogg9cucy.s[16]++;
|
31213 | player.ads._inLinearAdMode = false;
|
31214 | cov_5ogg9cucy.s[17]++;
|
31215 | player.trigger('adend');
|
31216 | cov_5ogg9cucy.s[18]++;
|
31217 | player.removeClass('vjs-ad-playing');
|
31218 | cov_5ogg9cucy.s[19]++;
|
31219 |
|
31220 | if (player.ads.isLive(player)) {
|
31221 | cov_5ogg9cucy.b[4][0]++;
|
31222 | cov_5ogg9cucy.s[20]++;
|
31223 | player.addClass('vjs-live');
|
31224 | } else {
|
31225 | cov_5ogg9cucy.b[4][1]++;
|
31226 | }
|
31227 |
|
31228 | cov_5ogg9cucy.s[21]++;
|
31229 |
|
31230 | if (player.ads.shouldTakeSnapshots()) {
|
31231 | cov_5ogg9cucy.b[5][0]++;
|
31232 | cov_5ogg9cucy.s[22]++;
|
31233 | restorePlayerSnapshot(player, callback);
|
31234 | } else {
|
31235 | cov_5ogg9cucy.b[5][1]++;
|
31236 | cov_5ogg9cucy.s[23]++;
|
31237 | player.volume(player.ads.preAdVolume_);
|
31238 | cov_5ogg9cucy.s[24]++;
|
31239 | callback();
|
31240 | }
|
31241 | }
|
31242 |
|
31243 | var obj = (cov_5ogg9cucy.s[25]++, {
|
31244 | start: start,
|
31245 | end: end
|
31246 | });
|
31247 |
|
31248 | var cov_785sjx1l1 = function () {
|
31249 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/Midroll.js',
|
31250 | hash = 'd8268ea312b933b4fdbd1ca8f14b3a407786e8d6',
|
31251 | Function = function () {}.constructor,
|
31252 | global = new Function('return this')(),
|
31253 | gcv = '__coverage__',
|
31254 | coverageData = {
|
31255 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/Midroll.js',
|
31256 | statementMap: {
|
31257 | '0': {
|
31258 | start: {
|
31259 | line: 4,
|
31260 | column: 16
|
31261 | },
|
31262 | end: {
|
31263 | line: 4,
|
31264 | column: 42
|
31265 | }
|
31266 | },
|
31267 | '1': {
|
31268 | start: {
|
31269 | line: 12,
|
31270 | column: 4
|
31271 | },
|
31272 | end: {
|
31273 | line: 12,
|
31274 | column: 21
|
31275 | }
|
31276 | },
|
31277 | '2': {
|
31278 | start: {
|
31279 | line: 20,
|
31280 | column: 4
|
31281 | },
|
31282 | end: {
|
31283 | line: 20,
|
31284 | column: 34
|
31285 | }
|
31286 | },
|
31287 | '3': {
|
31288 | start: {
|
31289 | line: 21,
|
31290 | column: 4
|
31291 | },
|
31292 | end: {
|
31293 | line: 21,
|
31294 | column: 26
|
31295 | }
|
31296 | },
|
31297 | '4': {
|
31298 | start: {
|
31299 | line: 22,
|
31300 | column: 4
|
31301 | },
|
31302 | end: {
|
31303 | line: 22,
|
31304 | column: 38
|
31305 | }
|
31306 | },
|
31307 | '5': {
|
31308 | start: {
|
31309 | line: 30,
|
31310 | column: 4
|
31311 | },
|
31312 | end: {
|
31313 | line: 30,
|
31314 | column: 41
|
31315 | }
|
31316 | },
|
31317 | '6': {
|
31318 | start: {
|
31319 | line: 37,
|
31320 | column: 19
|
31321 | },
|
31322 | end: {
|
31323 | line: 37,
|
31324 | column: 30
|
31325 | }
|
31326 | },
|
31327 | '7': {
|
31328 | start: {
|
31329 | line: 39,
|
31330 | column: 4
|
31331 | },
|
31332 | end: {
|
31333 | line: 44,
|
31334 | column: 5
|
31335 | }
|
31336 | },
|
31337 | '8': {
|
31338 | start: {
|
31339 | line: 40,
|
31340 | column: 6
|
31341 | },
|
31342 | end: {
|
31343 | line: 40,
|
31344 | column: 34
|
31345 | }
|
31346 | },
|
31347 | '9': {
|
31348 | start: {
|
31349 | line: 41,
|
31350 | column: 6
|
31351 | },
|
31352 | end: {
|
31353 | line: 41,
|
31354 | column: 49
|
31355 | }
|
31356 | },
|
31357 | '10': {
|
31358 | start: {
|
31359 | line: 42,
|
31360 | column: 6
|
31361 | },
|
31362 | end: {
|
31363 | line: 42,
|
31364 | column: 43
|
31365 | }
|
31366 | },
|
31367 | '11': {
|
31368 | start: {
|
31369 | line: 43,
|
31370 | column: 6
|
31371 | },
|
31372 | end: {
|
31373 | line: 43,
|
31374 | column: 26
|
31375 | }
|
31376 | },
|
31377 | '12': {
|
31378 | start: {
|
31379 | line: 54,
|
31380 | column: 4
|
31381 | },
|
31382 | end: {
|
31383 | line: 56,
|
31384 | column: 5
|
31385 | }
|
31386 | },
|
31387 | '13': {
|
31388 | start: {
|
31389 | line: 55,
|
31390 | column: 6
|
31391 | },
|
31392 | end: {
|
31393 | line: 55,
|
31394 | column: 35
|
31395 | }
|
31396 | },
|
31397 | '14': {
|
31398 | start: {
|
31399 | line: 63,
|
31400 | column: 4
|
31401 | },
|
31402 | end: {
|
31403 | line: 63,
|
31404 | column: 41
|
31405 | }
|
31406 | },
|
31407 | '15': {
|
31408 | start: {
|
31409 | line: 64,
|
31410 | column: 4
|
31411 | },
|
31412 | end: {
|
31413 | line: 64,
|
31414 | column: 50
|
31415 | }
|
31416 | },
|
31417 | '16': {
|
31418 | start: {
|
31419 | line: 69,
|
31420 | column: 0
|
31421 | },
|
31422 | end: {
|
31423 | line: 69,
|
31424 | column: 41
|
31425 | }
|
31426 | }
|
31427 | },
|
31428 | fnMap: {
|
31429 | '0': {
|
31430 | name: '(anonymous_0)',
|
31431 | decl: {
|
31432 | start: {
|
31433 | line: 11,
|
31434 | column: 2
|
31435 | },
|
31436 | end: {
|
31437 | line: 11,
|
31438 | column: 3
|
31439 | }
|
31440 | },
|
31441 | loc: {
|
31442 | start: {
|
31443 | line: 11,
|
31444 | column: 20
|
31445 | },
|
31446 | end: {
|
31447 | line: 13,
|
31448 | column: 3
|
31449 | }
|
31450 | },
|
31451 | line: 11
|
31452 | },
|
31453 | '1': {
|
31454 | name: '(anonymous_1)',
|
31455 | decl: {
|
31456 | start: {
|
31457 | line: 19,
|
31458 | column: 2
|
31459 | },
|
31460 | end: {
|
31461 | line: 19,
|
31462 | column: 3
|
31463 | }
|
31464 | },
|
31465 | loc: {
|
31466 | start: {
|
31467 | line: 19,
|
31468 | column: 15
|
31469 | },
|
31470 | end: {
|
31471 | line: 23,
|
31472 | column: 3
|
31473 | }
|
31474 | },
|
31475 | line: 19
|
31476 | },
|
31477 | '2': {
|
31478 | name: '(anonymous_2)',
|
31479 | decl: {
|
31480 | start: {
|
31481 | line: 29,
|
31482 | column: 2
|
31483 | },
|
31484 | end: {
|
31485 | line: 29,
|
31486 | column: 3
|
31487 | }
|
31488 | },
|
31489 | loc: {
|
31490 | start: {
|
31491 | line: 29,
|
31492 | column: 22
|
31493 | },
|
31494 | end: {
|
31495 | line: 31,
|
31496 | column: 3
|
31497 | }
|
31498 | },
|
31499 | line: 29
|
31500 | },
|
31501 | '3': {
|
31502 | name: '(anonymous_3)',
|
31503 | decl: {
|
31504 | start: {
|
31505 | line: 36,
|
31506 | column: 2
|
31507 | },
|
31508 | end: {
|
31509 | line: 36,
|
31510 | column: 3
|
31511 | }
|
31512 | },
|
31513 | loc: {
|
31514 | start: {
|
31515 | line: 36,
|
31516 | column: 20
|
31517 | },
|
31518 | end: {
|
31519 | line: 45,
|
31520 | column: 3
|
31521 | }
|
31522 | },
|
31523 | line: 36
|
31524 | },
|
31525 | '4': {
|
31526 | name: '(anonymous_4)',
|
31527 | decl: {
|
31528 | start: {
|
31529 | line: 50,
|
31530 | column: 2
|
31531 | },
|
31532 | end: {
|
31533 | line: 50,
|
31534 | column: 3
|
31535 | }
|
31536 | },
|
31537 | loc: {
|
31538 | start: {
|
31539 | line: 50,
|
31540 | column: 21
|
31541 | },
|
31542 | end: {
|
31543 | line: 57,
|
31544 | column: 3
|
31545 | }
|
31546 | },
|
31547 | line: 50
|
31548 | },
|
31549 | '5': {
|
31550 | name: '(anonymous_5)',
|
31551 | decl: {
|
31552 | start: {
|
31553 | line: 62,
|
31554 | column: 2
|
31555 | },
|
31556 | end: {
|
31557 | line: 62,
|
31558 | column: 3
|
31559 | }
|
31560 | },
|
31561 | loc: {
|
31562 | start: {
|
31563 | line: 62,
|
31564 | column: 18
|
31565 | },
|
31566 | end: {
|
31567 | line: 65,
|
31568 | column: 3
|
31569 | }
|
31570 | },
|
31571 | line: 62
|
31572 | }
|
31573 | },
|
31574 | branchMap: {
|
31575 | '0': {
|
31576 | loc: {
|
31577 | start: {
|
31578 | line: 39,
|
31579 | column: 4
|
31580 | },
|
31581 | end: {
|
31582 | line: 44,
|
31583 | column: 5
|
31584 | }
|
31585 | },
|
31586 | type: 'if',
|
31587 | locations: [{
|
31588 | start: {
|
31589 | line: 39,
|
31590 | column: 4
|
31591 | },
|
31592 | end: {
|
31593 | line: 44,
|
31594 | column: 5
|
31595 | }
|
31596 | }, {
|
31597 | start: {
|
31598 | line: 39,
|
31599 | column: 4
|
31600 | },
|
31601 | end: {
|
31602 | line: 44,
|
31603 | column: 5
|
31604 | }
|
31605 | }],
|
31606 | line: 39
|
31607 | },
|
31608 | '1': {
|
31609 | loc: {
|
31610 | start: {
|
31611 | line: 54,
|
31612 | column: 4
|
31613 | },
|
31614 | end: {
|
31615 | line: 56,
|
31616 | column: 5
|
31617 | }
|
31618 | },
|
31619 | type: 'if',
|
31620 | locations: [{
|
31621 | start: {
|
31622 | line: 54,
|
31623 | column: 4
|
31624 | },
|
31625 | end: {
|
31626 | line: 56,
|
31627 | column: 5
|
31628 | }
|
31629 | }, {
|
31630 | start: {
|
31631 | line: 54,
|
31632 | column: 4
|
31633 | },
|
31634 | end: {
|
31635 | line: 56,
|
31636 | column: 5
|
31637 | }
|
31638 | }],
|
31639 | line: 54
|
31640 | }
|
31641 | },
|
31642 | s: {
|
31643 | '0': 0,
|
31644 | '1': 0,
|
31645 | '2': 0,
|
31646 | '3': 0,
|
31647 | '4': 0,
|
31648 | '5': 0,
|
31649 | '6': 0,
|
31650 | '7': 0,
|
31651 | '8': 0,
|
31652 | '9': 0,
|
31653 | '10': 0,
|
31654 | '11': 0,
|
31655 | '12': 0,
|
31656 | '13': 0,
|
31657 | '14': 0,
|
31658 | '15': 0,
|
31659 | '16': 0
|
31660 | },
|
31661 | f: {
|
31662 | '0': 0,
|
31663 | '1': 0,
|
31664 | '2': 0,
|
31665 | '3': 0,
|
31666 | '4': 0,
|
31667 | '5': 0
|
31668 | },
|
31669 | b: {
|
31670 | '0': [0, 0],
|
31671 | '1': [0, 0]
|
31672 | },
|
31673 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
31674 | },
|
31675 | coverage = global[gcv] || (global[gcv] = {});
|
31676 |
|
31677 | if (coverage[path] && coverage[path].hash === hash) {
|
31678 | return coverage[path];
|
31679 | }
|
31680 |
|
31681 | coverageData.hash = hash;
|
31682 | return coverage[path] = coverageData;
|
31683 | }();
|
31684 | var AdState$1 = (cov_785sjx1l1.s[0]++, States.getState('AdState'));
|
31685 |
|
31686 | var Midroll =
|
31687 |
|
31688 | function (_AdState) {
|
31689 | _inheritsLoose(Midroll, _AdState);
|
31690 |
|
31691 | function Midroll() {
|
31692 | return _AdState.apply(this, arguments) || this;
|
31693 | }
|
31694 |
|
31695 | Midroll._getName = function _getName() {
|
31696 | cov_785sjx1l1.f[0]++;
|
31697 | cov_785sjx1l1.s[1]++;
|
31698 | return 'Midroll';
|
31699 | };
|
31700 |
|
31701 | var _proto = Midroll.prototype;
|
31702 |
|
31703 | _proto.init = function init(player) {
|
31704 | cov_785sjx1l1.f[1]++;
|
31705 | cov_785sjx1l1.s[2]++;
|
31706 | player.ads.adType = 'midroll';
|
31707 | cov_785sjx1l1.s[3]++;
|
31708 | obj.start(player);
|
31709 | cov_785sjx1l1.s[4]++;
|
31710 | player.addClass('vjs-ad-loading');
|
31711 | };
|
31712 |
|
31713 | _proto.onAdStarted = function onAdStarted(player) {
|
31714 | cov_785sjx1l1.f[2]++;
|
31715 | cov_785sjx1l1.s[5]++;
|
31716 | player.removeClass('vjs-ad-loading');
|
31717 | };
|
31718 |
|
31719 | _proto.endLinearAdMode = function endLinearAdMode() {
|
31720 | cov_785sjx1l1.f[3]++;
|
31721 | var player = (cov_785sjx1l1.s[6]++, this.player);
|
31722 | cov_785sjx1l1.s[7]++;
|
31723 |
|
31724 | if (this.inAdBreak()) {
|
31725 | cov_785sjx1l1.b[0][0]++;
|
31726 | cov_785sjx1l1.s[8]++;
|
31727 | this.contentResuming = true;
|
31728 | cov_785sjx1l1.s[9]++;
|
31729 | player.addClass('vjs-ad-content-resuming');
|
31730 | cov_785sjx1l1.s[10]++;
|
31731 | player.removeClass('vjs-ad-loading');
|
31732 | cov_785sjx1l1.s[11]++;
|
31733 | obj.end(player);
|
31734 | } else {
|
31735 | cov_785sjx1l1.b[0][1]++;
|
31736 | }
|
31737 | };
|
31738 |
|
31739 | _proto.onAdsError = function onAdsError(player) {
|
31740 | cov_785sjx1l1.f[4]++;
|
31741 | cov_785sjx1l1.s[12]++;
|
31742 |
|
31743 | if (this.inAdBreak()) {
|
31744 | cov_785sjx1l1.b[1][0]++;
|
31745 | cov_785sjx1l1.s[13]++;
|
31746 | player.ads.endLinearAdMode();
|
31747 | } else {
|
31748 | cov_785sjx1l1.b[1][1]++;
|
31749 | }
|
31750 | };
|
31751 |
|
31752 | _proto.cleanup = function cleanup(player) {
|
31753 | cov_785sjx1l1.f[5]++;
|
31754 | cov_785sjx1l1.s[14]++;
|
31755 | player.removeClass('vjs-ad-loading');
|
31756 | cov_785sjx1l1.s[15]++;
|
31757 | player.removeClass('vjs-ad-content-resuming');
|
31758 | };
|
31759 |
|
31760 | return Midroll;
|
31761 | }(AdState$1);
|
31762 |
|
31763 | cov_785sjx1l1.s[16]++;
|
31764 | States.registerState('Midroll', Midroll);
|
31765 |
|
31766 | |
31767 |
|
31768 |
|
31769 |
|
31770 |
|
31771 | QUnit.module('Midroll', {
|
31772 | beforeEach: function beforeEach() {
|
31773 | var _this = this;
|
31774 |
|
31775 | this.player = {
|
31776 | addClass: function addClass() {},
|
31777 | removeClass: function removeClass() {},
|
31778 | ads: {
|
31779 | _inLinearAdMode: true,
|
31780 | endLinearAdMode: function endLinearAdMode() {
|
31781 | _this.calledEndLinearAdMode = true;
|
31782 | }
|
31783 | }
|
31784 | };
|
31785 | this.midroll = new Midroll(this.player);
|
31786 | this.adBreakStartStub = sinon.stub(obj, 'start');
|
31787 | this.adBreakEndStub = sinon.stub(obj, 'end');
|
31788 | },
|
31789 | afterEach: function afterEach() {
|
31790 | this.adBreakStartStub.restore();
|
31791 | this.adBreakEndStub.restore();
|
31792 | }
|
31793 | });
|
31794 | QUnit.test('starts an ad break on init', function (assert) {
|
31795 | this.midroll.init(this.player);
|
31796 | assert.equal(this.player.ads.adType, 'midroll', 'ad type is midroll');
|
31797 | assert.equal(this.adBreakStartStub.callCount, 1, 'ad break started');
|
31798 | });
|
31799 | QUnit.test('ends an ad break on endLinearAdMode', function (assert) {
|
31800 | this.midroll.init(this.player);
|
31801 | this.midroll.endLinearAdMode();
|
31802 | assert.equal(this.adBreakEndStub.callCount, 1, 'ad break ended');
|
31803 | });
|
31804 | QUnit.test('adserror during ad break ends ad break', function (assert) {
|
31805 | this.midroll.init(this.player);
|
31806 | this.midroll.onAdsError(this.player);
|
31807 | assert.equal(this.calledEndLinearAdMode, true, 'linear ad mode ended');
|
31808 | });
|
31809 |
|
31810 | var cov_ci2deddxi = function () {
|
31811 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/Postroll.js',
|
31812 | hash = '9fc419e4c44cd5fdc07e8e700bec7ed7524f9085',
|
31813 | Function = function () {}.constructor,
|
31814 | global = new Function('return this')(),
|
31815 | gcv = '__coverage__',
|
31816 | coverageData = {
|
31817 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/Postroll.js',
|
31818 | statementMap: {
|
31819 | '0': {
|
31820 | start: {
|
31821 | line: 5,
|
31822 | column: 16
|
31823 | },
|
31824 | end: {
|
31825 | line: 5,
|
31826 | column: 42
|
31827 | }
|
31828 | },
|
31829 | '1': {
|
31830 | start: {
|
31831 | line: 13,
|
31832 | column: 4
|
31833 | },
|
31834 | end: {
|
31835 | line: 13,
|
31836 | column: 22
|
31837 | }
|
31838 | },
|
31839 | '2': {
|
31840 | start: {
|
31841 | line: 21,
|
31842 | column: 4
|
31843 | },
|
31844 | end: {
|
31845 | line: 21,
|
31846 | column: 34
|
31847 | }
|
31848 | },
|
31849 | '3': {
|
31850 | start: {
|
31851 | line: 24,
|
31852 | column: 4
|
31853 | },
|
31854 | end: {
|
31855 | line: 24,
|
31856 | column: 37
|
31857 | }
|
31858 | },
|
31859 | '4': {
|
31860 | start: {
|
31861 | line: 27,
|
31862 | column: 4
|
31863 | },
|
31864 | end: {
|
31865 | line: 48,
|
31866 | column: 5
|
31867 | }
|
31868 | },
|
31869 | '5': {
|
31870 | start: {
|
31871 | line: 28,
|
31872 | column: 6
|
31873 | },
|
31874 | end: {
|
31875 | line: 28,
|
31876 | column: 40
|
31877 | }
|
31878 | },
|
31879 | '6': {
|
31880 | start: {
|
31881 | line: 31,
|
31882 | column: 20
|
31883 | },
|
31884 | end: {
|
31885 | line: 31,
|
31886 | column: 47
|
31887 | }
|
31888 | },
|
31889 | '7': {
|
31890 | start: {
|
31891 | line: 33,
|
31892 | column: 6
|
31893 | },
|
31894 | end: {
|
31895 | line: 35,
|
31896 | column: 7
|
31897 | }
|
31898 | },
|
31899 | '8': {
|
31900 | start: {
|
31901 | line: 34,
|
31902 | column: 8
|
31903 | },
|
31904 | end: {
|
31905 | line: 34,
|
31906 | column: 54
|
31907 | }
|
31908 | },
|
31909 | '9': {
|
31910 | start: {
|
31911 | line: 37,
|
31912 | column: 6
|
31913 | },
|
31914 | end: {
|
31915 | line: 39,
|
31916 | column: 18
|
31917 | }
|
31918 | },
|
31919 | '10': {
|
31920 | start: {
|
31921 | line: 38,
|
31922 | column: 8
|
31923 | },
|
31924 | end: {
|
31925 | line: 38,
|
31926 | column: 36
|
31927 | }
|
31928 | },
|
31929 | '11': {
|
31930 | start: {
|
31931 | line: 43,
|
31932 | column: 6
|
31933 | },
|
31934 | end: {
|
31935 | line: 43,
|
31936 | column: 33
|
31937 | }
|
31938 | },
|
31939 | '12': {
|
31940 | start: {
|
31941 | line: 45,
|
31942 | column: 22
|
31943 | },
|
31944 | end: {
|
31945 | line: 45,
|
31946 | column: 48
|
31947 | }
|
31948 | },
|
31949 | '13': {
|
31950 | start: {
|
31951 | line: 47,
|
31952 | column: 6
|
31953 | },
|
31954 | end: {
|
31955 | line: 47,
|
31956 | column: 33
|
31957 | }
|
31958 | },
|
31959 | '14': {
|
31960 | start: {
|
31961 | line: 55,
|
31962 | column: 19
|
31963 | },
|
31964 | end: {
|
31965 | line: 55,
|
31966 | column: 30
|
31967 | }
|
31968 | },
|
31969 | '15': {
|
31970 | start: {
|
31971 | line: 57,
|
31972 | column: 4
|
31973 | },
|
31974 | end: {
|
31975 | line: 64,
|
31976 | column: 5
|
31977 | }
|
31978 | },
|
31979 | '16': {
|
31980 | start: {
|
31981 | line: 58,
|
31982 | column: 6
|
31983 | },
|
31984 | end: {
|
31985 | line: 58,
|
31986 | column: 37
|
31987 | }
|
31988 | },
|
31989 | '17': {
|
31990 | start: {
|
31991 | line: 59,
|
31992 | column: 6
|
31993 | },
|
31994 | end: {
|
31995 | line: 59,
|
31996 | column: 49
|
31997 | }
|
31998 | },
|
31999 | '18': {
|
32000 | start: {
|
32001 | line: 60,
|
32002 | column: 6
|
32003 | },
|
32004 | end: {
|
32005 | line: 60,
|
32006 | column: 37
|
32007 | }
|
32008 | },
|
32009 | '19': {
|
32010 | start: {
|
32011 | line: 61,
|
32012 | column: 6
|
32013 | },
|
32014 | end: {
|
32015 | line: 61,
|
32016 | column: 28
|
32017 | }
|
32018 | },
|
32019 | '20': {
|
32020 | start: {
|
32021 | line: 63,
|
32022 | column: 6
|
32023 | },
|
32024 | end: {
|
32025 | line: 63,
|
32026 | column: 77
|
32027 | }
|
32028 | },
|
32029 | '21': {
|
32030 | start: {
|
32031 | line: 72,
|
32032 | column: 4
|
32033 | },
|
32034 | end: {
|
32035 | line: 72,
|
32036 | column: 41
|
32037 | }
|
32038 | },
|
32039 | '22': {
|
32040 | start: {
|
32041 | line: 79,
|
32042 | column: 19
|
32043 | },
|
32044 | end: {
|
32045 | line: 79,
|
32046 | column: 30
|
32047 | }
|
32048 | },
|
32049 | '23': {
|
32050 | start: {
|
32051 | line: 80,
|
32052 | column: 20
|
32053 | },
|
32054 | end: {
|
32055 | line: 80,
|
32056 | column: 46
|
32057 | }
|
32058 | },
|
32059 | '24': {
|
32060 | start: {
|
32061 | line: 82,
|
32062 | column: 4
|
32063 | },
|
32064 | end: {
|
32065 | line: 88,
|
32066 | column: 5
|
32067 | }
|
32068 | },
|
32069 | '25': {
|
32070 | start: {
|
32071 | line: 83,
|
32072 | column: 6
|
32073 | },
|
32074 | end: {
|
32075 | line: 83,
|
32076 | column: 43
|
32077 | }
|
32078 | },
|
32079 | '26': {
|
32080 | start: {
|
32081 | line: 84,
|
32082 | column: 6
|
32083 | },
|
32084 | end: {
|
32085 | line: 84,
|
32086 | column: 33
|
32087 | }
|
32088 | },
|
32089 | '27': {
|
32090 | start: {
|
32091 | line: 85,
|
32092 | column: 6
|
32093 | },
|
32094 | end: {
|
32095 | line: 87,
|
32096 | column: 9
|
32097 | }
|
32098 | },
|
32099 | '28': {
|
32100 | start: {
|
32101 | line: 86,
|
32102 | column: 8
|
32103 | },
|
32104 | end: {
|
32105 | line: 86,
|
32106 | column: 35
|
32107 | }
|
32108 | },
|
32109 | '29': {
|
32110 | start: {
|
32111 | line: 95,
|
32112 | column: 19
|
32113 | },
|
32114 | end: {
|
32115 | line: 95,
|
32116 | column: 30
|
32117 | }
|
32118 | },
|
32119 | '30': {
|
32120 | start: {
|
32121 | line: 97,
|
32122 | column: 4
|
32123 | },
|
32124 | end: {
|
32125 | line: 103,
|
32126 | column: 5
|
32127 | }
|
32128 | },
|
32129 | '31': {
|
32130 | start: {
|
32131 | line: 98,
|
32132 | column: 6
|
32133 | },
|
32134 | end: {
|
32135 | line: 98,
|
32136 | column: 65
|
32137 | }
|
32138 | },
|
32139 | '32': {
|
32140 | start: {
|
32141 | line: 100,
|
32142 | column: 6
|
32143 | },
|
32144 | end: {
|
32145 | line: 100,
|
32146 | column: 60
|
32147 | }
|
32148 | },
|
32149 | '33': {
|
32150 | start: {
|
32151 | line: 101,
|
32152 | column: 6
|
32153 | },
|
32154 | end: {
|
32155 | line: 101,
|
32156 | column: 31
|
32157 | }
|
32158 | },
|
32159 | '34': {
|
32160 | start: {
|
32161 | line: 102,
|
32162 | column: 6
|
32163 | },
|
32164 | end: {
|
32165 | line: 102,
|
32166 | column: 25
|
32167 | }
|
32168 | },
|
32169 | '35': {
|
32170 | start: {
|
32171 | line: 110,
|
32172 | column: 4
|
32173 | },
|
32174 | end: {
|
32175 | line: 110,
|
32176 | column: 51
|
32177 | }
|
32178 | },
|
32179 | '36': {
|
32180 | start: {
|
32181 | line: 111,
|
32182 | column: 4
|
32183 | },
|
32184 | end: {
|
32185 | line: 111,
|
32186 | column: 23
|
32187 | }
|
32188 | },
|
32189 | '37': {
|
32190 | start: {
|
32191 | line: 118,
|
32192 | column: 4
|
32193 | },
|
32194 | end: {
|
32195 | line: 118,
|
32196 | column: 50
|
32197 | }
|
32198 | },
|
32199 | '38': {
|
32200 | start: {
|
32201 | line: 123,
|
32202 | column: 4
|
32203 | },
|
32204 | end: {
|
32205 | line: 127,
|
32206 | column: 5
|
32207 | }
|
32208 | },
|
32209 | '39': {
|
32210 | start: {
|
32211 | line: 124,
|
32212 | column: 6
|
32213 | },
|
32214 | end: {
|
32215 | line: 124,
|
32216 | column: 35
|
32217 | }
|
32218 | },
|
32219 | '40': {
|
32220 | start: {
|
32221 | line: 126,
|
32222 | column: 6
|
32223 | },
|
32224 | end: {
|
32225 | line: 126,
|
32226 | column: 25
|
32227 | }
|
32228 | },
|
32229 | '41': {
|
32230 | start: {
|
32231 | line: 136,
|
32232 | column: 4
|
32233 | },
|
32234 | end: {
|
32235 | line: 147,
|
32236 | column: 5
|
32237 | }
|
32238 | },
|
32239 | '42': {
|
32240 | start: {
|
32241 | line: 137,
|
32242 | column: 28
|
32243 | },
|
32244 | end: {
|
32245 | line: 137,
|
32246 | column: 60
|
32247 | }
|
32248 | },
|
32249 | '43': {
|
32250 | start: {
|
32251 | line: 139,
|
32252 | column: 6
|
32253 | },
|
32254 | end: {
|
32255 | line: 139,
|
32256 | column: 39
|
32257 | }
|
32258 | },
|
32259 | '44': {
|
32260 | start: {
|
32261 | line: 143,
|
32262 | column: 11
|
32263 | },
|
32264 | end: {
|
32265 | line: 147,
|
32266 | column: 5
|
32267 | }
|
32268 | },
|
32269 | '45': {
|
32270 | start: {
|
32271 | line: 144,
|
32272 | column: 22
|
32273 | },
|
32274 | end: {
|
32275 | line: 144,
|
32276 | column: 48
|
32277 | }
|
32278 | },
|
32279 | '46': {
|
32280 | start: {
|
32281 | line: 146,
|
32282 | column: 6
|
32283 | },
|
32284 | end: {
|
32285 | line: 146,
|
32286 | column: 33
|
32287 | }
|
32288 | },
|
32289 | '47': {
|
32290 | start: {
|
32291 | line: 154,
|
32292 | column: 4
|
32293 | },
|
32294 | end: {
|
32295 | line: 158,
|
32296 | column: 5
|
32297 | }
|
32298 | },
|
32299 | '48': {
|
32300 | start: {
|
32301 | line: 155,
|
32302 | column: 6
|
32303 | },
|
32304 | end: {
|
32305 | line: 155,
|
32306 | column: 25
|
32307 | }
|
32308 | },
|
32309 | '49': {
|
32310 | start: {
|
32311 | line: 157,
|
32312 | column: 6
|
32313 | },
|
32314 | end: {
|
32315 | line: 157,
|
32316 | column: 65
|
32317 | }
|
32318 | },
|
32319 | '50': {
|
32320 | start: {
|
32321 | line: 162,
|
32322 | column: 4
|
32323 | },
|
32324 | end: {
|
32325 | line: 162,
|
32326 | column: 32
|
32327 | }
|
32328 | },
|
32329 | '51': {
|
32330 | start: {
|
32331 | line: 163,
|
32332 | column: 4
|
32333 | },
|
32334 | end: {
|
32335 | line: 163,
|
32336 | column: 47
|
32337 | }
|
32338 | },
|
32339 | '52': {
|
32340 | start: {
|
32341 | line: 171,
|
32342 | column: 20
|
32343 | },
|
32344 | end: {
|
32345 | line: 171,
|
32346 | column: 46
|
32347 | }
|
32348 | },
|
32349 | '53': {
|
32350 | start: {
|
32351 | line: 173,
|
32352 | column: 4
|
32353 | },
|
32354 | end: {
|
32355 | line: 173,
|
32356 | column: 31
|
32357 | }
|
32358 | },
|
32359 | '54': {
|
32360 | start: {
|
32361 | line: 174,
|
32362 | column: 4
|
32363 | },
|
32364 | end: {
|
32365 | line: 174,
|
32366 | column: 41
|
32367 | }
|
32368 | },
|
32369 | '55': {
|
32370 | start: {
|
32371 | line: 175,
|
32372 | column: 4
|
32373 | },
|
32374 | end: {
|
32375 | line: 175,
|
32376 | column: 31
|
32377 | }
|
32378 | },
|
32379 | '56': {
|
32380 | start: {
|
32381 | line: 182,
|
32382 | column: 4
|
32383 | },
|
32384 | end: {
|
32385 | line: 182,
|
32386 | column: 50
|
32387 | }
|
32388 | },
|
32389 | '57': {
|
32390 | start: {
|
32391 | line: 183,
|
32392 | column: 4
|
32393 | },
|
32394 | end: {
|
32395 | line: 183,
|
32396 | column: 47
|
32397 | }
|
32398 | },
|
32399 | '58': {
|
32400 | start: {
|
32401 | line: 184,
|
32402 | column: 4
|
32403 | },
|
32404 | end: {
|
32405 | line: 184,
|
32406 | column: 38
|
32407 | }
|
32408 | },
|
32409 | '59': {
|
32410 | start: {
|
32411 | line: 189,
|
32412 | column: 0
|
32413 | },
|
32414 | end: {
|
32415 | line: 189,
|
32416 | column: 43
|
32417 | }
|
32418 | }
|
32419 | },
|
32420 | fnMap: {
|
32421 | '0': {
|
32422 | name: '(anonymous_0)',
|
32423 | decl: {
|
32424 | start: {
|
32425 | line: 12,
|
32426 | column: 2
|
32427 | },
|
32428 | end: {
|
32429 | line: 12,
|
32430 | column: 3
|
32431 | }
|
32432 | },
|
32433 | loc: {
|
32434 | start: {
|
32435 | line: 12,
|
32436 | column: 20
|
32437 | },
|
32438 | end: {
|
32439 | line: 14,
|
32440 | column: 3
|
32441 | }
|
32442 | },
|
32443 | line: 12
|
32444 | },
|
32445 | '1': {
|
32446 | name: '(anonymous_1)',
|
32447 | decl: {
|
32448 | start: {
|
32449 | line: 20,
|
32450 | column: 2
|
32451 | },
|
32452 | end: {
|
32453 | line: 20,
|
32454 | column: 3
|
32455 | }
|
32456 | },
|
32457 | loc: {
|
32458 | start: {
|
32459 | line: 20,
|
32460 | column: 15
|
32461 | },
|
32462 | end: {
|
32463 | line: 49,
|
32464 | column: 3
|
32465 | }
|
32466 | },
|
32467 | line: 20
|
32468 | },
|
32469 | '2': {
|
32470 | name: '(anonymous_2)',
|
32471 | decl: {
|
32472 | start: {
|
32473 | line: 37,
|
32474 | column: 48
|
32475 | },
|
32476 | end: {
|
32477 | line: 37,
|
32478 | column: 49
|
32479 | }
|
32480 | },
|
32481 | loc: {
|
32482 | start: {
|
32483 | line: 37,
|
32484 | column: 59
|
32485 | },
|
32486 | end: {
|
32487 | line: 39,
|
32488 | column: 7
|
32489 | }
|
32490 | },
|
32491 | line: 37
|
32492 | },
|
32493 | '3': {
|
32494 | name: '(anonymous_3)',
|
32495 | decl: {
|
32496 | start: {
|
32497 | line: 54,
|
32498 | column: 2
|
32499 | },
|
32500 | end: {
|
32501 | line: 54,
|
32502 | column: 3
|
32503 | }
|
32504 | },
|
32505 | loc: {
|
32506 | start: {
|
32507 | line: 54,
|
32508 | column: 22
|
32509 | },
|
32510 | end: {
|
32511 | line: 65,
|
32512 | column: 3
|
32513 | }
|
32514 | },
|
32515 | line: 54
|
32516 | },
|
32517 | '4': {
|
32518 | name: '(anonymous_4)',
|
32519 | decl: {
|
32520 | start: {
|
32521 | line: 71,
|
32522 | column: 2
|
32523 | },
|
32524 | end: {
|
32525 | line: 71,
|
32526 | column: 3
|
32527 | }
|
32528 | },
|
32529 | loc: {
|
32530 | start: {
|
32531 | line: 71,
|
32532 | column: 22
|
32533 | },
|
32534 | end: {
|
32535 | line: 73,
|
32536 | column: 3
|
32537 | }
|
32538 | },
|
32539 | line: 71
|
32540 | },
|
32541 | '5': {
|
32542 | name: '(anonymous_5)',
|
32543 | decl: {
|
32544 | start: {
|
32545 | line: 78,
|
32546 | column: 2
|
32547 | },
|
32548 | end: {
|
32549 | line: 78,
|
32550 | column: 3
|
32551 | }
|
32552 | },
|
32553 | loc: {
|
32554 | start: {
|
32555 | line: 78,
|
32556 | column: 20
|
32557 | },
|
32558 | end: {
|
32559 | line: 89,
|
32560 | column: 3
|
32561 | }
|
32562 | },
|
32563 | line: 78
|
32564 | },
|
32565 | '6': {
|
32566 | name: '(anonymous_6)',
|
32567 | decl: {
|
32568 | start: {
|
32569 | line: 85,
|
32570 | column: 26
|
32571 | },
|
32572 | end: {
|
32573 | line: 85,
|
32574 | column: 27
|
32575 | }
|
32576 | },
|
32577 | loc: {
|
32578 | start: {
|
32579 | line: 85,
|
32580 | column: 32
|
32581 | },
|
32582 | end: {
|
32583 | line: 87,
|
32584 | column: 7
|
32585 | }
|
32586 | },
|
32587 | line: 85
|
32588 | },
|
32589 | '7': {
|
32590 | name: '(anonymous_7)',
|
32591 | decl: {
|
32592 | start: {
|
32593 | line: 94,
|
32594 | column: 2
|
32595 | },
|
32596 | end: {
|
32597 | line: 94,
|
32598 | column: 3
|
32599 | }
|
32600 | },
|
32601 | loc: {
|
32602 | start: {
|
32603 | line: 94,
|
32604 | column: 21
|
32605 | },
|
32606 | end: {
|
32607 | line: 104,
|
32608 | column: 3
|
32609 | }
|
32610 | },
|
32611 | line: 94
|
32612 | },
|
32613 | '8': {
|
32614 | name: '(anonymous_8)',
|
32615 | decl: {
|
32616 | start: {
|
32617 | line: 109,
|
32618 | column: 2
|
32619 | },
|
32620 | end: {
|
32621 | line: 109,
|
32622 | column: 3
|
32623 | }
|
32624 | },
|
32625 | loc: {
|
32626 | start: {
|
32627 | line: 109,
|
32628 | column: 22
|
32629 | },
|
32630 | end: {
|
32631 | line: 112,
|
32632 | column: 3
|
32633 | }
|
32634 | },
|
32635 | line: 109
|
32636 | },
|
32637 | '9': {
|
32638 | name: '(anonymous_9)',
|
32639 | decl: {
|
32640 | start: {
|
32641 | line: 117,
|
32642 | column: 2
|
32643 | },
|
32644 | end: {
|
32645 | line: 117,
|
32646 | column: 3
|
32647 | }
|
32648 | },
|
32649 | loc: {
|
32650 | start: {
|
32651 | line: 117,
|
32652 | column: 21
|
32653 | },
|
32654 | end: {
|
32655 | line: 128,
|
32656 | column: 3
|
32657 | }
|
32658 | },
|
32659 | line: 117
|
32660 | },
|
32661 | '10': {
|
32662 | name: '(anonymous_10)',
|
32663 | decl: {
|
32664 | start: {
|
32665 | line: 133,
|
32666 | column: 2
|
32667 | },
|
32668 | end: {
|
32669 | line: 133,
|
32670 | column: 3
|
32671 | }
|
32672 | },
|
32673 | loc: {
|
32674 | start: {
|
32675 | line: 133,
|
32676 | column: 27
|
32677 | },
|
32678 | end: {
|
32679 | line: 148,
|
32680 | column: 3
|
32681 | }
|
32682 | },
|
32683 | line: 133
|
32684 | },
|
32685 | '11': {
|
32686 | name: '(anonymous_11)',
|
32687 | decl: {
|
32688 | start: {
|
32689 | line: 153,
|
32690 | column: 2
|
32691 | },
|
32692 | end: {
|
32693 | line: 153,
|
32694 | column: 3
|
32695 | }
|
32696 | },
|
32697 | loc: {
|
32698 | start: {
|
32699 | line: 153,
|
32700 | column: 23
|
32701 | },
|
32702 | end: {
|
32703 | line: 159,
|
32704 | column: 3
|
32705 | }
|
32706 | },
|
32707 | line: 153
|
32708 | },
|
32709 | '12': {
|
32710 | name: '(anonymous_12)',
|
32711 | decl: {
|
32712 | start: {
|
32713 | line: 161,
|
32714 | column: 2
|
32715 | },
|
32716 | end: {
|
32717 | line: 161,
|
32718 | column: 3
|
32719 | }
|
32720 | },
|
32721 | loc: {
|
32722 | start: {
|
32723 | line: 161,
|
32724 | column: 24
|
32725 | },
|
32726 | end: {
|
32727 | line: 164,
|
32728 | column: 3
|
32729 | }
|
32730 | },
|
32731 | line: 161
|
32732 | },
|
32733 | '13': {
|
32734 | name: '(anonymous_13)',
|
32735 | decl: {
|
32736 | start: {
|
32737 | line: 170,
|
32738 | column: 2
|
32739 | },
|
32740 | end: {
|
32741 | line: 170,
|
32742 | column: 3
|
32743 | }
|
32744 | },
|
32745 | loc: {
|
32746 | start: {
|
32747 | line: 170,
|
32748 | column: 16
|
32749 | },
|
32750 | end: {
|
32751 | line: 176,
|
32752 | column: 3
|
32753 | }
|
32754 | },
|
32755 | line: 170
|
32756 | },
|
32757 | '14': {
|
32758 | name: '(anonymous_14)',
|
32759 | decl: {
|
32760 | start: {
|
32761 | line: 181,
|
32762 | column: 2
|
32763 | },
|
32764 | end: {
|
32765 | line: 181,
|
32766 | column: 3
|
32767 | }
|
32768 | },
|
32769 | loc: {
|
32770 | start: {
|
32771 | line: 181,
|
32772 | column: 18
|
32773 | },
|
32774 | end: {
|
32775 | line: 185,
|
32776 | column: 3
|
32777 | }
|
32778 | },
|
32779 | line: 181
|
32780 | }
|
32781 | },
|
32782 | branchMap: {
|
32783 | '0': {
|
32784 | loc: {
|
32785 | start: {
|
32786 | line: 27,
|
32787 | column: 4
|
32788 | },
|
32789 | end: {
|
32790 | line: 48,
|
32791 | column: 5
|
32792 | }
|
32793 | },
|
32794 | type: 'if',
|
32795 | locations: [{
|
32796 | start: {
|
32797 | line: 27,
|
32798 | column: 4
|
32799 | },
|
32800 | end: {
|
32801 | line: 48,
|
32802 | column: 5
|
32803 | }
|
32804 | }, {
|
32805 | start: {
|
32806 | line: 27,
|
32807 | column: 4
|
32808 | },
|
32809 | end: {
|
32810 | line: 48,
|
32811 | column: 5
|
32812 | }
|
32813 | }],
|
32814 | line: 27
|
32815 | },
|
32816 | '1': {
|
32817 | loc: {
|
32818 | start: {
|
32819 | line: 33,
|
32820 | column: 6
|
32821 | },
|
32822 | end: {
|
32823 | line: 35,
|
32824 | column: 7
|
32825 | }
|
32826 | },
|
32827 | type: 'if',
|
32828 | locations: [{
|
32829 | start: {
|
32830 | line: 33,
|
32831 | column: 6
|
32832 | },
|
32833 | end: {
|
32834 | line: 35,
|
32835 | column: 7
|
32836 | }
|
32837 | }, {
|
32838 | start: {
|
32839 | line: 33,
|
32840 | column: 6
|
32841 | },
|
32842 | end: {
|
32843 | line: 35,
|
32844 | column: 7
|
32845 | }
|
32846 | }],
|
32847 | line: 33
|
32848 | },
|
32849 | '2': {
|
32850 | loc: {
|
32851 | start: {
|
32852 | line: 57,
|
32853 | column: 4
|
32854 | },
|
32855 | end: {
|
32856 | line: 64,
|
32857 | column: 5
|
32858 | }
|
32859 | },
|
32860 | type: 'if',
|
32861 | locations: [{
|
32862 | start: {
|
32863 | line: 57,
|
32864 | column: 4
|
32865 | },
|
32866 | end: {
|
32867 | line: 64,
|
32868 | column: 5
|
32869 | }
|
32870 | }, {
|
32871 | start: {
|
32872 | line: 57,
|
32873 | column: 4
|
32874 | },
|
32875 | end: {
|
32876 | line: 64,
|
32877 | column: 5
|
32878 | }
|
32879 | }],
|
32880 | line: 57
|
32881 | },
|
32882 | '3': {
|
32883 | loc: {
|
32884 | start: {
|
32885 | line: 57,
|
32886 | column: 8
|
32887 | },
|
32888 | end: {
|
32889 | line: 57,
|
32890 | column: 60
|
32891 | }
|
32892 | },
|
32893 | type: 'binary-expr',
|
32894 | locations: [{
|
32895 | start: {
|
32896 | line: 57,
|
32897 | column: 8
|
32898 | },
|
32899 | end: {
|
32900 | line: 57,
|
32901 | column: 31
|
32902 | }
|
32903 | }, {
|
32904 | start: {
|
32905 | line: 57,
|
32906 | column: 35
|
32907 | },
|
32908 | end: {
|
32909 | line: 57,
|
32910 | column: 60
|
32911 | }
|
32912 | }],
|
32913 | line: 57
|
32914 | },
|
32915 | '4': {
|
32916 | loc: {
|
32917 | start: {
|
32918 | line: 82,
|
32919 | column: 4
|
32920 | },
|
32921 | end: {
|
32922 | line: 88,
|
32923 | column: 5
|
32924 | }
|
32925 | },
|
32926 | type: 'if',
|
32927 | locations: [{
|
32928 | start: {
|
32929 | line: 82,
|
32930 | column: 4
|
32931 | },
|
32932 | end: {
|
32933 | line: 88,
|
32934 | column: 5
|
32935 | }
|
32936 | }, {
|
32937 | start: {
|
32938 | line: 82,
|
32939 | column: 4
|
32940 | },
|
32941 | end: {
|
32942 | line: 88,
|
32943 | column: 5
|
32944 | }
|
32945 | }],
|
32946 | line: 82
|
32947 | },
|
32948 | '5': {
|
32949 | loc: {
|
32950 | start: {
|
32951 | line: 97,
|
32952 | column: 4
|
32953 | },
|
32954 | end: {
|
32955 | line: 103,
|
32956 | column: 5
|
32957 | }
|
32958 | },
|
32959 | type: 'if',
|
32960 | locations: [{
|
32961 | start: {
|
32962 | line: 97,
|
32963 | column: 4
|
32964 | },
|
32965 | end: {
|
32966 | line: 103,
|
32967 | column: 5
|
32968 | }
|
32969 | }, {
|
32970 | start: {
|
32971 | line: 97,
|
32972 | column: 4
|
32973 | },
|
32974 | end: {
|
32975 | line: 103,
|
32976 | column: 5
|
32977 | }
|
32978 | }],
|
32979 | line: 97
|
32980 | },
|
32981 | '6': {
|
32982 | loc: {
|
32983 | start: {
|
32984 | line: 97,
|
32985 | column: 8
|
32986 | },
|
32987 | end: {
|
32988 | line: 97,
|
32989 | column: 58
|
32990 | }
|
32991 | },
|
32992 | type: 'binary-expr',
|
32993 | locations: [{
|
32994 | start: {
|
32995 | line: 97,
|
32996 | column: 8
|
32997 | },
|
32998 | end: {
|
32999 | line: 97,
|
33000 | column: 30
|
33001 | }
|
33002 | }, {
|
33003 | start: {
|
33004 | line: 97,
|
33005 | column: 34
|
33006 | },
|
33007 | end: {
|
33008 | line: 97,
|
33009 | column: 58
|
33010 | }
|
33011 | }],
|
33012 | line: 97
|
33013 | },
|
33014 | '7': {
|
33015 | loc: {
|
33016 | start: {
|
33017 | line: 123,
|
33018 | column: 4
|
33019 | },
|
33020 | end: {
|
33021 | line: 127,
|
33022 | column: 5
|
33023 | }
|
33024 | },
|
33025 | type: 'if',
|
33026 | locations: [{
|
33027 | start: {
|
33028 | line: 123,
|
33029 | column: 4
|
33030 | },
|
33031 | end: {
|
33032 | line: 127,
|
33033 | column: 5
|
33034 | }
|
33035 | }, {
|
33036 | start: {
|
33037 | line: 123,
|
33038 | column: 4
|
33039 | },
|
33040 | end: {
|
33041 | line: 127,
|
33042 | column: 5
|
33043 | }
|
33044 | }],
|
33045 | line: 123
|
33046 | },
|
33047 | '8': {
|
33048 | loc: {
|
33049 | start: {
|
33050 | line: 136,
|
33051 | column: 4
|
33052 | },
|
33053 | end: {
|
33054 | line: 147,
|
33055 | column: 5
|
33056 | }
|
33057 | },
|
33058 | type: 'if',
|
33059 | locations: [{
|
33060 | start: {
|
33061 | line: 136,
|
33062 | column: 4
|
33063 | },
|
33064 | end: {
|
33065 | line: 147,
|
33066 | column: 5
|
33067 | }
|
33068 | }, {
|
33069 | start: {
|
33070 | line: 136,
|
33071 | column: 4
|
33072 | },
|
33073 | end: {
|
33074 | line: 147,
|
33075 | column: 5
|
33076 | }
|
33077 | }],
|
33078 | line: 136
|
33079 | },
|
33080 | '9': {
|
33081 | loc: {
|
33082 | start: {
|
33083 | line: 143,
|
33084 | column: 11
|
33085 | },
|
33086 | end: {
|
33087 | line: 147,
|
33088 | column: 5
|
33089 | }
|
33090 | },
|
33091 | type: 'if',
|
33092 | locations: [{
|
33093 | start: {
|
33094 | line: 143,
|
33095 | column: 11
|
33096 | },
|
33097 | end: {
|
33098 | line: 147,
|
33099 | column: 5
|
33100 | }
|
33101 | }, {
|
33102 | start: {
|
33103 | line: 143,
|
33104 | column: 11
|
33105 | },
|
33106 | end: {
|
33107 | line: 147,
|
33108 | column: 5
|
33109 | }
|
33110 | }],
|
33111 | line: 143
|
33112 | },
|
33113 | '10': {
|
33114 | loc: {
|
33115 | start: {
|
33116 | line: 154,
|
33117 | column: 4
|
33118 | },
|
33119 | end: {
|
33120 | line: 158,
|
33121 | column: 5
|
33122 | }
|
33123 | },
|
33124 | type: 'if',
|
33125 | locations: [{
|
33126 | start: {
|
33127 | line: 154,
|
33128 | column: 4
|
33129 | },
|
33130 | end: {
|
33131 | line: 158,
|
33132 | column: 5
|
33133 | }
|
33134 | }, {
|
33135 | start: {
|
33136 | line: 154,
|
33137 | column: 4
|
33138 | },
|
33139 | end: {
|
33140 | line: 158,
|
33141 | column: 5
|
33142 | }
|
33143 | }],
|
33144 | line: 154
|
33145 | },
|
33146 | '11': {
|
33147 | loc: {
|
33148 | start: {
|
33149 | line: 154,
|
33150 | column: 8
|
33151 | },
|
33152 | end: {
|
33153 | line: 154,
|
33154 | column: 54
|
33155 | }
|
33156 | },
|
33157 | type: 'binary-expr',
|
33158 | locations: [{
|
33159 | start: {
|
33160 | line: 154,
|
33161 | column: 8
|
33162 | },
|
33163 | end: {
|
33164 | line: 154,
|
33165 | column: 33
|
33166 | }
|
33167 | }, {
|
33168 | start: {
|
33169 | line: 154,
|
33170 | column: 37
|
33171 | },
|
33172 | end: {
|
33173 | line: 154,
|
33174 | column: 54
|
33175 | }
|
33176 | }],
|
33177 | line: 154
|
33178 | }
|
33179 | },
|
33180 | s: {
|
33181 | '0': 0,
|
33182 | '1': 0,
|
33183 | '2': 0,
|
33184 | '3': 0,
|
33185 | '4': 0,
|
33186 | '5': 0,
|
33187 | '6': 0,
|
33188 | '7': 0,
|
33189 | '8': 0,
|
33190 | '9': 0,
|
33191 | '10': 0,
|
33192 | '11': 0,
|
33193 | '12': 0,
|
33194 | '13': 0,
|
33195 | '14': 0,
|
33196 | '15': 0,
|
33197 | '16': 0,
|
33198 | '17': 0,
|
33199 | '18': 0,
|
33200 | '19': 0,
|
33201 | '20': 0,
|
33202 | '21': 0,
|
33203 | '22': 0,
|
33204 | '23': 0,
|
33205 | '24': 0,
|
33206 | '25': 0,
|
33207 | '26': 0,
|
33208 | '27': 0,
|
33209 | '28': 0,
|
33210 | '29': 0,
|
33211 | '30': 0,
|
33212 | '31': 0,
|
33213 | '32': 0,
|
33214 | '33': 0,
|
33215 | '34': 0,
|
33216 | '35': 0,
|
33217 | '36': 0,
|
33218 | '37': 0,
|
33219 | '38': 0,
|
33220 | '39': 0,
|
33221 | '40': 0,
|
33222 | '41': 0,
|
33223 | '42': 0,
|
33224 | '43': 0,
|
33225 | '44': 0,
|
33226 | '45': 0,
|
33227 | '46': 0,
|
33228 | '47': 0,
|
33229 | '48': 0,
|
33230 | '49': 0,
|
33231 | '50': 0,
|
33232 | '51': 0,
|
33233 | '52': 0,
|
33234 | '53': 0,
|
33235 | '54': 0,
|
33236 | '55': 0,
|
33237 | '56': 0,
|
33238 | '57': 0,
|
33239 | '58': 0,
|
33240 | '59': 0
|
33241 | },
|
33242 | f: {
|
33243 | '0': 0,
|
33244 | '1': 0,
|
33245 | '2': 0,
|
33246 | '3': 0,
|
33247 | '4': 0,
|
33248 | '5': 0,
|
33249 | '6': 0,
|
33250 | '7': 0,
|
33251 | '8': 0,
|
33252 | '9': 0,
|
33253 | '10': 0,
|
33254 | '11': 0,
|
33255 | '12': 0,
|
33256 | '13': 0,
|
33257 | '14': 0
|
33258 | },
|
33259 | b: {
|
33260 | '0': [0, 0],
|
33261 | '1': [0, 0],
|
33262 | '2': [0, 0],
|
33263 | '3': [0, 0],
|
33264 | '4': [0, 0],
|
33265 | '5': [0, 0],
|
33266 | '6': [0, 0],
|
33267 | '7': [0, 0],
|
33268 | '8': [0, 0],
|
33269 | '9': [0, 0],
|
33270 | '10': [0, 0],
|
33271 | '11': [0, 0]
|
33272 | },
|
33273 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
33274 | },
|
33275 | coverage = global[gcv] || (global[gcv] = {});
|
33276 |
|
33277 | if (coverage[path] && coverage[path].hash === hash) {
|
33278 | return coverage[path];
|
33279 | }
|
33280 |
|
33281 | coverageData.hash = hash;
|
33282 | return coverage[path] = coverageData;
|
33283 | }();
|
33284 | var AdState$2 = (cov_ci2deddxi.s[0]++, States.getState('AdState'));
|
33285 |
|
33286 | var Postroll =
|
33287 |
|
33288 | function (_AdState) {
|
33289 | _inheritsLoose(Postroll, _AdState);
|
33290 |
|
33291 | function Postroll() {
|
33292 | return _AdState.apply(this, arguments) || this;
|
33293 | }
|
33294 |
|
33295 | Postroll._getName = function _getName() {
|
33296 | cov_ci2deddxi.f[0]++;
|
33297 | cov_ci2deddxi.s[1]++;
|
33298 | return 'Postroll';
|
33299 | };
|
33300 |
|
33301 | var _proto = Postroll.prototype;
|
33302 |
|
33303 | _proto.init = function init(player) {
|
33304 | cov_ci2deddxi.f[1]++;
|
33305 | cov_ci2deddxi.s[2]++;
|
33306 | this.waitingForAdBreak = true;
|
33307 | cov_ci2deddxi.s[3]++;
|
33308 | player.ads._contentEnding = true;
|
33309 | cov_ci2deddxi.s[4]++;
|
33310 |
|
33311 | if (!player.ads.nopostroll_) {
|
33312 | cov_ci2deddxi.b[0][0]++;
|
33313 | cov_ci2deddxi.s[5]++;
|
33314 | player.addClass('vjs-ad-loading');
|
33315 | var timeout = (cov_ci2deddxi.s[6]++, player.ads.settings.timeout);
|
33316 | cov_ci2deddxi.s[7]++;
|
33317 |
|
33318 | if (typeof player.ads.settings.postrollTimeout === 'number') {
|
33319 | cov_ci2deddxi.b[1][0]++;
|
33320 | cov_ci2deddxi.s[8]++;
|
33321 | timeout = player.ads.settings.postrollTimeout;
|
33322 | } else {
|
33323 | cov_ci2deddxi.b[1][1]++;
|
33324 | }
|
33325 |
|
33326 | cov_ci2deddxi.s[9]++;
|
33327 | this._postrollTimeout = player.setTimeout(function () {
|
33328 | cov_ci2deddxi.f[2]++;
|
33329 | cov_ci2deddxi.s[10]++;
|
33330 | player.trigger('adtimeout');
|
33331 | }, timeout);
|
33332 | } else {
|
33333 | cov_ci2deddxi.b[0][1]++;
|
33334 | cov_ci2deddxi.s[11]++;
|
33335 | this.resumeContent(player);
|
33336 | var AdsDone = (cov_ci2deddxi.s[12]++, States.getState('AdsDone'));
|
33337 | cov_ci2deddxi.s[13]++;
|
33338 | this.transitionTo(AdsDone);
|
33339 | }
|
33340 | };
|
33341 |
|
33342 | _proto.startLinearAdMode = function startLinearAdMode() {
|
33343 | cov_ci2deddxi.f[3]++;
|
33344 | var player = (cov_ci2deddxi.s[14]++, this.player);
|
33345 | cov_ci2deddxi.s[15]++;
|
33346 |
|
33347 | if ((cov_ci2deddxi.b[3][0]++, !player.ads.inAdBreak()) && (cov_ci2deddxi.b[3][1]++, !this.isContentResuming())) {
|
33348 | cov_ci2deddxi.b[2][0]++;
|
33349 | cov_ci2deddxi.s[16]++;
|
33350 | player.ads.adType = 'postroll';
|
33351 | cov_ci2deddxi.s[17]++;
|
33352 | player.clearTimeout(this._postrollTimeout);
|
33353 | cov_ci2deddxi.s[18]++;
|
33354 | this.waitingForAdBreak = false;
|
33355 | cov_ci2deddxi.s[19]++;
|
33356 | obj.start(player);
|
33357 | } else {
|
33358 | cov_ci2deddxi.b[2][1]++;
|
33359 | cov_ci2deddxi.s[20]++;
|
33360 | videojs$1.log.warn('Unexpected startLinearAdMode invocation (Postroll)');
|
33361 | }
|
33362 | };
|
33363 |
|
33364 | _proto.onAdStarted = function onAdStarted(player) {
|
33365 | cov_ci2deddxi.f[4]++;
|
33366 | cov_ci2deddxi.s[21]++;
|
33367 | player.removeClass('vjs-ad-loading');
|
33368 | };
|
33369 |
|
33370 | _proto.endLinearAdMode = function endLinearAdMode() {
|
33371 | var _this = this;
|
33372 |
|
33373 | cov_ci2deddxi.f[5]++;
|
33374 | var player = (cov_ci2deddxi.s[22]++, this.player);
|
33375 | var AdsDone = (cov_ci2deddxi.s[23]++, States.getState('AdsDone'));
|
33376 | cov_ci2deddxi.s[24]++;
|
33377 |
|
33378 | if (this.inAdBreak()) {
|
33379 | cov_ci2deddxi.b[4][0]++;
|
33380 | cov_ci2deddxi.s[25]++;
|
33381 | player.removeClass('vjs-ad-loading');
|
33382 | cov_ci2deddxi.s[26]++;
|
33383 | this.resumeContent(player);
|
33384 | cov_ci2deddxi.s[27]++;
|
33385 | obj.end(player, function () {
|
33386 | cov_ci2deddxi.f[6]++;
|
33387 | cov_ci2deddxi.s[28]++;
|
33388 |
|
33389 | _this.transitionTo(AdsDone);
|
33390 | });
|
33391 | } else {
|
33392 | cov_ci2deddxi.b[4][1]++;
|
33393 | }
|
33394 | };
|
33395 |
|
33396 | _proto.skipLinearAdMode = function skipLinearAdMode() {
|
33397 | cov_ci2deddxi.f[7]++;
|
33398 | var player = (cov_ci2deddxi.s[29]++, this.player);
|
33399 | cov_ci2deddxi.s[30]++;
|
33400 |
|
33401 | if ((cov_ci2deddxi.b[6][0]++, player.ads.inAdBreak()) || (cov_ci2deddxi.b[6][1]++, this.isContentResuming())) {
|
33402 | cov_ci2deddxi.b[5][0]++;
|
33403 | cov_ci2deddxi.s[31]++;
|
33404 | videojs$1.log.warn('Unexpected skipLinearAdMode invocation');
|
33405 | } else {
|
33406 | cov_ci2deddxi.b[5][1]++;
|
33407 | cov_ci2deddxi.s[32]++;
|
33408 | player.ads.debug('Postroll abort (skipLinearAdMode)');
|
33409 | cov_ci2deddxi.s[33]++;
|
33410 | player.trigger('adskip');
|
33411 | cov_ci2deddxi.s[34]++;
|
33412 | this.abort(player);
|
33413 | }
|
33414 | };
|
33415 |
|
33416 | _proto.onAdTimeout = function onAdTimeout(player) {
|
33417 | cov_ci2deddxi.f[8]++;
|
33418 | cov_ci2deddxi.s[35]++;
|
33419 | player.ads.debug('Postroll abort (adtimeout)');
|
33420 | cov_ci2deddxi.s[36]++;
|
33421 | this.abort(player);
|
33422 | };
|
33423 |
|
33424 | _proto.onAdsError = function onAdsError(player) {
|
33425 | cov_ci2deddxi.f[9]++;
|
33426 | cov_ci2deddxi.s[37]++;
|
33427 | player.ads.debug('Postroll abort (adserror)');
|
33428 | cov_ci2deddxi.s[38]++;
|
33429 |
|
33430 | if (player.ads.inAdBreak()) {
|
33431 | cov_ci2deddxi.b[7][0]++;
|
33432 | cov_ci2deddxi.s[39]++;
|
33433 | player.ads.endLinearAdMode();
|
33434 | } else {
|
33435 | cov_ci2deddxi.b[7][1]++;
|
33436 | cov_ci2deddxi.s[40]++;
|
33437 | this.abort(player);
|
33438 | }
|
33439 | };
|
33440 |
|
33441 | _proto.onContentChanged = function onContentChanged(player) {
|
33442 | cov_ci2deddxi.f[10]++;
|
33443 | cov_ci2deddxi.s[41]++;
|
33444 |
|
33445 | if (this.isContentResuming()) {
|
33446 | cov_ci2deddxi.b[8][0]++;
|
33447 | var BeforePreroll = (cov_ci2deddxi.s[42]++, States.getState('BeforePreroll'));
|
33448 | cov_ci2deddxi.s[43]++;
|
33449 | this.transitionTo(BeforePreroll);
|
33450 | } else {
|
33451 | cov_ci2deddxi.b[8][1]++;
|
33452 | cov_ci2deddxi.s[44]++;
|
33453 |
|
33454 | if (!this.inAdBreak()) {
|
33455 | cov_ci2deddxi.b[9][0]++;
|
33456 | var Preroll = (cov_ci2deddxi.s[45]++, States.getState('Preroll'));
|
33457 | cov_ci2deddxi.s[46]++;
|
33458 | this.transitionTo(Preroll);
|
33459 | } else {
|
33460 | cov_ci2deddxi.b[9][1]++;
|
33461 | }
|
33462 | }
|
33463 | };
|
33464 |
|
33465 | _proto.onNoPostroll = function onNoPostroll(player) {
|
33466 | cov_ci2deddxi.f[11]++;
|
33467 | cov_ci2deddxi.s[47]++;
|
33468 |
|
33469 | if ((cov_ci2deddxi.b[11][0]++, !this.isContentResuming()) && (cov_ci2deddxi.b[11][1]++, !this.inAdBreak())) {
|
33470 | cov_ci2deddxi.b[10][0]++;
|
33471 | cov_ci2deddxi.s[48]++;
|
33472 | this.abort(player);
|
33473 | } else {
|
33474 | cov_ci2deddxi.b[10][1]++;
|
33475 | cov_ci2deddxi.s[49]++;
|
33476 | videojs$1.log.warn('Unexpected nopostroll event (Postroll)');
|
33477 | }
|
33478 | };
|
33479 |
|
33480 | _proto.resumeContent = function resumeContent(player) {
|
33481 | cov_ci2deddxi.f[12]++;
|
33482 | cov_ci2deddxi.s[50]++;
|
33483 | this.contentResuming = true;
|
33484 | cov_ci2deddxi.s[51]++;
|
33485 | player.addClass('vjs-ad-content-resuming');
|
33486 | };
|
33487 |
|
33488 | _proto.abort = function abort(player) {
|
33489 | cov_ci2deddxi.f[13]++;
|
33490 | var AdsDone = (cov_ci2deddxi.s[52]++, States.getState('AdsDone'));
|
33491 | cov_ci2deddxi.s[53]++;
|
33492 | this.resumeContent(player);
|
33493 | cov_ci2deddxi.s[54]++;
|
33494 | player.removeClass('vjs-ad-loading');
|
33495 | cov_ci2deddxi.s[55]++;
|
33496 | this.transitionTo(AdsDone);
|
33497 | };
|
33498 |
|
33499 | _proto.cleanup = function cleanup(player) {
|
33500 | cov_ci2deddxi.f[14]++;
|
33501 | cov_ci2deddxi.s[56]++;
|
33502 | player.removeClass('vjs-ad-content-resuming');
|
33503 | cov_ci2deddxi.s[57]++;
|
33504 | player.clearTimeout(this._postrollTimeout);
|
33505 | cov_ci2deddxi.s[58]++;
|
33506 | player.ads._contentEnding = false;
|
33507 | };
|
33508 |
|
33509 | return Postroll;
|
33510 | }(AdState$2);
|
33511 |
|
33512 | cov_ci2deddxi.s[59]++;
|
33513 | States.registerState('Postroll', Postroll);
|
33514 |
|
33515 | |
33516 |
|
33517 |
|
33518 |
|
33519 |
|
33520 | QUnit.module('Postroll', {
|
33521 | beforeEach: function beforeEach() {
|
33522 | var _this = this;
|
33523 |
|
33524 | this.events = [];
|
33525 | this.player = {
|
33526 | ads: {
|
33527 | settings: {},
|
33528 | debug: function debug() {},
|
33529 | inAdBreak: function inAdBreak() {
|
33530 | return false;
|
33531 | }
|
33532 | },
|
33533 | addClass: function addClass() {},
|
33534 | removeClass: function removeClass() {},
|
33535 | setTimeout: function setTimeout() {},
|
33536 | trigger: function trigger(event) {
|
33537 | _this.events.push(event);
|
33538 | },
|
33539 | clearTimeout: function clearTimeout() {}
|
33540 | };
|
33541 | this.postroll = new Postroll(this.player);
|
33542 |
|
33543 | this.postroll.transitionTo = function (newState) {
|
33544 | _this.newState = newState.name;
|
33545 | };
|
33546 |
|
33547 | this.adBreakStartStub = sinon.stub(obj, 'start');
|
33548 | this.adBreakEndStub = sinon.stub(obj, 'end');
|
33549 | },
|
33550 | afterEach: function afterEach() {
|
33551 | this.adBreakStartStub.restore();
|
33552 | this.adBreakEndStub.restore();
|
33553 | }
|
33554 | });
|
33555 | QUnit.test('sets _contentEnding on init', function (assert) {
|
33556 | this.postroll.init(this.player);
|
33557 | assert.equal(this.player.ads._contentEnding, true, 'content is ending');
|
33558 | });
|
33559 | QUnit.test('startLinearAdMode starts ad break', function (assert) {
|
33560 | this.postroll.init(this.player);
|
33561 | this.postroll.startLinearAdMode();
|
33562 | assert.equal(this.adBreakStartStub.callCount, 1, 'ad break started');
|
33563 | assert.equal(this.player.ads.adType, 'postroll', 'ad type is postroll');
|
33564 | });
|
33565 | QUnit.test('removes ad loading class on ad started', function (assert) {
|
33566 | this.player.removeClass = sinon.spy();
|
33567 | this.postroll.init(this.player);
|
33568 | this.postroll.onAdStarted(this.player);
|
33569 | assert.ok(this.player.removeClass.calledWith('vjs-ad-loading'));
|
33570 | });
|
33571 | QUnit.test('ends linear ad mode & ended event on ads error', function (assert) {
|
33572 | this.player.ads.endLinearAdMode = sinon.spy();
|
33573 | this.postroll.init(this.player);
|
33574 |
|
33575 | this.player.ads.inAdBreak = function () {
|
33576 | return true;
|
33577 | };
|
33578 |
|
33579 | this.postroll.onAdsError(this.player);
|
33580 | assert.equal(this.player.ads.endLinearAdMode.callCount, 1, 'linear ad mode ended');
|
33581 | });
|
33582 | QUnit.test('no endLinearAdMode on adserror if not in ad break', function (assert) {
|
33583 | this.player.ads.endLinearAdMode = sinon.spy();
|
33584 | this.postroll.init(this.player);
|
33585 |
|
33586 | this.player.ads.inAdBreak = function () {
|
33587 | return false;
|
33588 | };
|
33589 |
|
33590 | this.postroll.onAdsError(this.player);
|
33591 | assert.equal(this.player.ads.endLinearAdMode.callCount, 0, 'linear ad mode ended');
|
33592 | });
|
33593 | QUnit.test('does not transition to AdsDone unless content resuming', function (assert) {
|
33594 | this.postroll.init(this.player);
|
33595 | this.postroll.onEnded(this.player);
|
33596 | assert.equal(this.newState, undefined, 'no transition');
|
33597 | });
|
33598 | QUnit.test('transitions to BeforePreroll on content changed after ad break', function (assert) {
|
33599 | this.postroll.isContentResuming = function () {
|
33600 | return true;
|
33601 | };
|
33602 |
|
33603 | this.postroll.init(this.player);
|
33604 | this.postroll.onContentChanged(this.player);
|
33605 | assert.equal(this.newState, 'BeforePreroll');
|
33606 | });
|
33607 | QUnit.test('transitions to Preroll on content changed before ad break', function (assert) {
|
33608 | this.postroll.init(this.player);
|
33609 | this.postroll.onContentChanged(this.player);
|
33610 | assert.equal(this.newState, 'Preroll');
|
33611 | });
|
33612 | QUnit.test('doesn\'t transition on content changed during ad break', function (assert) {
|
33613 | this.postroll.inAdBreak = function () {
|
33614 | return true;
|
33615 | };
|
33616 |
|
33617 | this.postroll.init(this.player);
|
33618 | this.postroll.onContentChanged(this.player);
|
33619 | assert.equal(this.newState, undefined, 'no transition');
|
33620 | });
|
33621 | QUnit.test('transitions to AdsDone on nopostroll before ad break', function (assert) {
|
33622 | this.postroll.init(this.player);
|
33623 | this.postroll.onNoPostroll(this.player);
|
33624 | assert.equal(this.newState, 'AdsDone');
|
33625 | });
|
33626 | QUnit.test('no transition on nopostroll during ad break', function (assert) {
|
33627 | this.postroll.inAdBreak = function () {
|
33628 | return true;
|
33629 | };
|
33630 |
|
33631 | this.postroll.init(this.player);
|
33632 | this.postroll.onNoPostroll(this.player);
|
33633 | assert.equal(this.newState, undefined, 'no transition');
|
33634 | });
|
33635 | QUnit.test('no transition on nopostroll after ad break', function (assert) {
|
33636 | this.postroll.isContentResuming = function () {
|
33637 | return true;
|
33638 | };
|
33639 |
|
33640 | this.postroll.init(this.player);
|
33641 | this.postroll.onNoPostroll(this.player);
|
33642 | assert.equal(this.newState, undefined, 'no transition');
|
33643 | });
|
33644 | QUnit.test('can abort', function (assert) {
|
33645 | var removeClassSpy = sinon.spy(this.player, 'removeClass');
|
33646 | this.postroll.init(this.player);
|
33647 | this.postroll.abort(this.player);
|
33648 | assert.equal(this.postroll.contentResuming, true, 'contentResuming');
|
33649 | assert.ok(removeClassSpy.calledWith('vjs-ad-loading'), 'loading class removed');
|
33650 | });
|
33651 | QUnit.test('can clean up', function (assert) {
|
33652 | var clearSpy = sinon.spy(this.player, 'clearTimeout');
|
33653 | this.postroll.init(this.player);
|
33654 | this.postroll.cleanup(this.player);
|
33655 | assert.equal(this.player.ads._contentEnding, false, '_contentEnding');
|
33656 | assert.ok(clearSpy.calledWith(this.postroll._postrollTimeout), 'cleared timeout');
|
33657 | });
|
33658 | QUnit.test('can tell if waiting for ad break', function (assert) {
|
33659 | this.postroll.init(this.player);
|
33660 | assert.equal(this.postroll.isWaitingForAdBreak(), true, 'waiting for ad break');
|
33661 | this.postroll.startLinearAdMode();
|
33662 | assert.equal(this.postroll.isWaitingForAdBreak(), false, 'not waiting for ad break');
|
33663 | });
|
33664 |
|
33665 | var cov_q4mci4s8m = function () {
|
33666 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/Preroll.js',
|
33667 | hash = '597aa872ea853521bf5717139bb5f962cdc9e7f7',
|
33668 | Function = function () {}.constructor,
|
33669 | global = new Function('return this')(),
|
33670 | gcv = '__coverage__',
|
33671 | coverageData = {
|
33672 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/Preroll.js',
|
33673 | statementMap: {
|
33674 | '0': {
|
33675 | start: {
|
33676 | line: 6,
|
33677 | column: 16
|
33678 | },
|
33679 | end: {
|
33680 | line: 6,
|
33681 | column: 42
|
33682 | }
|
33683 | },
|
33684 | '1': {
|
33685 | start: {
|
33686 | line: 18,
|
33687 | column: 4
|
33688 | },
|
33689 | end: {
|
33690 | line: 18,
|
33691 | column: 21
|
33692 | }
|
33693 | },
|
33694 | '2': {
|
33695 | start: {
|
33696 | line: 26,
|
33697 | column: 4
|
33698 | },
|
33699 | end: {
|
33700 | line: 26,
|
33701 | column: 34
|
33702 | }
|
33703 | },
|
33704 | '3': {
|
33705 | start: {
|
33706 | line: 29,
|
33707 | column: 4
|
33708 | },
|
33709 | end: {
|
33710 | line: 29,
|
33711 | column: 38
|
33712 | }
|
33713 | },
|
33714 | '4': {
|
33715 | start: {
|
33716 | line: 33,
|
33717 | column: 4
|
33718 | },
|
33719 | end: {
|
33720 | line: 35,
|
33721 | column: 5
|
33722 | }
|
33723 | },
|
33724 | '5': {
|
33725 | start: {
|
33726 | line: 34,
|
33727 | column: 6
|
33728 | },
|
33729 | end: {
|
33730 | line: 34,
|
33731 | column: 47
|
33732 | }
|
33733 | },
|
33734 | '6': {
|
33735 | start: {
|
33736 | line: 38,
|
33737 | column: 18
|
33738 | },
|
33739 | end: {
|
33740 | line: 38,
|
33741 | column: 45
|
33742 | }
|
33743 | },
|
33744 | '7': {
|
33745 | start: {
|
33746 | line: 40,
|
33747 | column: 4
|
33748 | },
|
33749 | end: {
|
33750 | line: 42,
|
33751 | column: 5
|
33752 | }
|
33753 | },
|
33754 | '8': {
|
33755 | start: {
|
33756 | line: 41,
|
33757 | column: 6
|
33758 | },
|
33759 | end: {
|
33760 | line: 41,
|
33761 | column: 51
|
33762 | }
|
33763 | },
|
33764 | '9': {
|
33765 | start: {
|
33766 | line: 45,
|
33767 | column: 4
|
33768 | },
|
33769 | end: {
|
33770 | line: 47,
|
33771 | column: 16
|
33772 | }
|
33773 | },
|
33774 | '10': {
|
33775 | start: {
|
33776 | line: 46,
|
33777 | column: 6
|
33778 | },
|
33779 | end: {
|
33780 | line: 46,
|
33781 | column: 34
|
33782 | }
|
33783 | },
|
33784 | '11': {
|
33785 | start: {
|
33786 | line: 51,
|
33787 | column: 4
|
33788 | },
|
33789 | end: {
|
33790 | line: 56,
|
33791 | column: 5
|
33792 | }
|
33793 | },
|
33794 | '12': {
|
33795 | start: {
|
33796 | line: 52,
|
33797 | column: 6
|
33798 | },
|
33799 | end: {
|
33800 | line: 52,
|
33801 | column: 28
|
33802 | }
|
33803 | },
|
33804 | '13': {
|
33805 | start: {
|
33806 | line: 55,
|
33807 | column: 6
|
33808 | },
|
33809 | end: {
|
33810 | line: 55,
|
33811 | column: 28
|
33812 | }
|
33813 | },
|
33814 | '14': {
|
33815 | start: {
|
33816 | line: 63,
|
33817 | column: 4
|
33818 | },
|
33819 | end: {
|
33820 | line: 68,
|
33821 | column: 5
|
33822 | }
|
33823 | },
|
33824 | '15': {
|
33825 | start: {
|
33826 | line: 64,
|
33827 | column: 6
|
33828 | },
|
33829 | end: {
|
33830 | line: 64,
|
33831 | column: 60
|
33832 | }
|
33833 | },
|
33834 | '16': {
|
33835 | start: {
|
33836 | line: 65,
|
33837 | column: 6
|
33838 | },
|
33839 | end: {
|
33840 | line: 65,
|
33841 | column: 28
|
33842 | }
|
33843 | },
|
33844 | '17': {
|
33845 | start: {
|
33846 | line: 67,
|
33847 | column: 6
|
33848 | },
|
33849 | end: {
|
33850 | line: 67,
|
33851 | column: 62
|
33852 | }
|
33853 | },
|
33854 | '18': {
|
33855 | start: {
|
33856 | line: 75,
|
33857 | column: 4
|
33858 | },
|
33859 | end: {
|
33860 | line: 75,
|
33861 | column: 25
|
33862 | }
|
33863 | },
|
33864 | '19': {
|
33865 | start: {
|
33866 | line: 76,
|
33867 | column: 4
|
33868 | },
|
33869 | end: {
|
33870 | line: 76,
|
33871 | column: 27
|
33872 | }
|
33873 | },
|
33874 | '20': {
|
33875 | start: {
|
33876 | line: 85,
|
33877 | column: 19
|
33878 | },
|
33879 | end: {
|
33880 | line: 85,
|
33881 | column: 30
|
33882 | }
|
33883 | },
|
33884 | '21': {
|
33885 | start: {
|
33886 | line: 87,
|
33887 | column: 4
|
33888 | },
|
33889 | end: {
|
33890 | line: 95,
|
33891 | column: 5
|
33892 | }
|
33893 | },
|
33894 | '22': {
|
33895 | start: {
|
33896 | line: 88,
|
33897 | column: 6
|
33898 | },
|
33899 | end: {
|
33900 | line: 88,
|
33901 | column: 17
|
33902 | }
|
33903 | },
|
33904 | '23': {
|
33905 | start: {
|
33906 | line: 90,
|
33907 | column: 6
|
33908 | },
|
33909 | end: {
|
33910 | line: 90,
|
33911 | column: 51
|
33912 | }
|
33913 | },
|
33914 | '24': {
|
33915 | start: {
|
33916 | line: 91,
|
33917 | column: 6
|
33918 | },
|
33919 | end: {
|
33920 | line: 94,
|
33921 | column: 9
|
33922 | }
|
33923 | },
|
33924 | '25': {
|
33925 | start: {
|
33926 | line: 92,
|
33927 | column: 8
|
33928 | },
|
33929 | end: {
|
33930 | line: 92,
|
33931 | column: 53
|
33932 | }
|
33933 | },
|
33934 | '26': {
|
33935 | start: {
|
33936 | line: 93,
|
33937 | column: 8
|
33938 | },
|
33939 | end: {
|
33940 | line: 93,
|
33941 | column: 19
|
33942 | }
|
33943 | },
|
33944 | '27': {
|
33945 | start: {
|
33946 | line: 102,
|
33947 | column: 4
|
33948 | },
|
33949 | end: {
|
33950 | line: 105,
|
33951 | column: 7
|
33952 | }
|
33953 | },
|
33954 | '28': {
|
33955 | start: {
|
33956 | line: 103,
|
33957 | column: 6
|
33958 | },
|
33959 | end: {
|
33960 | line: 103,
|
33961 | column: 82
|
33962 | }
|
33963 | },
|
33964 | '29': {
|
33965 | start: {
|
33966 | line: 104,
|
33967 | column: 6
|
33968 | },
|
33969 | end: {
|
33970 | line: 104,
|
33971 | column: 45
|
33972 | }
|
33973 | },
|
33974 | '30': {
|
33975 | start: {
|
33976 | line: 113,
|
33977 | column: 19
|
33978 | },
|
33979 | end: {
|
33980 | line: 113,
|
33981 | column: 30
|
33982 | }
|
33983 | },
|
33984 | '31': {
|
33985 | start: {
|
33986 | line: 115,
|
33987 | column: 4
|
33988 | },
|
33989 | end: {
|
33990 | line: 118,
|
33991 | column: 7
|
33992 | }
|
33993 | },
|
33994 | '32': {
|
33995 | start: {
|
33996 | line: 116,
|
33997 | column: 6
|
33998 | },
|
33999 | end: {
|
34000 | line: 116,
|
34001 | column: 68
|
34002 | }
|
34003 | },
|
34004 | '33': {
|
34005 | start: {
|
34006 | line: 117,
|
34007 | column: 6
|
34008 | },
|
34009 | end: {
|
34010 | line: 117,
|
34011 | column: 40
|
34012 | }
|
34013 | },
|
34014 | '34': {
|
34015 | start: {
|
34016 | line: 125,
|
34017 | column: 4
|
34018 | },
|
34019 | end: {
|
34020 | line: 125,
|
34021 | column: 46
|
34022 | }
|
34023 | },
|
34024 | '35': {
|
34025 | start: {
|
34026 | line: 127,
|
34027 | column: 4
|
34028 | },
|
34029 | end: {
|
34030 | line: 129,
|
34031 | column: 7
|
34032 | }
|
34033 | },
|
34034 | '36': {
|
34035 | start: {
|
34036 | line: 128,
|
34037 | column: 6
|
34038 | },
|
34039 | end: {
|
34040 | line: 128,
|
34041 | column: 40
|
34042 | }
|
34043 | },
|
34044 | '37': {
|
34045 | start: {
|
34046 | line: 136,
|
34047 | column: 4
|
34048 | },
|
34049 | end: {
|
34050 | line: 136,
|
34051 | column: 38
|
34052 | }
|
34053 | },
|
34054 | '38': {
|
34055 | start: {
|
34056 | line: 140,
|
34057 | column: 4
|
34058 | },
|
34059 | end: {
|
34060 | line: 147,
|
34061 | column: 5
|
34062 | }
|
34063 | },
|
34064 | '39': {
|
34065 | start: {
|
34066 | line: 141,
|
34067 | column: 6
|
34068 | },
|
34069 | end: {
|
34070 | line: 141,
|
34071 | column: 35
|
34072 | }
|
34073 | },
|
34074 | '40': {
|
34075 | start: {
|
34076 | line: 144,
|
34077 | column: 6
|
34078 | },
|
34079 | end: {
|
34080 | line: 146,
|
34081 | column: 9
|
34082 | }
|
34083 | },
|
34084 | '41': {
|
34085 | start: {
|
34086 | line: 145,
|
34087 | column: 8
|
34088 | },
|
34089 | end: {
|
34090 | line: 145,
|
34091 | column: 42
|
34092 | }
|
34093 | },
|
34094 | '42': {
|
34095 | start: {
|
34096 | line: 154,
|
34097 | column: 19
|
34098 | },
|
34099 | end: {
|
34100 | line: 154,
|
34101 | column: 30
|
34102 | }
|
34103 | },
|
34104 | '43': {
|
34105 | start: {
|
34106 | line: 156,
|
34107 | column: 4
|
34108 | },
|
34109 | end: {
|
34110 | line: 166,
|
34111 | column: 5
|
34112 | }
|
34113 | },
|
34114 | '44': {
|
34115 | start: {
|
34116 | line: 157,
|
34117 | column: 6
|
34118 | },
|
34119 | end: {
|
34120 | line: 157,
|
34121 | column: 32
|
34122 | }
|
34123 | },
|
34124 | '45': {
|
34125 | start: {
|
34126 | line: 158,
|
34127 | column: 6
|
34128 | },
|
34129 | end: {
|
34130 | line: 158,
|
34131 | column: 36
|
34132 | }
|
34133 | },
|
34134 | '46': {
|
34135 | start: {
|
34136 | line: 159,
|
34137 | column: 6
|
34138 | },
|
34139 | end: {
|
34140 | line: 159,
|
34141 | column: 37
|
34142 | }
|
34143 | },
|
34144 | '47': {
|
34145 | start: {
|
34146 | line: 160,
|
34147 | column: 6
|
34148 | },
|
34149 | end: {
|
34150 | line: 160,
|
34151 | column: 28
|
34152 | }
|
34153 | },
|
34154 | '48': {
|
34155 | start: {
|
34156 | line: 163,
|
34157 | column: 6
|
34158 | },
|
34159 | end: {
|
34160 | line: 163,
|
34161 | column: 42
|
34162 | }
|
34163 | },
|
34164 | '49': {
|
34165 | start: {
|
34166 | line: 165,
|
34167 | column: 6
|
34168 | },
|
34169 | end: {
|
34170 | line: 165,
|
34171 | column: 76
|
34172 | }
|
34173 | },
|
34174 | '50': {
|
34175 | start: {
|
34176 | line: 174,
|
34177 | column: 4
|
34178 | },
|
34179 | end: {
|
34180 | line: 174,
|
34181 | column: 41
|
34182 | }
|
34183 | },
|
34184 | '51': {
|
34185 | start: {
|
34186 | line: 181,
|
34187 | column: 19
|
34188 | },
|
34189 | end: {
|
34190 | line: 181,
|
34191 | column: 30
|
34192 | }
|
34193 | },
|
34194 | '52': {
|
34195 | start: {
|
34196 | line: 183,
|
34197 | column: 4
|
34198 | },
|
34199 | end: {
|
34200 | line: 188,
|
34201 | column: 5
|
34202 | }
|
34203 | },
|
34204 | '53': {
|
34205 | start: {
|
34206 | line: 184,
|
34207 | column: 6
|
34208 | },
|
34209 | end: {
|
34210 | line: 184,
|
34211 | column: 43
|
34212 | }
|
34213 | },
|
34214 | '54': {
|
34215 | start: {
|
34216 | line: 185,
|
34217 | column: 6
|
34218 | },
|
34219 | end: {
|
34220 | line: 185,
|
34221 | column: 49
|
34222 | }
|
34223 | },
|
34224 | '55': {
|
34225 | start: {
|
34226 | line: 186,
|
34227 | column: 6
|
34228 | },
|
34229 | end: {
|
34230 | line: 186,
|
34231 | column: 34
|
34232 | }
|
34233 | },
|
34234 | '56': {
|
34235 | start: {
|
34236 | line: 187,
|
34237 | column: 6
|
34238 | },
|
34239 | end: {
|
34240 | line: 187,
|
34241 | column: 26
|
34242 | }
|
34243 | },
|
34244 | '57': {
|
34245 | start: {
|
34246 | line: 195,
|
34247 | column: 19
|
34248 | },
|
34249 | end: {
|
34250 | line: 195,
|
34251 | column: 30
|
34252 | }
|
34253 | },
|
34254 | '58': {
|
34255 | start: {
|
34256 | line: 197,
|
34257 | column: 4
|
34258 | },
|
34259 | end: {
|
34260 | line: 205,
|
34261 | column: 5
|
34262 | }
|
34263 | },
|
34264 | '59': {
|
34265 | start: {
|
34266 | line: 198,
|
34267 | column: 6
|
34268 | },
|
34269 | end: {
|
34270 | line: 198,
|
34271 | column: 65
|
34272 | }
|
34273 | },
|
34274 | '60': {
|
34275 | start: {
|
34276 | line: 200,
|
34277 | column: 6
|
34278 | },
|
34279 | end: {
|
34280 | line: 204,
|
34281 | column: 9
|
34282 | }
|
34283 | },
|
34284 | '61': {
|
34285 | start: {
|
34286 | line: 201,
|
34287 | column: 8
|
34288 | },
|
34289 | end: {
|
34290 | line: 201,
|
34291 | column: 33
|
34292 | }
|
34293 | },
|
34294 | '62': {
|
34295 | start: {
|
34296 | line: 202,
|
34297 | column: 8
|
34298 | },
|
34299 | end: {
|
34300 | line: 202,
|
34301 | column: 55
|
34302 | }
|
34303 | },
|
34304 | '63': {
|
34305 | start: {
|
34306 | line: 203,
|
34307 | column: 8
|
34308 | },
|
34309 | end: {
|
34310 | line: 203,
|
34311 | column: 42
|
34312 | }
|
34313 | },
|
34314 | '64': {
|
34315 | start: {
|
34316 | line: 212,
|
34317 | column: 4
|
34318 | },
|
34319 | end: {
|
34320 | line: 215,
|
34321 | column: 7
|
34322 | }
|
34323 | },
|
34324 | '65': {
|
34325 | start: {
|
34326 | line: 213,
|
34327 | column: 6
|
34328 | },
|
34329 | end: {
|
34330 | line: 213,
|
34331 | column: 46
|
34332 | }
|
34333 | },
|
34334 | '66': {
|
34335 | start: {
|
34336 | line: 214,
|
34337 | column: 6
|
34338 | },
|
34339 | end: {
|
34340 | line: 214,
|
34341 | column: 40
|
34342 | }
|
34343 | },
|
34344 | '67': {
|
34345 | start: {
|
34346 | line: 222,
|
34347 | column: 4
|
34348 | },
|
34349 | end: {
|
34350 | line: 226,
|
34351 | column: 5
|
34352 | }
|
34353 | },
|
34354 | '68': {
|
34355 | start: {
|
34356 | line: 223,
|
34357 | column: 6
|
34358 | },
|
34359 | end: {
|
34360 | line: 223,
|
34361 | column: 63
|
34362 | }
|
34363 | },
|
34364 | '69': {
|
34365 | start: {
|
34366 | line: 225,
|
34367 | column: 6
|
34368 | },
|
34369 | end: {
|
34370 | line: 225,
|
34371 | column: 23
|
34372 | }
|
34373 | },
|
34374 | '70': {
|
34375 | start: {
|
34376 | line: 232,
|
34377 | column: 4
|
34378 | },
|
34379 | end: {
|
34380 | line: 232,
|
34381 | column: 32
|
34382 | }
|
34383 | },
|
34384 | '71': {
|
34385 | start: {
|
34386 | line: 233,
|
34387 | column: 4
|
34388 | },
|
34389 | end: {
|
34390 | line: 233,
|
34391 | column: 40
|
34392 | }
|
34393 | },
|
34394 | '72': {
|
34395 | start: {
|
34396 | line: 234,
|
34397 | column: 4
|
34398 | },
|
34399 | end: {
|
34400 | line: 234,
|
34401 | column: 32
|
34402 | }
|
34403 | },
|
34404 | '73': {
|
34405 | start: {
|
34406 | line: 239,
|
34407 | column: 4
|
34408 | },
|
34409 | end: {
|
34410 | line: 245,
|
34411 | column: 5
|
34412 | }
|
34413 | },
|
34414 | '74': {
|
34415 | start: {
|
34416 | line: 240,
|
34417 | column: 26
|
34418 | },
|
34419 | end: {
|
34420 | line: 240,
|
34421 | column: 39
|
34422 | }
|
34423 | },
|
34424 | '75': {
|
34425 | start: {
|
34426 | line: 242,
|
34427 | column: 6
|
34428 | },
|
34429 | end: {
|
34430 | line: 244,
|
34431 | column: 7
|
34432 | }
|
34433 | },
|
34434 | '76': {
|
34435 | start: {
|
34436 | line: 243,
|
34437 | column: 8
|
34438 | },
|
34439 | end: {
|
34440 | line: 243,
|
34441 | column: 42
|
34442 | }
|
34443 | },
|
34444 | '77': {
|
34445 | start: {
|
34446 | line: 252,
|
34447 | column: 4
|
34448 | },
|
34449 | end: {
|
34450 | line: 254,
|
34451 | column: 5
|
34452 | }
|
34453 | },
|
34454 | '78': {
|
34455 | start: {
|
34456 | line: 253,
|
34457 | column: 6
|
34458 | },
|
34459 | end: {
|
34460 | line: 253,
|
34461 | column: 89
|
34462 | }
|
34463 | },
|
34464 | '79': {
|
34465 | start: {
|
34466 | line: 255,
|
34467 | column: 4
|
34468 | },
|
34469 | end: {
|
34470 | line: 255,
|
34471 | column: 32
|
34472 | }
|
34473 | },
|
34474 | '80': {
|
34475 | start: {
|
34476 | line: 263,
|
34477 | column: 4
|
34478 | },
|
34479 | end: {
|
34480 | line: 263,
|
34481 | column: 41
|
34482 | }
|
34483 | },
|
34484 | '81': {
|
34485 | start: {
|
34486 | line: 264,
|
34487 | column: 4
|
34488 | },
|
34489 | end: {
|
34490 | line: 264,
|
34491 | column: 50
|
34492 | }
|
34493 | },
|
34494 | '82': {
|
34495 | start: {
|
34496 | line: 265,
|
34497 | column: 4
|
34498 | },
|
34499 | end: {
|
34500 | line: 265,
|
34501 | column: 30
|
34502 | }
|
34503 | },
|
34504 | '83': {
|
34505 | start: {
|
34506 | line: 272,
|
34507 | column: 4
|
34508 | },
|
34509 | end: {
|
34510 | line: 272,
|
34511 | column: 39
|
34512 | }
|
34513 | },
|
34514 | '84': {
|
34515 | start: {
|
34516 | line: 273,
|
34517 | column: 4
|
34518 | },
|
34519 | end: {
|
34520 | line: 273,
|
34521 | column: 25
|
34522 | }
|
34523 | },
|
34524 | '85': {
|
34525 | start: {
|
34526 | line: 277,
|
34527 | column: 0
|
34528 | },
|
34529 | end: {
|
34530 | line: 277,
|
34531 | column: 41
|
34532 | }
|
34533 | }
|
34534 | },
|
34535 | fnMap: {
|
34536 | '0': {
|
34537 | name: '(anonymous_0)',
|
34538 | decl: {
|
34539 | start: {
|
34540 | line: 17,
|
34541 | column: 2
|
34542 | },
|
34543 | end: {
|
34544 | line: 17,
|
34545 | column: 3
|
34546 | }
|
34547 | },
|
34548 | loc: {
|
34549 | start: {
|
34550 | line: 17,
|
34551 | column: 20
|
34552 | },
|
34553 | end: {
|
34554 | line: 19,
|
34555 | column: 3
|
34556 | }
|
34557 | },
|
34558 | line: 17
|
34559 | },
|
34560 | '1': {
|
34561 | name: '(anonymous_1)',
|
34562 | decl: {
|
34563 | start: {
|
34564 | line: 25,
|
34565 | column: 2
|
34566 | },
|
34567 | end: {
|
34568 | line: 25,
|
34569 | column: 3
|
34570 | }
|
34571 | },
|
34572 | loc: {
|
34573 | start: {
|
34574 | line: 25,
|
34575 | column: 48
|
34576 | },
|
34577 | end: {
|
34578 | line: 57,
|
34579 | column: 3
|
34580 | }
|
34581 | },
|
34582 | line: 25
|
34583 | },
|
34584 | '2': {
|
34585 | name: '(anonymous_2)',
|
34586 | decl: {
|
34587 | start: {
|
34588 | line: 45,
|
34589 | column: 38
|
34590 | },
|
34591 | end: {
|
34592 | line: 45,
|
34593 | column: 39
|
34594 | }
|
34595 | },
|
34596 | loc: {
|
34597 | start: {
|
34598 | line: 45,
|
34599 | column: 49
|
34600 | },
|
34601 | end: {
|
34602 | line: 47,
|
34603 | column: 5
|
34604 | }
|
34605 | },
|
34606 | line: 45
|
34607 | },
|
34608 | '3': {
|
34609 | name: '(anonymous_3)',
|
34610 | decl: {
|
34611 | start: {
|
34612 | line: 62,
|
34613 | column: 2
|
34614 | },
|
34615 | end: {
|
34616 | line: 62,
|
34617 | column: 3
|
34618 | }
|
34619 | },
|
34620 | loc: {
|
34621 | start: {
|
34622 | line: 62,
|
34623 | column: 21
|
34624 | },
|
34625 | end: {
|
34626 | line: 69,
|
34627 | column: 3
|
34628 | }
|
34629 | },
|
34630 | line: 62
|
34631 | },
|
34632 | '4': {
|
34633 | name: '(anonymous_4)',
|
34634 | decl: {
|
34635 | start: {
|
34636 | line: 74,
|
34637 | column: 2
|
34638 | },
|
34639 | end: {
|
34640 | line: 74,
|
34641 | column: 3
|
34642 | }
|
34643 | },
|
34644 | loc: {
|
34645 | start: {
|
34646 | line: 74,
|
34647 | column: 19
|
34648 | },
|
34649 | end: {
|
34650 | line: 77,
|
34651 | column: 3
|
34652 | }
|
34653 | },
|
34654 | line: 74
|
34655 | },
|
34656 | '5': {
|
34657 | name: '(anonymous_5)',
|
34658 | decl: {
|
34659 | start: {
|
34660 | line: 84,
|
34661 | column: 2
|
34662 | },
|
34663 | end: {
|
34664 | line: 84,
|
34665 | column: 3
|
34666 | }
|
34667 | },
|
34668 | loc: {
|
34669 | start: {
|
34670 | line: 84,
|
34671 | column: 27
|
34672 | },
|
34673 | end: {
|
34674 | line: 96,
|
34675 | column: 3
|
34676 | }
|
34677 | },
|
34678 | line: 84
|
34679 | },
|
34680 | '6': {
|
34681 | name: '(anonymous_6)',
|
34682 | decl: {
|
34683 | start: {
|
34684 | line: 91,
|
34685 | column: 30
|
34686 | },
|
34687 | end: {
|
34688 | line: 91,
|
34689 | column: 31
|
34690 | }
|
34691 | },
|
34692 | loc: {
|
34693 | start: {
|
34694 | line: 91,
|
34695 | column: 36
|
34696 | },
|
34697 | end: {
|
34698 | line: 94,
|
34699 | column: 7
|
34700 | }
|
34701 | },
|
34702 | line: 91
|
34703 | },
|
34704 | '7': {
|
34705 | name: '(anonymous_7)',
|
34706 | decl: {
|
34707 | start: {
|
34708 | line: 101,
|
34709 | column: 2
|
34710 | },
|
34711 | end: {
|
34712 | line: 101,
|
34713 | column: 3
|
34714 | }
|
34715 | },
|
34716 | loc: {
|
34717 | start: {
|
34718 | line: 101,
|
34719 | column: 14
|
34720 | },
|
34721 | end: {
|
34722 | line: 106,
|
34723 | column: 3
|
34724 | }
|
34725 | },
|
34726 | line: 101
|
34727 | },
|
34728 | '8': {
|
34729 | name: '(anonymous_8)',
|
34730 | decl: {
|
34731 | start: {
|
34732 | line: 102,
|
34733 | column: 24
|
34734 | },
|
34735 | end: {
|
34736 | line: 102,
|
34737 | column: 25
|
34738 | }
|
34739 | },
|
34740 | loc: {
|
34741 | start: {
|
34742 | line: 102,
|
34743 | column: 30
|
34744 | },
|
34745 | end: {
|
34746 | line: 105,
|
34747 | column: 5
|
34748 | }
|
34749 | },
|
34750 | line: 102
|
34751 | },
|
34752 | '9': {
|
34753 | name: '(anonymous_9)',
|
34754 | decl: {
|
34755 | start: {
|
34756 | line: 112,
|
34757 | column: 2
|
34758 | },
|
34759 | end: {
|
34760 | line: 112,
|
34761 | column: 3
|
34762 | }
|
34763 | },
|
34764 | loc: {
|
34765 | start: {
|
34766 | line: 112,
|
34767 | column: 20
|
34768 | },
|
34769 | end: {
|
34770 | line: 119,
|
34771 | column: 3
|
34772 | }
|
34773 | },
|
34774 | line: 112
|
34775 | },
|
34776 | '10': {
|
34777 | name: '(anonymous_10)',
|
34778 | decl: {
|
34779 | start: {
|
34780 | line: 115,
|
34781 | column: 24
|
34782 | },
|
34783 | end: {
|
34784 | line: 115,
|
34785 | column: 25
|
34786 | }
|
34787 | },
|
34788 | loc: {
|
34789 | start: {
|
34790 | line: 115,
|
34791 | column: 30
|
34792 | },
|
34793 | end: {
|
34794 | line: 118,
|
34795 | column: 5
|
34796 | }
|
34797 | },
|
34798 | line: 115
|
34799 | },
|
34800 | '11': {
|
34801 | name: '(anonymous_11)',
|
34802 | decl: {
|
34803 | start: {
|
34804 | line: 124,
|
34805 | column: 2
|
34806 | },
|
34807 | end: {
|
34808 | line: 124,
|
34809 | column: 3
|
34810 | }
|
34811 | },
|
34812 | loc: {
|
34813 | start: {
|
34814 | line: 124,
|
34815 | column: 24
|
34816 | },
|
34817 | end: {
|
34818 | line: 130,
|
34819 | column: 3
|
34820 | }
|
34821 | },
|
34822 | line: 124
|
34823 | },
|
34824 | '12': {
|
34825 | name: '(anonymous_12)',
|
34826 | decl: {
|
34827 | start: {
|
34828 | line: 127,
|
34829 | column: 24
|
34830 | },
|
34831 | end: {
|
34832 | line: 127,
|
34833 | column: 25
|
34834 | }
|
34835 | },
|
34836 | loc: {
|
34837 | start: {
|
34838 | line: 127,
|
34839 | column: 30
|
34840 | },
|
34841 | end: {
|
34842 | line: 129,
|
34843 | column: 5
|
34844 | }
|
34845 | },
|
34846 | line: 127
|
34847 | },
|
34848 | '13': {
|
34849 | name: '(anonymous_13)',
|
34850 | decl: {
|
34851 | start: {
|
34852 | line: 135,
|
34853 | column: 2
|
34854 | },
|
34855 | end: {
|
34856 | line: 135,
|
34857 | column: 3
|
34858 | }
|
34859 | },
|
34860 | loc: {
|
34861 | start: {
|
34862 | line: 135,
|
34863 | column: 21
|
34864 | },
|
34865 | end: {
|
34866 | line: 148,
|
34867 | column: 3
|
34868 | }
|
34869 | },
|
34870 | line: 135
|
34871 | },
|
34872 | '14': {
|
34873 | name: '(anonymous_14)',
|
34874 | decl: {
|
34875 | start: {
|
34876 | line: 144,
|
34877 | column: 26
|
34878 | },
|
34879 | end: {
|
34880 | line: 144,
|
34881 | column: 27
|
34882 | }
|
34883 | },
|
34884 | loc: {
|
34885 | start: {
|
34886 | line: 144,
|
34887 | column: 32
|
34888 | },
|
34889 | end: {
|
34890 | line: 146,
|
34891 | column: 7
|
34892 | }
|
34893 | },
|
34894 | line: 144
|
34895 | },
|
34896 | '15': {
|
34897 | name: '(anonymous_15)',
|
34898 | decl: {
|
34899 | start: {
|
34900 | line: 153,
|
34901 | column: 2
|
34902 | },
|
34903 | end: {
|
34904 | line: 153,
|
34905 | column: 3
|
34906 | }
|
34907 | },
|
34908 | loc: {
|
34909 | start: {
|
34910 | line: 153,
|
34911 | column: 22
|
34912 | },
|
34913 | end: {
|
34914 | line: 167,
|
34915 | column: 3
|
34916 | }
|
34917 | },
|
34918 | line: 153
|
34919 | },
|
34920 | '16': {
|
34921 | name: '(anonymous_16)',
|
34922 | decl: {
|
34923 | start: {
|
34924 | line: 173,
|
34925 | column: 2
|
34926 | },
|
34927 | end: {
|
34928 | line: 173,
|
34929 | column: 3
|
34930 | }
|
34931 | },
|
34932 | loc: {
|
34933 | start: {
|
34934 | line: 173,
|
34935 | column: 22
|
34936 | },
|
34937 | end: {
|
34938 | line: 175,
|
34939 | column: 3
|
34940 | }
|
34941 | },
|
34942 | line: 173
|
34943 | },
|
34944 | '17': {
|
34945 | name: '(anonymous_17)',
|
34946 | decl: {
|
34947 | start: {
|
34948 | line: 180,
|
34949 | column: 2
|
34950 | },
|
34951 | end: {
|
34952 | line: 180,
|
34953 | column: 3
|
34954 | }
|
34955 | },
|
34956 | loc: {
|
34957 | start: {
|
34958 | line: 180,
|
34959 | column: 20
|
34960 | },
|
34961 | end: {
|
34962 | line: 189,
|
34963 | column: 3
|
34964 | }
|
34965 | },
|
34966 | line: 180
|
34967 | },
|
34968 | '18': {
|
34969 | name: '(anonymous_18)',
|
34970 | decl: {
|
34971 | start: {
|
34972 | line: 194,
|
34973 | column: 2
|
34974 | },
|
34975 | end: {
|
34976 | line: 194,
|
34977 | column: 3
|
34978 | }
|
34979 | },
|
34980 | loc: {
|
34981 | start: {
|
34982 | line: 194,
|
34983 | column: 21
|
34984 | },
|
34985 | end: {
|
34986 | line: 206,
|
34987 | column: 3
|
34988 | }
|
34989 | },
|
34990 | line: 194
|
34991 | },
|
34992 | '19': {
|
34993 | name: '(anonymous_19)',
|
34994 | decl: {
|
34995 | start: {
|
34996 | line: 200,
|
34997 | column: 26
|
34998 | },
|
34999 | end: {
|
35000 | line: 200,
|
35001 | column: 27
|
35002 | }
|
35003 | },
|
35004 | loc: {
|
35005 | start: {
|
35006 | line: 200,
|
35007 | column: 32
|
35008 | },
|
35009 | end: {
|
35010 | line: 204,
|
35011 | column: 7
|
35012 | }
|
35013 | },
|
35014 | line: 200
|
35015 | },
|
35016 | '20': {
|
35017 | name: '(anonymous_20)',
|
35018 | decl: {
|
35019 | start: {
|
35020 | line: 211,
|
35021 | column: 2
|
35022 | },
|
35023 | end: {
|
35024 | line: 211,
|
35025 | column: 3
|
35026 | }
|
35027 | },
|
35028 | loc: {
|
35029 | start: {
|
35030 | line: 211,
|
35031 | column: 22
|
35032 | },
|
35033 | end: {
|
35034 | line: 216,
|
35035 | column: 3
|
35036 | }
|
35037 | },
|
35038 | line: 211
|
35039 | },
|
35040 | '21': {
|
35041 | name: '(anonymous_21)',
|
35042 | decl: {
|
35043 | start: {
|
35044 | line: 212,
|
35045 | column: 24
|
35046 | },
|
35047 | end: {
|
35048 | line: 212,
|
35049 | column: 25
|
35050 | }
|
35051 | },
|
35052 | loc: {
|
35053 | start: {
|
35054 | line: 212,
|
35055 | column: 30
|
35056 | },
|
35057 | end: {
|
35058 | line: 215,
|
35059 | column: 5
|
35060 | }
|
35061 | },
|
35062 | line: 212
|
35063 | },
|
35064 | '22': {
|
35065 | name: '(anonymous_22)',
|
35066 | decl: {
|
35067 | start: {
|
35068 | line: 221,
|
35069 | column: 2
|
35070 | },
|
35071 | end: {
|
35072 | line: 221,
|
35073 | column: 3
|
35074 | }
|
35075 | },
|
35076 | loc: {
|
35077 | start: {
|
35078 | line: 221,
|
35079 | column: 22
|
35080 | },
|
35081 | end: {
|
35082 | line: 227,
|
35083 | column: 3
|
35084 | }
|
35085 | },
|
35086 | line: 221
|
35087 | },
|
35088 | '23': {
|
35089 | name: '(anonymous_23)',
|
35090 | decl: {
|
35091 | start: {
|
35092 | line: 229,
|
35093 | column: 2
|
35094 | },
|
35095 | end: {
|
35096 | line: 229,
|
35097 | column: 3
|
35098 | }
|
35099 | },
|
35100 | loc: {
|
35101 | start: {
|
35102 | line: 229,
|
35103 | column: 31
|
35104 | },
|
35105 | end: {
|
35106 | line: 246,
|
35107 | column: 3
|
35108 | }
|
35109 | },
|
35110 | line: 229
|
35111 | },
|
35112 | '24': {
|
35113 | name: '(anonymous_24)',
|
35114 | decl: {
|
35115 | start: {
|
35116 | line: 243,
|
35117 | column: 31
|
35118 | },
|
35119 | end: {
|
35120 | line: 243,
|
35121 | column: 32
|
35122 | }
|
35123 | },
|
35124 | loc: {
|
35125 | start: {
|
35126 | line: 243,
|
35127 | column: 38
|
35128 | },
|
35129 | end: {
|
35130 | line: 243,
|
35131 | column: 40
|
35132 | }
|
35133 | },
|
35134 | line: 243
|
35135 | },
|
35136 | '25': {
|
35137 | name: '(anonymous_25)',
|
35138 | decl: {
|
35139 | start: {
|
35140 | line: 251,
|
35141 | column: 2
|
35142 | },
|
35143 | end: {
|
35144 | line: 251,
|
35145 | column: 3
|
35146 | }
|
35147 | },
|
35148 | loc: {
|
35149 | start: {
|
35150 | line: 251,
|
35151 | column: 18
|
35152 | },
|
35153 | end: {
|
35154 | line: 256,
|
35155 | column: 3
|
35156 | }
|
35157 | },
|
35158 | line: 251
|
35159 | },
|
35160 | '26': {
|
35161 | name: '(anonymous_26)',
|
35162 | decl: {
|
35163 | start: {
|
35164 | line: 262,
|
35165 | column: 2
|
35166 | },
|
35167 | end: {
|
35168 | line: 262,
|
35169 | column: 3
|
35170 | }
|
35171 | },
|
35172 | loc: {
|
35173 | start: {
|
35174 | line: 262,
|
35175 | column: 25
|
35176 | },
|
35177 | end: {
|
35178 | line: 266,
|
35179 | column: 3
|
35180 | }
|
35181 | },
|
35182 | line: 262
|
35183 | },
|
35184 | '27': {
|
35185 | name: '(anonymous_27)',
|
35186 | decl: {
|
35187 | start: {
|
35188 | line: 271,
|
35189 | column: 2
|
35190 | },
|
35191 | end: {
|
35192 | line: 271,
|
35193 | column: 3
|
35194 | }
|
35195 | },
|
35196 | loc: {
|
35197 | start: {
|
35198 | line: 271,
|
35199 | column: 23
|
35200 | },
|
35201 | end: {
|
35202 | line: 274,
|
35203 | column: 3
|
35204 | }
|
35205 | },
|
35206 | line: 271
|
35207 | }
|
35208 | },
|
35209 | branchMap: {
|
35210 | '0': {
|
35211 | loc: {
|
35212 | start: {
|
35213 | line: 33,
|
35214 | column: 4
|
35215 | },
|
35216 | end: {
|
35217 | line: 35,
|
35218 | column: 5
|
35219 | }
|
35220 | },
|
35221 | type: 'if',
|
35222 | locations: [{
|
35223 | start: {
|
35224 | line: 33,
|
35225 | column: 4
|
35226 | },
|
35227 | end: {
|
35228 | line: 35,
|
35229 | column: 5
|
35230 | }
|
35231 | }, {
|
35232 | start: {
|
35233 | line: 33,
|
35234 | column: 4
|
35235 | },
|
35236 | end: {
|
35237 | line: 35,
|
35238 | column: 5
|
35239 | }
|
35240 | }],
|
35241 | line: 33
|
35242 | },
|
35243 | '1': {
|
35244 | loc: {
|
35245 | start: {
|
35246 | line: 33,
|
35247 | column: 8
|
35248 | },
|
35249 | end: {
|
35250 | line: 33,
|
35251 | column: 54
|
35252 | }
|
35253 | },
|
35254 | type: 'binary-expr',
|
35255 | locations: [{
|
35256 | start: {
|
35257 | line: 33,
|
35258 | column: 8
|
35259 | },
|
35260 | end: {
|
35261 | line: 33,
|
35262 | column: 29
|
35263 | }
|
35264 | }, {
|
35265 | start: {
|
35266 | line: 33,
|
35267 | column: 33
|
35268 | },
|
35269 | end: {
|
35270 | line: 33,
|
35271 | column: 54
|
35272 | }
|
35273 | }],
|
35274 | line: 33
|
35275 | },
|
35276 | '2': {
|
35277 | loc: {
|
35278 | start: {
|
35279 | line: 40,
|
35280 | column: 4
|
35281 | },
|
35282 | end: {
|
35283 | line: 42,
|
35284 | column: 5
|
35285 | }
|
35286 | },
|
35287 | type: 'if',
|
35288 | locations: [{
|
35289 | start: {
|
35290 | line: 40,
|
35291 | column: 4
|
35292 | },
|
35293 | end: {
|
35294 | line: 42,
|
35295 | column: 5
|
35296 | }
|
35297 | }, {
|
35298 | start: {
|
35299 | line: 40,
|
35300 | column: 4
|
35301 | },
|
35302 | end: {
|
35303 | line: 42,
|
35304 | column: 5
|
35305 | }
|
35306 | }],
|
35307 | line: 40
|
35308 | },
|
35309 | '3': {
|
35310 | loc: {
|
35311 | start: {
|
35312 | line: 51,
|
35313 | column: 4
|
35314 | },
|
35315 | end: {
|
35316 | line: 56,
|
35317 | column: 5
|
35318 | }
|
35319 | },
|
35320 | type: 'if',
|
35321 | locations: [{
|
35322 | start: {
|
35323 | line: 51,
|
35324 | column: 4
|
35325 | },
|
35326 | end: {
|
35327 | line: 56,
|
35328 | column: 5
|
35329 | }
|
35330 | }, {
|
35331 | start: {
|
35332 | line: 51,
|
35333 | column: 4
|
35334 | },
|
35335 | end: {
|
35336 | line: 56,
|
35337 | column: 5
|
35338 | }
|
35339 | }],
|
35340 | line: 51
|
35341 | },
|
35342 | '4': {
|
35343 | loc: {
|
35344 | start: {
|
35345 | line: 63,
|
35346 | column: 4
|
35347 | },
|
35348 | end: {
|
35349 | line: 68,
|
35350 | column: 5
|
35351 | }
|
35352 | },
|
35353 | type: 'if',
|
35354 | locations: [{
|
35355 | start: {
|
35356 | line: 63,
|
35357 | column: 4
|
35358 | },
|
35359 | end: {
|
35360 | line: 68,
|
35361 | column: 5
|
35362 | }
|
35363 | }, {
|
35364 | start: {
|
35365 | line: 63,
|
35366 | column: 4
|
35367 | },
|
35368 | end: {
|
35369 | line: 68,
|
35370 | column: 5
|
35371 | }
|
35372 | }],
|
35373 | line: 63
|
35374 | },
|
35375 | '5': {
|
35376 | loc: {
|
35377 | start: {
|
35378 | line: 87,
|
35379 | column: 4
|
35380 | },
|
35381 | end: {
|
35382 | line: 95,
|
35383 | column: 5
|
35384 | }
|
35385 | },
|
35386 | type: 'if',
|
35387 | locations: [{
|
35388 | start: {
|
35389 | line: 87,
|
35390 | column: 4
|
35391 | },
|
35392 | end: {
|
35393 | line: 95,
|
35394 | column: 5
|
35395 | }
|
35396 | }, {
|
35397 | start: {
|
35398 | line: 87,
|
35399 | column: 4
|
35400 | },
|
35401 | end: {
|
35402 | line: 95,
|
35403 | column: 5
|
35404 | }
|
35405 | }],
|
35406 | line: 87
|
35407 | },
|
35408 | '6': {
|
35409 | loc: {
|
35410 | start: {
|
35411 | line: 140,
|
35412 | column: 4
|
35413 | },
|
35414 | end: {
|
35415 | line: 147,
|
35416 | column: 5
|
35417 | }
|
35418 | },
|
35419 | type: 'if',
|
35420 | locations: [{
|
35421 | start: {
|
35422 | line: 140,
|
35423 | column: 4
|
35424 | },
|
35425 | end: {
|
35426 | line: 147,
|
35427 | column: 5
|
35428 | }
|
35429 | }, {
|
35430 | start: {
|
35431 | line: 140,
|
35432 | column: 4
|
35433 | },
|
35434 | end: {
|
35435 | line: 147,
|
35436 | column: 5
|
35437 | }
|
35438 | }],
|
35439 | line: 140
|
35440 | },
|
35441 | '7': {
|
35442 | loc: {
|
35443 | start: {
|
35444 | line: 156,
|
35445 | column: 4
|
35446 | },
|
35447 | end: {
|
35448 | line: 166,
|
35449 | column: 5
|
35450 | }
|
35451 | },
|
35452 | type: 'if',
|
35453 | locations: [{
|
35454 | start: {
|
35455 | line: 156,
|
35456 | column: 4
|
35457 | },
|
35458 | end: {
|
35459 | line: 166,
|
35460 | column: 5
|
35461 | }
|
35462 | }, {
|
35463 | start: {
|
35464 | line: 156,
|
35465 | column: 4
|
35466 | },
|
35467 | end: {
|
35468 | line: 166,
|
35469 | column: 5
|
35470 | }
|
35471 | }],
|
35472 | line: 156
|
35473 | },
|
35474 | '8': {
|
35475 | loc: {
|
35476 | start: {
|
35477 | line: 156,
|
35478 | column: 8
|
35479 | },
|
35480 | end: {
|
35481 | line: 156,
|
35482 | column: 77
|
35483 | }
|
35484 | },
|
35485 | type: 'binary-expr',
|
35486 | locations: [{
|
35487 | start: {
|
35488 | line: 156,
|
35489 | column: 8
|
35490 | },
|
35491 | end: {
|
35492 | line: 156,
|
35493 | column: 21
|
35494 | }
|
35495 | }, {
|
35496 | start: {
|
35497 | line: 156,
|
35498 | column: 25
|
35499 | },
|
35500 | end: {
|
35501 | line: 156,
|
35502 | column: 48
|
35503 | }
|
35504 | }, {
|
35505 | start: {
|
35506 | line: 156,
|
35507 | column: 52
|
35508 | },
|
35509 | end: {
|
35510 | line: 156,
|
35511 | column: 77
|
35512 | }
|
35513 | }],
|
35514 | line: 156
|
35515 | },
|
35516 | '9': {
|
35517 | loc: {
|
35518 | start: {
|
35519 | line: 183,
|
35520 | column: 4
|
35521 | },
|
35522 | end: {
|
35523 | line: 188,
|
35524 | column: 5
|
35525 | }
|
35526 | },
|
35527 | type: 'if',
|
35528 | locations: [{
|
35529 | start: {
|
35530 | line: 183,
|
35531 | column: 4
|
35532 | },
|
35533 | end: {
|
35534 | line: 188,
|
35535 | column: 5
|
35536 | }
|
35537 | }, {
|
35538 | start: {
|
35539 | line: 183,
|
35540 | column: 4
|
35541 | },
|
35542 | end: {
|
35543 | line: 188,
|
35544 | column: 5
|
35545 | }
|
35546 | }],
|
35547 | line: 183
|
35548 | },
|
35549 | '10': {
|
35550 | loc: {
|
35551 | start: {
|
35552 | line: 197,
|
35553 | column: 4
|
35554 | },
|
35555 | end: {
|
35556 | line: 205,
|
35557 | column: 5
|
35558 | }
|
35559 | },
|
35560 | type: 'if',
|
35561 | locations: [{
|
35562 | start: {
|
35563 | line: 197,
|
35564 | column: 4
|
35565 | },
|
35566 | end: {
|
35567 | line: 205,
|
35568 | column: 5
|
35569 | }
|
35570 | }, {
|
35571 | start: {
|
35572 | line: 197,
|
35573 | column: 4
|
35574 | },
|
35575 | end: {
|
35576 | line: 205,
|
35577 | column: 5
|
35578 | }
|
35579 | }],
|
35580 | line: 197
|
35581 | },
|
35582 | '11': {
|
35583 | loc: {
|
35584 | start: {
|
35585 | line: 197,
|
35586 | column: 8
|
35587 | },
|
35588 | end: {
|
35589 | line: 197,
|
35590 | column: 58
|
35591 | }
|
35592 | },
|
35593 | type: 'binary-expr',
|
35594 | locations: [{
|
35595 | start: {
|
35596 | line: 197,
|
35597 | column: 8
|
35598 | },
|
35599 | end: {
|
35600 | line: 197,
|
35601 | column: 30
|
35602 | }
|
35603 | }, {
|
35604 | start: {
|
35605 | line: 197,
|
35606 | column: 34
|
35607 | },
|
35608 | end: {
|
35609 | line: 197,
|
35610 | column: 58
|
35611 | }
|
35612 | }],
|
35613 | line: 197
|
35614 | },
|
35615 | '12': {
|
35616 | loc: {
|
35617 | start: {
|
35618 | line: 222,
|
35619 | column: 4
|
35620 | },
|
35621 | end: {
|
35622 | line: 226,
|
35623 | column: 5
|
35624 | }
|
35625 | },
|
35626 | type: 'if',
|
35627 | locations: [{
|
35628 | start: {
|
35629 | line: 222,
|
35630 | column: 4
|
35631 | },
|
35632 | end: {
|
35633 | line: 226,
|
35634 | column: 5
|
35635 | }
|
35636 | }, {
|
35637 | start: {
|
35638 | line: 222,
|
35639 | column: 4
|
35640 | },
|
35641 | end: {
|
35642 | line: 226,
|
35643 | column: 5
|
35644 | }
|
35645 | }],
|
35646 | line: 222
|
35647 | },
|
35648 | '13': {
|
35649 | loc: {
|
35650 | start: {
|
35651 | line: 222,
|
35652 | column: 8
|
35653 | },
|
35654 | end: {
|
35655 | line: 222,
|
35656 | column: 58
|
35657 | }
|
35658 | },
|
35659 | type: 'binary-expr',
|
35660 | locations: [{
|
35661 | start: {
|
35662 | line: 222,
|
35663 | column: 8
|
35664 | },
|
35665 | end: {
|
35666 | line: 222,
|
35667 | column: 30
|
35668 | }
|
35669 | }, {
|
35670 | start: {
|
35671 | line: 222,
|
35672 | column: 34
|
35673 | },
|
35674 | end: {
|
35675 | line: 222,
|
35676 | column: 58
|
35677 | }
|
35678 | }],
|
35679 | line: 222
|
35680 | },
|
35681 | '14': {
|
35682 | loc: {
|
35683 | start: {
|
35684 | line: 239,
|
35685 | column: 4
|
35686 | },
|
35687 | end: {
|
35688 | line: 245,
|
35689 | column: 5
|
35690 | }
|
35691 | },
|
35692 | type: 'if',
|
35693 | locations: [{
|
35694 | start: {
|
35695 | line: 239,
|
35696 | column: 4
|
35697 | },
|
35698 | end: {
|
35699 | line: 245,
|
35700 | column: 5
|
35701 | }
|
35702 | }, {
|
35703 | start: {
|
35704 | line: 239,
|
35705 | column: 4
|
35706 | },
|
35707 | end: {
|
35708 | line: 245,
|
35709 | column: 5
|
35710 | }
|
35711 | }],
|
35712 | line: 239
|
35713 | },
|
35714 | '15': {
|
35715 | loc: {
|
35716 | start: {
|
35717 | line: 239,
|
35718 | column: 8
|
35719 | },
|
35720 | end: {
|
35721 | line: 239,
|
35722 | column: 91
|
35723 | }
|
35724 | },
|
35725 | type: 'binary-expr',
|
35726 | locations: [{
|
35727 | start: {
|
35728 | line: 239,
|
35729 | column: 8
|
35730 | },
|
35731 | end: {
|
35732 | line: 239,
|
35733 | column: 23
|
35734 | }
|
35735 | }, {
|
35736 | start: {
|
35737 | line: 239,
|
35738 | column: 28
|
35739 | },
|
35740 | end: {
|
35741 | line: 239,
|
35742 | column: 53
|
35743 | }
|
35744 | }, {
|
35745 | start: {
|
35746 | line: 239,
|
35747 | column: 57
|
35748 | },
|
35749 | end: {
|
35750 | line: 239,
|
35751 | column: 90
|
35752 | }
|
35753 | }],
|
35754 | line: 239
|
35755 | },
|
35756 | '16': {
|
35757 | loc: {
|
35758 | start: {
|
35759 | line: 242,
|
35760 | column: 6
|
35761 | },
|
35762 | end: {
|
35763 | line: 244,
|
35764 | column: 7
|
35765 | }
|
35766 | },
|
35767 | type: 'if',
|
35768 | locations: [{
|
35769 | start: {
|
35770 | line: 242,
|
35771 | column: 6
|
35772 | },
|
35773 | end: {
|
35774 | line: 244,
|
35775 | column: 7
|
35776 | }
|
35777 | }, {
|
35778 | start: {
|
35779 | line: 242,
|
35780 | column: 6
|
35781 | },
|
35782 | end: {
|
35783 | line: 244,
|
35784 | column: 7
|
35785 | }
|
35786 | }],
|
35787 | line: 242
|
35788 | },
|
35789 | '17': {
|
35790 | loc: {
|
35791 | start: {
|
35792 | line: 242,
|
35793 | column: 10
|
35794 | },
|
35795 | end: {
|
35796 | line: 242,
|
35797 | column: 41
|
35798 | }
|
35799 | },
|
35800 | type: 'binary-expr',
|
35801 | locations: [{
|
35802 | start: {
|
35803 | line: 242,
|
35804 | column: 10
|
35805 | },
|
35806 | end: {
|
35807 | line: 242,
|
35808 | column: 21
|
35809 | }
|
35810 | }, {
|
35811 | start: {
|
35812 | line: 242,
|
35813 | column: 25
|
35814 | },
|
35815 | end: {
|
35816 | line: 242,
|
35817 | column: 41
|
35818 | }
|
35819 | }],
|
35820 | line: 242
|
35821 | },
|
35822 | '18': {
|
35823 | loc: {
|
35824 | start: {
|
35825 | line: 252,
|
35826 | column: 4
|
35827 | },
|
35828 | end: {
|
35829 | line: 254,
|
35830 | column: 5
|
35831 | }
|
35832 | },
|
35833 | type: 'if',
|
35834 | locations: [{
|
35835 | start: {
|
35836 | line: 252,
|
35837 | column: 4
|
35838 | },
|
35839 | end: {
|
35840 | line: 254,
|
35841 | column: 5
|
35842 | }
|
35843 | }, {
|
35844 | start: {
|
35845 | line: 252,
|
35846 | column: 4
|
35847 | },
|
35848 | end: {
|
35849 | line: 254,
|
35850 | column: 5
|
35851 | }
|
35852 | }],
|
35853 | line: 252
|
35854 | }
|
35855 | },
|
35856 | s: {
|
35857 | '0': 0,
|
35858 | '1': 0,
|
35859 | '2': 0,
|
35860 | '3': 0,
|
35861 | '4': 0,
|
35862 | '5': 0,
|
35863 | '6': 0,
|
35864 | '7': 0,
|
35865 | '8': 0,
|
35866 | '9': 0,
|
35867 | '10': 0,
|
35868 | '11': 0,
|
35869 | '12': 0,
|
35870 | '13': 0,
|
35871 | '14': 0,
|
35872 | '15': 0,
|
35873 | '16': 0,
|
35874 | '17': 0,
|
35875 | '18': 0,
|
35876 | '19': 0,
|
35877 | '20': 0,
|
35878 | '21': 0,
|
35879 | '22': 0,
|
35880 | '23': 0,
|
35881 | '24': 0,
|
35882 | '25': 0,
|
35883 | '26': 0,
|
35884 | '27': 0,
|
35885 | '28': 0,
|
35886 | '29': 0,
|
35887 | '30': 0,
|
35888 | '31': 0,
|
35889 | '32': 0,
|
35890 | '33': 0,
|
35891 | '34': 0,
|
35892 | '35': 0,
|
35893 | '36': 0,
|
35894 | '37': 0,
|
35895 | '38': 0,
|
35896 | '39': 0,
|
35897 | '40': 0,
|
35898 | '41': 0,
|
35899 | '42': 0,
|
35900 | '43': 0,
|
35901 | '44': 0,
|
35902 | '45': 0,
|
35903 | '46': 0,
|
35904 | '47': 0,
|
35905 | '48': 0,
|
35906 | '49': 0,
|
35907 | '50': 0,
|
35908 | '51': 0,
|
35909 | '52': 0,
|
35910 | '53': 0,
|
35911 | '54': 0,
|
35912 | '55': 0,
|
35913 | '56': 0,
|
35914 | '57': 0,
|
35915 | '58': 0,
|
35916 | '59': 0,
|
35917 | '60': 0,
|
35918 | '61': 0,
|
35919 | '62': 0,
|
35920 | '63': 0,
|
35921 | '64': 0,
|
35922 | '65': 0,
|
35923 | '66': 0,
|
35924 | '67': 0,
|
35925 | '68': 0,
|
35926 | '69': 0,
|
35927 | '70': 0,
|
35928 | '71': 0,
|
35929 | '72': 0,
|
35930 | '73': 0,
|
35931 | '74': 0,
|
35932 | '75': 0,
|
35933 | '76': 0,
|
35934 | '77': 0,
|
35935 | '78': 0,
|
35936 | '79': 0,
|
35937 | '80': 0,
|
35938 | '81': 0,
|
35939 | '82': 0,
|
35940 | '83': 0,
|
35941 | '84': 0,
|
35942 | '85': 0
|
35943 | },
|
35944 | f: {
|
35945 | '0': 0,
|
35946 | '1': 0,
|
35947 | '2': 0,
|
35948 | '3': 0,
|
35949 | '4': 0,
|
35950 | '5': 0,
|
35951 | '6': 0,
|
35952 | '7': 0,
|
35953 | '8': 0,
|
35954 | '9': 0,
|
35955 | '10': 0,
|
35956 | '11': 0,
|
35957 | '12': 0,
|
35958 | '13': 0,
|
35959 | '14': 0,
|
35960 | '15': 0,
|
35961 | '16': 0,
|
35962 | '17': 0,
|
35963 | '18': 0,
|
35964 | '19': 0,
|
35965 | '20': 0,
|
35966 | '21': 0,
|
35967 | '22': 0,
|
35968 | '23': 0,
|
35969 | '24': 0,
|
35970 | '25': 0,
|
35971 | '26': 0,
|
35972 | '27': 0
|
35973 | },
|
35974 | b: {
|
35975 | '0': [0, 0],
|
35976 | '1': [0, 0],
|
35977 | '2': [0, 0],
|
35978 | '3': [0, 0],
|
35979 | '4': [0, 0],
|
35980 | '5': [0, 0],
|
35981 | '6': [0, 0],
|
35982 | '7': [0, 0],
|
35983 | '8': [0, 0, 0],
|
35984 | '9': [0, 0],
|
35985 | '10': [0, 0],
|
35986 | '11': [0, 0],
|
35987 | '12': [0, 0],
|
35988 | '13': [0, 0],
|
35989 | '14': [0, 0],
|
35990 | '15': [0, 0, 0],
|
35991 | '16': [0, 0],
|
35992 | '17': [0, 0],
|
35993 | '18': [0, 0]
|
35994 | },
|
35995 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
35996 | },
|
35997 | coverage = global[gcv] || (global[gcv] = {});
|
35998 |
|
35999 | if (coverage[path] && coverage[path].hash === hash) {
|
36000 | return coverage[path];
|
36001 | }
|
36002 |
|
36003 | coverageData.hash = hash;
|
36004 | return coverage[path] = coverageData;
|
36005 | }();
|
36006 | var AdState$3 = (cov_q4mci4s8m.s[0]++, States.getState('AdState'));
|
36007 |
|
36008 | var Preroll =
|
36009 |
|
36010 | function (_AdState) {
|
36011 | _inheritsLoose(Preroll, _AdState);
|
36012 |
|
36013 | function Preroll() {
|
36014 | return _AdState.apply(this, arguments) || this;
|
36015 | }
|
36016 |
|
36017 | Preroll._getName = function _getName() {
|
36018 | cov_q4mci4s8m.f[0]++;
|
36019 | cov_q4mci4s8m.s[1]++;
|
36020 | return 'Preroll';
|
36021 | };
|
36022 |
|
36023 | var _proto = Preroll.prototype;
|
36024 |
|
36025 | _proto.init = function init(player, adsReady, shouldResumeToContent) {
|
36026 | cov_q4mci4s8m.f[1]++;
|
36027 | cov_q4mci4s8m.s[2]++;
|
36028 | this.waitingForAdBreak = true;
|
36029 | cov_q4mci4s8m.s[3]++;
|
36030 | player.addClass('vjs-ad-loading');
|
36031 | cov_q4mci4s8m.s[4]++;
|
36032 |
|
36033 | if ((cov_q4mci4s8m.b[1][0]++, shouldResumeToContent) || (cov_q4mci4s8m.b[1][1]++, player.ads.nopreroll_)) {
|
36034 | cov_q4mci4s8m.b[0][0]++;
|
36035 | cov_q4mci4s8m.s[5]++;
|
36036 | return this.resumeAfterNoPreroll(player);
|
36037 | } else {
|
36038 | cov_q4mci4s8m.b[0][1]++;
|
36039 | }
|
36040 |
|
36041 | var timeout = (cov_q4mci4s8m.s[6]++, player.ads.settings.timeout);
|
36042 | cov_q4mci4s8m.s[7]++;
|
36043 |
|
36044 | if (typeof player.ads.settings.prerollTimeout === 'number') {
|
36045 | cov_q4mci4s8m.b[2][0]++;
|
36046 | cov_q4mci4s8m.s[8]++;
|
36047 | timeout = player.ads.settings.prerollTimeout;
|
36048 | } else {
|
36049 | cov_q4mci4s8m.b[2][1]++;
|
36050 | }
|
36051 |
|
36052 | cov_q4mci4s8m.s[9]++;
|
36053 | this._timeout = player.setTimeout(function () {
|
36054 | cov_q4mci4s8m.f[2]++;
|
36055 | cov_q4mci4s8m.s[10]++;
|
36056 | player.trigger('adtimeout');
|
36057 | }, timeout);
|
36058 | cov_q4mci4s8m.s[11]++;
|
36059 |
|
36060 | if (adsReady) {
|
36061 | cov_q4mci4s8m.b[3][0]++;
|
36062 | cov_q4mci4s8m.s[12]++;
|
36063 | this.handleAdsReady();
|
36064 | } else {
|
36065 | cov_q4mci4s8m.b[3][1]++;
|
36066 | cov_q4mci4s8m.s[13]++;
|
36067 | this.adsReady = false;
|
36068 | }
|
36069 | };
|
36070 |
|
36071 | _proto.onAdsReady = function onAdsReady(player) {
|
36072 | cov_q4mci4s8m.f[3]++;
|
36073 | cov_q4mci4s8m.s[14]++;
|
36074 |
|
36075 | if (!player.ads.inAdBreak()) {
|
36076 | cov_q4mci4s8m.b[4][0]++;
|
36077 | cov_q4mci4s8m.s[15]++;
|
36078 | player.ads.debug('Received adsready event (Preroll)');
|
36079 | cov_q4mci4s8m.s[16]++;
|
36080 | this.handleAdsReady();
|
36081 | } else {
|
36082 | cov_q4mci4s8m.b[4][1]++;
|
36083 | cov_q4mci4s8m.s[17]++;
|
36084 | videojs$1.log.warn('Unexpected adsready event (Preroll)');
|
36085 | }
|
36086 | };
|
36087 |
|
36088 | _proto.handleAdsReady = function handleAdsReady() {
|
36089 | cov_q4mci4s8m.f[4]++;
|
36090 | cov_q4mci4s8m.s[18]++;
|
36091 | this.adsReady = true;
|
36092 | cov_q4mci4s8m.s[19]++;
|
36093 | this.readyForPreroll();
|
36094 | };
|
36095 |
|
36096 | _proto.afterLoadStart = function afterLoadStart(callback) {
|
36097 | cov_q4mci4s8m.f[5]++;
|
36098 | var player = (cov_q4mci4s8m.s[20]++, this.player);
|
36099 | cov_q4mci4s8m.s[21]++;
|
36100 |
|
36101 | if (player.ads._hasThereBeenALoadStartDuringPlayerLife) {
|
36102 | cov_q4mci4s8m.b[5][0]++;
|
36103 | cov_q4mci4s8m.s[22]++;
|
36104 | callback();
|
36105 | } else {
|
36106 | cov_q4mci4s8m.b[5][1]++;
|
36107 | cov_q4mci4s8m.s[23]++;
|
36108 | player.ads.debug('Waiting for loadstart...');
|
36109 | cov_q4mci4s8m.s[24]++;
|
36110 | player.one('loadstart', function () {
|
36111 | cov_q4mci4s8m.f[6]++;
|
36112 | cov_q4mci4s8m.s[25]++;
|
36113 | player.ads.debug('Received loadstart event');
|
36114 | cov_q4mci4s8m.s[26]++;
|
36115 | callback();
|
36116 | });
|
36117 | }
|
36118 | };
|
36119 |
|
36120 | _proto.noPreroll = function noPreroll() {
|
36121 | var _this = this;
|
36122 |
|
36123 | cov_q4mci4s8m.f[7]++;
|
36124 | cov_q4mci4s8m.s[27]++;
|
36125 | this.afterLoadStart(function () {
|
36126 | cov_q4mci4s8m.f[8]++;
|
36127 | cov_q4mci4s8m.s[28]++;
|
36128 |
|
36129 | _this.player.ads.debug('Skipping prerolls due to nopreroll event (Preroll)');
|
36130 |
|
36131 | cov_q4mci4s8m.s[29]++;
|
36132 |
|
36133 | _this.resumeAfterNoPreroll(_this.player);
|
36134 | });
|
36135 | };
|
36136 |
|
36137 | _proto.readyForPreroll = function readyForPreroll() {
|
36138 | cov_q4mci4s8m.f[9]++;
|
36139 | var player = (cov_q4mci4s8m.s[30]++, this.player);
|
36140 | cov_q4mci4s8m.s[31]++;
|
36141 | this.afterLoadStart(function () {
|
36142 | cov_q4mci4s8m.f[10]++;
|
36143 | cov_q4mci4s8m.s[32]++;
|
36144 | player.ads.debug('Triggered readyforpreroll event (Preroll)');
|
36145 | cov_q4mci4s8m.s[33]++;
|
36146 | player.trigger('readyforpreroll');
|
36147 | });
|
36148 | };
|
36149 |
|
36150 | _proto.onAdsCanceled = function onAdsCanceled(player) {
|
36151 | var _this2 = this;
|
36152 |
|
36153 | cov_q4mci4s8m.f[11]++;
|
36154 | cov_q4mci4s8m.s[34]++;
|
36155 | player.ads.debug('adscanceled (Preroll)');
|
36156 | cov_q4mci4s8m.s[35]++;
|
36157 | this.afterLoadStart(function () {
|
36158 | cov_q4mci4s8m.f[12]++;
|
36159 | cov_q4mci4s8m.s[36]++;
|
36160 |
|
36161 | _this2.resumeAfterNoPreroll(player);
|
36162 | });
|
36163 | };
|
36164 |
|
36165 | _proto.onAdsError = function onAdsError(player) {
|
36166 | var _this3 = this;
|
36167 |
|
36168 | cov_q4mci4s8m.f[13]++;
|
36169 | cov_q4mci4s8m.s[37]++;
|
36170 | videojs$1.log('adserror (Preroll)');
|
36171 | cov_q4mci4s8m.s[38]++;
|
36172 |
|
36173 | if (this.inAdBreak()) {
|
36174 | cov_q4mci4s8m.b[6][0]++;
|
36175 | cov_q4mci4s8m.s[39]++;
|
36176 | player.ads.endLinearAdMode();
|
36177 | } else {
|
36178 | cov_q4mci4s8m.b[6][1]++;
|
36179 | cov_q4mci4s8m.s[40]++;
|
36180 | this.afterLoadStart(function () {
|
36181 | cov_q4mci4s8m.f[14]++;
|
36182 | cov_q4mci4s8m.s[41]++;
|
36183 |
|
36184 | _this3.resumeAfterNoPreroll(player);
|
36185 | });
|
36186 | }
|
36187 | };
|
36188 |
|
36189 | _proto.startLinearAdMode = function startLinearAdMode() {
|
36190 | cov_q4mci4s8m.f[15]++;
|
36191 | var player = (cov_q4mci4s8m.s[42]++, this.player);
|
36192 | cov_q4mci4s8m.s[43]++;
|
36193 |
|
36194 | if ((cov_q4mci4s8m.b[8][0]++, this.adsReady) && (cov_q4mci4s8m.b[8][1]++, !player.ads.inAdBreak()) && (cov_q4mci4s8m.b[8][2]++, !this.isContentResuming())) {
|
36195 | cov_q4mci4s8m.b[7][0]++;
|
36196 | cov_q4mci4s8m.s[44]++;
|
36197 | this.clearTimeout(player);
|
36198 | cov_q4mci4s8m.s[45]++;
|
36199 | player.ads.adType = 'preroll';
|
36200 | cov_q4mci4s8m.s[46]++;
|
36201 | this.waitingForAdBreak = false;
|
36202 | cov_q4mci4s8m.s[47]++;
|
36203 | obj.start(player);
|
36204 | cov_q4mci4s8m.s[48]++;
|
36205 | player.ads._shouldBlockPlay = false;
|
36206 | } else {
|
36207 | cov_q4mci4s8m.b[7][1]++;
|
36208 | cov_q4mci4s8m.s[49]++;
|
36209 | videojs$1.log.warn('Unexpected startLinearAdMode invocation (Preroll)');
|
36210 | }
|
36211 | };
|
36212 |
|
36213 | _proto.onAdStarted = function onAdStarted(player) {
|
36214 | cov_q4mci4s8m.f[16]++;
|
36215 | cov_q4mci4s8m.s[50]++;
|
36216 | player.removeClass('vjs-ad-loading');
|
36217 | };
|
36218 |
|
36219 | _proto.endLinearAdMode = function endLinearAdMode() {
|
36220 | cov_q4mci4s8m.f[17]++;
|
36221 | var player = (cov_q4mci4s8m.s[51]++, this.player);
|
36222 | cov_q4mci4s8m.s[52]++;
|
36223 |
|
36224 | if (this.inAdBreak()) {
|
36225 | cov_q4mci4s8m.b[9][0]++;
|
36226 | cov_q4mci4s8m.s[53]++;
|
36227 | player.removeClass('vjs-ad-loading');
|
36228 | cov_q4mci4s8m.s[54]++;
|
36229 | player.addClass('vjs-ad-content-resuming');
|
36230 | cov_q4mci4s8m.s[55]++;
|
36231 | this.contentResuming = true;
|
36232 | cov_q4mci4s8m.s[56]++;
|
36233 | obj.end(player);
|
36234 | } else {
|
36235 | cov_q4mci4s8m.b[9][1]++;
|
36236 | }
|
36237 | };
|
36238 |
|
36239 | _proto.skipLinearAdMode = function skipLinearAdMode() {
|
36240 | var _this4 = this;
|
36241 |
|
36242 | cov_q4mci4s8m.f[18]++;
|
36243 | var player = (cov_q4mci4s8m.s[57]++, this.player);
|
36244 | cov_q4mci4s8m.s[58]++;
|
36245 |
|
36246 | if ((cov_q4mci4s8m.b[11][0]++, player.ads.inAdBreak()) || (cov_q4mci4s8m.b[11][1]++, this.isContentResuming())) {
|
36247 | cov_q4mci4s8m.b[10][0]++;
|
36248 | cov_q4mci4s8m.s[59]++;
|
36249 | videojs$1.log.warn('Unexpected skipLinearAdMode invocation');
|
36250 | } else {
|
36251 | cov_q4mci4s8m.b[10][1]++;
|
36252 | cov_q4mci4s8m.s[60]++;
|
36253 | this.afterLoadStart(function () {
|
36254 | cov_q4mci4s8m.f[19]++;
|
36255 | cov_q4mci4s8m.s[61]++;
|
36256 | player.trigger('adskip');
|
36257 | cov_q4mci4s8m.s[62]++;
|
36258 | player.ads.debug('skipLinearAdMode (Preroll)');
|
36259 | cov_q4mci4s8m.s[63]++;
|
36260 |
|
36261 | _this4.resumeAfterNoPreroll(player);
|
36262 | });
|
36263 | }
|
36264 | };
|
36265 |
|
36266 | _proto.onAdTimeout = function onAdTimeout(player) {
|
36267 | var _this5 = this;
|
36268 |
|
36269 | cov_q4mci4s8m.f[20]++;
|
36270 | cov_q4mci4s8m.s[64]++;
|
36271 | this.afterLoadStart(function () {
|
36272 | cov_q4mci4s8m.f[21]++;
|
36273 | cov_q4mci4s8m.s[65]++;
|
36274 | player.ads.debug('adtimeout (Preroll)');
|
36275 | cov_q4mci4s8m.s[66]++;
|
36276 |
|
36277 | _this5.resumeAfterNoPreroll(player);
|
36278 | });
|
36279 | };
|
36280 |
|
36281 | _proto.onNoPreroll = function onNoPreroll(player) {
|
36282 | cov_q4mci4s8m.f[22]++;
|
36283 | cov_q4mci4s8m.s[67]++;
|
36284 |
|
36285 | if ((cov_q4mci4s8m.b[13][0]++, player.ads.inAdBreak()) || (cov_q4mci4s8m.b[13][1]++, this.isContentResuming())) {
|
36286 | cov_q4mci4s8m.b[12][0]++;
|
36287 | cov_q4mci4s8m.s[68]++;
|
36288 | videojs$1.log.warn('Unexpected nopreroll event (Preroll)');
|
36289 | } else {
|
36290 | cov_q4mci4s8m.b[12][1]++;
|
36291 | cov_q4mci4s8m.s[69]++;
|
36292 | this.noPreroll();
|
36293 | }
|
36294 | };
|
36295 |
|
36296 | _proto.resumeAfterNoPreroll = function resumeAfterNoPreroll(player) {
|
36297 | cov_q4mci4s8m.f[23]++;
|
36298 | cov_q4mci4s8m.s[70]++;
|
36299 | this.contentResuming = true;
|
36300 | cov_q4mci4s8m.s[71]++;
|
36301 | player.ads._shouldBlockPlay = false;
|
36302 | cov_q4mci4s8m.s[72]++;
|
36303 | this.cleanupPartial(player);
|
36304 | cov_q4mci4s8m.s[73]++;
|
36305 |
|
36306 | if ((cov_q4mci4s8m.b[15][0]++, player.paused()) && ((cov_q4mci4s8m.b[15][1]++, player.ads._playRequested) || (cov_q4mci4s8m.b[15][2]++, player.ads._pausedOnContentupdate))) {
|
36307 | cov_q4mci4s8m.b[14][0]++;
|
36308 | var playPromise = (cov_q4mci4s8m.s[74]++, player.play());
|
36309 | cov_q4mci4s8m.s[75]++;
|
36310 |
|
36311 | if ((cov_q4mci4s8m.b[17][0]++, playPromise) && (cov_q4mci4s8m.b[17][1]++, playPromise.then)) {
|
36312 | cov_q4mci4s8m.b[16][0]++;
|
36313 | cov_q4mci4s8m.s[76]++;
|
36314 | playPromise.then(null, function (e) {
|
36315 | cov_q4mci4s8m.f[24]++;
|
36316 | });
|
36317 | } else {
|
36318 | cov_q4mci4s8m.b[16][1]++;
|
36319 | }
|
36320 | } else {
|
36321 | cov_q4mci4s8m.b[14][1]++;
|
36322 | }
|
36323 | };
|
36324 |
|
36325 | _proto.cleanup = function cleanup(player) {
|
36326 | cov_q4mci4s8m.f[25]++;
|
36327 | cov_q4mci4s8m.s[77]++;
|
36328 |
|
36329 | if (!player.ads._hasThereBeenALoadStartDuringPlayerLife) {
|
36330 | cov_q4mci4s8m.b[18][0]++;
|
36331 | cov_q4mci4s8m.s[78]++;
|
36332 | videojs$1.log.warn('Leaving Preroll state before loadstart event can cause issues.');
|
36333 | } else {
|
36334 | cov_q4mci4s8m.b[18][1]++;
|
36335 | }
|
36336 |
|
36337 | cov_q4mci4s8m.s[79]++;
|
36338 | this.cleanupPartial(player);
|
36339 | };
|
36340 |
|
36341 | _proto.cleanupPartial = function cleanupPartial(player) {
|
36342 | cov_q4mci4s8m.f[26]++;
|
36343 | cov_q4mci4s8m.s[80]++;
|
36344 | player.removeClass('vjs-ad-loading');
|
36345 | cov_q4mci4s8m.s[81]++;
|
36346 | player.removeClass('vjs-ad-content-resuming');
|
36347 | cov_q4mci4s8m.s[82]++;
|
36348 | this.clearTimeout(player);
|
36349 | };
|
36350 |
|
36351 | _proto.clearTimeout = function clearTimeout(player) {
|
36352 | cov_q4mci4s8m.f[27]++;
|
36353 | cov_q4mci4s8m.s[83]++;
|
36354 | player.clearTimeout(this._timeout);
|
36355 | cov_q4mci4s8m.s[84]++;
|
36356 | this._timeout = null;
|
36357 | };
|
36358 |
|
36359 | return Preroll;
|
36360 | }(AdState$3);
|
36361 |
|
36362 | cov_q4mci4s8m.s[85]++;
|
36363 | States.registerState('Preroll', Preroll);
|
36364 |
|
36365 | |
36366 |
|
36367 |
|
36368 |
|
36369 |
|
36370 | QUnit.module('Preroll', {
|
36371 | beforeEach: function beforeEach() {
|
36372 | var _this = this;
|
36373 |
|
36374 | this.events = [];
|
36375 | this.playTriggered = false;
|
36376 | this.classes = [];
|
36377 | this.player = {
|
36378 | ads: {
|
36379 | debug: function debug() {},
|
36380 | settings: {},
|
36381 | inAdBreak: function inAdBreak() {
|
36382 | return false;
|
36383 | },
|
36384 | isContentResuming: function isContentResuming() {
|
36385 | return false;
|
36386 | },
|
36387 | _shouldBlockPlay: true
|
36388 | },
|
36389 | setTimeout: function setTimeout() {},
|
36390 | clearTimeout: function clearTimeout() {},
|
36391 | addClass: function addClass(name) {
|
36392 | return _this.classes.push(name);
|
36393 | },
|
36394 | removeClass: function removeClass(name) {
|
36395 | return _this.classes.splice(_this.classes.indexOf(name), 1);
|
36396 | },
|
36397 | hasClass: function hasClass(name) {
|
36398 | return _this.classes.indexOf(name) !== -1;
|
36399 | },
|
36400 | one: function one() {},
|
36401 | trigger: function trigger(event) {
|
36402 | _this.events.push(event);
|
36403 | },
|
36404 | paused: function paused() {},
|
36405 | play: function play() {
|
36406 | _this.playTriggered = true;
|
36407 | }
|
36408 | };
|
36409 | this.preroll = new Preroll(this.player);
|
36410 |
|
36411 | this.preroll.transitionTo = function (newState, arg) {
|
36412 | _this.newState = newState.name;
|
36413 | _this.transitionArg = arg;
|
36414 | };
|
36415 |
|
36416 | this.preroll.afterLoadStart = function (callback) {
|
36417 | callback();
|
36418 | };
|
36419 |
|
36420 | this.adBreakStartStub = sinon.stub(obj, 'start');
|
36421 | this.adBreakEndStub = sinon.stub(obj, 'end');
|
36422 | },
|
36423 | afterEach: function afterEach() {
|
36424 | this.adBreakStartStub.restore();
|
36425 | this.adBreakEndStub.restore();
|
36426 | }
|
36427 | });
|
36428 | QUnit.test('plays a preroll (adsready true)', function (assert) {
|
36429 | this.preroll.init(this.player, true);
|
36430 | assert.equal(this.preroll.adsReady, true, 'adsready from init');
|
36431 | assert.equal(this.events[0], 'readyforpreroll', 'readyforpreroll from init');
|
36432 | assert.equal(this.preroll.inAdBreak(), false, 'not in ad break');
|
36433 | assert.equal(this.preroll.isWaitingForAdBreak(), true, 'waiting for ad break');
|
36434 | this.preroll.startLinearAdMode();
|
36435 |
|
36436 | this.player.ads._inLinearAdMode = true;
|
36437 | assert.equal(this.adBreakStartStub.callCount, 1, 'ad break started');
|
36438 | assert.equal(this.player.ads.adType, 'preroll', 'adType is preroll');
|
36439 | assert.equal(this.preroll.isContentResuming(), false, 'content not resuming');
|
36440 | assert.equal(this.preroll.inAdBreak(), true, 'in ad break');
|
36441 | assert.equal(this.preroll.isWaitingForAdBreak(), false, 'not waiting for ad break');
|
36442 | this.preroll.endLinearAdMode();
|
36443 | assert.equal(this.adBreakEndStub.callCount, 1, 'ad break ended');
|
36444 | assert.equal(this.preroll.isContentResuming(), true, 'content resuming');
|
36445 | assert.equal(this.preroll.isWaitingForAdBreak(), false, 'not waiting for ad break');
|
36446 | this.preroll.onPlaying();
|
36447 | assert.equal(this.newState, 'ContentPlayback', 'transitioned to ContentPlayback');
|
36448 | });
|
36449 | QUnit.test('plays a preroll (adsready false)', function (assert) {
|
36450 | this.preroll.init(this.player, false);
|
36451 | assert.equal(this.preroll.adsReady, false, 'not adsReady yet');
|
36452 | this.preroll.onAdsReady(this.player);
|
36453 | assert.equal(this.preroll.adsReady, true, 'adsready from init');
|
36454 | assert.equal(this.events[0], 'readyforpreroll', 'readyforpreroll from init');
|
36455 | assert.equal(this.preroll.inAdBreak(), false, 'not in ad break');
|
36456 | assert.equal(this.preroll.isWaitingForAdBreak(), true, 'waiting for ad break');
|
36457 | this.preroll.startLinearAdMode();
|
36458 |
|
36459 | this.player.ads._inLinearAdMode = true;
|
36460 | assert.equal(this.adBreakStartStub.callCount, 1, 'ad break started');
|
36461 | assert.equal(this.player.ads.adType, 'preroll', 'adType is preroll');
|
36462 | assert.equal(this.preroll.isContentResuming(), false, 'content not resuming');
|
36463 | assert.equal(this.preroll.inAdBreak(), true, 'in ad break');
|
36464 | assert.equal(this.preroll.isWaitingForAdBreak(), false, 'not waiting for ad break');
|
36465 | this.preroll.endLinearAdMode();
|
36466 | assert.equal(this.adBreakEndStub.callCount, 1, 'ad break ended');
|
36467 | assert.equal(this.preroll.isContentResuming(), true, 'content resuming');
|
36468 | assert.equal(this.preroll.isWaitingForAdBreak(), false, 'not waiting for ad break');
|
36469 | this.preroll.onPlaying();
|
36470 | assert.equal(this.newState, 'ContentPlayback', 'transitioned to ContentPlayback');
|
36471 | });
|
36472 | QUnit.test('can handle nopreroll event', function (assert) {
|
36473 | this.preroll.init(this.player, false, false);
|
36474 | this.preroll.onNoPreroll(this.player);
|
36475 | assert.equal(this.preroll.isContentResuming(), true);
|
36476 | this.preroll.onPlaying(this.player);
|
36477 | assert.equal(this.newState, 'ContentPlayback', 'transitioned to ContentPlayback');
|
36478 | });
|
36479 | QUnit.test('can handle adscanceled', function (assert) {
|
36480 | this.preroll.init(this.player, false, false);
|
36481 | this.preroll.onAdsCanceled(this.player);
|
36482 | assert.equal(this.preroll.isContentResuming(), true);
|
36483 | assert.notOk(this.player.hasClass('vjs-ad-loading'));
|
36484 | assert.notOk(this.player.hasClass('vjs-ad-content-resuming'));
|
36485 | assert.notOk(this.preroll._timeout);
|
36486 | this.preroll.onPlaying(this.player);
|
36487 | assert.equal(this.newState, 'ContentPlayback', 'transitioned to ContentPlayback');
|
36488 | });
|
36489 | QUnit.test('can handle adserror', function (assert) {
|
36490 | this.preroll.init(this.player, false, false);
|
36491 | this.preroll.onAdsError(this.player);
|
36492 | assert.equal(this.preroll.isContentResuming(), true);
|
36493 | assert.notOk(this.player.hasClass('vjs-ad-loading'));
|
36494 | assert.notOk(this.player.hasClass('vjs-ad-content-resuming'));
|
36495 | assert.notOk(this.preroll._timeout);
|
36496 | this.preroll.onPlaying(this.player);
|
36497 | assert.equal(this.newState, 'ContentPlayback', 'transitioned to ContentPlayback');
|
36498 | });
|
36499 | QUnit.test('can skip linear ad mode', function (assert) {
|
36500 | this.preroll.init(this.player, false, false);
|
36501 | this.preroll.skipLinearAdMode();
|
36502 | assert.equal(this.preroll.isContentResuming(), true);
|
36503 | this.preroll.onPlaying(this.player);
|
36504 | assert.equal(this.newState, 'ContentPlayback', 'transitioned to ContentPlayback');
|
36505 | });
|
36506 | QUnit.test('can handle adtimeout', function (assert) {
|
36507 | this.preroll.init(this.player, false, false);
|
36508 | this.preroll.onAdTimeout(this.player);
|
36509 | assert.equal(this.preroll.isContentResuming(), true);
|
36510 | assert.notOk(this.player.hasClass('vjs-ad-loading'));
|
36511 | assert.notOk(this.player.hasClass('vjs-ad-content-resuming'));
|
36512 | assert.notOk(this.preroll._timeout);
|
36513 | this.preroll.onPlaying(this.player);
|
36514 | assert.equal(this.newState, 'ContentPlayback', 'transitioned to ContentPlayback');
|
36515 | });
|
36516 | QUnit.test('removes ad loading class on ads started', function (assert) {
|
36517 | this.preroll.init(this.player, false);
|
36518 | var removeClassSpy = sinon.spy(this.player, 'removeClass');
|
36519 | this.preroll.onAdStarted(this.player);
|
36520 | assert.ok(removeClassSpy.calledWith('vjs-ad-loading'), 'loading class removed');
|
36521 | });
|
36522 | QUnit.test('only plays after no ad in correct conditions', function (assert) {
|
36523 | this.preroll.init(this.player, false, false);
|
36524 | this.player.ads._playRequested = false;
|
36525 | this.player.ads._pausedOnContentupdate = false;
|
36526 |
|
36527 | this.player.paused = function () {
|
36528 | return false;
|
36529 | };
|
36530 |
|
36531 | this.preroll.resumeAfterNoPreroll(this.player);
|
36532 | assert.equal(this.playTriggered, false, 'should not call play when playing already');
|
36533 | this.player.ads._playRequested = true;
|
36534 | this.player.ads._pausedOnContentupdate = false;
|
36535 |
|
36536 | this.player.paused = function () {
|
36537 | return false;
|
36538 | };
|
36539 |
|
36540 | this.preroll.resumeAfterNoPreroll(this.player);
|
36541 | assert.equal(this.playTriggered, false, 'should not call play when playing already 2');
|
36542 | this.player.ads._playRequested = false;
|
36543 | this.player.ads._pausedOnContentupdate = true;
|
36544 |
|
36545 | this.player.paused = function () {
|
36546 | return false;
|
36547 | };
|
36548 |
|
36549 | this.preroll.resumeAfterNoPreroll(this.player);
|
36550 | assert.equal(this.playTriggered, false, 'should not call play when playing already 3');
|
36551 | this.player.ads._playRequested = false;
|
36552 | this.player.ads._pausedOnContentupdate = false;
|
36553 |
|
36554 | this.player.paused = function () {
|
36555 | return true;
|
36556 | };
|
36557 |
|
36558 | this.preroll.resumeAfterNoPreroll(this.player);
|
36559 | assert.equal(this.playTriggered, false, 'should not call play when playback has never started');
|
36560 | this.player.ads._playRequested = true;
|
36561 | this.player.ads._pausedOnContentupdate = false;
|
36562 |
|
36563 | this.player.paused = function () {
|
36564 | return true;
|
36565 | };
|
36566 |
|
36567 | this.preroll.resumeAfterNoPreroll(this.player);
|
36568 | assert.equal(this.playTriggered, true, 'should call play when playback had been started and the player is paused');
|
36569 | this.player.ads._playRequested = false;
|
36570 | this.player.ads._pausedOnContentupdate = true;
|
36571 |
|
36572 | this.player.paused = function () {
|
36573 | return true;
|
36574 | };
|
36575 |
|
36576 | this.preroll.resumeAfterNoPreroll(this.player);
|
36577 | assert.equal(this.playTriggered, true, 'should call play when playback had been started on the last source and the player is paused');
|
36578 | });
|
36579 | QUnit.test('remove ad loading class on cleanup', function (assert) {
|
36580 | this.preroll.init(this.player, false);
|
36581 | var removeClassSpy = sinon.spy(this.player, 'removeClass');
|
36582 | this.preroll.cleanup(this.player);
|
36583 | assert.ok(removeClassSpy.calledWith('vjs-ad-loading'), 'loading class removed');
|
36584 | });
|
36585 | QUnit.test('resets _shouldBlockPlay to false when ad break starts', function (assert) {
|
36586 | this.preroll.init(this.player, true);
|
36587 | this.preroll.startLinearAdMode();
|
36588 | assert.equal(this.player.ads._shouldBlockPlay, false);
|
36589 | });
|
36590 | QUnit.test('resets _shouldBlockPlay to false when no preroll', function (assert) {
|
36591 | this.preroll.init(this.player, true, false);
|
36592 | this.preroll.resumeAfterNoPreroll(this.player);
|
36593 | assert.equal(this.player.ads._shouldBlockPlay, false);
|
36594 | });
|
36595 |
|
36596 | var cov_1e2w44xl89 = function () {
|
36597 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/StitchedAdRoll.js',
|
36598 | hash = '8a4e47c848f7bb1500d9b1094264728f16569046',
|
36599 | Function = function () {}.constructor,
|
36600 | global = new Function('return this')(),
|
36601 | gcv = '__coverage__',
|
36602 | coverageData = {
|
36603 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/StitchedAdRoll.js',
|
36604 | statementMap: {
|
36605 | '0': {
|
36606 | start: {
|
36607 | line: 4,
|
36608 | column: 16
|
36609 | },
|
36610 | end: {
|
36611 | line: 4,
|
36612 | column: 42
|
36613 | }
|
36614 | },
|
36615 | '1': {
|
36616 | start: {
|
36617 | line: 12,
|
36618 | column: 4
|
36619 | },
|
36620 | end: {
|
36621 | line: 12,
|
36622 | column: 28
|
36623 | }
|
36624 | },
|
36625 | '2': {
|
36626 | start: {
|
36627 | line: 20,
|
36628 | column: 4
|
36629 | },
|
36630 | end: {
|
36631 | line: 20,
|
36632 | column: 35
|
36633 | }
|
36634 | },
|
36635 | '3': {
|
36636 | start: {
|
36637 | line: 21,
|
36638 | column: 4
|
36639 | },
|
36640 | end: {
|
36641 | line: 21,
|
36642 | column: 33
|
36643 | }
|
36644 | },
|
36645 | '4': {
|
36646 | start: {
|
36647 | line: 22,
|
36648 | column: 4
|
36649 | },
|
36650 | end: {
|
36651 | line: 22,
|
36652 | column: 40
|
36653 | }
|
36654 | },
|
36655 | '5': {
|
36656 | start: {
|
36657 | line: 23,
|
36658 | column: 4
|
36659 | },
|
36660 | end: {
|
36661 | line: 23,
|
36662 | column: 31
|
36663 | }
|
36664 | },
|
36665 | '6': {
|
36666 | start: {
|
36667 | line: 45,
|
36668 | column: 4
|
36669 | },
|
36670 | end: {
|
36671 | line: 45,
|
36672 | column: 27
|
36673 | }
|
36674 | },
|
36675 | '7': {
|
36676 | start: {
|
36677 | line: 46,
|
36678 | column: 4
|
36679 | },
|
36680 | end: {
|
36681 | line: 46,
|
36682 | column: 33
|
36683 | }
|
36684 | },
|
36685 | '8': {
|
36686 | start: {
|
36687 | line: 53,
|
36688 | column: 36
|
36689 | },
|
36690 | end: {
|
36691 | line: 53,
|
36692 | column: 78
|
36693 | }
|
36694 | },
|
36695 | '9': {
|
36696 | start: {
|
36697 | line: 55,
|
36698 | column: 4
|
36699 | },
|
36700 | end: {
|
36701 | line: 55,
|
36702 | column: 29
|
36703 | }
|
36704 | },
|
36705 | '10': {
|
36706 | start: {
|
36707 | line: 56,
|
36708 | column: 4
|
36709 | },
|
36710 | end: {
|
36711 | line: 56,
|
36712 | column: 47
|
36713 | }
|
36714 | },
|
36715 | '11': {
|
36716 | start: {
|
36717 | line: 60,
|
36718 | column: 0
|
36719 | },
|
36720 | end: {
|
36721 | line: 60,
|
36722 | column: 55
|
36723 | }
|
36724 | }
|
36725 | },
|
36726 | fnMap: {
|
36727 | '0': {
|
36728 | name: '(anonymous_0)',
|
36729 | decl: {
|
36730 | start: {
|
36731 | line: 11,
|
36732 | column: 2
|
36733 | },
|
36734 | end: {
|
36735 | line: 11,
|
36736 | column: 3
|
36737 | }
|
36738 | },
|
36739 | loc: {
|
36740 | start: {
|
36741 | line: 11,
|
36742 | column: 20
|
36743 | },
|
36744 | end: {
|
36745 | line: 13,
|
36746 | column: 3
|
36747 | }
|
36748 | },
|
36749 | line: 11
|
36750 | },
|
36751 | '1': {
|
36752 | name: '(anonymous_1)',
|
36753 | decl: {
|
36754 | start: {
|
36755 | line: 19,
|
36756 | column: 2
|
36757 | },
|
36758 | end: {
|
36759 | line: 19,
|
36760 | column: 3
|
36761 | }
|
36762 | },
|
36763 | loc: {
|
36764 | start: {
|
36765 | line: 19,
|
36766 | column: 9
|
36767 | },
|
36768 | end: {
|
36769 | line: 24,
|
36770 | column: 3
|
36771 | }
|
36772 | },
|
36773 | line: 19
|
36774 | },
|
36775 | '2': {
|
36776 | name: '(anonymous_2)',
|
36777 | decl: {
|
36778 | start: {
|
36779 | line: 30,
|
36780 | column: 2
|
36781 | },
|
36782 | end: {
|
36783 | line: 30,
|
36784 | column: 3
|
36785 | }
|
36786 | },
|
36787 | loc: {
|
36788 | start: {
|
36789 | line: 30,
|
36790 | column: 14
|
36791 | },
|
36792 | end: {
|
36793 | line: 30,
|
36794 | column: 16
|
36795 | }
|
36796 | },
|
36797 | line: 30
|
36798 | },
|
36799 | '3': {
|
36800 | name: '(anonymous_3)',
|
36801 | decl: {
|
36802 | start: {
|
36803 | line: 36,
|
36804 | column: 2
|
36805 | },
|
36806 | end: {
|
36807 | line: 36,
|
36808 | column: 3
|
36809 | }
|
36810 | },
|
36811 | loc: {
|
36812 | start: {
|
36813 | line: 36,
|
36814 | column: 21
|
36815 | },
|
36816 | end: {
|
36817 | line: 36,
|
36818 | column: 23
|
36819 | }
|
36820 | },
|
36821 | line: 36
|
36822 | },
|
36823 | '4': {
|
36824 | name: '(anonymous_4)',
|
36825 | decl: {
|
36826 | start: {
|
36827 | line: 44,
|
36828 | column: 2
|
36829 | },
|
36830 | end: {
|
36831 | line: 44,
|
36832 | column: 3
|
36833 | }
|
36834 | },
|
36835 | loc: {
|
36836 | start: {
|
36837 | line: 44,
|
36838 | column: 14
|
36839 | },
|
36840 | end: {
|
36841 | line: 47,
|
36842 | column: 3
|
36843 | }
|
36844 | },
|
36845 | line: 44
|
36846 | },
|
36847 | '5': {
|
36848 | name: '(anonymous_5)',
|
36849 | decl: {
|
36850 | start: {
|
36851 | line: 52,
|
36852 | column: 2
|
36853 | },
|
36854 | end: {
|
36855 | line: 52,
|
36856 | column: 3
|
36857 | }
|
36858 | },
|
36859 | loc: {
|
36860 | start: {
|
36861 | line: 52,
|
36862 | column: 20
|
36863 | },
|
36864 | end: {
|
36865 | line: 57,
|
36866 | column: 3
|
36867 | }
|
36868 | },
|
36869 | line: 52
|
36870 | }
|
36871 | },
|
36872 | branchMap: {},
|
36873 | s: {
|
36874 | '0': 0,
|
36875 | '1': 0,
|
36876 | '2': 0,
|
36877 | '3': 0,
|
36878 | '4': 0,
|
36879 | '5': 0,
|
36880 | '6': 0,
|
36881 | '7': 0,
|
36882 | '8': 0,
|
36883 | '9': 0,
|
36884 | '10': 0,
|
36885 | '11': 0
|
36886 | },
|
36887 | f: {
|
36888 | '0': 0,
|
36889 | '1': 0,
|
36890 | '2': 0,
|
36891 | '3': 0,
|
36892 | '4': 0,
|
36893 | '5': 0
|
36894 | },
|
36895 | b: {},
|
36896 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
36897 | },
|
36898 | coverage = global[gcv] || (global[gcv] = {});
|
36899 |
|
36900 | if (coverage[path] && coverage[path].hash === hash) {
|
36901 | return coverage[path];
|
36902 | }
|
36903 |
|
36904 | coverageData.hash = hash;
|
36905 | return coverage[path] = coverageData;
|
36906 | }();
|
36907 | var AdState$4 = (cov_1e2w44xl89.s[0]++, States.getState('AdState'));
|
36908 |
|
36909 | var StitchedAdRoll =
|
36910 |
|
36911 | function (_AdState) {
|
36912 | _inheritsLoose(StitchedAdRoll, _AdState);
|
36913 |
|
36914 | function StitchedAdRoll() {
|
36915 | return _AdState.apply(this, arguments) || this;
|
36916 | }
|
36917 |
|
36918 | StitchedAdRoll._getName = function _getName() {
|
36919 | cov_1e2w44xl89.f[0]++;
|
36920 | cov_1e2w44xl89.s[1]++;
|
36921 | return 'StitchedAdRoll';
|
36922 | };
|
36923 |
|
36924 | var _proto = StitchedAdRoll.prototype;
|
36925 |
|
36926 | _proto.init = function init() {
|
36927 | cov_1e2w44xl89.f[1]++;
|
36928 | cov_1e2w44xl89.s[2]++;
|
36929 | this.waitingForAdBreak = false;
|
36930 | cov_1e2w44xl89.s[3]++;
|
36931 | this.contentResuming = false;
|
36932 | cov_1e2w44xl89.s[4]++;
|
36933 | this.player.ads.adType = 'stitched';
|
36934 | cov_1e2w44xl89.s[5]++;
|
36935 | obj.start(this.player);
|
36936 | };
|
36937 |
|
36938 | _proto.onPlaying = function onPlaying() {
|
36939 | cov_1e2w44xl89.f[2]++;
|
36940 | };
|
36941 |
|
36942 | _proto.onContentResumed = function onContentResumed() {
|
36943 | cov_1e2w44xl89.f[3]++;
|
36944 | };
|
36945 |
|
36946 | _proto.onAdEnded = function onAdEnded() {
|
36947 | cov_1e2w44xl89.f[4]++;
|
36948 | cov_1e2w44xl89.s[6]++;
|
36949 | this.endLinearAdMode();
|
36950 | cov_1e2w44xl89.s[7]++;
|
36951 | this.player.trigger('ended');
|
36952 | };
|
36953 |
|
36954 | _proto.endLinearAdMode = function endLinearAdMode() {
|
36955 | cov_1e2w44xl89.f[5]++;
|
36956 | var StitchedContentPlayback = (cov_1e2w44xl89.s[8]++, States.getState('StitchedContentPlayback'));
|
36957 | cov_1e2w44xl89.s[9]++;
|
36958 | obj.end(this.player);
|
36959 | cov_1e2w44xl89.s[10]++;
|
36960 | this.transitionTo(StitchedContentPlayback);
|
36961 | };
|
36962 |
|
36963 | return StitchedAdRoll;
|
36964 | }(AdState$4);
|
36965 |
|
36966 | cov_1e2w44xl89.s[11]++;
|
36967 | States.registerState('StitchedAdRoll', StitchedAdRoll);
|
36968 |
|
36969 | |
36970 |
|
36971 |
|
36972 |
|
36973 |
|
36974 | QUnit.module('StitchedAdRoll', {
|
36975 | beforeEach: function beforeEach() {
|
36976 | this.player = {
|
36977 | addClass: function addClass() {},
|
36978 | removeClass: function removeClass() {},
|
36979 | trigger: sinon.spy(),
|
36980 | ads: {
|
36981 | _inLinearAdMode: true,
|
36982 | debug: function debug() {}
|
36983 | }
|
36984 | };
|
36985 | this.adroll = new StitchedAdRoll(this.player);
|
36986 | this.adBreakStartStub = sinon.stub(obj, 'start');
|
36987 | this.adBreakEndStub = sinon.stub(obj, 'end');
|
36988 | },
|
36989 | afterEach: function afterEach() {
|
36990 | this.adBreakStartStub.restore();
|
36991 | this.adBreakEndStub.restore();
|
36992 | }
|
36993 | });
|
36994 | QUnit.test('starts an ad break on init', function (assert) {
|
36995 | this.adroll.init();
|
36996 | assert.equal(this.player.ads.adType, 'stitched', 'ad type is stitched');
|
36997 | assert.equal(this.adBreakStartStub.callCount, 1, 'ad break started');
|
36998 | });
|
36999 | QUnit.test('ends an ad break on endLinearAdMode', function (assert) {
|
37000 | this.adroll.init();
|
37001 | this.adroll.endLinearAdMode();
|
37002 | assert.equal(this.adBreakEndStub.callCount, 1, 'ad break ended');
|
37003 | });
|
37004 | QUnit.test('adended during ad break leaves linear ad mode and re-triggers ended', function (assert) {
|
37005 | sinon.spy(this.adroll, 'endLinearAdMode');
|
37006 | this.adroll.init();
|
37007 | this.adroll.onAdEnded();
|
37008 | assert.ok(this.player.trigger.calledOnce, 'the player fired one event');
|
37009 | assert.ok(this.player.trigger.calledWith('ended'), 'the event it fired was ended');
|
37010 | assert.ok(this.adroll.endLinearAdMode.calledOnce, 'the ad roll called endLinearAdMode');
|
37011 | });
|
37012 |
|
37013 | var cov_1t7a7n1udl = function () {
|
37014 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/states/StitchedContentPlayback.js',
|
37015 | hash = '7eae4e96967f5b392b3f5275c6eab2e6d9042310',
|
37016 | Function = function () {}.constructor,
|
37017 | global = new Function('return this')(),
|
37018 | gcv = '__coverage__',
|
37019 | coverageData = {
|
37020 | path: '/Users/poneill/dev/videojs-contrib-ads/src/states/StitchedContentPlayback.js',
|
37021 | statementMap: {
|
37022 | '0': {
|
37023 | start: {
|
37024 | line: 3,
|
37025 | column: 21
|
37026 | },
|
37027 | end: {
|
37028 | line: 3,
|
37029 | column: 52
|
37030 | }
|
37031 | },
|
37032 | '1': {
|
37033 | start: {
|
37034 | line: 14,
|
37035 | column: 4
|
37036 | },
|
37037 | end: {
|
37038 | line: 14,
|
37039 | column: 37
|
37040 | }
|
37041 | },
|
37042 | '2': {
|
37043 | start: {
|
37044 | line: 24,
|
37045 | column: 4
|
37046 | },
|
37047 | end: {
|
37048 | line: 24,
|
37049 | column: 45
|
37050 | }
|
37051 | },
|
37052 | '3': {
|
37053 | start: {
|
37054 | line: 33,
|
37055 | column: 4
|
37056 | },
|
37057 | end: {
|
37058 | line: 33,
|
37059 | column: 92
|
37060 | }
|
37061 | },
|
37062 | '4': {
|
37063 | start: {
|
37064 | line: 40,
|
37065 | column: 27
|
37066 | },
|
37067 | end: {
|
37068 | line: 40,
|
37069 | column: 60
|
37070 | }
|
37071 | },
|
37072 | '5': {
|
37073 | start: {
|
37074 | line: 42,
|
37075 | column: 4
|
37076 | },
|
37077 | end: {
|
37078 | line: 42,
|
37079 | column: 38
|
37080 | }
|
37081 | },
|
37082 | '6': {
|
37083 | start: {
|
37084 | line: 46,
|
37085 | column: 0
|
37086 | },
|
37087 | end: {
|
37088 | line: 46,
|
37089 | column: 73
|
37090 | }
|
37091 | }
|
37092 | },
|
37093 | fnMap: {
|
37094 | '0': {
|
37095 | name: '(anonymous_0)',
|
37096 | decl: {
|
37097 | start: {
|
37098 | line: 13,
|
37099 | column: 2
|
37100 | },
|
37101 | end: {
|
37102 | line: 13,
|
37103 | column: 3
|
37104 | }
|
37105 | },
|
37106 | loc: {
|
37107 | start: {
|
37108 | line: 13,
|
37109 | column: 20
|
37110 | },
|
37111 | end: {
|
37112 | line: 15,
|
37113 | column: 3
|
37114 | }
|
37115 | },
|
37116 | line: 13
|
37117 | },
|
37118 | '1': {
|
37119 | name: '(anonymous_1)',
|
37120 | decl: {
|
37121 | start: {
|
37122 | line: 21,
|
37123 | column: 2
|
37124 | },
|
37125 | end: {
|
37126 | line: 21,
|
37127 | column: 3
|
37128 | }
|
37129 | },
|
37130 | loc: {
|
37131 | start: {
|
37132 | line: 21,
|
37133 | column: 9
|
37134 | },
|
37135 | end: {
|
37136 | line: 25,
|
37137 | column: 3
|
37138 | }
|
37139 | },
|
37140 | line: 21
|
37141 | },
|
37142 | '2': {
|
37143 | name: '(anonymous_2)',
|
37144 | decl: {
|
37145 | start: {
|
37146 | line: 32,
|
37147 | column: 2
|
37148 | },
|
37149 | end: {
|
37150 | line: 32,
|
37151 | column: 3
|
37152 | }
|
37153 | },
|
37154 | loc: {
|
37155 | start: {
|
37156 | line: 32,
|
37157 | column: 21
|
37158 | },
|
37159 | end: {
|
37160 | line: 34,
|
37161 | column: 3
|
37162 | }
|
37163 | },
|
37164 | line: 32
|
37165 | },
|
37166 | '3': {
|
37167 | name: '(anonymous_3)',
|
37168 | decl: {
|
37169 | start: {
|
37170 | line: 39,
|
37171 | column: 2
|
37172 | },
|
37173 | end: {
|
37174 | line: 39,
|
37175 | column: 3
|
37176 | }
|
37177 | },
|
37178 | loc: {
|
37179 | start: {
|
37180 | line: 39,
|
37181 | column: 22
|
37182 | },
|
37183 | end: {
|
37184 | line: 43,
|
37185 | column: 3
|
37186 | }
|
37187 | },
|
37188 | line: 39
|
37189 | }
|
37190 | },
|
37191 | branchMap: {},
|
37192 | s: {
|
37193 | '0': 0,
|
37194 | '1': 0,
|
37195 | '2': 0,
|
37196 | '3': 0,
|
37197 | '4': 0,
|
37198 | '5': 0,
|
37199 | '6': 0
|
37200 | },
|
37201 | f: {
|
37202 | '0': 0,
|
37203 | '1': 0,
|
37204 | '2': 0,
|
37205 | '3': 0
|
37206 | },
|
37207 | b: {},
|
37208 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
37209 | },
|
37210 | coverage = global[gcv] || (global[gcv] = {});
|
37211 |
|
37212 | if (coverage[path] && coverage[path].hash === hash) {
|
37213 | return coverage[path];
|
37214 | }
|
37215 |
|
37216 | coverageData.hash = hash;
|
37217 | return coverage[path] = coverageData;
|
37218 | }();
|
37219 | var ContentState$4 = (cov_1t7a7n1udl.s[0]++, States.getState('ContentState'));
|
37220 |
|
37221 | var StitchedContentPlayback =
|
37222 |
|
37223 | function (_ContentState) {
|
37224 | _inheritsLoose(StitchedContentPlayback, _ContentState);
|
37225 |
|
37226 | function StitchedContentPlayback() {
|
37227 | return _ContentState.apply(this, arguments) || this;
|
37228 | }
|
37229 |
|
37230 | StitchedContentPlayback._getName = function _getName() {
|
37231 | cov_1t7a7n1udl.f[0]++;
|
37232 | cov_1t7a7n1udl.s[1]++;
|
37233 | return 'StitchedContentPlayback';
|
37234 | };
|
37235 |
|
37236 | var _proto = StitchedContentPlayback.prototype;
|
37237 |
|
37238 | _proto.init = function init() {
|
37239 | cov_1t7a7n1udl.f[1]++;
|
37240 | cov_1t7a7n1udl.s[2]++;
|
37241 | this.player.ads._shouldBlockPlay = false;
|
37242 | };
|
37243 |
|
37244 | _proto.onContentChanged = function onContentChanged() {
|
37245 | cov_1t7a7n1udl.f[2]++;
|
37246 | cov_1t7a7n1udl.s[3]++;
|
37247 | this.player.ads.debug("Received contentchanged event (" + this.constructor._getName() + ")");
|
37248 | };
|
37249 |
|
37250 | _proto.startLinearAdMode = function startLinearAdMode() {
|
37251 | cov_1t7a7n1udl.f[3]++;
|
37252 | var StitchedAdRoll = (cov_1t7a7n1udl.s[4]++, States.getState('StitchedAdRoll'));
|
37253 | cov_1t7a7n1udl.s[5]++;
|
37254 | this.transitionTo(StitchedAdRoll);
|
37255 | };
|
37256 |
|
37257 | return StitchedContentPlayback;
|
37258 | }(ContentState$4);
|
37259 |
|
37260 | cov_1t7a7n1udl.s[6]++;
|
37261 | States.registerState('StitchedContentPlayback', StitchedContentPlayback);
|
37262 |
|
37263 | |
37264 |
|
37265 |
|
37266 |
|
37267 |
|
37268 | QUnit.module('StitchedContentPlayback', {
|
37269 | beforeEach: function beforeEach() {
|
37270 | var _this = this;
|
37271 |
|
37272 | this.events = [];
|
37273 | this.playTriggered = false;
|
37274 | this.player = {
|
37275 | paused: function paused() {
|
37276 | return false;
|
37277 | },
|
37278 | play: function play() {},
|
37279 | trigger: function trigger(event) {
|
37280 | _this.events.push(event);
|
37281 | },
|
37282 | ads: {
|
37283 | debug: function debug() {},
|
37284 | _contentHasEnded: false,
|
37285 | _shouldBlockPlay: true
|
37286 | }
|
37287 | };
|
37288 | this.stitchedContentPlayback = new StitchedContentPlayback(this.player);
|
37289 |
|
37290 | this.stitchedContentPlayback.transitionTo = function (newState) {
|
37291 | _this.newState = newState.name;
|
37292 | };
|
37293 | }
|
37294 | });
|
37295 | QUnit.test('transitions to StitchedAdRoll when startLinearAdMode is called', function (assert) {
|
37296 | this.stitchedContentPlayback.init();
|
37297 | this.stitchedContentPlayback.startLinearAdMode();
|
37298 | assert.equal(this.newState, 'StitchedAdRoll', 'transitioned to StitchedAdRoll');
|
37299 | });
|
37300 | QUnit.test('sets _shouldBlockPlay to false on init', function (assert) {
|
37301 | assert.equal(this.player.ads._shouldBlockPlay, true);
|
37302 | this.stitchedContentPlayback.init();
|
37303 | assert.equal(this.player.ads._shouldBlockPlay, false);
|
37304 | });
|
37305 |
|
37306 | var version = "6.7.0";
|
37307 |
|
37308 | var cov_22tpzq68vb = function () {
|
37309 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/ads.js',
|
37310 | hash = 'db3f23a915ba965cfd5350b7535fd6c60a77b9c3',
|
37311 | Function = function () {}.constructor,
|
37312 | global = new Function('return this')(),
|
37313 | gcv = '__coverage__',
|
37314 | coverageData = {
|
37315 | path: '/Users/poneill/dev/videojs-contrib-ads/src/ads.js',
|
37316 | statementMap: {
|
37317 | '0': {
|
37318 | start: {
|
37319 | line: 10,
|
37320 | column: 2
|
37321 | },
|
37322 | end: {
|
37323 | line: 231,
|
37324 | column: 4
|
37325 | }
|
37326 | },
|
37327 | '1': {
|
37328 | start: {
|
37329 | line: 55,
|
37330 | column: 6
|
37331 | },
|
37332 | end: {
|
37333 | line: 55,
|
37334 | column: 52
|
37335 | }
|
37336 | },
|
37337 | '2': {
|
37338 | start: {
|
37339 | line: 56,
|
37340 | column: 6
|
37341 | },
|
37342 | end: {
|
37343 | line: 56,
|
37344 | column: 40
|
37345 | }
|
37346 | },
|
37347 | '3': {
|
37348 | start: {
|
37349 | line: 57,
|
37350 | column: 6
|
37351 | },
|
37352 | end: {
|
37353 | line: 57,
|
37354 | column: 42
|
37355 | }
|
37356 | },
|
37357 | '4': {
|
37358 | start: {
|
37359 | line: 58,
|
37360 | column: 6
|
37361 | },
|
37362 | end: {
|
37363 | line: 58,
|
37364 | column: 33
|
37365 | }
|
37366 | },
|
37367 | '5': {
|
37368 | start: {
|
37369 | line: 59,
|
37370 | column: 6
|
37371 | },
|
37372 | end: {
|
37373 | line: 59,
|
37374 | column: 31
|
37375 | }
|
37376 | },
|
37377 | '6': {
|
37378 | start: {
|
37379 | line: 60,
|
37380 | column: 6
|
37381 | },
|
37382 | end: {
|
37383 | line: 60,
|
37384 | column: 50
|
37385 | }
|
37386 | },
|
37387 | '7': {
|
37388 | start: {
|
37389 | line: 61,
|
37390 | column: 6
|
37391 | },
|
37392 | end: {
|
37393 | line: 61,
|
37394 | column: 54
|
37395 | }
|
37396 | },
|
37397 | '8': {
|
37398 | start: {
|
37399 | line: 62,
|
37400 | column: 6
|
37401 | },
|
37402 | end: {
|
37403 | line: 62,
|
37404 | column: 40
|
37405 | }
|
37406 | },
|
37407 | '9': {
|
37408 | start: {
|
37409 | line: 63,
|
37410 | column: 6
|
37411 | },
|
37412 | end: {
|
37413 | line: 63,
|
37414 | column: 42
|
37415 | }
|
37416 | },
|
37417 | '10': {
|
37418 | start: {
|
37419 | line: 64,
|
37420 | column: 6
|
37421 | },
|
37422 | end: {
|
37423 | line: 64,
|
37424 | column: 38
|
37425 | }
|
37426 | },
|
37427 | '11': {
|
37428 | start: {
|
37429 | line: 65,
|
37430 | column: 6
|
37431 | },
|
37432 | end: {
|
37433 | line: 65,
|
37434 | column: 36
|
37435 | }
|
37436 | },
|
37437 | '12': {
|
37438 | start: {
|
37439 | line: 66,
|
37440 | column: 6
|
37441 | },
|
37442 | end: {
|
37443 | line: 66,
|
37444 | column: 37
|
37445 | }
|
37446 | },
|
37447 | '13': {
|
37448 | start: {
|
37449 | line: 67,
|
37450 | column: 6
|
37451 | },
|
37452 | end: {
|
37453 | line: 67,
|
37454 | column: 40
|
37455 | }
|
37456 | },
|
37457 | '14': {
|
37458 | start: {
|
37459 | line: 73,
|
37460 | column: 6
|
37461 | },
|
37462 | end: {
|
37463 | line: 73,
|
37464 | column: 44
|
37465 | }
|
37466 | },
|
37467 | '15': {
|
37468 | start: {
|
37469 | line: 78,
|
37470 | column: 6
|
37471 | },
|
37472 | end: {
|
37473 | line: 78,
|
37474 | column: 42
|
37475 | }
|
37476 | },
|
37477 | '16': {
|
37478 | start: {
|
37479 | line: 86,
|
37480 | column: 6
|
37481 | },
|
37482 | end: {
|
37483 | line: 86,
|
37484 | column: 43
|
37485 | }
|
37486 | },
|
37487 | '17': {
|
37488 | start: {
|
37489 | line: 94,
|
37490 | column: 6
|
37491 | },
|
37492 | end: {
|
37493 | line: 101,
|
37494 | column: 7
|
37495 | }
|
37496 | },
|
37497 | '18': {
|
37498 | start: {
|
37499 | line: 95,
|
37500 | column: 8
|
37501 | },
|
37502 | end: {
|
37503 | line: 96,
|
37504 | column: 79
|
37505 | }
|
37506 | },
|
37507 | '19': {
|
37508 | start: {
|
37509 | line: 100,
|
37510 | column: 8
|
37511 | },
|
37512 | end: {
|
37513 | line: 100,
|
37514 | column: 42
|
37515 | }
|
37516 | },
|
37517 | '20': {
|
37518 | start: {
|
37519 | line: 103,
|
37520 | column: 6
|
37521 | },
|
37522 | end: {
|
37523 | line: 103,
|
37524 | column: 39
|
37525 | }
|
37526 | },
|
37527 | '21': {
|
37528 | start: {
|
37529 | line: 111,
|
37530 | column: 6
|
37531 | },
|
37532 | end: {
|
37533 | line: 113,
|
37534 | column: 7
|
37535 | }
|
37536 | },
|
37537 | '22': {
|
37538 | start: {
|
37539 | line: 112,
|
37540 | column: 8
|
37541 | },
|
37542 | end: {
|
37543 | line: 112,
|
37544 | column: 21
|
37545 | }
|
37546 | },
|
37547 | '23': {
|
37548 | start: {
|
37549 | line: 115,
|
37550 | column: 6
|
37551 | },
|
37552 | end: {
|
37553 | line: 117,
|
37554 | column: 7
|
37555 | }
|
37556 | },
|
37557 | '24': {
|
37558 | start: {
|
37559 | line: 116,
|
37560 | column: 8
|
37561 | },
|
37562 | end: {
|
37563 | line: 116,
|
37564 | column: 91
|
37565 | }
|
37566 | },
|
37567 | '25': {
|
37568 | start: {
|
37569 | line: 119,
|
37570 | column: 25
|
37571 | },
|
37572 | end: {
|
37573 | line: 119,
|
37574 | column: 65
|
37575 | }
|
37576 | },
|
37577 | '26': {
|
37578 | start: {
|
37579 | line: 120,
|
37580 | column: 32
|
37581 | },
|
37582 | end: {
|
37583 | line: 120,
|
37584 | column: 80
|
37585 | }
|
37586 | },
|
37587 | '27': {
|
37588 | start: {
|
37589 | line: 122,
|
37590 | column: 6
|
37591 | },
|
37592 | end: {
|
37593 | line: 122,
|
37594 | column: 45
|
37595 | }
|
37596 | },
|
37597 | '28': {
|
37598 | start: {
|
37599 | line: 129,
|
37600 | column: 6
|
37601 | },
|
37602 | end: {
|
37603 | line: 135,
|
37604 | column: 7
|
37605 | }
|
37606 | },
|
37607 | '29': {
|
37608 | start: {
|
37609 | line: 130,
|
37610 | column: 8
|
37611 | },
|
37612 | end: {
|
37613 | line: 130,
|
37614 | column: 53
|
37615 | }
|
37616 | },
|
37617 | '30': {
|
37618 | start: {
|
37619 | line: 131,
|
37620 | column: 13
|
37621 | },
|
37622 | end: {
|
37623 | line: 135,
|
37624 | column: 7
|
37625 | }
|
37626 | },
|
37627 | '31': {
|
37628 | start: {
|
37629 | line: 132,
|
37630 | column: 8
|
37631 | },
|
37632 | end: {
|
37633 | line: 132,
|
37634 | column: 20
|
37635 | }
|
37636 | },
|
37637 | '32': {
|
37638 | start: {
|
37639 | line: 133,
|
37640 | column: 13
|
37641 | },
|
37642 | end: {
|
37643 | line: 135,
|
37644 | column: 7
|
37645 | }
|
37646 | },
|
37647 | '33': {
|
37648 | start: {
|
37649 | line: 134,
|
37650 | column: 8
|
37651 | },
|
37652 | end: {
|
37653 | line: 134,
|
37654 | column: 20
|
37655 | }
|
37656 | },
|
37657 | '34': {
|
37658 | start: {
|
37659 | line: 136,
|
37660 | column: 6
|
37661 | },
|
37662 | end: {
|
37663 | line: 136,
|
37664 | column: 19
|
37665 | }
|
37666 | },
|
37667 | '35': {
|
37668 | start: {
|
37669 | line: 143,
|
37670 | column: 6
|
37671 | },
|
37672 | end: {
|
37673 | line: 151,
|
37674 | column: 7
|
37675 | }
|
37676 | },
|
37677 | '36': {
|
37678 | start: {
|
37679 | line: 144,
|
37680 | column: 8
|
37681 | },
|
37682 | end: {
|
37683 | line: 144,
|
37684 | column: 82
|
37685 | }
|
37686 | },
|
37687 | '37': {
|
37688 | start: {
|
37689 | line: 145,
|
37690 | column: 13
|
37691 | },
|
37692 | end: {
|
37693 | line: 151,
|
37694 | column: 7
|
37695 | }
|
37696 | },
|
37697 | '38': {
|
37698 | start: {
|
37699 | line: 146,
|
37700 | column: 8
|
37701 | },
|
37702 | end: {
|
37703 | line: 146,
|
37704 | column: 21
|
37705 | }
|
37706 | },
|
37707 | '39': {
|
37708 | start: {
|
37709 | line: 148,
|
37710 | column: 8
|
37711 | },
|
37712 | end: {
|
37713 | line: 150,
|
37714 | column: 50
|
37715 | }
|
37716 | },
|
37717 | '40': {
|
37718 | start: {
|
37719 | line: 157,
|
37720 | column: 6
|
37721 | },
|
37722 | end: {
|
37723 | line: 157,
|
37724 | column: 80
|
37725 | }
|
37726 | },
|
37727 | '41': {
|
37728 | start: {
|
37729 | line: 181,
|
37730 | column: 6
|
37731 | },
|
37732 | end: {
|
37733 | line: 181,
|
37734 | column: 37
|
37735 | }
|
37736 | },
|
37737 | '42': {
|
37738 | start: {
|
37739 | line: 186,
|
37740 | column: 6
|
37741 | },
|
37742 | end: {
|
37743 | line: 186,
|
37744 | column: 47
|
37745 | }
|
37746 | },
|
37747 | '43': {
|
37748 | start: {
|
37749 | line: 191,
|
37750 | column: 6
|
37751 | },
|
37752 | end: {
|
37753 | line: 191,
|
37754 | column: 45
|
37755 | }
|
37756 | },
|
37757 | '44': {
|
37758 | start: {
|
37759 | line: 196,
|
37760 | column: 6
|
37761 | },
|
37762 | end: {
|
37763 | line: 196,
|
37764 | column: 37
|
37765 | }
|
37766 | },
|
37767 | '45': {
|
37768 | start: {
|
37769 | line: 202,
|
37770 | column: 6
|
37771 | },
|
37772 | end: {
|
37773 | line: 202,
|
37774 | column: 37
|
37775 | }
|
37776 | },
|
37777 | '46': {
|
37778 | start: {
|
37779 | line: 214,
|
37780 | column: 19
|
37781 | },
|
37782 | end: {
|
37783 | line: 214,
|
37784 | column: 40
|
37785 | }
|
37786 | },
|
37787 | '47': {
|
37788 | start: {
|
37789 | line: 216,
|
37790 | column: 6
|
37791 | },
|
37792 | end: {
|
37793 | line: 218,
|
37794 | column: 7
|
37795 | }
|
37796 | },
|
37797 | '48': {
|
37798 | start: {
|
37799 | line: 217,
|
37800 | column: 8
|
37801 | },
|
37802 | end: {
|
37803 | line: 217,
|
37804 | column: 39
|
37805 | }
|
37806 | },
|
37807 | '49': {
|
37808 | start: {
|
37809 | line: 222,
|
37810 | column: 6
|
37811 | },
|
37812 | end: {
|
37813 | line: 228,
|
37814 | column: 7
|
37815 | }
|
37816 | },
|
37817 | '50': {
|
37818 | start: {
|
37819 | line: 223,
|
37820 | column: 8
|
37821 | },
|
37822 | end: {
|
37823 | line: 227,
|
37824 | column: 9
|
37825 | }
|
37826 | },
|
37827 | '51': {
|
37828 | start: {
|
37829 | line: 224,
|
37830 | column: 10
|
37831 | },
|
37832 | end: {
|
37833 | line: 224,
|
37834 | column: 41
|
37835 | }
|
37836 | },
|
37837 | '52': {
|
37838 | start: {
|
37839 | line: 226,
|
37840 | column: 10
|
37841 | },
|
37842 | end: {
|
37843 | line: 226,
|
37844 | column: 39
|
37845 | }
|
37846 | }
|
37847 | },
|
37848 | fnMap: {
|
37849 | '0': {
|
37850 | name: 'getAds',
|
37851 | decl: {
|
37852 | start: {
|
37853 | line: 9,
|
37854 | column: 24
|
37855 | },
|
37856 | end: {
|
37857 | line: 9,
|
37858 | column: 30
|
37859 | }
|
37860 | },
|
37861 | loc: {
|
37862 | start: {
|
37863 | line: 9,
|
37864 | column: 39
|
37865 | },
|
37866 | end: {
|
37867 | line: 233,
|
37868 | column: 1
|
37869 | }
|
37870 | },
|
37871 | line: 9
|
37872 | }
|
37873 | },
|
37874 | branchMap: {
|
37875 | '0': {
|
37876 | loc: {
|
37877 | start: {
|
37878 | line: 94,
|
37879 | column: 6
|
37880 | },
|
37881 | end: {
|
37882 | line: 101,
|
37883 | column: 7
|
37884 | }
|
37885 | },
|
37886 | type: 'if',
|
37887 | locations: [{
|
37888 | start: {
|
37889 | line: 94,
|
37890 | column: 6
|
37891 | },
|
37892 | end: {
|
37893 | line: 101,
|
37894 | column: 7
|
37895 | }
|
37896 | }, {
|
37897 | start: {
|
37898 | line: 94,
|
37899 | column: 6
|
37900 | },
|
37901 | end: {
|
37902 | line: 101,
|
37903 | column: 7
|
37904 | }
|
37905 | }],
|
37906 | line: 94
|
37907 | },
|
37908 | '1': {
|
37909 | loc: {
|
37910 | start: {
|
37911 | line: 111,
|
37912 | column: 6
|
37913 | },
|
37914 | end: {
|
37915 | line: 113,
|
37916 | column: 7
|
37917 | }
|
37918 | },
|
37919 | type: 'if',
|
37920 | locations: [{
|
37921 | start: {
|
37922 | line: 111,
|
37923 | column: 6
|
37924 | },
|
37925 | end: {
|
37926 | line: 113,
|
37927 | column: 7
|
37928 | }
|
37929 | }, {
|
37930 | start: {
|
37931 | line: 111,
|
37932 | column: 6
|
37933 | },
|
37934 | end: {
|
37935 | line: 113,
|
37936 | column: 7
|
37937 | }
|
37938 | }],
|
37939 | line: 111
|
37940 | },
|
37941 | '2': {
|
37942 | loc: {
|
37943 | start: {
|
37944 | line: 115,
|
37945 | column: 6
|
37946 | },
|
37947 | end: {
|
37948 | line: 117,
|
37949 | column: 7
|
37950 | }
|
37951 | },
|
37952 | type: 'if',
|
37953 | locations: [{
|
37954 | start: {
|
37955 | line: 115,
|
37956 | column: 6
|
37957 | },
|
37958 | end: {
|
37959 | line: 117,
|
37960 | column: 7
|
37961 | }
|
37962 | }, {
|
37963 | start: {
|
37964 | line: 115,
|
37965 | column: 6
|
37966 | },
|
37967 | end: {
|
37968 | line: 117,
|
37969 | column: 7
|
37970 | }
|
37971 | }],
|
37972 | line: 115
|
37973 | },
|
37974 | '3': {
|
37975 | loc: {
|
37976 | start: {
|
37977 | line: 122,
|
37978 | column: 13
|
37979 | },
|
37980 | end: {
|
37981 | line: 122,
|
37982 | column: 44
|
37983 | }
|
37984 | },
|
37985 | type: 'binary-expr',
|
37986 | locations: [{
|
37987 | start: {
|
37988 | line: 122,
|
37989 | column: 13
|
37990 | },
|
37991 | end: {
|
37992 | line: 122,
|
37993 | column: 23
|
37994 | }
|
37995 | }, {
|
37996 | start: {
|
37997 | line: 122,
|
37998 | column: 27
|
37999 | },
|
38000 | end: {
|
38001 | line: 122,
|
38002 | column: 44
|
38003 | }
|
38004 | }],
|
38005 | line: 122
|
38006 | },
|
38007 | '4': {
|
38008 | loc: {
|
38009 | start: {
|
38010 | line: 128,
|
38011 | column: 11
|
38012 | },
|
38013 | end: {
|
38014 | line: 128,
|
38015 | column: 30
|
38016 | }
|
38017 | },
|
38018 | type: 'default-arg',
|
38019 | locations: [{
|
38020 | start: {
|
38021 | line: 128,
|
38022 | column: 24
|
38023 | },
|
38024 | end: {
|
38025 | line: 128,
|
38026 | column: 30
|
38027 | }
|
38028 | }],
|
38029 | line: 128
|
38030 | },
|
38031 | '5': {
|
38032 | loc: {
|
38033 | start: {
|
38034 | line: 129,
|
38035 | column: 6
|
38036 | },
|
38037 | end: {
|
38038 | line: 135,
|
38039 | column: 7
|
38040 | }
|
38041 | },
|
38042 | type: 'if',
|
38043 | locations: [{
|
38044 | start: {
|
38045 | line: 129,
|
38046 | column: 6
|
38047 | },
|
38048 | end: {
|
38049 | line: 135,
|
38050 | column: 7
|
38051 | }
|
38052 | }, {
|
38053 | start: {
|
38054 | line: 129,
|
38055 | column: 6
|
38056 | },
|
38057 | end: {
|
38058 | line: 135,
|
38059 | column: 7
|
38060 | }
|
38061 | }],
|
38062 | line: 129
|
38063 | },
|
38064 | '6': {
|
38065 | loc: {
|
38066 | start: {
|
38067 | line: 131,
|
38068 | column: 13
|
38069 | },
|
38070 | end: {
|
38071 | line: 135,
|
38072 | column: 7
|
38073 | }
|
38074 | },
|
38075 | type: 'if',
|
38076 | locations: [{
|
38077 | start: {
|
38078 | line: 131,
|
38079 | column: 13
|
38080 | },
|
38081 | end: {
|
38082 | line: 135,
|
38083 | column: 7
|
38084 | }
|
38085 | }, {
|
38086 | start: {
|
38087 | line: 131,
|
38088 | column: 13
|
38089 | },
|
38090 | end: {
|
38091 | line: 135,
|
38092 | column: 7
|
38093 | }
|
38094 | }],
|
38095 | line: 131
|
38096 | },
|
38097 | '7': {
|
38098 | loc: {
|
38099 | start: {
|
38100 | line: 133,
|
38101 | column: 13
|
38102 | },
|
38103 | end: {
|
38104 | line: 135,
|
38105 | column: 7
|
38106 | }
|
38107 | },
|
38108 | type: 'if',
|
38109 | locations: [{
|
38110 | start: {
|
38111 | line: 133,
|
38112 | column: 13
|
38113 | },
|
38114 | end: {
|
38115 | line: 135,
|
38116 | column: 7
|
38117 | }
|
38118 | }, {
|
38119 | start: {
|
38120 | line: 133,
|
38121 | column: 13
|
38122 | },
|
38123 | end: {
|
38124 | line: 135,
|
38125 | column: 7
|
38126 | }
|
38127 | }],
|
38128 | line: 133
|
38129 | },
|
38130 | '8': {
|
38131 | loc: {
|
38132 | start: {
|
38133 | line: 133,
|
38134 | column: 17
|
38135 | },
|
38136 | end: {
|
38137 | line: 133,
|
38138 | column: 83
|
38139 | }
|
38140 | },
|
38141 | type: 'binary-expr',
|
38142 | locations: [{
|
38143 | start: {
|
38144 | line: 133,
|
38145 | column: 17
|
38146 | },
|
38147 | end: {
|
38148 | line: 133,
|
38149 | column: 52
|
38150 | }
|
38151 | }, {
|
38152 | start: {
|
38153 | line: 133,
|
38154 | column: 56
|
38155 | },
|
38156 | end: {
|
38157 | line: 133,
|
38158 | column: 83
|
38159 | }
|
38160 | }],
|
38161 | line: 133
|
38162 | },
|
38163 | '9': {
|
38164 | loc: {
|
38165 | start: {
|
38166 | line: 142,
|
38167 | column: 30
|
38168 | },
|
38169 | end: {
|
38170 | line: 142,
|
38171 | column: 49
|
38172 | }
|
38173 | },
|
38174 | type: 'default-arg',
|
38175 | locations: [{
|
38176 | start: {
|
38177 | line: 142,
|
38178 | column: 43
|
38179 | },
|
38180 | end: {
|
38181 | line: 142,
|
38182 | column: 49
|
38183 | }
|
38184 | }],
|
38185 | line: 142
|
38186 | },
|
38187 | '10': {
|
38188 | loc: {
|
38189 | start: {
|
38190 | line: 143,
|
38191 | column: 6
|
38192 | },
|
38193 | end: {
|
38194 | line: 151,
|
38195 | column: 7
|
38196 | }
|
38197 | },
|
38198 | type: 'if',
|
38199 | locations: [{
|
38200 | start: {
|
38201 | line: 143,
|
38202 | column: 6
|
38203 | },
|
38204 | end: {
|
38205 | line: 151,
|
38206 | column: 7
|
38207 | }
|
38208 | }, {
|
38209 | start: {
|
38210 | line: 143,
|
38211 | column: 6
|
38212 | },
|
38213 | end: {
|
38214 | line: 151,
|
38215 | column: 7
|
38216 | }
|
38217 | }],
|
38218 | line: 143
|
38219 | },
|
38220 | '11': {
|
38221 | loc: {
|
38222 | start: {
|
38223 | line: 145,
|
38224 | column: 13
|
38225 | },
|
38226 | end: {
|
38227 | line: 151,
|
38228 | column: 7
|
38229 | }
|
38230 | },
|
38231 | type: 'if',
|
38232 | locations: [{
|
38233 | start: {
|
38234 | line: 145,
|
38235 | column: 13
|
38236 | },
|
38237 | end: {
|
38238 | line: 151,
|
38239 | column: 7
|
38240 | }
|
38241 | }, {
|
38242 | start: {
|
38243 | line: 145,
|
38244 | column: 13
|
38245 | },
|
38246 | end: {
|
38247 | line: 151,
|
38248 | column: 7
|
38249 | }
|
38250 | }],
|
38251 | line: 145
|
38252 | },
|
38253 | '12': {
|
38254 | loc: {
|
38255 | start: {
|
38256 | line: 148,
|
38257 | column: 15
|
38258 | },
|
38259 | end: {
|
38260 | line: 150,
|
38261 | column: 49
|
38262 | }
|
38263 | },
|
38264 | type: 'binary-expr',
|
38265 | locations: [{
|
38266 | start: {
|
38267 | line: 148,
|
38268 | column: 15
|
38269 | },
|
38270 | end: {
|
38271 | line: 148,
|
38272 | column: 38
|
38273 | }
|
38274 | }, {
|
38275 | start: {
|
38276 | line: 149,
|
38277 | column: 15
|
38278 | },
|
38279 | end: {
|
38280 | line: 149,
|
38281 | column: 42
|
38282 | }
|
38283 | }, {
|
38284 | start: {
|
38285 | line: 150,
|
38286 | column: 15
|
38287 | },
|
38288 | end: {
|
38289 | line: 150,
|
38290 | column: 49
|
38291 | }
|
38292 | }],
|
38293 | line: 148
|
38294 | },
|
38295 | '13': {
|
38296 | loc: {
|
38297 | start: {
|
38298 | line: 156,
|
38299 | column: 24
|
38300 | },
|
38301 | end: {
|
38302 | line: 156,
|
38303 | column: 43
|
38304 | }
|
38305 | },
|
38306 | type: 'default-arg',
|
38307 | locations: [{
|
38308 | start: {
|
38309 | line: 156,
|
38310 | column: 37
|
38311 | },
|
38312 | end: {
|
38313 | line: 156,
|
38314 | column: 43
|
38315 | }
|
38316 | }],
|
38317 | line: 156
|
38318 | },
|
38319 | '14': {
|
38320 | loc: {
|
38321 | start: {
|
38322 | line: 157,
|
38323 | column: 13
|
38324 | },
|
38325 | end: {
|
38326 | line: 157,
|
38327 | column: 79
|
38328 | }
|
38329 | },
|
38330 | type: 'binary-expr',
|
38331 | locations: [{
|
38332 | start: {
|
38333 | line: 157,
|
38334 | column: 13
|
38335 | },
|
38336 | end: {
|
38337 | line: 157,
|
38338 | column: 56
|
38339 | }
|
38340 | }, {
|
38341 | start: {
|
38342 | line: 157,
|
38343 | column: 60
|
38344 | },
|
38345 | end: {
|
38346 | line: 157,
|
38347 | column: 79
|
38348 | }
|
38349 | }],
|
38350 | line: 157
|
38351 | },
|
38352 | '15': {
|
38353 | loc: {
|
38354 | start: {
|
38355 | line: 216,
|
38356 | column: 6
|
38357 | },
|
38358 | end: {
|
38359 | line: 218,
|
38360 | column: 7
|
38361 | }
|
38362 | },
|
38363 | type: 'if',
|
38364 | locations: [{
|
38365 | start: {
|
38366 | line: 216,
|
38367 | column: 6
|
38368 | },
|
38369 | end: {
|
38370 | line: 218,
|
38371 | column: 7
|
38372 | }
|
38373 | }, {
|
38374 | start: {
|
38375 | line: 216,
|
38376 | column: 6
|
38377 | },
|
38378 | end: {
|
38379 | line: 218,
|
38380 | column: 7
|
38381 | }
|
38382 | }],
|
38383 | line: 216
|
38384 | },
|
38385 | '16': {
|
38386 | loc: {
|
38387 | start: {
|
38388 | line: 222,
|
38389 | column: 6
|
38390 | },
|
38391 | end: {
|
38392 | line: 228,
|
38393 | column: 7
|
38394 | }
|
38395 | },
|
38396 | type: 'if',
|
38397 | locations: [{
|
38398 | start: {
|
38399 | line: 222,
|
38400 | column: 6
|
38401 | },
|
38402 | end: {
|
38403 | line: 228,
|
38404 | column: 7
|
38405 | }
|
38406 | }, {
|
38407 | start: {
|
38408 | line: 222,
|
38409 | column: 6
|
38410 | },
|
38411 | end: {
|
38412 | line: 228,
|
38413 | column: 7
|
38414 | }
|
38415 | }],
|
38416 | line: 222
|
38417 | },
|
38418 | '17': {
|
38419 | loc: {
|
38420 | start: {
|
38421 | line: 223,
|
38422 | column: 8
|
38423 | },
|
38424 | end: {
|
38425 | line: 227,
|
38426 | column: 9
|
38427 | }
|
38428 | },
|
38429 | type: 'if',
|
38430 | locations: [{
|
38431 | start: {
|
38432 | line: 223,
|
38433 | column: 8
|
38434 | },
|
38435 | end: {
|
38436 | line: 227,
|
38437 | column: 9
|
38438 | }
|
38439 | }, {
|
38440 | start: {
|
38441 | line: 223,
|
38442 | column: 8
|
38443 | },
|
38444 | end: {
|
38445 | line: 227,
|
38446 | column: 9
|
38447 | }
|
38448 | }],
|
38449 | line: 223
|
38450 | },
|
38451 | '18': {
|
38452 | loc: {
|
38453 | start: {
|
38454 | line: 223,
|
38455 | column: 12
|
38456 | },
|
38457 | end: {
|
38458 | line: 223,
|
38459 | column: 60
|
38460 | }
|
38461 | },
|
38462 | type: 'binary-expr',
|
38463 | locations: [{
|
38464 | start: {
|
38465 | line: 223,
|
38466 | column: 12
|
38467 | },
|
38468 | end: {
|
38469 | line: 223,
|
38470 | column: 29
|
38471 | }
|
38472 | }, {
|
38473 | start: {
|
38474 | line: 223,
|
38475 | column: 33
|
38476 | },
|
38477 | end: {
|
38478 | line: 223,
|
38479 | column: 60
|
38480 | }
|
38481 | }],
|
38482 | line: 223
|
38483 | }
|
38484 | },
|
38485 | s: {
|
38486 | '0': 0,
|
38487 | '1': 0,
|
38488 | '2': 0,
|
38489 | '3': 0,
|
38490 | '4': 0,
|
38491 | '5': 0,
|
38492 | '6': 0,
|
38493 | '7': 0,
|
38494 | '8': 0,
|
38495 | '9': 0,
|
38496 | '10': 0,
|
38497 | '11': 0,
|
38498 | '12': 0,
|
38499 | '13': 0,
|
38500 | '14': 0,
|
38501 | '15': 0,
|
38502 | '16': 0,
|
38503 | '17': 0,
|
38504 | '18': 0,
|
38505 | '19': 0,
|
38506 | '20': 0,
|
38507 | '21': 0,
|
38508 | '22': 0,
|
38509 | '23': 0,
|
38510 | '24': 0,
|
38511 | '25': 0,
|
38512 | '26': 0,
|
38513 | '27': 0,
|
38514 | '28': 0,
|
38515 | '29': 0,
|
38516 | '30': 0,
|
38517 | '31': 0,
|
38518 | '32': 0,
|
38519 | '33': 0,
|
38520 | '34': 0,
|
38521 | '35': 0,
|
38522 | '36': 0,
|
38523 | '37': 0,
|
38524 | '38': 0,
|
38525 | '39': 0,
|
38526 | '40': 0,
|
38527 | '41': 0,
|
38528 | '42': 0,
|
38529 | '43': 0,
|
38530 | '44': 0,
|
38531 | '45': 0,
|
38532 | '46': 0,
|
38533 | '47': 0,
|
38534 | '48': 0,
|
38535 | '49': 0,
|
38536 | '50': 0,
|
38537 | '51': 0,
|
38538 | '52': 0
|
38539 | },
|
38540 | f: {
|
38541 | '0': 0
|
38542 | },
|
38543 | b: {
|
38544 | '0': [0, 0],
|
38545 | '1': [0, 0],
|
38546 | '2': [0, 0],
|
38547 | '3': [0, 0],
|
38548 | '4': [0],
|
38549 | '5': [0, 0],
|
38550 | '6': [0, 0],
|
38551 | '7': [0, 0],
|
38552 | '8': [0, 0],
|
38553 | '9': [0],
|
38554 | '10': [0, 0],
|
38555 | '11': [0, 0],
|
38556 | '12': [0, 0, 0],
|
38557 | '13': [0],
|
38558 | '14': [0, 0],
|
38559 | '15': [0, 0],
|
38560 | '16': [0, 0],
|
38561 | '17': [0, 0],
|
38562 | '18': [0, 0]
|
38563 | },
|
38564 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
38565 | },
|
38566 | coverage = global[gcv] || (global[gcv] = {});
|
38567 |
|
38568 | if (coverage[path] && coverage[path].hash === hash) {
|
38569 | return coverage[path];
|
38570 | }
|
38571 |
|
38572 | coverageData.hash = hash;
|
38573 | return coverage[path] = coverageData;
|
38574 | }();
|
38575 | function getAds(player) {
|
38576 | cov_22tpzq68vb.f[0]++;
|
38577 | cov_22tpzq68vb.s[0]++;
|
38578 | return {
|
38579 | disableNextSnapshotRestore: false,
|
38580 | _contentEnding: false,
|
38581 | _contentHasEnded: false,
|
38582 | _hasThereBeenALoadStartDuringPlayerLife: false,
|
38583 | _hasThereBeenALoadedData: false,
|
38584 | _hasThereBeenALoadedMetaData: false,
|
38585 | _inLinearAdMode: false,
|
38586 | _shouldBlockPlay: false,
|
38587 | _playBlocked: false,
|
38588 | _playRequested: false,
|
38589 | adType: null,
|
38590 | VERSION: version,
|
38591 | reset: function reset() {
|
38592 | cov_22tpzq68vb.s[1]++;
|
38593 | player.ads.disableNextSnapshotRestore = false;
|
38594 | cov_22tpzq68vb.s[2]++;
|
38595 | player.ads._contentEnding = false;
|
38596 | cov_22tpzq68vb.s[3]++;
|
38597 | player.ads._contentHasEnded = false;
|
38598 | cov_22tpzq68vb.s[4]++;
|
38599 | player.ads.snapshot = null;
|
38600 | cov_22tpzq68vb.s[5]++;
|
38601 | player.ads.adType = null;
|
38602 | cov_22tpzq68vb.s[6]++;
|
38603 | player.ads._hasThereBeenALoadedData = false;
|
38604 | cov_22tpzq68vb.s[7]++;
|
38605 | player.ads._hasThereBeenALoadedMetaData = false;
|
38606 | cov_22tpzq68vb.s[8]++;
|
38607 | player.ads._cancelledPlay = false;
|
38608 | cov_22tpzq68vb.s[9]++;
|
38609 | player.ads._shouldBlockPlay = false;
|
38610 | cov_22tpzq68vb.s[10]++;
|
38611 | player.ads._playBlocked = false;
|
38612 | cov_22tpzq68vb.s[11]++;
|
38613 | player.ads.nopreroll_ = false;
|
38614 | cov_22tpzq68vb.s[12]++;
|
38615 | player.ads.nopostroll_ = false;
|
38616 | cov_22tpzq68vb.s[13]++;
|
38617 | player.ads._playRequested = false;
|
38618 | },
|
38619 | startLinearAdMode: function startLinearAdMode() {
|
38620 | cov_22tpzq68vb.s[14]++;
|
38621 |
|
38622 | player.ads._state.startLinearAdMode();
|
38623 | },
|
38624 | endLinearAdMode: function endLinearAdMode() {
|
38625 | cov_22tpzq68vb.s[15]++;
|
38626 |
|
38627 | player.ads._state.endLinearAdMode();
|
38628 | },
|
38629 | skipLinearAdMode: function skipLinearAdMode() {
|
38630 | cov_22tpzq68vb.s[16]++;
|
38631 |
|
38632 | player.ads._state.skipLinearAdMode();
|
38633 | },
|
38634 | stitchedAds: function stitchedAds(arg) {
|
38635 | cov_22tpzq68vb.s[17]++;
|
38636 |
|
38637 | if (arg !== undefined) {
|
38638 | cov_22tpzq68vb.b[0][0]++;
|
38639 | cov_22tpzq68vb.s[18]++;
|
38640 | videojs$1.log.warn('Using player.ads.stitchedAds() as a setter is deprecated, ' + 'it should be set as an option upon initialization of contrib-ads.');
|
38641 | cov_22tpzq68vb.s[19]++;
|
38642 | this.settings.stitchedAds = !!arg;
|
38643 | } else {
|
38644 | cov_22tpzq68vb.b[0][1]++;
|
38645 | }
|
38646 |
|
38647 | cov_22tpzq68vb.s[20]++;
|
38648 | return this.settings.stitchedAds;
|
38649 | },
|
38650 | videoElementRecycled: function videoElementRecycled() {
|
38651 | cov_22tpzq68vb.s[21]++;
|
38652 |
|
38653 | if (player.ads.shouldPlayContentBehindAd(player)) {
|
38654 | cov_22tpzq68vb.b[1][0]++;
|
38655 | cov_22tpzq68vb.s[22]++;
|
38656 | return false;
|
38657 | } else {
|
38658 | cov_22tpzq68vb.b[1][1]++;
|
38659 | }
|
38660 |
|
38661 | cov_22tpzq68vb.s[23]++;
|
38662 |
|
38663 | if (!this.snapshot) {
|
38664 | cov_22tpzq68vb.b[2][0]++;
|
38665 | cov_22tpzq68vb.s[24]++;
|
38666 | throw new Error('You cannot use videoElementRecycled while there is no snapshot.');
|
38667 | } else {
|
38668 | cov_22tpzq68vb.b[2][1]++;
|
38669 | }
|
38670 |
|
38671 | var srcChanged = (cov_22tpzq68vb.s[25]++, player.tech_.src() !== this.snapshot.src);
|
38672 | var currentSrcChanged = (cov_22tpzq68vb.s[26]++, player.currentSrc() !== this.snapshot.currentSrc);
|
38673 | cov_22tpzq68vb.s[27]++;
|
38674 | return (cov_22tpzq68vb.b[3][0]++, srcChanged) || (cov_22tpzq68vb.b[3][1]++, currentSrcChanged);
|
38675 | },
|
38676 | isLive: function isLive(somePlayer) {
|
38677 | if (somePlayer === void 0) {
|
38678 | somePlayer = (cov_22tpzq68vb.b[4][0]++, player);
|
38679 | }
|
38680 |
|
38681 | cov_22tpzq68vb.s[28]++;
|
38682 |
|
38683 | if (typeof somePlayer.ads.settings.contentIsLive === 'boolean') {
|
38684 | cov_22tpzq68vb.b[5][0]++;
|
38685 | cov_22tpzq68vb.s[29]++;
|
38686 | return somePlayer.ads.settings.contentIsLive;
|
38687 | } else {
|
38688 | cov_22tpzq68vb.b[5][1]++;
|
38689 | cov_22tpzq68vb.s[30]++;
|
38690 |
|
38691 | if (somePlayer.duration() === Infinity) {
|
38692 | cov_22tpzq68vb.b[6][0]++;
|
38693 | cov_22tpzq68vb.s[31]++;
|
38694 | return true;
|
38695 | } else {
|
38696 | cov_22tpzq68vb.b[6][1]++;
|
38697 | cov_22tpzq68vb.s[32]++;
|
38698 |
|
38699 | if ((cov_22tpzq68vb.b[8][0]++, videojs$1.browser.IOS_VERSION === '8') && (cov_22tpzq68vb.b[8][1]++, somePlayer.duration() === 0)) {
|
38700 | cov_22tpzq68vb.b[7][0]++;
|
38701 | cov_22tpzq68vb.s[33]++;
|
38702 | return true;
|
38703 | } else {
|
38704 | cov_22tpzq68vb.b[7][1]++;
|
38705 | }
|
38706 | }
|
38707 | }
|
38708 |
|
38709 | cov_22tpzq68vb.s[34]++;
|
38710 | return false;
|
38711 | },
|
38712 | shouldPlayContentBehindAd: function shouldPlayContentBehindAd(somePlayer) {
|
38713 | if (somePlayer === void 0) {
|
38714 | somePlayer = (cov_22tpzq68vb.b[9][0]++, player);
|
38715 | }
|
38716 |
|
38717 | cov_22tpzq68vb.s[35]++;
|
38718 |
|
38719 | if (!somePlayer) {
|
38720 | cov_22tpzq68vb.b[10][0]++;
|
38721 | cov_22tpzq68vb.s[36]++;
|
38722 | throw new Error('shouldPlayContentBehindAd requires a player as a param');
|
38723 | } else {
|
38724 | cov_22tpzq68vb.b[10][1]++;
|
38725 | cov_22tpzq68vb.s[37]++;
|
38726 |
|
38727 | if (!somePlayer.ads.settings.liveCuePoints) {
|
38728 | cov_22tpzq68vb.b[11][0]++;
|
38729 | cov_22tpzq68vb.s[38]++;
|
38730 | return false;
|
38731 | } else {
|
38732 | cov_22tpzq68vb.b[11][1]++;
|
38733 | cov_22tpzq68vb.s[39]++;
|
38734 | return (cov_22tpzq68vb.b[12][0]++, !videojs$1.browser.IS_IOS) && (cov_22tpzq68vb.b[12][1]++, !videojs$1.browser.IS_ANDROID) && (cov_22tpzq68vb.b[12][2]++, somePlayer.duration() === Infinity);
|
38735 | }
|
38736 | }
|
38737 | },
|
38738 | shouldTakeSnapshots: function shouldTakeSnapshots(somePlayer) {
|
38739 | if (somePlayer === void 0) {
|
38740 | somePlayer = (cov_22tpzq68vb.b[13][0]++, player);
|
38741 | }
|
38742 |
|
38743 | cov_22tpzq68vb.s[40]++;
|
38744 | return (cov_22tpzq68vb.b[14][0]++, !this.shouldPlayContentBehindAd(somePlayer)) && (cov_22tpzq68vb.b[14][1]++, !this.stitchedAds());
|
38745 | },
|
38746 | isInAdMode: function isInAdMode() {
|
38747 | cov_22tpzq68vb.s[41]++;
|
38748 | return this._state.isAdState();
|
38749 | },
|
38750 | isWaitingForAdBreak: function isWaitingForAdBreak() {
|
38751 | cov_22tpzq68vb.s[42]++;
|
38752 | return this._state.isWaitingForAdBreak();
|
38753 | },
|
38754 | isContentResuming: function isContentResuming() {
|
38755 | cov_22tpzq68vb.s[43]++;
|
38756 | return this._state.isContentResuming();
|
38757 | },
|
38758 | isAdPlaying: function isAdPlaying() {
|
38759 | cov_22tpzq68vb.s[44]++;
|
38760 | return this._state.inAdBreak();
|
38761 | },
|
38762 | inAdBreak: function inAdBreak() {
|
38763 | cov_22tpzq68vb.s[45]++;
|
38764 | return this._state.inAdBreak();
|
38765 | },
|
38766 | removeNativePoster: function removeNativePoster() {
|
38767 | var tech = (cov_22tpzq68vb.s[46]++, player.$('.vjs-tech'));
|
38768 | cov_22tpzq68vb.s[47]++;
|
38769 |
|
38770 | if (tech) {
|
38771 | cov_22tpzq68vb.b[15][0]++;
|
38772 | cov_22tpzq68vb.s[48]++;
|
38773 | tech.removeAttribute('poster');
|
38774 | } else {
|
38775 | cov_22tpzq68vb.b[15][1]++;
|
38776 | }
|
38777 | },
|
38778 | debug: function debug() {
|
38779 | cov_22tpzq68vb.s[49]++;
|
38780 |
|
38781 | if (this.settings.debug) {
|
38782 | cov_22tpzq68vb.b[16][0]++;
|
38783 | cov_22tpzq68vb.s[50]++;
|
38784 |
|
38785 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
38786 | args[_key] = arguments[_key];
|
38787 | }
|
38788 |
|
38789 | if ((cov_22tpzq68vb.b[18][0]++, args.length === 1) && (cov_22tpzq68vb.b[18][1]++, typeof args[0] === 'string')) {
|
38790 | cov_22tpzq68vb.b[17][0]++;
|
38791 | cov_22tpzq68vb.s[51]++;
|
38792 | videojs$1.log('ADS: ' + args[0]);
|
38793 | } else {
|
38794 | cov_22tpzq68vb.b[17][1]++;
|
38795 | cov_22tpzq68vb.s[52]++;
|
38796 | videojs$1.log.apply(videojs$1, ['ADS:'].concat(args));
|
38797 | }
|
38798 | } else {
|
38799 | cov_22tpzq68vb.b[16][1]++;
|
38800 | }
|
38801 | }
|
38802 | };
|
38803 | }
|
38804 |
|
38805 | QUnit.module('Ads Object', {
|
38806 | beforeEach: function beforeEach() {
|
38807 | this.player = {
|
38808 | currentSrc: function currentSrc() {},
|
38809 | duration: function duration() {},
|
38810 | on: function on() {},
|
38811 | one: function one() {},
|
38812 | ready: function ready() {},
|
38813 | setTimeout: function setTimeout() {}
|
38814 | };
|
38815 | this.player.ads = getAds(this.player);
|
38816 | this.player.ads.settings = {};
|
38817 | }
|
38818 | }, function () {
|
38819 | |
38820 |
|
38821 |
|
38822 | QUnit.test('isLive', function (assert) {
|
38823 | this.player.duration = function () {
|
38824 | return 5;
|
38825 | };
|
38826 |
|
38827 | assert.equal(this.player.ads.isLive(this.player), false);
|
38828 |
|
38829 | this.player.duration = function () {
|
38830 | return Infinity;
|
38831 | };
|
38832 |
|
38833 | assert.equal(this.player.ads.isLive(this.player), true);
|
38834 | });
|
38835 | |
38836 |
|
38837 |
|
38838 |
|
38839 | QUnit.test('isLive and contentIsLive', function (assert) {
|
38840 | this.player.duration = function () {
|
38841 | return 5;
|
38842 | };
|
38843 |
|
38844 | this.player.ads.settings.contentIsLive = true;
|
38845 | assert.equal(this.player.ads.isLive(this.player), true);
|
38846 |
|
38847 | this.player.duration = function () {
|
38848 | return 5;
|
38849 | };
|
38850 |
|
38851 | this.player.ads.settings.contentIsLive = false;
|
38852 | assert.equal(this.player.ads.isLive(this.player), false);
|
38853 |
|
38854 | this.player.duration = function () {
|
38855 | return Infinity;
|
38856 | };
|
38857 |
|
38858 | this.player.ads.settings.contentIsLive = true;
|
38859 | assert.equal(this.player.ads.isLive(this.player), true);
|
38860 |
|
38861 | this.player.duration = function () {
|
38862 | return Infinity;
|
38863 | };
|
38864 |
|
38865 | this.player.ads.settings.contentIsLive = false;
|
38866 | assert.equal(this.player.ads.isLive(this.player), false);
|
38867 | });
|
38868 | QUnit.test('stitchedAds', function (assert) {
|
38869 | assert.notOk(this.player.ads.stitchedAds());
|
38870 | this.player.ads.settings.stitchedAds = true;
|
38871 | assert.ok(this.player.ads.stitchedAds());
|
38872 | sinon.spy(videojs$1.log, 'warn');
|
38873 | this.player.ads.stitchedAds(false);
|
38874 | assert.ok(videojs$1.log.warn.calledOnce, 'using as a setter is deprecated');
|
38875 | assert.notOk(this.player.ads.stitchedAds());
|
38876 | assert.notOk(this.player.ads.settings.stitchedAds);
|
38877 | videojs$1.log.warn.restore();
|
38878 | });
|
38879 | QUnit.test('shouldPlayContentBehindAd', function (assert) {
|
38880 |
|
38881 | this.player.ads.settings.liveCuePoints = true;
|
38882 |
|
38883 | this.player.duration = function () {
|
38884 | return 60;
|
38885 | };
|
38886 |
|
38887 | videojs$1.browser.IS_IOS = false;
|
38888 | videojs$1.browser.IS_ANDROID = false;
|
38889 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38890 | this.player.ads.settings.liveCuePoints = true;
|
38891 |
|
38892 | this.player.duration = function () {
|
38893 | return 60;
|
38894 | };
|
38895 |
|
38896 | videojs$1.browser.IS_IOS = true;
|
38897 | videojs$1.browser.IS_ANDROID = false;
|
38898 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38899 | this.player.ads.settings.liveCuePoints = true;
|
38900 |
|
38901 | this.player.duration = function () {
|
38902 | return 60;
|
38903 | };
|
38904 |
|
38905 | videojs$1.browser.IS_IOS = false;
|
38906 | videojs$1.browser.IS_ANDROID = true;
|
38907 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38908 |
|
38909 | this.player.ads.settings.liveCuePoints = true;
|
38910 |
|
38911 | this.player.duration = function () {
|
38912 | return Infinity;
|
38913 | };
|
38914 |
|
38915 | videojs$1.browser.IS_IOS = false;
|
38916 | videojs$1.browser.IS_ANDROID = false;
|
38917 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), true);
|
38918 | this.player.ads.settings.liveCuePoints = true;
|
38919 |
|
38920 | this.player.duration = function () {
|
38921 | return Infinity;
|
38922 | };
|
38923 |
|
38924 | videojs$1.browser.IS_IOS = true;
|
38925 | videojs$1.browser.IS_ANDROID = false;
|
38926 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38927 | this.player.ads.settings.liveCuePoints = true;
|
38928 |
|
38929 | this.player.duration = function () {
|
38930 | return Infinity;
|
38931 | };
|
38932 |
|
38933 | videojs$1.browser.IS_IOS = false;
|
38934 | videojs$1.browser.IS_ANDROID = true;
|
38935 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38936 |
|
38937 | this.player.ads.settings.liveCuePoints = false;
|
38938 |
|
38939 | this.player.duration = function () {
|
38940 | return 60;
|
38941 | };
|
38942 |
|
38943 | videojs$1.browser.IS_IOS = false;
|
38944 | videojs$1.browser.IS_ANDROID = false;
|
38945 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38946 | this.player.ads.settings.liveCuePoints = false;
|
38947 |
|
38948 | this.player.duration = function () {
|
38949 | return 60;
|
38950 | };
|
38951 |
|
38952 | videojs$1.browser.IS_IOS = true;
|
38953 | videojs$1.browser.IS_ANDROID = false;
|
38954 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38955 | this.player.ads.settings.liveCuePoints = false;
|
38956 |
|
38957 | this.player.duration = function () {
|
38958 | return 60;
|
38959 | };
|
38960 |
|
38961 | videojs$1.browser.IS_IOS = false;
|
38962 | videojs$1.browser.IS_ANDROID = true;
|
38963 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38964 |
|
38965 | this.player.ads.settings.liveCuePoints = false;
|
38966 |
|
38967 | this.player.duration = function () {
|
38968 | return Infinity;
|
38969 | };
|
38970 |
|
38971 | videojs$1.browser.IS_IOS = false;
|
38972 | videojs$1.browser.IS_ANDROID = false;
|
38973 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38974 | this.player.ads.settings.liveCuePoints = false;
|
38975 |
|
38976 | this.player.duration = function () {
|
38977 | return Infinity;
|
38978 | };
|
38979 |
|
38980 | videojs$1.browser.IS_IOS = true;
|
38981 | videojs$1.browser.IS_ANDROID = false;
|
38982 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38983 | this.player.ads.settings.liveCuePoints = false;
|
38984 |
|
38985 | this.player.duration = function () {
|
38986 | return Infinity;
|
38987 | };
|
38988 |
|
38989 | videojs$1.browser.IS_IOS = false;
|
38990 | videojs$1.browser.IS_ANDROID = true;
|
38991 | assert.equal(this.player.ads.shouldPlayContentBehindAd(this.player), false);
|
38992 | });
|
38993 | QUnit.test('shouldTakeSnapshots', function (assert) {
|
38994 | this.player.ads.shouldPlayContentBehindAd = function () {
|
38995 | return false;
|
38996 | };
|
38997 |
|
38998 | this.player.ads.stitchedAds = function () {
|
38999 | return false;
|
39000 | };
|
39001 |
|
39002 | assert.ok(this.player.ads.shouldTakeSnapshots());
|
39003 |
|
39004 | this.player.ads.shouldPlayContentBehindAd = function () {
|
39005 | return true;
|
39006 | };
|
39007 |
|
39008 | assert.notOk(this.player.ads.shouldTakeSnapshots());
|
39009 |
|
39010 | this.player.ads.shouldPlayContentBehindAd = function () {
|
39011 | return false;
|
39012 | };
|
39013 |
|
39014 | this.player.ads.stitchedAds = function () {
|
39015 | return true;
|
39016 | };
|
39017 |
|
39018 | assert.notOk(this.player.ads.shouldTakeSnapshots());
|
39019 | });
|
39020 | });
|
39021 |
|
39022 | var cov_23p3xtit9c = function () {
|
39023 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/playMiddleware.js',
|
39024 | hash = '3b03737a9730887587ac35a9dd770cca53614f19',
|
39025 | Function = function () {}.constructor,
|
39026 | global = new Function('return this')(),
|
39027 | gcv = '__coverage__',
|
39028 | coverageData = {
|
39029 | path: '/Users/poneill/dev/videojs-contrib-ads/src/playMiddleware.js',
|
39030 | statementMap: {
|
39031 | '0': {
|
39032 | start: {
|
39033 | line: 3,
|
39034 | column: 12
|
39035 | },
|
39036 | end: {
|
39037 | line: 3,
|
39038 | column: 14
|
39039 | }
|
39040 | },
|
39041 | '1': {
|
39042 | start: {
|
39043 | line: 7,
|
39044 | column: 23
|
39045 | },
|
39046 | end: {
|
39047 | line: 7,
|
39048 | column: 30
|
39049 | }
|
39050 | },
|
39051 | '2': {
|
39052 | start: {
|
39053 | line: 14,
|
39054 | column: 0
|
39055 | },
|
39056 | end: {
|
39057 | line: 30,
|
39058 | column: 2
|
39059 | }
|
39060 | },
|
39061 | '3': {
|
39062 | start: {
|
39063 | line: 16,
|
39064 | column: 2
|
39065 | },
|
39066 | end: {
|
39067 | line: 27,
|
39068 | column: 3
|
39069 | }
|
39070 | },
|
39071 | '4': {
|
39072 | start: {
|
39073 | line: 17,
|
39074 | column: 4
|
39075 | },
|
39076 | end: {
|
39077 | line: 17,
|
39078 | column: 17
|
39079 | }
|
39080 | },
|
39081 | '5': {
|
39082 | start: {
|
39083 | line: 19,
|
39084 | column: 9
|
39085 | },
|
39086 | end: {
|
39087 | line: 27,
|
39088 | column: 3
|
39089 | }
|
39090 | },
|
39091 | '6': {
|
39092 | start: {
|
39093 | line: 25,
|
39094 | column: 4
|
39095 | },
|
39096 | end: {
|
39097 | line: 25,
|
39098 | column: 16
|
39099 | }
|
39100 | },
|
39101 | '7': {
|
39102 | start: {
|
39103 | line: 29,
|
39104 | column: 2
|
39105 | },
|
39106 | end: {
|
39107 | line: 29,
|
39108 | column: 15
|
39109 | }
|
39110 | },
|
39111 | '8': {
|
39112 | start: {
|
39113 | line: 32,
|
39114 | column: 0
|
39115 | },
|
39116 | end: {
|
39117 | line: 70,
|
39118 | column: 2
|
39119 | }
|
39120 | },
|
39121 | '9': {
|
39122 | start: {
|
39123 | line: 33,
|
39124 | column: 2
|
39125 | },
|
39126 | end: {
|
39127 | line: 69,
|
39128 | column: 4
|
39129 | }
|
39130 | },
|
39131 | '10': {
|
39132 | start: {
|
39133 | line: 35,
|
39134 | column: 6
|
39135 | },
|
39136 | end: {
|
39137 | line: 35,
|
39138 | column: 25
|
39139 | }
|
39140 | },
|
39141 | '11': {
|
39142 | start: {
|
39143 | line: 40,
|
39144 | column: 6
|
39145 | },
|
39146 | end: {
|
39147 | line: 44,
|
39148 | column: 7
|
39149 | }
|
39150 | },
|
39151 | '12': {
|
39152 | start: {
|
39153 | line: 41,
|
39154 | column: 8
|
39155 | },
|
39156 | end: {
|
39157 | line: 41,
|
39158 | column: 75
|
39159 | }
|
39160 | },
|
39161 | '13': {
|
39162 | start: {
|
39163 | line: 42,
|
39164 | column: 8
|
39165 | },
|
39166 | end: {
|
39167 | line: 42,
|
39168 | column: 39
|
39169 | }
|
39170 | },
|
39171 | '14': {
|
39172 | start: {
|
39173 | line: 43,
|
39174 | column: 8
|
39175 | },
|
39176 | end: {
|
39177 | line: 43,
|
39178 | column: 54
|
39179 | }
|
39180 | },
|
39181 | '15': {
|
39182 | start: {
|
39183 | line: 47,
|
39184 | column: 6
|
39185 | },
|
39186 | end: {
|
39187 | line: 67,
|
39188 | column: 7
|
39189 | }
|
39190 | },
|
39191 | '16': {
|
39192 | start: {
|
39193 | line: 48,
|
39194 | column: 8
|
39195 | },
|
39196 | end: {
|
39197 | line: 48,
|
39198 | column: 62
|
39199 | }
|
39200 | },
|
39201 | '17': {
|
39202 | start: {
|
39203 | line: 52,
|
39204 | column: 8
|
39205 | },
|
39206 | end: {
|
39207 | line: 52,
|
39208 | column: 31
|
39209 | }
|
39210 | },
|
39211 | '18': {
|
39212 | start: {
|
39213 | line: 54,
|
39214 | column: 8
|
39215 | },
|
39216 | end: {
|
39217 | line: 54,
|
39218 | column: 43
|
39219 | }
|
39220 | },
|
39221 | '19': {
|
39222 | start: {
|
39223 | line: 56,
|
39224 | column: 8
|
39225 | },
|
39226 | end: {
|
39227 | line: 56,
|
39228 | column: 40
|
39229 | }
|
39230 | },
|
39231 | '20': {
|
39232 | start: {
|
39233 | line: 61,
|
39234 | column: 13
|
39235 | },
|
39236 | end: {
|
39237 | line: 67,
|
39238 | column: 7
|
39239 | }
|
39240 | },
|
39241 | '21': {
|
39242 | start: {
|
39243 | line: 62,
|
39244 | column: 8
|
39245 | },
|
39246 | end: {
|
39247 | line: 66,
|
39248 | column: 11
|
39249 | }
|
39250 | },
|
39251 | '22': {
|
39252 | start: {
|
39253 | line: 63,
|
39254 | column: 10
|
39255 | },
|
39256 | end: {
|
39257 | line: 65,
|
39258 | column: 11
|
39259 | }
|
39260 | },
|
39261 | '23': {
|
39262 | start: {
|
39263 | line: 64,
|
39264 | column: 12
|
39265 | },
|
39266 | end: {
|
39267 | line: 64,
|
39268 | column: 36
|
39269 | }
|
39270 | },
|
39271 | '24': {
|
39272 | start: {
|
39273 | line: 72,
|
39274 | column: 0
|
39275 | },
|
39276 | end: {
|
39277 | line: 74,
|
39278 | column: 2
|
39279 | }
|
39280 | },
|
39281 | '25': {
|
39282 | start: {
|
39283 | line: 73,
|
39284 | column: 2
|
39285 | },
|
39286 | end: {
|
39287 | line: 73,
|
39288 | column: 29
|
39289 | }
|
39290 | }
|
39291 | },
|
39292 | fnMap: {
|
39293 | '0': {
|
39294 | name: '(anonymous_0)',
|
39295 | decl: {
|
39296 | start: {
|
39297 | line: 14,
|
39298 | column: 36
|
39299 | },
|
39300 | end: {
|
39301 | line: 14,
|
39302 | column: 37
|
39303 | }
|
39304 | },
|
39305 | loc: {
|
39306 | start: {
|
39307 | line: 14,
|
39308 | column: 47
|
39309 | },
|
39310 | end: {
|
39311 | line: 30,
|
39312 | column: 1
|
39313 | }
|
39314 | },
|
39315 | line: 14
|
39316 | },
|
39317 | '1': {
|
39318 | name: '(anonymous_1)',
|
39319 | decl: {
|
39320 | start: {
|
39321 | line: 32,
|
39322 | column: 21
|
39323 | },
|
39324 | end: {
|
39325 | line: 32,
|
39326 | column: 22
|
39327 | }
|
39328 | },
|
39329 | loc: {
|
39330 | start: {
|
39331 | line: 32,
|
39332 | column: 38
|
39333 | },
|
39334 | end: {
|
39335 | line: 70,
|
39336 | column: 1
|
39337 | }
|
39338 | },
|
39339 | line: 32
|
39340 | },
|
39341 | '2': {
|
39342 | name: '(anonymous_2)',
|
39343 | decl: {
|
39344 | start: {
|
39345 | line: 62,
|
39346 | column: 26
|
39347 | },
|
39348 | end: {
|
39349 | line: 62,
|
39350 | column: 27
|
39351 | }
|
39352 | },
|
39353 | loc: {
|
39354 | start: {
|
39355 | line: 62,
|
39356 | column: 33
|
39357 | },
|
39358 | end: {
|
39359 | line: 66,
|
39360 | column: 9
|
39361 | }
|
39362 | },
|
39363 | line: 62
|
39364 | },
|
39365 | '3': {
|
39366 | name: '(anonymous_3)',
|
39367 | decl: {
|
39368 | start: {
|
39369 | line: 72,
|
39370 | column: 15
|
39371 | },
|
39372 | end: {
|
39373 | line: 72,
|
39374 | column: 16
|
39375 | }
|
39376 | },
|
39377 | loc: {
|
39378 | start: {
|
39379 | line: 72,
|
39380 | column: 33
|
39381 | },
|
39382 | end: {
|
39383 | line: 74,
|
39384 | column: 1
|
39385 | }
|
39386 | },
|
39387 | line: 72
|
39388 | }
|
39389 | },
|
39390 | branchMap: {
|
39391 | '0': {
|
39392 | loc: {
|
39393 | start: {
|
39394 | line: 16,
|
39395 | column: 2
|
39396 | },
|
39397 | end: {
|
39398 | line: 27,
|
39399 | column: 3
|
39400 | }
|
39401 | },
|
39402 | type: 'if',
|
39403 | locations: [{
|
39404 | start: {
|
39405 | line: 16,
|
39406 | column: 2
|
39407 | },
|
39408 | end: {
|
39409 | line: 27,
|
39410 | column: 3
|
39411 | }
|
39412 | }, {
|
39413 | start: {
|
39414 | line: 16,
|
39415 | column: 2
|
39416 | },
|
39417 | end: {
|
39418 | line: 27,
|
39419 | column: 3
|
39420 | }
|
39421 | }],
|
39422 | line: 16
|
39423 | },
|
39424 | '1': {
|
39425 | loc: {
|
39426 | start: {
|
39427 | line: 16,
|
39428 | column: 6
|
39429 | },
|
39430 | end: {
|
39431 | line: 16,
|
39432 | column: 76
|
39433 | }
|
39434 | },
|
39435 | type: 'binary-expr',
|
39436 | locations: [{
|
39437 | start: {
|
39438 | line: 16,
|
39439 | column: 6
|
39440 | },
|
39441 | end: {
|
39442 | line: 16,
|
39443 | column: 37
|
39444 | }
|
39445 | }, {
|
39446 | start: {
|
39447 | line: 16,
|
39448 | column: 41
|
39449 | },
|
39450 | end: {
|
39451 | line: 16,
|
39452 | column: 76
|
39453 | }
|
39454 | }],
|
39455 | line: 16
|
39456 | },
|
39457 | '2': {
|
39458 | loc: {
|
39459 | start: {
|
39460 | line: 19,
|
39461 | column: 9
|
39462 | },
|
39463 | end: {
|
39464 | line: 27,
|
39465 | column: 3
|
39466 | }
|
39467 | },
|
39468 | type: 'if',
|
39469 | locations: [{
|
39470 | start: {
|
39471 | line: 19,
|
39472 | column: 9
|
39473 | },
|
39474 | end: {
|
39475 | line: 27,
|
39476 | column: 3
|
39477 | }
|
39478 | }, {
|
39479 | start: {
|
39480 | line: 19,
|
39481 | column: 9
|
39482 | },
|
39483 | end: {
|
39484 | line: 27,
|
39485 | column: 3
|
39486 | }
|
39487 | }],
|
39488 | line: 19
|
39489 | },
|
39490 | '3': {
|
39491 | loc: {
|
39492 | start: {
|
39493 | line: 21,
|
39494 | column: 4
|
39495 | },
|
39496 | end: {
|
39497 | line: 24,
|
39498 | column: 42
|
39499 | }
|
39500 | },
|
39501 | type: 'binary-expr',
|
39502 | locations: [{
|
39503 | start: {
|
39504 | line: 21,
|
39505 | column: 4
|
39506 | },
|
39507 | end: {
|
39508 | line: 21,
|
39509 | column: 24
|
39510 | }
|
39511 | }, {
|
39512 | start: {
|
39513 | line: 23,
|
39514 | column: 4
|
39515 | },
|
39516 | end: {
|
39517 | line: 23,
|
39518 | column: 31
|
39519 | }
|
39520 | }, {
|
39521 | start: {
|
39522 | line: 24,
|
39523 | column: 4
|
39524 | },
|
39525 | end: {
|
39526 | line: 24,
|
39527 | column: 42
|
39528 | }
|
39529 | }],
|
39530 | line: 21
|
39531 | },
|
39532 | '4': {
|
39533 | loc: {
|
39534 | start: {
|
39535 | line: 40,
|
39536 | column: 6
|
39537 | },
|
39538 | end: {
|
39539 | line: 44,
|
39540 | column: 7
|
39541 | }
|
39542 | },
|
39543 | type: 'if',
|
39544 | locations: [{
|
39545 | start: {
|
39546 | line: 40,
|
39547 | column: 6
|
39548 | },
|
39549 | end: {
|
39550 | line: 44,
|
39551 | column: 7
|
39552 | }
|
39553 | }, {
|
39554 | start: {
|
39555 | line: 40,
|
39556 | column: 6
|
39557 | },
|
39558 | end: {
|
39559 | line: 44,
|
39560 | column: 7
|
39561 | }
|
39562 | }],
|
39563 | line: 40
|
39564 | },
|
39565 | '5': {
|
39566 | loc: {
|
39567 | start: {
|
39568 | line: 40,
|
39569 | column: 10
|
39570 | },
|
39571 | end: {
|
39572 | line: 40,
|
39573 | column: 60
|
39574 | }
|
39575 | },
|
39576 | type: 'binary-expr',
|
39577 | locations: [{
|
39578 | start: {
|
39579 | line: 40,
|
39580 | column: 10
|
39581 | },
|
39582 | end: {
|
39583 | line: 40,
|
39584 | column: 20
|
39585 | }
|
39586 | }, {
|
39587 | start: {
|
39588 | line: 40,
|
39589 | column: 24
|
39590 | },
|
39591 | end: {
|
39592 | line: 40,
|
39593 | column: 60
|
39594 | }
|
39595 | }],
|
39596 | line: 40
|
39597 | },
|
39598 | '6': {
|
39599 | loc: {
|
39600 | start: {
|
39601 | line: 47,
|
39602 | column: 6
|
39603 | },
|
39604 | end: {
|
39605 | line: 67,
|
39606 | column: 7
|
39607 | }
|
39608 | },
|
39609 | type: 'if',
|
39610 | locations: [{
|
39611 | start: {
|
39612 | line: 47,
|
39613 | column: 6
|
39614 | },
|
39615 | end: {
|
39616 | line: 67,
|
39617 | column: 7
|
39618 | }
|
39619 | }, {
|
39620 | start: {
|
39621 | line: 47,
|
39622 | column: 6
|
39623 | },
|
39624 | end: {
|
39625 | line: 67,
|
39626 | column: 7
|
39627 | }
|
39628 | }],
|
39629 | line: 47
|
39630 | },
|
39631 | '7': {
|
39632 | loc: {
|
39633 | start: {
|
39634 | line: 47,
|
39635 | column: 10
|
39636 | },
|
39637 | end: {
|
39638 | line: 47,
|
39639 | column: 61
|
39640 | }
|
39641 | },
|
39642 | type: 'binary-expr',
|
39643 | locations: [{
|
39644 | start: {
|
39645 | line: 47,
|
39646 | column: 10
|
39647 | },
|
39648 | end: {
|
39649 | line: 47,
|
39650 | column: 20
|
39651 | }
|
39652 | }, {
|
39653 | start: {
|
39654 | line: 47,
|
39655 | column: 24
|
39656 | },
|
39657 | end: {
|
39658 | line: 47,
|
39659 | column: 47
|
39660 | }
|
39661 | }, {
|
39662 | start: {
|
39663 | line: 47,
|
39664 | column: 51
|
39665 | },
|
39666 | end: {
|
39667 | line: 47,
|
39668 | column: 61
|
39669 | }
|
39670 | }],
|
39671 | line: 47
|
39672 | },
|
39673 | '8': {
|
39674 | loc: {
|
39675 | start: {
|
39676 | line: 61,
|
39677 | column: 13
|
39678 | },
|
39679 | end: {
|
39680 | line: 67,
|
39681 | column: 7
|
39682 | }
|
39683 | },
|
39684 | type: 'if',
|
39685 | locations: [{
|
39686 | start: {
|
39687 | line: 61,
|
39688 | column: 13
|
39689 | },
|
39690 | end: {
|
39691 | line: 67,
|
39692 | column: 7
|
39693 | }
|
39694 | }, {
|
39695 | start: {
|
39696 | line: 61,
|
39697 | column: 13
|
39698 | },
|
39699 | end: {
|
39700 | line: 67,
|
39701 | column: 7
|
39702 | }
|
39703 | }],
|
39704 | line: 61
|
39705 | },
|
39706 | '9': {
|
39707 | loc: {
|
39708 | start: {
|
39709 | line: 61,
|
39710 | column: 17
|
39711 | },
|
39712 | end: {
|
39713 | line: 61,
|
39714 | column: 49
|
39715 | }
|
39716 | },
|
39717 | type: 'binary-expr',
|
39718 | locations: [{
|
39719 | start: {
|
39720 | line: 61,
|
39721 | column: 17
|
39722 | },
|
39723 | end: {
|
39724 | line: 61,
|
39725 | column: 28
|
39726 | }
|
39727 | }, {
|
39728 | start: {
|
39729 | line: 61,
|
39730 | column: 32
|
39731 | },
|
39732 | end: {
|
39733 | line: 61,
|
39734 | column: 49
|
39735 | }
|
39736 | }],
|
39737 | line: 61
|
39738 | },
|
39739 | '10': {
|
39740 | loc: {
|
39741 | start: {
|
39742 | line: 63,
|
39743 | column: 10
|
39744 | },
|
39745 | end: {
|
39746 | line: 65,
|
39747 | column: 11
|
39748 | }
|
39749 | },
|
39750 | type: 'if',
|
39751 | locations: [{
|
39752 | start: {
|
39753 | line: 63,
|
39754 | column: 10
|
39755 | },
|
39756 | end: {
|
39757 | line: 65,
|
39758 | column: 11
|
39759 | }
|
39760 | }, {
|
39761 | start: {
|
39762 | line: 63,
|
39763 | column: 10
|
39764 | },
|
39765 | end: {
|
39766 | line: 65,
|
39767 | column: 11
|
39768 | }
|
39769 | }],
|
39770 | line: 63
|
39771 | },
|
39772 | '11': {
|
39773 | loc: {
|
39774 | start: {
|
39775 | line: 63,
|
39776 | column: 14
|
39777 | },
|
39778 | end: {
|
39779 | line: 63,
|
39780 | column: 72
|
39781 | }
|
39782 | },
|
39783 | type: 'binary-expr',
|
39784 | locations: [{
|
39785 | start: {
|
39786 | line: 63,
|
39787 | column: 14
|
39788 | },
|
39789 | end: {
|
39790 | line: 63,
|
39791 | column: 42
|
39792 | }
|
39793 | }, {
|
39794 | start: {
|
39795 | line: 63,
|
39796 | column: 46
|
39797 | },
|
39798 | end: {
|
39799 | line: 63,
|
39800 | column: 72
|
39801 | }
|
39802 | }],
|
39803 | line: 63
|
39804 | }
|
39805 | },
|
39806 | s: {
|
39807 | '0': 0,
|
39808 | '1': 0,
|
39809 | '2': 0,
|
39810 | '3': 0,
|
39811 | '4': 0,
|
39812 | '5': 0,
|
39813 | '6': 0,
|
39814 | '7': 0,
|
39815 | '8': 0,
|
39816 | '9': 0,
|
39817 | '10': 0,
|
39818 | '11': 0,
|
39819 | '12': 0,
|
39820 | '13': 0,
|
39821 | '14': 0,
|
39822 | '15': 0,
|
39823 | '16': 0,
|
39824 | '17': 0,
|
39825 | '18': 0,
|
39826 | '19': 0,
|
39827 | '20': 0,
|
39828 | '21': 0,
|
39829 | '22': 0,
|
39830 | '23': 0,
|
39831 | '24': 0,
|
39832 | '25': 0
|
39833 | },
|
39834 | f: {
|
39835 | '0': 0,
|
39836 | '1': 0,
|
39837 | '2': 0,
|
39838 | '3': 0
|
39839 | },
|
39840 | b: {
|
39841 | '0': [0, 0],
|
39842 | '1': [0, 0],
|
39843 | '2': [0, 0],
|
39844 | '3': [0, 0, 0],
|
39845 | '4': [0, 0],
|
39846 | '5': [0, 0],
|
39847 | '6': [0, 0],
|
39848 | '7': [0, 0, 0],
|
39849 | '8': [0, 0],
|
39850 | '9': [0, 0],
|
39851 | '10': [0, 0],
|
39852 | '11': [0, 0]
|
39853 | },
|
39854 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
39855 | },
|
39856 | coverage = global[gcv] || (global[gcv] = {});
|
39857 |
|
39858 | if (coverage[path] && coverage[path].hash === hash) {
|
39859 | return coverage[path];
|
39860 | }
|
39861 |
|
39862 | coverageData.hash = hash;
|
39863 | return coverage[path] = coverageData;
|
39864 | }();
|
39865 | var obj$1 = (cov_23p3xtit9c.s[0]++, {});
|
39866 | var videojsReference = (cov_23p3xtit9c.s[1]++, videojs$1);
|
39867 | cov_23p3xtit9c.s[2]++;
|
39868 |
|
39869 | obj$1.isMiddlewareMediatorSupported = function () {
|
39870 | cov_23p3xtit9c.f[0]++;
|
39871 | cov_23p3xtit9c.s[3]++;
|
39872 |
|
39873 | if ((cov_23p3xtit9c.b[1][0]++, videojsReference.browser.IS_IOS) || (cov_23p3xtit9c.b[1][1]++, videojsReference.browser.IS_ANDROID)) {
|
39874 | cov_23p3xtit9c.b[0][0]++;
|
39875 | cov_23p3xtit9c.s[4]++;
|
39876 | return false;
|
39877 | } else {
|
39878 | cov_23p3xtit9c.b[0][1]++;
|
39879 | cov_23p3xtit9c.s[5]++;
|
39880 |
|
39881 | if ((cov_23p3xtit9c.b[3][0]++, videojsReference.use) && (cov_23p3xtit9c.b[3][1]++, videojsReference.middleware) && (cov_23p3xtit9c.b[3][2]++, videojsReference.middleware.TERMINATOR)) {
|
39882 | cov_23p3xtit9c.b[2][0]++;
|
39883 | cov_23p3xtit9c.s[6]++;
|
39884 | return true;
|
39885 | } else {
|
39886 | cov_23p3xtit9c.b[2][1]++;
|
39887 | }
|
39888 | }
|
39889 |
|
39890 | cov_23p3xtit9c.s[7]++;
|
39891 | return false;
|
39892 | };
|
39893 |
|
39894 | cov_23p3xtit9c.s[8]++;
|
39895 |
|
39896 | obj$1.playMiddleware = function (player) {
|
39897 | cov_23p3xtit9c.f[1]++;
|
39898 | cov_23p3xtit9c.s[9]++;
|
39899 | return {
|
39900 | setSource: function setSource(srcObj, next) {
|
39901 | cov_23p3xtit9c.s[10]++;
|
39902 | next(null, srcObj);
|
39903 | },
|
39904 | callPlay: function callPlay() {
|
39905 | cov_23p3xtit9c.s[11]++;
|
39906 |
|
39907 | if ((cov_23p3xtit9c.b[5][0]++, player.ads) && (cov_23p3xtit9c.b[5][1]++, player.ads._shouldBlockPlay === true)) {
|
39908 | cov_23p3xtit9c.b[4][0]++;
|
39909 | cov_23p3xtit9c.s[12]++;
|
39910 | player.ads.debug('Using playMiddleware to block content playback');
|
39911 | cov_23p3xtit9c.s[13]++;
|
39912 | player.ads._playBlocked = true;
|
39913 | cov_23p3xtit9c.s[14]++;
|
39914 | return videojsReference.middleware.TERMINATOR;
|
39915 | } else {
|
39916 | cov_23p3xtit9c.b[4][1]++;
|
39917 | }
|
39918 | },
|
39919 | play: function play(terminated, playPromise) {
|
39920 | cov_23p3xtit9c.s[15]++;
|
39921 |
|
39922 | if ((cov_23p3xtit9c.b[7][0]++, player.ads) && (cov_23p3xtit9c.b[7][1]++, player.ads._playBlocked) && (cov_23p3xtit9c.b[7][2]++, terminated)) {
|
39923 | cov_23p3xtit9c.b[6][0]++;
|
39924 | cov_23p3xtit9c.s[16]++;
|
39925 | player.ads.debug('Play call to Tech was terminated.');
|
39926 | cov_23p3xtit9c.s[17]++;
|
39927 | player.trigger('play');
|
39928 | cov_23p3xtit9c.s[18]++;
|
39929 | player.addClass('vjs-has-started');
|
39930 | cov_23p3xtit9c.s[19]++;
|
39931 | player.ads._playBlocked = false;
|
39932 | } else {
|
39933 | cov_23p3xtit9c.b[6][1]++;
|
39934 | cov_23p3xtit9c.s[20]++;
|
39935 |
|
39936 | if ((cov_23p3xtit9c.b[9][0]++, playPromise) && (cov_23p3xtit9c.b[9][1]++, playPromise.catch)) {
|
39937 | cov_23p3xtit9c.b[8][0]++;
|
39938 | cov_23p3xtit9c.s[21]++;
|
39939 | playPromise.catch(function (e) {
|
39940 | cov_23p3xtit9c.f[2]++;
|
39941 | cov_23p3xtit9c.s[22]++;
|
39942 |
|
39943 | if ((cov_23p3xtit9c.b[11][0]++, e.name === 'NotAllowedError') && (cov_23p3xtit9c.b[11][1]++, !videojs$1.browser.IS_SAFARI)) {
|
39944 | cov_23p3xtit9c.b[10][0]++;
|
39945 | cov_23p3xtit9c.s[23]++;
|
39946 | player.trigger('pause');
|
39947 | } else {
|
39948 | cov_23p3xtit9c.b[10][1]++;
|
39949 | }
|
39950 | });
|
39951 | } else {
|
39952 | cov_23p3xtit9c.b[8][1]++;
|
39953 | }
|
39954 | }
|
39955 | }
|
39956 | };
|
39957 | };
|
39958 |
|
39959 | cov_23p3xtit9c.s[24]++;
|
39960 |
|
39961 | obj$1.testHook = function (testVjs) {
|
39962 | cov_23p3xtit9c.f[3]++;
|
39963 | cov_23p3xtit9c.s[25]++;
|
39964 | videojsReference = testVjs;
|
39965 | };
|
39966 |
|
39967 | QUnit.module('Play Middleware', {}, function () {
|
39968 | var baseMockedVjsNotSupported = {
|
39969 | use: function use() {},
|
39970 | VERSION: '5.0.0',
|
39971 | browser: {}
|
39972 | };
|
39973 | var baseMockedVjsIsSupported = {
|
39974 | use: function use() {},
|
39975 | VERSION: '6.7.3',
|
39976 | browser: {
|
39977 | IS_IOS: false,
|
39978 | IS_ANDROID: false
|
39979 | },
|
39980 | middleware: {
|
39981 | TERMINATOR: {
|
39982 | fake: 'terminator'
|
39983 | }
|
39984 | }
|
39985 | };
|
39986 | QUnit.module('Not supported unit tests', {
|
39987 | beforeEach: function beforeEach() {
|
39988 | this.videojs = videojs$1.mergeOptions({}, baseMockedVjsNotSupported);
|
39989 | },
|
39990 | afterEach: function afterEach() {
|
39991 | this.videojs = null;
|
39992 | }
|
39993 | }, function () {
|
39994 | QUnit.test('isMiddlewareMediatorSupported is false if old video.js version', function (assert) {
|
39995 |
|
39996 | obj$1.testHook(this.videojs);
|
39997 | assert.equal(obj$1.isMiddlewareMediatorSupported(), false, 'old video.js does not support middleware mediators');
|
39998 | });
|
39999 | QUnit.test('isMiddlewareMediatorSupported is false if on mobile', function (assert) {
|
40000 |
|
40001 | this.videojs.browser.IS_ANDROID = true;
|
40002 | this.videojs.browser.IS_IOS = false;
|
40003 | obj$1.testHook(this.videojs);
|
40004 | assert.equal(obj$1.isMiddlewareMediatorSupported(), false, 'is not supported on Android');
|
40005 |
|
40006 | this.videojs.browser.IS_ANDROID = false;
|
40007 | this.videojs.browser.IS_IOS = true;
|
40008 | obj$1.testHook(this.videojs);
|
40009 | assert.equal(obj$1.isMiddlewareMediatorSupported(), false, 'is not supported on iOS');
|
40010 | });
|
40011 | });
|
40012 | QUnit.module('Supported unit tests', {
|
40013 | beforeEach: function beforeEach() {
|
40014 | var _this = this;
|
40015 |
|
40016 |
|
40017 | this.videojs = videojs$1.mergeOptions({}, baseMockedVjsIsSupported);
|
40018 | obj$1.testHook(this.videojs);
|
40019 | this.triggeredEvent = null;
|
40020 | this.addedClass = null;
|
40021 |
|
40022 | this.player = {
|
40023 | ads: {
|
40024 | _shouldBlockPlay: false,
|
40025 | _playBlocked: false,
|
40026 | debug: function debug() {}
|
40027 | },
|
40028 | trigger: function trigger(event) {
|
40029 | _this.triggeredEvent = event;
|
40030 | },
|
40031 | addClass: function addClass(className) {
|
40032 | _this.addedClass = className;
|
40033 | }
|
40034 | };
|
40035 | this.sandbox = sinon.sandbox.create();
|
40036 | },
|
40037 | afterEach: function afterEach() {
|
40038 |
|
40039 | this.videojs = null;
|
40040 | this.sandbox.restore();
|
40041 | }
|
40042 | });
|
40043 | QUnit.test('isMiddlewareMediatorSupported is true if middleware mediators exist on desktop', function (assert) {
|
40044 | assert.equal(obj$1.isMiddlewareMediatorSupported(), true, 'is supported if middleware mediators exist and not mobile');
|
40045 | });
|
40046 | QUnit.test('playMiddleware returns with a setSource, callPlay and play method', function (assert) {
|
40047 | var m = obj$1.playMiddleware(this.player);
|
40048 | this.sandbox.stub(obj$1, 'isMiddlewareMediatorSupported').returns(true);
|
40049 | assert.equal(typeof m, 'object', 'returns an object');
|
40050 | assert.equal(typeof m.setSource, 'function', 'has setSource');
|
40051 | assert.equal(typeof m.callPlay, 'function', 'has callPlay');
|
40052 | assert.equal(typeof m.play, 'function', 'has play');
|
40053 | });
|
40054 | QUnit.test('playMiddleware callPlay will terminate if _shouldBlockPlay is true', function (assert) {
|
40055 | var m = obj$1.playMiddleware(this.player);
|
40056 | this.sandbox.stub(obj$1, 'isMiddlewareMediatorSupported').returns(true);
|
40057 | this.player.ads._shouldBlockPlay = true;
|
40058 | assert.equal(m.callPlay(), this.videojs.middleware.TERMINATOR, 'callPlay returns terminator');
|
40059 | assert.strictEqual(this.player.ads._playBlocked, true, '_playBlocked is set');
|
40060 | });
|
40061 | QUnit.test('playMiddleware callPlay will not terminate if _shouldBlockPlay is false', function (assert) {
|
40062 | var m = obj$1.playMiddleware(this.player);
|
40063 | this.sandbox.stub(obj$1, 'isMiddlewareMediatorSupported').returns(true);
|
40064 | this.player.ads._shouldBlockPlay = false;
|
40065 | assert.equal(m.callPlay(), undefined, 'callPlay should not return an object');
|
40066 | assert.notEqual(m.callPlay(), this.videojs.middleware.TERMINATOR, 'callPlay should not return the terminator');
|
40067 | assert.strictEqual(this.player.ads._playBlocked, false, '_playBlocked should not be set');
|
40068 | });
|
40069 | QUnit.test("playMiddleware callPlay will not terminate if the player doesn't have this plugin", function (assert) {
|
40070 | var _this2 = this;
|
40071 |
|
40072 | var nonAdsPlayer = {
|
40073 | trigger: function trigger(event) {
|
40074 | _this2.triggeredEvent = event;
|
40075 | },
|
40076 | addClass: function addClass(className) {
|
40077 | _this2.addedClass = className;
|
40078 | }
|
40079 | };
|
40080 | var m = obj$1.playMiddleware(nonAdsPlayer);
|
40081 | this.sandbox.stub(obj$1, 'isMiddlewareMediatorSupported').returns(true);
|
40082 | this.player.ads._shouldBlockPlay = true;
|
40083 | assert.equal(m.callPlay(), undefined, 'callPlay should not return an object');
|
40084 | assert.strictEqual(this.player.ads._playBlocked, false, '_playBlocked should not be set');
|
40085 | });
|
40086 | QUnit.test('playMiddleware play will trigger play event if callPlay terminates', function (assert) {
|
40087 | var m = obj$1.playMiddleware(this.player);
|
40088 | this.sandbox.stub(obj$1, 'isMiddlewareMediatorSupported').returns(true);
|
40089 | this.player.ads._shouldBlockPlay = true;
|
40090 |
|
40091 | this.player.ads._playBlocked = true;
|
40092 |
|
40093 | m.play(true, null);
|
40094 | assert.equal(this.triggeredEvent, 'play');
|
40095 | assert.equal(this.addedClass, 'vjs-has-started');
|
40096 | assert.equal(this.player.ads._playBlocked, false, '_playBlocked is reset');
|
40097 | });
|
40098 | QUnit.test('playMiddleware play will not trigger play event if another middleware terminated', function (assert) {
|
40099 | var m = obj$1.playMiddleware(this.player);
|
40100 | this.sandbox.stub(obj$1, 'isMiddlewareMediatorSupported').returns(true);
|
40101 |
|
40102 | this.player.ads._shouldBlockPlay = true;
|
40103 | this.player.ads._playBlocked = false;
|
40104 | this.sandbox.stub(m, 'callPlay').returns(undefined);
|
40105 |
|
40106 | m.play(true, null);
|
40107 | assert.equal(this.triggeredEvent, null, 'no events should be triggered');
|
40108 | assert.equal(this.addedClass, null, 'no classes should be added');
|
40109 | assert.equal(this.player.ads._playBlocked, false, '_playBlocked has not changed');
|
40110 | });
|
40111 | QUnit.test("playMiddleware play will not trigger play event if the player doesn't have this plugin", function (assert) {
|
40112 | var evt = null;
|
40113 | var cnm = null;
|
40114 | var nonAdsPlayer = {
|
40115 | trigger: function trigger(event) {
|
40116 | evt = event;
|
40117 | },
|
40118 | addClass: function addClass(className) {
|
40119 | cnm = className;
|
40120 | }
|
40121 | };
|
40122 | var m = obj$1.playMiddleware(nonAdsPlayer);
|
40123 | this.sandbox.stub(obj$1, 'isMiddlewareMediatorSupported').returns(true);
|
40124 | m.play(true, null);
|
40125 | assert.equal(evt, null, 'the play event should not have been triggered');
|
40126 | assert.equal(cnm, null, 'the class should not have been added');
|
40127 | });
|
40128 | QUnit.test("playMiddleware won't trigger play event if callPlay doesn't terminate", function (assert) {
|
40129 | var m = obj$1.playMiddleware(this.player);
|
40130 | var originalPlayBlocked = this.player.ads._playBlocked;
|
40131 | this.sandbox.stub(obj$1, 'isMiddlewareMediatorSupported').returns(true);
|
40132 | m.play(false, {});
|
40133 | assert.equal(this.triggeredEvent, null, 'no events should be triggered');
|
40134 | assert.equal(this.addedClass, null, 'no classes should be added');
|
40135 | assert.strictEqual(this.player.ads._playBlocked, originalPlayBlocked, '_playBlocked remains unchanged');
|
40136 | });
|
40137 | });
|
40138 |
|
40139 | var cov_1idm27vpwt = function () {
|
40140 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/redispatch.js',
|
40141 | hash = '21b0fdde3bf335348f74e88bbc2d50d0a4bfc2fd',
|
40142 | Function = function () {}.constructor,
|
40143 | global = new Function('return this')(),
|
40144 | gcv = '__coverage__',
|
40145 | coverageData = {
|
40146 | path: '/Users/poneill/dev/videojs-contrib-ads/src/redispatch.js',
|
40147 | statementMap: {
|
40148 | '0': {
|
40149 | start: {
|
40150 | line: 13,
|
40151 | column: 20
|
40152 | },
|
40153 | end: {
|
40154 | line: 21,
|
40155 | column: 1
|
40156 | }
|
40157 | },
|
40158 | '1': {
|
40159 | start: {
|
40160 | line: 14,
|
40161 | column: 2
|
40162 | },
|
40163 | end: {
|
40164 | line: 16,
|
40165 | column: 4
|
40166 | }
|
40167 | },
|
40168 | '2': {
|
40169 | start: {
|
40170 | line: 15,
|
40171 | column: 4
|
40172 | },
|
40173 | end: {
|
40174 | line: 15,
|
40175 | column: 16
|
40176 | }
|
40177 | },
|
40178 | '3': {
|
40179 | start: {
|
40180 | line: 17,
|
40181 | column: 2
|
40182 | },
|
40183 | end: {
|
40184 | line: 17,
|
40185 | column: 28
|
40186 | }
|
40187 | },
|
40188 | '4': {
|
40189 | start: {
|
40190 | line: 18,
|
40191 | column: 2
|
40192 | },
|
40193 | end: {
|
40194 | line: 20,
|
40195 | column: 4
|
40196 | }
|
40197 | },
|
40198 | '5': {
|
40199 | start: {
|
40200 | line: 19,
|
40201 | column: 4
|
40202 | },
|
40203 | end: {
|
40204 | line: 19,
|
40205 | column: 16
|
40206 | }
|
40207 | },
|
40208 | '6': {
|
40209 | start: {
|
40210 | line: 29,
|
40211 | column: 20
|
40212 | },
|
40213 | end: {
|
40214 | line: 35,
|
40215 | column: 1
|
40216 | }
|
40217 | },
|
40218 | '7': {
|
40219 | start: {
|
40220 | line: 30,
|
40221 | column: 2
|
40222 | },
|
40223 | end: {
|
40224 | line: 30,
|
40225 | column: 29
|
40226 | }
|
40227 | },
|
40228 | '8': {
|
40229 | start: {
|
40230 | line: 31,
|
40231 | column: 2
|
40232 | },
|
40233 | end: {
|
40234 | line: 34,
|
40235 | column: 5
|
40236 | }
|
40237 | },
|
40238 | '9': {
|
40239 | start: {
|
40240 | line: 42,
|
40241 | column: 22
|
40242 | },
|
40243 | end: {
|
40244 | line: 58,
|
40245 | column: 1
|
40246 | }
|
40247 | },
|
40248 | '10': {
|
40249 | start: {
|
40250 | line: 43,
|
40251 | column: 2
|
40252 | },
|
40253 | end: {
|
40254 | line: 57,
|
40255 | column: 3
|
40256 | }
|
40257 | },
|
40258 | '11': {
|
40259 | start: {
|
40260 | line: 45,
|
40261 | column: 4
|
40262 | },
|
40263 | end: {
|
40264 | line: 55,
|
40265 | column: 5
|
40266 | }
|
40267 | },
|
40268 | '12': {
|
40269 | start: {
|
40270 | line: 48,
|
40271 | column: 6
|
40272 | },
|
40273 | end: {
|
40274 | line: 50,
|
40275 | column: 7
|
40276 | }
|
40277 | },
|
40278 | '13': {
|
40279 | start: {
|
40280 | line: 49,
|
40281 | column: 8
|
40282 | },
|
40283 | end: {
|
40284 | line: 49,
|
40285 | column: 46
|
40286 | }
|
40287 | },
|
40288 | '14': {
|
40289 | start: {
|
40290 | line: 54,
|
40291 | column: 6
|
40292 | },
|
40293 | end: {
|
40294 | line: 54,
|
40295 | column: 39
|
40296 | }
|
40297 | },
|
40298 | '15': {
|
40299 | start: {
|
40300 | line: 65,
|
40301 | column: 20
|
40302 | },
|
40303 | end: {
|
40304 | line: 98,
|
40305 | column: 1
|
40306 | }
|
40307 | },
|
40308 | '16': {
|
40309 | start: {
|
40310 | line: 66,
|
40311 | column: 2
|
40312 | },
|
40313 | end: {
|
40314 | line: 97,
|
40315 | column: 3
|
40316 | }
|
40317 | },
|
40318 | '17': {
|
40319 | start: {
|
40320 | line: 73,
|
40321 | column: 4
|
40322 | },
|
40323 | end: {
|
40324 | line: 86,
|
40325 | column: 5
|
40326 | }
|
40327 | },
|
40328 | '18': {
|
40329 | start: {
|
40330 | line: 74,
|
40331 | column: 6
|
40332 | },
|
40333 | end: {
|
40334 | line: 74,
|
40335 | column: 33
|
40336 | }
|
40337 | },
|
40338 | '19': {
|
40339 | start: {
|
40340 | line: 81,
|
40341 | column: 6
|
40342 | },
|
40343 | end: {
|
40344 | line: 81,
|
40345 | column: 36
|
40346 | }
|
40347 | },
|
40348 | '20': {
|
40349 | start: {
|
40350 | line: 85,
|
40351 | column: 6
|
40352 | },
|
40353 | end: {
|
40354 | line: 85,
|
40355 | column: 39
|
40356 | }
|
40357 | },
|
40358 | '21': {
|
40359 | start: {
|
40360 | line: 89,
|
40361 | column: 9
|
40362 | },
|
40363 | end: {
|
40364 | line: 97,
|
40365 | column: 3
|
40366 | }
|
40367 | },
|
40368 | '22': {
|
40369 | start: {
|
40370 | line: 93,
|
40371 | column: 4
|
40372 | },
|
40373 | end: {
|
40374 | line: 93,
|
40375 | column: 42
|
40376 | }
|
40377 | },
|
40378 | '23': {
|
40379 | start: {
|
40380 | line: 96,
|
40381 | column: 4
|
40382 | },
|
40383 | end: {
|
40384 | line: 96,
|
40385 | column: 39
|
40386 | }
|
40387 | },
|
40388 | '24': {
|
40389 | start: {
|
40390 | line: 106,
|
40391 | column: 24
|
40392 | },
|
40393 | end: {
|
40394 | line: 126,
|
40395 | column: 1
|
40396 | }
|
40397 | },
|
40398 | '25': {
|
40399 | start: {
|
40400 | line: 109,
|
40401 | column: 2
|
40402 | },
|
40403 | end: {
|
40404 | line: 125,
|
40405 | column: 3
|
40406 | }
|
40407 | },
|
40408 | '26': {
|
40409 | start: {
|
40410 | line: 112,
|
40411 | column: 4
|
40412 | },
|
40413 | end: {
|
40414 | line: 112,
|
40415 | column: 11
|
40416 | }
|
40417 | },
|
40418 | '27': {
|
40419 | start: {
|
40420 | line: 115,
|
40421 | column: 9
|
40422 | },
|
40423 | end: {
|
40424 | line: 125,
|
40425 | column: 3
|
40426 | }
|
40427 | },
|
40428 | '28': {
|
40429 | start: {
|
40430 | line: 116,
|
40431 | column: 4
|
40432 | },
|
40433 | end: {
|
40434 | line: 116,
|
40435 | column: 37
|
40436 | }
|
40437 | },
|
40438 | '29': {
|
40439 | start: {
|
40440 | line: 119,
|
40441 | column: 9
|
40442 | },
|
40443 | end: {
|
40444 | line: 125,
|
40445 | column: 3
|
40446 | }
|
40447 | },
|
40448 | '30': {
|
40449 | start: {
|
40450 | line: 120,
|
40451 | column: 4
|
40452 | },
|
40453 | end: {
|
40454 | line: 120,
|
40455 | column: 11
|
40456 | }
|
40457 | },
|
40458 | '31': {
|
40459 | start: {
|
40460 | line: 124,
|
40461 | column: 4
|
40462 | },
|
40463 | end: {
|
40464 | line: 124,
|
40465 | column: 42
|
40466 | }
|
40467 | },
|
40468 | '32': {
|
40469 | start: {
|
40470 | line: 144,
|
40471 | column: 19
|
40472 | },
|
40473 | end: {
|
40474 | line: 152,
|
40475 | column: 1
|
40476 | }
|
40477 | },
|
40478 | '33': {
|
40479 | start: {
|
40480 | line: 145,
|
40481 | column: 2
|
40482 | },
|
40483 | end: {
|
40484 | line: 151,
|
40485 | column: 3
|
40486 | }
|
40487 | },
|
40488 | '34': {
|
40489 | start: {
|
40490 | line: 146,
|
40491 | column: 4
|
40492 | },
|
40493 | end: {
|
40494 | line: 146,
|
40495 | column: 37
|
40496 | }
|
40497 | },
|
40498 | '35': {
|
40499 | start: {
|
40500 | line: 149,
|
40501 | column: 9
|
40502 | },
|
40503 | end: {
|
40504 | line: 151,
|
40505 | column: 3
|
40506 | }
|
40507 | },
|
40508 | '36': {
|
40509 | start: {
|
40510 | line: 150,
|
40511 | column: 4
|
40512 | },
|
40513 | end: {
|
40514 | line: 150,
|
40515 | column: 42
|
40516 | }
|
40517 | },
|
40518 | '37': {
|
40519 | start: {
|
40520 | line: 159,
|
40521 | column: 2
|
40522 | },
|
40523 | end: {
|
40524 | line: 181,
|
40525 | column: 3
|
40526 | }
|
40527 | },
|
40528 | '38': {
|
40529 | start: {
|
40530 | line: 160,
|
40531 | column: 4
|
40532 | },
|
40533 | end: {
|
40534 | line: 160,
|
40535 | column: 31
|
40536 | }
|
40537 | },
|
40538 | '39': {
|
40539 | start: {
|
40540 | line: 161,
|
40541 | column: 9
|
40542 | },
|
40543 | end: {
|
40544 | line: 181,
|
40545 | column: 3
|
40546 | }
|
40547 | },
|
40548 | '40': {
|
40549 | start: {
|
40550 | line: 162,
|
40551 | column: 4
|
40552 | },
|
40553 | end: {
|
40554 | line: 162,
|
40555 | column: 29
|
40556 | }
|
40557 | },
|
40558 | '41': {
|
40559 | start: {
|
40560 | line: 163,
|
40561 | column: 9
|
40562 | },
|
40563 | end: {
|
40564 | line: 181,
|
40565 | column: 3
|
40566 | }
|
40567 | },
|
40568 | '42': {
|
40569 | start: {
|
40570 | line: 166,
|
40571 | column: 4
|
40572 | },
|
40573 | end: {
|
40574 | line: 166,
|
40575 | column: 33
|
40576 | }
|
40577 | },
|
40578 | '43': {
|
40579 | start: {
|
40580 | line: 167,
|
40581 | column: 9
|
40582 | },
|
40583 | end: {
|
40584 | line: 181,
|
40585 | column: 3
|
40586 | }
|
40587 | },
|
40588 | '44': {
|
40589 | start: {
|
40590 | line: 168,
|
40591 | column: 4
|
40592 | },
|
40593 | end: {
|
40594 | line: 168,
|
40595 | column: 28
|
40596 | }
|
40597 | },
|
40598 | '45': {
|
40599 | start: {
|
40600 | line: 171,
|
40601 | column: 9
|
40602 | },
|
40603 | end: {
|
40604 | line: 181,
|
40605 | column: 3
|
40606 | }
|
40607 | },
|
40608 | '46': {
|
40609 | start: {
|
40610 | line: 172,
|
40611 | column: 4
|
40612 | },
|
40613 | end: {
|
40614 | line: 180,
|
40615 | column: 5
|
40616 | }
|
40617 | },
|
40618 | '47': {
|
40619 | start: {
|
40620 | line: 175,
|
40621 | column: 6
|
40622 | },
|
40623 | end: {
|
40624 | line: 175,
|
40625 | column: 42
|
40626 | }
|
40627 | },
|
40628 | '48': {
|
40629 | start: {
|
40630 | line: 179,
|
40631 | column: 6
|
40632 | },
|
40633 | end: {
|
40634 | line: 179,
|
40635 | column: 37
|
40636 | }
|
40637 | }
|
40638 | },
|
40639 | fnMap: {
|
40640 | '0': {
|
40641 | name: '(anonymous_0)',
|
40642 | decl: {
|
40643 | start: {
|
40644 | line: 13,
|
40645 | column: 20
|
40646 | },
|
40647 | end: {
|
40648 | line: 13,
|
40649 | column: 21
|
40650 | }
|
40651 | },
|
40652 | loc: {
|
40653 | start: {
|
40654 | line: 13,
|
40655 | column: 39
|
40656 | },
|
40657 | end: {
|
40658 | line: 21,
|
40659 | column: 1
|
40660 | }
|
40661 | },
|
40662 | line: 13
|
40663 | },
|
40664 | '1': {
|
40665 | name: '(anonymous_1)',
|
40666 | decl: {
|
40667 | start: {
|
40668 | line: 14,
|
40669 | column: 40
|
40670 | },
|
40671 | end: {
|
40672 | line: 14,
|
40673 | column: 41
|
40674 | }
|
40675 | },
|
40676 | loc: {
|
40677 | start: {
|
40678 | line: 14,
|
40679 | column: 51
|
40680 | },
|
40681 | end: {
|
40682 | line: 16,
|
40683 | column: 3
|
40684 | }
|
40685 | },
|
40686 | line: 14
|
40687 | },
|
40688 | '2': {
|
40689 | name: '(anonymous_2)',
|
40690 | decl: {
|
40691 | start: {
|
40692 | line: 18,
|
40693 | column: 31
|
40694 | },
|
40695 | end: {
|
40696 | line: 18,
|
40697 | column: 32
|
40698 | }
|
40699 | },
|
40700 | loc: {
|
40701 | start: {
|
40702 | line: 18,
|
40703 | column: 42
|
40704 | },
|
40705 | end: {
|
40706 | line: 20,
|
40707 | column: 3
|
40708 | }
|
40709 | },
|
40710 | line: 18
|
40711 | },
|
40712 | '3': {
|
40713 | name: '(anonymous_3)',
|
40714 | decl: {
|
40715 | start: {
|
40716 | line: 29,
|
40717 | column: 20
|
40718 | },
|
40719 | end: {
|
40720 | line: 29,
|
40721 | column: 21
|
40722 | }
|
40723 | },
|
40724 | loc: {
|
40725 | start: {
|
40726 | line: 29,
|
40727 | column: 47
|
40728 | },
|
40729 | end: {
|
40730 | line: 35,
|
40731 | column: 1
|
40732 | }
|
40733 | },
|
40734 | line: 29
|
40735 | },
|
40736 | '4': {
|
40737 | name: '(anonymous_4)',
|
40738 | decl: {
|
40739 | start: {
|
40740 | line: 42,
|
40741 | column: 22
|
40742 | },
|
40743 | end: {
|
40744 | line: 42,
|
40745 | column: 23
|
40746 | }
|
40747 | },
|
40748 | loc: {
|
40749 | start: {
|
40750 | line: 42,
|
40751 | column: 41
|
40752 | },
|
40753 | end: {
|
40754 | line: 58,
|
40755 | column: 1
|
40756 | }
|
40757 | },
|
40758 | line: 42
|
40759 | },
|
40760 | '5': {
|
40761 | name: '(anonymous_5)',
|
40762 | decl: {
|
40763 | start: {
|
40764 | line: 65,
|
40765 | column: 20
|
40766 | },
|
40767 | end: {
|
40768 | line: 65,
|
40769 | column: 21
|
40770 | }
|
40771 | },
|
40772 | loc: {
|
40773 | start: {
|
40774 | line: 65,
|
40775 | column: 39
|
40776 | },
|
40777 | end: {
|
40778 | line: 98,
|
40779 | column: 1
|
40780 | }
|
40781 | },
|
40782 | line: 65
|
40783 | },
|
40784 | '6': {
|
40785 | name: '(anonymous_6)',
|
40786 | decl: {
|
40787 | start: {
|
40788 | line: 106,
|
40789 | column: 24
|
40790 | },
|
40791 | end: {
|
40792 | line: 106,
|
40793 | column: 25
|
40794 | }
|
40795 | },
|
40796 | loc: {
|
40797 | start: {
|
40798 | line: 106,
|
40799 | column: 43
|
40800 | },
|
40801 | end: {
|
40802 | line: 126,
|
40803 | column: 1
|
40804 | }
|
40805 | },
|
40806 | line: 106
|
40807 | },
|
40808 | '7': {
|
40809 | name: '(anonymous_7)',
|
40810 | decl: {
|
40811 | start: {
|
40812 | line: 144,
|
40813 | column: 19
|
40814 | },
|
40815 | end: {
|
40816 | line: 144,
|
40817 | column: 20
|
40818 | }
|
40819 | },
|
40820 | loc: {
|
40821 | start: {
|
40822 | line: 144,
|
40823 | column: 38
|
40824 | },
|
40825 | end: {
|
40826 | line: 152,
|
40827 | column: 1
|
40828 | }
|
40829 | },
|
40830 | line: 144
|
40831 | },
|
40832 | '8': {
|
40833 | name: 'redispatch',
|
40834 | decl: {
|
40835 | start: {
|
40836 | line: 156,
|
40837 | column: 24
|
40838 | },
|
40839 | end: {
|
40840 | line: 156,
|
40841 | column: 34
|
40842 | }
|
40843 | },
|
40844 | loc: {
|
40845 | start: {
|
40846 | line: 156,
|
40847 | column: 42
|
40848 | },
|
40849 | end: {
|
40850 | line: 183,
|
40851 | column: 1
|
40852 | }
|
40853 | },
|
40854 | line: 156
|
40855 | }
|
40856 | },
|
40857 | branchMap: {
|
40858 | '0': {
|
40859 | loc: {
|
40860 | start: {
|
40861 | line: 43,
|
40862 | column: 2
|
40863 | },
|
40864 | end: {
|
40865 | line: 57,
|
40866 | column: 3
|
40867 | }
|
40868 | },
|
40869 | type: 'if',
|
40870 | locations: [{
|
40871 | start: {
|
40872 | line: 43,
|
40873 | column: 2
|
40874 | },
|
40875 | end: {
|
40876 | line: 57,
|
40877 | column: 3
|
40878 | }
|
40879 | }, {
|
40880 | start: {
|
40881 | line: 43,
|
40882 | column: 2
|
40883 | },
|
40884 | end: {
|
40885 | line: 57,
|
40886 | column: 3
|
40887 | }
|
40888 | }],
|
40889 | line: 43
|
40890 | },
|
40891 | '1': {
|
40892 | loc: {
|
40893 | start: {
|
40894 | line: 45,
|
40895 | column: 4
|
40896 | },
|
40897 | end: {
|
40898 | line: 55,
|
40899 | column: 5
|
40900 | }
|
40901 | },
|
40902 | type: 'if',
|
40903 | locations: [{
|
40904 | start: {
|
40905 | line: 45,
|
40906 | column: 4
|
40907 | },
|
40908 | end: {
|
40909 | line: 55,
|
40910 | column: 5
|
40911 | }
|
40912 | }, {
|
40913 | start: {
|
40914 | line: 45,
|
40915 | column: 4
|
40916 | },
|
40917 | end: {
|
40918 | line: 55,
|
40919 | column: 5
|
40920 | }
|
40921 | }],
|
40922 | line: 45
|
40923 | },
|
40924 | '2': {
|
40925 | loc: {
|
40926 | start: {
|
40927 | line: 48,
|
40928 | column: 6
|
40929 | },
|
40930 | end: {
|
40931 | line: 50,
|
40932 | column: 7
|
40933 | }
|
40934 | },
|
40935 | type: 'if',
|
40936 | locations: [{
|
40937 | start: {
|
40938 | line: 48,
|
40939 | column: 6
|
40940 | },
|
40941 | end: {
|
40942 | line: 50,
|
40943 | column: 7
|
40944 | }
|
40945 | }, {
|
40946 | start: {
|
40947 | line: 48,
|
40948 | column: 6
|
40949 | },
|
40950 | end: {
|
40951 | line: 50,
|
40952 | column: 7
|
40953 | }
|
40954 | }],
|
40955 | line: 48
|
40956 | },
|
40957 | '3': {
|
40958 | loc: {
|
40959 | start: {
|
40960 | line: 66,
|
40961 | column: 2
|
40962 | },
|
40963 | end: {
|
40964 | line: 97,
|
40965 | column: 3
|
40966 | }
|
40967 | },
|
40968 | type: 'if',
|
40969 | locations: [{
|
40970 | start: {
|
40971 | line: 66,
|
40972 | column: 2
|
40973 | },
|
40974 | end: {
|
40975 | line: 97,
|
40976 | column: 3
|
40977 | }
|
40978 | }, {
|
40979 | start: {
|
40980 | line: 66,
|
40981 | column: 2
|
40982 | },
|
40983 | end: {
|
40984 | line: 97,
|
40985 | column: 3
|
40986 | }
|
40987 | }],
|
40988 | line: 66
|
40989 | },
|
40990 | '4': {
|
40991 | loc: {
|
40992 | start: {
|
40993 | line: 73,
|
40994 | column: 4
|
40995 | },
|
40996 | end: {
|
40997 | line: 86,
|
40998 | column: 5
|
40999 | }
|
41000 | },
|
41001 | type: 'if',
|
41002 | locations: [{
|
41003 | start: {
|
41004 | line: 73,
|
41005 | column: 4
|
41006 | },
|
41007 | end: {
|
41008 | line: 86,
|
41009 | column: 5
|
41010 | }
|
41011 | }, {
|
41012 | start: {
|
41013 | line: 73,
|
41014 | column: 4
|
41015 | },
|
41016 | end: {
|
41017 | line: 86,
|
41018 | column: 5
|
41019 | }
|
41020 | }],
|
41021 | line: 73
|
41022 | },
|
41023 | '5': {
|
41024 | loc: {
|
41025 | start: {
|
41026 | line: 89,
|
41027 | column: 9
|
41028 | },
|
41029 | end: {
|
41030 | line: 97,
|
41031 | column: 3
|
41032 | }
|
41033 | },
|
41034 | type: 'if',
|
41035 | locations: [{
|
41036 | start: {
|
41037 | line: 89,
|
41038 | column: 9
|
41039 | },
|
41040 | end: {
|
41041 | line: 97,
|
41042 | column: 3
|
41043 | }
|
41044 | }, {
|
41045 | start: {
|
41046 | line: 89,
|
41047 | column: 9
|
41048 | },
|
41049 | end: {
|
41050 | line: 97,
|
41051 | column: 3
|
41052 | }
|
41053 | }],
|
41054 | line: 89
|
41055 | },
|
41056 | '6': {
|
41057 | loc: {
|
41058 | start: {
|
41059 | line: 89,
|
41060 | column: 13
|
41061 | },
|
41062 | end: {
|
41063 | line: 89,
|
41064 | column: 70
|
41065 | }
|
41066 | },
|
41067 | type: 'binary-expr',
|
41068 | locations: [{
|
41069 | start: {
|
41070 | line: 89,
|
41071 | column: 13
|
41072 | },
|
41073 | end: {
|
41074 | line: 89,
|
41075 | column: 41
|
41076 | }
|
41077 | }, {
|
41078 | start: {
|
41079 | line: 89,
|
41080 | column: 45
|
41081 | },
|
41082 | end: {
|
41083 | line: 89,
|
41084 | column: 70
|
41085 | }
|
41086 | }],
|
41087 | line: 89
|
41088 | },
|
41089 | '7': {
|
41090 | loc: {
|
41091 | start: {
|
41092 | line: 109,
|
41093 | column: 2
|
41094 | },
|
41095 | end: {
|
41096 | line: 125,
|
41097 | column: 3
|
41098 | }
|
41099 | },
|
41100 | type: 'if',
|
41101 | locations: [{
|
41102 | start: {
|
41103 | line: 109,
|
41104 | column: 2
|
41105 | },
|
41106 | end: {
|
41107 | line: 125,
|
41108 | column: 3
|
41109 | }
|
41110 | }, {
|
41111 | start: {
|
41112 | line: 109,
|
41113 | column: 2
|
41114 | },
|
41115 | end: {
|
41116 | line: 125,
|
41117 | column: 3
|
41118 | }
|
41119 | }],
|
41120 | line: 109
|
41121 | },
|
41122 | '8': {
|
41123 | loc: {
|
41124 | start: {
|
41125 | line: 109,
|
41126 | column: 6
|
41127 | },
|
41128 | end: {
|
41129 | line: 111,
|
41130 | column: 81
|
41131 | }
|
41132 | },
|
41133 | type: 'binary-expr',
|
41134 | locations: [{
|
41135 | start: {
|
41136 | line: 109,
|
41137 | column: 6
|
41138 | },
|
41139 | end: {
|
41140 | line: 109,
|
41141 | column: 32
|
41142 | }
|
41143 | }, {
|
41144 | start: {
|
41145 | line: 109,
|
41146 | column: 36
|
41147 | },
|
41148 | end: {
|
41149 | line: 109,
|
41150 | column: 87
|
41151 | }
|
41152 | }, {
|
41153 | start: {
|
41154 | line: 110,
|
41155 | column: 6
|
41156 | },
|
41157 | end: {
|
41158 | line: 110,
|
41159 | column: 33
|
41160 | }
|
41161 | }, {
|
41162 | start: {
|
41163 | line: 110,
|
41164 | column: 37
|
41165 | },
|
41166 | end: {
|
41167 | line: 110,
|
41168 | column: 73
|
41169 | }
|
41170 | }, {
|
41171 | start: {
|
41172 | line: 111,
|
41173 | column: 6
|
41174 | },
|
41175 | end: {
|
41176 | line: 111,
|
41177 | column: 37
|
41178 | }
|
41179 | }, {
|
41180 | start: {
|
41181 | line: 111,
|
41182 | column: 41
|
41183 | },
|
41184 | end: {
|
41185 | line: 111,
|
41186 | column: 81
|
41187 | }
|
41188 | }],
|
41189 | line: 109
|
41190 | },
|
41191 | '9': {
|
41192 | loc: {
|
41193 | start: {
|
41194 | line: 115,
|
41195 | column: 9
|
41196 | },
|
41197 | end: {
|
41198 | line: 125,
|
41199 | column: 3
|
41200 | }
|
41201 | },
|
41202 | type: 'if',
|
41203 | locations: [{
|
41204 | start: {
|
41205 | line: 115,
|
41206 | column: 9
|
41207 | },
|
41208 | end: {
|
41209 | line: 125,
|
41210 | column: 3
|
41211 | }
|
41212 | }, {
|
41213 | start: {
|
41214 | line: 115,
|
41215 | column: 9
|
41216 | },
|
41217 | end: {
|
41218 | line: 125,
|
41219 | column: 3
|
41220 | }
|
41221 | }],
|
41222 | line: 115
|
41223 | },
|
41224 | '10': {
|
41225 | loc: {
|
41226 | start: {
|
41227 | line: 119,
|
41228 | column: 9
|
41229 | },
|
41230 | end: {
|
41231 | line: 125,
|
41232 | column: 3
|
41233 | }
|
41234 | },
|
41235 | type: 'if',
|
41236 | locations: [{
|
41237 | start: {
|
41238 | line: 119,
|
41239 | column: 9
|
41240 | },
|
41241 | end: {
|
41242 | line: 125,
|
41243 | column: 3
|
41244 | }
|
41245 | }, {
|
41246 | start: {
|
41247 | line: 119,
|
41248 | column: 9
|
41249 | },
|
41250 | end: {
|
41251 | line: 125,
|
41252 | column: 3
|
41253 | }
|
41254 | }],
|
41255 | line: 119
|
41256 | },
|
41257 | '11': {
|
41258 | loc: {
|
41259 | start: {
|
41260 | line: 145,
|
41261 | column: 2
|
41262 | },
|
41263 | end: {
|
41264 | line: 151,
|
41265 | column: 3
|
41266 | }
|
41267 | },
|
41268 | type: 'if',
|
41269 | locations: [{
|
41270 | start: {
|
41271 | line: 145,
|
41272 | column: 2
|
41273 | },
|
41274 | end: {
|
41275 | line: 151,
|
41276 | column: 3
|
41277 | }
|
41278 | }, {
|
41279 | start: {
|
41280 | line: 145,
|
41281 | column: 2
|
41282 | },
|
41283 | end: {
|
41284 | line: 151,
|
41285 | column: 3
|
41286 | }
|
41287 | }],
|
41288 | line: 145
|
41289 | },
|
41290 | '12': {
|
41291 | loc: {
|
41292 | start: {
|
41293 | line: 149,
|
41294 | column: 9
|
41295 | },
|
41296 | end: {
|
41297 | line: 151,
|
41298 | column: 3
|
41299 | }
|
41300 | },
|
41301 | type: 'if',
|
41302 | locations: [{
|
41303 | start: {
|
41304 | line: 149,
|
41305 | column: 9
|
41306 | },
|
41307 | end: {
|
41308 | line: 151,
|
41309 | column: 3
|
41310 | }
|
41311 | }, {
|
41312 | start: {
|
41313 | line: 149,
|
41314 | column: 9
|
41315 | },
|
41316 | end: {
|
41317 | line: 151,
|
41318 | column: 3
|
41319 | }
|
41320 | }],
|
41321 | line: 149
|
41322 | },
|
41323 | '13': {
|
41324 | loc: {
|
41325 | start: {
|
41326 | line: 159,
|
41327 | column: 2
|
41328 | },
|
41329 | end: {
|
41330 | line: 181,
|
41331 | column: 3
|
41332 | }
|
41333 | },
|
41334 | type: 'if',
|
41335 | locations: [{
|
41336 | start: {
|
41337 | line: 159,
|
41338 | column: 2
|
41339 | },
|
41340 | end: {
|
41341 | line: 181,
|
41342 | column: 3
|
41343 | }
|
41344 | }, {
|
41345 | start: {
|
41346 | line: 159,
|
41347 | column: 2
|
41348 | },
|
41349 | end: {
|
41350 | line: 181,
|
41351 | column: 3
|
41352 | }
|
41353 | }],
|
41354 | line: 159
|
41355 | },
|
41356 | '14': {
|
41357 | loc: {
|
41358 | start: {
|
41359 | line: 161,
|
41360 | column: 9
|
41361 | },
|
41362 | end: {
|
41363 | line: 181,
|
41364 | column: 3
|
41365 | }
|
41366 | },
|
41367 | type: 'if',
|
41368 | locations: [{
|
41369 | start: {
|
41370 | line: 161,
|
41371 | column: 9
|
41372 | },
|
41373 | end: {
|
41374 | line: 181,
|
41375 | column: 3
|
41376 | }
|
41377 | }, {
|
41378 | start: {
|
41379 | line: 161,
|
41380 | column: 9
|
41381 | },
|
41382 | end: {
|
41383 | line: 181,
|
41384 | column: 3
|
41385 | }
|
41386 | }],
|
41387 | line: 161
|
41388 | },
|
41389 | '15': {
|
41390 | loc: {
|
41391 | start: {
|
41392 | line: 163,
|
41393 | column: 9
|
41394 | },
|
41395 | end: {
|
41396 | line: 181,
|
41397 | column: 3
|
41398 | }
|
41399 | },
|
41400 | type: 'if',
|
41401 | locations: [{
|
41402 | start: {
|
41403 | line: 163,
|
41404 | column: 9
|
41405 | },
|
41406 | end: {
|
41407 | line: 181,
|
41408 | column: 3
|
41409 | }
|
41410 | }, {
|
41411 | start: {
|
41412 | line: 163,
|
41413 | column: 9
|
41414 | },
|
41415 | end: {
|
41416 | line: 181,
|
41417 | column: 3
|
41418 | }
|
41419 | }],
|
41420 | line: 163
|
41421 | },
|
41422 | '16': {
|
41423 | loc: {
|
41424 | start: {
|
41425 | line: 163,
|
41426 | column: 13
|
41427 | },
|
41428 | end: {
|
41429 | line: 165,
|
41430 | column: 44
|
41431 | }
|
41432 | },
|
41433 | type: 'binary-expr',
|
41434 | locations: [{
|
41435 | start: {
|
41436 | line: 163,
|
41437 | column: 13
|
41438 | },
|
41439 | end: {
|
41440 | line: 163,
|
41441 | column: 39
|
41442 | }
|
41443 | }, {
|
41444 | start: {
|
41445 | line: 164,
|
41446 | column: 13
|
41447 | },
|
41448 | end: {
|
41449 | line: 164,
|
41450 | column: 40
|
41451 | }
|
41452 | }, {
|
41453 | start: {
|
41454 | line: 165,
|
41455 | column: 13
|
41456 | },
|
41457 | end: {
|
41458 | line: 165,
|
41459 | column: 44
|
41460 | }
|
41461 | }],
|
41462 | line: 163
|
41463 | },
|
41464 | '17': {
|
41465 | loc: {
|
41466 | start: {
|
41467 | line: 167,
|
41468 | column: 9
|
41469 | },
|
41470 | end: {
|
41471 | line: 181,
|
41472 | column: 3
|
41473 | }
|
41474 | },
|
41475 | type: 'if',
|
41476 | locations: [{
|
41477 | start: {
|
41478 | line: 167,
|
41479 | column: 9
|
41480 | },
|
41481 | end: {
|
41482 | line: 181,
|
41483 | column: 3
|
41484 | }
|
41485 | }, {
|
41486 | start: {
|
41487 | line: 167,
|
41488 | column: 9
|
41489 | },
|
41490 | end: {
|
41491 | line: 181,
|
41492 | column: 3
|
41493 | }
|
41494 | }],
|
41495 | line: 167
|
41496 | },
|
41497 | '18': {
|
41498 | loc: {
|
41499 | start: {
|
41500 | line: 171,
|
41501 | column: 9
|
41502 | },
|
41503 | end: {
|
41504 | line: 181,
|
41505 | column: 3
|
41506 | }
|
41507 | },
|
41508 | type: 'if',
|
41509 | locations: [{
|
41510 | start: {
|
41511 | line: 171,
|
41512 | column: 9
|
41513 | },
|
41514 | end: {
|
41515 | line: 181,
|
41516 | column: 3
|
41517 | }
|
41518 | }, {
|
41519 | start: {
|
41520 | line: 171,
|
41521 | column: 9
|
41522 | },
|
41523 | end: {
|
41524 | line: 181,
|
41525 | column: 3
|
41526 | }
|
41527 | }],
|
41528 | line: 171
|
41529 | },
|
41530 | '19': {
|
41531 | loc: {
|
41532 | start: {
|
41533 | line: 172,
|
41534 | column: 4
|
41535 | },
|
41536 | end: {
|
41537 | line: 180,
|
41538 | column: 5
|
41539 | }
|
41540 | },
|
41541 | type: 'if',
|
41542 | locations: [{
|
41543 | start: {
|
41544 | line: 172,
|
41545 | column: 4
|
41546 | },
|
41547 | end: {
|
41548 | line: 180,
|
41549 | column: 5
|
41550 | }
|
41551 | }, {
|
41552 | start: {
|
41553 | line: 172,
|
41554 | column: 4
|
41555 | },
|
41556 | end: {
|
41557 | line: 180,
|
41558 | column: 5
|
41559 | }
|
41560 | }],
|
41561 | line: 172
|
41562 | }
|
41563 | },
|
41564 | s: {
|
41565 | '0': 0,
|
41566 | '1': 0,
|
41567 | '2': 0,
|
41568 | '3': 0,
|
41569 | '4': 0,
|
41570 | '5': 0,
|
41571 | '6': 0,
|
41572 | '7': 0,
|
41573 | '8': 0,
|
41574 | '9': 0,
|
41575 | '10': 0,
|
41576 | '11': 0,
|
41577 | '12': 0,
|
41578 | '13': 0,
|
41579 | '14': 0,
|
41580 | '15': 0,
|
41581 | '16': 0,
|
41582 | '17': 0,
|
41583 | '18': 0,
|
41584 | '19': 0,
|
41585 | '20': 0,
|
41586 | '21': 0,
|
41587 | '22': 0,
|
41588 | '23': 0,
|
41589 | '24': 0,
|
41590 | '25': 0,
|
41591 | '26': 0,
|
41592 | '27': 0,
|
41593 | '28': 0,
|
41594 | '29': 0,
|
41595 | '30': 0,
|
41596 | '31': 0,
|
41597 | '32': 0,
|
41598 | '33': 0,
|
41599 | '34': 0,
|
41600 | '35': 0,
|
41601 | '36': 0,
|
41602 | '37': 0,
|
41603 | '38': 0,
|
41604 | '39': 0,
|
41605 | '40': 0,
|
41606 | '41': 0,
|
41607 | '42': 0,
|
41608 | '43': 0,
|
41609 | '44': 0,
|
41610 | '45': 0,
|
41611 | '46': 0,
|
41612 | '47': 0,
|
41613 | '48': 0
|
41614 | },
|
41615 | f: {
|
41616 | '0': 0,
|
41617 | '1': 0,
|
41618 | '2': 0,
|
41619 | '3': 0,
|
41620 | '4': 0,
|
41621 | '5': 0,
|
41622 | '6': 0,
|
41623 | '7': 0,
|
41624 | '8': 0
|
41625 | },
|
41626 | b: {
|
41627 | '0': [0, 0],
|
41628 | '1': [0, 0],
|
41629 | '2': [0, 0],
|
41630 | '3': [0, 0],
|
41631 | '4': [0, 0],
|
41632 | '5': [0, 0],
|
41633 | '6': [0, 0],
|
41634 | '7': [0, 0],
|
41635 | '8': [0, 0, 0, 0, 0, 0],
|
41636 | '9': [0, 0],
|
41637 | '10': [0, 0],
|
41638 | '11': [0, 0],
|
41639 | '12': [0, 0],
|
41640 | '13': [0, 0],
|
41641 | '14': [0, 0],
|
41642 | '15': [0, 0],
|
41643 | '16': [0, 0, 0],
|
41644 | '17': [0, 0],
|
41645 | '18': [0, 0],
|
41646 | '19': [0, 0]
|
41647 | },
|
41648 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
41649 | },
|
41650 | coverage = global[gcv] || (global[gcv] = {});
|
41651 |
|
41652 | if (coverage[path] && coverage[path].hash === hash) {
|
41653 | return coverage[path];
|
41654 | }
|
41655 |
|
41656 | coverageData.hash = hash;
|
41657 | return coverage[path] = coverageData;
|
41658 | }();
|
41659 |
|
41660 | cov_1idm27vpwt.s[0]++;
|
41661 |
|
41662 | var cancelEvent = function cancelEvent(player, event) {
|
41663 | cov_1idm27vpwt.f[0]++;
|
41664 | cov_1idm27vpwt.s[1]++;
|
41665 |
|
41666 | event.isImmediatePropagationStopped = function () {
|
41667 | cov_1idm27vpwt.f[1]++;
|
41668 | cov_1idm27vpwt.s[2]++;
|
41669 | return true;
|
41670 | };
|
41671 |
|
41672 | cov_1idm27vpwt.s[3]++;
|
41673 | event.cancelBubble = true;
|
41674 | cov_1idm27vpwt.s[4]++;
|
41675 |
|
41676 | event.isPropagationStopped = function () {
|
41677 | cov_1idm27vpwt.f[2]++;
|
41678 | cov_1idm27vpwt.s[5]++;
|
41679 | return true;
|
41680 | };
|
41681 | };
|
41682 |
|
41683 | cov_1idm27vpwt.s[6]++;
|
41684 |
|
41685 | var prefixEvent = function prefixEvent(player, prefix, event) {
|
41686 | cov_1idm27vpwt.f[3]++;
|
41687 | cov_1idm27vpwt.s[7]++;
|
41688 | cancelEvent(player, event);
|
41689 | cov_1idm27vpwt.s[8]++;
|
41690 | player.trigger({
|
41691 | type: prefix + event.type,
|
41692 | originalEvent: event
|
41693 | });
|
41694 | };
|
41695 |
|
41696 | cov_1idm27vpwt.s[9]++;
|
41697 |
|
41698 | var handlePlaying = function handlePlaying(player, event) {
|
41699 | cov_1idm27vpwt.f[4]++;
|
41700 | cov_1idm27vpwt.s[10]++;
|
41701 |
|
41702 | if (player.ads.isInAdMode()) {
|
41703 | cov_1idm27vpwt.b[0][0]++;
|
41704 | cov_1idm27vpwt.s[11]++;
|
41705 |
|
41706 | if (player.ads.isContentResuming()) {
|
41707 | cov_1idm27vpwt.b[1][0]++;
|
41708 | cov_1idm27vpwt.s[12]++;
|
41709 |
|
41710 | if (player.ads._contentEnding) {
|
41711 | cov_1idm27vpwt.b[2][0]++;
|
41712 | cov_1idm27vpwt.s[13]++;
|
41713 | prefixEvent(player, 'content', event);
|
41714 | } else {
|
41715 | cov_1idm27vpwt.b[2][1]++;
|
41716 | }
|
41717 | } else {
|
41718 | cov_1idm27vpwt.b[1][1]++;
|
41719 | cov_1idm27vpwt.s[14]++;
|
41720 | prefixEvent(player, 'ad', event);
|
41721 | }
|
41722 | } else {
|
41723 | cov_1idm27vpwt.b[0][1]++;
|
41724 | }
|
41725 | };
|
41726 |
|
41727 | cov_1idm27vpwt.s[15]++;
|
41728 |
|
41729 | var handleEnded = function handleEnded(player, event) {
|
41730 | cov_1idm27vpwt.f[5]++;
|
41731 | cov_1idm27vpwt.s[16]++;
|
41732 |
|
41733 | if (player.ads.isInAdMode()) {
|
41734 | cov_1idm27vpwt.b[3][0]++;
|
41735 | cov_1idm27vpwt.s[17]++;
|
41736 |
|
41737 | if (player.ads.isContentResuming()) {
|
41738 | cov_1idm27vpwt.b[4][0]++;
|
41739 | cov_1idm27vpwt.s[18]++;
|
41740 | cancelEvent(player, event);
|
41741 | cov_1idm27vpwt.s[19]++;
|
41742 | player.trigger('resumeended');
|
41743 | } else {
|
41744 | cov_1idm27vpwt.b[4][1]++;
|
41745 | cov_1idm27vpwt.s[20]++;
|
41746 | prefixEvent(player, 'ad', event);
|
41747 | }
|
41748 | } else {
|
41749 | cov_1idm27vpwt.b[3][1]++;
|
41750 | cov_1idm27vpwt.s[21]++;
|
41751 |
|
41752 | if ((cov_1idm27vpwt.b[6][0]++, !player.ads._contentHasEnded) && (cov_1idm27vpwt.b[6][1]++, !player.ads.stitchedAds())) {
|
41753 | cov_1idm27vpwt.b[5][0]++;
|
41754 | cov_1idm27vpwt.s[22]++;
|
41755 | prefixEvent(player, 'content', event);
|
41756 | cov_1idm27vpwt.s[23]++;
|
41757 | player.trigger('readyforpostroll');
|
41758 | } else {
|
41759 | cov_1idm27vpwt.b[5][1]++;
|
41760 | }
|
41761 | }
|
41762 | };
|
41763 |
|
41764 | cov_1idm27vpwt.s[24]++;
|
41765 |
|
41766 | var handleLoadEvent = function handleLoadEvent(player, event) {
|
41767 | cov_1idm27vpwt.f[6]++;
|
41768 | cov_1idm27vpwt.s[25]++;
|
41769 |
|
41770 | if ((cov_1idm27vpwt.b[8][0]++, event.type === 'loadstart') && (cov_1idm27vpwt.b[8][1]++, !player.ads._hasThereBeenALoadStartDuringPlayerLife) || (cov_1idm27vpwt.b[8][2]++, event.type === 'loadeddata') && (cov_1idm27vpwt.b[8][3]++, !player.ads._hasThereBeenALoadedData) || (cov_1idm27vpwt.b[8][4]++, event.type === 'loadedmetadata') && (cov_1idm27vpwt.b[8][5]++, !player.ads._hasThereBeenALoadedMetaData)) {
|
41771 | cov_1idm27vpwt.b[7][0]++;
|
41772 | cov_1idm27vpwt.s[26]++;
|
41773 | return;
|
41774 | } else {
|
41775 | cov_1idm27vpwt.b[7][1]++;
|
41776 | cov_1idm27vpwt.s[27]++;
|
41777 |
|
41778 | if (player.ads.inAdBreak()) {
|
41779 | cov_1idm27vpwt.b[9][0]++;
|
41780 | cov_1idm27vpwt.s[28]++;
|
41781 | prefixEvent(player, 'ad', event);
|
41782 | } else {
|
41783 | cov_1idm27vpwt.b[9][1]++;
|
41784 | cov_1idm27vpwt.s[29]++;
|
41785 |
|
41786 | if (player.currentSrc() !== player.ads.contentSrc) {
|
41787 | cov_1idm27vpwt.b[10][0]++;
|
41788 | cov_1idm27vpwt.s[30]++;
|
41789 | return;
|
41790 | } else {
|
41791 | cov_1idm27vpwt.b[10][1]++;
|
41792 | cov_1idm27vpwt.s[31]++;
|
41793 | prefixEvent(player, 'content', event);
|
41794 | }
|
41795 | }
|
41796 | }
|
41797 | };
|
41798 |
|
41799 | cov_1idm27vpwt.s[32]++;
|
41800 |
|
41801 | var handlePlay = function handlePlay(player, event) {
|
41802 | cov_1idm27vpwt.f[7]++;
|
41803 | cov_1idm27vpwt.s[33]++;
|
41804 |
|
41805 | if (player.ads.inAdBreak()) {
|
41806 | cov_1idm27vpwt.b[11][0]++;
|
41807 | cov_1idm27vpwt.s[34]++;
|
41808 | prefixEvent(player, 'ad', event);
|
41809 | } else {
|
41810 | cov_1idm27vpwt.b[11][1]++;
|
41811 | cov_1idm27vpwt.s[35]++;
|
41812 |
|
41813 | if (player.ads.isContentResuming()) {
|
41814 | cov_1idm27vpwt.b[12][0]++;
|
41815 | cov_1idm27vpwt.s[36]++;
|
41816 | prefixEvent(player, 'content', event);
|
41817 | } else {
|
41818 | cov_1idm27vpwt.b[12][1]++;
|
41819 | }
|
41820 | }
|
41821 | };
|
41822 |
|
41823 | function redispatch(event) {
|
41824 | cov_1idm27vpwt.f[8]++;
|
41825 | cov_1idm27vpwt.s[37]++;
|
41826 |
|
41827 | if (event.type === 'playing') {
|
41828 | cov_1idm27vpwt.b[13][0]++;
|
41829 | cov_1idm27vpwt.s[38]++;
|
41830 | handlePlaying(this, event);
|
41831 | } else {
|
41832 | cov_1idm27vpwt.b[13][1]++;
|
41833 | cov_1idm27vpwt.s[39]++;
|
41834 |
|
41835 | if (event.type === 'ended') {
|
41836 | cov_1idm27vpwt.b[14][0]++;
|
41837 | cov_1idm27vpwt.s[40]++;
|
41838 | handleEnded(this, event);
|
41839 | } else {
|
41840 | cov_1idm27vpwt.b[14][1]++;
|
41841 | cov_1idm27vpwt.s[41]++;
|
41842 |
|
41843 | if ((cov_1idm27vpwt.b[16][0]++, event.type === 'loadstart') || (cov_1idm27vpwt.b[16][1]++, event.type === 'loadeddata') || (cov_1idm27vpwt.b[16][2]++, event.type === 'loadedmetadata')) {
|
41844 | cov_1idm27vpwt.b[15][0]++;
|
41845 | cov_1idm27vpwt.s[42]++;
|
41846 | handleLoadEvent(this, event);
|
41847 | } else {
|
41848 | cov_1idm27vpwt.b[15][1]++;
|
41849 | cov_1idm27vpwt.s[43]++;
|
41850 |
|
41851 | if (event.type === 'play') {
|
41852 | cov_1idm27vpwt.b[17][0]++;
|
41853 | cov_1idm27vpwt.s[44]++;
|
41854 | handlePlay(this, event);
|
41855 | } else {
|
41856 | cov_1idm27vpwt.b[17][1]++;
|
41857 | cov_1idm27vpwt.s[45]++;
|
41858 |
|
41859 | if (this.ads.isInAdMode()) {
|
41860 | cov_1idm27vpwt.b[18][0]++;
|
41861 | cov_1idm27vpwt.s[46]++;
|
41862 |
|
41863 | if (this.ads.isContentResuming()) {
|
41864 | cov_1idm27vpwt.b[19][0]++;
|
41865 | cov_1idm27vpwt.s[47]++;
|
41866 | prefixEvent(this, 'content', event);
|
41867 | } else {
|
41868 | cov_1idm27vpwt.b[19][1]++;
|
41869 | cov_1idm27vpwt.s[48]++;
|
41870 | prefixEvent(this, 'ad', event);
|
41871 | }
|
41872 | } else {
|
41873 | cov_1idm27vpwt.b[18][1]++;
|
41874 | }
|
41875 | }
|
41876 | }
|
41877 | }
|
41878 | }
|
41879 | }
|
41880 |
|
41881 | QUnit.module('Redispatch', {
|
41882 | beforeEach: function beforeEach(assert) {
|
41883 |
|
41884 |
|
41885 |
|
41886 | var eventBuffer = [];
|
41887 |
|
41888 | this.player = {
|
41889 | trigger: function trigger(event) {
|
41890 | eventBuffer.push(event);
|
41891 | },
|
41892 | currentSrc: function currentSrc() {
|
41893 | return 'my vid';
|
41894 | },
|
41895 | ads: {
|
41896 | snapshot: {
|
41897 | ended: false,
|
41898 | currentSrc: 'my vid'
|
41899 | },
|
41900 | videoElementRecycled: function videoElementRecycled() {
|
41901 | return false;
|
41902 | },
|
41903 | stitchedAds: function stitchedAds() {
|
41904 | return false;
|
41905 | },
|
41906 | isResumingAfterNoPreroll: function isResumingAfterNoPreroll() {
|
41907 | return false;
|
41908 | }
|
41909 | }
|
41910 | };
|
41911 |
|
41912 | this.redispatch = function (type) {
|
41913 | var event = {
|
41914 | type: type
|
41915 | };
|
41916 | eventBuffer = [];
|
41917 | redispatch.call(this.player, event);
|
41918 |
|
41919 | if (eventBuffer.length === 1) {
|
41920 | return eventBuffer[0].type;
|
41921 | } else if (event.cancelBubble) {
|
41922 | return 'cancelled';
|
41923 | } else if (eventBuffer.length === 0) {
|
41924 | return 'ignored';
|
41925 | }
|
41926 |
|
41927 | throw new Error('Event buffer has more than 1 event');
|
41928 | };
|
41929 | },
|
41930 | afterEach: function afterEach(assert) {
|
41931 |
|
41932 | this.player = null;
|
41933 | this.redispatch = null;
|
41934 | }
|
41935 | });
|
41936 | QUnit.test('playing event in different ad states', function (assert) {
|
41937 | this.player.ads.isInAdMode = function () {
|
41938 | return false;
|
41939 | };
|
41940 |
|
41941 | this.player.ads.isContentResuming = function () {
|
41942 | return false;
|
41943 | };
|
41944 |
|
41945 | assert.equal(this.redispatch('playing'), 'ignored');
|
41946 |
|
41947 | this.player.ads.isInAdMode = function () {
|
41948 | return true;
|
41949 | };
|
41950 |
|
41951 | this.player.ads.isContentResuming = function () {
|
41952 | return false;
|
41953 | };
|
41954 |
|
41955 | assert.equal(this.redispatch('playing'), 'adplaying');
|
41956 |
|
41957 | this.player.ads.isInAdMode = function () {
|
41958 | return true;
|
41959 | };
|
41960 |
|
41961 | this.player.ads.isContentResuming = function () {
|
41962 | return true;
|
41963 | };
|
41964 |
|
41965 | assert.equal(this.redispatch('playing'), 'ignored');
|
41966 | });
|
41967 | QUnit.test('play events in different states', function (assert) {
|
41968 | this.player.ads.inAdBreak = function () {
|
41969 | return false;
|
41970 | };
|
41971 |
|
41972 | this.player.ads.isInAdMode = function () {
|
41973 | return true;
|
41974 | };
|
41975 |
|
41976 | this.player.ads.isContentResuming = function () {
|
41977 | return true;
|
41978 | };
|
41979 |
|
41980 | assert.equal(this.redispatch('play'), 'contentplay', 'should be contentplay when content is resuming');
|
41981 |
|
41982 | this.player.ads.inAdBreak = function () {
|
41983 | return false;
|
41984 | };
|
41985 |
|
41986 | this.player.ads.isInAdMode = function () {
|
41987 | return false;
|
41988 | };
|
41989 |
|
41990 | this.player.ads.isContentResuming = function () {
|
41991 | return false;
|
41992 | };
|
41993 |
|
41994 | this.player.ads._playRequested = false;
|
41995 | assert.strictEqual(this.redispatch('play'), 'ignored', "should not be redispatched if play hasn't been requested yet");
|
41996 |
|
41997 | this.player.ads.inAdBreak = function () {
|
41998 | return false;
|
41999 | };
|
42000 |
|
42001 | this.player.ads.isInAdMode = function () {
|
42002 | return false;
|
42003 | };
|
42004 |
|
42005 | this.player.ads.isContentResuming = function () {
|
42006 | return false;
|
42007 | };
|
42008 |
|
42009 | this.player.ads._playRequested = true;
|
42010 | assert.strictEqual(this.redispatch('play'), 'ignored', 'should not be redispatched if in content state');
|
42011 |
|
42012 | this.player.ads.inAdBreak = function () {
|
42013 | return false;
|
42014 | };
|
42015 |
|
42016 | this.player.ads.isInAdMode = function () {
|
42017 | return true;
|
42018 | };
|
42019 |
|
42020 | this.player.ads.isContentResuming = function () {
|
42021 | return false;
|
42022 | };
|
42023 |
|
42024 | this.player.ads._playRequested = true;
|
42025 | assert.strictEqual(this.redispatch('play'), 'ignored', 'should not prefix when not in an ad break');
|
42026 |
|
42027 | this.player.ads.inAdBreak = function () {
|
42028 | return true;
|
42029 | };
|
42030 |
|
42031 | this.player.ads.isInAdMode = function () {
|
42032 | return true;
|
42033 | };
|
42034 |
|
42035 | this.player.ads.isContentResuming = function () {
|
42036 | return false;
|
42037 | };
|
42038 |
|
42039 | this.player.ads._playRequested = true;
|
42040 | assert.strictEqual(this.redispatch('play'), 'adplay', 'should be adplay when in an ad break');
|
42041 | });
|
42042 |
|
42043 | var cov_1r7ui7f41z = function () {
|
42044 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/contentupdate.js',
|
42045 | hash = 'a20241c5ef34a1921dde0807f39608bec6d17a5a',
|
42046 | Function = function () {}.constructor,
|
42047 | global = new Function('return this')(),
|
42048 | gcv = '__coverage__',
|
42049 | coverageData = {
|
42050 | path: '/Users/poneill/dev/videojs-contrib-ads/src/contentupdate.js',
|
42051 | statementMap: {
|
42052 | '0': {
|
42053 | start: {
|
42054 | line: 12,
|
42055 | column: 2
|
42056 | },
|
42057 | end: {
|
42058 | line: 12,
|
42059 | column: 46
|
42060 | }
|
42061 | },
|
42062 | '1': {
|
42063 | start: {
|
42064 | line: 14,
|
42065 | column: 2
|
42066 | },
|
42067 | end: {
|
42068 | line: 14,
|
42069 | column: 43
|
42070 | }
|
42071 | },
|
42072 | '2': {
|
42073 | start: {
|
42074 | line: 17,
|
42075 | column: 19
|
42076 | },
|
42077 | end: {
|
42078 | line: 39,
|
42079 | column: 3
|
42080 | }
|
42081 | },
|
42082 | '3': {
|
42083 | start: {
|
42084 | line: 18,
|
42085 | column: 4
|
42086 | },
|
42087 | end: {
|
42088 | line: 38,
|
42089 | column: 5
|
42090 | }
|
42091 | },
|
42092 | '4': {
|
42093 | start: {
|
42094 | line: 19,
|
42095 | column: 18
|
42096 | },
|
42097 | end: {
|
42098 | line: 19,
|
42099 | column: 37
|
42100 | }
|
42101 | },
|
42102 | '5': {
|
42103 | start: {
|
42104 | line: 21,
|
42105 | column: 6
|
42106 | },
|
42107 | end: {
|
42108 | line: 35,
|
42109 | column: 7
|
42110 | }
|
42111 | },
|
42112 | '6': {
|
42113 | start: {
|
42114 | line: 23,
|
42115 | column: 8
|
42116 | },
|
42117 | end: {
|
42118 | line: 27,
|
42119 | column: 9
|
42120 | }
|
42121 | },
|
42122 | '7': {
|
42123 | start: {
|
42124 | line: 24,
|
42125 | column: 10
|
42126 | },
|
42127 | end: {
|
42128 | line: 26,
|
42129 | column: 13
|
42130 | }
|
42131 | },
|
42132 | '8': {
|
42133 | start: {
|
42134 | line: 29,
|
42135 | column: 8
|
42136 | },
|
42137 | end: {
|
42138 | line: 33,
|
42139 | column: 11
|
42140 | }
|
42141 | },
|
42142 | '9': {
|
42143 | start: {
|
42144 | line: 34,
|
42145 | column: 8
|
42146 | },
|
42147 | end: {
|
42148 | line: 34,
|
42149 | column: 36
|
42150 | }
|
42151 | },
|
42152 | '10': {
|
42153 | start: {
|
42154 | line: 37,
|
42155 | column: 6
|
42156 | },
|
42157 | end: {
|
42158 | line: 37,
|
42159 | column: 46
|
42160 | }
|
42161 | },
|
42162 | '11': {
|
42163 | start: {
|
42164 | line: 42,
|
42165 | column: 2
|
42166 | },
|
42167 | end: {
|
42168 | line: 42,
|
42169 | column: 35
|
42170 | }
|
42171 | }
|
42172 | },
|
42173 | fnMap: {
|
42174 | '0': {
|
42175 | name: 'initializeContentupdate',
|
42176 | decl: {
|
42177 | start: {
|
42178 | line: 6,
|
42179 | column: 24
|
42180 | },
|
42181 | end: {
|
42182 | line: 6,
|
42183 | column: 47
|
42184 | }
|
42185 | },
|
42186 | loc: {
|
42187 | start: {
|
42188 | line: 6,
|
42189 | column: 56
|
42190 | },
|
42191 | end: {
|
42192 | line: 43,
|
42193 | column: 1
|
42194 | }
|
42195 | },
|
42196 | line: 6
|
42197 | },
|
42198 | '1': {
|
42199 | name: '(anonymous_1)',
|
42200 | decl: {
|
42201 | start: {
|
42202 | line: 17,
|
42203 | column: 19
|
42204 | },
|
42205 | end: {
|
42206 | line: 17,
|
42207 | column: 20
|
42208 | }
|
42209 | },
|
42210 | loc: {
|
42211 | start: {
|
42212 | line: 17,
|
42213 | column: 30
|
42214 | },
|
42215 | end: {
|
42216 | line: 39,
|
42217 | column: 3
|
42218 | }
|
42219 | },
|
42220 | line: 17
|
42221 | }
|
42222 | },
|
42223 | branchMap: {
|
42224 | '0': {
|
42225 | loc: {
|
42226 | start: {
|
42227 | line: 18,
|
42228 | column: 4
|
42229 | },
|
42230 | end: {
|
42231 | line: 38,
|
42232 | column: 5
|
42233 | }
|
42234 | },
|
42235 | type: 'if',
|
42236 | locations: [{
|
42237 | start: {
|
42238 | line: 18,
|
42239 | column: 4
|
42240 | },
|
42241 | end: {
|
42242 | line: 38,
|
42243 | column: 5
|
42244 | }
|
42245 | }, {
|
42246 | start: {
|
42247 | line: 18,
|
42248 | column: 4
|
42249 | },
|
42250 | end: {
|
42251 | line: 38,
|
42252 | column: 5
|
42253 | }
|
42254 | }],
|
42255 | line: 18
|
42256 | },
|
42257 | '1': {
|
42258 | loc: {
|
42259 | start: {
|
42260 | line: 21,
|
42261 | column: 6
|
42262 | },
|
42263 | end: {
|
42264 | line: 35,
|
42265 | column: 7
|
42266 | }
|
42267 | },
|
42268 | type: 'if',
|
42269 | locations: [{
|
42270 | start: {
|
42271 | line: 21,
|
42272 | column: 6
|
42273 | },
|
42274 | end: {
|
42275 | line: 35,
|
42276 | column: 7
|
42277 | }
|
42278 | }, {
|
42279 | start: {
|
42280 | line: 21,
|
42281 | column: 6
|
42282 | },
|
42283 | end: {
|
42284 | line: 35,
|
42285 | column: 7
|
42286 | }
|
42287 | }],
|
42288 | line: 21
|
42289 | },
|
42290 | '2': {
|
42291 | loc: {
|
42292 | start: {
|
42293 | line: 23,
|
42294 | column: 8
|
42295 | },
|
42296 | end: {
|
42297 | line: 27,
|
42298 | column: 9
|
42299 | }
|
42300 | },
|
42301 | type: 'if',
|
42302 | locations: [{
|
42303 | start: {
|
42304 | line: 23,
|
42305 | column: 8
|
42306 | },
|
42307 | end: {
|
42308 | line: 27,
|
42309 | column: 9
|
42310 | }
|
42311 | }, {
|
42312 | start: {
|
42313 | line: 23,
|
42314 | column: 8
|
42315 | },
|
42316 | end: {
|
42317 | line: 27,
|
42318 | column: 9
|
42319 | }
|
42320 | }],
|
42321 | line: 23
|
42322 | }
|
42323 | },
|
42324 | s: {
|
42325 | '0': 0,
|
42326 | '1': 0,
|
42327 | '2': 0,
|
42328 | '3': 0,
|
42329 | '4': 0,
|
42330 | '5': 0,
|
42331 | '6': 0,
|
42332 | '7': 0,
|
42333 | '8': 0,
|
42334 | '9': 0,
|
42335 | '10': 0,
|
42336 | '11': 0
|
42337 | },
|
42338 | f: {
|
42339 | '0': 0,
|
42340 | '1': 0
|
42341 | },
|
42342 | b: {
|
42343 | '0': [0, 0],
|
42344 | '1': [0, 0],
|
42345 | '2': [0, 0]
|
42346 | },
|
42347 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
42348 | },
|
42349 | coverage = global[gcv] || (global[gcv] = {});
|
42350 |
|
42351 | if (coverage[path] && coverage[path].hash === hash) {
|
42352 | return coverage[path];
|
42353 | }
|
42354 |
|
42355 | coverageData.hash = hash;
|
42356 | return coverage[path] = coverageData;
|
42357 | }();
|
42358 |
|
42359 | function initializeContentupdate(player) {
|
42360 | cov_1r7ui7f41z.f[0]++;
|
42361 | cov_1r7ui7f41z.s[0]++;
|
42362 | player.ads.contentSrc = player.currentSrc();
|
42363 | cov_1r7ui7f41z.s[1]++;
|
42364 | player.ads._seenInitialLoadstart = false;
|
42365 | cov_1r7ui7f41z.s[2]++;
|
42366 |
|
42367 | var checkSrc = function checkSrc() {
|
42368 | cov_1r7ui7f41z.f[1]++;
|
42369 | cov_1r7ui7f41z.s[3]++;
|
42370 |
|
42371 | if (!player.ads.inAdBreak()) {
|
42372 | cov_1r7ui7f41z.b[0][0]++;
|
42373 | var src = (cov_1r7ui7f41z.s[4]++, player.currentSrc());
|
42374 | cov_1r7ui7f41z.s[5]++;
|
42375 |
|
42376 | if (src !== player.ads.contentSrc) {
|
42377 | cov_1r7ui7f41z.b[1][0]++;
|
42378 | cov_1r7ui7f41z.s[6]++;
|
42379 |
|
42380 | if (player.ads._seenInitialLoadstart) {
|
42381 | cov_1r7ui7f41z.b[2][0]++;
|
42382 | cov_1r7ui7f41z.s[7]++;
|
42383 | player.trigger({
|
42384 | type: 'contentchanged'
|
42385 | });
|
42386 | } else {
|
42387 | cov_1r7ui7f41z.b[2][1]++;
|
42388 | }
|
42389 |
|
42390 | cov_1r7ui7f41z.s[8]++;
|
42391 | player.trigger({
|
42392 | type: 'contentupdate',
|
42393 | oldValue: player.ads.contentSrc,
|
42394 | newValue: src
|
42395 | });
|
42396 | cov_1r7ui7f41z.s[9]++;
|
42397 | player.ads.contentSrc = src;
|
42398 | } else {
|
42399 | cov_1r7ui7f41z.b[1][1]++;
|
42400 | }
|
42401 |
|
42402 | cov_1r7ui7f41z.s[10]++;
|
42403 | player.ads._seenInitialLoadstart = true;
|
42404 | } else {
|
42405 | cov_1r7ui7f41z.b[0][1]++;
|
42406 | }
|
42407 | };
|
42408 |
|
42409 | cov_1r7ui7f41z.s[11]++;
|
42410 | player.on('loadstart', checkSrc);
|
42411 | }
|
42412 |
|
42413 | var cov_1lij382jrz = function () {
|
42414 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/macros.js',
|
42415 | hash = '221da1d29785a04c00f1e2335e67512613ac08cb',
|
42416 | Function = function () {}.constructor,
|
42417 | global = new Function('return this')(),
|
42418 | gcv = '__coverage__',
|
42419 | coverageData = {
|
42420 | path: '/Users/poneill/dev/videojs-contrib-ads/src/macros.js',
|
42421 | statementMap: {
|
42422 | '0': {
|
42423 | start: {
|
42424 | line: 12,
|
42425 | column: 26
|
42426 | },
|
42427 | end: {
|
42428 | line: 17,
|
42429 | column: 1
|
42430 | }
|
42431 | },
|
42432 | '1': {
|
42433 | start: {
|
42434 | line: 13,
|
42435 | column: 2
|
42436 | },
|
42437 | end: {
|
42438 | line: 15,
|
42439 | column: 3
|
42440 | }
|
42441 | },
|
42442 | '2': {
|
42443 | start: {
|
42444 | line: 14,
|
42445 | column: 4
|
42446 | },
|
42447 | end: {
|
42448 | line: 14,
|
42449 | column: 37
|
42450 | }
|
42451 | },
|
42452 | '3': {
|
42453 | start: {
|
42454 | line: 16,
|
42455 | column: 2
|
42456 | },
|
42457 | end: {
|
42458 | line: 16,
|
42459 | column: 15
|
42460 | }
|
42461 | },
|
42462 | '4': {
|
42463 | start: {
|
42464 | line: 21,
|
42465 | column: 21
|
42466 | },
|
42467 | end: {
|
42468 | line: 32,
|
42469 | column: 1
|
42470 | }
|
42471 | },
|
42472 | '5': {
|
42473 | start: {
|
42474 | line: 22,
|
42475 | column: 2
|
42476 | },
|
42477 | end: {
|
42478 | line: 31,
|
42479 | column: 3
|
42480 | }
|
42481 | },
|
42482 | '6': {
|
42483 | start: {
|
42484 | line: 23,
|
42485 | column: 19
|
42486 | },
|
42487 | end: {
|
42488 | line: 23,
|
42489 | column: 46
|
42490 | }
|
42491 | },
|
42492 | '7': {
|
42493 | start: {
|
42494 | line: 24,
|
42495 | column: 23
|
42496 | },
|
42497 | end: {
|
42498 | line: 24,
|
42499 | column: 42
|
42500 | }
|
42501 | },
|
42502 | '8': {
|
42503 | start: {
|
42504 | line: 26,
|
42505 | column: 4
|
42506 | },
|
42507 | end: {
|
42508 | line: 30,
|
42509 | column: 5
|
42510 | }
|
42511 | },
|
42512 | '9': {
|
42513 | start: {
|
42514 | line: 27,
|
42515 | column: 18
|
42516 | },
|
42517 | end: {
|
42518 | line: 27,
|
42519 | column: 78
|
42520 | }
|
42521 | },
|
42522 | '10': {
|
42523 | start: {
|
42524 | line: 29,
|
42525 | column: 6
|
42526 | },
|
42527 | end: {
|
42528 | line: 29,
|
42529 | column: 42
|
42530 | }
|
42531 | },
|
42532 | '11': {
|
42533 | start: {
|
42534 | line: 43,
|
42535 | column: 19
|
42536 | },
|
42537 | end: {
|
42538 | line: 43,
|
42539 | column: 21
|
42540 | }
|
42541 | },
|
42542 | '12': {
|
42543 | start: {
|
42544 | line: 46,
|
42545 | column: 2
|
42546 | },
|
42547 | end: {
|
42548 | line: 50,
|
42549 | column: 5
|
42550 | }
|
42551 | },
|
42552 | '13': {
|
42553 | start: {
|
42554 | line: 47,
|
42555 | column: 4
|
42556 | },
|
42557 | end: {
|
42558 | line: 47,
|
42559 | column: 39
|
42560 | }
|
42561 | },
|
42562 | '14': {
|
42563 | start: {
|
42564 | line: 49,
|
42565 | column: 4
|
42566 | },
|
42567 | end: {
|
42568 | line: 49,
|
42569 | column: 23
|
42570 | }
|
42571 | },
|
42572 | '15': {
|
42573 | start: {
|
42574 | line: 52,
|
42575 | column: 2
|
42576 | },
|
42577 | end: {
|
42578 | line: 54,
|
42579 | column: 3
|
42580 | }
|
42581 | },
|
42582 | '16': {
|
42583 | start: {
|
42584 | line: 53,
|
42585 | column: 4
|
42586 | },
|
42587 | end: {
|
42588 | line: 53,
|
42589 | column: 22
|
42590 | }
|
42591 | },
|
42592 | '17': {
|
42593 | start: {
|
42594 | line: 56,
|
42595 | column: 15
|
42596 | },
|
42597 | end: {
|
42598 | line: 56,
|
42599 | column: 17
|
42600 | }
|
42601 | },
|
42602 | '18': {
|
42603 | start: {
|
42604 | line: 58,
|
42605 | column: 2
|
42606 | },
|
42607 | end: {
|
42608 | line: 60,
|
42609 | column: 3
|
42610 | }
|
42611 | },
|
42612 | '19': {
|
42613 | start: {
|
42614 | line: 59,
|
42615 | column: 4
|
42616 | },
|
42617 | end: {
|
42618 | line: 59,
|
42619 | column: 26
|
42620 | }
|
42621 | },
|
42622 | '20': {
|
42623 | start: {
|
42624 | line: 63,
|
42625 | column: 2
|
42626 | },
|
42627 | end: {
|
42628 | line: 63,
|
42629 | column: 55
|
42630 | }
|
42631 | },
|
42632 | '21': {
|
42633 | start: {
|
42634 | line: 64,
|
42635 | column: 2
|
42636 | },
|
42637 | end: {
|
42638 | line: 64,
|
42639 | column: 51
|
42640 | }
|
42641 | },
|
42642 | '22': {
|
42643 | start: {
|
42644 | line: 65,
|
42645 | column: 2
|
42646 | },
|
42647 | end: {
|
42648 | line: 65,
|
42649 | column: 49
|
42650 | }
|
42651 | },
|
42652 | '23': {
|
42653 | start: {
|
42654 | line: 66,
|
42655 | column: 2
|
42656 | },
|
42657 | end: {
|
42658 | line: 66,
|
42659 | column: 69
|
42660 | }
|
42661 | },
|
42662 | '24': {
|
42663 | start: {
|
42664 | line: 67,
|
42665 | column: 2
|
42666 | },
|
42667 | end: {
|
42668 | line: 67,
|
42669 | column: 73
|
42670 | }
|
42671 | },
|
42672 | '25': {
|
42673 | start: {
|
42674 | line: 68,
|
42675 | column: 2
|
42676 | },
|
42677 | end: {
|
42678 | line: 68,
|
42679 | column: 81
|
42680 | }
|
42681 | },
|
42682 | '26': {
|
42683 | start: {
|
42684 | line: 69,
|
42685 | column: 2
|
42686 | },
|
42687 | end: {
|
42688 | line: 69,
|
42689 | column: 48
|
42690 | }
|
42691 | },
|
42692 | '27': {
|
42693 | start: {
|
42694 | line: 70,
|
42695 | column: 2
|
42696 | },
|
42697 | end: {
|
42698 | line: 70,
|
42699 | column: 98
|
42700 | }
|
42701 | },
|
42702 | '28': {
|
42703 | start: {
|
42704 | line: 71,
|
42705 | column: 2
|
42706 | },
|
42707 | end: {
|
42708 | line: 71,
|
42709 | column: 78
|
42710 | }
|
42711 | },
|
42712 | '29': {
|
42713 | start: {
|
42714 | line: 72,
|
42715 | column: 2
|
42716 | },
|
42717 | end: {
|
42718 | line: 72,
|
42719 | column: 82
|
42720 | }
|
42721 | },
|
42722 | '30': {
|
42723 | start: {
|
42724 | line: 73,
|
42725 | column: 2
|
42726 | },
|
42727 | end: {
|
42728 | line: 73,
|
42729 | column: 47
|
42730 | }
|
42731 | },
|
42732 | '31': {
|
42733 | start: {
|
42734 | line: 74,
|
42735 | column: 2
|
42736 | },
|
42737 | end: {
|
42738 | line: 74,
|
42739 | column: 52
|
42740 | }
|
42741 | },
|
42742 | '32': {
|
42743 | start: {
|
42744 | line: 75,
|
42745 | column: 2
|
42746 | },
|
42747 | end: {
|
42748 | line: 75,
|
42749 | column: 58
|
42750 | }
|
42751 | },
|
42752 | '33': {
|
42753 | start: {
|
42754 | line: 76,
|
42755 | column: 2
|
42756 | },
|
42757 | end: {
|
42758 | line: 76,
|
42759 | column: 65
|
42760 | }
|
42761 | },
|
42762 | '34': {
|
42763 | start: {
|
42764 | line: 78,
|
42765 | column: 2
|
42766 | },
|
42767 | end: {
|
42768 | line: 86,
|
42769 | column: 5
|
42770 | }
|
42771 | },
|
42772 | '35': {
|
42773 | start: {
|
42774 | line: 79,
|
42775 | column: 4
|
42776 | },
|
42777 | end: {
|
42778 | line: 85,
|
42779 | column: 5
|
42780 | }
|
42781 | },
|
42782 | '36': {
|
42783 | start: {
|
42784 | line: 80,
|
42785 | column: 6
|
42786 | },
|
42787 | end: {
|
42788 | line: 80,
|
42789 | column: 59
|
42790 | }
|
42791 | },
|
42792 | '37': {
|
42793 | start: {
|
42794 | line: 81,
|
42795 | column: 11
|
42796 | },
|
42797 | end: {
|
42798 | line: 85,
|
42799 | column: 5
|
42800 | }
|
42801 | },
|
42802 | '38': {
|
42803 | start: {
|
42804 | line: 82,
|
42805 | column: 6
|
42806 | },
|
42807 | end: {
|
42808 | line: 82,
|
42809 | column: 70
|
42810 | }
|
42811 | },
|
42812 | '39': {
|
42813 | start: {
|
42814 | line: 84,
|
42815 | column: 6
|
42816 | },
|
42817 | end: {
|
42818 | line: 84,
|
42819 | column: 41
|
42820 | }
|
42821 | },
|
42822 | '40': {
|
42823 | start: {
|
42824 | line: 89,
|
42825 | column: 2
|
42826 | },
|
42827 | end: {
|
42828 | line: 89,
|
42829 | column: 56
|
42830 | }
|
42831 | },
|
42832 | '41': {
|
42833 | start: {
|
42834 | line: 90,
|
42835 | column: 2
|
42836 | },
|
42837 | end: {
|
42838 | line: 90,
|
42839 | column: 55
|
42840 | }
|
42841 | },
|
42842 | '42': {
|
42843 | start: {
|
42844 | line: 94,
|
42845 | column: 2
|
42846 | },
|
42847 | end: {
|
42848 | line: 96,
|
42849 | column: 3
|
42850 | }
|
42851 | },
|
42852 | '43': {
|
42853 | start: {
|
42854 | line: 95,
|
42855 | column: 4
|
42856 | },
|
42857 | end: {
|
42858 | line: 95,
|
42859 | column: 75
|
42860 | }
|
42861 | },
|
42862 | '44': {
|
42863 | start: {
|
42864 | line: 99,
|
42865 | column: 2
|
42866 | },
|
42867 | end: {
|
42868 | line: 131,
|
42869 | column: 5
|
42870 | }
|
42871 | },
|
42872 | '45': {
|
42873 | start: {
|
42874 | line: 101,
|
42875 | column: 18
|
42876 | },
|
42877 | end: {
|
42878 | line: 101,
|
42879 | column: 24
|
42880 | }
|
42881 | },
|
42882 | '46': {
|
42883 | start: {
|
42884 | line: 102,
|
42885 | column: 18
|
42886 | },
|
42887 | end: {
|
42888 | line: 102,
|
42889 | column: 33
|
42890 | }
|
42891 | },
|
42892 | '47': {
|
42893 | start: {
|
42894 | line: 106,
|
42895 | column: 4
|
42896 | },
|
42897 | end: {
|
42898 | line: 112,
|
42899 | column: 5
|
42900 | }
|
42901 | },
|
42902 | '48': {
|
42903 | start: {
|
42904 | line: 107,
|
42905 | column: 6
|
42906 | },
|
42907 | end: {
|
42908 | line: 111,
|
42909 | column: 7
|
42910 | }
|
42911 | },
|
42912 | '49': {
|
42913 | start: {
|
42914 | line: 108,
|
42915 | column: 8
|
42916 | },
|
42917 | end: {
|
42918 | line: 108,
|
42919 | column: 34
|
42920 | }
|
42921 | },
|
42922 | '50': {
|
42923 | start: {
|
42924 | line: 110,
|
42925 | column: 8
|
42926 | },
|
42927 | end: {
|
42928 | line: 110,
|
42929 | column: 36
|
42930 | }
|
42931 | },
|
42932 | '51': {
|
42933 | start: {
|
42934 | line: 114,
|
42935 | column: 17
|
42936 | },
|
42937 | end: {
|
42938 | line: 114,
|
42939 | column: 29
|
42940 | }
|
42941 | },
|
42942 | '52': {
|
42943 | start: {
|
42944 | line: 117,
|
42945 | column: 4
|
42946 | },
|
42947 | end: {
|
42948 | line: 128,
|
42949 | column: 5
|
42950 | }
|
42951 | },
|
42952 | '53': {
|
42953 | start: {
|
42954 | line: 118,
|
42955 | column: 6
|
42956 | },
|
42957 | end: {
|
42958 | line: 118,
|
42959 | column: 20
|
42960 | }
|
42961 | },
|
42962 | '54': {
|
42963 | start: {
|
42964 | line: 119,
|
42965 | column: 11
|
42966 | },
|
42967 | end: {
|
42968 | line: 128,
|
42969 | column: 5
|
42970 | }
|
42971 | },
|
42972 | '55': {
|
42973 | start: {
|
42974 | line: 120,
|
42975 | column: 6
|
42976 | },
|
42977 | end: {
|
42978 | line: 122,
|
42979 | column: 7
|
42980 | }
|
42981 | },
|
42982 | '56': {
|
42983 | start: {
|
42984 | line: 121,
|
42985 | column: 8
|
42986 | },
|
42987 | end: {
|
42988 | line: 121,
|
42989 | column: 50
|
42990 | }
|
42991 | },
|
42992 | '57': {
|
42993 | start: {
|
42994 | line: 123,
|
42995 | column: 6
|
42996 | },
|
42997 | end: {
|
42998 | line: 123,
|
42999 | column: 60
|
43000 | }
|
43001 | },
|
43002 | '58': {
|
43003 | start: {
|
43004 | line: 124,
|
43005 | column: 6
|
43006 | },
|
43007 | end: {
|
43008 | line: 124,
|
43009 | column: 16
|
43010 | }
|
43011 | },
|
43012 | '59': {
|
43013 | start: {
|
43014 | line: 125,
|
43015 | column: 11
|
43016 | },
|
43017 | end: {
|
43018 | line: 128,
|
43019 | column: 5
|
43020 | }
|
43021 | },
|
43022 | '60': {
|
43023 | start: {
|
43024 | line: 126,
|
43025 | column: 6
|
43026 | },
|
43027 | end: {
|
43028 | line: 126,
|
43029 | column: 74
|
43030 | }
|
43031 | },
|
43032 | '61': {
|
43033 | start: {
|
43034 | line: 127,
|
43035 | column: 6
|
43036 | },
|
43037 | end: {
|
43038 | line: 127,
|
43039 | column: 16
|
43040 | }
|
43041 | },
|
43042 | '62': {
|
43043 | start: {
|
43044 | line: 130,
|
43045 | column: 4
|
43046 | },
|
43047 | end: {
|
43048 | line: 130,
|
43049 | column: 55
|
43050 | }
|
43051 | },
|
43052 | '63': {
|
43053 | start: {
|
43054 | line: 134,
|
43055 | column: 2
|
43056 | },
|
43057 | end: {
|
43058 | line: 136,
|
43059 | column: 3
|
43060 | }
|
43061 | },
|
43062 | '64': {
|
43063 | start: {
|
43064 | line: 135,
|
43065 | column: 4
|
43066 | },
|
43067 | end: {
|
43068 | line: 135,
|
43069 | column: 62
|
43070 | }
|
43071 | },
|
43072 | '65': {
|
43073 | start: {
|
43074 | line: 138,
|
43075 | column: 2
|
43076 | },
|
43077 | end: {
|
43078 | line: 138,
|
43079 | column: 16
|
43080 | }
|
43081 | }
|
43082 | },
|
43083 | fnMap: {
|
43084 | '0': {
|
43085 | name: '(anonymous_0)',
|
43086 | decl: {
|
43087 | start: {
|
43088 | line: 12,
|
43089 | column: 26
|
43090 | },
|
43091 | end: {
|
43092 | line: 12,
|
43093 | column: 27
|
43094 | }
|
43095 | },
|
43096 | loc: {
|
43097 | start: {
|
43098 | line: 12,
|
43099 | column: 53
|
43100 | },
|
43101 | end: {
|
43102 | line: 17,
|
43103 | column: 1
|
43104 | }
|
43105 | },
|
43106 | line: 12
|
43107 | },
|
43108 | '1': {
|
43109 | name: '(anonymous_1)',
|
43110 | decl: {
|
43111 | start: {
|
43112 | line: 21,
|
43113 | column: 21
|
43114 | },
|
43115 | end: {
|
43116 | line: 21,
|
43117 | column: 22
|
43118 | }
|
43119 | },
|
43120 | loc: {
|
43121 | start: {
|
43122 | line: 21,
|
43123 | column: 67
|
43124 | },
|
43125 | end: {
|
43126 | line: 32,
|
43127 | column: 1
|
43128 | }
|
43129 | },
|
43130 | line: 21
|
43131 | },
|
43132 | '2': {
|
43133 | name: 'adMacroReplacement',
|
43134 | decl: {
|
43135 | start: {
|
43136 | line: 41,
|
43137 | column: 24
|
43138 | },
|
43139 | end: {
|
43140 | line: 41,
|
43141 | column: 42
|
43142 | }
|
43143 | },
|
43144 | loc: {
|
43145 | start: {
|
43146 | line: 41,
|
43147 | column: 76
|
43148 | },
|
43149 | end: {
|
43150 | line: 139,
|
43151 | column: 1
|
43152 | }
|
43153 | },
|
43154 | line: 41
|
43155 | },
|
43156 | '3': {
|
43157 | name: '(anonymous_3)',
|
43158 | decl: {
|
43159 | start: {
|
43160 | line: 46,
|
43161 | column: 49
|
43162 | },
|
43163 | end: {
|
43164 | line: 46,
|
43165 | column: 50
|
43166 | }
|
43167 | },
|
43168 | loc: {
|
43169 | start: {
|
43170 | line: 46,
|
43171 | column: 83
|
43172 | },
|
43173 | end: {
|
43174 | line: 50,
|
43175 | column: 3
|
43176 | }
|
43177 | },
|
43178 | line: 46
|
43179 | },
|
43180 | '4': {
|
43181 | name: '(anonymous_4)',
|
43182 | decl: {
|
43183 | start: {
|
43184 | line: 78,
|
43185 | column: 61
|
43186 | },
|
43187 | end: {
|
43188 | line: 78,
|
43189 | column: 62
|
43190 | }
|
43191 | },
|
43192 | loc: {
|
43193 | start: {
|
43194 | line: 78,
|
43195 | column: 71
|
43196 | },
|
43197 | end: {
|
43198 | line: 86,
|
43199 | column: 3
|
43200 | }
|
43201 | },
|
43202 | line: 78
|
43203 | },
|
43204 | '5': {
|
43205 | name: '(anonymous_5)',
|
43206 | decl: {
|
43207 | start: {
|
43208 | line: 99,
|
43209 | column: 54
|
43210 | },
|
43211 | end: {
|
43212 | line: 99,
|
43213 | column: 55
|
43214 | }
|
43215 | },
|
43216 | loc: {
|
43217 | start: {
|
43218 | line: 99,
|
43219 | column: 76
|
43220 | },
|
43221 | end: {
|
43222 | line: 131,
|
43223 | column: 3
|
43224 | }
|
43225 | },
|
43226 | line: 99
|
43227 | }
|
43228 | },
|
43229 | branchMap: {
|
43230 | '0': {
|
43231 | loc: {
|
43232 | start: {
|
43233 | line: 13,
|
43234 | column: 2
|
43235 | },
|
43236 | end: {
|
43237 | line: 15,
|
43238 | column: 3
|
43239 | }
|
43240 | },
|
43241 | type: 'if',
|
43242 | locations: [{
|
43243 | start: {
|
43244 | line: 13,
|
43245 | column: 2
|
43246 | },
|
43247 | end: {
|
43248 | line: 15,
|
43249 | column: 3
|
43250 | }
|
43251 | }, {
|
43252 | start: {
|
43253 | line: 13,
|
43254 | column: 2
|
43255 | },
|
43256 | end: {
|
43257 | line: 15,
|
43258 | column: 3
|
43259 | }
|
43260 | }],
|
43261 | line: 13
|
43262 | },
|
43263 | '1': {
|
43264 | loc: {
|
43265 | start: {
|
43266 | line: 22,
|
43267 | column: 2
|
43268 | },
|
43269 | end: {
|
43270 | line: 31,
|
43271 | column: 3
|
43272 | }
|
43273 | },
|
43274 | type: 'if',
|
43275 | locations: [{
|
43276 | start: {
|
43277 | line: 22,
|
43278 | column: 2
|
43279 | },
|
43280 | end: {
|
43281 | line: 31,
|
43282 | column: 3
|
43283 | }
|
43284 | }, {
|
43285 | start: {
|
43286 | line: 22,
|
43287 | column: 2
|
43288 | },
|
43289 | end: {
|
43290 | line: 31,
|
43291 | column: 3
|
43292 | }
|
43293 | }],
|
43294 | line: 22
|
43295 | },
|
43296 | '2': {
|
43297 | loc: {
|
43298 | start: {
|
43299 | line: 22,
|
43300 | column: 6
|
43301 | },
|
43302 | end: {
|
43303 | line: 22,
|
43304 | column: 46
|
43305 | }
|
43306 | },
|
43307 | type: 'binary-expr',
|
43308 | locations: [{
|
43309 | start: {
|
43310 | line: 22,
|
43311 | column: 6
|
43312 | },
|
43313 | end: {
|
43314 | line: 22,
|
43315 | column: 15
|
43316 | }
|
43317 | }, {
|
43318 | start: {
|
43319 | line: 22,
|
43320 | column: 19
|
43321 | },
|
43322 | end: {
|
43323 | line: 22,
|
43324 | column: 46
|
43325 | }
|
43326 | }],
|
43327 | line: 22
|
43328 | },
|
43329 | '3': {
|
43330 | loc: {
|
43331 | start: {
|
43332 | line: 52,
|
43333 | column: 2
|
43334 | },
|
43335 | end: {
|
43336 | line: 54,
|
43337 | column: 3
|
43338 | }
|
43339 | },
|
43340 | type: 'if',
|
43341 | locations: [{
|
43342 | start: {
|
43343 | line: 52,
|
43344 | column: 2
|
43345 | },
|
43346 | end: {
|
43347 | line: 54,
|
43348 | column: 3
|
43349 | }
|
43350 | }, {
|
43351 | start: {
|
43352 | line: 52,
|
43353 | column: 2
|
43354 | },
|
43355 | end: {
|
43356 | line: 54,
|
43357 | column: 3
|
43358 | }
|
43359 | }],
|
43360 | line: 52
|
43361 | },
|
43362 | '4': {
|
43363 | loc: {
|
43364 | start: {
|
43365 | line: 58,
|
43366 | column: 2
|
43367 | },
|
43368 | end: {
|
43369 | line: 60,
|
43370 | column: 3
|
43371 | }
|
43372 | },
|
43373 | type: 'if',
|
43374 | locations: [{
|
43375 | start: {
|
43376 | line: 58,
|
43377 | column: 2
|
43378 | },
|
43379 | end: {
|
43380 | line: 60,
|
43381 | column: 3
|
43382 | }
|
43383 | }, {
|
43384 | start: {
|
43385 | line: 58,
|
43386 | column: 2
|
43387 | },
|
43388 | end: {
|
43389 | line: 60,
|
43390 | column: 3
|
43391 | }
|
43392 | }],
|
43393 | line: 58
|
43394 | },
|
43395 | '5': {
|
43396 | loc: {
|
43397 | start: {
|
43398 | line: 66,
|
43399 | column: 29
|
43400 | },
|
43401 | end: {
|
43402 | line: 66,
|
43403 | column: 68
|
43404 | }
|
43405 | },
|
43406 | type: 'cond-expr',
|
43407 | locations: [{
|
43408 | start: {
|
43409 | line: 66,
|
43410 | column: 46
|
43411 | },
|
43412 | end: {
|
43413 | line: 66,
|
43414 | column: 63
|
43415 | }
|
43416 | }, {
|
43417 | start: {
|
43418 | line: 66,
|
43419 | column: 66
|
43420 | },
|
43421 | end: {
|
43422 | line: 66,
|
43423 | column: 68
|
43424 | }
|
43425 | }],
|
43426 | line: 66
|
43427 | },
|
43428 | '6': {
|
43429 | loc: {
|
43430 | start: {
|
43431 | line: 67,
|
43432 | column: 31
|
43433 | },
|
43434 | end: {
|
43435 | line: 67,
|
43436 | column: 72
|
43437 | }
|
43438 | },
|
43439 | type: 'cond-expr',
|
43440 | locations: [{
|
43441 | start: {
|
43442 | line: 67,
|
43443 | column: 48
|
43444 | },
|
43445 | end: {
|
43446 | line: 67,
|
43447 | column: 67
|
43448 | }
|
43449 | }, {
|
43450 | start: {
|
43451 | line: 67,
|
43452 | column: 70
|
43453 | },
|
43454 | end: {
|
43455 | line: 67,
|
43456 | column: 72
|
43457 | }
|
43458 | }],
|
43459 | line: 67
|
43460 | },
|
43461 | '7': {
|
43462 | loc: {
|
43463 | start: {
|
43464 | line: 68,
|
43465 | column: 35
|
43466 | },
|
43467 | end: {
|
43468 | line: 68,
|
43469 | column: 80
|
43470 | }
|
43471 | },
|
43472 | type: 'cond-expr',
|
43473 | locations: [{
|
43474 | start: {
|
43475 | line: 68,
|
43476 | column: 52
|
43477 | },
|
43478 | end: {
|
43479 | line: 68,
|
43480 | column: 75
|
43481 | }
|
43482 | }, {
|
43483 | start: {
|
43484 | line: 68,
|
43485 | column: 78
|
43486 | },
|
43487 | end: {
|
43488 | line: 68,
|
43489 | column: 80
|
43490 | }
|
43491 | }],
|
43492 | line: 68
|
43493 | },
|
43494 | '8': {
|
43495 | loc: {
|
43496 | start: {
|
43497 | line: 70,
|
43498 | column: 31
|
43499 | },
|
43500 | end: {
|
43501 | line: 70,
|
43502 | column: 97
|
43503 | }
|
43504 | },
|
43505 | type: 'cond-expr',
|
43506 | locations: [{
|
43507 | start: {
|
43508 | line: 70,
|
43509 | column: 57
|
43510 | },
|
43511 | end: {
|
43512 | line: 70,
|
43513 | column: 74
|
43514 | }
|
43515 | }, {
|
43516 | start: {
|
43517 | line: 70,
|
43518 | column: 77
|
43519 | },
|
43520 | end: {
|
43521 | line: 70,
|
43522 | column: 97
|
43523 | }
|
43524 | }],
|
43525 | line: 70
|
43526 | },
|
43527 | '9': {
|
43528 | loc: {
|
43529 | start: {
|
43530 | line: 71,
|
43531 | column: 32
|
43532 | },
|
43533 | end: {
|
43534 | line: 71,
|
43535 | column: 77
|
43536 | }
|
43537 | },
|
43538 | type: 'cond-expr',
|
43539 | locations: [{
|
43540 | start: {
|
43541 | line: 71,
|
43542 | column: 52
|
43543 | },
|
43544 | end: {
|
43545 | line: 71,
|
43546 | column: 72
|
43547 | }
|
43548 | }, {
|
43549 | start: {
|
43550 | line: 71,
|
43551 | column: 75
|
43552 | },
|
43553 | end: {
|
43554 | line: 71,
|
43555 | column: 77
|
43556 | }
|
43557 | }],
|
43558 | line: 71
|
43559 | },
|
43560 | '10': {
|
43561 | loc: {
|
43562 | start: {
|
43563 | line: 72,
|
43564 | column: 34
|
43565 | },
|
43566 | end: {
|
43567 | line: 72,
|
43568 | column: 81
|
43569 | }
|
43570 | },
|
43571 | type: 'cond-expr',
|
43572 | locations: [{
|
43573 | start: {
|
43574 | line: 72,
|
43575 | column: 54
|
43576 | },
|
43577 | end: {
|
43578 | line: 72,
|
43579 | column: 76
|
43580 | }
|
43581 | }, {
|
43582 | start: {
|
43583 | line: 72,
|
43584 | column: 79
|
43585 | },
|
43586 | end: {
|
43587 | line: 72,
|
43588 | column: 81
|
43589 | }
|
43590 | }],
|
43591 | line: 72
|
43592 | },
|
43593 | '11': {
|
43594 | loc: {
|
43595 | start: {
|
43596 | line: 79,
|
43597 | column: 4
|
43598 | },
|
43599 | end: {
|
43600 | line: 85,
|
43601 | column: 5
|
43602 | }
|
43603 | },
|
43604 | type: 'if',
|
43605 | locations: [{
|
43606 | start: {
|
43607 | line: 79,
|
43608 | column: 4
|
43609 | },
|
43610 | end: {
|
43611 | line: 85,
|
43612 | column: 5
|
43613 | }
|
43614 | }, {
|
43615 | start: {
|
43616 | line: 79,
|
43617 | column: 4
|
43618 | },
|
43619 | end: {
|
43620 | line: 85,
|
43621 | column: 5
|
43622 | }
|
43623 | }],
|
43624 | line: 79
|
43625 | },
|
43626 | '12': {
|
43627 | loc: {
|
43628 | start: {
|
43629 | line: 79,
|
43630 | column: 8
|
43631 | },
|
43632 | end: {
|
43633 | line: 79,
|
43634 | column: 46
|
43635 | }
|
43636 | },
|
43637 | type: 'binary-expr',
|
43638 | locations: [{
|
43639 | start: {
|
43640 | line: 79,
|
43641 | column: 8
|
43642 | },
|
43643 | end: {
|
43644 | line: 79,
|
43645 | column: 22
|
43646 | }
|
43647 | }, {
|
43648 | start: {
|
43649 | line: 79,
|
43650 | column: 26
|
43651 | },
|
43652 | end: {
|
43653 | line: 79,
|
43654 | column: 46
|
43655 | }
|
43656 | }],
|
43657 | line: 79
|
43658 | },
|
43659 | '13': {
|
43660 | loc: {
|
43661 | start: {
|
43662 | line: 81,
|
43663 | column: 11
|
43664 | },
|
43665 | end: {
|
43666 | line: 85,
|
43667 | column: 5
|
43668 | }
|
43669 | },
|
43670 | type: 'if',
|
43671 | locations: [{
|
43672 | start: {
|
43673 | line: 81,
|
43674 | column: 11
|
43675 | },
|
43676 | end: {
|
43677 | line: 85,
|
43678 | column: 5
|
43679 | }
|
43680 | }, {
|
43681 | start: {
|
43682 | line: 81,
|
43683 | column: 11
|
43684 | },
|
43685 | end: {
|
43686 | line: 85,
|
43687 | column: 5
|
43688 | }
|
43689 | }],
|
43690 | line: 81
|
43691 | },
|
43692 | '14': {
|
43693 | loc: {
|
43694 | start: {
|
43695 | line: 107,
|
43696 | column: 6
|
43697 | },
|
43698 | end: {
|
43699 | line: 111,
|
43700 | column: 7
|
43701 | }
|
43702 | },
|
43703 | type: 'if',
|
43704 | locations: [{
|
43705 | start: {
|
43706 | line: 107,
|
43707 | column: 6
|
43708 | },
|
43709 | end: {
|
43710 | line: 111,
|
43711 | column: 7
|
43712 | }
|
43713 | }, {
|
43714 | start: {
|
43715 | line: 107,
|
43716 | column: 6
|
43717 | },
|
43718 | end: {
|
43719 | line: 111,
|
43720 | column: 7
|
43721 | }
|
43722 | }],
|
43723 | line: 107
|
43724 | },
|
43725 | '15': {
|
43726 | loc: {
|
43727 | start: {
|
43728 | line: 117,
|
43729 | column: 4
|
43730 | },
|
43731 | end: {
|
43732 | line: 128,
|
43733 | column: 5
|
43734 | }
|
43735 | },
|
43736 | type: 'if',
|
43737 | locations: [{
|
43738 | start: {
|
43739 | line: 117,
|
43740 | column: 4
|
43741 | },
|
43742 | end: {
|
43743 | line: 128,
|
43744 | column: 5
|
43745 | }
|
43746 | }, {
|
43747 | start: {
|
43748 | line: 117,
|
43749 | column: 4
|
43750 | },
|
43751 | end: {
|
43752 | line: 128,
|
43753 | column: 5
|
43754 | }
|
43755 | }],
|
43756 | line: 117
|
43757 | },
|
43758 | '16': {
|
43759 | loc: {
|
43760 | start: {
|
43761 | line: 119,
|
43762 | column: 11
|
43763 | },
|
43764 | end: {
|
43765 | line: 128,
|
43766 | column: 5
|
43767 | }
|
43768 | },
|
43769 | type: 'if',
|
43770 | locations: [{
|
43771 | start: {
|
43772 | line: 119,
|
43773 | column: 11
|
43774 | },
|
43775 | end: {
|
43776 | line: 128,
|
43777 | column: 5
|
43778 | }
|
43779 | }, {
|
43780 | start: {
|
43781 | line: 119,
|
43782 | column: 11
|
43783 | },
|
43784 | end: {
|
43785 | line: 128,
|
43786 | column: 5
|
43787 | }
|
43788 | }],
|
43789 | line: 119
|
43790 | },
|
43791 | '17': {
|
43792 | loc: {
|
43793 | start: {
|
43794 | line: 120,
|
43795 | column: 6
|
43796 | },
|
43797 | end: {
|
43798 | line: 122,
|
43799 | column: 7
|
43800 | }
|
43801 | },
|
43802 | type: 'if',
|
43803 | locations: [{
|
43804 | start: {
|
43805 | line: 120,
|
43806 | column: 6
|
43807 | },
|
43808 | end: {
|
43809 | line: 122,
|
43810 | column: 7
|
43811 | }
|
43812 | }, {
|
43813 | start: {
|
43814 | line: 120,
|
43815 | column: 6
|
43816 | },
|
43817 | end: {
|
43818 | line: 122,
|
43819 | column: 7
|
43820 | }
|
43821 | }],
|
43822 | line: 120
|
43823 | },
|
43824 | '18': {
|
43825 | loc: {
|
43826 | start: {
|
43827 | line: 125,
|
43828 | column: 11
|
43829 | },
|
43830 | end: {
|
43831 | line: 128,
|
43832 | column: 5
|
43833 | }
|
43834 | },
|
43835 | type: 'if',
|
43836 | locations: [{
|
43837 | start: {
|
43838 | line: 125,
|
43839 | column: 11
|
43840 | },
|
43841 | end: {
|
43842 | line: 128,
|
43843 | column: 5
|
43844 | }
|
43845 | }, {
|
43846 | start: {
|
43847 | line: 125,
|
43848 | column: 11
|
43849 | },
|
43850 | end: {
|
43851 | line: 128,
|
43852 | column: 5
|
43853 | }
|
43854 | }],
|
43855 | line: 125
|
43856 | },
|
43857 | '19': {
|
43858 | loc: {
|
43859 | start: {
|
43860 | line: 125,
|
43861 | column: 15
|
43862 | },
|
43863 | end: {
|
43864 | line: 125,
|
43865 | column: 75
|
43866 | }
|
43867 | },
|
43868 | type: 'binary-expr',
|
43869 | locations: [{
|
43870 | start: {
|
43871 | line: 125,
|
43872 | column: 15
|
43873 | },
|
43874 | end: {
|
43875 | line: 125,
|
43876 | column: 32
|
43877 | }
|
43878 | }, {
|
43879 | start: {
|
43880 | line: 125,
|
43881 | column: 36
|
43882 | },
|
43883 | end: {
|
43884 | line: 125,
|
43885 | column: 53
|
43886 | }
|
43887 | }, {
|
43888 | start: {
|
43889 | line: 125,
|
43890 | column: 57
|
43891 | },
|
43892 | end: {
|
43893 | line: 125,
|
43894 | column: 75
|
43895 | }
|
43896 | }],
|
43897 | line: 125
|
43898 | }
|
43899 | },
|
43900 | s: {
|
43901 | '0': 0,
|
43902 | '1': 0,
|
43903 | '2': 0,
|
43904 | '3': 0,
|
43905 | '4': 0,
|
43906 | '5': 0,
|
43907 | '6': 0,
|
43908 | '7': 0,
|
43909 | '8': 0,
|
43910 | '9': 0,
|
43911 | '10': 0,
|
43912 | '11': 0,
|
43913 | '12': 0,
|
43914 | '13': 0,
|
43915 | '14': 0,
|
43916 | '15': 0,
|
43917 | '16': 0,
|
43918 | '17': 0,
|
43919 | '18': 0,
|
43920 | '19': 0,
|
43921 | '20': 0,
|
43922 | '21': 0,
|
43923 | '22': 0,
|
43924 | '23': 0,
|
43925 | '24': 0,
|
43926 | '25': 0,
|
43927 | '26': 0,
|
43928 | '27': 0,
|
43929 | '28': 0,
|
43930 | '29': 0,
|
43931 | '30': 0,
|
43932 | '31': 0,
|
43933 | '32': 0,
|
43934 | '33': 0,
|
43935 | '34': 0,
|
43936 | '35': 0,
|
43937 | '36': 0,
|
43938 | '37': 0,
|
43939 | '38': 0,
|
43940 | '39': 0,
|
43941 | '40': 0,
|
43942 | '41': 0,
|
43943 | '42': 0,
|
43944 | '43': 0,
|
43945 | '44': 0,
|
43946 | '45': 0,
|
43947 | '46': 0,
|
43948 | '47': 0,
|
43949 | '48': 0,
|
43950 | '49': 0,
|
43951 | '50': 0,
|
43952 | '51': 0,
|
43953 | '52': 0,
|
43954 | '53': 0,
|
43955 | '54': 0,
|
43956 | '55': 0,
|
43957 | '56': 0,
|
43958 | '57': 0,
|
43959 | '58': 0,
|
43960 | '59': 0,
|
43961 | '60': 0,
|
43962 | '61': 0,
|
43963 | '62': 0,
|
43964 | '63': 0,
|
43965 | '64': 0,
|
43966 | '65': 0
|
43967 | },
|
43968 | f: {
|
43969 | '0': 0,
|
43970 | '1': 0,
|
43971 | '2': 0,
|
43972 | '3': 0,
|
43973 | '4': 0,
|
43974 | '5': 0
|
43975 | },
|
43976 | b: {
|
43977 | '0': [0, 0],
|
43978 | '1': [0, 0],
|
43979 | '2': [0, 0],
|
43980 | '3': [0, 0],
|
43981 | '4': [0, 0],
|
43982 | '5': [0, 0],
|
43983 | '6': [0, 0],
|
43984 | '7': [0, 0],
|
43985 | '8': [0, 0],
|
43986 | '9': [0, 0],
|
43987 | '10': [0, 0],
|
43988 | '11': [0, 0],
|
43989 | '12': [0, 0],
|
43990 | '13': [0, 0],
|
43991 | '14': [0, 0],
|
43992 | '15': [0, 0],
|
43993 | '16': [0, 0],
|
43994 | '17': [0, 0],
|
43995 | '18': [0, 0],
|
43996 | '19': [0, 0, 0]
|
43997 | },
|
43998 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
43999 | },
|
44000 | coverage = global[gcv] || (global[gcv] = {});
|
44001 |
|
44002 | if (coverage[path] && coverage[path].hash === hash) {
|
44003 | return coverage[path];
|
44004 | }
|
44005 |
|
44006 | coverageData.hash = hash;
|
44007 | return coverage[path] = coverageData;
|
44008 | }();
|
44009 | cov_1lij382jrz.s[0]++;
|
44010 |
|
44011 | var uriEncodeIfNeeded = function uriEncodeIfNeeded(value, uriEncode) {
|
44012 | cov_1lij382jrz.f[0]++;
|
44013 | cov_1lij382jrz.s[1]++;
|
44014 |
|
44015 | if (uriEncode) {
|
44016 | cov_1lij382jrz.b[0][0]++;
|
44017 | cov_1lij382jrz.s[2]++;
|
44018 | return encodeURIComponent(value);
|
44019 | } else {
|
44020 | cov_1lij382jrz.b[0][1]++;
|
44021 | }
|
44022 |
|
44023 | cov_1lij382jrz.s[3]++;
|
44024 | return value;
|
44025 | };
|
44026 |
|
44027 | cov_1lij382jrz.s[4]++;
|
44028 |
|
44029 | var customFields = function customFields(mediainfo, macros, customFieldsName) {
|
44030 | cov_1lij382jrz.f[1]++;
|
44031 | cov_1lij382jrz.s[5]++;
|
44032 |
|
44033 | if ((cov_1lij382jrz.b[2][0]++, mediainfo) && (cov_1lij382jrz.b[2][1]++, mediainfo[customFieldsName])) {
|
44034 | cov_1lij382jrz.b[1][0]++;
|
44035 | var fields = (cov_1lij382jrz.s[6]++, mediainfo[customFieldsName]);
|
44036 | var fieldNames = (cov_1lij382jrz.s[7]++, Object.keys(fields));
|
44037 | cov_1lij382jrz.s[8]++;
|
44038 |
|
44039 | for (var i = 0; i < fieldNames.length; i++) {
|
44040 | var tag = (cov_1lij382jrz.s[9]++, '{mediainfo.' + customFieldsName + '.' + fieldNames[i] + '}');
|
44041 | cov_1lij382jrz.s[10]++;
|
44042 | macros[tag] = fields[fieldNames[i]];
|
44043 | }
|
44044 | } else {
|
44045 | cov_1lij382jrz.b[1][1]++;
|
44046 | }
|
44047 | };
|
44048 |
|
44049 | function adMacroReplacement(string, uriEncode, customMacros) {
|
44050 | var _this = this;
|
44051 |
|
44052 | cov_1lij382jrz.f[2]++;
|
44053 | var defaults = (cov_1lij382jrz.s[11]++, {});
|
44054 | cov_1lij382jrz.s[12]++;
|
44055 | string = string.replace(/{([^}=]+)=([^}]+)}/g, function (match, name, defaultVal) {
|
44056 | cov_1lij382jrz.f[3]++;
|
44057 | cov_1lij382jrz.s[13]++;
|
44058 | defaults["{" + name + "}"] = defaultVal;
|
44059 | cov_1lij382jrz.s[14]++;
|
44060 | return "{" + name + "}";
|
44061 | });
|
44062 | cov_1lij382jrz.s[15]++;
|
44063 |
|
44064 | if (uriEncode === undefined) {
|
44065 | cov_1lij382jrz.b[3][0]++;
|
44066 | cov_1lij382jrz.s[16]++;
|
44067 | uriEncode = false;
|
44068 | } else {
|
44069 | cov_1lij382jrz.b[3][1]++;
|
44070 | }
|
44071 |
|
44072 | var macros = (cov_1lij382jrz.s[17]++, {});
|
44073 | cov_1lij382jrz.s[18]++;
|
44074 |
|
44075 | if (customMacros !== undefined) {
|
44076 | cov_1lij382jrz.b[4][0]++;
|
44077 | cov_1lij382jrz.s[19]++;
|
44078 | macros = customMacros;
|
44079 | } else {
|
44080 | cov_1lij382jrz.b[4][1]++;
|
44081 | }
|
44082 |
|
44083 | cov_1lij382jrz.s[20]++;
|
44084 | macros['{player.id}'] = this.options_['data-player'];
|
44085 | cov_1lij382jrz.s[21]++;
|
44086 | macros['{player.height}'] = this.currentHeight();
|
44087 | cov_1lij382jrz.s[22]++;
|
44088 | macros['{player.width}'] = this.currentWidth();
|
44089 | cov_1lij382jrz.s[23]++;
|
44090 | macros['{mediainfo.id}'] = this.mediainfo ? (cov_1lij382jrz.b[5][0]++, this.mediainfo.id) : (cov_1lij382jrz.b[5][1]++, '');
|
44091 | cov_1lij382jrz.s[24]++;
|
44092 | macros['{mediainfo.name}'] = this.mediainfo ? (cov_1lij382jrz.b[6][0]++, this.mediainfo.name) : (cov_1lij382jrz.b[6][1]++, '');
|
44093 | cov_1lij382jrz.s[25]++;
|
44094 | macros['{mediainfo.duration}'] = this.mediainfo ? (cov_1lij382jrz.b[7][0]++, this.mediainfo.duration) : (cov_1lij382jrz.b[7][1]++, '');
|
44095 | cov_1lij382jrz.s[26]++;
|
44096 | macros['{player.duration}'] = this.duration();
|
44097 | cov_1lij382jrz.s[27]++;
|
44098 | macros['{player.pageUrl}'] = videojs$1.dom.isInFrame() ? (cov_1lij382jrz.b[8][0]++, document_1.referrer) : (cov_1lij382jrz.b[8][1]++, window_1.location.href);
|
44099 | cov_1lij382jrz.s[28]++;
|
44100 | macros['{playlistinfo.id}'] = this.playlistinfo ? (cov_1lij382jrz.b[9][0]++, this.playlistinfo.id) : (cov_1lij382jrz.b[9][1]++, '');
|
44101 | cov_1lij382jrz.s[29]++;
|
44102 | macros['{playlistinfo.name}'] = this.playlistinfo ? (cov_1lij382jrz.b[10][0]++, this.playlistinfo.name) : (cov_1lij382jrz.b[10][1]++, '');
|
44103 | cov_1lij382jrz.s[30]++;
|
44104 | macros['{timestamp}'] = new Date().getTime();
|
44105 | cov_1lij382jrz.s[31]++;
|
44106 | macros['{document.referrer}'] = document_1.referrer;
|
44107 | cov_1lij382jrz.s[32]++;
|
44108 | macros['{window.location.href}'] = window_1.location.href;
|
44109 | cov_1lij382jrz.s[33]++;
|
44110 | macros['{random}'] = Math.floor(Math.random() * 1000000000000);
|
44111 | cov_1lij382jrz.s[34]++;
|
44112 | ['description', 'tags', 'reference_id', 'ad_keys'].forEach(function (prop) {
|
44113 | cov_1lij382jrz.f[4]++;
|
44114 | cov_1lij382jrz.s[35]++;
|
44115 |
|
44116 | if ((cov_1lij382jrz.b[12][0]++, _this.mediainfo) && (cov_1lij382jrz.b[12][1]++, _this.mediainfo[prop])) {
|
44117 | cov_1lij382jrz.b[11][0]++;
|
44118 | cov_1lij382jrz.s[36]++;
|
44119 | macros["{mediainfo." + prop + "}"] = _this.mediainfo[prop];
|
44120 | } else {
|
44121 | cov_1lij382jrz.b[11][1]++;
|
44122 | cov_1lij382jrz.s[37]++;
|
44123 |
|
44124 | if (defaults["{mediainfo." + prop + "}"]) {
|
44125 | cov_1lij382jrz.b[13][0]++;
|
44126 | cov_1lij382jrz.s[38]++;
|
44127 | macros["{mediainfo." + prop + "}"] = defaults["{mediainfo." + prop + "}"];
|
44128 | } else {
|
44129 | cov_1lij382jrz.b[13][1]++;
|
44130 | cov_1lij382jrz.s[39]++;
|
44131 | macros["{mediainfo." + prop + "}"] = '';
|
44132 | }
|
44133 | }
|
44134 | });
|
44135 | cov_1lij382jrz.s[40]++;
|
44136 | customFields(this.mediainfo, macros, 'custom_fields');
|
44137 | cov_1lij382jrz.s[41]++;
|
44138 | customFields(this.mediainfo, macros, 'customFields');
|
44139 | cov_1lij382jrz.s[42]++;
|
44140 |
|
44141 | for (var i in macros) {
|
44142 | cov_1lij382jrz.s[43]++;
|
44143 | string = string.split(i).join(uriEncodeIfNeeded(macros[i], uriEncode));
|
44144 | }
|
44145 |
|
44146 | cov_1lij382jrz.s[44]++;
|
44147 | string = string.replace(/{pageVariable\.([^}]+)}/g, function (match, name) {
|
44148 | cov_1lij382jrz.f[5]++;
|
44149 | var value;
|
44150 | var context = (cov_1lij382jrz.s[45]++, window_1);
|
44151 | var names = (cov_1lij382jrz.s[46]++, name.split('.'));
|
44152 | cov_1lij382jrz.s[47]++;
|
44153 |
|
44154 | for (var _i = 0; _i < names.length; _i++) {
|
44155 | cov_1lij382jrz.s[48]++;
|
44156 |
|
44157 | if (_i === names.length - 1) {
|
44158 | cov_1lij382jrz.b[14][0]++;
|
44159 | cov_1lij382jrz.s[49]++;
|
44160 | value = context[names[_i]];
|
44161 | } else {
|
44162 | cov_1lij382jrz.b[14][1]++;
|
44163 | cov_1lij382jrz.s[50]++;
|
44164 | context = context[names[_i]];
|
44165 | }
|
44166 | }
|
44167 |
|
44168 | var type = (cov_1lij382jrz.s[51]++, typeof value);
|
44169 | cov_1lij382jrz.s[52]++;
|
44170 |
|
44171 | if (value === null) {
|
44172 | cov_1lij382jrz.b[15][0]++;
|
44173 | cov_1lij382jrz.s[53]++;
|
44174 | return 'null';
|
44175 | } else {
|
44176 | cov_1lij382jrz.b[15][1]++;
|
44177 | cov_1lij382jrz.s[54]++;
|
44178 |
|
44179 | if (value === undefined) {
|
44180 | cov_1lij382jrz.b[16][0]++;
|
44181 | cov_1lij382jrz.s[55]++;
|
44182 |
|
44183 | if (defaults["{pageVariable." + name + "}"]) {
|
44184 | cov_1lij382jrz.b[17][0]++;
|
44185 | cov_1lij382jrz.s[56]++;
|
44186 | return defaults["{pageVariable." + name + "}"];
|
44187 | } else {
|
44188 | cov_1lij382jrz.b[17][1]++;
|
44189 | }
|
44190 |
|
44191 | cov_1lij382jrz.s[57]++;
|
44192 | videojs$1.log.warn("Page variable \"" + name + "\" not found");
|
44193 | cov_1lij382jrz.s[58]++;
|
44194 | return '';
|
44195 | } else {
|
44196 | cov_1lij382jrz.b[16][1]++;
|
44197 | cov_1lij382jrz.s[59]++;
|
44198 |
|
44199 | if ((cov_1lij382jrz.b[19][0]++, type !== 'string') && (cov_1lij382jrz.b[19][1]++, type !== 'number') && (cov_1lij382jrz.b[19][2]++, type !== 'boolean')) {
|
44200 | cov_1lij382jrz.b[18][0]++;
|
44201 | cov_1lij382jrz.s[60]++;
|
44202 | videojs$1.log.warn("Page variable \"" + name + "\" is not a supported type");
|
44203 | cov_1lij382jrz.s[61]++;
|
44204 | return '';
|
44205 | } else {
|
44206 | cov_1lij382jrz.b[18][1]++;
|
44207 | }
|
44208 | }
|
44209 | }
|
44210 |
|
44211 | cov_1lij382jrz.s[62]++;
|
44212 | return uriEncodeIfNeeded(String(value), uriEncode);
|
44213 | });
|
44214 | cov_1lij382jrz.s[63]++;
|
44215 |
|
44216 | for (var defaultVal in defaults) {
|
44217 | cov_1lij382jrz.s[64]++;
|
44218 | string = string.replace(defaultVal, defaults[defaultVal]);
|
44219 | }
|
44220 |
|
44221 | cov_1lij382jrz.s[65]++;
|
44222 | return string;
|
44223 | }
|
44224 |
|
44225 | var cov_123xbosq0a = function () {
|
44226 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/cueTextTracks.js',
|
44227 | hash = 'e62b36883a48780c8c75f8f6a51065f0fd6cb0c8',
|
44228 | Function = function () {}.constructor,
|
44229 | global = new Function('return this')(),
|
44230 | gcv = '__coverage__',
|
44231 | coverageData = {
|
44232 | path: '/Users/poneill/dev/videojs-contrib-ads/src/cueTextTracks.js',
|
44233 | statementMap: {
|
44234 | '0': {
|
44235 | start: {
|
44236 | line: 10,
|
44237 | column: 22
|
44238 | },
|
44239 | end: {
|
44240 | line: 10,
|
44241 | column: 24
|
44242 | }
|
44243 | },
|
44244 | '1': {
|
44245 | start: {
|
44246 | line: 19,
|
44247 | column: 0
|
44248 | },
|
44249 | end: {
|
44250 | line: 37,
|
44251 | column: 2
|
44252 | }
|
44253 | },
|
44254 | '2': {
|
44255 | start: {
|
44256 | line: 20,
|
44257 | column: 17
|
44258 | },
|
44259 | end: {
|
44260 | line: 20,
|
44261 | column: 36
|
44262 | }
|
44263 | },
|
44264 | '3': {
|
44265 | start: {
|
44266 | line: 21,
|
44267 | column: 28
|
44268 | },
|
44269 | end: {
|
44270 | line: 26,
|
44271 | column: 3
|
44272 | }
|
44273 | },
|
44274 | '4': {
|
44275 | start: {
|
44276 | line: 22,
|
44277 | column: 4
|
44278 | },
|
44279 | end: {
|
44280 | line: 25,
|
44281 | column: 5
|
44282 | }
|
44283 | },
|
44284 | '5': {
|
44285 | start: {
|
44286 | line: 23,
|
44287 | column: 6
|
44288 | },
|
44289 | end: {
|
44290 | line: 23,
|
44291 | column: 59
|
44292 | }
|
44293 | },
|
44294 | '6': {
|
44295 | start: {
|
44296 | line: 24,
|
44297 | column: 6
|
44298 | },
|
44299 | end: {
|
44300 | line: 24,
|
44301 | column: 42
|
44302 | }
|
44303 | },
|
44304 | '7': {
|
44305 | start: {
|
44306 | line: 29,
|
44307 | column: 2
|
44308 | },
|
44309 | end: {
|
44310 | line: 31,
|
44311 | column: 3
|
44312 | }
|
44313 | },
|
44314 | '8': {
|
44315 | start: {
|
44316 | line: 30,
|
44317 | column: 4
|
44318 | },
|
44319 | end: {
|
44320 | line: 30,
|
44321 | column: 33
|
44322 | }
|
44323 | },
|
44324 | '9': {
|
44325 | start: {
|
44326 | line: 34,
|
44327 | column: 2
|
44328 | },
|
44329 | end: {
|
44330 | line: 36,
|
44331 | column: 5
|
44332 | }
|
44333 | },
|
44334 | '10': {
|
44335 | start: {
|
44336 | line: 35,
|
44337 | column: 4
|
44338 | },
|
44339 | end: {
|
44340 | line: 35,
|
44341 | column: 35
|
44342 | }
|
44343 | },
|
44344 | '11': {
|
44345 | start: {
|
44346 | line: 45,
|
44347 | column: 0
|
44348 | },
|
44349 | end: {
|
44350 | line: 47,
|
44351 | column: 2
|
44352 | }
|
44353 | },
|
44354 | '12': {
|
44355 | start: {
|
44356 | line: 46,
|
44357 | column: 2
|
44358 | },
|
44359 | end: {
|
44360 | line: 46,
|
44361 | column: 9
|
44362 | }
|
44363 | },
|
44364 | '13': {
|
44365 | start: {
|
44366 | line: 56,
|
44367 | column: 0
|
44368 | },
|
44369 | end: {
|
44370 | line: 58,
|
44371 | column: 2
|
44372 | }
|
44373 | },
|
44374 | '14': {
|
44375 | start: {
|
44376 | line: 57,
|
44377 | column: 2
|
44378 | },
|
44379 | end: {
|
44380 | line: 57,
|
44381 | column: 13
|
44382 | }
|
44383 | },
|
44384 | '15': {
|
44385 | start: {
|
44386 | line: 68,
|
44387 | column: 0
|
44388 | },
|
44389 | end: {
|
44390 | line: 70,
|
44391 | column: 2
|
44392 | }
|
44393 | },
|
44394 | '16': {
|
44395 | start: {
|
44396 | line: 69,
|
44397 | column: 2
|
44398 | },
|
44399 | end: {
|
44400 | line: 69,
|
44401 | column: 14
|
44402 | }
|
44403 | },
|
44404 | '17': {
|
44405 | start: {
|
44406 | line: 78,
|
44407 | column: 0
|
44408 | },
|
44409 | end: {
|
44410 | line: 80,
|
44411 | column: 2
|
44412 | }
|
44413 | },
|
44414 | '18': {
|
44415 | start: {
|
44416 | line: 79,
|
44417 | column: 2
|
44418 | },
|
44419 | end: {
|
44420 | line: 79,
|
44421 | column: 16
|
44422 | }
|
44423 | },
|
44424 | '19': {
|
44425 | start: {
|
44426 | line: 86,
|
44427 | column: 23
|
44428 | },
|
44429 | end: {
|
44430 | line: 88,
|
44431 | column: 1
|
44432 | }
|
44433 | },
|
44434 | '20': {
|
44435 | start: {
|
44436 | line: 87,
|
44437 | column: 2
|
44438 | },
|
44439 | end: {
|
44440 | line: 87,
|
44441 | column: 65
|
44442 | }
|
44443 | },
|
44444 | '21': {
|
44445 | start: {
|
44446 | line: 94,
|
44447 | column: 26
|
44448 | },
|
44449 | end: {
|
44450 | line: 98,
|
44451 | column: 1
|
44452 | }
|
44453 | },
|
44454 | '22': {
|
44455 | start: {
|
44456 | line: 95,
|
44457 | column: 2
|
44458 | },
|
44459 | end: {
|
44460 | line: 97,
|
44461 | column: 3
|
44462 | }
|
44463 | },
|
44464 | '23': {
|
44465 | start: {
|
44466 | line: 96,
|
44467 | column: 4
|
44468 | },
|
44469 | end: {
|
44470 | line: 96,
|
44471 | column: 42
|
44472 | }
|
44473 | },
|
44474 | '24': {
|
44475 | start: {
|
44476 | line: 108,
|
44477 | column: 0
|
44478 | },
|
44479 | end: {
|
44480 | line: 144,
|
44481 | column: 2
|
44482 | }
|
44483 | },
|
44484 | '25': {
|
44485 | start: {
|
44486 | line: 109,
|
44487 | column: 2
|
44488 | },
|
44489 | end: {
|
44490 | line: 109,
|
44491 | column: 31
|
44492 | }
|
44493 | },
|
44494 | '26': {
|
44495 | start: {
|
44496 | line: 112,
|
44497 | column: 2
|
44498 | },
|
44499 | end: {
|
44500 | line: 143,
|
44501 | column: 3
|
44502 | }
|
44503 | },
|
44504 | '27': {
|
44505 | start: {
|
44506 | line: 113,
|
44507 | column: 16
|
44508 | },
|
44509 | end: {
|
44510 | line: 113,
|
44511 | column: 23
|
44512 | }
|
44513 | },
|
44514 | '28': {
|
44515 | start: {
|
44516 | line: 114,
|
44517 | column: 20
|
44518 | },
|
44519 | end: {
|
44520 | line: 114,
|
44521 | column: 55
|
44522 | }
|
44523 | },
|
44524 | '29': {
|
44525 | start: {
|
44526 | line: 117,
|
44527 | column: 4
|
44528 | },
|
44529 | end: {
|
44530 | line: 120,
|
44531 | column: 5
|
44532 | }
|
44533 | },
|
44534 | '30': {
|
44535 | start: {
|
44536 | line: 118,
|
44537 | column: 6
|
44538 | },
|
44539 | end: {
|
44540 | line: 118,
|
44541 | column: 75
|
44542 | }
|
44543 | },
|
44544 | '31': {
|
44545 | start: {
|
44546 | line: 119,
|
44547 | column: 6
|
44548 | },
|
44549 | end: {
|
44550 | line: 119,
|
44551 | column: 13
|
44552 | }
|
44553 | },
|
44554 | '32': {
|
44555 | start: {
|
44556 | line: 123,
|
44557 | column: 18
|
44558 | },
|
44559 | end: {
|
44560 | line: 123,
|
44561 | column: 44
|
44562 | }
|
44563 | },
|
44564 | '33': {
|
44565 | start: {
|
44566 | line: 124,
|
44567 | column: 22
|
44568 | },
|
44569 | end: {
|
44570 | line: 124,
|
44571 | column: 35
|
44572 | }
|
44573 | },
|
44574 | '34': {
|
44575 | start: {
|
44576 | line: 127,
|
44577 | column: 4
|
44578 | },
|
44579 | end: {
|
44580 | line: 130,
|
44581 | column: 5
|
44582 | }
|
44583 | },
|
44584 | '35': {
|
44585 | start: {
|
44586 | line: 128,
|
44587 | column: 6
|
44588 | },
|
44589 | end: {
|
44590 | line: 128,
|
44591 | column: 63
|
44592 | }
|
44593 | },
|
44594 | '36': {
|
44595 | start: {
|
44596 | line: 129,
|
44597 | column: 6
|
44598 | },
|
44599 | end: {
|
44600 | line: 129,
|
44601 | column: 13
|
44602 | }
|
44603 | },
|
44604 | '37': {
|
44605 | start: {
|
44606 | line: 133,
|
44607 | column: 4
|
44608 | },
|
44609 | end: {
|
44610 | line: 135,
|
44611 | column: 5
|
44612 | }
|
44613 | },
|
44614 | '38': {
|
44615 | start: {
|
44616 | line: 134,
|
44617 | column: 6
|
44618 | },
|
44619 | end: {
|
44620 | line: 134,
|
44621 | column: 58
|
44622 | }
|
44623 | },
|
44624 | '39': {
|
44625 | start: {
|
44626 | line: 138,
|
44627 | column: 4
|
44628 | },
|
44629 | end: {
|
44630 | line: 138,
|
44631 | column: 50
|
44632 | }
|
44633 | },
|
44634 | '40': {
|
44635 | start: {
|
44636 | line: 141,
|
44637 | column: 4
|
44638 | },
|
44639 | end: {
|
44640 | line: 141,
|
44641 | column: 37
|
44642 | }
|
44643 | }
|
44644 | },
|
44645 | fnMap: {
|
44646 | '0': {
|
44647 | name: '(anonymous_0)',
|
44648 | decl: {
|
44649 | start: {
|
44650 | line: 19,
|
44651 | column: 38
|
44652 | },
|
44653 | end: {
|
44654 | line: 19,
|
44655 | column: 39
|
44656 | }
|
44657 | },
|
44658 | loc: {
|
44659 | start: {
|
44660 | line: 19,
|
44661 | column: 77
|
44662 | },
|
44663 | end: {
|
44664 | line: 37,
|
44665 | column: 1
|
44666 | }
|
44667 | },
|
44668 | line: 19
|
44669 | },
|
44670 | '1': {
|
44671 | name: '(anonymous_1)',
|
44672 | decl: {
|
44673 | start: {
|
44674 | line: 21,
|
44675 | column: 28
|
44676 | },
|
44677 | end: {
|
44678 | line: 21,
|
44679 | column: 29
|
44680 | }
|
44681 | },
|
44682 | loc: {
|
44683 | start: {
|
44684 | line: 21,
|
44685 | column: 44
|
44686 | },
|
44687 | end: {
|
44688 | line: 26,
|
44689 | column: 3
|
44690 | }
|
44691 | },
|
44692 | line: 21
|
44693 | },
|
44694 | '2': {
|
44695 | name: '(anonymous_2)',
|
44696 | decl: {
|
44697 | start: {
|
44698 | line: 34,
|
44699 | column: 38
|
44700 | },
|
44701 | end: {
|
44702 | line: 34,
|
44703 | column: 39
|
44704 | }
|
44705 | },
|
44706 | loc: {
|
44707 | start: {
|
44708 | line: 34,
|
44709 | column: 49
|
44710 | },
|
44711 | end: {
|
44712 | line: 36,
|
44713 | column: 3
|
44714 | }
|
44715 | },
|
44716 | line: 34
|
44717 | },
|
44718 | '3': {
|
44719 | name: '(anonymous_3)',
|
44720 | decl: {
|
44721 | start: {
|
44722 | line: 45,
|
44723 | column: 37
|
44724 | },
|
44725 | end: {
|
44726 | line: 45,
|
44727 | column: 38
|
44728 | }
|
44729 | },
|
44730 | loc: {
|
44731 | start: {
|
44732 | line: 45,
|
44733 | column: 53
|
44734 | },
|
44735 | end: {
|
44736 | line: 47,
|
44737 | column: 1
|
44738 | }
|
44739 | },
|
44740 | line: 45
|
44741 | },
|
44742 | '4': {
|
44743 | name: '(anonymous_4)',
|
44744 | decl: {
|
44745 | start: {
|
44746 | line: 56,
|
44747 | column: 34
|
44748 | },
|
44749 | end: {
|
44750 | line: 56,
|
44751 | column: 35
|
44752 | }
|
44753 | },
|
44754 | loc: {
|
44755 | start: {
|
44756 | line: 56,
|
44757 | column: 56
|
44758 | },
|
44759 | end: {
|
44760 | line: 58,
|
44761 | column: 1
|
44762 | }
|
44763 | },
|
44764 | line: 56
|
44765 | },
|
44766 | '5': {
|
44767 | name: '(anonymous_5)',
|
44768 | decl: {
|
44769 | start: {
|
44770 | line: 68,
|
44771 | column: 33
|
44772 | },
|
44773 | end: {
|
44774 | line: 68,
|
44775 | column: 34
|
44776 | }
|
44777 | },
|
44778 | loc: {
|
44779 | start: {
|
44780 | line: 68,
|
44781 | column: 55
|
44782 | },
|
44783 | end: {
|
44784 | line: 70,
|
44785 | column: 1
|
44786 | }
|
44787 | },
|
44788 | line: 68
|
44789 | },
|
44790 | '6': {
|
44791 | name: '(anonymous_6)',
|
44792 | decl: {
|
44793 | start: {
|
44794 | line: 78,
|
44795 | column: 25
|
44796 | },
|
44797 | end: {
|
44798 | line: 78,
|
44799 | column: 26
|
44800 | }
|
44801 | },
|
44802 | loc: {
|
44803 | start: {
|
44804 | line: 78,
|
44805 | column: 47
|
44806 | },
|
44807 | end: {
|
44808 | line: 80,
|
44809 | column: 1
|
44810 | }
|
44811 | },
|
44812 | line: 78
|
44813 | },
|
44814 | '7': {
|
44815 | name: '(anonymous_7)',
|
44816 | decl: {
|
44817 | start: {
|
44818 | line: 86,
|
44819 | column: 23
|
44820 | },
|
44821 | end: {
|
44822 | line: 86,
|
44823 | column: 24
|
44824 | }
|
44825 | },
|
44826 | loc: {
|
44827 | start: {
|
44828 | line: 86,
|
44829 | column: 47
|
44830 | },
|
44831 | end: {
|
44832 | line: 88,
|
44833 | column: 1
|
44834 | }
|
44835 | },
|
44836 | line: 86
|
44837 | },
|
44838 | '8': {
|
44839 | name: '(anonymous_8)',
|
44840 | decl: {
|
44841 | start: {
|
44842 | line: 94,
|
44843 | column: 26
|
44844 | },
|
44845 | end: {
|
44846 | line: 94,
|
44847 | column: 27
|
44848 | }
|
44849 | },
|
44850 | loc: {
|
44851 | start: {
|
44852 | line: 94,
|
44853 | column: 50
|
44854 | },
|
44855 | end: {
|
44856 | line: 98,
|
44857 | column: 1
|
44858 | }
|
44859 | },
|
44860 | line: 94
|
44861 | },
|
44862 | '9': {
|
44863 | name: '(anonymous_9)',
|
44864 | decl: {
|
44865 | start: {
|
44866 | line: 108,
|
44867 | column: 31
|
44868 | },
|
44869 | end: {
|
44870 | line: 108,
|
44871 | column: 32
|
44872 | }
|
44873 | },
|
44874 | loc: {
|
44875 | start: {
|
44876 | line: 108,
|
44877 | column: 84
|
44878 | },
|
44879 | end: {
|
44880 | line: 144,
|
44881 | column: 1
|
44882 | }
|
44883 | },
|
44884 | line: 108
|
44885 | }
|
44886 | },
|
44887 | branchMap: {
|
44888 | '0': {
|
44889 | loc: {
|
44890 | start: {
|
44891 | line: 22,
|
44892 | column: 4
|
44893 | },
|
44894 | end: {
|
44895 | line: 25,
|
44896 | column: 5
|
44897 | }
|
44898 | },
|
44899 | type: 'if',
|
44900 | locations: [{
|
44901 | start: {
|
44902 | line: 22,
|
44903 | column: 4
|
44904 | },
|
44905 | end: {
|
44906 | line: 25,
|
44907 | column: 5
|
44908 | }
|
44909 | }, {
|
44910 | start: {
|
44911 | line: 22,
|
44912 | column: 4
|
44913 | },
|
44914 | end: {
|
44915 | line: 25,
|
44916 | column: 5
|
44917 | }
|
44918 | }],
|
44919 | line: 22
|
44920 | },
|
44921 | '1': {
|
44922 | loc: {
|
44923 | start: {
|
44924 | line: 87,
|
44925 | column: 9
|
44926 | },
|
44927 | end: {
|
44928 | line: 87,
|
44929 | column: 64
|
44930 | }
|
44931 | },
|
44932 | type: 'binary-expr',
|
44933 | locations: [{
|
44934 | start: {
|
44935 | line: 87,
|
44936 | column: 10
|
44937 | },
|
44938 | end: {
|
44939 | line: 87,
|
44940 | column: 29
|
44941 | }
|
44942 | }, {
|
44943 | start: {
|
44944 | line: 87,
|
44945 | column: 34
|
44946 | },
|
44947 | end: {
|
44948 | line: 87,
|
44949 | column: 64
|
44950 | }
|
44951 | }],
|
44952 | line: 87
|
44953 | },
|
44954 | '2': {
|
44955 | loc: {
|
44956 | start: {
|
44957 | line: 95,
|
44958 | column: 2
|
44959 | },
|
44960 | end: {
|
44961 | line: 97,
|
44962 | column: 3
|
44963 | }
|
44964 | },
|
44965 | type: 'if',
|
44966 | locations: [{
|
44967 | start: {
|
44968 | line: 95,
|
44969 | column: 2
|
44970 | },
|
44971 | end: {
|
44972 | line: 97,
|
44973 | column: 3
|
44974 | }
|
44975 | }, {
|
44976 | start: {
|
44977 | line: 95,
|
44978 | column: 2
|
44979 | },
|
44980 | end: {
|
44981 | line: 97,
|
44982 | column: 3
|
44983 | }
|
44984 | }],
|
44985 | line: 95
|
44986 | },
|
44987 | '3': {
|
44988 | loc: {
|
44989 | start: {
|
44990 | line: 95,
|
44991 | column: 6
|
44992 | },
|
44993 | end: {
|
44994 | line: 95,
|
44995 | column: 41
|
44996 | }
|
44997 | },
|
44998 | type: 'binary-expr',
|
44999 | locations: [{
|
45000 | start: {
|
45001 | line: 95,
|
45002 | column: 6
|
45003 | },
|
45004 | end: {
|
45005 | line: 95,
|
45006 | column: 25
|
45007 | }
|
45008 | }, {
|
45009 | start: {
|
45010 | line: 95,
|
45011 | column: 29
|
45012 | },
|
45013 | end: {
|
45014 | line: 95,
|
45015 | column: 41
|
45016 | }
|
45017 | }],
|
45018 | line: 95
|
45019 | },
|
45020 | '4': {
|
45021 | loc: {
|
45022 | start: {
|
45023 | line: 117,
|
45024 | column: 4
|
45025 | },
|
45026 | end: {
|
45027 | line: 120,
|
45028 | column: 5
|
45029 | }
|
45030 | },
|
45031 | type: 'if',
|
45032 | locations: [{
|
45033 | start: {
|
45034 | line: 117,
|
45035 | column: 4
|
45036 | },
|
45037 | end: {
|
45038 | line: 120,
|
45039 | column: 5
|
45040 | }
|
45041 | }, {
|
45042 | start: {
|
45043 | line: 117,
|
45044 | column: 4
|
45045 | },
|
45046 | end: {
|
45047 | line: 120,
|
45048 | column: 5
|
45049 | }
|
45050 | }],
|
45051 | line: 117
|
45052 | },
|
45053 | '5': {
|
45054 | loc: {
|
45055 | start: {
|
45056 | line: 127,
|
45057 | column: 4
|
45058 | },
|
45059 | end: {
|
45060 | line: 130,
|
45061 | column: 5
|
45062 | }
|
45063 | },
|
45064 | type: 'if',
|
45065 | locations: [{
|
45066 | start: {
|
45067 | line: 127,
|
45068 | column: 4
|
45069 | },
|
45070 | end: {
|
45071 | line: 130,
|
45072 | column: 5
|
45073 | }
|
45074 | }, {
|
45075 | start: {
|
45076 | line: 127,
|
45077 | column: 4
|
45078 | },
|
45079 | end: {
|
45080 | line: 130,
|
45081 | column: 5
|
45082 | }
|
45083 | }],
|
45084 | line: 127
|
45085 | },
|
45086 | '6': {
|
45087 | loc: {
|
45088 | start: {
|
45089 | line: 133,
|
45090 | column: 4
|
45091 | },
|
45092 | end: {
|
45093 | line: 135,
|
45094 | column: 5
|
45095 | }
|
45096 | },
|
45097 | type: 'if',
|
45098 | locations: [{
|
45099 | start: {
|
45100 | line: 133,
|
45101 | column: 4
|
45102 | },
|
45103 | end: {
|
45104 | line: 135,
|
45105 | column: 5
|
45106 | }
|
45107 | }, {
|
45108 | start: {
|
45109 | line: 133,
|
45110 | column: 4
|
45111 | },
|
45112 | end: {
|
45113 | line: 135,
|
45114 | column: 5
|
45115 | }
|
45116 | }],
|
45117 | line: 133
|
45118 | }
|
45119 | },
|
45120 | s: {
|
45121 | '0': 0,
|
45122 | '1': 0,
|
45123 | '2': 0,
|
45124 | '3': 0,
|
45125 | '4': 0,
|
45126 | '5': 0,
|
45127 | '6': 0,
|
45128 | '7': 0,
|
45129 | '8': 0,
|
45130 | '9': 0,
|
45131 | '10': 0,
|
45132 | '11': 0,
|
45133 | '12': 0,
|
45134 | '13': 0,
|
45135 | '14': 0,
|
45136 | '15': 0,
|
45137 | '16': 0,
|
45138 | '17': 0,
|
45139 | '18': 0,
|
45140 | '19': 0,
|
45141 | '20': 0,
|
45142 | '21': 0,
|
45143 | '22': 0,
|
45144 | '23': 0,
|
45145 | '24': 0,
|
45146 | '25': 0,
|
45147 | '26': 0,
|
45148 | '27': 0,
|
45149 | '28': 0,
|
45150 | '29': 0,
|
45151 | '30': 0,
|
45152 | '31': 0,
|
45153 | '32': 0,
|
45154 | '33': 0,
|
45155 | '34': 0,
|
45156 | '35': 0,
|
45157 | '36': 0,
|
45158 | '37': 0,
|
45159 | '38': 0,
|
45160 | '39': 0,
|
45161 | '40': 0
|
45162 | },
|
45163 | f: {
|
45164 | '0': 0,
|
45165 | '1': 0,
|
45166 | '2': 0,
|
45167 | '3': 0,
|
45168 | '4': 0,
|
45169 | '5': 0,
|
45170 | '6': 0,
|
45171 | '7': 0,
|
45172 | '8': 0,
|
45173 | '9': 0
|
45174 | },
|
45175 | b: {
|
45176 | '0': [0, 0],
|
45177 | '1': [0, 0],
|
45178 | '2': [0, 0],
|
45179 | '3': [0, 0],
|
45180 | '4': [0, 0],
|
45181 | '5': [0, 0],
|
45182 | '6': [0, 0]
|
45183 | },
|
45184 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
45185 | },
|
45186 | coverage = global[gcv] || (global[gcv] = {});
|
45187 |
|
45188 | if (coverage[path] && coverage[path].hash === hash) {
|
45189 | return coverage[path];
|
45190 | }
|
45191 |
|
45192 | coverageData.hash = hash;
|
45193 | return coverage[path] = coverageData;
|
45194 | }();
|
45195 | var cueTextTracks = (cov_123xbosq0a.s[0]++, {});
|
45196 | cov_123xbosq0a.s[1]++;
|
45197 |
|
45198 | cueTextTracks.processMetadataTracks = function (player, processMetadataTrack) {
|
45199 | cov_123xbosq0a.f[0]++;
|
45200 | var tracks = (cov_123xbosq0a.s[2]++, player.textTracks());
|
45201 | cov_123xbosq0a.s[3]++;
|
45202 |
|
45203 | var setModeAndProcess = function setModeAndProcess(track) {
|
45204 | cov_123xbosq0a.f[1]++;
|
45205 | cov_123xbosq0a.s[4]++;
|
45206 |
|
45207 | if (track.kind === 'metadata') {
|
45208 | cov_123xbosq0a.b[0][0]++;
|
45209 | cov_123xbosq0a.s[5]++;
|
45210 | player.ads.cueTextTracks.setMetadataTrackMode(track);
|
45211 | cov_123xbosq0a.s[6]++;
|
45212 | processMetadataTrack(player, track);
|
45213 | } else {
|
45214 | cov_123xbosq0a.b[0][1]++;
|
45215 | }
|
45216 | };
|
45217 |
|
45218 | cov_123xbosq0a.s[7]++;
|
45219 |
|
45220 | for (var i = 0; i < tracks.length; i++) {
|
45221 | cov_123xbosq0a.s[8]++;
|
45222 | setModeAndProcess(tracks[i]);
|
45223 | }
|
45224 |
|
45225 | cov_123xbosq0a.s[9]++;
|
45226 | tracks.addEventListener('addtrack', function (event) {
|
45227 | cov_123xbosq0a.f[2]++;
|
45228 | cov_123xbosq0a.s[10]++;
|
45229 | setModeAndProcess(event.track);
|
45230 | });
|
45231 | };
|
45232 |
|
45233 | cov_123xbosq0a.s[11]++;
|
45234 |
|
45235 | cueTextTracks.setMetadataTrackMode = function (track) {
|
45236 | cov_123xbosq0a.f[3]++;
|
45237 | cov_123xbosq0a.s[12]++;
|
45238 | return;
|
45239 | };
|
45240 |
|
45241 | cov_123xbosq0a.s[13]++;
|
45242 |
|
45243 | cueTextTracks.getSupportedAdCue = function (player, cue) {
|
45244 | cov_123xbosq0a.f[4]++;
|
45245 | cov_123xbosq0a.s[14]++;
|
45246 | return cue;
|
45247 | };
|
45248 |
|
45249 | cov_123xbosq0a.s[15]++;
|
45250 |
|
45251 | cueTextTracks.isSupportedAdCue = function (player, cue) {
|
45252 | cov_123xbosq0a.f[5]++;
|
45253 | cov_123xbosq0a.s[16]++;
|
45254 | return true;
|
45255 | };
|
45256 |
|
45257 | cov_123xbosq0a.s[17]++;
|
45258 |
|
45259 | cueTextTracks.getCueId = function (player, cue) {
|
45260 | cov_123xbosq0a.f[6]++;
|
45261 | cov_123xbosq0a.s[18]++;
|
45262 | return cue.id;
|
45263 | };
|
45264 |
|
45265 | cov_123xbosq0a.s[19]++;
|
45266 |
|
45267 | var cueAlreadySeen = function cueAlreadySeen(player, cueId) {
|
45268 | cov_123xbosq0a.f[7]++;
|
45269 | cov_123xbosq0a.s[20]++;
|
45270 | return (cov_123xbosq0a.b[1][0]++, cueId !== undefined) && (cov_123xbosq0a.b[1][1]++, player.ads.includedCues[cueId]);
|
45271 | };
|
45272 |
|
45273 | cov_123xbosq0a.s[21]++;
|
45274 |
|
45275 | var setCueAlreadySeen = function setCueAlreadySeen(player, cueId) {
|
45276 | cov_123xbosq0a.f[8]++;
|
45277 | cov_123xbosq0a.s[22]++;
|
45278 |
|
45279 | if ((cov_123xbosq0a.b[3][0]++, cueId !== undefined) && (cov_123xbosq0a.b[3][1]++, cueId !== '')) {
|
45280 | cov_123xbosq0a.b[2][0]++;
|
45281 | cov_123xbosq0a.s[23]++;
|
45282 | player.ads.includedCues[cueId] = true;
|
45283 | } else {
|
45284 | cov_123xbosq0a.b[2][1]++;
|
45285 | }
|
45286 | };
|
45287 |
|
45288 | cov_123xbosq0a.s[24]++;
|
45289 |
|
45290 | cueTextTracks.processAdTrack = function (player, cues, processCue, cancelAdsHandler) {
|
45291 | cov_123xbosq0a.f[9]++;
|
45292 | cov_123xbosq0a.s[25]++;
|
45293 | player.ads.includedCues = {};
|
45294 | cov_123xbosq0a.s[26]++;
|
45295 |
|
45296 | for (var i = 0; i < cues.length; i++) {
|
45297 | var cue = (cov_123xbosq0a.s[27]++, cues[i]);
|
45298 | var cueData = (cov_123xbosq0a.s[28]++, this.getSupportedAdCue(player, cue));
|
45299 | cov_123xbosq0a.s[29]++;
|
45300 |
|
45301 | if (!this.isSupportedAdCue(player, cue)) {
|
45302 | cov_123xbosq0a.b[4][0]++;
|
45303 | cov_123xbosq0a.s[30]++;
|
45304 | videojs$1.log.warn('Skipping as this is not a supported ad cue.', cue);
|
45305 | cov_123xbosq0a.s[31]++;
|
45306 | return;
|
45307 | } else {
|
45308 | cov_123xbosq0a.b[4][1]++;
|
45309 | }
|
45310 |
|
45311 | var cueId = (cov_123xbosq0a.s[32]++, this.getCueId(player, cue));
|
45312 | var startTime = (cov_123xbosq0a.s[33]++, cue.startTime);
|
45313 | cov_123xbosq0a.s[34]++;
|
45314 |
|
45315 | if (cueAlreadySeen(player, cueId)) {
|
45316 | cov_123xbosq0a.b[5][0]++;
|
45317 | cov_123xbosq0a.s[35]++;
|
45318 | videojs$1.log('Skipping ad already seen with ID ' + cueId);
|
45319 | cov_123xbosq0a.s[36]++;
|
45320 | return;
|
45321 | } else {
|
45322 | cov_123xbosq0a.b[5][1]++;
|
45323 | }
|
45324 |
|
45325 | cov_123xbosq0a.s[37]++;
|
45326 |
|
45327 | if (cancelAdsHandler) {
|
45328 | cov_123xbosq0a.b[6][0]++;
|
45329 | cov_123xbosq0a.s[38]++;
|
45330 | cancelAdsHandler(player, cueData, cueId, startTime);
|
45331 | } else {
|
45332 | cov_123xbosq0a.b[6][1]++;
|
45333 | }
|
45334 |
|
45335 | cov_123xbosq0a.s[39]++;
|
45336 | processCue(player, cueData, cueId, startTime);
|
45337 | cov_123xbosq0a.s[40]++;
|
45338 | setCueAlreadySeen(player, cueId);
|
45339 | }
|
45340 | };
|
45341 |
|
45342 | var cov_2iisheq25c = function () {
|
45343 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/register.js',
|
45344 | hash = '2183eac51d24c41b11fe034ea3400c854ce7338e',
|
45345 | Function = function () {}.constructor,
|
45346 | global = new Function('return this')(),
|
45347 | gcv = '__coverage__',
|
45348 | coverageData = {
|
45349 | path: '/Users/poneill/dev/videojs-contrib-ads/src/register.js',
|
45350 | statementMap: {
|
45351 | '0': {
|
45352 | start: {
|
45353 | line: 4,
|
45354 | column: 56
|
45355 | },
|
45356 | end: {
|
45357 | line: 4,
|
45358 | column: 77
|
45359 | }
|
45360 | },
|
45361 | '1': {
|
45362 | start: {
|
45363 | line: 12,
|
45364 | column: 21
|
45365 | },
|
45366 | end: {
|
45367 | line: 23,
|
45368 | column: 1
|
45369 | }
|
45370 | },
|
45371 | '2': {
|
45372 | start: {
|
45373 | line: 15,
|
45374 | column: 2
|
45375 | },
|
45376 | end: {
|
45377 | line: 17,
|
45378 | column: 3
|
45379 | }
|
45380 | },
|
45381 | '3': {
|
45382 | start: {
|
45383 | line: 16,
|
45384 | column: 4
|
45385 | },
|
45386 | end: {
|
45387 | line: 16,
|
45388 | column: 45
|
45389 | }
|
45390 | },
|
45391 | '4': {
|
45392 | start: {
|
45393 | line: 20,
|
45394 | column: 17
|
45395 | },
|
45396 | end: {
|
45397 | line: 20,
|
45398 | column: 47
|
45399 | }
|
45400 | },
|
45401 | '5': {
|
45402 | start: {
|
45403 | line: 22,
|
45404 | column: 2
|
45405 | },
|
45406 | end: {
|
45407 | line: 22,
|
45408 | column: 49
|
45409 | }
|
45410 | },
|
45411 | '6': {
|
45412 | start: {
|
45413 | line: 48,
|
45414 | column: 2
|
45415 | },
|
45416 | end: {
|
45417 | line: 50,
|
45418 | column: 3
|
45419 | }
|
45420 | },
|
45421 | '7': {
|
45422 | start: {
|
45423 | line: 49,
|
45424 | column: 4
|
45425 | },
|
45426 | end: {
|
45427 | line: 49,
|
45428 | column: 17
|
45429 | }
|
45430 | },
|
45431 | '8': {
|
45432 | start: {
|
45433 | line: 53,
|
45434 | column: 25
|
45435 | },
|
45436 | end: {
|
45437 | line: 53,
|
45438 | column: 65
|
45439 | }
|
45440 | },
|
45441 | '9': {
|
45442 | start: {
|
45443 | line: 56,
|
45444 | column: 2
|
45445 | },
|
45446 | end: {
|
45447 | line: 56,
|
45448 | column: 42
|
45449 | }
|
45450 | },
|
45451 | '10': {
|
45452 | start: {
|
45453 | line: 63,
|
45454 | column: 2
|
45455 | },
|
45456 | end: {
|
45457 | line: 68,
|
45458 | column: 3
|
45459 | }
|
45460 | },
|
45461 | '11': {
|
45462 | start: {
|
45463 | line: 65,
|
45464 | column: 4
|
45465 | },
|
45466 | end: {
|
45467 | line: 65,
|
45468 | column: 37
|
45469 | }
|
45470 | },
|
45471 | '12': {
|
45472 | start: {
|
45473 | line: 66,
|
45474 | column: 4
|
45475 | },
|
45476 | end: {
|
45477 | line: 66,
|
45478 | column: 46
|
45479 | }
|
45480 | },
|
45481 | '13': {
|
45482 | start: {
|
45483 | line: 67,
|
45484 | column: 4
|
45485 | },
|
45486 | end: {
|
45487 | line: 67,
|
45488 | column: 74
|
45489 | }
|
45490 | },
|
45491 | '14': {
|
45492 | start: {
|
45493 | line: 70,
|
45494 | column: 2
|
45495 | },
|
45496 | end: {
|
45497 | line: 70,
|
45498 | column: 14
|
45499 | }
|
45500 | }
|
45501 | },
|
45502 | fnMap: {
|
45503 | '0': {
|
45504 | name: '(anonymous_0)',
|
45505 | decl: {
|
45506 | start: {
|
45507 | line: 12,
|
45508 | column: 21
|
45509 | },
|
45510 | end: {
|
45511 | line: 12,
|
45512 | column: 22
|
45513 | }
|
45514 | },
|
45515 | loc: {
|
45516 | start: {
|
45517 | line: 12,
|
45518 | column: 27
|
45519 | },
|
45520 | end: {
|
45521 | line: 23,
|
45522 | column: 1
|
45523 | }
|
45524 | },
|
45525 | line: 12
|
45526 | },
|
45527 | '1': {
|
45528 | name: 'register',
|
45529 | decl: {
|
45530 | start: {
|
45531 | line: 45,
|
45532 | column: 9
|
45533 | },
|
45534 | end: {
|
45535 | line: 45,
|
45536 | column: 17
|
45537 | }
|
45538 | },
|
45539 | loc: {
|
45540 | start: {
|
45541 | line: 45,
|
45542 | column: 36
|
45543 | },
|
45544 | end: {
|
45545 | line: 71,
|
45546 | column: 1
|
45547 | }
|
45548 | },
|
45549 | line: 45
|
45550 | }
|
45551 | },
|
45552 | branchMap: {
|
45553 | '0': {
|
45554 | loc: {
|
45555 | start: {
|
45556 | line: 15,
|
45557 | column: 2
|
45558 | },
|
45559 | end: {
|
45560 | line: 17,
|
45561 | column: 3
|
45562 | }
|
45563 | },
|
45564 | type: 'if',
|
45565 | locations: [{
|
45566 | start: {
|
45567 | line: 15,
|
45568 | column: 2
|
45569 | },
|
45570 | end: {
|
45571 | line: 17,
|
45572 | column: 3
|
45573 | }
|
45574 | }, {
|
45575 | start: {
|
45576 | line: 15,
|
45577 | column: 2
|
45578 | },
|
45579 | end: {
|
45580 | line: 17,
|
45581 | column: 3
|
45582 | }
|
45583 | }],
|
45584 | line: 15
|
45585 | },
|
45586 | '1': {
|
45587 | loc: {
|
45588 | start: {
|
45589 | line: 22,
|
45590 | column: 17
|
45591 | },
|
45592 | end: {
|
45593 | line: 22,
|
45594 | column: 47
|
45595 | }
|
45596 | },
|
45597 | type: 'binary-expr',
|
45598 | locations: [{
|
45599 | start: {
|
45600 | line: 22,
|
45601 | column: 17
|
45602 | },
|
45603 | end: {
|
45604 | line: 22,
|
45605 | column: 23
|
45606 | }
|
45607 | }, {
|
45608 | start: {
|
45609 | line: 22,
|
45610 | column: 27
|
45611 | },
|
45612 | end: {
|
45613 | line: 22,
|
45614 | column: 47
|
45615 | }
|
45616 | }],
|
45617 | line: 22
|
45618 | },
|
45619 | '2': {
|
45620 | loc: {
|
45621 | start: {
|
45622 | line: 48,
|
45623 | column: 2
|
45624 | },
|
45625 | end: {
|
45626 | line: 50,
|
45627 | column: 3
|
45628 | }
|
45629 | },
|
45630 | type: 'if',
|
45631 | locations: [{
|
45632 | start: {
|
45633 | line: 48,
|
45634 | column: 2
|
45635 | },
|
45636 | end: {
|
45637 | line: 50,
|
45638 | column: 3
|
45639 | }
|
45640 | }, {
|
45641 | start: {
|
45642 | line: 48,
|
45643 | column: 2
|
45644 | },
|
45645 | end: {
|
45646 | line: 50,
|
45647 | column: 3
|
45648 | }
|
45649 | }],
|
45650 | line: 48
|
45651 | },
|
45652 | '3': {
|
45653 | loc: {
|
45654 | start: {
|
45655 | line: 53,
|
45656 | column: 25
|
45657 | },
|
45658 | end: {
|
45659 | line: 53,
|
45660 | column: 65
|
45661 | }
|
45662 | },
|
45663 | type: 'binary-expr',
|
45664 | locations: [{
|
45665 | start: {
|
45666 | line: 53,
|
45667 | column: 25
|
45668 | },
|
45669 | end: {
|
45670 | line: 53,
|
45671 | column: 47
|
45672 | }
|
45673 | }, {
|
45674 | start: {
|
45675 | line: 53,
|
45676 | column: 51
|
45677 | },
|
45678 | end: {
|
45679 | line: 53,
|
45680 | column: 65
|
45681 | }
|
45682 | }],
|
45683 | line: 53
|
45684 | },
|
45685 | '4': {
|
45686 | loc: {
|
45687 | start: {
|
45688 | line: 63,
|
45689 | column: 2
|
45690 | },
|
45691 | end: {
|
45692 | line: 68,
|
45693 | column: 3
|
45694 | }
|
45695 | },
|
45696 | type: 'if',
|
45697 | locations: [{
|
45698 | start: {
|
45699 | line: 63,
|
45700 | column: 2
|
45701 | },
|
45702 | end: {
|
45703 | line: 68,
|
45704 | column: 3
|
45705 | }
|
45706 | }, {
|
45707 | start: {
|
45708 | line: 63,
|
45709 | column: 2
|
45710 | },
|
45711 | end: {
|
45712 | line: 68,
|
45713 | column: 3
|
45714 | }
|
45715 | }],
|
45716 | line: 63
|
45717 | },
|
45718 | '5': {
|
45719 | loc: {
|
45720 | start: {
|
45721 | line: 63,
|
45722 | column: 6
|
45723 | },
|
45724 | end: {
|
45725 | line: 63,
|
45726 | column: 76
|
45727 | }
|
45728 | },
|
45729 | type: 'binary-expr',
|
45730 | locations: [{
|
45731 | start: {
|
45732 | line: 63,
|
45733 | column: 6
|
45734 | },
|
45735 | end: {
|
45736 | line: 63,
|
45737 | column: 37
|
45738 | }
|
45739 | }, {
|
45740 | start: {
|
45741 | line: 63,
|
45742 | column: 41
|
45743 | },
|
45744 | end: {
|
45745 | line: 63,
|
45746 | column: 76
|
45747 | }
|
45748 | }],
|
45749 | line: 63
|
45750 | }
|
45751 | },
|
45752 | s: {
|
45753 | '0': 0,
|
45754 | '1': 0,
|
45755 | '2': 0,
|
45756 | '3': 0,
|
45757 | '4': 0,
|
45758 | '5': 0,
|
45759 | '6': 0,
|
45760 | '7': 0,
|
45761 | '8': 0,
|
45762 | '9': 0,
|
45763 | '10': 0,
|
45764 | '11': 0,
|
45765 | '12': 0,
|
45766 | '13': 0,
|
45767 | '14': 0
|
45768 | },
|
45769 | f: {
|
45770 | '0': 0,
|
45771 | '1': 0
|
45772 | },
|
45773 | b: {
|
45774 | '0': [0, 0],
|
45775 | '1': [0, 0],
|
45776 | '2': [0, 0],
|
45777 | '3': [0, 0],
|
45778 | '4': [0, 0],
|
45779 | '5': [0, 0]
|
45780 | },
|
45781 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
45782 | },
|
45783 | coverage = global[gcv] || (global[gcv] = {});
|
45784 |
|
45785 | if (coverage[path] && coverage[path].hash === hash) {
|
45786 | return coverage[path];
|
45787 | }
|
45788 |
|
45789 | coverageData.hash = hash;
|
45790 | return coverage[path] = coverageData;
|
45791 | }();
|
45792 |
|
45793 | var _ref = (cov_2iisheq25c.s[0]++, obj$1),
|
45794 | playMiddleware = _ref.playMiddleware,
|
45795 | isMiddlewareMediatorSupported = _ref.isMiddlewareMediatorSupported;
|
45796 |
|
45797 | cov_2iisheq25c.s[1]++;
|
45798 |
|
45799 | var hasAdsPlugin = function hasAdsPlugin() {
|
45800 | cov_2iisheq25c.f[0]++;
|
45801 | cov_2iisheq25c.s[2]++;
|
45802 |
|
45803 | if (videojs$1.getPlugin) {
|
45804 | cov_2iisheq25c.b[0][0]++;
|
45805 | cov_2iisheq25c.s[3]++;
|
45806 | return Boolean(videojs$1.getPlugin('ads'));
|
45807 | } else {
|
45808 | cov_2iisheq25c.b[0][1]++;
|
45809 | }
|
45810 |
|
45811 | var Player = (cov_2iisheq25c.s[4]++, videojs$1.getComponent('Player'));
|
45812 | cov_2iisheq25c.s[5]++;
|
45813 | return Boolean((cov_2iisheq25c.b[1][0]++, Player) && (cov_2iisheq25c.b[1][1]++, Player.prototype.ads));
|
45814 | };
|
45815 |
|
45816 | function register(contribAdsPlugin) {
|
45817 | cov_2iisheq25c.f[1]++;
|
45818 | cov_2iisheq25c.s[6]++;
|
45819 |
|
45820 | if (hasAdsPlugin(videojs$1)) {
|
45821 | cov_2iisheq25c.b[2][0]++;
|
45822 | cov_2iisheq25c.s[7]++;
|
45823 | return false;
|
45824 | } else {
|
45825 | cov_2iisheq25c.b[2][1]++;
|
45826 | }
|
45827 |
|
45828 | var registerPlugin = (cov_2iisheq25c.s[8]++, (cov_2iisheq25c.b[3][0]++, videojs$1.registerPlugin) || (cov_2iisheq25c.b[3][1]++, videojs$1.plugin));
|
45829 | cov_2iisheq25c.s[9]++;
|
45830 | registerPlugin('ads', contribAdsPlugin);
|
45831 | cov_2iisheq25c.s[10]++;
|
45832 |
|
45833 | if ((cov_2iisheq25c.b[5][0]++, isMiddlewareMediatorSupported()) && (cov_2iisheq25c.b[5][1]++, !videojs$1.usingContribAdsMiddleware_)) {
|
45834 | cov_2iisheq25c.b[4][0]++;
|
45835 | cov_2iisheq25c.s[11]++;
|
45836 | videojs$1.use('*', playMiddleware);
|
45837 | cov_2iisheq25c.s[12]++;
|
45838 | videojs$1.usingContribAdsMiddleware_ = true;
|
45839 | cov_2iisheq25c.s[13]++;
|
45840 | videojs$1.log.debug('Play middleware has been registered with videojs');
|
45841 | } else {
|
45842 | cov_2iisheq25c.b[4][1]++;
|
45843 | }
|
45844 |
|
45845 | cov_2iisheq25c.s[14]++;
|
45846 | return true;
|
45847 | }
|
45848 |
|
45849 | var cov_h24c1ohq2 = function () {
|
45850 | var path = '/Users/poneill/dev/videojs-contrib-ads/src/plugin.js',
|
45851 | hash = '4f41a866ad484c9abe7a128922442642eb40ebc9',
|
45852 | Function = function () {}.constructor,
|
45853 | global = new Function('return this')(),
|
45854 | gcv = '__coverage__',
|
45855 | coverageData = {
|
45856 | path: '/Users/poneill/dev/videojs-contrib-ads/src/plugin.js',
|
45857 | statementMap: {
|
45858 | '0': {
|
45859 | start: {
|
45860 | line: 32,
|
45861 | column: 42
|
45862 | },
|
45863 | end: {
|
45864 | line: 32,
|
45865 | column: 63
|
45866 | }
|
45867 | },
|
45868 | '1': {
|
45869 | start: {
|
45870 | line: 33,
|
45871 | column: 21
|
45872 | },
|
45873 | end: {
|
45874 | line: 33,
|
45875 | column: 52
|
45876 | }
|
45877 | },
|
45878 | '2': {
|
45879 | start: {
|
45880 | line: 36,
|
45881 | column: 17
|
45882 | },
|
45883 | end: {
|
45884 | line: 69,
|
45885 | column: 1
|
45886 | }
|
45887 | },
|
45888 | '3': {
|
45889 | start: {
|
45890 | line: 71,
|
45891 | column: 25
|
45892 | },
|
45893 | end: {
|
45894 | line: 287,
|
45895 | column: 1
|
45896 | }
|
45897 | },
|
45898 | '4': {
|
45899 | start: {
|
45900 | line: 73,
|
45901 | column: 17
|
45902 | },
|
45903 | end: {
|
45904 | line: 73,
|
45905 | column: 21
|
45906 | }
|
45907 | },
|
45908 | '5': {
|
45909 | start: {
|
45910 | line: 75,
|
45911 | column: 19
|
45912 | },
|
45913 | end: {
|
45914 | line: 75,
|
45915 | column: 58
|
45916 | }
|
45917 | },
|
45918 | '6': {
|
45919 | start: {
|
45920 | line: 82,
|
45921 | column: 22
|
45922 | },
|
45923 | end: {
|
45924 | line: 82,
|
45925 | column: 24
|
45926 | }
|
45927 | },
|
45928 | '7': {
|
45929 | start: {
|
45930 | line: 85,
|
45931 | column: 2
|
45932 | },
|
45933 | end: {
|
45934 | line: 89,
|
45935 | column: 5
|
45936 | }
|
45937 | },
|
45938 | '8': {
|
45939 | start: {
|
45940 | line: 86,
|
45941 | column: 4
|
45942 | },
|
45943 | end: {
|
45944 | line: 88,
|
45945 | column: 5
|
45946 | }
|
45947 | },
|
45948 | '9': {
|
45949 | start: {
|
45950 | line: 87,
|
45951 | column: 6
|
45952 | },
|
45953 | end: {
|
45954 | line: 87,
|
45955 | column: 34
|
45956 | }
|
45957 | },
|
45958 | '10': {
|
45959 | start: {
|
45960 | line: 92,
|
45961 | column: 2
|
45962 | },
|
45963 | end: {
|
45964 | line: 92,
|
45965 | column: 37
|
45966 | }
|
45967 | },
|
45968 | '11': {
|
45969 | start: {
|
45970 | line: 100,
|
45971 | column: 2
|
45972 | },
|
45973 | end: {
|
45974 | line: 102,
|
45975 | column: 3
|
45976 | }
|
45977 | },
|
45978 | '12': {
|
45979 | start: {
|
45980 | line: 101,
|
45981 | column: 4
|
45982 | },
|
45983 | end: {
|
45984 | line: 101,
|
45985 | column: 50
|
45986 | }
|
45987 | },
|
45988 | '13': {
|
45989 | start: {
|
45990 | line: 106,
|
45991 | column: 2
|
45992 | },
|
45993 | end: {
|
45994 | line: 115,
|
45995 | column: 11
|
45996 | }
|
45997 | },
|
45998 | '14': {
|
45999 | start: {
|
46000 | line: 107,
|
46001 | column: 4
|
46002 | },
|
46003 | end: {
|
46004 | line: 114,
|
46005 | column: 5
|
46006 | }
|
46007 | },
|
46008 | '15': {
|
46009 | start: {
|
46010 | line: 108,
|
46011 | column: 6
|
46012 | },
|
46013 | end: {
|
46014 | line: 113,
|
46015 | column: 88
|
46016 | }
|
46017 | },
|
46018 | '16': {
|
46019 | start: {
|
46020 | line: 119,
|
46021 | column: 2
|
46022 | },
|
46023 | end: {
|
46024 | line: 123,
|
46025 | column: 5
|
46026 | }
|
46027 | },
|
46028 | '17': {
|
46029 | start: {
|
46030 | line: 120,
|
46031 | column: 4
|
46032 | },
|
46033 | end: {
|
46034 | line: 122,
|
46035 | column: 5
|
46036 | }
|
46037 | },
|
46038 | '18': {
|
46039 | start: {
|
46040 | line: 121,
|
46041 | column: 6
|
46042 | },
|
46043 | end: {
|
46044 | line: 121,
|
46045 | column: 41
|
46046 | }
|
46047 | },
|
46048 | '19': {
|
46049 | start: {
|
46050 | line: 127,
|
46051 | column: 2
|
46052 | },
|
46053 | end: {
|
46054 | line: 129,
|
46055 | column: 5
|
46056 | }
|
46057 | },
|
46058 | '20': {
|
46059 | start: {
|
46060 | line: 128,
|
46061 | column: 4
|
46062 | },
|
46063 | end: {
|
46064 | line: 128,
|
46065 | column: 38
|
46066 | }
|
46067 | },
|
46068 | '21': {
|
46069 | start: {
|
46070 | line: 136,
|
46071 | column: 2
|
46072 | },
|
46073 | end: {
|
46074 | line: 165,
|
46075 | column: 5
|
46076 | }
|
46077 | },
|
46078 | '22': {
|
46079 | start: {
|
46080 | line: 139,
|
46081 | column: 4
|
46082 | },
|
46083 | end: {
|
46084 | line: 141,
|
46085 | column: 5
|
46086 | }
|
46087 | },
|
46088 | '23': {
|
46089 | start: {
|
46090 | line: 140,
|
46091 | column: 6
|
46092 | },
|
46093 | end: {
|
46094 | line: 140,
|
46095 | column: 13
|
46096 | }
|
46097 | },
|
46098 | '24': {
|
46099 | start: {
|
46100 | line: 144,
|
46101 | column: 4
|
46102 | },
|
46103 | end: {
|
46104 | line: 146,
|
46105 | column: 5
|
46106 | }
|
46107 | },
|
46108 | '25': {
|
46109 | start: {
|
46110 | line: 145,
|
46111 | column: 6
|
46112 | },
|
46113 | end: {
|
46114 | line: 145,
|
46115 | column: 13
|
46116 | }
|
46117 | },
|
46118 | '26': {
|
46119 | start: {
|
46120 | line: 148,
|
46121 | column: 4
|
46122 | },
|
46123 | end: {
|
46124 | line: 150,
|
46125 | column: 5
|
46126 | }
|
46127 | },
|
46128 | '27': {
|
46129 | start: {
|
46130 | line: 149,
|
46131 | column: 6
|
46132 | },
|
46133 | end: {
|
46134 | line: 149,
|
46135 | column: 13
|
46136 | }
|
46137 | },
|
46138 | '28': {
|
46139 | start: {
|
46140 | line: 154,
|
46141 | column: 4
|
46142 | },
|
46143 | end: {
|
46144 | line: 156,
|
46145 | column: 5
|
46146 | }
|
46147 | },
|
46148 | '29': {
|
46149 | start: {
|
46150 | line: 155,
|
46151 | column: 6
|
46152 | },
|
46153 | end: {
|
46154 | line: 155,
|
46155 | column: 13
|
46156 | }
|
46157 | },
|
46158 | '30': {
|
46159 | start: {
|
46160 | line: 158,
|
46161 | column: 24
|
46162 | },
|
46163 | end: {
|
46164 | line: 158,
|
46165 | column: 37
|
46166 | }
|
46167 | },
|
46168 | '31': {
|
46169 | start: {
|
46170 | line: 160,
|
46171 | column: 4
|
46172 | },
|
46173 | end: {
|
46174 | line: 164,
|
46175 | column: 5
|
46176 | }
|
46177 | },
|
46178 | '32': {
|
46179 | start: {
|
46180 | line: 161,
|
46181 | column: 6
|
46182 | },
|
46183 | end: {
|
46184 | line: 163,
|
46185 | column: 9
|
46186 | }
|
46187 | },
|
46188 | '33': {
|
46189 | start: {
|
46190 | line: 162,
|
46191 | column: 8
|
46192 | },
|
46193 | end: {
|
46194 | line: 162,
|
46195 | column: 73
|
46196 | }
|
46197 | },
|
46198 | '34': {
|
46199 | start: {
|
46200 | line: 167,
|
46201 | column: 2
|
46202 | },
|
46203 | end: {
|
46204 | line: 170,
|
46205 | column: 5
|
46206 | }
|
46207 | },
|
46208 | '35': {
|
46209 | start: {
|
46210 | line: 168,
|
46211 | column: 4
|
46212 | },
|
46213 | end: {
|
46214 | line: 168,
|
46215 | column: 49
|
46216 | }
|
46217 | },
|
46218 | '36': {
|
46219 | start: {
|
46220 | line: 169,
|
46221 | column: 4
|
46222 | },
|
46223 | end: {
|
46224 | line: 169,
|
46225 | column: 33
|
46226 | }
|
46227 | },
|
46228 | '37': {
|
46229 | start: {
|
46230 | line: 172,
|
46231 | column: 2
|
46232 | },
|
46233 | end: {
|
46234 | line: 175,
|
46235 | column: 5
|
46236 | }
|
46237 | },
|
46238 | '38': {
|
46239 | start: {
|
46240 | line: 173,
|
46241 | column: 4
|
46242 | },
|
46243 | end: {
|
46244 | line: 173,
|
46245 | column: 50
|
46246 | }
|
46247 | },
|
46248 | '39': {
|
46249 | start: {
|
46250 | line: 174,
|
46251 | column: 4
|
46252 | },
|
46253 | end: {
|
46254 | line: 174,
|
46255 | column: 34
|
46256 | }
|
46257 | },
|
46258 | '40': {
|
46259 | start: {
|
46260 | line: 178,
|
46261 | column: 2
|
46262 | },
|
46263 | end: {
|
46264 | line: 181,
|
46265 | column: 5
|
46266 | }
|
46267 | },
|
46268 | '41': {
|
46269 | start: {
|
46270 | line: 179,
|
46271 | column: 4
|
46272 | },
|
46273 | end: {
|
46274 | line: 179,
|
46275 | column: 38
|
46276 | }
|
46277 | },
|
46278 | '42': {
|
46279 | start: {
|
46280 | line: 180,
|
46281 | column: 4
|
46282 | },
|
46283 | end: {
|
46284 | line: 180,
|
46285 | column: 46
|
46286 | }
|
46287 | },
|
46288 | '43': {
|
46289 | start: {
|
46290 | line: 184,
|
46291 | column: 2
|
46292 | },
|
46293 | end: {
|
46294 | line: 186,
|
46295 | column: 5
|
46296 | }
|
46297 | },
|
46298 | '44': {
|
46299 | start: {
|
46300 | line: 185,
|
46301 | column: 4
|
46302 | },
|
46303 | end: {
|
46304 | line: 185,
|
46305 | column: 37
|
46306 | }
|
46307 | },
|
46308 | '45': {
|
46309 | start: {
|
46310 | line: 188,
|
46311 | column: 2
|
46312 | },
|
46313 | end: {
|
46314 | line: 190,
|
46315 | column: 5
|
46316 | }
|
46317 | },
|
46318 | '46': {
|
46319 | start: {
|
46320 | line: 189,
|
46321 | column: 4
|
46322 | },
|
46323 | end: {
|
46324 | line: 189,
|
46325 | column: 62
|
46326 | }
|
46327 | },
|
46328 | '47': {
|
46329 | start: {
|
46330 | line: 192,
|
46331 | column: 2
|
46332 | },
|
46333 | end: {
|
46334 | line: 194,
|
46335 | column: 5
|
46336 | }
|
46337 | },
|
46338 | '48': {
|
46339 | start: {
|
46340 | line: 193,
|
46341 | column: 4
|
46342 | },
|
46343 | end: {
|
46344 | line: 193,
|
46345 | column: 47
|
46346 | }
|
46347 | },
|
46348 | '49': {
|
46349 | start: {
|
46350 | line: 196,
|
46351 | column: 2
|
46352 | },
|
46353 | end: {
|
46354 | line: 198,
|
46355 | column: 5
|
46356 | }
|
46357 | },
|
46358 | '50': {
|
46359 | start: {
|
46360 | line: 197,
|
46361 | column: 4
|
46362 | },
|
46363 | end: {
|
46364 | line: 197,
|
46365 | column: 51
|
46366 | }
|
46367 | },
|
46368 | '51': {
|
46369 | start: {
|
46370 | line: 201,
|
46371 | column: 2
|
46372 | },
|
46373 | end: {
|
46374 | line: 201,
|
46375 | column: 30
|
46376 | }
|
46377 | },
|
46378 | '52': {
|
46379 | start: {
|
46380 | line: 203,
|
46381 | column: 2
|
46382 | },
|
46383 | end: {
|
46384 | line: 203,
|
46385 | column: 33
|
46386 | }
|
46387 | },
|
46388 | '53': {
|
46389 | start: {
|
46390 | line: 210,
|
46391 | column: 2
|
46392 | },
|
46393 | end: {
|
46394 | line: 210,
|
46395 | column: 48
|
46396 | }
|
46397 | },
|
46398 | '54': {
|
46399 | start: {
|
46400 | line: 212,
|
46401 | column: 2
|
46402 | },
|
46403 | end: {
|
46404 | line: 216,
|
46405 | column: 3
|
46406 | }
|
46407 | },
|
46408 | '55': {
|
46409 | start: {
|
46410 | line: 213,
|
46411 | column: 4
|
46412 | },
|
46413 | end: {
|
46414 | line: 213,
|
46415 | column: 81
|
46416 | }
|
46417 | },
|
46418 | '56': {
|
46419 | start: {
|
46420 | line: 215,
|
46421 | column: 4
|
46422 | },
|
46423 | end: {
|
46424 | line: 215,
|
46425 | column: 71
|
46426 | }
|
46427 | },
|
46428 | '57': {
|
46429 | start: {
|
46430 | line: 218,
|
46431 | column: 2
|
46432 | },
|
46433 | end: {
|
46434 | line: 218,
|
46435 | column: 33
|
46436 | }
|
46437 | },
|
46438 | '58': {
|
46439 | start: {
|
46440 | line: 220,
|
46441 | column: 2
|
46442 | },
|
46443 | end: {
|
46444 | line: 220,
|
46445 | column: 43
|
46446 | }
|
46447 | },
|
46448 | '59': {
|
46449 | start: {
|
46450 | line: 221,
|
46451 | column: 2
|
46452 | },
|
46453 | end: {
|
46454 | line: 221,
|
46455 | column: 66
|
46456 | }
|
46457 | },
|
46458 | '60': {
|
46459 | start: {
|
46460 | line: 224,
|
46461 | column: 2
|
46462 | },
|
46463 | end: {
|
46464 | line: 224,
|
46465 | column: 34
|
46466 | }
|
46467 | },
|
46468 | '61': {
|
46469 | start: {
|
46470 | line: 227,
|
46471 | column: 2
|
46472 | },
|
46473 | end: {
|
46474 | line: 227,
|
46475 | column: 48
|
46476 | }
|
46477 | },
|
46478 | '62': {
|
46479 | start: {
|
46480 | line: 233,
|
46481 | column: 30
|
46482 | },
|
46483 | end: {
|
46484 | line: 243,
|
46485 | column: 3
|
46486 | }
|
46487 | },
|
46488 | '63': {
|
46489 | start: {
|
46490 | line: 237,
|
46491 | column: 4
|
46492 | },
|
46493 | end: {
|
46494 | line: 242,
|
46495 | column: 48
|
46496 | }
|
46497 | },
|
46498 | '64': {
|
46499 | start: {
|
46500 | line: 250,
|
46501 | column: 33
|
46502 | },
|
46503 | end: {
|
46504 | line: 263,
|
46505 | column: 3
|
46506 | }
|
46507 | },
|
46508 | '65': {
|
46509 | start: {
|
46510 | line: 251,
|
46511 | column: 26
|
46512 | },
|
46513 | end: {
|
46514 | line: 251,
|
46515 | column: 45
|
46516 | }
|
46517 | },
|
46518 | '66': {
|
46519 | start: {
|
46520 | line: 253,
|
46521 | column: 4
|
46522 | },
|
46523 | end: {
|
46524 | line: 262,
|
46525 | column: 5
|
46526 | }
|
46527 | },
|
46528 | '67': {
|
46529 | start: {
|
46530 | line: 255,
|
46531 | column: 6
|
46532 | },
|
46533 | end: {
|
46534 | line: 261,
|
46535 | column: 7
|
46536 | }
|
46537 | },
|
46538 | '68': {
|
46539 | start: {
|
46540 | line: 256,
|
46541 | column: 22
|
46542 | },
|
46543 | end: {
|
46544 | line: 256,
|
46545 | column: 38
|
46546 | }
|
46547 | },
|
46548 | '69': {
|
46549 | start: {
|
46550 | line: 258,
|
46551 | column: 8
|
46552 | },
|
46553 | end: {
|
46554 | line: 260,
|
46555 | column: 9
|
46556 | }
|
46557 | },
|
46558 | '70': {
|
46559 | start: {
|
46560 | line: 259,
|
46561 | column: 10
|
46562 | },
|
46563 | end: {
|
46564 | line: 259,
|
46565 | column: 34
|
46566 | }
|
46567 | },
|
46568 | '71': {
|
46569 | start: {
|
46570 | line: 266,
|
46571 | column: 2
|
46572 | },
|
46573 | end: {
|
46574 | line: 268,
|
46575 | column: 5
|
46576 | }
|
46577 | },
|
46578 | '72': {
|
46579 | start: {
|
46580 | line: 267,
|
46581 | column: 4
|
46582 | },
|
46583 | end: {
|
46584 | line: 267,
|
46585 | column: 75
|
46586 | }
|
46587 | },
|
46588 | '73': {
|
46589 | start: {
|
46590 | line: 271,
|
46591 | column: 2
|
46592 | },
|
46593 | end: {
|
46594 | line: 279,
|
46595 | column: 5
|
46596 | }
|
46597 | },
|
46598 | '74': {
|
46599 | start: {
|
46600 | line: 278,
|
46601 | column: 4
|
46602 | },
|
46603 | end: {
|
46604 | line: 278,
|
46605 | column: 42
|
46606 | }
|
46607 | },
|
46608 | '75': {
|
46609 | start: {
|
46610 | line: 282,
|
46611 | column: 2
|
46612 | },
|
46613 | end: {
|
46614 | line: 285,
|
46615 | column: 5
|
46616 | }
|
46617 | },
|
46618 | '76': {
|
46619 | start: {
|
46620 | line: 283,
|
46621 | column: 4
|
46622 | },
|
46623 | end: {
|
46624 | line: 283,
|
46625 | column: 23
|
46626 | }
|
46627 | },
|
46628 | '77': {
|
46629 | start: {
|
46630 | line: 284,
|
46631 | column: 4
|
46632 | },
|
46633 | end: {
|
46634 | line: 284,
|
46635 | column: 78
|
46636 | }
|
46637 | },
|
46638 | '78': {
|
46639 | start: {
|
46640 | line: 291,
|
46641 | column: 0
|
46642 | },
|
46643 | end: {
|
46644 | line: 291,
|
46645 | column: 38
|
46646 | }
|
46647 | },
|
46648 | '79': {
|
46649 | start: {
|
46650 | line: 294,
|
46651 | column: 0
|
46652 | },
|
46653 | end: {
|
46654 | line: 294,
|
46655 | column: 27
|
46656 | }
|
46657 | }
|
46658 | },
|
46659 | fnMap: {
|
46660 | '0': {
|
46661 | name: '(anonymous_0)',
|
46662 | decl: {
|
46663 | start: {
|
46664 | line: 71,
|
46665 | column: 25
|
46666 | },
|
46667 | end: {
|
46668 | line: 71,
|
46669 | column: 26
|
46670 | }
|
46671 | },
|
46672 | loc: {
|
46673 | start: {
|
46674 | line: 71,
|
46675 | column: 43
|
46676 | },
|
46677 | end: {
|
46678 | line: 287,
|
46679 | column: 1
|
46680 | }
|
46681 | },
|
46682 | line: 71
|
46683 | },
|
46684 | '1': {
|
46685 | name: '(anonymous_1)',
|
46686 | decl: {
|
46687 | start: {
|
46688 | line: 85,
|
46689 | column: 62
|
46690 | },
|
46691 | end: {
|
46692 | line: 85,
|
46693 | column: 63
|
46694 | }
|
46695 | },
|
46696 | loc: {
|
46697 | start: {
|
46698 | line: 85,
|
46699 | column: 82
|
46700 | },
|
46701 | end: {
|
46702 | line: 89,
|
46703 | column: 3
|
46704 | }
|
46705 | },
|
46706 | line: 85
|
46707 | },
|
46708 | '2': {
|
46709 | name: '(anonymous_2)',
|
46710 | decl: {
|
46711 | start: {
|
46712 | line: 106,
|
46713 | column: 20
|
46714 | },
|
46715 | end: {
|
46716 | line: 106,
|
46717 | column: 21
|
46718 | }
|
46719 | },
|
46720 | loc: {
|
46721 | start: {
|
46722 | line: 106,
|
46723 | column: 26
|
46724 | },
|
46725 | end: {
|
46726 | line: 115,
|
46727 | column: 3
|
46728 | }
|
46729 | },
|
46730 | line: 106
|
46731 | },
|
46732 | '3': {
|
46733 | name: '(anonymous_3)',
|
46734 | decl: {
|
46735 | start: {
|
46736 | line: 119,
|
46737 | column: 21
|
46738 | },
|
46739 | end: {
|
46740 | line: 119,
|
46741 | column: 22
|
46742 | }
|
46743 | },
|
46744 | loc: {
|
46745 | start: {
|
46746 | line: 119,
|
46747 | column: 32
|
46748 | },
|
46749 | end: {
|
46750 | line: 123,
|
46751 | column: 3
|
46752 | }
|
46753 | },
|
46754 | line: 119
|
46755 | },
|
46756 | '4': {
|
46757 | name: '(anonymous_4)',
|
46758 | decl: {
|
46759 | start: {
|
46760 | line: 127,
|
46761 | column: 33
|
46762 | },
|
46763 | end: {
|
46764 | line: 127,
|
46765 | column: 34
|
46766 | }
|
46767 | },
|
46768 | loc: {
|
46769 | start: {
|
46770 | line: 127,
|
46771 | column: 44
|
46772 | },
|
46773 | end: {
|
46774 | line: 129,
|
46775 | column: 3
|
46776 | }
|
46777 | },
|
46778 | line: 127
|
46779 | },
|
46780 | '5': {
|
46781 | name: '(anonymous_5)',
|
46782 | decl: {
|
46783 | start: {
|
46784 | line: 136,
|
46785 | column: 47
|
46786 | },
|
46787 | end: {
|
46788 | line: 136,
|
46789 | column: 48
|
46790 | }
|
46791 | },
|
46792 | loc: {
|
46793 | start: {
|
46794 | line: 136,
|
46795 | column: 58
|
46796 | },
|
46797 | end: {
|
46798 | line: 165,
|
46799 | column: 3
|
46800 | }
|
46801 | },
|
46802 | line: 136
|
46803 | },
|
46804 | '6': {
|
46805 | name: '(anonymous_6)',
|
46806 | decl: {
|
46807 | start: {
|
46808 | line: 161,
|
46809 | column: 24
|
46810 | },
|
46811 | end: {
|
46812 | line: 161,
|
46813 | column: 25
|
46814 | }
|
46815 | },
|
46816 | loc: {
|
46817 | start: {
|
46818 | line: 161,
|
46819 | column: 35
|
46820 | },
|
46821 | end: {
|
46822 | line: 163,
|
46823 | column: 7
|
46824 | }
|
46825 | },
|
46826 | line: 161
|
46827 | },
|
46828 | '7': {
|
46829 | name: '(anonymous_7)',
|
46830 | decl: {
|
46831 | start: {
|
46832 | line: 167,
|
46833 | column: 25
|
46834 | },
|
46835 | end: {
|
46836 | line: 167,
|
46837 | column: 26
|
46838 | }
|
46839 | },
|
46840 | loc: {
|
46841 | start: {
|
46842 | line: 167,
|
46843 | column: 36
|
46844 | },
|
46845 | end: {
|
46846 | line: 170,
|
46847 | column: 3
|
46848 | }
|
46849 | },
|
46850 | line: 167
|
46851 | },
|
46852 | '8': {
|
46853 | name: '(anonymous_8)',
|
46854 | decl: {
|
46855 | start: {
|
46856 | line: 172,
|
46857 | column: 26
|
46858 | },
|
46859 | end: {
|
46860 | line: 172,
|
46861 | column: 27
|
46862 | }
|
46863 | },
|
46864 | loc: {
|
46865 | start: {
|
46866 | line: 172,
|
46867 | column: 37
|
46868 | },
|
46869 | end: {
|
46870 | line: 175,
|
46871 | column: 3
|
46872 | }
|
46873 | },
|
46874 | line: 172
|
46875 | },
|
46876 | '9': {
|
46877 | name: '(anonymous_9)',
|
46878 | decl: {
|
46879 | start: {
|
46880 | line: 178,
|
46881 | column: 23
|
46882 | },
|
46883 | end: {
|
46884 | line: 178,
|
46885 | column: 24
|
46886 | }
|
46887 | },
|
46888 | loc: {
|
46889 | start: {
|
46890 | line: 178,
|
46891 | column: 29
|
46892 | },
|
46893 | end: {
|
46894 | line: 181,
|
46895 | column: 3
|
46896 | }
|
46897 | },
|
46898 | line: 178
|
46899 | },
|
46900 | '10': {
|
46901 | name: '(anonymous_10)',
|
46902 | decl: {
|
46903 | start: {
|
46904 | line: 184,
|
46905 | column: 20
|
46906 | },
|
46907 | end: {
|
46908 | line: 184,
|
46909 | column: 21
|
46910 | }
|
46911 | },
|
46912 | loc: {
|
46913 | start: {
|
46914 | line: 184,
|
46915 | column: 26
|
46916 | },
|
46917 | end: {
|
46918 | line: 186,
|
46919 | column: 3
|
46920 | }
|
46921 | },
|
46922 | line: 184
|
46923 | },
|
46924 | '11': {
|
46925 | name: '(anonymous_11)',
|
46926 | decl: {
|
46927 | start: {
|
46928 | line: 188,
|
46929 | column: 26
|
46930 | },
|
46931 | end: {
|
46932 | line: 188,
|
46933 | column: 27
|
46934 | }
|
46935 | },
|
46936 | loc: {
|
46937 | start: {
|
46938 | line: 188,
|
46939 | column: 32
|
46940 | },
|
46941 | end: {
|
46942 | line: 190,
|
46943 | column: 3
|
46944 | }
|
46945 | },
|
46946 | line: 188
|
46947 | },
|
46948 | '12': {
|
46949 | name: '(anonymous_12)',
|
46950 | decl: {
|
46951 | start: {
|
46952 | line: 192,
|
46953 | column: 26
|
46954 | },
|
46955 | end: {
|
46956 | line: 192,
|
46957 | column: 27
|
46958 | }
|
46959 | },
|
46960 | loc: {
|
46961 | start: {
|
46962 | line: 192,
|
46963 | column: 32
|
46964 | },
|
46965 | end: {
|
46966 | line: 194,
|
46967 | column: 3
|
46968 | }
|
46969 | },
|
46970 | line: 192
|
46971 | },
|
46972 | '13': {
|
46973 | name: '(anonymous_13)',
|
46974 | decl: {
|
46975 | start: {
|
46976 | line: 196,
|
46977 | column: 30
|
46978 | },
|
46979 | end: {
|
46980 | line: 196,
|
46981 | column: 31
|
46982 | }
|
46983 | },
|
46984 | loc: {
|
46985 | start: {
|
46986 | line: 196,
|
46987 | column: 36
|
46988 | },
|
46989 | end: {
|
46990 | line: 198,
|
46991 | column: 3
|
46992 | }
|
46993 | },
|
46994 | line: 196
|
46995 | },
|
46996 | '14': {
|
46997 | name: '(anonymous_14)',
|
46998 | decl: {
|
46999 | start: {
|
47000 | line: 233,
|
47001 | column: 30
|
47002 | },
|
47003 | end: {
|
47004 | line: 233,
|
47005 | column: 31
|
47006 | }
|
47007 | },
|
47008 | loc: {
|
47009 | start: {
|
47010 | line: 233,
|
47011 | column: 41
|
47012 | },
|
47013 | end: {
|
47014 | line: 243,
|
47015 | column: 3
|
47016 | }
|
47017 | },
|
47018 | line: 233
|
47019 | },
|
47020 | '15': {
|
47021 | name: '(anonymous_15)',
|
47022 | decl: {
|
47023 | start: {
|
47024 | line: 250,
|
47025 | column: 33
|
47026 | },
|
47027 | end: {
|
47028 | line: 250,
|
47029 | column: 34
|
47030 | }
|
47031 | },
|
47032 | loc: {
|
47033 | start: {
|
47034 | line: 250,
|
47035 | column: 44
|
47036 | },
|
47037 | end: {
|
47038 | line: 263,
|
47039 | column: 3
|
47040 | }
|
47041 | },
|
47042 | line: 250
|
47043 | },
|
47044 | '16': {
|
47045 | name: '(anonymous_16)',
|
47046 | decl: {
|
47047 | start: {
|
47048 | line: 266,
|
47049 | column: 15
|
47050 | },
|
47051 | end: {
|
47052 | line: 266,
|
47053 | column: 16
|
47054 | }
|
47055 | },
|
47056 | loc: {
|
47057 | start: {
|
47058 | line: 266,
|
47059 | column: 26
|
47060 | },
|
47061 | end: {
|
47062 | line: 268,
|
47063 | column: 3
|
47064 | }
|
47065 | },
|
47066 | line: 266
|
47067 | },
|
47068 | '17': {
|
47069 | name: '(anonymous_17)',
|
47070 | decl: {
|
47071 | start: {
|
47072 | line: 277,
|
47073 | column: 5
|
47074 | },
|
47075 | end: {
|
47076 | line: 277,
|
47077 | column: 6
|
47078 | }
|
47079 | },
|
47080 | loc: {
|
47081 | start: {
|
47082 | line: 277,
|
47083 | column: 12
|
47084 | },
|
47085 | end: {
|
47086 | line: 279,
|
47087 | column: 3
|
47088 | }
|
47089 | },
|
47090 | line: 277
|
47091 | },
|
47092 | '18': {
|
47093 | name: '(anonymous_18)',
|
47094 | decl: {
|
47095 | start: {
|
47096 | line: 282,
|
47097 | column: 23
|
47098 | },
|
47099 | end: {
|
47100 | line: 282,
|
47101 | column: 24
|
47102 | }
|
47103 | },
|
47104 | loc: {
|
47105 | start: {
|
47106 | line: 282,
|
47107 | column: 34
|
47108 | },
|
47109 | end: {
|
47110 | line: 285,
|
47111 | column: 3
|
47112 | }
|
47113 | },
|
47114 | line: 282
|
47115 | }
|
47116 | },
|
47117 | branchMap: {
|
47118 | '0': {
|
47119 | loc: {
|
47120 | start: {
|
47121 | line: 86,
|
47122 | column: 4
|
47123 | },
|
47124 | end: {
|
47125 | line: 88,
|
47126 | column: 5
|
47127 | }
|
47128 | },
|
47129 | type: 'if',
|
47130 | locations: [{
|
47131 | start: {
|
47132 | line: 86,
|
47133 | column: 4
|
47134 | },
|
47135 | end: {
|
47136 | line: 88,
|
47137 | column: 5
|
47138 | }
|
47139 | }, {
|
47140 | start: {
|
47141 | line: 86,
|
47142 | column: 4
|
47143 | },
|
47144 | end: {
|
47145 | line: 88,
|
47146 | column: 5
|
47147 | }
|
47148 | }],
|
47149 | line: 86
|
47150 | },
|
47151 | '1': {
|
47152 | loc: {
|
47153 | start: {
|
47154 | line: 100,
|
47155 | column: 2
|
47156 | },
|
47157 | end: {
|
47158 | line: 102,
|
47159 | column: 3
|
47160 | }
|
47161 | },
|
47162 | type: 'if',
|
47163 | locations: [{
|
47164 | start: {
|
47165 | line: 100,
|
47166 | column: 2
|
47167 | },
|
47168 | end: {
|
47169 | line: 102,
|
47170 | column: 3
|
47171 | }
|
47172 | }, {
|
47173 | start: {
|
47174 | line: 100,
|
47175 | column: 2
|
47176 | },
|
47177 | end: {
|
47178 | line: 102,
|
47179 | column: 3
|
47180 | }
|
47181 | }],
|
47182 | line: 100
|
47183 | },
|
47184 | '2': {
|
47185 | loc: {
|
47186 | start: {
|
47187 | line: 107,
|
47188 | column: 4
|
47189 | },
|
47190 | end: {
|
47191 | line: 114,
|
47192 | column: 5
|
47193 | }
|
47194 | },
|
47195 | type: 'if',
|
47196 | locations: [{
|
47197 | start: {
|
47198 | line: 107,
|
47199 | column: 4
|
47200 | },
|
47201 | end: {
|
47202 | line: 114,
|
47203 | column: 5
|
47204 | }
|
47205 | }, {
|
47206 | start: {
|
47207 | line: 107,
|
47208 | column: 4
|
47209 | },
|
47210 | end: {
|
47211 | line: 114,
|
47212 | column: 5
|
47213 | }
|
47214 | }],
|
47215 | line: 107
|
47216 | },
|
47217 | '3': {
|
47218 | loc: {
|
47219 | start: {
|
47220 | line: 107,
|
47221 | column: 8
|
47222 | },
|
47223 | end: {
|
47224 | line: 107,
|
47225 | column: 82
|
47226 | }
|
47227 | },
|
47228 | type: 'binary-expr',
|
47229 | locations: [{
|
47230 | start: {
|
47231 | line: 107,
|
47232 | column: 8
|
47233 | },
|
47234 | end: {
|
47235 | line: 107,
|
47236 | column: 59
|
47237 | }
|
47238 | }, {
|
47239 | start: {
|
47240 | line: 107,
|
47241 | column: 63
|
47242 | },
|
47243 | end: {
|
47244 | line: 107,
|
47245 | column: 82
|
47246 | }
|
47247 | }],
|
47248 | line: 107
|
47249 | },
|
47250 | '4': {
|
47251 | loc: {
|
47252 | start: {
|
47253 | line: 120,
|
47254 | column: 4
|
47255 | },
|
47256 | end: {
|
47257 | line: 122,
|
47258 | column: 5
|
47259 | }
|
47260 | },
|
47261 | type: 'if',
|
47262 | locations: [{
|
47263 | start: {
|
47264 | line: 120,
|
47265 | column: 4
|
47266 | },
|
47267 | end: {
|
47268 | line: 122,
|
47269 | column: 5
|
47270 | }
|
47271 | }, {
|
47272 | start: {
|
47273 | line: 120,
|
47274 | column: 4
|
47275 | },
|
47276 | end: {
|
47277 | line: 122,
|
47278 | column: 5
|
47279 | }
|
47280 | }],
|
47281 | line: 120
|
47282 | },
|
47283 | '5': {
|
47284 | loc: {
|
47285 | start: {
|
47286 | line: 139,
|
47287 | column: 4
|
47288 | },
|
47289 | end: {
|
47290 | line: 141,
|
47291 | column: 5
|
47292 | }
|
47293 | },
|
47294 | type: 'if',
|
47295 | locations: [{
|
47296 | start: {
|
47297 | line: 139,
|
47298 | column: 4
|
47299 | },
|
47300 | end: {
|
47301 | line: 141,
|
47302 | column: 5
|
47303 | }
|
47304 | }, {
|
47305 | start: {
|
47306 | line: 139,
|
47307 | column: 4
|
47308 | },
|
47309 | end: {
|
47310 | line: 141,
|
47311 | column: 5
|
47312 | }
|
47313 | }],
|
47314 | line: 139
|
47315 | },
|
47316 | '6': {
|
47317 | loc: {
|
47318 | start: {
|
47319 | line: 144,
|
47320 | column: 4
|
47321 | },
|
47322 | end: {
|
47323 | line: 146,
|
47324 | column: 5
|
47325 | }
|
47326 | },
|
47327 | type: 'if',
|
47328 | locations: [{
|
47329 | start: {
|
47330 | line: 144,
|
47331 | column: 4
|
47332 | },
|
47333 | end: {
|
47334 | line: 146,
|
47335 | column: 5
|
47336 | }
|
47337 | }, {
|
47338 | start: {
|
47339 | line: 144,
|
47340 | column: 4
|
47341 | },
|
47342 | end: {
|
47343 | line: 146,
|
47344 | column: 5
|
47345 | }
|
47346 | }],
|
47347 | line: 144
|
47348 | },
|
47349 | '7': {
|
47350 | loc: {
|
47351 | start: {
|
47352 | line: 148,
|
47353 | column: 4
|
47354 | },
|
47355 | end: {
|
47356 | line: 150,
|
47357 | column: 5
|
47358 | }
|
47359 | },
|
47360 | type: 'if',
|
47361 | locations: [{
|
47362 | start: {
|
47363 | line: 148,
|
47364 | column: 4
|
47365 | },
|
47366 | end: {
|
47367 | line: 150,
|
47368 | column: 5
|
47369 | }
|
47370 | }, {
|
47371 | start: {
|
47372 | line: 148,
|
47373 | column: 4
|
47374 | },
|
47375 | end: {
|
47376 | line: 150,
|
47377 | column: 5
|
47378 | }
|
47379 | }],
|
47380 | line: 148
|
47381 | },
|
47382 | '8': {
|
47383 | loc: {
|
47384 | start: {
|
47385 | line: 148,
|
47386 | column: 8
|
47387 | },
|
47388 | end: {
|
47389 | line: 148,
|
47390 | column: 85
|
47391 | }
|
47392 | },
|
47393 | type: 'binary-expr',
|
47394 | locations: [{
|
47395 | start: {
|
47396 | line: 148,
|
47397 | column: 8
|
47398 | },
|
47399 | end: {
|
47400 | line: 148,
|
47401 | column: 27
|
47402 | }
|
47403 | }, {
|
47404 | start: {
|
47405 | line: 148,
|
47406 | column: 31
|
47407 | },
|
47408 | end: {
|
47409 | line: 148,
|
47410 | column: 85
|
47411 | }
|
47412 | }],
|
47413 | line: 148
|
47414 | },
|
47415 | '9': {
|
47416 | loc: {
|
47417 | start: {
|
47418 | line: 154,
|
47419 | column: 4
|
47420 | },
|
47421 | end: {
|
47422 | line: 156,
|
47423 | column: 5
|
47424 | }
|
47425 | },
|
47426 | type: 'if',
|
47427 | locations: [{
|
47428 | start: {
|
47429 | line: 154,
|
47430 | column: 4
|
47431 | },
|
47432 | end: {
|
47433 | line: 156,
|
47434 | column: 5
|
47435 | }
|
47436 | }, {
|
47437 | start: {
|
47438 | line: 154,
|
47439 | column: 4
|
47440 | },
|
47441 | end: {
|
47442 | line: 156,
|
47443 | column: 5
|
47444 | }
|
47445 | }],
|
47446 | line: 154
|
47447 | },
|
47448 | '10': {
|
47449 | loc: {
|
47450 | start: {
|
47451 | line: 160,
|
47452 | column: 4
|
47453 | },
|
47454 | end: {
|
47455 | line: 164,
|
47456 | column: 5
|
47457 | }
|
47458 | },
|
47459 | type: 'if',
|
47460 | locations: [{
|
47461 | start: {
|
47462 | line: 160,
|
47463 | column: 4
|
47464 | },
|
47465 | end: {
|
47466 | line: 164,
|
47467 | column: 5
|
47468 | }
|
47469 | }, {
|
47470 | start: {
|
47471 | line: 160,
|
47472 | column: 4
|
47473 | },
|
47474 | end: {
|
47475 | line: 164,
|
47476 | column: 5
|
47477 | }
|
47478 | }],
|
47479 | line: 160
|
47480 | },
|
47481 | '11': {
|
47482 | loc: {
|
47483 | start: {
|
47484 | line: 160,
|
47485 | column: 8
|
47486 | },
|
47487 | end: {
|
47488 | line: 160,
|
47489 | column: 40
|
47490 | }
|
47491 | },
|
47492 | type: 'binary-expr',
|
47493 | locations: [{
|
47494 | start: {
|
47495 | line: 160,
|
47496 | column: 8
|
47497 | },
|
47498 | end: {
|
47499 | line: 160,
|
47500 | column: 19
|
47501 | }
|
47502 | }, {
|
47503 | start: {
|
47504 | line: 160,
|
47505 | column: 23
|
47506 | },
|
47507 | end: {
|
47508 | line: 160,
|
47509 | column: 40
|
47510 | }
|
47511 | }],
|
47512 | line: 160
|
47513 | },
|
47514 | '12': {
|
47515 | loc: {
|
47516 | start: {
|
47517 | line: 212,
|
47518 | column: 2
|
47519 | },
|
47520 | end: {
|
47521 | line: 216,
|
47522 | column: 3
|
47523 | }
|
47524 | },
|
47525 | type: 'if',
|
47526 | locations: [{
|
47527 | start: {
|
47528 | line: 212,
|
47529 | column: 2
|
47530 | },
|
47531 | end: {
|
47532 | line: 216,
|
47533 | column: 3
|
47534 | }
|
47535 | }, {
|
47536 | start: {
|
47537 | line: 212,
|
47538 | column: 2
|
47539 | },
|
47540 | end: {
|
47541 | line: 216,
|
47542 | column: 3
|
47543 | }
|
47544 | }],
|
47545 | line: 212
|
47546 | },
|
47547 | '13': {
|
47548 | loc: {
|
47549 | start: {
|
47550 | line: 237,
|
47551 | column: 11
|
47552 | },
|
47553 | end: {
|
47554 | line: 242,
|
47555 | column: 47
|
47556 | }
|
47557 | },
|
47558 | type: 'binary-expr',
|
47559 | locations: [{
|
47560 | start: {
|
47561 | line: 237,
|
47562 | column: 11
|
47563 | },
|
47564 | end: {
|
47565 | line: 237,
|
47566 | column: 56
|
47567 | }
|
47568 | }, {
|
47569 | start: {
|
47570 | line: 238,
|
47571 | column: 12
|
47572 | },
|
47573 | end: {
|
47574 | line: 238,
|
47575 | column: 34
|
47576 | }
|
47577 | }, {
|
47578 | start: {
|
47579 | line: 239,
|
47580 | column: 12
|
47581 | },
|
47582 | end: {
|
47583 | line: 239,
|
47584 | column: 49
|
47585 | }
|
47586 | }, {
|
47587 | start: {
|
47588 | line: 240,
|
47589 | column: 12
|
47590 | },
|
47591 | end: {
|
47592 | line: 240,
|
47593 | column: 34
|
47594 | }
|
47595 | }, {
|
47596 | start: {
|
47597 | line: 242,
|
47598 | column: 12
|
47599 | },
|
47600 | end: {
|
47601 | line: 242,
|
47602 | column: 47
|
47603 | }
|
47604 | }],
|
47605 | line: 237
|
47606 | },
|
47607 | '14': {
|
47608 | loc: {
|
47609 | start: {
|
47610 | line: 253,
|
47611 | column: 4
|
47612 | },
|
47613 | end: {
|
47614 | line: 262,
|
47615 | column: 5
|
47616 | }
|
47617 | },
|
47618 | type: 'if',
|
47619 | locations: [{
|
47620 | start: {
|
47621 | line: 253,
|
47622 | column: 4
|
47623 | },
|
47624 | end: {
|
47625 | line: 262,
|
47626 | column: 5
|
47627 | }
|
47628 | }, {
|
47629 | start: {
|
47630 | line: 253,
|
47631 | column: 4
|
47632 | },
|
47633 | end: {
|
47634 | line: 262,
|
47635 | column: 5
|
47636 | }
|
47637 | }],
|
47638 | line: 253
|
47639 | },
|
47640 | '15': {
|
47641 | loc: {
|
47642 | start: {
|
47643 | line: 258,
|
47644 | column: 8
|
47645 | },
|
47646 | end: {
|
47647 | line: 260,
|
47648 | column: 9
|
47649 | }
|
47650 | },
|
47651 | type: 'if',
|
47652 | locations: [{
|
47653 | start: {
|
47654 | line: 258,
|
47655 | column: 8
|
47656 | },
|
47657 | end: {
|
47658 | line: 260,
|
47659 | column: 9
|
47660 | }
|
47661 | }, {
|
47662 | start: {
|
47663 | line: 258,
|
47664 | column: 8
|
47665 | },
|
47666 | end: {
|
47667 | line: 260,
|
47668 | column: 9
|
47669 | }
|
47670 | }],
|
47671 | line: 258
|
47672 | }
|
47673 | },
|
47674 | s: {
|
47675 | '0': 0,
|
47676 | '1': 0,
|
47677 | '2': 0,
|
47678 | '3': 0,
|
47679 | '4': 0,
|
47680 | '5': 0,
|
47681 | '6': 0,
|
47682 | '7': 0,
|
47683 | '8': 0,
|
47684 | '9': 0,
|
47685 | '10': 0,
|
47686 | '11': 0,
|
47687 | '12': 0,
|
47688 | '13': 0,
|
47689 | '14': 0,
|
47690 | '15': 0,
|
47691 | '16': 0,
|
47692 | '17': 0,
|
47693 | '18': 0,
|
47694 | '19': 0,
|
47695 | '20': 0,
|
47696 | '21': 0,
|
47697 | '22': 0,
|
47698 | '23': 0,
|
47699 | '24': 0,
|
47700 | '25': 0,
|
47701 | '26': 0,
|
47702 | '27': 0,
|
47703 | '28': 0,
|
47704 | '29': 0,
|
47705 | '30': 0,
|
47706 | '31': 0,
|
47707 | '32': 0,
|
47708 | '33': 0,
|
47709 | '34': 0,
|
47710 | '35': 0,
|
47711 | '36': 0,
|
47712 | '37': 0,
|
47713 | '38': 0,
|
47714 | '39': 0,
|
47715 | '40': 0,
|
47716 | '41': 0,
|
47717 | '42': 0,
|
47718 | '43': 0,
|
47719 | '44': 0,
|
47720 | '45': 0,
|
47721 | '46': 0,
|
47722 | '47': 0,
|
47723 | '48': 0,
|
47724 | '49': 0,
|
47725 | '50': 0,
|
47726 | '51': 0,
|
47727 | '52': 0,
|
47728 | '53': 0,
|
47729 | '54': 0,
|
47730 | '55': 0,
|
47731 | '56': 0,
|
47732 | '57': 0,
|
47733 | '58': 0,
|
47734 | '59': 0,
|
47735 | '60': 0,
|
47736 | '61': 0,
|
47737 | '62': 0,
|
47738 | '63': 0,
|
47739 | '64': 0,
|
47740 | '65': 0,
|
47741 | '66': 0,
|
47742 | '67': 0,
|
47743 | '68': 0,
|
47744 | '69': 0,
|
47745 | '70': 0,
|
47746 | '71': 0,
|
47747 | '72': 0,
|
47748 | '73': 0,
|
47749 | '74': 0,
|
47750 | '75': 0,
|
47751 | '76': 0,
|
47752 | '77': 0,
|
47753 | '78': 0,
|
47754 | '79': 0
|
47755 | },
|
47756 | f: {
|
47757 | '0': 0,
|
47758 | '1': 0,
|
47759 | '2': 0,
|
47760 | '3': 0,
|
47761 | '4': 0,
|
47762 | '5': 0,
|
47763 | '6': 0,
|
47764 | '7': 0,
|
47765 | '8': 0,
|
47766 | '9': 0,
|
47767 | '10': 0,
|
47768 | '11': 0,
|
47769 | '12': 0,
|
47770 | '13': 0,
|
47771 | '14': 0,
|
47772 | '15': 0,
|
47773 | '16': 0,
|
47774 | '17': 0,
|
47775 | '18': 0
|
47776 | },
|
47777 | b: {
|
47778 | '0': [0, 0],
|
47779 | '1': [0, 0],
|
47780 | '2': [0, 0],
|
47781 | '3': [0, 0],
|
47782 | '4': [0, 0],
|
47783 | '5': [0, 0],
|
47784 | '6': [0, 0],
|
47785 | '7': [0, 0],
|
47786 | '8': [0, 0],
|
47787 | '9': [0, 0],
|
47788 | '10': [0, 0],
|
47789 | '11': [0, 0],
|
47790 | '12': [0, 0],
|
47791 | '13': [0, 0, 0, 0, 0],
|
47792 | '14': [0, 0],
|
47793 | '15': [0, 0]
|
47794 | },
|
47795 | _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
|
47796 | },
|
47797 | coverage = global[gcv] || (global[gcv] = {});
|
47798 |
|
47799 | if (coverage[path] && coverage[path].hash === hash) {
|
47800 | return coverage[path];
|
47801 | }
|
47802 |
|
47803 | coverageData.hash = hash;
|
47804 | return coverage[path] = coverageData;
|
47805 | }();
|
47806 |
|
47807 | var _ref$1 = (cov_h24c1ohq2.s[0]++, obj$1),
|
47808 | isMiddlewareMediatorSupported$1 = _ref$1.isMiddlewareMediatorSupported;
|
47809 |
|
47810 | var VIDEO_EVENTS = (cov_h24c1ohq2.s[1]++, videojs$1.getTech('Html5').Events);
|
47811 | var defaults = (cov_h24c1ohq2.s[2]++, {
|
47812 | timeout: 5000,
|
47813 | prerollTimeout: undefined,
|
47814 | postrollTimeout: undefined,
|
47815 | debug: false,
|
47816 | stitchedAds: false,
|
47817 | contentIsLive: undefined,
|
47818 | liveCuePoints: true
|
47819 | });
|
47820 | cov_h24c1ohq2.s[3]++;
|
47821 |
|
47822 | var contribAdsPlugin = function contribAdsPlugin(options) {
|
47823 | cov_h24c1ohq2.f[0]++;
|
47824 | var player = (cov_h24c1ohq2.s[4]++, this);
|
47825 | var settings = (cov_h24c1ohq2.s[5]++, videojs$1.mergeOptions(defaults, options));
|
47826 | var videoEvents = (cov_h24c1ohq2.s[6]++, []);
|
47827 | cov_h24c1ohq2.s[7]++;
|
47828 | VIDEO_EVENTS.concat(['firstplay', 'loadedalldata']).forEach(function (eventName) {
|
47829 | cov_h24c1ohq2.f[1]++;
|
47830 | cov_h24c1ohq2.s[8]++;
|
47831 |
|
47832 | if (videoEvents.indexOf(eventName) === -1) {
|
47833 | cov_h24c1ohq2.b[0][0]++;
|
47834 | cov_h24c1ohq2.s[9]++;
|
47835 | videoEvents.push(eventName);
|
47836 | } else {
|
47837 | cov_h24c1ohq2.b[0][1]++;
|
47838 | }
|
47839 | });
|
47840 | cov_h24c1ohq2.s[10]++;
|
47841 | player.on(videoEvents, redispatch);
|
47842 | cov_h24c1ohq2.s[11]++;
|
47843 |
|
47844 | if (!isMiddlewareMediatorSupported$1()) {
|
47845 | cov_h24c1ohq2.b[1][0]++;
|
47846 | cov_h24c1ohq2.s[12]++;
|
47847 | initCancelContentPlay(player, settings.debug);
|
47848 | } else {
|
47849 | cov_h24c1ohq2.b[1][1]++;
|
47850 | }
|
47851 |
|
47852 | cov_h24c1ohq2.s[13]++;
|
47853 | player.setTimeout(function () {
|
47854 | cov_h24c1ohq2.f[2]++;
|
47855 | cov_h24c1ohq2.s[14]++;
|
47856 |
|
47857 | if ((cov_h24c1ohq2.b[3][0]++, !player.ads._hasThereBeenALoadStartDuringPlayerLife) && (cov_h24c1ohq2.b[3][1]++, player.src() !== '')) {
|
47858 | cov_h24c1ohq2.b[2][0]++;
|
47859 | cov_h24c1ohq2.s[15]++;
|
47860 | videojs$1.log.error('videojs-contrib-ads has not seen a loadstart event 5 seconds ' + 'after being initialized, but a source is present. This indicates that ' + 'videojs-contrib-ads was initialized too late. It must be initialized ' + 'immediately after video.js in the same tick. As a result, some ads will not ' + 'play and some media events will be incorrect. For more information, see ' + 'http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html');
|
47861 | } else {
|
47862 | cov_h24c1ohq2.b[2][1]++;
|
47863 | }
|
47864 | }, 5000);
|
47865 | cov_h24c1ohq2.s[16]++;
|
47866 | player.on('ended', function () {
|
47867 | cov_h24c1ohq2.f[3]++;
|
47868 | cov_h24c1ohq2.s[17]++;
|
47869 |
|
47870 | if (!player.hasClass('vjs-has-started')) {
|
47871 | cov_h24c1ohq2.b[4][0]++;
|
47872 | cov_h24c1ohq2.s[18]++;
|
47873 | player.addClass('vjs-has-started');
|
47874 | } else {
|
47875 | cov_h24c1ohq2.b[4][1]++;
|
47876 | }
|
47877 | });
|
47878 | cov_h24c1ohq2.s[19]++;
|
47879 | player.on('contenttimeupdate', function () {
|
47880 | cov_h24c1ohq2.f[4]++;
|
47881 | cov_h24c1ohq2.s[20]++;
|
47882 | player.removeClass('vjs-waiting');
|
47883 | });
|
47884 | cov_h24c1ohq2.s[21]++;
|
47885 | player.on(['addurationchange', 'adcanplay'], function () {
|
47886 | cov_h24c1ohq2.f[5]++;
|
47887 | cov_h24c1ohq2.s[22]++;
|
47888 |
|
47889 | if (player.ads.settings.stitchedAds) {
|
47890 | cov_h24c1ohq2.b[5][0]++;
|
47891 | cov_h24c1ohq2.s[23]++;
|
47892 | return;
|
47893 | } else {
|
47894 | cov_h24c1ohq2.b[5][1]++;
|
47895 | }
|
47896 |
|
47897 | cov_h24c1ohq2.s[24]++;
|
47898 |
|
47899 | if (player.hasStarted()) {
|
47900 | cov_h24c1ohq2.b[6][0]++;
|
47901 | cov_h24c1ohq2.s[25]++;
|
47902 | return;
|
47903 | } else {
|
47904 | cov_h24c1ohq2.b[6][1]++;
|
47905 | }
|
47906 |
|
47907 | cov_h24c1ohq2.s[26]++;
|
47908 |
|
47909 | if ((cov_h24c1ohq2.b[8][0]++, player.ads.snapshot) && (cov_h24c1ohq2.b[8][1]++, player.currentSrc() === player.ads.snapshot.currentSrc)) {
|
47910 | cov_h24c1ohq2.b[7][0]++;
|
47911 | cov_h24c1ohq2.s[27]++;
|
47912 | return;
|
47913 | } else {
|
47914 | cov_h24c1ohq2.b[7][1]++;
|
47915 | }
|
47916 |
|
47917 | cov_h24c1ohq2.s[28]++;
|
47918 |
|
47919 | if (!player.ads.inAdBreak()) {
|
47920 | cov_h24c1ohq2.b[9][0]++;
|
47921 | cov_h24c1ohq2.s[29]++;
|
47922 | return;
|
47923 | } else {
|
47924 | cov_h24c1ohq2.b[9][1]++;
|
47925 | }
|
47926 |
|
47927 | var playPromise = (cov_h24c1ohq2.s[30]++, player.play());
|
47928 | cov_h24c1ohq2.s[31]++;
|
47929 |
|
47930 | if ((cov_h24c1ohq2.b[11][0]++, playPromise) && (cov_h24c1ohq2.b[11][1]++, playPromise.catch)) {
|
47931 | cov_h24c1ohq2.b[10][0]++;
|
47932 | cov_h24c1ohq2.s[32]++;
|
47933 | playPromise.catch(function (error) {
|
47934 | cov_h24c1ohq2.f[6]++;
|
47935 | cov_h24c1ohq2.s[33]++;
|
47936 | videojs$1.log.warn('Play promise rejected when playing ad', error);
|
47937 | });
|
47938 | } else {
|
47939 | cov_h24c1ohq2.b[10][1]++;
|
47940 | }
|
47941 | });
|
47942 | cov_h24c1ohq2.s[34]++;
|
47943 | player.on('nopreroll', function () {
|
47944 | cov_h24c1ohq2.f[7]++;
|
47945 | cov_h24c1ohq2.s[35]++;
|
47946 | player.ads.debug('Received nopreroll event');
|
47947 | cov_h24c1ohq2.s[36]++;
|
47948 | player.ads.nopreroll_ = true;
|
47949 | });
|
47950 | cov_h24c1ohq2.s[37]++;
|
47951 | player.on('nopostroll', function () {
|
47952 | cov_h24c1ohq2.f[8]++;
|
47953 | cov_h24c1ohq2.s[38]++;
|
47954 | player.ads.debug('Received nopostroll event');
|
47955 | cov_h24c1ohq2.s[39]++;
|
47956 | player.ads.nopostroll_ = true;
|
47957 | });
|
47958 | cov_h24c1ohq2.s[40]++;
|
47959 | player.on('playing', function () {
|
47960 | cov_h24c1ohq2.f[9]++;
|
47961 | cov_h24c1ohq2.s[41]++;
|
47962 | player.ads._cancelledPlay = false;
|
47963 | cov_h24c1ohq2.s[42]++;
|
47964 | player.ads._pausedOnContentupdate = false;
|
47965 | });
|
47966 | cov_h24c1ohq2.s[43]++;
|
47967 | player.on('play', function () {
|
47968 | cov_h24c1ohq2.f[10]++;
|
47969 | cov_h24c1ohq2.s[44]++;
|
47970 | player.ads._playRequested = true;
|
47971 | });
|
47972 | cov_h24c1ohq2.s[45]++;
|
47973 | player.one('loadstart', function () {
|
47974 | cov_h24c1ohq2.f[11]++;
|
47975 | cov_h24c1ohq2.s[46]++;
|
47976 | player.ads._hasThereBeenALoadStartDuringPlayerLife = true;
|
47977 | });
|
47978 | cov_h24c1ohq2.s[47]++;
|
47979 | player.on('loadeddata', function () {
|
47980 | cov_h24c1ohq2.f[12]++;
|
47981 | cov_h24c1ohq2.s[48]++;
|
47982 | player.ads._hasThereBeenALoadedData = true;
|
47983 | });
|
47984 | cov_h24c1ohq2.s[49]++;
|
47985 | player.on('loadedmetadata', function () {
|
47986 | cov_h24c1ohq2.f[13]++;
|
47987 | cov_h24c1ohq2.s[50]++;
|
47988 | player.ads._hasThereBeenALoadedMetaData = true;
|
47989 | });
|
47990 | cov_h24c1ohq2.s[51]++;
|
47991 | player.ads = getAds(player);
|
47992 | cov_h24c1ohq2.s[52]++;
|
47993 | player.ads.settings = settings;
|
47994 | cov_h24c1ohq2.s[53]++;
|
47995 | settings.stitchedAds = !!settings.stitchedAds;
|
47996 | cov_h24c1ohq2.s[54]++;
|
47997 |
|
47998 | if (settings.stitchedAds) {
|
47999 | cov_h24c1ohq2.b[12][0]++;
|
48000 | cov_h24c1ohq2.s[55]++;
|
48001 | player.ads._state = new (States.getState('StitchedContentPlayback'))(player);
|
48002 | } else {
|
48003 | cov_h24c1ohq2.b[12][1]++;
|
48004 | cov_h24c1ohq2.s[56]++;
|
48005 | player.ads._state = new (States.getState('BeforePreroll'))(player);
|
48006 | }
|
48007 |
|
48008 | cov_h24c1ohq2.s[57]++;
|
48009 |
|
48010 | player.ads._state.init(player);
|
48011 |
|
48012 | cov_h24c1ohq2.s[58]++;
|
48013 | player.ads.cueTextTracks = cueTextTracks;
|
48014 | cov_h24c1ohq2.s[59]++;
|
48015 | player.ads.adMacroReplacement = adMacroReplacement.bind(player);
|
48016 | cov_h24c1ohq2.s[60]++;
|
48017 | initializeContentupdate(player);
|
48018 | cov_h24c1ohq2.s[61]++;
|
48019 | player.on('contentchanged', player.ads.reset);
|
48020 | cov_h24c1ohq2.s[62]++;
|
48021 |
|
48022 | var shouldDisableTracks = function shouldDisableTracks() {
|
48023 | cov_h24c1ohq2.f[14]++;
|
48024 | cov_h24c1ohq2.s[63]++;
|
48025 | return (cov_h24c1ohq2.b[13][0]++, !player.ads.shouldPlayContentBehindAd(player)) && (cov_h24c1ohq2.b[13][1]++, player.ads.inAdBreak()) && (cov_h24c1ohq2.b[13][2]++, player.tech_.featuresNativeTextTracks) && (cov_h24c1ohq2.b[13][3]++, videojs$1.browser.IS_IOS) && (cov_h24c1ohq2.b[13][4]++, !Array.isArray(player.textTracks()));
|
48026 | };
|
48027 |
|
48028 | cov_h24c1ohq2.s[64]++;
|
48029 |
|
48030 | var textTrackChangeHandler = function textTrackChangeHandler() {
|
48031 | cov_h24c1ohq2.f[15]++;
|
48032 | var textTrackList = (cov_h24c1ohq2.s[65]++, player.textTracks());
|
48033 | cov_h24c1ohq2.s[66]++;
|
48034 |
|
48035 | if (shouldDisableTracks()) {
|
48036 | cov_h24c1ohq2.b[14][0]++;
|
48037 | cov_h24c1ohq2.s[67]++;
|
48038 |
|
48039 | for (var i = 0; i < textTrackList.length; i++) {
|
48040 | var track = (cov_h24c1ohq2.s[68]++, textTrackList[i]);
|
48041 | cov_h24c1ohq2.s[69]++;
|
48042 |
|
48043 | if (track.mode === 'showing') {
|
48044 | cov_h24c1ohq2.b[15][0]++;
|
48045 | cov_h24c1ohq2.s[70]++;
|
48046 | track.mode = 'disabled';
|
48047 | } else {
|
48048 | cov_h24c1ohq2.b[15][1]++;
|
48049 | }
|
48050 | }
|
48051 | } else {
|
48052 | cov_h24c1ohq2.b[14][1]++;
|
48053 | }
|
48054 | };
|
48055 |
|
48056 | cov_h24c1ohq2.s[71]++;
|
48057 | player.ready(function () {
|
48058 | cov_h24c1ohq2.f[16]++;
|
48059 | cov_h24c1ohq2.s[72]++;
|
48060 | player.textTracks().addEventListener('change', textTrackChangeHandler);
|
48061 | });
|
48062 | cov_h24c1ohq2.s[73]++;
|
48063 | player.on(['play', 'playing', 'ended', 'adsready', 'adscanceled', 'adskip', 'adserror', 'adtimeout', 'adended', 'ads-ad-started', 'contentchanged', 'dispose', 'contentresumed', 'readyforpostroll', 'nopreroll', 'nopostroll'], function (e) {
|
48064 | cov_h24c1ohq2.f[17]++;
|
48065 | cov_h24c1ohq2.s[74]++;
|
48066 |
|
48067 | player.ads._state.handleEvent(e.type);
|
48068 | });
|
48069 | cov_h24c1ohq2.s[75]++;
|
48070 | player.on('dispose', function () {
|
48071 | cov_h24c1ohq2.f[18]++;
|
48072 | cov_h24c1ohq2.s[76]++;
|
48073 | player.ads.reset();
|
48074 | cov_h24c1ohq2.s[77]++;
|
48075 | player.textTracks().removeEventListener('change', textTrackChangeHandler);
|
48076 | });
|
48077 | };
|
48078 |
|
48079 | cov_h24c1ohq2.s[78]++;
|
48080 | contribAdsPlugin.VERSION = version;
|
48081 | cov_h24c1ohq2.s[79]++;
|
48082 | register(contribAdsPlugin);
|
48083 |
|
48084 | var deregister = function deregister() {
|
48085 |
|
48086 | if (videojs$1.deregisterPlugin) {
|
48087 | return videojs$1.deregisterPlugin('ads');
|
48088 | }
|
48089 |
|
48090 |
|
48091 | if (videojs$1.getPlugin) {
|
48092 | var Plugin = videojs$1.getPlugin('plugin');
|
48093 |
|
48094 | if (Plugin && Plugin.deregisterPlugin) {
|
48095 | return Plugin.deregisterPlugin('ads');
|
48096 | }
|
48097 | }
|
48098 |
|
48099 |
|
48100 | var Player = videojs$1.getComponent('Player');
|
48101 |
|
48102 | if (Player && Player.prototype.ads) {
|
48103 | delete Player.prototype.ads;
|
48104 | }
|
48105 | };
|
48106 |
|
48107 | QUnit.module('Register');
|
48108 | QUnit.test('registration fails if plugin exists, succeeds otherwise', function (assert) {
|
48109 |
|
48110 | assert.notOk(register(contribAdsPlugin), 'plugin was already registered');
|
48111 | assert.ok(hasAdsPlugin(), 'plugin exists');
|
48112 |
|
48113 | deregister();
|
48114 | assert.notOk(hasAdsPlugin(), 'plugin does not exist');
|
48115 |
|
48116 | assert.ok(register(contribAdsPlugin), 'plugin was registered');
|
48117 | assert.ok(hasAdsPlugin(), 'plugin exists');
|
48118 | });
|
48119 |
|
48120 | }(QUnit, sinon, videojs));
|