vendor: 8,654 bytes, lines 1-249
1var redesign;(function () { if (!redesign || !redesign.requirejs) { 2if (!redesign) { redesign = {}; } else { require = redesign; } 3/** vim: et:ts=4:sw=4:sts=4 4 * @license RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. 5 * Available via the MIT or new BSD license. 6 * see: http://github.com/jrburke/requirejs for details 7 */ 8//Not using strict: uneven strict support in browsers, #392, and causes 9//problems with requirejs.exec()/transpiler plugins that may not be strict. 10/*jslint regexp: true, nomen: true, sloppy: true */ 11/*global window, navigator, document, importScripts, setTimeout, opera */ 12 13var requirejs, require, define; 14(function (global) { 15 var req, s, head, baseElement, dataMain, src, 16 interactiveScript, currentlyAddingScript, mainScript, subPath, 17 version = '2.1.15', 18 commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, 19 cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, 20 jsSuffixRegExp = /\.js$/, 21 currDirRegExp = /^\.\//, 22 op = Object.prototype, 23 ostring = op.toString, 24 hasOwn = op.hasOwnProperty, 25 ap = Array.prototype, 26 apsp = ap.splice, 27 isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), 28 isWebWorker = !isBrowser && typeof importScripts !== 'undefined', 29 //PS3 indicates loaded and complete, but need to wait for complete 30 //specifically. Sequence is 'loading', 'loaded', execution, 31 // then 'complete'. The UA check is unfortunate, but not sure how 32 //to feature test w/o causing perf issues. 33 readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? 34 /^complete$/ : /^(complete|loaded)$/, 35 defContextName = '_', 36 //Oh the tragedy, detecting opera. See the usage of isOpera for reason. 37 isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', 38 contexts = {}, 39 cfg = {}, 40 globalDefQueue = [], 41 useInteractive = false; 42 43 function isFunction(it) { 44 return ostring.call(it) === '[object Function]'; 45 } 46 47 function isArray(it) { 48 return ostring.call(it) === '[object Array]'; 49 } 50 51 /** 52 * Helper function for iterating over an array. If the func returns 53 * a true value, it will break out of the loop. 54 */ 55 function each(ary, func) { 56 if (ary) { 57 var i; 58 for (i = 0; i < ary.length; i += 1) { 59 if (ary[i] && func(ary[i], i, ary)) { 60 break; 61 } 62 } 63 } 64 } 65 66 /** 67 * Helper function for iterating over an array backwards. If the func 68 * returns a true value, it will break out of the loop. 69 */ 70 function eachReverse(ary, func) { 71 if (ary) { 72 var i; 73 for (i = ary.length - 1; i > -1; i -= 1) { 74 if (ary[i] && func(ary[i], i, ary)) { 75 break; 76 } 77 } 78 } 79 } 80 81 function hasProp(obj, prop) { 82 return hasOwn.call(obj, prop); 83 } 84 85 function getOwn(obj, prop) { 86 return hasProp(obj, prop) && obj[prop]; 87 } 88 89 /** 90 * Cycles over properties in an object and calls a function for each 91 * property value. If the function returns a truthy value, then the 92 * iteration is stopped. 93 */ 94 function eachProp(obj, func) { 95 var prop; 96 for (prop in obj) { 97 if (hasProp(obj, prop)) { 98 if (func(obj[prop], prop)) { 99 break; 100 } 101 } 102 } 103 } 104 105 /** 106 * Simple function to mix in properties from source into target, 107 * but only if target does not already have a property of the same name. 108 */ 109 function mixin(target, source, force, deepStringMixin) { 110 if (source) { 111 eachProp(source, function (value, prop) { 112 if (force || !hasProp(target, prop)) { 113 if (deepStringMixin && typeof value === 'object' && value && 114 !isArray(value) && !isFunction(value) && 115 !(value instanceof RegExp)) { 116 117 if (!target[prop]) { 118 target[prop] = {}; 119 } 120 mixin(target[prop], value, force, deepStringMixin); 121 } else { 122 target[prop] = value; 123 } 124 } 125 }); 126 } 127 return target; 128 } 129 130 //Similar to Function.prototype.bind, but the 'this' object is specified 131 //first, since it is easier to read/figure out what 'this' will be. 132 function bind(obj, fn) { 133 return function () { 134 return fn.apply(obj, arguments); 135 }; 136 } 137 138 function scripts() { 139 return document.getElementsByTagName('script'); 140 } 141 142 function defaultOnError(err) { 143 throw err; 144 } 145 146 //Allow getting a global that is expressed in 147 //dot notation, like 'a.b.c'. 148 function getGlobal(value) { 149 if (!value) { 150 return value; 151 } 152 var g = global; 153 each(value.split('.'), function (part) { 154 g = g[part]; 155 }); 156 return g; 157 } 158 159 /** 160 * Constructs an error with a pointer to an URL with more information. 161 * @param {String} id the error ID that maps to an ID on a web page. 162 * @param {String} message human readable error. 163 * @param {Error} [err] the original error, if there is one. 164 * 165 * @returns {Error} 166 */ 167 function makeError(id, msg, err, requireModules) { 168 var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); 169 e.requireType = id; 170 e.requireModules = requireModules; 171 if (err) { 172 e.originalError = err; 173 } 174 return e; 175 } 176 177 if (typeof define !== 'undefined') { 178 //If a define is already in play via another AMD loader, 179 //do not overwrite. 180 return; 181 } 182 183 if (typeof requirejs !== 'undefined') { 184 if (isFunction(requirejs)) { 185 //Do not overwrite an existing requirejs instance. 186 return; 187 } 188 cfg = requirejs; 189 requirejs = undefined; 190 } 191 192 //Allow for a require config object 193 if (typeof require !== 'undefined' && !isFunction(require)) { 194 //assume it is a config object. 195 cfg = require; 196 require = undefined; 197 } 198 199 function newContext(contextName) { 200 var inCheckLoaded, Module, context, handlers, 201 checkLoadedTimeoutId, 202 config = { 203 //Defaults. Do not set a default for map 204 //config to speed up normalize(), which 205 //will run faster if there is no default. 206 waitSeconds: 7, 207 baseUrl: './', 208 paths: {}, 209 bundles: {}, 210 pkgs: {}, 211 shim: {}, 212 config: {} 213 }, 214 registry = {}, 215 //registry of just enabled modules, to speed 216 //cycle breaking code when lots of modules 217 //are registered, but not activated. 218 enabledRegistry = {}, 219 undefEvents = {}, 220 defQueue = [], 221 defined = {}, 222 urlFetched = {}, 223 bundlesMap = {}, 224 requireCounter = 1, 225 unnormalizedCounter = 1; 226 227 /** 228 * Trims the . and .. from an array of path segments. 229 * It will keep a leading path segment if a .. will become 230 * the first path segment, to help with module name lookups, 231 * which act like paths, but can be remapped. But the end result, 232 * all paths that use this function should look normalized. 233 * NOTE: this method MODIFIES the input array. 234 * @param {Array} ary the array of path segments. 235 */ 236 function trimDots(ary) { 237 var i, part; 238 for (i = 0; i < ary.length; i++) { 239 part = ary[i]; 240 if (part === '.') { 241 ary.splice(i, 1); 242 i -= 1; 243 } else if (part === '..') { 244 // If at the start, or previous value is still .., 245 // keep them so that when converted to a path it may 246 // still work when converted to a path, even though 247 // as an ID it is less than ideal. In larger point 248 // releases, may be better to just kick out an error. 249 if (i === 0 || (i
vendor: 7,993 bytes, lines 249-443
249== 1 && ary[2] === '..') || ary[i - 1] === '..') { 250 continue; 251 } else if (i > 0) { 252 ary.splice(i - 1, 2); 253 i -= 2; 254 } 255 } 256 } 257 } 258 259 /** 260 * Given a relative module name, like ./something, normalize it to 261 * a real name that can be mapped to a path. 262 * @param {String} name the relative name 263 * @param {String} baseName a real name that the name arg is relative 264 * to. 265 * @param {Boolean} applyMap apply the map config to the value. Should 266 * only be done if this normalization is for a dependency ID. 267 * @returns {String} normalized name 268 */ 269 function normalize(name, baseName, applyMap) { 270 var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, 271 foundMap, foundI, foundStarMap, starI, normalizedBaseParts, 272 baseParts = (baseName && baseName.split('/')), 273 map = config.map, 274 starMap = map && map['*']; 275 276 //Adjust any relative paths. 277 if (name) { 278 name = name.split('/'); 279 lastIndex = name.length - 1; 280 281 // If wanting node ID compatibility, strip .js from end 282 // of IDs. Have to do this here, and not in nameToUrl 283 // because node allows either .js or non .js to map 284 // to same file. 285 if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { 286 name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); 287 } 288 289 // Starts with a '.' so need the baseName 290 if (name[0].charAt(0) === '.' && baseParts) { 291 //Convert baseName to array, and lop off the last part, 292 //so that . matches that 'directory' and not name of the baseName's 293 //module. For instance, baseName of 'one/two/three', maps to 294 //'one/two/three.js', but we want the directory, 'one/two' for 295 //this normalization. 296 normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); 297 name = normalizedBaseParts.concat(name); 298 } 299 300 trimDots(name); 301 name = name.join('/'); 302 } 303 304 //Apply map config if available. 305 if (applyMap && map && (baseParts || starMap)) { 306 nameParts = name.split('/'); 307 308 outerLoop: for (i = nameParts.length; i > 0; i -= 1) { 309 nameSegment = nameParts.slice(0, i).join('/'); 310 311 if (baseParts) { 312 //Find the longest baseName segment match in the config. 313 //So, do joins on the biggest to smallest lengths of baseParts. 314 for (j = baseParts.length; j > 0; j -= 1) { 315 mapValue = getOwn(map, baseParts.slice(0, j).join('/')); 316 317 //baseName segment has config, find if it has one for 318 //this name. 319 if (mapValue) { 320 mapValue = getOwn(mapValue, nameSegment); 321 if (mapValue) { 322 //Match, update name to the new value. 323 foundMap = mapValue; 324 foundI = i; 325 break outerLoop; 326 } 327 } 328 } 329 } 330 331 //Check for a star map match, but just hold on to it, 332 //if there is a shorter segment match later in a matching 333 //config, then favor over this star map. 334 if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { 335 foundStarMap = getOwn(starMap, nameSegment); 336 starI = i; 337 } 338 } 339 340 if (!foundMap && foundStarMap) { 341 foundMap = foundStarMap; 342 foundI = starI; 343 } 344 345 if (foundMap) { 346 nameParts.splice(0, foundI, foundMap); 347 name = nameParts.join('/'); 348 } 349 } 350 351 // If the name points to a package's name, use 352 // the package main instead. 353 pkgMain = getOwn(config.pkgs, name); 354 355 return pkgMain ? pkgMain : name; 356 } 357 358 function removeScript(name) { 359 if (isBrowser) { 360 each(scripts(), function (scriptNode) { 361 if (scriptNode.getAttribute('data-requiremodule') === name && 362 scriptNode.getAttribute('data-requirecontext') === context.contextName) { 363 scriptNode.parentNode.removeChild(scriptNode); 364 return true; 365 } 366 }); 367 } 368 } 369 370 function hasPathFallback(id) { 371 var pathConfig = getOwn(config.paths, id); 372 if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { 373 //Pop off the first array value, since it failed, and 374 //retry 375 pathConfig.shift(); 376 context.require.undef(id); 377 378 //Custom require that does not do map translation, since 379 //ID is "absolute", already mapped/resolved. 380 context.makeRequire(null, { 381 skipMap: true 382 })([id]); 383 384 return true; 385 } 386 } 387 388 //Turns a plugin!resource to [plugin, resource] 389 //with the plugin being undefined if the name 390 //did not have a plugin prefix. 391 function splitPrefix(name) { 392 var prefix, 393 index = name ? name.indexOf('!') : -1; 394 if (index > -1) { 395 prefix = name.substring(0, index); 396 name = name.substring(index + 1, name.length); 397 } 398 return [prefix, name]; 399 } 400 401 /** 402 * Creates a module mapping that includes plugin prefix, module 403 * name, and path. If parentModuleMap is provided it will 404 * also normalize the name via require.normalize() 405 * 406 * @param {String} name the module name 407 * @param {String} [parentModuleMap] parent module map 408 * for the module name, used to resolve relative names. 409 * @param {Boolean} isNormalized: is the ID already normalized. 410 * This is true if this call is done for a define() module ID. 411 * @param {Boolean} applyMap: apply the map config to the ID. 412 * Should only be true if this map is for a dependency. 413 * 414 * @returns {Object} 415 */ 416 function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { 417 var url, pluginModule, suffix, nameParts, 418 prefix = null, 419 parentName = parentModuleMap ? parentModuleMap.name : null, 420 originalName = name, 421 isDefine = true, 422 normalizedName = ''; 423 424 //If no name, then it means it is a require call, generate an 425 //internal name. 426 if (!name) { 427 isDefine = false; 428 name = '_@r' + (requireCounter += 1); 429 } 430 431 nameParts = splitPrefix(name); 432 prefix = nameParts[0]; 433 name = nameParts[1]; 434 435 if (prefix) { 436 prefix = normalize(prefix, parentName, applyMap); 437 pluginModule = getOwn(defined, prefix); 438 } 439 440 //Account for relative paths if there is a base name. 441 if (name) { 442 if (prefix) { 443 if (
vendor: 21,054 bytes, lines 443-968
443pluginModule && pluginModule.normalize) { 444 //Plugin is loaded, use its normalize method. 445 normalizedName = pluginModule.normalize(name, function (name) { 446 return normalize(name, parentName, applyMap); 447 }); 448 } else { 449 // If nested plugin references, then do not try to 450 // normalize, as it will not normalize correctly. This 451 // places a restriction on resourceIds, and the longer 452 // term solution is not to normalize until plugins are 453 // loaded and all normalizations to allow for async 454 // loading of a loader plugin. But for now, fixes the 455 // common uses. Details in #1131 456 normalizedName = name.indexOf('!') === -1 ? 457 normalize(name, parentName, applyMap) : 458 name; 459 } 460 } else { 461 //A regular module. 462 normalizedName = normalize(name, parentName, applyMap); 463 464 //Normalized name may be a plugin ID due to map config 465 //application in normalize. The map config values must 466 //already be normalized, so do not need to redo that part. 467 nameParts = splitPrefix(normalizedName); 468 prefix = nameParts[0]; 469 normalizedName = nameParts[1]; 470 isNormalized = true; 471 472 url = context.nameToUrl(normalizedName); 473 } 474 } 475 476 //If the id is a plugin id that cannot be determined if it needs 477 //normalization, stamp it with a unique ID so two matching relative 478 //ids that may conflict can be separate. 479 suffix = prefix && !pluginModule && !isNormalized ? 480 '_unnormalized' + (unnormalizedCounter += 1) : 481 ''; 482 483 return { 484 prefix: prefix, 485 name: normalizedName, 486 parentMap: parentModuleMap, 487 unnormalized: !!suffix, 488 url: url, 489 originalName: originalName, 490 isDefine: isDefine, 491 id: (prefix ? 492 prefix + '!' + normalizedName : 493 normalizedName) + suffix 494 }; 495 } 496 497 function getModule(depMap) { 498 var id = depMap.id, 499 mod = getOwn(registry, id); 500 501 if (!mod) { 502 mod = registry[id] = new context.Module(depMap); 503 } 504 505 return mod; 506 } 507 508 function on(depMap, name, fn) { 509 var id = depMap.id, 510 mod = getOwn(registry, id); 511 512 if (hasProp(defined, id) && 513 (!mod || mod.defineEmitComplete)) { 514 if (name === 'defined') { 515 fn(defined[id]); 516 } 517 } else { 518 mod = getModule(depMap); 519 if (mod.error && name === 'error') { 520 fn(mod.error); 521 } else { 522 mod.on(name, fn); 523 } 524 } 525 } 526 527 function onError(err, errback) { 528 var ids = err.requireModules, 529 notified = false; 530 531 if (errback) { 532 errback(err); 533 } else { 534 each(ids, function (id) { 535 var mod = getOwn(registry, id); 536 if (mod) { 537 //Set error on module, so it skips timeout checks. 538 mod.error = err; 539 if (mod.events.error) { 540 notified = true; 541 mod.emit('error', err); 542 } 543 } 544 }); 545 546 if (!notified) { 547 req.onError(err); 548 } 549 } 550 } 551 552 /** 553 * Internal method to transfer globalQueue items to this context's 554 * defQueue. 555 */ 556 function takeGlobalQueue() { 557 //Push all the globalDefQueue items into the context's defQueue 558 if (globalDefQueue.length) { 559 //Array splice in the values since the context code has a 560 //local var ref to defQueue, so cannot just reassign the one 561 //on context. 562 apsp.apply(defQueue, 563 [defQueue.length, 0].concat(globalDefQueue)); 564 globalDefQueue = []; 565 } 566 } 567 568 handlers = { 569 'require': function (mod) { 570 if (mod.require) { 571 return mod.require; 572 } else { 573 return (mod.require = context.makeRequire(mod.map)); 574 } 575 }, 576 'exports': function (mod) { 577 mod.usingExports = true; 578 if (mod.map.isDefine) { 579 if (mod.exports) { 580 return (defined[mod.map.id] = mod.exports); 581 } else { 582 return (mod.exports = defined[mod.map.id] = {}); 583 } 584 } 585 }, 586 'module': function (mod) { 587 if (mod.module) { 588 return mod.module; 589 } else { 590 return (mod.module = { 591 id: mod.map.id, 592 uri: mod.map.url, 593 config: function () { 594 return getOwn(config.config, mod.map.id) || {}; 595 }, 596 exports: mod.exports || (mod.exports = {}) 597 }); 598 } 599 } 600 }; 601 602 function cleanRegistry(id) { 603 //Clean up machinery used for waiting modules. 604 delete registry[id]; 605 delete enabledRegistry[id]; 606 } 607 608 function breakCycle(mod, traced, processed) { 609 var id = mod.map.id; 610 611 if (mod.error) { 612 mod.emit('error', mod.error); 613 } else { 614 traced[id] = true; 615 each(mod.depMaps, function (depMap, i) { 616 var depId = depMap.id, 617 dep = getOwn(registry, depId); 618 619 //Only force things that have not completed 620 //being defined, so still in the registry, 621 //and only if it has not been matched up 622 //in the module already. 623 if (dep && !mod.depMatched[i] && !processed[depId]) { 624 if (getOwn(traced, depId)) { 625 mod.defineDep(i, defined[depId]); 626 mod.check(); //pass false? 627 } else { 628 breakCycle(dep, traced, processed); 629 } 630 } 631 }); 632 processed[id] = true; 633 } 634 } 635 636 function checkLoaded() { 637 var err, usingPathFallback, 638 waitInterval = config.waitSeconds * 1000, 639 //It is possible to disable the wait interval by using waitSeconds of 0. 640 expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), 641 noLoads = [], 642 reqCalls = [], 643 stillLoading = false, 644 needCycleCheck = true; 645 646 //Do not bother if this call was a result of a cycle break. 647 if (inCheckLoaded) { 648 return; 649 } 650 651 inCheckLoaded = true; 652 653 //Figure out the state of all the modules. 654 eachProp(enabledRegistry, function (mod) { 655 var map = mod.map, 656 modId = map.id; 657 658 //Skip things that are not enabled or in error state. 659 if (!mod.enabled) { 660 return; 661 } 662 663 if (!map.isDefine) { 664 reqCalls.push(mod); 665 } 666 667 if (!mod.error) { 668 //If the module should be executed, and it has not 669 //been inited and time is up, remember it. 670 if (!mod.inited && expired) { 671 if (hasPathFallback(modId)) { 672 usingPathFallback = true; 673 stillLoading = true; 674 } else { 675 noLoads.push(modId); 676 removeScript(modId); 677 } 678 } else if (!mod.inited && mod.fetched && map.isDefine) { 679 stillLoading = true; 680 if (!map.prefix) { 681 //No reason to keep looking for unfinished 682 //loading. If the only stillLoading is a 683 //plugin resource though, keep going, 684 //because it may be that a plugin resource 685 //is waiting on a non-plugin cycle. 686 return (needCycleCheck = false); 687 } 688 } 689 } 690 }); 691 692 if (expired && noLoads.length) { 693 //If wait time expired, throw error of unloaded modules. 694 err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); 695 err.contextName = context.contextName; 696 return onError(err); 697 } 698 699 //Not expired, check for a cycle. 700 if (needCycleCheck) { 701 each(reqCalls, function (mod) { 702 breakCycle(mod, {}, {}); 703 }); 704 } 705 706 //If still waiting on loads, and the waiting load is something 707 //other than a plugin resource, or there are still outstanding 708 //scripts, then just try back later. 709 if ((!expired || usingPathFallback) && stillLoading) { 710 //Something is still waiting to load. Wait for it, but only 711 //if a timeout is not already in effect. 712 if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { 713 checkLoadedTimeoutId = setTimeout(function () { 714 checkLoadedTimeoutId = 0; 715 checkLoaded(); 716 }, 50); 717 } 718 } 719 720 inCheckLoaded = false; 721 } 722 723 Module = function (map) { 724 this.events = getOwn(undefEvents, map.id) || {}; 725 this.map = map; 726 this.shim = getOwn(config.shim, map.id); 727 this.depExports = []; 728 this.depMaps = []; 729 this.depMatched = []; 730 this.pluginMaps = {}; 731 this.depCount = 0; 732 733 /* this.exports this.factory 734 this.depMaps = [], 735 this.enabled, this.fetched 736 */ 737 }; 738 739 Module.prototype = { 740 init: function (depMaps, factory, errback, options) { 741 options = options || {}; 742 743 //Do not do more inits if already done. Can happen if there 744 //are multiple define calls for the same module. That is not 745 //a normal, common case, but it is also not unexpected. 746 if (this.inited) { 747 return; 748 } 749 750 this.factory = factory; 751 752 if (errback) { 753 //Register for errors on this module. 754 this.on('error', errback); 755 } else if (this.events.error) { 756 //If no errback already, but there are error listeners 757 //on this module, set up an errback to pass to the deps. 758 errback = bind(this, function (err) { 759 this.emit('error', err); 760 }); 761 } 762 763 //Do a copy of the dependency array, so that 764 //source inputs are not modified. For example 765 //"shim" deps are passed in here directly, and 766 //doing a direct modification of the depMaps array 767 //would affect that config. 768 this.depMaps = depMaps && depMaps.slice(0); 769 770 this.errback = errback; 771 772 //Indicate this module has be initialized 773 this.inited = true; 774 775 this.ignore = options.ignore; 776 777 //Could have option to init this module in enabled mode, 778 //or could have been previously marked as enabled. However, 779 //the dependencies are not known until init is called. So 780 //if enabled previously, now trigger dependencies as enabled. 781 if (options.enabled || this.enabled) { 782 //Enable this module and dependencies. 783 //Will call this.check() 784 this.enable(); 785 } else { 786 this.check(); 787 } 788 }, 789 790 defineDep: function (i, depExports) { 791 //Because of cycles, defined callback for a given 792 //export can be called more than once. 793 if (!this.depMatched[i]) { 794 this.depMatched[i] = true; 795 this.depCount -= 1; 796 this.depExports[i] = depExports; 797 } 798 }, 799 800 fetch: function () { 801 if (this.fetched) { 802 return; 803 } 804 this.fetched = true; 805 806 context.startTime = (new Date()).getTime(); 807 808 var map = this.map; 809 810 //If the manager is for a plugin managed resource, 811 //ask the plugin to load it now. 812 if (this.shim) { 813 context.makeRequire(this.map, { 814 enableBuildCallback: true 815 })(this.shim.deps || [], bind(this, function () { 816 return map.prefix ? this.callPlugin() : this.load(); 817 })); 818 } else { 819 //Regular dependency. 820 return map.prefix ? this.callPlugin() : this.load(); 821 } 822 }, 823 824 load: function () { 825 var url = this.map.url; 826 827 //Regular dependency. 828 if (!urlFetched[url]) { 829 urlFetched[url] = true; 830 context.load(this.map.id, url); 831 } 832 }, 833 834 /** 835 * Checks if the module is ready to define itself, and if so, 836 * define it. 837 */ 838 check: function () { 839 if (!this.enabled || this.enabling) { 840 return; 841 } 842 843 var err, cjsModule, 844 id = this.map.id, 845 depExports = this.depExports, 846 exports = this.exports, 847 factory = this.factory; 848 849 if (!this.inited) { 850 this.fetch(); 851 } else if (this.error) { 852 this.emit('error', this.error); 853 } else if (!this.defining) { 854 //The factory could trigger another require call 855 //that would result in checking this module to 856 //define itself again. If already in the process 857 //of doing that, skip this work. 858 this.defining = true; 859 860 if (this.depCount < 1 && !this.defined) { 861 if (isFunction(factory)) { 862 //If there is an error listener, favor passing 863 //to that instead of throwing an error. However, 864 //only do it for define()'d modules. require 865 //errbacks should not be called for failures in 866 //their callbacks (#699). However if a global 867 //onError is set, use that. 868 if ((this.events.error && this.map.isDefine) || 869 req.onError !== defaultOnError) { 870 try { 871 exports = context.execCb(id, factory, depExports, exports); 872 } catch (e) { 873 err = e; 874 } 875 } else { 876 exports = context.execCb(id, factory, depExports, exports); 877 } 878 879 // Favor return value over exports. If node/cjs in play, 880 // then will not have a return value anyway. Favor 881 // module.exports assignment over exports object. 882 if (this.map.isDefine && exports === undefined) { 883 cjsModule = this.module; 884 if (cjsModule) { 885 exports = cjsModule.exports; 886 } else if (this.usingExports) { 887 //exports already set the defined value. 888 exports = this.exports; 889 } 890 } 891 892 if (err) { 893 err.requireMap = this.map; 894 err.requireModules = this.map.isDefine ? [this.map.id] : null; 895 err.requireType = this.map.isDefine ? 'define' : 'require'; 896 return onError((this.error = err)); 897 } 898 899 } else { 900 //Just a literal value 901 exports = factory; 902 } 903 904 this.exports = exports; 905 906 if (this.map.isDefine && !this.ignore) { 907 defined[id] = exports; 908 909 if (req.onResourceLoad) { 910 req.onResourceLoad(context, this.map, this.depMaps); 911 } 912 } 913 914 //Clean up 915 cleanRegistry(id); 916 917 this.defined = true; 918 } 919 920 //Finished the define stage. Allow calling check again 921 //to allow define notifications below in the case of a 922 //cycle. 923 this.defining = false; 924 925 if (this.defined && !this.defineEmitted) { 926 this.defineEmitted = true; 927 this.emit('defined', this.exports); 928 this.defineEmitComplete = true; 929 } 930 931 } 932 }, 933 934 callPlugin: function () { 935 var map = this.map, 936 id = map.id, 937 //Map already normalized the prefix. 938 pluginMap = makeModuleMap(map.prefix); 939 940 //Mark this as a dependency for this plugin, so it 941 //can be traced for cycles. 942 this.depMaps.push(pluginMap); 943 944 on(pluginMap, 'defined', bind(this, function (plugin) { 945 var load, normalizedMap, normalizedMod, 946 bundleId = getOwn(bundlesMap, this.map.id), 947 name = this.map.name, 948 parentName = this.map.parentMap ? this.map.parentMap.name : null, 949 localRequire = context.makeRequire(map.parentMap, { 950 enableBuildCallback: true 951 }); 952 953 //If current map is not normalized, wait for that 954 //normalized name to load instead of continuing. 955 if (this.map.unnormalized) { 956 //Normalize the ID if the plugin allows it. 957 if (plugin.normalize) { 958 name = plugin.normalize(name, function (name) { 959 return normalize(name, parentName, true); 960 }) || ''; 961 } 962 963 //prefix and name should already be normalized, no need 964 //for applying map config again either. 965 normalizedMap = makeModuleMap(map.prefix + '!' + name, 966 this.map.parentMap); 967 on(normalizedMap, 968 'defined', bind(this, function (value) {
vendor: 6,701 bytes, lines 968-1122
968 969 this.init([], function () { return value; }, null, { 970 enabled: true, 971 ignore: true 972 }); 973 })); 974 975 normalizedMod = getOwn(registry, normalizedMap.id); 976 if (normalizedMod) { 977 //Mark this as a dependency for this plugin, so it 978 //can be traced for cycles. 979 this.depMaps.push(normalizedMap); 980 981 if (this.events.error) { 982 normalizedMod.on('error', bind(this, function (err) { 983 this.emit('error', err); 984 })); 985 } 986 normalizedMod.enable(); 987 } 988 989 return; 990 } 991 992 //If a paths config, then just load that file instead to 993 //resolve the plugin, as it is built into that paths layer. 994 if (bundleId) { 995 this.map.url = context.nameToUrl(bundleId); 996 this.load(); 997 return; 998 } 999 1000 load = bind(this, function (value) { 1001 this.init([], function () { return value; }, null, { 1002 enabled: true 1003 }); 1004 }); 1005 1006 load.error = bind(this, function (err) { 1007 this.inited = true; 1008 this.error = err; 1009 err.requireModules = [id]; 1010 1011 //Remove temp unnormalized modules for this module, 1012 //since they will never be resolved otherwise now. 1013 eachProp(registry, function (mod) { 1014 if (mod.map.id.indexOf(id + '_unnormalized') === 0) { 1015 cleanRegistry(mod.map.id); 1016 } 1017 }); 1018 1019 onError(err); 1020 }); 1021 1022 //Allow plugins to load other code without having to know the 1023 //context or how to 'complete' the load. 1024 load.fromText = bind(this, function (text, textAlt) { 1025 /*jslint evil: true */ 1026 var moduleName = map.name, 1027 moduleMap = makeModuleMap(moduleName), 1028 hasInteractive = useInteractive; 1029 1030 //As of 2.1.0, support just passing the text, to reinforce 1031 //fromText only being called once per resource. Still 1032 //support old style of passing moduleName but discard 1033 //that moduleName in favor of the internal ref. 1034 if (textAlt) { 1035 text = textAlt; 1036 } 1037 1038 //Turn off interactive script matching for IE for any define 1039 //calls in the text, then turn it back on at the end. 1040 if (hasInteractive) { 1041 useInteractive = false; 1042 } 1043 1044 //Prime the system by creating a module instance for 1045 //it. 1046 getModule(moduleMap); 1047 1048 //Transfer any config to this other module. 1049 if (hasProp(config.config, id)) { 1050 config.config[moduleName] = config.config[id]; 1051 } 1052 1053 try { 1054 req.exec(text); 1055 } catch (e) { 1056 return onError(makeError('fromtexteval', 1057 'fromText eval for ' + id + 1058 ' failed: ' + e, 1059 e, 1060 [id])); 1061 } 1062 1063 if (hasInteractive) { 1064 useInteractive = true; 1065 } 1066 1067 //Mark this as a dependency for the plugin 1068 //resource 1069 this.depMaps.push(moduleMap); 1070 1071 //Support anonymous modules. 1072 context.completeLoad(moduleName); 1073 1074 //Bind the value of that module to the value for this 1075 //resource ID. 1076 localRequire([moduleName], load); 1077 }); 1078 1079 //Use parentName here since the plugin's name is not reliable, 1080 //could be some weird string with no path that actually wants to 1081 //reference the parentName's path. 1082 plugin.load(map.name, localRequire, load, config); 1083 })); 1084 1085 context.enable(pluginMap, this); 1086 this.pluginMaps[pluginMap.id] = pluginMap; 1087 }, 1088 1089 enable: function () { 1090 enabledRegistry[this.map.id] = this; 1091 this.enabled = true; 1092 1093 //Set flag mentioning that the module is enabling, 1094 //so that immediate calls to the defined callbacks 1095 //for dependencies do not trigger inadvertent load 1096 //with the depCount still being zero. 1097 this.enabling = true; 1098 1099 //Enable each dependency 1100 each(this.depMaps, bind(this, function (depMap, i) { 1101 var id, mod, handler; 1102 1103 if (typeof depMap === 'string') { 1104 //Dependency needs to be converted to a depMap 1105 //and wired up to this module. 1106 depMap = makeModuleMap(depMap, 1107 (this.map.isDefine ? this.map : this.map.parentMap), 1108 false, 1109 !this.skipMap); 1110 this.depMaps[i] = depMap; 1111 1112 handler = getOwn(handlers, depMap.id); 1113 1114 if (handler) { 1115 this.depExports[i] = handler(this); 1116 return; 1117 } 1118 1119 this.depCount += 1; 1120 1121 on(depMap, 'defined', bind(this, function (depExports) { 1122
1122this.defineDep(i, depExports); 1123 this.check(); 1124 })); 1125 1126 if (this.errback) { 1127 on(depMap, 'error', bind(this, this.errback)); 1128 } 1129 } 1130 1131 id = depMap.id; 1132 mod = registry[id]; 1133 1134 //Skip special modules like 'require', 'exports', 'module' 1135 //Also, don't call enable if it is already enabled, 1136 //important in circular dependency cases. 1137 if (!hasProp(handlers, id) && mod && !mod.enabled) { 1138 context.enable(depMap, this); 1139 } 1140 })); 1141 1142 //Enable each plugin that is used in
vendor: 35,500 bytes, lines 1143-2014
1143 //a dependency 1144 eachProp(this.pluginMaps, bind(this, function (pluginMap) { 1145 var mod = getOwn(registry, pluginMap.id); 1146 if (mod && !mod.enabled) { 1147 context.enable(pluginMap, this); 1148 } 1149 })); 1150 1151 this.enabling = false; 1152 1153 this.check(); 1154 }, 1155 1156 on: function (name, cb) { 1157 var cbs = this.events[name]; 1158 if (!cbs) { 1159 cbs = this.events[name] = []; 1160 } 1161 cbs.push(cb); 1162 }, 1163 1164 emit: function (name, evt) { 1165 each(this.events[name], function (cb) { 1166 cb(evt); 1167 }); 1168 if (name === 'error') { 1169 //Now that the error handler was triggered, remove 1170 //the listeners, since this broken Module instance 1171 //can stay around for a while in the registry. 1172 delete this.events[name]; 1173 } 1174 } 1175 }; 1176 1177 function callGetModule(args) { 1178 //Skip modules already defined. 1179 if (!hasProp(defined, args[0])) { 1180 getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); 1181 } 1182 } 1183 1184 function removeListener(node, func, name, ieName) { 1185 //Favor detachEvent because of IE9 1186 //issue, see attachEvent/addEventListener comment elsewhere 1187 //in this file. 1188 if (node.detachEvent && !isOpera) { 1189 //Probably IE. If not it will throw an error, which will be 1190 //useful to know. 1191 if (ieName) { 1192 node.detachEvent(ieName, func); 1193 } 1194 } else { 1195 node.removeEventListener(name, func, false); 1196 } 1197 } 1198 1199 /** 1200 * Given an event from a script node, get the requirejs info from it, 1201 * and then removes the event listeners on the node. 1202 * @param {Event} evt 1203 * @returns {Object} 1204 */ 1205 function getScriptData(evt) { 1206 //Using currentTarget instead of target for Firefox 2.0's sake. Not 1207 //all old browsers will be supported, but this one was easy enough 1208 //to support and still makes sense. 1209 var node = evt.currentTarget || evt.srcElement; 1210 1211 //Remove the listeners once here. 1212 removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); 1213 removeListener(node, context.onScriptError, 'error'); 1214 1215 return { 1216 node: node, 1217 id: node && node.getAttribute('data-requiremodule') 1218 }; 1219 } 1220 1221 function intakeDefines() { 1222 var args; 1223 1224 //Any defined modules in the global queue, intake them now. 1225 takeGlobalQueue(); 1226 1227 //Make sure any remaining defQueue items get properly processed. 1228 while (defQueue.length) { 1229 args = defQueue.shift(); 1230 if (args[0] === null) { 1231 return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); 1232 } else { 1233 //args are id, deps, factory. Should be normalized by the 1234 //define() function. 1235 callGetModule(args); 1236 } 1237 } 1238 } 1239 1240 context = { 1241 config: config, 1242 contextName: contextName, 1243 registry: registry, 1244 defined: defined, 1245 urlFetched: urlFetched, 1246 defQueue: defQueue, 1247 Module: Module, 1248 makeModuleMap: makeModuleMap, 1249 nextTick: req.nextTick, 1250 onError: onError, 1251 1252 /** 1253 * Set a configuration for the context. 1254 * @param {Object} cfg config object to integrate. 1255 */ 1256 configure: function (cfg) { 1257 //Make sure the baseUrl ends in a slash. 1258 if (cfg.baseUrl) { 1259 if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { 1260 cfg.baseUrl += '/'; 1261 } 1262 } 1263 1264 //Save off the paths since they require special processing, 1265 //they are additive. 1266 var shim = config.shim, 1267 objs = { 1268 paths: true, 1269 bundles: true, 1270 config: true, 1271 map: true 1272 }; 1273 1274 eachProp(cfg, function (value, prop) { 1275 if (objs[prop]) { 1276 if (!config[prop]) { 1277 config[prop] = {}; 1278 } 1279 mixin(config[prop], value, true, true); 1280 } else { 1281 config[prop] = value; 1282 } 1283 }); 1284 1285 //Reverse map the bundles 1286 if (cfg.bundles) { 1287 eachProp(cfg.bundles, function (value, prop) { 1288 each(value, function (v) { 1289 if (v !== prop) { 1290 bundlesMap[v] = prop; 1291 } 1292 }); 1293 }); 1294 } 1295 1296 //Merge shim 1297 if (cfg.shim) { 1298 eachProp(cfg.shim, function (value, id) { 1299 //Normalize the structure 1300 if (isArray(value)) { 1301 value = { 1302 deps: value 1303 }; 1304 } 1305 if ((value.exports || value.init) && !value.exportsFn) { 1306 value.exportsFn = context.makeShimExports(value); 1307 } 1308 shim[id] = value; 1309 }); 1310 config.shim = shim; 1311 } 1312 1313 //Adjust packages if necessary. 1314 if (cfg.packages) { 1315 each(cfg.packages, function (pkgObj) { 1316 var location, name; 1317 1318 pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; 1319 1320 name = pkgObj.name; 1321 location = pkgObj.location; 1322 if (location) { 1323 config.paths[name] = pkgObj.location; 1324 } 1325 1326 //Save pointer to main module ID for pkg name. 1327 //Remove leading dot in main, so main paths are normalized, 1328 //and remove any trailing .js, since different package 1329 //envs have different conventions: some use a module name, 1330 //some use a file name. 1331 config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main') 1332 .replace(currDirRegExp, '') 1333 .replace(jsSuffixRegExp, ''); 1334 }); 1335 } 1336 1337 //If there are any "waiting to execute" modules in the registry, 1338 //update the maps for them, since their info, like URLs to load, 1339 //may have changed. 1340 eachProp(registry, function (mod, id) { 1341 //If module already has init called, since it is too 1342 //late to modify them, and ignore unnormalized ones 1343 //since they are transient. 1344 if (!mod.inited && !mod.map.unnormalized) { 1345 mod.map = makeModuleMap(id); 1346 } 1347 }); 1348 1349 //If a deps array or a config callback is specified, then call 1350 //require with those args. This is useful when require is defined as a 1351 //config object before require.js is loaded. 1352 if (cfg.deps || cfg.callback) { 1353 context.require(cfg.deps || [], cfg.callback); 1354 } 1355 }, 1356 1357 makeShimExports: function (value) { 1358 function fn() { 1359 var ret; 1360 if (value.init) { 1361 ret = value.init.apply(global, arguments); 1362 } 1363 return ret || (value.exports && getGlobal(value.exports)); 1364 } 1365 return fn; 1366 }, 1367 1368 makeRequire: function (relMap, options) { 1369 options = options || {}; 1370 1371 function localRequire(deps, callback, errback) { 1372 var id, map, requireMod; 1373 1374 if (options.enableBuildCallback && callback && isFunction(callback)) { 1375 callback.__requireJsBuild = true; 1376 } 1377 1378 if (typeof deps === 'string') { 1379 if (isFunction(callback)) { 1380 //Invalid call 1381 return onError(makeError('requireargs', 'Invalid require call'), errback); 1382 } 1383 1384 //If require|exports|module are requested, get the 1385 //value for them from the special handlers. Caveat: 1386 //this only works while module is being defined. 1387 if (relMap && hasProp(handlers, deps)) { 1388 return handlers[deps](registry[relMap.id]); 1389 } 1390 1391 //Synchronous access to one module. If require.get is 1392 //available (as in the Node adapter), prefer that. 1393 if (req.get) { 1394 return req.get(context, deps, relMap, localRequire); 1395 } 1396 1397 //Normalize module name, if it contains . or .. 1398 map = makeModuleMap(deps, relMap, false, true); 1399 id = map.id; 1400 1401 if (!hasProp(defined, id)) { 1402 return onError(makeError('notloaded', 'Module name "' + 1403 id + 1404 '" has not been loaded yet for context: ' + 1405 contextName + 1406 (relMap ? '' : '. Use require([])'))); 1407 } 1408 return defined[id]; 1409 } 1410 1411 //Grab defines waiting in the global queue. 1412 intakeDefines(); 1413 1414 //Mark all the dependencies as needing to be loaded. 1415 context.nextTick(function () { 1416 //Some defines could have been added since the 1417 //require call, collect them. 1418 intakeDefines(); 1419 1420 requireMod = getModule(makeModuleMap(null, relMap)); 1421 1422 //Store if map config should be applied to this require 1423 //call for dependencies. 1424 requireMod.skipMap = options.skipMap; 1425 1426 requireMod.init(deps, callback, errback, { 1427 enabled: true 1428 }); 1429 1430 checkLoaded(); 1431 }); 1432 1433 return localRequire; 1434 } 1435 1436 mixin(localRequire, { 1437 isBrowser: isBrowser, 1438 1439 /** 1440 * Converts a module name + .extension into an URL path. 1441 * *Requires* the use of a module name. It does not support using 1442 * plain URLs like nameToUrl. 1443 */ 1444 toUrl: function (moduleNamePlusExt) { 1445 var ext, 1446 index = moduleNamePlusExt.lastIndexOf('.'), 1447 segment = moduleNamePlusExt.split('/')[0], 1448 isRelative = segment === '.' || segment === '..'; 1449 1450 //Have a file extension alias, and it is not the 1451 //dots from a relative path. 1452 if (index !== -1 && (!isRelative || index > 1)) { 1453 ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); 1454 moduleNamePlusExt = moduleNamePlusExt.substring(0, index); 1455 } 1456 1457 return context.nameToUrl(normalize(moduleNamePlusExt, 1458 relMap && relMap.id, true), ext, true); 1459 }, 1460 1461 defined: function (id) { 1462 return hasProp(defined, makeModuleMap(id, relMap, false, true).id); 1463 }, 1464 1465 specified: function (id) { 1466 id = makeModuleMap(id, relMap, false, true).id; 1467 return hasProp(defined, id) || hasProp(registry, id); 1468 } 1469 }); 1470 1471 //Only allow undef on top level require calls 1472 if (!relMap) { 1473 localRequire.undef = function (id) { 1474 //Bind any waiting define() calls to this context, 1475 //fix for #408 1476 takeGlobalQueue(); 1477 1478 var map = makeModuleMap(id, relMap, true), 1479 mod = getOwn(registry, id); 1480 1481 removeScript(id); 1482 1483 delete defined[id]; 1484 delete urlFetched[map.url]; 1485 delete undefEvents[id]; 1486 1487 //Clean queued defines too. Go backwards 1488 //in array so that the splices do not 1489 //mess up the iteration. 1490 eachReverse(defQueue, function(args, i) { 1491 if(args[0] === id) { 1492 defQueue.splice(i, 1); 1493 } 1494 }); 1495 1496 if (mod) { 1497 //Hold on to listeners in case the 1498 //module will be attempted to be reloaded 1499 //using a different config. 1500 if (mod.events.defined) { 1501 undefEvents[id] = mod.events; 1502 } 1503 1504 cleanRegistry(id); 1505 } 1506 }; 1507 } 1508 1509 return localRequire; 1510 }, 1511 1512 /** 1513 * Called to enable a module if it is still in the registry 1514 * awaiting enablement. A second arg, parent, the parent module, 1515 * is passed in for context, when this method is overridden by 1516 * the optimizer. Not shown here to keep code compact. 1517 */ 1518 enable: function (depMap) { 1519 var mod = getOwn(registry, depMap.id); 1520 if (mod) { 1521 getModule(depMap).enable(); 1522 } 1523 }, 1524 1525 /** 1526 * Internal method used by environment adapters to complete a load event. 1527 * A load event could be a script load or just a load pass from a synchronous 1528 * load call. 1529 * @param {String} moduleName the name of the module to potentially complete. 1530 */ 1531 completeLoad: function (moduleName) { 1532 var found, args, mod, 1533 shim = getOwn(config.shim, moduleName) || {}, 1534 shExports = shim.exports; 1535 1536 takeGlobalQueue(); 1537 1538 while (defQueue.length) { 1539 args = defQueue.shift(); 1540 if (args[0] === null) { 1541 args[0] = moduleName; 1542 //If already found an anonymous module and bound it 1543 //to this name, then this is some other anon module 1544 //waiting for its completeLoad to fire. 1545 if (found) { 1546 break; 1547 } 1548 found = true; 1549 } else if (args[0] === moduleName) { 1550 //Found matching define call for this script! 1551 found = true; 1552 } 1553 1554 callGetModule(args); 1555 } 1556 1557 //Do this after the cycle of callGetModule in case the result 1558 //of those calls/init calls changes the registry. 1559 mod = getOwn(registry, moduleName); 1560 1561 if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { 1562 if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { 1563 if (hasPathFallback(moduleName)) { 1564 return; 1565 } else { 1566 return onError(makeError('nodefine', 1567 'No define call for ' + moduleName, 1568 null, 1569 [moduleName])); 1570 } 1571 } else { 1572 //A script that does not call define(), so just simulate 1573 //the call for it. 1574 callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); 1575 } 1576 } 1577 1578 checkLoaded(); 1579 }, 1580 1581 /** 1582 * Converts a module name to a file path. Supports cases where 1583 * moduleName may actually be just an URL. 1584 * Note that it **does not** call normalize on the moduleName, 1585 * it is assumed to have already been normalized. This is an 1586 * internal API, not a public one. Use toUrl for the public API. 1587 */ 1588 nameToUrl: function (moduleName, ext, skipExt) { 1589 var paths, syms, i, parentModule, url, 1590 parentPath, bundleId, 1591 pkgMain = getOwn(config.pkgs, moduleName); 1592 1593 if (pkgMain) { 1594 moduleName = pkgMain; 1595 } 1596 1597 bundleId = getOwn(bundlesMap, moduleName); 1598 1599 if (bundleId) { 1600 return context.nameToUrl(bundleId, ext, skipExt); 1601 } 1602 1603 //If a colon is in the URL, it indicates a protocol is used and it is just 1604 //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) 1605 //or ends with .js, then assume the user meant to use an url and not a module id. 1606 //The slash is important for protocol-less URLs as well as full paths. 1607 if (req.jsExtRegExp.test(moduleName)) { 1608 //Just a plain path, not module name lookup, so just return it. 1609 //Add extension if it is included. This is a bit wonky, only non-.js things pass 1610 //an extension, this method probably needs to be reworked. 1611 url = moduleName + (ext || ''); 1612 } else { 1613 //A module that needs to be converted to a path. 1614 paths = config.paths; 1615 1616 syms = moduleName.split('/'); 1617 //For each module name segment, see if there is a path 1618 //registered for it. Start with most specific name 1619 //and work up from it. 1620 for (i = syms.length; i > 0; i -= 1) { 1621 parentModule = syms.slice(0, i).join('/'); 1622 1623 parentPath = getOwn(paths, parentModule); 1624 if (parentPath) { 1625 //If an array, it means there are a few choices, 1626 //Choose the one that is desired 1627 if (isArray(parentPath)) { 1628 parentPath = parentPath[0]; 1629 } 1630 syms.splice(0, i, parentPath); 1631 break; 1632 } 1633 } 1634 1635 //Join the path parts together, then figure out if baseUrl is needed. 1636 url = syms.join('/'); 1637 url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js')); 1638 url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; 1639 } 1640 1641 return config.urlArgs ? url + 1642 ((url.indexOf('?') === -1 ? '?' : '&') + 1643 config.urlArgs) : url; 1644 }, 1645 1646 //Delegates to req.load. Broken out as a separate function to 1647 //allow overriding in the optimizer. 1648 load: function (id, url) { 1649 req.load(context, id, url); 1650 }, 1651 1652 /** 1653 * Executes a module callback function. Broken out as a separate function 1654 * solely to allow the build system to sequence the files in the built 1655 * layer in the right sequence. 1656 * 1657 * @private 1658 */ 1659 execCb: function (name, callback, args, exports) { 1660 return callback.apply(exports, args); 1661 }, 1662 1663 /** 1664 * callback for script loads, used to check status of loading. 1665 * 1666 * @param {Event} evt the event from the browser for the script 1667 * that was loaded. 1668 */ 1669 onScriptLoad: function (evt) { 1670 //Using currentTarget instead of target for Firefox 2.0's sake. Not 1671 //all old browsers will be supported, but this one was easy enough 1672 //to support and still makes sense. 1673 if (evt.type === 'load' || 1674 (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { 1675 //Reset interactive script so a script node is not held onto for 1676 //to long. 1677 interactiveScript = null; 1678 1679 //Pull out the name of the module and the context. 1680 var data = getScriptData(evt); 1681 context.completeLoad(data.id); 1682 } 1683 }, 1684 1685 /** 1686 * Callback for script errors. 1687 */ 1688 onScriptError: function (evt) { 1689 var data = getScriptData(evt); 1690 if (!hasPathFallback(data.id)) { 1691 return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id])); 1692 } 1693 } 1694 }; 1695 1696 context.require = context.makeRequire(); 1697 return context; 1698 } 1699 1700 /** 1701 * Main entry point. 1702 * 1703 * If the only argument to require is a string, then the module that 1704 * is represented by that string is fetched for the appropriate context. 1705 * 1706 * If the first argument is an array, then it will be treated as an array 1707 * of dependency string names to fetch. An optional function callback can 1708 * be specified to execute when all of those dependencies are available. 1709 * 1710 * Make a local req variable to help Caja compliance (it assumes things 1711 * on a require that are not standardized), and to give a short 1712 * name for minification/local scope use. 1713 */ 1714 req = requirejs = function (deps, callback, errback, optional) { 1715 1716 //Find the right context, use default 1717 var context, config, 1718 contextName = defContextName; 1719 1720 // Determine if have config object in the call. 1721 if (!isArray(deps) && typeof deps !== 'string') { 1722 // deps is a config object 1723 config = deps; 1724 if (isArray(callback)) { 1725 // Adjust args if there are dependencies 1726 deps = callback; 1727 callback = errback; 1728 errback = optional; 1729 } else { 1730 deps = []; 1731 } 1732 } 1733 1734 if (config && config.context) { 1735 contextName = config.context; 1736 } 1737 1738 context = getOwn(contexts, contextName); 1739 if (!context) { 1740 context = contexts[contextName] = req.s.newContext(contextName); 1741 } 1742 1743 if (config) { 1744 context.configure(config); 1745 } 1746 1747 return context.require(deps, callback, errback); 1748 }; 1749 1750 /** 1751 * Support redesign.require.config() to make it easier to cooperate with other 1752 * AMD loaders on globally agreed names. 1753 */ 1754 req.config = function (config) { 1755 return req(config); 1756 }; 1757 1758 /** 1759 * Execute something after the current tick 1760 * of the event loop. Override for other envs 1761 * that have a better solution than setTimeout. 1762 * @param {Function} fn function to execute later. 1763 */ 1764 req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { 1765 setTimeout(fn, 4); 1766 } : function (fn) { fn(); }; 1767 1768 /** 1769 * Export require as a global, but only if it does not already exist. 1770 */ 1771 if (!require) { 1772 require = req; 1773 } 1774 1775 req.version = version; 1776 1777 //Used to filter out dependencies that are already paths. 1778 req.jsExtRegExp = /^\/|:|\?|\.js$/; 1779 req.isBrowser = isBrowser; 1780 s = req.s = { 1781 contexts: contexts, 1782 newContext: newContext 1783 }; 1784 1785 //Create default context. 1786 req({}); 1787 1788 //Exports some context-sensitive methods on global require. 1789 each([ 1790 'toUrl', 1791 'undef', 1792 'defined', 1793 'specified' 1794 ], function (prop) { 1795 //Reference from contexts instead of early binding to default context, 1796 //so that during builds, the latest instance of the default context 1797 //with its config gets used. 1798 req[prop] = function () { 1799 var ctx = contexts[defContextName]; 1800 return ctx.require[prop].apply(ctx, arguments); 1801 }; 1802 }); 1803 1804 if (isBrowser) { 1805 head = s.head = document.getElementsByTagName('head')[0]; 1806 //If BASE tag is in play, using appendChild is a problem for IE6. 1807 //When that browser dies, this can be removed. Details in this jQuery bug: 1808 //http://dev.jquery.com/ticket/2709 1809 baseElement = document.getElementsByTagName('base')[0]; 1810 if (baseElement) { 1811 head = s.head = baseElement.parentNode; 1812 } 1813 } 1814 1815 /** 1816 * Any errors that require explicitly generates will be passed to this 1817 * function. Intercept/override it if you want custom error handling. 1818 * @param {Error} err the error object. 1819 */ 1820 req.onError = defaultOnError; 1821 1822 /** 1823 * Creates the node for the load command. Only used in browser envs. 1824 */ 1825 req.createNode = function (config, moduleName, url) { 1826 var node = config.xhtml ? 1827 document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : 1828 document.createElement('script'); 1829 node.type = config.scriptType || 'text/javascript'; 1830 node.charset = 'utf-8'; 1831 node.async = true; 1832 return node; 1833 }; 1834 1835 /** 1836 * Does the request to load a module for the browser case. 1837 * Make this a separate function to allow other environments 1838 * to override it. 1839 * 1840 * @param {Object} context the require context to find state. 1841 * @param {String} moduleName the name of the module. 1842 * @param {Object} url the URL to the module. 1843 */ 1844 req.load = function (context, moduleName, url) { 1845 var config = (context && context.config) || {}, 1846 node; 1847 if (isBrowser) { 1848 //In the browser so use a script tag 1849 node = req.createNode(config, moduleName, url); 1850 1851 node.setAttribute('data-requirecontext', context.contextName); 1852 node.setAttribute('data-requiremodule', moduleName); 1853 1854 //Set up load listener. Test attachEvent first because IE9 has 1855 //a subtle issue in its addEventListener and script onload firings 1856 //that do not match the behavior of all other browsers with 1857 //addEventListener support, which fire the onload event for a 1858 //script right after the script execution. See: 1859 //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution 1860 //UNFORTUNATELY Opera implements attachEvent but does not follow the script 1861 //script execution mode. 1862 if (node.attachEvent && 1863 //Check if node.attachEvent is artificially added by custom script or 1864 //natively supported by browser 1865 //read https://github.com/jrburke/requirejs/issues/187 1866 //if we can NOT find [native code] then it must NOT natively supported. 1867 //in IE8, node.attachEvent does not have toString() 1868 //Note the test for "[native code" with no closing brace, see: 1869 //https://github.com/jrburke/requirejs/issues/273 1870 !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && 1871 !isOpera) { 1872 //Probably IE. IE (at least 6-8) do not fire 1873 //script onload right after executing the script, so 1874 //we cannot tie the anonymous define call to a name. 1875 //However, IE reports the script as being in 'interactive' 1876 //readyState at the time of the define call. 1877 useInteractive = true; 1878 1879 node.attachEvent('onreadystatechange', context.onScriptLoad); 1880 //It would be great to add an error handler here to catch 1881 //404s in IE9+. However, onreadystatechange will fire before 1882 //the error handler, so that does not help. If addEventListener 1883 //is used, then IE will fire error before load, but we cannot 1884 //use that pathway given the connect.microsoft.com issue 1885 //mentioned above about not doing the 'script execute, 1886 //then fire the script load event listener before execute 1887 //next script' that other browsers do. 1888 //Best hope: IE10 fixes the issues, 1889 //and then destroys all installs of IE 6-9. 1890 //node.attachEvent('onerror', context.onScriptError); 1891 } else { 1892 node.addEventListener('load', context.onScriptLoad, false); 1893 node.addEventListener('error', context.onScriptError, false); 1894 } 1895 node.src = url; 1896 1897 //For some cache cases in IE 6-8, the script executes before the end 1898 //of the appendChild execution, so to tie an anonymous define 1899 //call to the module name (which is stored on the node), hold on 1900 //to a reference to this node, but clear after the DOM insertion. 1901 currentlyAddingScript = node; 1902 if (baseElement) { 1903 head.insertBefore(node, baseElement); 1904 } else { 1905 head.appendChild(node); 1906 } 1907 currentlyAddingScript = null; 1908 1909 return node; 1910 } else if (isWebWorker) { 1911 try { 1912 //In a web worker, use importScripts. This is not a very 1913 //efficient use of importScripts, importScripts will block until 1914 //its script is downloaded and evaluated. However, if web workers 1915 //are in play, the expectation that a build has been done so that 1916 //only one script needs to be loaded anyway. This may need to be 1917 //reevaluated if other use cases become common. 1918 importScripts(url); 1919 1920 //Account for anonymous modules 1921 context.completeLoad(moduleName); 1922 } catch (e) { 1923 context.onError(makeError('importscripts', 1924 'importScripts failed for ' + 1925 moduleName + ' at ' + url, 1926 e, 1927 [moduleName])); 1928 } 1929 } 1930 }; 1931 1932 function getInteractiveScript() { 1933 if (interactiveScript && interactiveScript.readyState === 'interactive') { 1934 return interactiveScript; 1935 } 1936 1937 eachReverse(scripts(), function (script) { 1938 if (script.readyState === 'interactive') { 1939 return (interactiveScript = script); 1940 } 1941 }); 1942 return interactiveScript; 1943 } 1944 1945 //Look for a data-main script attribute, which could also adjust the baseUrl. 1946 if (isBrowser && !cfg.skipDataMain) { 1947 //Figure out baseUrl. Get it from the script tag with require.js in it. 1948 eachReverse(scripts(), function (script) { 1949 //Set the 'head' where we can append children by 1950 //using the script's parent. 1951 if (!head) { 1952 head = script.parentNode; 1953 } 1954 1955 //Look for a data-main attribute to set main script for the page 1956 //to load. If it is there, the path to data main becomes the 1957 //baseUrl, if it is not already set. 1958 dataMain = script.getAttribute('data-main'); 1959 if (dataMain) { 1960 //Preserve dataMain in case it is a path (i.e. contains '?') 1961 mainScript = dataMain; 1962 1963 //Set final baseUrl if there is not already an explicit one. 1964 if (!cfg.baseUrl) { 1965 //Pull off the directory of data-main for use as the 1966 //baseUrl. 1967 src = mainScript.split('/'); 1968 mainScript = src.pop(); 1969 subPath = src.length ? src.join('/') + '/' : './'; 1970 1971 cfg.baseUrl = subPath; 1972 } 1973 1974 //Strip off any trailing .js since mainScript is now 1975 //like a module name. 1976 mainScript = mainScript.replace(jsSuffixRegExp, ''); 1977 1978 //If mainScript is still a path, fall back to dataMain 1979 if (req.jsExtRegExp.test(mainScript)) { 1980 mainScript = dataMain; 1981 } 1982 1983 //Put the data-main script in the files to load. 1984 cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; 1985 1986 return true; 1987 } 1988 }); 1989 } 1990 1991 /** 1992 * The function that handles definitions of modules. Differs from 1993 * require() in that a string for the module should be the first argument, 1994 * and the function to execute after dependencies are loaded should 1995 * return a value to define the module corresponding to the first argument's 1996 * name. 1997 */ 1998 define = function (name, deps, callback) { 1999 var node, context; 2000 2001 //Allow for anonymous modules 2002 if (typeof name !== 'string') { 2003 //Adjust args appropriately 2004 callback = deps; 2005 deps = name; 2006 name = null; 2007 } 2008 2009 //This module may not have dependencies 2010 if (!isArray(deps)) { 2011 callback = deps; 2012 deps = null; 2013 } 2014
2015 //If no name, and callback is a function, then figure out if it a 2016 //CommonJS thing with dependencies. 2017 if (!deps && isFunction(callback)) { 2018 deps = []; 2019 //Remove comments from the callback string, 2020 //look for require calls, and pull them into the dependencies, 2021 //but only if there are function args. 2022 if (callback.length) { 2023 callback 2024 .toString() 2025 .replace(commentRegExp, '') 2026 .replace(cjsRequireRegExp, function (match, dep) { 2027 deps.push(dep); 2028 }); 2029 2030 //May be a CommonJS thing even without require calls, but still 2031 //could use exports, and module. Avoid doing exports and module 2032 //work though if it just needs require. 2033 //REQUIRES the function to expect the CommonJS variables in the 2034 //order listed below. 2035 deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); 2036 } 2037 } 2038 2039 //If in IE 6-8 and hit an anonymous define() call, do the interactive 2040 //work. 2041 if (useInteractive) { 2042 node = currentlyAddingScript || getInteractiveScript(); 2043 if (node) { 2044 if (!name) { 2045 name = node.getAttribute('data-requiremodule'); 2046 } 2047 context = contexts[node.getAttribute('data-requirecontext')]; 2048 } 2049 } 2050 2051 //Always save off evaluating the def call until the script onload handler. 2052 //This allows multiple modules to be in a file without prematurely 2053 //tracing dependencies, and allows for anonymous module support, 2054 //where the module name is not known until the script onload event 2055 //occurs. If no context, use the global queue, and get it processed 2056 //in the onscript load callback. 2057 (context ? context.defQueue : globalDefQueue).push([name, deps, callback]); 2058 }; 2059 2060 define.amd = { 2061 jQuery: true 2062 }; 2063 2064 2065 /** 2066 * Executes the text. Normally just uses eval, but can be modified 2067 * to use a better, environment-specific call. Only used for transpiling 2068 * loader plugins, not for plain JS modules. 2069 * @param {String} text the text to execute/evaluate. 2070 */ 2071 req.exec = function (text) { 2072 /*jslint evil: true */ 2073 return eval(text); 2074 }; 2075 2076 //Set up with config info. 2077 req(cfg); 2078}(this)); 2079redesign.requirejs = requirejs;redesign.require = require;redesign.define = define; 2080} 2081}()); 2082redesign.define("requireLib", function(){}); 2083 2084(function (global, factory) { 2085 typeof exports === 'object' && typeof module !== 'undefined' ? factory() : 2086 typeof redesign.define === 'function' && redesign.define.amd ? redesign.define('promise',factory) : 2087 (factory()); 2088}(this, (function () { 'use strict'; 2089 2090/** 2091 * @this {Promise} 2092 */ 2093function finallyConstructor(callback) { 2094 var constructor = this.constructor; 2095 return this.then( 2096 function(value) { 2097 // @ts-ignore 2098 return constructor.resolve(callback()).then(function() { 2099 return value; 2100 }); 2101 }, 2102 function(reason) { 2103 // @ts-ignore 2104 return constructor.resolve(callback()).then(function() { 2105 // @ts-ignore 2106 return constructor.reject(reason); 2107 }); 2108 } 2109 ); 2110} 2111 2112function allSettled(arr) { 2113 var P = this; 2114 return new P(function(resolve, reject) { 2115 if (!(arr && typeof arr.length !== 'undefined')) { 2116 return reject( 2117 new TypeError( 2118 typeof arr + 2119 ' ' + 2120 arr + 2121 ' is not iterable(cannot read property Symbol(Symbol.iterator))' 2122 ) 2123 ); 2124 } 2125 var args = Array.prototype.slice.call(arr); 2126 if (args.length === 0) return resolve([]); 2127 var remaining = args.length; 2128 2129 function res(i, val) { 2130 if (val && (typeof val === 'object' || typeof val === 'function')) { 2131 var then = val.then; 2132 if (typeof then === 'function') { 2133 then.call( 2134 val, 2135 function(val) { 2136 res(i, val); 2137 }, 2138 function(e) { 2139 args[i] = { status: 'rejected', reason: e }; 2140 if (--remaining === 0) { 2141 resolve(args); 2142 } 2143 } 2144 ); 2145 return; 2146 } 2147 } 2148 args[i] = { status: 'fulfilled', value: val }; 2149 if (--remaining === 0) { 2150 resolve(args); 2151 } 2152 } 2153 2154 for (var i = 0; i < args.length; i++) { 2155 res(i, args[i]); 2156 } 2157 }); 2158} 2159 2160// Store setTimeout reference so promise-polyfill will be unaffected by 2161// other code modifying setTimeout (like sinon.useFakeTimers())
vendor: 4,683 bytes, lines 2162-2364
2162var setTimeoutFunc = setTimeout; 2163 2164function isArray(x) { 2165 return Boolean(x && typeof x.length !== 'undefined'); 2166} 2167 2168function noop() {} 2169 2170// Polyfill for Function.prototype.bind 2171function bind(fn, thisArg) { 2172 return function() { 2173 fn.apply(thisArg, arguments); 2174 }; 2175} 2176 2177/** 2178 * @constructor 2179 * @param {Function} fn 2180 */ 2181function Promise(fn) { 2182 if (!(this instanceof Promise)) 2183 throw new TypeError('Promises must be constructed via new'); 2184 if (typeof fn !== 'function') throw new TypeError('not a function'); 2185 /** @type {!number} */ 2186 this._state = 0; 2187 /** @type {!boolean} */ 2188 this._handled = false; 2189 /** @type {Promise|undefined} */ 2190 this._value = undefined; 2191 /** @type {!Array<!Function>} */ 2192 this._deferreds = []; 2193 2194 doResolve(fn, this); 2195} 2196 2197function handle(self, deferred) { 2198 while (self._state === 3) { 2199 self = self._value; 2200 } 2201 if (self._state === 0) { 2202 self._deferreds.push(deferred); 2203 return; 2204 } 2205 self._handled = true; 2206 Promise._immediateFn(function() { 2207 var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected; 2208 if (cb === null) { 2209 (self._state === 1 ? resolve : reject)(deferred.promise, self._value); 2210 return; 2211 } 2212 var ret; 2213 try { 2214 ret = cb(self._value); 2215 } catch (e) { 2216 reject(deferred.promise, e); 2217 return; 2218 } 2219 resolve(deferred.promise, ret); 2220 }); 2221} 2222 2223function resolve(self, newValue) { 2224 try { 2225 // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure 2226 if (newValue === self) 2227 throw new TypeError('A promise cannot be resolved with itself.'); 2228 if ( 2229 newValue && 2230 (typeof newValue === 'object' || typeof newValue === 'function') 2231 ) { 2232 var then = newValue.then; 2233 if (newValue instanceof Promise) { 2234 self._state = 3; 2235 self._value = newValue; 2236 finale(self); 2237 return; 2238 } else if (typeof then === 'function') { 2239 doResolve(bind(then, newValue), self); 2240 return; 2241 } 2242 } 2243 self._state = 1; 2244 self._value = newValue; 2245 finale(self); 2246 } catch (e) { 2247 reject(self, e); 2248 } 2249} 2250 2251function reject(self, newValue) { 2252 self._state = 2; 2253 self._value = newValue; 2254 finale(self); 2255} 2256 2257function finale(self) { 2258 if (self._state === 2 && self._deferreds.length === 0) { 2259 Promise._immediateFn(function() { 2260 if (!self._handled) { 2261 Promise._unhandledRejectionFn(self._value); 2262 } 2263 }); 2264 } 2265 2266 for (var i = 0, len = self._deferreds.length; i < len; i++) { 2267 handle(self, self._deferreds[i]); 2268 } 2269 self._deferreds = null; 2270} 2271 2272/** 2273 * @constructor 2274 */ 2275function Handler(onFulfilled, onRejected, promise) { 2276 this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null; 2277 this.onRejected = typeof onRejected === 'function' ? onRejected : null; 2278 this.promise = promise; 2279} 2280 2281/** 2282 * Take a potentially misbehaving resolver function and make sure 2283 * onFulfilled and onRejected are only called once. 2284 * 2285 * Makes no guarantees about asynchrony. 2286 */ 2287function doResolve(fn, self) { 2288 var done = false; 2289 try { 2290 fn( 2291 function(value) { 2292 if (done) return; 2293 done = true; 2294 resolve(self, value); 2295 }, 2296 function(reason) { 2297 if (done) return; 2298 done = true; 2299 reject(self, reason); 2300 } 2301 ); 2302 } catch (ex) { 2303 if (done) return; 2304 done = true; 2305 reject(self, ex); 2306 } 2307} 2308 2309Promise.prototype['catch'] = function(onRejected) { 2310 return this.then(null, onRejected); 2311}; 2312 2313Promise.prototype.then = function(onFulfilled, onRejected) { 2314 // @ts-ignore 2315 var prom = new this.constructor(noop); 2316 2317 handle(this, new Handler(onFulfilled, onRejected, prom)); 2318 return prom; 2319}; 2320 2321Promise.prototype['finally'] = finallyConstructor; 2322 2323Promise.all = function(arr) { 2324 return new Promise(function(resolve, reject) { 2325 if (!isArray(arr)) { 2326 return reject(new TypeError('Promise.all accepts an array')); 2327 } 2328 2329 var args = Array.prototype.slice.call(arr); 2330 if (args.length === 0) return resolve([]); 2331 var remaining = args.length; 2332 2333 function res(i, val) { 2334 try { 2335 if (val && (typeof val === 'object' || typeof val === 'function')) { 2336 var then = val.then; 2337 if (typeof then === 'function') { 2338 then.call( 2339 val, 2340 function(val) { 2341 res(i, val); 2342 }, 2343 reject 2344 ); 2345 return; 2346 } 2347 } 2348 args[i] = val; 2349 if (--remaining === 0) { 2350 resolve(args); 2351 } 2352 } catch (ex) { 2353 reject(ex); 2354 } 2355 } 2356 2357 for (var i = 0; i < args.length; i++) { 2358 res(i, args[i]); 2359 } 2360 }); 2361}; 2362 2363Promise.allSettled = allSettled; 2364
2365Promise.resolve = function(value) { 2366 if (value && typeof value === 'object' && value.constructor === Promise) { 2367 return value; 2368 } 2369 2370 return new Promise(function(resolve) { 2371 resolve(value); 2372 }); 2373}; 2374 2375Promise.reject = function(value) { 2376 return new Promise(function(resolve, reject) { 2377 reject(value); 2378 }); 2379}; 2380 2381Promise.race = function(arr) { 2382 return new Promise(function(resolve, reject) { 2383 if (!isArray(arr)) { 2384 return reject(new TypeError('Promise.race accepts an array')); 2385 } 2386 2387 for (var i = 0, len = arr.length; i < len; i++) { 2388 Promise.resolve(arr[i]).then(resolve, reject); 2389 } 2390 }); 2391}; 2392 2393// Use polyfill for setImmediate for performance gains 2394Promise._immediateFn = 2395 // @ts-ignore 2396 (typeof setImmediate === 'function' && 2397 function(fn) { 2398 // @ts-ignore 2399 setImmediate(fn); 2400 }) || 2401 function(fn) { 2402 setTimeoutFunc(fn, 0); 2403 }; 2404 2405Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) { 2406 if (typeof console !== 'undefined' && console) { 2407 console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console 2408 } 2409}; 2410 2411/** @suppress {undefinedVars} */ 2412var globalNS = (function() { 2413 // the only reliable means to get the global object is 2414 // `Function('return this')()` 2415 // However, this causes CSP violations in Chrome apps. 2416 if (typeof self !== 'undefined') { 2417 return self; 2418 } 2419 if (typeof window !== 'undefined') { 2420 return window; 2421 } 2422 if (typeof global !== 'undefined') { 2423 return global; 2424 } 2425 throw new Error('unable to locate global object'); 2426})(); 2427 2428// Expose the polyfill if Promise is undefined or set to a 2429// non-function value. The latter can be due to a named HTMLElement 2430// being exposed by browsers for legacy reasons. 2431// https://github.com/taylorhakes/promise-polyfill/issues/114 2432if (typeof globalNS['Promise'] !== 'function') { 2433 globalNS['Promise'] = Promise; 2434} else if (!globalNS.Promise.prototype['finally']) { 2435 globalNS.Promise.prototype['finally'] = finallyConstructor; 2436} else if (!globalNS.Promise.allSettled) { 2437 globalNS.Promise.allSettled = allSettled; 2438} 2439 2440}))); 2441 2442!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):'function' === typeof redesign.define && redesign.define.amd?redesign.define('launch_darkly',["exports"],n):n((e=e||self).LDClient={})}(this,function(e){"use strict";function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),t.push.apply(t,r)}return t}function oe(o){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?n(i,!0).forEach(function(e){var n,t,r;n=o,r=i[t=e],t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):n(i).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))})}return o}function f(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n<e.length;n++)t[n]=e[n];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function t(e){function n(e,n){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e,this.code=n}return(n.prototype=new Error).name=e,n.prototype.constructor=n}var ie=t("LaunchDarklyUnexpectedResponseError"),ae=t("LaunchDarklyInvalidEnvironmentIdError"),i=t("LaunchDarklyInvalidUserError"),ue=t("LaunchDarklyInvalidEventKeyError"),g=t("LaunchDarklyInvalidArgumentError"),se=t("LaunchDarklyFlagFetchError"),ce=t("LaunchDarklyInvalidDataError");function le(e){return!(400<=e&&e<500)||400===e||408===e||429===e}for(var s=Object.freeze({__proto__:null,LDUnexpectedResponseError:ie,LDInvalidEnvironmentIdError:ae,LDInvalidUserError:i,LDInvalidEventKeyError:ue,LDInvalidArgumentError:g,LDFlagFetchError:se,LDInvalidDataError:ce,isHttpErrorRecoverable:le}),r=function(e){for(var n,t=e.length,r=t%3,o=[],i=0,a=t-r;i<a;i+=16383)o.push(d(e,i,a<i+16383?a:i+16383));return 1==r?(n=e[t-1],o.push(u[n>>2]+u[n<<4&63]+"==")):2==r&&(n=(e[t-2]<<8)+e[t-1],o.push(u[n>>10]+u[n>>4&63]+u[n<<2&63]+"=")),o.join("")},u=[],o=[],a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2442+/",c=0,l=a.length;c<l;++c)u[c]=a[c],o[a.charCodeAt(c)]=c;function d(e,n,t){for(var r,o,i=[],a=n;a<t;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(u[(o=r)>>18&63]+u[o>>12&63]+u[o>>6&63]+u[63&o]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var v=Array.isArray,p=Object.keys,m=Object.prototype.hasOwnProperty,h=["key","secondary","ip","country","email","firstName","lastName","avatar","name"];function y(e){var n=unescape(encodeURIComponent(e));return r(function(e){for(var n=[],t=0;t<e.length;t++)n.push(e.charCodeAt(t));return n}(n))}function S(e){return y(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function fe(e){return JSON.parse(JSON.stringify(e))}function de(e,n){return function e(n,t){if(n===t)return!0;if(n&&t&&"object"==typeof n&&"object"==typeof t){var r,o,i,a=v(n),u=v(t);if(a&&u){if((o=n.length)!=t.length)return!1;for(r=o;0!=r--;)if(!e(n[r],t[r]))return!1;return!0}if(a!=u)return!1;var s=n instanceof Date,c=t instanceof Date;if(s!=c)return!1;if(s&&c)return n.getTime()==t.getTime();var l=n instanceof RegExp,f=t instanceof RegExp;if(l!=f)return!1;if(l&&f)return n.toString()==t.toString();var d=p(n);if((o=d.length)!==p(t).length)return!1;for(r=o;0!=r--;)if(!m.call(t,d[r]))return!1;for(r=o;0!=r--;)if(!e(n[i=d[r]],t[i]))return!1;return!0}return n!=n&&t!=t}(e,n)}function ve(e){setTimeout(e,0)}function ge(e,n){var t=e.then(function(e){return n&&setTimeout(function(){n(null,e)},0),e},function(e){if(!n)return Promise.reject(e);setTimeout(function(){n(e,null)},0)});return n?void 0:t}function w(e){var n={};for(var t in e)he(e,t)&&(n[t]={value:e[t],version:0});return n}function pe(e){var n={};for(var t in e)he(e,t)&&(n[t]=e[t].value);return n}function b(e,n){for(var t,r=n.slice(0),o=[],i=e;0<r.length;){for(t=[];0<i;){var a=r.shift();if(!a)break;(i-=S(JSON.stringify(a)).length)<0&&0<t.length?r.unshift(a):t.push(a)}i=e,o.push(t)}return o}function k(e){var n=e.version||"3.5.1";return e.userAgent+"/"+n}function O(e,n){if(n&&!n.sendLDHeaders)return{};var t={"X-LaunchDarkly-User-Agent":k(e)};return n&&n.wrapperName&&(t["X-LaunchDarkly-Wrapper"]=n.wrapperVersion?n.wrapperName+"/"+n.wrapperVersion:n.wrapperName),t}function P(e,n){return n&&n.requestHeaderTransform?n.requestHeaderTransform(oe({},e)):e}function me(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.reduce(function(e,n){return oe({},e,{},n)},{})}function he(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function ye(e){if(!e)return e;var n;for(var t in h){var r=h[t],o=e[r];void 0!==o&&"string"!=typeof o&&((n=n||oe({},e))[r]=String(o))}return n||e}Object.freeze({__proto__:null,btoa:y,base64URLEncode:S,clone:fe,deepEquals:de,onNextTick:ve,wrapPromiseCallback:ge,transformValuesToVersionedValues:w,transformVersionedValuesToValues:pe,chunkUserEventsForUrl:b,getLDUserAgentString:k,getLDHeaders:O,transformHeaders:P,extend:me,objectHasOwnProperty:he,sanitizeUser:ye});for(var E,D=(E=void 0,function(e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=new Array(16);e.exports=function(){for(var e,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}}(E={exports:{}}),E.exports),U=[],j=0;j<256;++j)U[j]=(j+256).toString(16).substr(1);var I,R,T=0,L=0,N=function(e,n,t){var r=n&&t||0,o=n||[],i=(e=e||{}).node||I,a=void 0!==e.clockseq?e.clockseq:R;if(null==i||null==a){var u=D();null==i&&(i=I=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=R=16383&(u[6]<<8|u[7]))}var s=void 0!==e.msecs?e.msecs:(new Date).getTime(),c=void 0!==e.nsecs?e.nsecs:L+1,l=s-T+(c-L)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||T<s)&&void 0===e.nsecs&&(c=0),1e4<=c)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");T=s,R=a;var f=(1e4*(268435455&(s+=122192928e5))+(L=c))%4294967296;o[r++]=f>>>24&255,o[r++]=f>>>16&255,o[r++]=f>>>8&255,o[r++]=255&f;var d=s/4294967296*1e4&268435455;o[r++]=d>>>8&255,o[r++]=255&d,o[r++]=d>>>24&15|16,o[r++]=d>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var v=0;v<6;++v)o[r+v]=i[v];return n||function(e,n){var t=n||0,r=U;return[r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]]].join("")}(o)};function we(u,e,s){var t="/a/"+e+".gif",c=me({"Content-Type":"application/json"},O(u,s)),l=u.httpFallbackPing,f={sendChunk:function(e,r,o,n){var i=JSON.stringify(e),a=o?null:N();return n?function n(t){var e=o?c:me({},c,{"X-LaunchDarkly-Event-Schema":"3","X-LaunchDarkly-Payload-ID":a});return u.httpRequest("POST",r,P(e,s),i).promise.then(function(e){if(e)return 400<=e.status&&le(e.status)&&t?n(!1):function(e){var n={status:e.status},t=e.header("date");if(t){var r=Date.parse(t);r&&(n.serverTime=r)}return n}(e)}).catch(function(){return t?n(!1):Promise.reject()})}(!0).catch(function(){}):(l&&l(r+t+"?d="+S(i)),Promise.resolve())},sendEvents:function(e,n,t){if(!u.httpRequest)return Promise.resolve();var r,o=u.httpAllowsPost();r=o?[e]:b(2e3-n.length,e);for(var i=[],a=0;a<r.length;a++)i.push(f.sendChunk(r[a],n,t,o));return Promise.all(i)}};return f}function be(e){var n={},s=e.allAttributesPrivate,c=e.privateAttributeNames||[],l={key:!0,custom:!0,anonymous:!0},f={key:!0,secondary:!0,ip:!0,country:!0,email:!0,firstName:!0,lastName:!0,avatar:!0,name:!0,anonymous:!0,custom:!0};return n.filterUser=function(e){if(!e)return null;function n(o,i){return Object.keys(o).reduce(function(e,n){var t,r=e;return i(n)&&(l[t=n]||!s&&-1===a.indexOf(t)&&-1===c.indexOf(t)?r[0][n]=o[n]:r[1][n]=!0),r},[{},{}])}var a=e.privateAttributeNames||[],t=n(e,function(e){return f[e]}),r=t[0],o=t[1];if(e.custom){var i=n(e.custom,function(){return!0});r.custom=i[0],o=me({},o,i[1])}var u=Object.keys(o);return u.length&&(u.sort(),r.privateAttrs=u),r},n}function x(e){return e&&e.message?e.message:"string"==typeof e||e instanceof String?e:JSON.stringify(e)}
2442var C=" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initializing-the-client for instructions on SDK initialization.",F=function(e){return'Expected application/json content type but got "'+e+'"'},ke=function(e){return"local storage is unavailable: "+x(e)},A=function(e){return"network error"+(e?" ("+e+")":"")},Ee=function(e){return'Custom event "'+e+'" does not exist'},q=function(){return"Environment not found. Double check that you specified a valid environment/client-side ID."+C},De=function(){return"No environment/client-side ID was specified."+C},Se=function(e){return"Error fetching flag settings: "+x(e)},_=function(){return"No user specified."+C},V=function(){return"Invalid user specified."+C},Oe=function(){return"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly."+C},z=function(e,n){return n?'"'+e+'" is deprecated, please use "'+n+'"':'"'+e+'" is deprecated'},Pe=function(e,n,t){return"Received error "+e+(401===e?" (invalid SDK key)":"")+" for "+n+" - "+(le(e)?t:"giving up permanently")},J=function(){return"Cannot make HTTP requests in this environment."+C},M=function(e){return"Opening stream connection to "+e},H=function(e,n){return"Error on stream connection: "+x(e)+", will continue retrying every "+n+" milliseconds."},K=function(e){return'Ignoring unknown config option "'+e+'"'},$=function(e,n,t){return'Config option "'+e+'" should be of type '+n+", got "+t+", using default value"},B=function(e,n){return'Config option "'+e+'" should be a boolean, got '+n+", converting to boolean"},G=function(e,n,t){return'Config option "'+e+'" was set to '+n+", changing to minimum value of "+t},X=function(e){return"polling for feature flags at "+e},Ue=function(e){return'received streaming update for flag "'+e+'"'},je=function(e){return'received streaming update for flag "'+e+'" but ignored due to version check'},Ie=function(e){return'received streaming deletion for flag "'+e+'"'},Re=function(e){return'received streaming deletion for flag "'+e+'" but ignored due to version check'},Te=function(e){return'enqueueing "'+e+'" event'},Le=function(e){return"sending "+e+" events"},W=Object.freeze({__proto__:null,clientInitialized:function(){return"LaunchDarkly client initialized"},clientNotReady:function(){return"LaunchDarkly client is not ready"},eventCapacityExceeded:function(){return"Exceeded event queue capacity. Increase capacity to avoid dropping events."},eventWithoutUser:function(){return"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"},invalidContentType:F,invalidKey:function(){return"Event key must be a string"},localStorageUnavailable:ke,networkError:A,unknownCustomEventKey:Ee,environmentNotFound:q,environmentNotSpecified:De,errorFetchingFlags:Se,userNotSpecified:_,invalidUser:V,invalidData:function(){return"Invalid data received from LaunchDarkly; connection may have been interrupted"},bootstrapOldFormat:Oe,bootstrapInvalid:function(){return"LaunchDarkly bootstrap data is not available because the back end could not read the flags."},deprecated:z,httpErrorMessage:Pe,httpUnavailable:J,identifyDisabled:function(){return"identify() has no effect here; it must be called on the main client instance"},streamClosing:function(){return"Closing stream connection"},streamConnecting:M,streamError:H,unknownOption:K,wrongOptionType:$,wrongOptionTypeBoolean:B,optionBelowMinimum:G,debugPolling:X,debugStreamPing:function(){return"received ping message from stream"},debugStreamPut:function(){return"received streaming update for all flags"},debugStreamPatch:Ue,debugStreamPatchIgnored:je,debugStreamDelete:Ie,debugStreamDeleteIgnored:Re,debugEnqueueingEvent:Te,debugPostingEvents:Le,debugPostingDiagnosticEvent:function(e){return"sending diagnostic event ("+e.kind+")"}});var Ne=function(r){var n=!1,t=!1,o=null,e=null,i=new Promise(function(n){r.on("ready",function e(){r.off("ready",e),n()})}).catch(function(){});return{getInitializationPromise:function(){return e||(n?Promise.resolve():t?Promise.reject(o):e=new Promise(function(n,t){r.on("initialized",function e(){r.off("initialized",e),n()}),r.on("failed",function e(n){r.off("failed",e),t(n)})}))},getReadyPromise:function(){return i},signalSuccess:function(){n||t||(n=!0,r.emit("initialized"),r.emit("ready"))},signalFailure:function(e){n||t||(t=!0,o=e,r.emit("failed",e),r.emit("ready")),r.maybeReportError(e)}}};function xe(t,r,o,i){var a={};function u(){var e="",n=i.getUser();return n&&(e=o||y(JSON.stringify(n))),"ld:"+r+":"+e}return a.loadFlags=function(){return t.get(u()).then(function(e){if(null==e)return null;try{var n=JSON.parse(e);if(n){var t=n.$schema;void 0===t||t<1?n=w(n):delete n.$schema}return n}catch(e){return a.clearFlags().then(function(){return null})}})},a.saveFlags=function(e){var n=me({},e,{$schema:1});return t.set(u(),JSON.stringify(n))},a.clearFlags=function(){return t.clear(u())},a}function Ce(o,i,a,n){var u,s=i.streamUrl,c=i.logger,e={},l=s+"/eval/"+a,f=i.useReport,d=i.evaluationReasons,t=i.streamReconnectDelay,v=O(
2442o,i),g=!1,p=null,m=null,h=null,y=null,w=null;function b(e){g||(c.warn(H(e,t)),g=!0),D(!1),E(),k(t)}function k(e){m||(e?m=setTimeout(r,e):r())}function r(){var e;m=null;var n="",t={headers:v,readTimeoutMillis:3e5};if(o.eventSourceFactory){for(var r in null!=y&&(n="h="+y),f?o.eventSourceAllowsReport?(e=l,t.method="REPORT",t.headers["Content-Type"]="application/json",t.body=JSON.stringify(h)):(e=s+"/ping/"+a,n=""):e=l+"/"+S(JSON.stringify(h)),t.headers=P(t.headers,i),d&&(n=n+(n?"&":"")+"withReasons=true"),e=e+(n?"?":"")+n,E(),c.info(M(e)),u=(new Date).getTime(),p=o.eventSourceFactory(e,t),w)he(w,r)&&p.addEventListener(r,w[r]);p.onerror=b}}function E(){p&&(c.info("Closing stream connection"),p.close(),p=null)}function D(e){u&&n&&n.recordStreamInit(u,!e,(new Date).getTime()-u),u=null}return e.connect=function(e,n,t){h=e,y=n,w={};function r(n){w[n]=function(e){D(!(g=!1)),t[n]&&t[n](e)}}for(var o in t||{})r(o);k()},e.disconnect=function(){clearTimeout(m),m=null,E()},e.isConnected=function(){return!!(p&&o.eventSourceIsActive&&o.eventSourceIsActive(p))},e}function Fe(v,g,a){var u=g.baseUrl,s=g.useReport,c=g.evaluationReasons,l=g.logger,e={},p={};function f(e,n){if(!v.httpRequest)return new Promise(function(e,n){
2442n(new se(J()))});var t=n?"REPORT":"GET",r=O(v,g);n&&(r["Content-Type"]="application/json");var o,i,a,u,s,c,l=p[e];l||(o=function(){delete p[e]},(c={addPromise:function(n,e){i=n,a&&a(),a=e,n.then(function(e){i===n&&(u(e),o())},function(e){i===n&&(s(e),o())})}}).resultPromise=new Promise(function(e,n){u=e,s=n}),l=c,p[e]=l);var f=v.httpRequest(t,e,P(r,g),n),d=f.promise.then(function(e){if(200!==e.status)return Promise.reject(404===(n=e).status?new ae(q()):new se(Se(n.statusText||String(n.status))));if(e.header("content-type")&&"application/json"===e.header("content-type").substring(0,"application/json".length))return JSON.parse(e.body);var n,t=F(e.header("content-type")||"");return Promise.reject(new se(t))},function(e){return Promise.reject(new se(A(e)))});return l.addPromise(d,function(){f.cancel&&f.cancel()}),l.resultPromise}return e.fetchJSON=function(e){return f(u+e,null)},e.fetchFlagSettings=function(e,n){var t,r,o,i="";return s?(r=[u,"/sdk/evalx/",a,"/user"].join(""),o=JSON.stringify(e)):(t=S(JSON.stringify(e)),r=[u,"/sdk/evalx/",a,"/users/",t].join("")),n&&(i="h="+n),c&&(i=i+(i?"&":"")+"withReasons=true"),r=r+(i?"?":"")+i,l.debug(X(r)),f(r,o)},e}function Ae(o){var e={};return e.validateUser=function(e){if(!e)return Promise.reject(new i(_()));var r=fe(e);return null!==r.key&&void 0!==r.key?(r.key=r.key.toString(),Promise.resolve(r)):r.anonymous?o.get("ld:$anonUserId").then(function(e){if(e)return r.key=e,r;var n,t=N();return r.key=t,(n=t,o.set("ld:$anonUserId",n)).then(function(){return r})}):Promise.reject(new i(V()))},e}var Q=["debug","info","warn","error","none"];function Y(e,a){if(e&&e.destination&&"function"!=typeof e.destination)throw new Error("destination for basicLogger was set to a non-function");function n(n){return function(e){console&&console[n]&&console[n].call(console,e)}}var u=e&&e.destination?[e.destination,e.destination,e.destination,e.destination]:[n("log"),n("info"),n("warn"),n("error")],s=!(!e||!e.destination),c=e&&void 0!==e.prefix&&null!==e.prefix?e.prefix:"[LaunchDarkly] ",r=1;if(e&&e.level)for(var t=0;t<Q.length;t++)Q[t]===e.level&&(r=t);for(var o={},i=function(e){var n=Q[e];if("none"!==n)if(e<r)o[n]=function(){};else{var t=e;o[n]=function(){!function(e,n,t){if(!(t.length<1)){var r,o=s?n+": "+c:c;if(1!==t.length&&a){var i=f(t);i[0]=o+i[0],r=a.apply(void 0,f(i))}else r=o+t[0];try{u[e](r)}catch(e){console&&console.log&&console.log("[LaunchDarkly] Configured logger's "+n+" method threw an exception: "+e)}}}(t,n,arguments)}}},l=0;l<Q.length;l++)i(l);return o}function qe(e,n){return Y({level:e,prefix:n})}var Z={baseUrl:{default:"https://app.launchdarkly.com"},streamUrl:{default:"https://clientstream.launchdarkly.com"},eventsUrl:{default:"https://events.launchdarkly.com"},sendEvents:{default:!0},streaming:{type:"boolean"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:"function"},inlineUsersInEvents:{default:!1},allowFrequentDuplicateEvents:{default:!1},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributeNames:{default:[]},bootstrap:{type:"string|object"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:"string"},wrapperVersion:{type:"string"},stateProvider:{type:"object"},autoAliasingOptOut:{default:!1}};function _e(e,n,t,r){var a=me({logger:{default:r}},Z,t),o={all_attributes_private:"allAttributesPrivate",private_attribute_names:"privateAttributeNames",samplingInterval:null};function u(e){ve(function(){n&&n.maybeReportError(new g(e))})}var i,s,c,l,f,d=me({},e||{});return f=d,Object.keys(o).forEach(function(e){if(void 0!==f[e]){var n=o[e];r&&r.warn(z(e,n)),n&&(void 0===f[n]&&(f[n]=f[e]),delete f[e])}}),i=(l=me({},d),Object.keys(a).forEach(function(e){void 0!==l[e]&&null!==l[e]||(l[e]=a[e]&&a[e].default)}),s=d=l,c=me({},s),Object.keys(s).forEach(function(e){var n=s[e];if(null!=n){var t=a[e];if(void 0===t)u(K(e));else{var r=t.type||v(t.default);if("any"!==r){var o=r.split("|"),i=v(n);o.indexOf(i)<0?"boolean"===r?(c[e]=!!n,u(B(e,i))):(u($(e,r,i)),c[e]=t.default):"number"===i&&void 0!==t.minimum&&n<t.minimum&&(u(G(e,n,t.minimum)),c[e]=t.minimum)}}}}),d=c).logger,Q.forEach(function(e){if("none"!==e&&(!i[e]||"function"!=typeof i[e]))throw new Error("Provided logger instance must support logger."+e+"(...) method")}),d;function v(e){if(null===e)return"any";if(void 0!==e){if(Array.isArray(e))return"array";var n=re(e);return"boolean"===n||"string"===n||"number"===n||"function"===n?n:"object"}}}var ee=Object.freeze({__proto__:null,baseOptionDefs:Z,validate:_e}).baseOptionDefs,Ve=function(e){var n={diagnosticId:N()};return e&&(n.sdkKeySuffix=6<e.length?e.substring(e.length-6):e),n},ze=function(e){var n,t,r,o;function i(e){n=e,r=t=0,o=[]}return i(e),{getProps:function(){return{dataSinceDate:n,droppedEvents:t,eventsInLastBatch:r,streamInits:o}},setProps:function(e){n=e.dataSinceDate,t=e.droppedEvents||0,r=e.eventsInLastBatch||0,o=e.streamInits||[]},incrementDroppedEvents:function(){t++},setEventsInLastBatch:function(e){r=e},recordStreamInit:function(e,n,t){var r={timestamp:e,failed:n,durationMillis:t};o.push(r)},reset:i}},Je=function(n,r,e,t,o,i,a){var u,s,c=!!n.diagnosticUseCombinedEvent,l="ld:"+o+":$diagnostics",f=i.eventsUrl+"/events/diagnostic/"+o,d=i.diagnosticRecordingInterval,v=e,g=!!i.streaming,p={};function m(){return{sdk:function(){var e=oe({},n.diagnosticSdkData);return i.wrapperName&&(e.wrapperName=i.wrapperName),i.wrapperVersion&&(e.wrapperVersion=i.wrapperVersion),e}(),configuration:(e={customBaseURI:i.baseUrl!==ee.baseUrl.default,customStreamURI:i.streamUrl!==ee.streamUrl.default,customEventsURI:i.eventsUrl!==ee.eventsUrl.default,eventsCapacity:i.eventCapacity,eventsFlushIntervalMillis:i.flushInterval,reconnectTimeMillis:i.streamReconnectDelay,streamingDisabled:!g,allAttributesPrivate:!!i.allAttributesPrivate,inlineUsersInEvents:!!i.inlineUsersInEvents,diagnosticRecordingIntervalMillis:i.diagnosticRecordingInterval,usingSecureMode:!!i.hash,bootstrapMode:!!i.bootstrap,fetchGoalsDisabled:!i.fetchGoals,allowFrequentDuplicateEvents:!!i.allowFrequentDuplicateEvents,sendEventsOnlyForVariation:!!i.sendEventsOnlyForVariation,autoAliasingOptOut:!!i.autoAliasingOptOut},e),platform:n.diagnosticPlatformData};var e}function h(e){i.logger&&i.logger.debug(W.debugPostingDiagnosticEvent(e)),t.sendEvents(e,f,!0).then(function(){}).catch(function(){})}function y(){var e,n;h((e=(new Date).getTime(),n=oe({kind:c?"diagnostic-combined":"diagnostic",id:a,creationDate:e},v.getProps()),c&&(n=oe({},n,{},m())),v.reset(e),n)),s=setTimeout(y,d),u=(new Date).getTime(),c&&function(){if(r.isEnabled()){var e=oe({},v.getProps());r.set(l,JSON.stringify(e))}}()}return p.start=function(){c?function(t){if(!r.isEnabled())return t(!1);r.get(l).then(function(e){if(e)try{var n=JSON.parse(e);v.setProps(n),u=n.dataSinceDate}catch(e){}t(!0)}).catch(function(){t(!1)})}(function(e){if(e){var n=(u||0)+d,t=(new Date).getTime();n<=t?y():s=setTimeout(y,n-t)}else 0===Math.floor(4*Math.random())?y():s=setTimeout(y,d)}):(h(oe({kind:"diagnostic-init",id:a,creationDate:v.getProps().dataSinceDate},m())),s=setTimeout(y,d))},p.stop=function(){s&&clearTimeout(s)},p.setStreaming=function(e){g=e},p};function ne(e,n,t,i,r){var a,o,u,s,c,l,f,d,v,g=t&&t.logger?t.logger:r&&r.logger&&r.logger.default||qe("warn"),p=function(n){var e={},o={};return e.on=function(e,n,t){o[e]=o[e]||[],o[e]=o[e].concat({handler:n,context:t})},e.off=function(e,n,t){if(o[e])for(var r=0;r<o[e].length;r++)o[e][r].handler===n&&o[e][r].context===t&&(o[e]=o[e].slice(0,r).concat(o[e].slice(r+1)))},e.emit=function(e){if(o[e])for(var n=o[e].slice(0),t=0;t<n.length;t++)n[t].handler.apply(n[t].context,Array.prototype.slice.call(arguments,1
2442))},e.getEvents=function(){return Object.keys(o)},e.getEventListenerCount=function(e){return o[e]?o[e].length:0},e.maybeReportError=function(e){e&&(o.error?this.emit("error",e):(n||console).error(e.message))},e}(g),m=Ne(p),h=_e(t,p,r,g),y=h.sendEvents,w=e,b=h.hash,k=(l=i.localStorage,f=g,v=!(d={}),d.isEnabled=function(){return!!l},d.get=function(e){return new Promise(function(n){l?l.get(e).then(n).catch(function(e){V(e),n(void 0)}):n(void 0)})},d.set=function(e,t){return new Promise(function(n){l?l.set(e,t).then(function(){return n(!0)}).catch(function(e){V(e),n(!1)}):n(!1)})},d.clear=function(e){return new Promise(function(n){l?l.clear(e).then(function(){return n(!0)}).catch(function(e){V(e),n(!1)}):n(!1)})},d),E=we(i,w,h),D=h.sendEvents&&!h.diagnosticOptOut,S=D?Ve(w):null,O=D?ze((new Date).getTime()):null,P=D?Je(i,k,O,E,w,h,S):null,U=Ce(i,h,w,O),j=h.eventProcessor||function(e,n,t,r,o,i){var a,u=3<arguments.length&&void 0!==r?r:null,s=4<arguments.length&&void 0!==o?o:null,c={},l=(5<arguments.length&&void 0!==i?i:null)||we(e,t,n),f=n.eventsUrl+"/events/bulk/"+t,d=function(){var e={},a=0,u=0,s={};return e.summarizeEvent=function(e){if("feature"===e.kind){var n=e.key+":"+(null!==e.variation&&void 0!==e.variation?e.variation:"")+":"+(null!==e.version&&void 0!==e.version?e.version:""),t=s[n];t?t.count=t.count+1:s[n]={count:1,key:e.key,variation:e.variation,version:e.version,value:e.value,default:e.default},(0===a||e.creationDate<a)&&(a=e.creationDate),e.creationDate>u&&(u=e.creationDate)}},e.getSummary=function(){var e={},n=!0;for(var t in s){var r=s[t],o=e[r.key];o||(o={default:r.default,counters:[]},e[r.key]=o);var i={value:r.value,count:r.count};void 0!==r.variation&&null!==r.variation&&(i.variation=r.variation),r.version?i.version=r.version:i.unknown=!0,o.counters.push(i),n=!1}return n?null:{startDate:a,endDate:u,features:e}},e.clearSummary=function(){u=a=0,s={}},e}(),v=be(n),g=n.inlineUsersInEvents,p=n.samplingInterval,m=n.eventCapacity,h=n.flushInterval,y=n.logger,w=[],b=0,k=!1,E=!1;function D(){return 0===p||0===Math.floor(Math.random()*p)}function S(e){w.length<m?(w.push(e),E=!1):(E||(E=!0,y.warn("Exceeded event queue capacity. Increase capacity to avoid dropping events.")),u&&u.incrementDroppedEvents())}return c.enqueue=function(e){if(!k){var n=!1,t=!1;if(d.summarizeEvent(e),"feature"===e.kind?D()&&(n=!!e.trackEvents,t=function(e){return!!e.debugEventsUntilDate&&e.debugEventsUntilDate>b&&e.debugEventsUntilDate>(new Date).getTime()}(e)):n=D(),n&&S(function(e){var n=me({},e);return"alias"===e.kind||(g||"identify"===e.kind?n.user=v.filterUser(e.user):(n.userKey=e.user.key,delete n.user),"feature"===e.kind&&(delete n.trackEvents,delete n.debugEventsUntilDate)),n}(e)),t){var r=me({},e,{kind:"debug"});r.user=v.filterUser(r.user),delete r.trackEvents,delete r.debugEventsUntilDate,S(r)}}},c.flush=function(){if(k)return Promise.resolve();var e=w,n=d.getSummary();return d.clearSummary(),n&&(n.kind="summary",e.push(n)),u&&u.setEventsInLastBatch(e.length),0===e.length?Promise.resolve():(w=[],y.debug(Le(e.length)),l.sendEvents(e,f).then(function(e){e&&(e.serverTime&&(b=e.serverTime),le(e.status)||(k=!0),400<=e.status&&ve(function(){s.maybeReportError(new ie(Pe(e.status,"event posting","some events were dropped")))}))}))},c.start=function(){a=setTimeout(function e(){c.flush(),a=setTimeout(e,h)},h)},c.stop=function(){clearTimeout(a)},c}(i,h,w,O,p,E),I=Fe(i,h,w),R={},T={},L=h.streaming,N=!1,x=!1,C=!0,F=h.stateProvider,A=(s=function(e,n){var t;t=e,F||t&&z({kind:"identify",key:t.key,user:t,creationDate:(new Date).getTime()}),!h.autoAliasingOptOut&&n&&n.anonymous&&e&&!e.anonymous&&$(e,n)},{setUser:function(e){var n=c&&fe(c);(c=ye(e))&&s&&s(fe(c),n)},getUser:function(){return c?fe(c):null}}),q=Ae(k),_=k.isEnabled()?new xe(k,w,b,A,g):null;function V(e){v||(v=!0,f.warn(ke(e)))}function z(e){if(w&&!(F&&F.enqueueEvent&&F.enqueueEvent(e))){if("alias"!==e.kind){if(!e.user)return void(C&&(g.warn("Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript"),C=!1));C=!1}!y||x||i.isDoNotTrack()||(g.debug(Te(e.kind)),j.enqueue(e))}}function J(e,n,t,r){var o=A.getUser(),i=new Date,a=n?n.value:null;if(!h.allowFrequentDuplicateEvents){var u=JSON.stringify(a)+(o&&o.key?o.key:"")+e,s=R[u];if(s&&i-s<3e5)return;R[u]=i}var c={kind:"feature",key:e,user:o,value:a,variation:n?n.variationIndex:null,default:t,creationDate:i.getTime()};o&&o.anonymous&&(c.contextKind=K(o));var l=T[e];l&&(c.version=l.flagVersion?l.flagVersion:l.version,c.trackEvents=l.trackEvents,c.debugEventsUntilDate=l.debugEventsUntilDate),(r||l&&l.trackReason)&&n&&(c.reason=n.reason),z(c)}function M(e,n,t,r){var o;if(T&&he(T,e)&&T[e]&&!T[e].deleted){var i=T[e];o=H(i),null!==i.value&&void 0!==i.value||(o.value=n)}else o={value:n,variationIndex:null,reason:{kind:"ERROR",errorKind:"FLAG_NOT_FOUND"}};return t&&J(e,o,n,r),o}function H(e){return{value:e.value,variationIndex:void 0===e.variation?null:e.variation,reason:e.reason||null}}function K(e){return e.anonymous?"anonymousUser":"user"}function $(e,n){F||e&&n&&z({kind:"alias",key:e.key,contextKind:K(e),previousKey:n.key,previousContextKind:K(n),creationDate:(new Date).getTime()})}function B(){if(o=!0,A.getUser()){var a=function(e){try{return JSON.parse(e)}catch(e){return void p.maybeReportError(new ce("Invalid data received from LaunchDarkly; connection may have been interrupted"))}};U.connect(A.getUser(),b,{ping:function(){g.debug("received ping message from stream");var n=A.getUser();I.fetchFlagSettings(n,b).then(function(e){de(n,A.getUser())&&X(e||{})}).catch(function(e){p.maybeReportError(new se(Se(e)))})},put:function(e){var n=a(e.data);n&&(g.debug("received streaming update for all flags"),X(n))},patch:function(e){var n=a(e.data);if(n){var t=T[n.key];if(!t||!t.version||!n.version||t.version<n.version){g.debug(Ue(n.key));var r={},o=me({},n);delete o.key;var i=H(T[n.key]=o);r[n.key]=t?{previous:t.value,current:i}:{current:i},W(r)}else g.debug(je(n.key))}},delete:function(e){var n=a(e.data);if(n)if(!T[n.key]||T[n.key].version<n.version){g.debug(Ie(n.key));var t={};
2442T[n.key]&&!T[n.key].deleted&&(t[n.key]={previous:T[n.key].value}),T[n.key]={version:n.version,deleted:!0},W(t)}else g.debug(Re(n.key))}})}}function G(){o&&(U.disconnect(),o=!1)}function X(e){var n={};if(!e)return Promise.resolve();for(var t in T)he(T,t)&&T[t]&&(e[t]&&!de(e[t].value,T[t].value)?n[t]={previous:T[t].value,current:H(e[t])}:e[t]&&!e[t].deleted||(n[t]={previous:T[t].value}));for(var r in e)he(e,r)&&e[r]&&(!T[r]||T[r].deleted)&&(n[r]={current:H(e[r])});return T=oe({},e),W(n).catch(function(){})}function W(o){var e=Object.keys(o);if(0<e.length){var i={};e.forEach(function(e){var n=o[e].current,t=n?n.value:void 0,r=o[e].previous;p.emit("change:"+e,t,r),i[e]=n?{current:t,previous:r}:{previous:r}}),p.emit("change",i),p.emit("internal-change",T),h.sendEventsOnlyForVariation||F||e.forEach(function(e){J(e,o[e].current)})}return a&&_?_.saveFlags(T):Promise.resolve()}function Q(){var e=L||u&&void 0===L;e&&!o?B():!e&&o&&G(),P&&P.setStreaming(e)}function Y(e){return"change"===e||"change:"===e.substr(0,"change".length+1)}if("string"==typeof h.bootstrap&&"LOCALSTORAGE"===h.bootstrap.toUpperCase()&&(_?a=!0:g.warn(ke())),"object"===re(h.bootstrap)&&(T=function(t){var e=Object.keys(t),r=t.$flagsState;!r&&e.length&&g.warn(Oe()),!1===t.$valid&&g.warn("LaunchDarkly bootstrap data is not available because the back end could not read the flags.");var o={};return e.forEach(function(e){if("$flagsState"!==e&&"$valid"!==e){var n={value:t[e]};r&&r[e]?n=me(n,r[e]):n.version=0,o[e]=n}}),o}(h.bootstrap)),F){var Z=F.getInitialState();Z?ee(Z):F.on("init",ee),F.on("update",function(e){e.user&&A.setUser(e.user),e.flags&&X(e.flags)})}else(e?q.validateUser(n).then(function(e){return A.setUser(e),"object"===re(h.bootstrap)?ne():a?_.loadFlags().then(function(e){return null==e?(T={},I.fetchFlagSettings(A.getUser(),b).then(function(e){return X(e||{})}).then(ne).catch(function(e){te(new se(Se(e)))})):(T=e,ve(ne),I.fetchFlagSettings(A.getUser(),b).then(function(e){return X(e)}).catch(function(e){return p.maybeReportError(e)}))}):I.fetchFlagSettings(A.getUser(),b).then(function(e){T=e||{},ne()}).catch(function(e){T={},te(e)})}):Promise.reject(new ae(De()))).catch(te);function ee(e){w=e.environment,A.setUser(e.user),T=oe({},e.flags),ve(ne)}function ne(){g.info("LaunchDarkly client initialized"),N=!0,Q(),m.signalSuccess()}function te(e){m.signalFailure(e)}return{client:{waitForInitialization:function(){return m.getInitializationPromise()},waitUntilReady:function(){return m.getReadyPromise()},identify:function(e,r,n){return x?ge(Promise.resolve({}),n):F?(g.warn("identify() has no effect here; it must be called on the main client instance"),ge(Promise.resolve(pe(T)),n)):ge((a&&_?_.clearFlags():Promise.resolve()).then(function(){return q.validateUser(e)}).then(function(t){return I.fetchFlagSettings(t,r).then(function(e){var n=pe(e);return A.setUser(t),b=r,e?X(e).then(function(){return n}):n})}).then(function(e){return o&&B(),e}).catch(function(e){return p.maybeReportError(e),Promise.reject(e)}),n)},getUser:function(){return A.getUser()},variation:function(e,n){return M(e,n,!0,!1).value},variationDetail:function(e,n){return M(e,n,!0,!0)},track:function(e,n,t){if("string"==typeof e){i.customEventFilter&&!i.customEventFilter(e)&&g.warn(Ee(e));var r=A.getUser(),o={kind:"custom",key:e,user:r,url:i.getCurrentUrl(),creationDate:(new Date).getTime()};r&&r.anonymous&&(o.contextKind=K(r)),null!=n&&(o.data=n),null!=t&&(o.metricValue=t),z(o)}else p.maybeReportError(new ue(Ee(e)))},alias:$,on:function(e,n,t){Y(e)?(u=!0,N&&Q(),p.on(e,n,t)):p.on.apply(p,arguments)},off:function(e){if(p.off.apply(p,arguments),Y(e)){var n=!1;p.getEvents().forEach(function(e){Y(e)&&0<p.getEventListenerCount(e)&&(n=!0)}),n||(u=!1,o&&void 0===L&&G())}},setStreaming:function(e){var n=null===e?void 0:e;n!==L&&(L=n,Q())},flush:function(e){return ge(y?j.flush():Promise.resolve(),e)},allFlags:function(){var e={};if(!T)return e;for(var n in T)he(T,n)&&(e[n]=M(n,null,!h.sendEventsOnlyForVariation).value);return e},close:function(e){if(x)return ge(Promise.resolve(),e);function n(){x=!0,T={}}return ge(Promise.resolve().then(function(){if(G(),P&&P.stop(),y)return j.stop(),j.flush()}).then(n).catch(n),e)}},options:h,emitter:p,ident:A,logger:g,requestor:I,start:function(){y&&(P&&P.start(),j.start())},enqueueEvent:z,getFlagsInternal:function(){return T},getEnvironmentId:function(){return w},internalChangeEventName:"internal-change"}}function te(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),t.push.apply(t,r)}return t}function Me(o){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
2442e%2?te(Object(i),!0).forEach(function(e){var n,t,r;n=o,r=i[t=e],t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))})}return o}var He={promise:Promise.resolve({status:200,header:function(){return null},body:null})};function Ke(e,n,t,r,o){if(o&&!function(){var e=window.navigator&&window.navigator.userAgent;if(e){var n=e.match(/Chrom(e|ium)\/([0-9]+)\./);if(n)return parseInt(n[2],10)<73}return!0}())return He;var i=new window.XMLHttpRequest;for(var a in i.open(e,n,!o),t||{})Object.prototype.hasOwnProperty.call(t,a)&&i.setRequestHeader(a,t[a]);if(o)return i.send(r),He;var u;return{promise:new Promise(function(e,n){i.addEventListener("load",function(){u||e({status:i.status,header:function(e){return i.getResponseHeader(e)},body:i.responseText})}),i.addEventListener("error",function(){u||n(new Error)}),i.send(r)}),cancel:function(){u=!0,i.abort()}}}var $e=/[|\\{}()[\]^$+*?.]/g,Be=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace($e,"\\$&")};function Ge(e,n,t,r){var o,i,a=(("substring"===e.kind||"regex"===e.kind)&&r.includes("/")?n:n.replace(r,"")).replace(t,"");switch(e.kind){case"exact":i=n,o=new RegExp("^"+Be(e.url)+"/?$");break;case"canonical":i=a,o=new RegExp("^"+Be(e.url)+"/?$");break;case"substring":i=a,o=new RegExp(".*"+Be(e.substring)+".*$");break;case"regex":i=a,o=new RegExp(e.pattern);break;default:return!1}return o.test(i)}function Xe(e,r){for(var n={},t=null,o=[],i=0;i<e.length;i++)for(var a=e[i],u=a.urls||[],s=0;s<u.length;s++)if(Ge(u[s],window.location.href,window.location.search,window.location.hash)){"pageview"===a.kind?r("pageview",a):(o.push(a),r("click_pageview",a));break}return 0<o.length&&(t=function(e){for(var n=function(e,n){for(var t=[],r=0;r<n.length;r++)for(var o=e.target,i=n[r],a=i.selector,u=document.querySelectorAll(a);o&&0<u.length;){for(var s=0;s<u.length;s++)o===u[s]&&t.push(i);o=o.parentNode}return t}(e,o),t=0;t<n.length;t++)r("click",n[t])},document.addEventListener("click",t)),n.dispose=function(){document.removeEventListener("click",t)},n}var We=300;function Qe(o,n){var t,r;function i(){r&&r.dispose(),t&&t.length&&(r=Xe(t,a))}function a(e,n){var t=o.ident.getUser(),r={kind:e,key:n.key,data:null,url:window.location.href,user:t,creationDate:(new Date).getTime()};return t&&t.anonymous&&(r.contextKind="anonymousUser"),"click"===e&&(r.selector=n.selector),o.enqueueEvent(r)}function u(e,n){var t,r=window.location.href;function o(){(t=window.location.href)!==r&&(r=t,n())}!function e(n,t){n(),setTimeout(function(){e(n,t)},t)}(o,e),window.history&&window.history.pushState?window.addEventListener("popstate",o):window.addEventListener("hashchange",o)}return o.requestor.fetchJSON("/sdk/goals/"+o.getEnvironmentId()).then(function(e){e&&0<e.length&&(r=Xe(t=e,a),u(We,i)),n()}).catch(function(e){o.emitter.maybeReportError(new s.LDUnexpectedResponseError((e&&e.message,e.message))),n()}),{}}var Ye="goalsReady",Ze={fetchGoals:{default:!0},hash:{type:"string"},eventProcessor:{type:"object"},eventUrlTransformer:{type:"function"},disableSyncEventPost:{default:!1}};function en(e,n){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=function(e){var n,i={synchronousFlush:!1};if(window.XMLHttpRequest){var a=e&&e.disableSyncEventPost;i.httpRequest=function(e,n,t,r){var o=i.synchronousFlush&!a;return i.synchronousFlush=!1,Ke(e,n,t,r,o)}}i.httpAllowsPost=function(){return void 0===n&&(n=!!window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest),n},i.httpFallbackPing=function(e){(new window.Image).src=e};var r,t=e&&e.eventUrlTransformer;i.getCurrentUrl=function(){return t?t(window.location.href):window.location.href},i.isDoNotTrack=function(){var e;return 1===(e=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===e||"1"===e||"
2442yes"===e};try{window.localStorage&&(i.localStorage={get:function(n){return new Promise(function(e){e(window.localStorage.getItem(n))})},set:function(n,t){return new Promise(function(e){window.localStorage.setItem(n,t),e()})},clear:function(n){return new Promise(function(e){window.localStorage.removeItem(n),e()})}})}catch(e){i.localStorage=null}var o=e&&e.useReport;if(r=o&&"function"==typeof window.EventSourcePolyfill&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(i.eventSourceAllowsReport=!0,window.EventSourcePolyfill):(i.eventSourceAllowsReport=!1,window.EventSource),window.EventSource){i.eventSourceFactory=function(e,n){var t=Me(Me({},{heartbeatTimeout:3e5,silentTimeout:3e5,skipDefaultHeaders:!0}),n);return new r(e,t)},i.eventSourceIsActive=function(e){return e.readyState===window.EventSource.OPEN||e.readyState===window.EventSource.CONNECTING}}return i.userAgent="JSClient",i.version="2.20.2",i.diagnosticSdkData={name:"js-client-sdk",version:"2.20.2"},i.diagnosticPlatformData={name:"JS"},i.diagnosticUseCombinedEvent=!0,i}(t),o=ne(e,n,t,r,Ze),i=o.client,a=o.options,u=o.emitter,s=new Promise(function(e){var n=u.on(Ye,function(){u.off(Ye,n),e()})});i.waitUntilGoalsReady=function(){return s},a.fetchGoals?Qe(o,function(){return u.emit(Ye)}):u.emit(Ye),"complete"!==document.readyState?window.addEventListener("load",o.start):o.start();function c(){r.synchronousFlush=!0,i.flush().catch(function(){}),r.synchronousFlush=!1}return window.addEventListener("beforeunload",c),window.addEventListener("unload",c),i}var nn=qe;var tn={initialize:function(e,n){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return console&&console.warn&&console.warn(W.deprecated("default export","named LDClient export")),en(e,n,t)},version:"2.20.2"};e.createConsoleLogger=nn,e.default=tn,e.initialize=en,e.version="2.20.2",Object.defineProperty(e,"__esModule",{value:!0})}); 2443//# sourceMappingURL=ldclient.min.js.map 2444; 2445/* 2446 turning off the no undefined rule here since if it is not found in the ANF object, 2447 we want undefined returned 2448*/ 2449/* eslint no-undefined: 0 */ 2450redesign.define('anfUtil/constants',[], function anfConstants() { 2451 'use strict'; 2452 2453 var messageBus = $(ANF); 2454 var analyticsMessageBus = $(window); 2455 var returnObj; 2456 2457 function deepFetch(object, keyArray) { 2458 var returnValue = object; 2459 try { 2460 returnValue = keyArray.reduce(function fetchReducer(rt, key) { 2461 return rt[key]; 2462 }, object); 2463 } catch (e) { 2464 returnValue = undefined; 2465 } finally { 2466 return returnValue; 2467 } 2468 } 2469 2470 function normalizeDotNotationStringToArray(key) { 2471 var myKey = typeof key === 'string' ? key.split('.') : key; 2472 if (!(myKey instanceof Array)) { 2473 throw new TypeError('supplied key is not an array or string'); 2474 } 2475 2476 return myKey.slice(); 2477 } 2478 2479 function applyReplacementMap(textValue, keyMap, replaceMissingPlaceholders) { 2480 var replaceMissing = (replaceMissingPlaceholders === true); 2481 return textValue.replace(/{+(.*?)}+/g, function placeHolderSubstitution(match, capture) { 2482 var missingValue = replaceMissing ? '' : match; 2483 var replacementValue = keyMap[capture]; 2484 return typeof replacementValue === 'string' ? replacementValue : missingValue; 2485 }); 2486 } 2487 2488 returnObj = { 2489 anf: function anfConstantsFn(key) { 2490 var defaultValue; 2491 var value = deepFetch(ANF, normalizeDotNotationStringToArray(key)); 2492 if (typeof value === 'object' && value !== null) { 2493 defaultValue = value instanceof Array ? [] : {}; 2494 value = $.extend(true, defaultValue, value); 2495 } 2496 return value; 2497 }, 2498 i18n: function i18nConstantsFn(key, replacementMap, doNotReplaceMissingPlaceholders) { 2499 var i18nDefaultValue = '??????'; 2500 var i18nValue; 2501 var myKey; 2502 var myReplacementMap = replacementMap || {}; 2503 var replaceMissingPlaceholders = (doNotReplaceMissingPlaceholders !== true);
2504 try { 2505 myKey = ['messaging'].concat(normalizeDotNotationStringToArray(key)); 2506 i18nValue = this.anf(myKey); 2507 2508 if (typeof i18nValue !== 'string') { 2509 throw new Error('Supplied key (' + myKey.join('.') + ') does not result in a string value'); 2510 } 2511 2512 i18nValue = applyReplacementMap(i18nValue, myReplacementMap, replaceMissingPlaceholders); 2513 } catch (e) { 2514 i18nValue = i18nDefaultValue; 2515 } finally { 2516 return i18nValue; 2517 } 2518 }, 2519 i18nV2: function i18nV2ConstantsFn(key, bundleName, replacementMap, replaceMissingPlaceholders) { 2520 var myBundleName = bundleName || returnObj.I18N_BUNDLES.TEXT; 2521 var i18nDefaultValue = '??????'; 2522 var i18nValue; 2523 var myKey = []; 2524 var myReplaceMissingPlaceholders = (replaceMissingPlaceholders !== false); 2525 try { 2526 if (bundleName && Object.keys(window.i18n).indexOf(bundleName) === -1) { 2527 throw new Error('The supplied bundleName could not be found or is not an approved bundle'); 2528 } 2529 2530 myBundleName = myBundleName || 'text'; 2531 myKey = myKey.concat(myBundleName, key); 2532 i18nValue = deepFetch(window.i18n, myKey); 2533 2534 if (typeof i18nValue !== 'string') { 2535 throw new Error('Supplied key (' + myKey.join('.') + ') does not result in a string value'); 2536 } 2537 2538 i18nValue = applyReplacementMap(i18nValue, replacementMap, myReplaceMissingPlaceholders); 2539 } catch (e) { 2540 i18nValue = i18nDefaultValue; 2541 } finally { 2542 return i18nValue; 2543 } 2544 }, 2545 getMessageBus: function getMessageBus() { 2546 return messageBus; 2547 }, 2548 getAnalyticsMessageBus: function getAnalyticsMessageBus() { 2549 return analyticsMessageBus; 2550 } 2551 }; 2552 2553 Object.defineProperty(returnObj, 'I18N_BUNDLES', { 2554 value: Object.freeze({ 2555 CHECKOUT: 'checkout', 2556 ERROR: 'error', 2557 HTML: 'html', 2558 TEXT: 'text' 2559 }) 2560 }); 2561 2562 Object.defineProperty(returnObj, 'messageBus', { 2563 get: returnObj.getMessageBus 2564 }); 2565
2566 Object.defineProperty(returnObj, 'analyticsMessageBus', { 2567 get: returnObj.getAnalyticsMessageBus 2568 }); 2569 2570 return returnObj; 2571}); 2572 2573redesign.define('polyfill/Object/entries',[], function () { 2574 "use strict"; 2575 2576 if (!Object.entries) { 2577 Object.entries = function( obj ){ 2578 var ownProps = Object.keys( obj ), 2579 i = ownProps.length, 2580 resArray = new Array(i); // preallocate the Array 2581 while (i--) 2582 resArray[i] = [ownProps[i], obj[ownProps[i]]]; 2583 2584 return resArray; 2585 }; 2586 } 2587 2588 return Object.entries; 2589}); 2590redesign.define('polyfill/Object/values',['polyfill/Object/entries'], function (fnObjEntries) { 2591 "use strict"; 2592 2593 if (!Object.values) { 2594 Object.values = function( obj ){ 2595 return fnObjEntries(obj).map(function (arr) {return arr[1];}); 2596 }; 2597 } 2598 2599 return Object.values; 2600}); 2601redesign.define('anfUtil/testFramework',['polyfill/Object/values', 'anfUtil/constants'], function testFrameworkService(fnObjectValues, coreConstants) { 2602 'use strict'; 2603 2604 var moduleReturnValue = {}; 2605 2606 // All test in the testFramework should be considered positive tests. The negation is done later on when creating the final return value. 2607 // All test have the optional onError parameter, but this parameter will not be supplied to the function, it is returned to the callee if the function throws and error. 2608 var testFramework = { 2609 type: { 2610 array: function testTypeArray(element) { 2611 // have to do this check first since for some reason it will still attempt the element.constructor which is not valid for the value null 2612 if (element === null) { 2613 return false; 2614 } 2615 return (typeof element === 'object' && element !== null && element.constructor === Array); 2616 }, 2617 boolean: function testTypeBoolean(element) { 2618 return (typeof element === 'boolean'); 2619 }, 2620 defined: function testTypeDefined(element) { 2621 return (typeof element !== 'undefined'); 2622 }, 2623 function: function testTypeFunction(element) { 2624 return (typeof element === 'function'); 2625 }, 2626 object: function testTypeObject(element) { 2627 return (typeof element === 'object'); 2628 }, 2629 string: function testTypeString(element) { 2630 return (typeof element === 'string'); 2631 }, 2632 number: function testTypeNumber(element) { 2633 return (typeof element === 'number' && !isNaN(element)); 2634 }, 2635 is: function testTypeIs(element, type) { 2636 if (typeof type !== 'string') { 2637 throw new TypeError(); 2638 } 2639 return testFramework.type[type] ? testFramework.type[type](element) : typeof element === type; 2640 }, 2641 JSON: function testTypeJSON(element) { 2642 var testStr; 2643 2644 try { 2645 testStr = JSON.parse(element); 2646 } catch (e) { 2647 return false; 2648 } 2649 2650 return (typeof element === 'string' && typeof testStr === 'object'); 2651 } 2652 }, 2653 string: { 2654 email: function testStringEmail(element) { 2655 /* RFC 2822 compliance */ 2656 var testRegExp = /(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|'(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*')@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/; 2657 var myElement = (typeof element === 'undefined' || element === null) ? '' : element; 2658 2659 if ( 2660 typeof myElement !== 'string' 2661 ) { 2662 throw new TypeError(); 2663 } 2664 2665 myElement = (typeof myElement === 'string') ? myElement : ''; 2666 2667 return testRegExp.test(myElement); 2668 }, 2669 empty: function testStringEmpty(element) { 2670 var toNotThrow = ( 2671 typeof element === 'undefined' || 2672 typeof element === 'string' || 2673 (typeof element === 'object' && element === null) 2674 ); 2675 2676 if (!toNotThrow) { 2677 throw new TypeError(); 2678 } 2679 2680 return ( 2681 typeof element === 'undefined' || 2682 (typeof element === 'object' && element === null) || 2683 (typeof element === 'string' && element.trim().length === 0) 2684 ); 2685 }, 2686 equalsIgnoreCase: equalsIgnoreCase, 2687 trimEqualsIgnoreCase: function testStringEqualsIgnoreCase(element, value) { 2688 var myElement = typeof element === 'string' ? element.trim() : element; 2689 var myValue = typeof value === 'string' ? value.trim() : value; 2690 return equalsIgnoreCase(myElement, myValue); 2691 }, 2692 contains: function testStringContains(element, value) { 2693 var testRegExp; 2694 2695 var myElement = (typeof element === 'undefined' || element === null) ? '' : element; 2696 var myValue = (typeof value === 'undefined' || value === null) ? '' : value; 2697 2698 if ( 2699 typeof myElement !== 'string' || 2700 !(typeof myValue === 'string' || (typeof myValue === 'object' && myValue.constructor === RegExp)) 2701 ) { 2702 throw new TypeError(); 2703 } 2704 2705 myElement = (typeof myElement === 'string') ? myElement : ''; 2706 2707 if (typeof myValue === 'string') { 2708 testRegExp = new RegExp(myValue, 'i'); 2709 } else { 2710 testRegExp = myValue; 2711 } 2712 2713 return testRegExp.test(myElement); 2714 }, 2715 lengthGte: function testStringLengthGte(element, number) { 2716 var myElement = (typeof element === 'undefined' || (typeof element === 'object' && element === null)) ? '' : element; 2717 2718 if (typeof myElement !== 'string') { 2719 throw new TypeError(); 2720 } 2721 2722 if (typeof number !== 'number') { 2723 throw new TypeError(); 2724 } 2725 2726 if (number < 0) { 2727 throw new RangeError(); 2728 } 2729 2730 return myElement.length >= number; 2731 }, 2732 lengthGt: function testStringLengthGt(element, number) { 2733 var myElement = (typeof element === 'undefined' || (typeof element === 'object' && element === null)) ? '' : element; 2734 2735 if (typeof myElement !== 'string') { 2736 throw new TypeError(); 2737 } 2738 2739 if (typeof number !== 'number') { 2740 throw new TypeError(); 2741 } 2742 2743 if (number < 0) { 2744 throw new RangeError(); 2745 } 2746 2747 return myElement.length > number; 2748 }, 2749 lengthLte: function testStringLengthLte(element, number) { 2750 var myElement = (typeof element === 'undefined' || (typeof element === 'object' && element === null)) ? '' : element; 2751 2752 if (typeof myElement !== 'string') { 2753 throw new TypeError(); 2754 } 2755 2756 if (typeof number !== 'number') { 2757 throw new TypeError(); 2758 } 2759 2760 if (number < 0) { 2761 throw new RangeError(); 2762 } 2763 2764 return myElement.length <= number; 2765 }, 2766 lengthLt: function testStringLengthLt(element, number) { 2767 var myElement = (typeof element === 'undefined' || (typeof element === 'object' && element === null)) ? '' : element; 2768 2769 if (typeof myElement !== 'string') { 2770 throw new TypeError(); 2771 } 2772 2773 if (typeof number !== 'number') { 2774 throw new TypeError(); 2775 } 2776 2777 if (number < 0) { 2778 throw new RangeError(); 2779 } 2780 2781 return myElement.length < number; 2782 } 2783 }, 2784 array: { 2785 empty: function testArrayEmpty(element) { 2786 if (typeof element !== 'object' || element.constructor !== Array) { 2787 throw new TypeError(); 2788 } 2789 return element.length === 0; 2790 }, 2791 contains: function testArrayContains(element, item) { 2792 if (typeof element !== 'object' || element.constructor !== Array) { 2793 throw new TypeError(); 2794 } 2795 2796 if (typeof item === 'undefined') { 2797 return false;
2798 } 2799 2800 return element.indexOf(item) > -1; 2801 } 2802 }, 2803 object: { 2804 containsKey: function testObjectContainsKey(element, key) { 2805 var currentElement; 2806 var myKey; 2807 var numberOfKeys; 2808 if (typeof element !== 'object' || element === null || element.constructor === Array) { 2809 throw new TypeError(); 2810 } 2811 2812 myKey = (typeof key === 'string') ? key.trim().split('.') : key; 2813 2814 if (typeof myKey !== 'object' || (typeof myKey === 'object' && myKey.constructor !== Array)) { 2815 throw new TypeError(); 2816 } 2817 2818 if (myKey.length === 0) { 2819 throw new RangeError(); 2820 } 2821 2822 currentElement = element; 2823 numberOfKeys = myKey.length - 1; 2824 2825 return myKey.reduce(function deepDive(pv, cv, index) { 2826 var returnValue = pv; 2827 if (pv && index === numberOfKeys) { 2828 returnValue = (typeof currentElement[cv] !== 'undefined'); 2829 } else if (pv) { 2830 if (typeof currentElement[cv] !== 'undefined') { 2831 currentElement = currentElement[cv]; 2832 returnValue = (typeof currentElement === 'object' && currentElement !== null); 2833 } 2834 } 2835 return returnValue; 2836 }, true); 2837 }, 2838 containsValue: function testObjectContainsValue(element, value) { 2839 var values; 2840 2841 if (typeof element !== 'object' || element === null || element.constructor === Array) { 2842 throw new TypeError(); 2843 } 2844 2845 // To start this will be only a shallow check !!!! 2846 values = fnObjectValues(element); 2847 2848 return values.indexOf(value) > -1; 2849 }, 2850 empty: function testObjectEmpty(element) { 2851 var returnValue = false; 2852 2853 if (typeof element !== 'object') { 2854 throw new TypeError(); 2855 } 2856 2857 if (element === null) { 2858 returnValue = true; 2859 } else if (element.constructor === Array) { 2860 returnValue = element.length === 0; 2861 } else { 2862 returnValue = Object.values(element).filter(testFramework.type.defined).length === 0; 2863 } 2864 2865 return returnValue; 2866 }, 2867 null: function testObjectNull(element) { 2868 return (typeof element === 'object' && element === null); 2869 } 2870 }, 2871 number: { 2872 inRange: function testNumberInRange(element, low, high) { 2873 var _high; 2874 var _low; 2875 2876 if (typeof element !== 'number' || 2877 typeof low !== 'number' || 2878 typeof high !== 'number' 2879 ) { 2880 throw new TypeError(); 2881 } 2882 2883 _high = (high > low) ? high : low; 2884 _low = (high > low) ? low : high; 2885 2886 return element >= _low && element <= _high; 2887 }, 2888 greaterThan: function testNumberGreaterThan(num, gtValue) { 2889 var returnValue; 2890 if (typeof num !== 'number' || 2891 typeof gtValue !== 'number' 2892 ) { 2893 throw new TypeError(); 2894 } 2895 2896 if (isNaN(num) && !isNaN(gtValue)) { 2897 returnValue = false; 2898 } else if (!isNaN(num) && isNaN(gtValue)) { 2899 returnValue = true; 2900 } else { 2901 returnValue = num > gtValue; 2902 } 2903 2904 return returnValue; 2905 } 2906 }, 2907 store: { 2908 anf: function testStoreANF() { 2909 return (ANF.params.storeAttributes.pasList.anfPasId === ANF.params.storeAttributes.pasId); 2910 }, 2911 hol: function testStoreHOL() { 2912 return (ANF.params.storeAttributes.pasList.holPasId === ANF.params.storeAttributes.pasId); 2913 } 2914 }, 2915 env: { 2916 isMobile: function testEnvIsMobile() { 2917 return coreConstants.anf('params.env.isMobile') === 'true'; 2918 } 2919 } 2920 }; 2921 2922 Object.keys(testFramework).forEach(function buildTestFramwork(cv) { 2923 if (testFramework.hasOwnProperty(cv) && typeof testFramework[cv] === 'object') { 2924 // Create the testSuites, both positive and negative 2925 moduleReturnValue[cv] = {}; 2926 moduleReturnValue[cv].not = {}; 2927 2928 // Populate the testSuites 2929 Object.keys(testFramework[cv]).forEach(function buildTests(tcv) { 2930 if (testFramework[cv].hasOwnProperty(tcv) && typeof testFramework[cv][tcv] === 'function') { 2931 // Build up the positive tests 2932 moduleReturnValue[cv][tcv] = (function wrapErrorPositiveTests(fn) { 2933 return function buildPositiveTests() { 2934 var onError; 2935 var args = Array.prototype.slice.call(arguments); // convert arguments to an array 2936 2937 if (args.length > fn.length) { // check to see of the arguments passed in is greater then the number of paramaters the function takes. 2938 onError = args.pop(); // use the last argument as the onError value if there is a error 2939 } 2940 2941 try { 2942 return fn.apply(this, arguments); // execute the function 2943 } catch (e) { 2944 if (typeof onError === 'undefined') { // If error is thrown and a onError was supplied, return it 2945 throw e; // If error is thrown and no onError was supplied, re-throw the error 2946 } 2947 return onError; 2948 } 2949 }; 2950 }(testFramework[cv][tcv])); 2951 2952 // Build up the negative tests 2953 moduleReturnValue[cv].not[tcv] = (function wrapErrorNegativeTests(fn) { 2954 return function buildNegativeTests() { 2955 var onError; 2956 var args = Array.prototype.slice.call(arguments); // convert arguments to an array 2957 2958 if (args.length > fn.length) { // check to see of the arguments passed in is greater then the number of paramaters the function takes. 2959 onError = args.pop(); // use the last argument as the onError value if there is a error 2960 } 2961 2962 try { 2963 return !fn.apply(this, arguments); // execute the function 2964 } catch (e) { 2965 if (typeof onError === 'undefined') { // If error is thrown and a onError was supplied, return it 2966 throw e; // If error is thrown and no onError was supplied, re-throw the error 2967 } 2968 return onError; 2969 } 2970 }; 2971 }(testFramework[cv][tcv])); 2972 } 2973 }); 2974 } 2975 }); 2976
2977 function equalsIgnoreCase(elementOne, elementTwo) { 2978 var returnValue = false; 2979 if ( 2980 typeof elementOne === 'string' && typeof elementTwo === 'string' 2981 ) { 2982 returnValue = (elementOne.toLowerCase() === elementTwo.toLowerCase()); 2983 } else if ( 2984 (typeof elementOne === 'object' && elementOne === null) || 2985 (typeof elementTwo === 'object' && elementTwo === null) 2986 2987 ) { 2988 returnValue = (elementOne === elementTwo); 2989 } else { 2990 throw new TypeError(); 2991 } 2992 2993 return returnValue; 2994 } 2995 2996 return moduleReturnValue; 2997}); 2998 2999redesign.define('src/tmp/es6/src/util/flag',['launch_darkly', 'anfUtil/constants', 'anfUtil/testFramework'], function coreSwitches(LaunchDarkly, constants, test) { 3000 'use strict'; 3001 3002 var catchHandler = function catchHandler(ewww) { 3003 /** 3004 * Should not be quite when this fails 3005 * even though we are handling the error 3006 */ 3007 // eslint-disable-next-line no-console 3008 console.error('Switch Manager Failure', ewww.toString()); 3009 window.anfLDClientResponse = Promise.resolve({}); 3010 return window.anfLDClientResponse; 3011 }; 3012 3013 try { 3014 /* 3015 * Note this is following a singleton 3016 * pattern on purpose. So all calls to 3017 * this will get the same promise 3018 */ 3019 if (window.anfLDClientResponse) return window.anfLDClientResponse; 3020 var clientId = constants.anf('params.env.flagIdKey'); 3021 if (test.string.empty(clientId, true)) return catchHandler(new Error('The clientID is blank')); 3022 var client = LaunchDarkly.initialize(clientId, { 3023 country: window.digitalData.get('page.cookie.geoLocation.country'), 3024 email: window.digitalData.get('page.url.qsObject.email'), 3025 key: 'QSZGIExhdW5jaCBEYXJrbHkgR2VuZXJpYyBLZXk', 3026 custom: { 3027 group: window.digitalData.get('page.url.qsObject.group'), 3028 pageKind: window.digitalData.get('page.pageKind'), 3029 stateProv: window.digitalData.get('page.cookie.geoLocation.state'), 3030 storeId: window.digitalData.get('page.storeId'), 3031 language: window.digitalData.get('page.language') 3032 } 3033 }); 3034 window.anfLDClientResponse = client.waitUntilReady().then(function () { 3035 var _client$allFlags; 3036 3037 var allFlags = (_client$allFlags = client.allFlags()) !== null && _client$allFlags !== void 0 ? _client$allFlags : {}; 3038 /* 3039 * If we never care about switching changing 3040 * after page load then lets free up some 3041 * resources both on the client and on 3042 * launchDarkly's server 3043 * See https://launchdarkly.github.io/js-client-sdk/interfaces/_launchdarkly_js_client_sdk_.ldclient.html#close 3044 */ 3045 3046 client.close(); 3047 window.digitalData.merge('flag', allFlags); 3048 return Promise.resolve(allFlags); 3049 }).catch(catchHandler); 3050 return window.anfLDClientResponse; 3051 } catch (ewww) { 3052 return catchHandler(ewww); 3053 } 3054}); 3055 3056/* eslint-env amd,es6 */ 3057redesign.define('util/analytics/enum/globalDataPoint',[], function globalDataPointEnum() { 3058 'use strict'; 3059 /** 3060 * @readonly 3061 * @enum {string} 3062 */ 3063 3064 return Object.freeze({ 3065 EVENT_TYPE: 'event_type', 3066 EVENT_NAME: 'event_name', 3067 TEALIUM_EVENT: 'tealium_event', 3068 USER_STATE: 'user_state', 3069 USER_WCS_ID: 'user_wcs_id', 3070 USER_HASHED_EMAIL: 'user_hashed_email', 3071 USER_HASHED_PHONE: 'user_hashed_phone', 3072 USER_DEVICE_ID: 'user_device_id', 3073 USER_ZIP: 'user_zip', 3074 USER_DIGITAL_MARKETING_CONSENT: 'user_digital_marketing_consent', 3075 SITE_BRAND: 'site_brand', 3076 SITE_LANGUAGE: 'site_language', 3077 SITE_COUNTRY: 'site_country', 3078 SITE_CURRENCY: 'site_currency', 3079 SITE_PLATFORM: 'site_platform', 3080 SITE_DOMAIN: 'site_domain', 3081 PAGE_TYPE: 'page_type', 3082 PAGE_URL: 'page_url', 3083 MERCHANDISING_CATEGORY_ID: 'merchandising_category_id', 3084 LOCATION_WEB_STORE_ID: 'location_web_store_id', 3085 PAGE_FINDING_METHOD: 'page_finding_method', 3086 PAGE_VIEW_METHOD: 'page_view_method', 3087 PERSONALIZATION_TEST: 'personalization_test', 3088 PRODUCT_VIEW_METHOD: 'product_view_method', 3089 RCS_ID: 'rcs_id', 3090 TOTAL_CART_CONTENTS: 'total_cart_contents', 3091 AFSOURCE: 'afsource' 3092 }); 3093}); 3094 3095/* eslint-env amd,es6 */ 3096redesign.define('util/analytics/enum/dataPoint',[], function dataPointEnum() { 3097 'use strict'; 3098 /** 3099 * @readonly 3100 * @enum {string} 3101 */ 3102 3103 return Object.freeze({ 3104 ACCOUNT_ID: 'account_id', 3105 ADOBE_MARKETING_CLOUD_ID: 'adobe_marketing_cloud_id', 3106 BRAND: 'brand', 3107 BRAND_VIEWING: 'brand_viewing', 3108 CART_TOTAL: 'cart_total', 3109 CART_UNITS_ADDED: 'cart_units_added', 3110 CART_UNITS_REMOVED: 'cart_units_removed', 3111 CARTITEMS_LIST_TOTAL_LOCAL: 'cartItems_list_total_local', 3112 CARTITEMS_LIST_TOTAL_USD: 'cartItems_list_total_usd', 3113 CARTITEMS_OFFER_TOTAL_LOCAL: 'cartItems_offerTotal_local', 3114 CARTITEMS_OFFER_TOTAL_USD: 'cartItems_offerTotal_usd', 3115 CARTITEMS_SUB_TOTAL_LOCAL: 'cartItems_sub_total_local', 3116 CARTITEMS_SUB_TOTAL_USD: 'cartItems_sub_total_usd', 3117 CATEGORY_ID: 'category_id', 3118 CATEGORY_NAME: 'category_name', 3119 CATEGORY_HIERARCHY: 'category_hierarchy', 3120 COLLECTION_ID: 'collection_id', 3121 CURRENCY_CODE: 'currency_code', 3122 DEVICE_ID: 'device_id', 3123 DATA_ACTION: 'data_action', 3124 DATA_TEXT: 'data_text', 3125 DIGITAL_MARKETING_CONSENT_FLAG: 'digital_marketing_consent_flag', 3126 DOMAIN: 'domain',
3127 GLOBAL_PAGE_NAME: 'global_page_name', 3128 HASHED_EMAIL: 'hashed_email', 3129 INVENTORY: 'inventory', 3130 IS_MOBILE: 'is_mobile', 3131 KEY_ITEM_COLOR: 'key_item_color', 3132 LIST_PRICE: 'list_price', 3133 LIST_PRICE_USD: 'list_price_usd', 3134 LONG_SKU: 'long_sku', 3135 MERCHANDISING_CATEGORY_ID: 'merchandising_category_id', 3136 NUMBER_PROFILE_COMPLETE_FIELDS: 'number_profile_complete_fields', 3137 ORDER_BILLING_POSTAL_CODE: 'order_billing_postal_code', 3138 ORDER_HASHED_EMAIL: 'order_hashed_email', 3139 ORDER_NUMBER: 'order_number', 3140 ORDER_SUBTOTAL: 'order_subtotal_local', 3141 ORDER_SUBTOTAL_USD: 'order_subtotal_usd', 3142 ORDER_UNIT_TOTAL: 'order_unit_total', 3143 PAGE_TYPE: 'page_type', 3144 PAGE_URL: 'page_url', 3145 PAYMENT_METHOD: 'payment_method', 3146 PREFERRED_BROWSER_LANGUAGE: 'preferred_browser_language', 3147 PRICE_FLAG: 'price_flag', 3148 PRODUCT_GROUP: 'product_group', 3149 PRODUCT_QUANTITY: 'quantity', 3150 PROMOTION_ID: 'promotion_id', 3151 PROMOTION_COMP_ID: 'promotion_comp_id', 3152 PROMOTION_NAME: 'promotion_name', 3153 PROMOTION_QUANTITY: 'promotion_quantity', 3154 PROMOTION_AMOUNT: 'promotion_amount', 3155 PROMOTION_TOTAL_LOCAL: 'promotion_total_local', 3156 PROMOTION_TOTAL_USD: 'promotion_total_usd', 3157 PROMOTION_FLAG_IMPLICIT: 'promotion_flag_implicit', 3158 PROMOTION_FLAG_LOYALTY: 'promotion_flag_loyalty', 3159 PROMOTION_FLAG_FREESHIPPING: 'promotion_flag_freeshipping', 3160 PRICE_LIST_LOCAL: 'price_list_local', 3161 PRICE_LIST_USD: 'price_list_usd', 3162 PRICE_OFFER_LOCAL: 'price_offer_local', 3163 PRICE_OFFER_USD: 'price_offer_usd', 3164 PROFILE_COMPLETE_FIELDS: 'profile_complete_fields', 3165 PRODUCT_ID: 'product_id', 3166 PRODUCT_LONG_SKU: 'product_long_sku', 3167 PRODUCT_NAME: 'product_name', 3168 PRODUCT_RATING: 'product_rating', 3169 PRODUCT_SHORT_SKU: 'product_short_sku', 3170 SHORT_SKU: 'short_sku', 3171 PRODUCT_COLLECTION: 'collection', 3172 PRODUCT_BRAND: 'brand', 3173 SEARCH_FILTER_APPLIED_CATEGORY: 'search_filter_applied_category', 3174 SEARCH_FILTER_APPLIED_VALUE_NAME: 'search_filter_applied_value_name', 3175 SEARCH_SORT_VALUE: 'search_sort_value', 3176 SEARCH_TERM: 'search_term', 3177 SEARCH_BAR_SUGGESTION: 'search_bar_suggestion', 3178 SEARCH_BAR_CATEGORY: 'search_bar_category', 3179 SEARCH_RESULTS: 'search_results', 3180 SEARCH_CORRECTED_SEARCH_TERM: 'search_corrected_search_term', 3181 SEARCH_KIC: 'search_kic', 3182 SITE_LANGUAGE: 'site_language', 3183 SHIPPING_FLAG: 'shipping_flag', 3184 SHIPPING_LOCAL: 'shipping_local', 3185 SHIPPING_TYPE: 'shipping_type', 3186 SHIPPING_THRESHOLD: 'shipping_threshold', 3187 SHIPPING_USD: 'shipping_usd', 3188 SHORT_DESCRIPTOR: 'short_descriptor', 3189 SOLD_OUT_PDP: 'sold_out_pdp', 3190 SMS_FLAG: 'sms_flag', 3191 SUB_TOTAL_LOCAL: 'sub_total_local', 3192 SUB_TOTAL_USD: 'sub_total_usd', 3193 TAX: 'tax', 3194 TEALIUM_EVENT: 'tealium_event', 3195 TOTAL_LOCAL: 'total_local', 3196 TOTAL_PROFILE_COMPLETE_FIELDS: 'total_profile_complete_fields', 3197 TOTAL_USD: 'total_usd', 3198 USER_COUNTRY_PREFERENCE: 'user_country_preference', 3199 USER_STATE: 'user_state', 3200 WEBSPHERE_VISITOR_ID: 'websphere_visitor_id', 3201 WEB_STORE_ID: 'web_store_id', 3202 ORDER_ID: 'order_id', 3203 ORDER_PAYMENT_METHOD: 'order.payment_method', 3204 ORDER_PROMOTION_TOTAL_LOCAL: 'order.promotion_total_local', 3205 ORDER_PROMOTION_TOTAL_USD: 'order.promotion_total_usd', 3206 ORDER_SHIPPING_FLAG: 'order.shippingFlag', 3207 ORDER_SHIPPING_LOCAL: 'order.shipping_local', 3208 ORDER_SHIPPING_USD: 'order.shipping_usd', 3209 ORDER_SUB_TOTAL: 'order.subtotal_local', 3210 ORDER_SUB_TOTAL_USD: 'order.subtotal_usd', 3211 ORDER_TAX: 'order.tax', 3212 ORDER_TOTAL_LOCAL: 'order.total_local', 3213 ORDER_TOTAL_USD: 'order.total_usd', 3214 ORDER_VAT: 'order.VAT', 3215 QUANTITY: 'quantity', 3216 VAT: 'vat', 3217 LOYALTY_VIP_STATUS: 'loyalty_vip_status', 3218 LOYALTY_POINTS: 'loyalty_points', 3219 LOYALTY_TO_NEXT_REWARD: 'loyalty_to_next_reward', 3220 LOYALTY_JOIN_DATE: 'loyalty_join_date', 3221 RANGE_FIRST_DATE: 'range_first_date', 3222 RANGE_LAST_DATE: 'range_last_date', 3223 RCS_ID: 'rcs_id', 3224 RECOMMENDATIONS: 'recommendations', 3225 PRODUCT_RECOMMENDATION_POSITION: 'product_recommendation_position', 3226 PRODUCT_RECOMMENDATION_PLACEMENT: 'product_recommendation_placement', 3227 PAGE_DESCRIPTION: 'page_description', 3228 SWATCH_COLOR: 'swatch_color', 3229 KEEP_ME_LOGGED_IN_FLAG: 'keep_me_logged_in_flag', 3230 PRODUCT_BADGE: 'product_badge', 3231 GRID_PRODUCT_POSITION: 'grid_product_position', 3232 ESTIMATED_DELIVERY: 'estimated_delivery', 3233 SOCIAL_PROOFING: 'social_proofing', 3234 STICKY_ATB: 'sticky_atb', 3235 VERTEX_ATTRIBUTION_TOKEN: 'vertex_attribution_token' 3236 }); 3237}); 3238 3239/* eslint-env amd,es6 */ 3240redesign.define('util/analytics/enum/eventName',[], function eventNameEnum() { 3241 'use strict'; 3242 /** 3243 * @readonly 3244 * @enum {string} 3245 */ 3246 3247 return Object.freeze({ 3248 ACTION: Object.freeze({ 3249 ACCOUNT_CREATE: 'account_create_success', 3250 ADD_TO_BAG: 'add_to_cart', 3251 LOGIN_SUCCESS: 'login_success', 3252 REMOVE_FROM_BAG: 'remove_from_cart', 3253 SAVE_FOR_LATER: 'save_for_later', 3254 FILTER_APPLIED: 'filter_applied', 3255 SORT_APPLIED: 'sort_applied', 3256 REMOVE_FROM_SAVES: 'remove_from_saves', 3257 SWATCH_CLICK: 'swatch_click', 3258 PDP: 'product_detail' 3259 }), 3260 VIEW: Object.freeze({ 3261 SHOPPING_CART: 'shopping_cart', 3262 CATEGORY: 'category', 3263 CHECKOUT: 'checkout', 3264 MY_ACCOUNT: 'my_account', 3265 ERROR: 'error', 3266 EXPERIENCE: 'experience', 3267 HELP: 'help', 3268 HOMEPAGE: 'homepage', 3269 MY_SAVES: 'my_saves', 3270 ORDER_CONFIRMATION: 'order_confirmation', 3271 PDP: 'product_detail', 3272 QUICK_VIEW: 'quick_view', 3273 SEARCH: 'search', 3274 STORE_LOCATOR: 'store_locator', 3275 RECOMMENDATION_LOAD: 'recommendation_load' 3276 }) 3277 }); 3278}); 3279 3280/* eslint-env amd,es6 */ 3281redesign.define('util/analytics/enum/eventType',[], function eventTypeEnum() { 3282 'use strict'; 3283 3284 var ACTION = Symbol('Analytics:EventType:Action'); 3285 var VIEW = Symbol('Analytics:EventType:View'); 3286 /** 3287 * @readonly 3288 * @enum {string} 3289 */ 3290 3291 return Object.freeze({ 3292 ACTION: ACTION, 3293 VIEW: VIEW, 3294 ORDER: 'order', 3295 PRODUCT: 'product', 3296 SEARCH: 'search', 3297 SEARCH_BAR: 'search bar', 3298 USER: 'user', 3299 FILTER: 'filter', 3300 EXPERIENCE: 'experience', 3301 ALGONOMY_LOADED: 'algonomy loaded' 3302 }); 3303}); 3304 3305function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 3306 3307function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } 3308 3309function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 3310 3311function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 3312 3313/* eslint-env amd,es6 */ 3314redesign.define('lib/deepFreeze',[], function recursiveFreeze() { 3315 'use strict'; 3316 /** 3317 * Code snippet from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze 3318 */ 3319 3320 function deepFreeze(object) { 3321 // Retrieve the property names defined on object 3322 var propNames = Object.getOwnPropertyNames(object); // Freeze properties before freezing self 3323 3324 var _iterator = _createForOfIteratorHelper(propNames), 3325 _step; 3326 3327 try { 3328 for (_iterator.s();
3328 !(_step = _iterator.n()).done;) { 3329 var name = _step.value; 3330 var value = object[name]; 3331 3332 if (value && _typeof(value) === 'object') { 3333 deepFreeze(value); 3334 } 3335 } 3336 } catch (err) { 3337 _iterator.e(err); 3338 } finally { 3339 _iterator.f(); 3340 } 3341 3342 return Object.freeze(object); 3343 } 3344 3345 return deepFreeze; 3346}); 3347 3348/* eslint-env amd,es6 */ 3349redesign.define('util/analytics/enum/subscriptionName',['util/analytics/enum/eventName', 'lib/deepFreeze'], function subscriptionNameEnum(EVENT_NAME, deepFreeze) { 3350 'use strict'; 3351 /** 3352 * @readonly 3353 * @enum {string} 3354 */ 3355 3356 return deepFreeze({ 3357 ACTION: { 3358 ACCOUNT_CREATE: "analytics.".concat(EVENT_NAME.ACTION.ACCOUNT_CREATE), 3359 ADD_TO_BAG: "analytics.".concat(EVENT_NAME.ACTION.ADD_TO_BAG), 3360 LOGIN_SUCCESS: "analytics.".concat(EVENT_NAME.ACTION.LOGIN_SUCCESS), 3361 REMOVE_FROM_BAG: "analytics.".concat(EVENT_NAME.ACTION.REMOVE_FROM_BAG), 3362 SAVE_FOR_LATER: "analytics.".concat(EVENT_NAME.ACTION.SAVE_FOR_LATER), 3363 FILTER_APPLIED: "analytics.".concat(EVENT_NAME.ACTION.FILTER_APPLIED), 3364 SORT_APPLIED: "analytics.".concat(EVENT_NAME.ACTION.SORT_APPLIED), 3365 REMOVE_FROM_SAVES: "analytics.".concat(EVENT_NAME.ACTION.REMOVE_FROM_SAVES), 3366 SWATCH_CLICK: "analytics.".concat(EVENT_NAME.ACTION.SWATCH_CLICK) 3367 }, 3368 VIEW: { 3369 SHOPPING_CART: "analytics.".concat(EVENT_NAME.VIEW.SHOPPING_CART), 3370 CATEGORY: "analytics.".concat(EVENT_NAME.VIEW.CATEGORY), 3371 CHECKOUT: 'analytics.checkout_delayed', 3372 MY_ACCOUNT: "analytics.".concat(EVENT_NAME.VIEW.MY_ACCOUNT), 3373 ERROR: "analytics.".concat(EVENT_NAME.VIEW.ERROR), 3374 EXPERIENCE: "analytics.".concat(EVENT_NAME.VIEW.EXPERIENCE), 3375 HELP: "analytics.".concat(EVENT_NAME.VIEW.HELP), 3376 HOMEPAGE: "analytics.".concat(EVENT_NAME.VIEW.HOMEPAGE), 3377 MY_SAVES: "analytics.".concat(EVENT_NAME.VIEW.MY_SAVES), 3378 ORDER_CONFIRMATION: "analytics.".concat(EVENT_NAME.VIEW.ORDER_CONFIRMATION), 3379 PDP: "analytics.".concat(EVENT_NAME.VIEW.PDP), 3380 QUICK_VIEW: "analytics.".concat(EVENT_NAME.VIEW.QUICK_VIEW), 3381 RECOMMENDATION_LOAD: 'analytics.recs_loaded', 3382 SEARCH: "analytics.".concat(EVENT_NAME.VIEW.SEARCH), 3383 SEARCH_LOADED: 'search.search_loaded', 3384 STORE_LOCATOR: "analytics.".concat(EVENT_NAME.VIEW.STORE_LOCATOR), 3385 PICKED_FOR_YOU: 'analytics.picked_for_you' 3386 } 3387 }); 3388}); 3389 3390/* eslint-env amd,es6 */ 3391redesign.define('util/analytics/enum/pageDescription',[], function pageDescriptionEnum() { 3392 'use strict'; 3393 /** 3394 * @readonly 3395 * @enum {string} 3396 */ 3397 3398 return Object.freeze({ 3399 SHOPPING_CART: 'bag', 3400 CATEGORY: 'category', 3401 CHECKOUT: 'checkout', 3402 ERROR: 'error', 3403 EXPERIENCE: 'about us', 3404 HELP: 'help', 3405 HOMEPAGE: 'homepage', 3406 MY_ACCOUNT: 'my account', 3407 MY_SAVES: 'my saves', 3408 ORDER_CONFIRMATION: 'order confirmation', 3409 PDP: 'product', 3410 QUICK_VIEW: 'quickview', 3411 SEARCH: 'search', 3412 STORE_LOCATOR: 'store locator', 3413 PICKED_FOR_YOU: 'picked for you' 3414 }); 3415}); 3416 3417function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3418 3419/* eslint-env amd,es6 */ 3420redesign.define('util/analytics/event/view/checkout',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'util/analytics/enum/pageDescription', 'lib/deepFreeze'], function checkoutViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, PAGE_DESCRIPTION, deepFreeze) { 3421 'use strict'; 3422 3423 var _constants; 3424 3425 return deepFreeze({ 3426 eventName: EVENT_NAME.VIEW.CHECKOUT, 3427 subscriptionName: SUBSCRIPTION_NAME.VIEW.CHECKOUT, 3428 eventType: EVENT_TYPE.VIEW, 3429 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.ORDER), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.CHECKOUT), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.CHECKOUT), _defineProperty(_constants, DATA_POINT.PAGE_DESCRIPTION, PAGE_DESCRIPTION.CHECKOUT), _constants), 3430 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION, DATA_POINT.BRAND, DATA_POINT.COLLECTION_ID, DATA_POINT.KEY_ITEM_COLOR, DATA_POINT.LONG_SKU, DATA_POINT.SHORT_SKU, DATA_POINT.PRICE_FLAG, DATA_POINT.PRICE_LIST_LOCAL, DATA_POINT.PRICE_LIST_USD, DATA_POINT.PRICE_OFFER_LOCAL, DATA_POINT.PRICE_OFFER_USD, DATA_POINT.PRODUCT_ID, DATA_POINT.CARTITEMS_LIST_TOTAL_LOCAL, DATA_POINT.CARTITEMS_LIST_TOTAL_USD, DATA_POINT.CARTITEMS_SUB_TOTAL_LOCAL, DATA_POINT.CARTITEMS_SUB_TOTAL_USD, DATA_POINT.CARTITEMS_OFFER_TOTAL_LOCAL, DATA_POINT.CARTITEMS_OFFER_TOTAL_USD, DATA_POINT.QUANTITY, DATA_POINT.INVENTORY, DATA_POINT.SHIPPING_LOCAL, DATA_POINT.SHIPPING_USD, DATA_POINT.SHIPPING_FLAG, DATA_POINT.TAX, DATA_POINT.PROMOTION_ID, DATA_POINT.PROMOTION_COMP_ID, DATA_POINT.PROMOTION_NAME, DATA_POINT.PROMOTION_QUANTITY, DATA_POINT.PROMOTION_AMOUNT, DATA_POINT.PROMOTION_TOTAL_LOCAL, DATA_POINT.PROMOTION_TOTAL_USD, DATA_POINT.PRODUCT_NAME, DATA_POINT.CATEGORY_NAME, DATA_POINT.ESTIMATED_DELIVERY, DATA_POINT.RANGE_FIRST_DATE, DATA_POINT.RANGE_LA
3430ST_DATE], 3431 optional: [], 3432 remap: {} 3433 }); 3434}); 3435 3436/* eslint-env amd,es6 */ 3437redesign.define('util/analytics/enum/pageType',[], function pageTypeEnum() { 3438 'use strict'; 3439 /** 3440 * @readonly 3441 * @enum {string} 3442 */ 3443 3444 return Object.freeze({ 3445 SHOPPING_CART: 'cart', 3446 CATEGORY: 'category', 3447 CHECKOUT: 'checkout', 3448 ERROR: 'error', 3449 EXPERIENCE: 'experience', 3450 HELP: 'help', 3451 HOMEPAGE: 'homepage', 3452 MY_ACCOUNT: 'my_account', 3453 MY_SAVES: 'my_saves', 3454 ORDER_CONFIRMATION: 'order_confirmation', 3455 PDP: 'product', 3456 QUICK_VIEW: 'quickview', 3457 SEARCH: 'search', 3458 STORE_LOCATOR: 'store_locator' 3459 }); 3460}); 3461 3462function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3463 3464/* eslint-env amd,es6 */ 3465redesign.define('util/analytics/event/view/customer',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/pageType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function customerViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, PAGE_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 3466 'use strict'; 3467 3468 var _constants; 3469 3470 return deepFreeze({ 3471 eventName: EVENT_NAME.VIEW.MY_ACCOUNT, 3472 subscriptionName: SUBSCRIPTION_NAME.VIEW.MY_ACCOUNT, 3473 eventType: EVENT_TYPE.VIEW, 3474 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.USER), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.MY_ACCOUNT), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.MY_ACCOUNT), _constants), 3475 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION, DATA_POINT.NUMBER_PROFILE_COMPLETE_FIELDS, DATA_POINT.TOTAL_PROFILE_COMPLETE_FIELDS, DATA_POINT.PROFILE_COMPLETE_FIELDS], 3476 optional: [DATA_POINT.DEVICE_ID, DATA_POINT.ACCOUNT_ID, DATA_POINT.WEBSPHERE_VISITOR_ID, DATA_POINT.GLOBAL_PAGE_NAME, DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.CURRENCY_CODE, DATA_POINT.DIGITAL_MARKETING_CONSENT_FLAG, DATA_POINT.DOMAIN, DATA_POINT.IS_MOBILE, DATA_POINT.PAGE_TYPE, DATA_POINT.PAGE_URL, DATA_POINT.PREFERRED_BROWSER_LANGUAGE, DATA_POINT.SITE_LANGUAGE, DATA_POINT.USER_STATE, DATA_POINT.WEB_STORE_ID, DATA_POINT.BRAND_VIEWING, DATA_POINT.MERCHANDISING_CATEGORY_ID, DATA_POINT.USER_COUNTRY_PREFERENCE, DATA_POINT.LOYALTY_VIP_STATUS, DATA_POINT.LOYALTY_POINTS, DATA_POINT.LOYALTY_TO_NEXT_REWARD, DATA_POINT.LOYALTY_JOIN_DATE], 3477 remap: {} 3478 }); 3479}); 3480 3481function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3482 3483/* eslint-env amd,es6 */ 3484redesign.define('util/analytics/event/view/error',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/pageType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function errorViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, PAGE_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 3485 'use strict'; 3486 3487 var _constants; 3488 3489 return deepFreeze({ 3490 eventName: EVENT_NAME.VIEW.ERROR, 3491 subscriptionName: SUBSCRIPTION_NAME.VIEW.ERROR, 3492 eventType: EVENT_TYPE.VIEW, 3493 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.PAGE_TYPE, PAGE_TYPE.ERROR), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.ERROR), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.ERROR), _constants), 3494 required: [GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION], 3495 optional: [] 3496 }); 3497}); 3498 3499function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3500 3501/* eslint-env amd,es6 */ 3502redesign.define('util/analytics/event/view/experience',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'util/analytics/enum/pageDescription', 'lib/deepFreeze'], function experienceVie
3502wEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, PAGE_DESCRIPTION, deepFreeze) { 3503 'use strict'; 3504 3505 var _constants; 3506 3507 return deepFreeze({ 3508 eventName: EVENT_NAME.VIEW.EXPERIENCE, 3509 subscriptionName: SUBSCRIPTION_NAME.VIEW.EXPERIENCE, 3510 eventType: EVENT_TYPE.VIEW, 3511 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.EXPERIENCE), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.EXPERIENCE), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.EXPERIENCE), _constants), 3512 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION], 3513 optional: [DATA_POINT.ACCOUNT_ID, DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.DEVICE_ID, DATA_POINT.GLOBAL_PAGE_NAME, DATA_POINT.WEBSPHERE_VISITOR_ID, DATA_POINT.CURRENCY_CODE, DATA_POINT.DIGITAL_MARKETING_CONSENT_FLAG, DATA_POINT.DOMAIN, DATA_POINT.IS_MOBILE, DATA_POINT.PAGE_TYPE, DATA_POINT.PAGE_URL, DATA_POINT.PREFERRED_BROWSER_LANGUAGE, DATA_POINT.SITE_LANGUAGE, DATA_POINT.USER_STATE, DATA_POINT.WEB_STORE_ID, DATA_POINT.BRAND_VIEWING, DATA_POINT.MERCHANDISING_CATEGORY_ID, DATA_POINT.USER_COUNTRY_PREFERENCE], 3514 remap: {} 3515 }); 3516}); 3517 3518function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3519 3520/* eslint-env amd,es6 */ 3521redesign.define('util/analytics/event/view/help',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function helpViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 3522 'use strict'; 3523 3524 var _constants; 3525 3526 return deepFreeze({ 3527 eventName: EVENT_NAME.VIEW.HELP, 3528 subscriptionName: SUBSCRIPTION_NAME.VIEW.HELP, 3529 eventType: EVENT_TYPE.VIEW, 3530 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.USER), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.HELP), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.HELP), _constants), 3531 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION], 3532 optional: [DATA_POINT.ACCOUNT_ID, DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.DEVICE_ID, DATA_POINT.GLOBAL_PAGE_
3532NAME, DATA_POINT.WEBSPHERE_VISITOR_ID, DATA_POINT.CURRENCY_CODE, DATA_POINT.DIGITAL_MARKETING_CONSENT_FLAG, DATA_POINT.DOMAIN, DATA_POINT.IS_MOBILE, DATA_POINT.PAGE_TYPE, DATA_POINT.PAGE_URL, DATA_POINT.PREFERRED_BROWSER_LANGUAGE, DATA_POINT.SITE_LANGUAGE, DATA_POINT.USER_STATE, DATA_POINT.WEB_STORE_ID, DATA_POINT.BRAND_VIEWING, DATA_POINT.MERCHANDISING_CATEGORY_ID, DATA_POINT.USER_COUNTRY_PREFERENCE], 3533 remap: {} 3534 }); 3535}); 3536 3537function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3538 3539/* eslint-env amd,es6 */ 3540redesign.define('util/analytics/event/view/homePage',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'util/analytics/enum/pageDescription', 'lib/deepFreeze'], function homeViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, PAGE_DESCRIPTION, deepFreeze) { 3541 'use strict'; 3542 3543 var _constants; 3544 3545 return deepFreeze({ 3546 eventName: EVENT_NAME.VIEW.HOMEPAGE, 3547 subscriptionName: SUBSCRIPTION_NAME.VIEW.HOMEPAGE, 3548 eventType: EVENT_TYPE.VIEW, 3549 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.USER), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.HOMEPAGE), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.HOMEPAGE), _defineProperty(_constants, DATA_POINT.PAGE_DESCRIPTION, PAGE_DESCRIPTION.HOMEPAGE), _constants), 3550 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION], 3551 optional: [DATA_POINT.ACCOUNT_ID, DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.DEVICE_ID, DATA_POINT.GLOBAL_PAGE_NAME, DATA_POINT.WEBSPHERE_VISITOR_ID, DATA_POINT.CURRENCY_CODE, DATA_POINT.DIGITAL_MARKETING_CONSENT_FLAG, DATA_POINT.DOMAIN, DATA_POINT.IS_MOBILE, DATA_POINT.PAGE_TYPE, DATA_POINT.PAGE_URL, DATA_POINT.PREFERRED_BROWSER_LANGUAGE, DATA_POINT.SITE_LANGUAGE, DATA_POINT.USER_STATE, DATA_POINT.WEB_STORE_ID, DATA_POINT.BRAND_VIEWING, DATA_POINT.MERCHANDISING_CATEGORY_ID, DATA_POINT.USER_COUNTRY_PREFERENCE], 3552 remap: {} 3553 }); 3554}); 3555 3556function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3557 3558/* eslint-env amd,es6 */ 3559redesign.define('util/analytics/event/view/mySaves',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'util/analytics/enum/pageDescription', 'lib/deepFreeze'], function mySavesViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, PAGE_DESCRIPTION, deepFreeze) { 3560 'use strict'; 3561 3562 var _constants; 3563 3564 return deepFreeze({ 3565 eventName: EVENT_NAME.VIEW.MY_SAVES, 3566 subscriptionName: SUBSCRIPTION_NAME.VIEW.MY_SAVES, 3567 eventType: EVENT_TYPE.VIEW, 3568 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.USER), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.MY_SAVES), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.MY_SAVES), _defineProperty(_constants, DATA_POINT.PAGE_DESCRIPTION, PAGE_DESCRIPTION.MY_SAVES), _constants), 3569 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION, DATA_POINT.PRODUCT_NAME], 3570 optional: [DATA_POINT.ACCOUNT_ID, DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.DEVICE_ID, DATA_POINT.GLOBAL_PAGE_
3570NAME, DATA_POINT.WEBSPHERE_VISITOR_ID, DATA_POINT.CURRENCY_CODE, DATA_POINT.DIGITAL_MARKETING_CONSENT_FLAG, DATA_POINT.DOMAIN, DATA_POINT.IS_MOBILE, DATA_POINT.PAGE_TYPE, DATA_POINT.PAGE_URL, DATA_POINT.PREFERRED_BROWSER_LANGUAGE, DATA_POINT.SITE_LANGUAGE, DATA_POINT.USER_STATE, DATA_POINT.WEB_STORE_ID, DATA_POINT.BRAND_VIEWING, DATA_POINT.MERCHANDISING_CATEGORY_ID, DATA_POINT.USER_COUNTRY_PREFERENCE], 3571 remap: {} 3572 }); 3573}); 3574 3575function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3576 3577/* eslint-env amd,es6 */ 3578redesign.define('util/analytics/event/view/pdp',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function productViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 3579 'use strict'; 3580 3581 var _constants; 3582 3583 return deepFreeze({ 3584 eventName: EVENT_NAME.VIEW.PDP, 3585 subscriptionName: SUBSCRIPTION_NAME.VIEW.PDP, 3586 eventType: EVENT_TYPE.VIEW, 3587 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.PRODUCT), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.PDP), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.PDP), _constants), 3588 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION, DATA_POINT.BRAND, DATA_POINT.CATEGORY_ID, DATA_POINT.COLLECTION_ID, DATA_POINT.INVENTORY, DATA_POINT.KEY_ITEM_COLOR, DATA_POINT.LONG_SKU, DATA_POINT.PRICE_FLAG, DATA_POINT.PRICE_LIST_LOCAL, DATA_POINT.PRICE_LIST_USD, DATA_POINT.PRICE_OFFER_LOCAL, DATA_POINT.PRICE_OFFER_USD, DATA_POINT.PRODUCT_GROUP, DATA_POINT.PRODUCT_ID, DATA_POINT.PRODUCT_RATING, DATA_POINT.CATEGORY_NAME, DATA_POINT.PRODUCT_NAME, DATA_POINT.SWATCH_COLOR, DATA_POINT.PRODUCT_BADGE, DATA_POINT.GRID_PRODUCT_POSITION, DATA_POINT.SHORT_DESCRIPTOR, DATA_POINT.SOLD_OUT_PDP, DATA_POINT.DATA_TEXT, DATA_POINT.DATA_ACTION], 3589 optional: [], 3590 remap: {} 3591 }); 3592}); 3593 3594function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3595 3596/* eslint-env amd,es6 */ 3597redesign.define('util/analytics/event/view/search',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function searchViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 3598 'use strict'; 3599 3600 var _constants; 3601 3602 return deepFreeze({ 3603 eventName: EVENT_NAME.VIEW.SEARCH, 3604 subscriptionName: SUBSCRIPTION_NAME.VIEW.SEARCH_LOADED, 3605 eventType: EVENT_TYPE.VIEW, 3606 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.SEARCH_BAR), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.SEARCH), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.SEARCH), _constants), 3607 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION, DATA_POINT.SEARCH_TERM, DATA_POINT.SEARCH_BAR_SUGGESTION, DATA_POINT.SEARCH_BAR_CATEGORY, DATA_POINT.SEARCH_RESULTS, DATA_POINT.SEARCH_CORRECTED_SEARCH_TERM, DATA_POINT.DATA_ACTION, DATA_POINT.DATA_TEXT, DATA_POINT.PRODUCT_RECOMMENDATION_POSITION, DATA_POINT.PRODUCT_RECOMMENDATION_PLACEMENT, DATA_POINT.SEARCH_KIC, DATA_POINT.VERTEX_ATTRIBUTION_TOKEN], 3608 optional: [], 3609 remap: {} 3610 }); 3611}); 3612 3613function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3614 3615/* eslint-env amd,es6 */ 3616redesign.define('util/analytics/event/view/storeLocator',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/pageType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function storeLocatorViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, PAGE_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 3617 'use strict'; 3618 3619 var _constants; 3620 3621 return deepFreeze({ 3622 eventName: EVENT_NAME.VIEW.STORE_LOCATOR, 3623 subscriptionName: SUBSCRIPTION_NAME.VIEW.STORE_LOCATOR, 3624 eventType: EVENT_TYPE.VIEW, 3625 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, PAGE_TYPE.STORE_LOCATOR), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.STORE_LOCATOR), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.STORE_LOCATOR), _constants), 3626 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE], 3627 optional: [DATA_POINT.ACCOUNT_ID, DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.DEVICE_ID, DATA_POINT.GLOBAL_PAGE_
3627NAME, DATA_POINT.WEBSPHERE_VISITOR_ID, DATA_POINT.CURRENCY_CODE, DATA_POINT.DIGITAL_MARKETING_CONSENT_FLAG, DATA_POINT.DOMAIN, DATA_POINT.IS_MOBILE, DATA_POINT.PAGE_TYPE, DATA_POINT.PAGE_URL, DATA_POINT.PREFERRED_BROWSER_LANGUAGE, DATA_POINT.SITE_LANGUAGE, DATA_POINT.USER_STATE, DATA_POINT.WEB_STORE_ID, DATA_POINT.BRAND_VIEWING, DATA_POINT.MERCHANDISING_CATEGORY_ID, DATA_POINT.USER_COUNTRY_PREFERENCE], 3628 remap: {} 3629 }); 3630}); 3631 3632function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3633 3634/* eslint-env amd,es6 */ 3635redesign.define('util/analytics/event/view/pickedForYou',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'util/analytics/enum/pageDescription', 'lib/deepFreeze'], function experienceViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, PAGE_DESCRIPTION, deepFreeze) { 3636 'use strict'; 3637 3638 var _constants; 3639 3640 return deepFreeze({ 3641 eventName: EVENT_NAME.VIEW.EXPERIENCE, 3642 subscriptionName: SUBSCRIPTION_NAME.VIEW.PICKED_FOR_YOU, 3643 eventType: EVENT_TYPE.VIEW, 3644 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.EXPERIENCE), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.EXPERIENCE), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.EXPERIENCE), _defineProperty(_constants, DATA_POINT.PAGE_DESCRIPTION, PAGE_DESCRIPTION.PICKED_FOR_YOU), _constants), 3645 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION], 3646 optional: [], 3647 remap: {} 3648 }); 3649}); 3650 3651/* eslint-env amd,es6 */ 3652redesign.define('util/analytics/event/view/index',['util/analytics/event/view/checkout', 'util/analytics/event/view/customer', 'util/analytics/event/view/error', 'util/analytics/event/view/experience', 'util/analytics/event/view/help', 'util/analytics/event/view/homePage', 'util/analytics/event/view/mySaves', 'util/analytics/event/view/pdp', 'util/analytics/event/view/search', 'util/analytics/event/view/storeLocator', 'util/analytics/event/view/pickedForYou'], function viewEventConfigIndex(checkout, customer, error, experience, help, homePage, mySaves, pdp, search, storeLocator, pickedForYou) { 3653 'use strict'; 3654 3655 return { 3656 checkout: checkout, 3657 customer: customer, 3658 error: error, 3659 experience: experience, 3660 help: help, 3661 homePage: homePage, 3662 mySaves: mySaves, 3663 pdp: pdp, 3664 search: search, 3665 storeLocator: storeLocator, 3666 pickedForYou: pickedForYou 3667 }; 3668}); 3669 3670/* eslint-env amd,es6 */ 3671redesign.define('util/analytics/pageView',['util/analytics/event/view/index'], function pageLoadAnalyticsTrigger(analyticsViewEvents) { 3672 'use strict'; 3673 3674 var _window, _window$digitalData, _window2, _window2$digitalData, _window3, _window3$digitalData, _window4, _window4$digitalData, _window5, _window5$digitalData, _window6, _window6$digitalData, _window7, _window7$digitalData; 3675 3676 var triggerEvents = { 3677 category: { 3678 subscriptionName: 'analytics.category' 3679 }, 3680 error: ((_window = window) === null || _window === void 0 ? void 0 : (_window$digitalData = _window.digitalData) === null || _window$digitalData === void 0 ? void 0 : _window$digitalData.get('flag.analytics-adapter-error-page')) === true ? '' : analyticsViewEvents.error, 3681 experience: ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$digitalData = _window2.digitalData) === null || _window2$digitalData === void 0 ? void 0 : _window2$digitalData.get('flag.analytics-adapter-experience')) === true ? '' : analyticsViewEvents.experience, 3682 pickedForYou: analyticsViewEvents.pickedForYou, 3683 help: analyticsViewEvents.help, 3684 home: ((_window3 = window) === null || _window3 === void 0 ? void 0 : (_window3$digitalData = _window3.digitalData) === null || _window3$digitalData === void 0 ? void 0 : _window3$digitalData.get('flag.analytics-adapter-homepage')) === true ? '' : analyticsViewEvents.homePage, 3685 myAccount: ((_window4 = window) === null || _window4 === void 0 ? void 0 : (_window4$digitalData = _window4.digitalData) === null || _window4$digitalData === void 0 ? void 0 : _window4$digitalData.get('flag.analytics-adapter-my-account')) === true ? '' : analyticsViewEvents.customer, 3686 mySaves: ((_window5 = window) === null || _window5 === void 0 ? void 0 : (_window5$digitalData = _window5.digitalData) === null || _window5$digitalData === void 0 ? void 0 : _window5$digitalData.get('flag.analytics-adapter-my-saves')) === true ? '' : analyticsViewEvents.mySaves, 3687 productDetail: ((_window6 = window) === null || _window6 === void 0 ? void 0 : (_window6$digitalData = _window6.digitalData) === null || _window6$digitalData === void 0 ? void 0 : _window6$digitalData.get('flag.analytics-adapter-pdp')) === true ? '' : analyticsViewEvents.pdp, 3688 search: ((_window7 = window) === null || _window7 === void 0 ? void 0 : (_window7$digitalData = _window7.digitalData) === null || _window7$digitalData === void 0 ? void 0 : _window7$digitalData.get('flag.analytics-adapter-search')) === true ? '' : analyticsViewEvents.search, 3689 shoppingCart: { 3690 subscriptionName: 'analytics.shopping_cart' 3691 }, 3692 storeLocator: analyticsViewEvents.storeLocator 3693 }; 3694 return function () { 3695 var _document, _document$body, _document$body$datase, _triggerEvents$id; 3696 3697 var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, 3698 _ref$id = _ref.id, 3699 id = _ref$id === void 0 ? (_document = document) === null || _document === void 0 ? void 0 : (_document$body = _document.body) === null || _document$body === void 0 ? void 0 : (_document$body$datase = _document$body.dataset) === null || _document$body$datase === void 0 ? void 0 : _document$body$datase.analyticsKey : _ref$id; 3700 3701 return triggerEvents === null || triggerEvents === void 0 ? void 0 : (_triggerEvents$id = triggerEvents[id]) === null || _triggerEvents$id === void 0 ? void 0 : _triggerEvents$id.subscriptionName; 3702 }; 3703}); 3704 3705/* eslint-env amd,es6 */
3706redesign.define('util/analytics/pageLoadEventHandler',['anfUtil/constants', 'util/analytics/pageView'], function pageLoadHandler(constants, pageView) { 3707 'use strict'; 3708 /** 3709 * Determines if the current region is enabled for Algonomy analytics. 3710 * Checks if the site is US, CA, UK, or EU. 3711 * @private 3712 * @returns {boolean} True if Algonomy analytics is enabled for the region, otherwise false. 3713 */ 3714 3715 var isAlgonomyEnabledRegion = function isAlgonomyEnabledRegion() { 3716 return constants.anf('params.storeAttributes.siteList.isUSSite') || constants.anf('params.storeAttributes.siteList.isCASite') || constants.anf('params.storeAttributes.siteList.isUKSite') || constants.anf('params.storeAttributes.siteList.isEUSite'); 3717 }; 3718 3719 var shouldCallAlgonomy = isAlgonomyEnabledRegion(); 3720 var currentPageLoadEvent = pageView(); 3721 var NFL_SWEEPSTAKES_PATH = /SuperBowlSweepstakes/i; 3722 3723 var shouldSkipLegacyExperiencePageLoad = function shouldSkipLegacyExperiencePageLoad() { 3724 var _window$digitalData, _window$digitalData2; 3725 3726 var path = ((_window$digitalData = window.digitalData) === null || _window$digitalData === void 0 ? void 0 : _window$digitalData.get('page.url.path')) || ''; 3727 if (!NFL_SWEEPSTAKES_PATH.test(path)) return false; 3728 return ((_window$digitalData2 = window.digitalData) === null || _window$digitalData2 === void 0 ? void 0 : _window$digitalData2.get('flag.enable-nfl-sweepstakes-golden-state-analytics')) === true; 3729 }; 3730 3731 var triggerPageLoadEventWithAlgonomy = function triggerPageLoadEventWithAlgonomy() { 3732 var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : currentPageLoadEvent; 3733 var isAlgonomySetOnSite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : shouldCallAlgonomy; 3734 setFlagAfterLoginOrSignupEvent(); 3735 if (!checkFlagAfterLoginEvent(event, true)) return false; 3736 if (shouldSkipLegacyExperiencePageLoad()) return false; 3737 3738 if (isAlgonomySetOnSite) { 3739 window.digitalData.subscribe('event:analytics.recs_loaded', function () { 3740 var hasBeenTriggeredAlgonomy = window.digitalData.get('algonomy.hasBeenTriggered') ? true : false; 3741 3742 if (!hasBeenTriggeredAlgonomy) { 3743 window.digitalData.trigger(event); 3744 window.digitalData.set('algonomy.hasBeenTriggered', true); 3745 } 3746 }); 3747 return true; 3748 } 3749 3750 return false; 3751 }; 3752 3753 var triggerDefaultPageLoadEvent = function triggerDefaultPageLoadEvent() { 3754 var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : currentPageLoadEvent; 3755 var isAlgonomySetOnSite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : shouldCallAlgonomy; 3756 setFlagAfterLoginOrSignupEvent(); 3757 if (!checkFlagAfterLoginEvent(event)) return false; 3758 if (shouldSkipLegacyExperiencePageLoad()) return false; 3759 if (!isAlgonomySetOnSite) return window.digitalData.trigger(event); 3760 var fakeAlgonomyPagesKindList = ['marketing', 'experience', 'error', 'division']; 3761 var fakeAlgonomyPagesNameList = ['help:', 'fierce', 'error']; 3762 var pageKind = window.digitalData.get('page.pageKind'); 3763 var pageName = window.digitalData.get('page.pageName'); 3764 var isSearchPageWithoutResults = pageKind === 'search' && Number(window.digitalData.get('search.search_bar_used.search_results')) === 0; 3765 var isPageWithFakeAlgonomy = fakeAlgonomyPagesKindList.includes(pageKind) || fakeAlgonomyPagesNameList.includes(pageName); 3766 var hasBeenTriggeredAlgonomy = window.digitalData.get('algonomy.hasBeenTriggered') ? true : false; 3767 var isProductPage = pageKind === 'product'; 3768 var isWriteAReviewPage = pageName === 'help:writeAReview'; 3769 var isSoldOutProduct = !!document.getElementById('soldout-content'); 3770 var shouldTriggerEventOnSoldOutProduct = isAlgonomySetOnSite && isProductPage && isSoldOutProduct && !hasBeenTriggeredAlgonomy; 3771 var shouldTriggerEvent = isAlgonomySetOnSite && (isPageWithFakeAlgonomy || isSearchPageWithoutResults) && !hasBeenTriggeredAlgonomy; 3772 3773 if (shouldTriggerEvent || shouldTriggerEventOnSoldOutProduct || isWriteAReviewPage) { 3774 window.digitalData.set('algonomy.hasBeenTriggered', true); 3775 return setTimeout(function () { 3776 window.digitalData.trigger(event); 3777 }, 3000); 3778 } 3779 3780 return false;
3781 }; 3782 3783 var triggerAnalyticsPageLoadEvent = function triggerAnalyticsPageLoadEvent() { 3784 var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : currentPageLoadEvent; 3785 if (shouldSkipLegacyExperiencePageLoad()) return false; 3786 return window.digitalData.trigger(event); 3787 }; 3788 3789 var setFlagAfterLoginOrSignupEvent = function setFlagAfterLoginOrSignupEvent() { 3790 window.digitalData.subscribe('event:analytics.login_success', function () { 3791 return sessionStorage.setItem('fromLoginOrSignupSuccess', true); 3792 }); 3793 window.digitalData.subscribe('event:analytics.account_create_success', function () { 3794 return sessionStorage.setItem('fromLoginOrSignupSuccess', true); 3795 }); 3796 }; 3797 3798 var checkFlagAfterLoginEvent = function checkFlagAfterLoginEvent(eventName) { 3799 var withAlgonomy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 3800 3801 if (withAlgonomy && eventName === 'analytics.category' && sessionStorage.getItem('fromLoginOrSignupSuccess')) { 3802 return false; 3803 } 3804 3805 if (sessionStorage.getItem('fromLoginOrSignupSuccess')) { 3806 sessionStorage.removeItem('fromLoginOrSignupSuccess'); 3807 return false; 3808 } 3809 3810 return true; 3811 }; 3812 3813 return { 3814 triggerPageLoadEventWithAlgonomy: triggerPageLoadEventWithAlgonomy, 3815 triggerDefaultPageLoadEvent: triggerDefaultPageLoadEvent, 3816 triggerAnalyticsPageLoadEvent: triggerAnalyticsPageLoadEvent 3817 }; 3818}); 3819 3820/* eslint-env amd,es6 */ 3821redesign.define('lib/noop',[], function noop() { 3822 'use strict'; 3823 3824 return function () {}; 3825}); 3826 3827/* eslint-env amd,es6 */ 3828redesign.define('lib/wrapInFn',[], function wrapInFn() { 3829 'use strict'; 3830 3831 return function (fn) { 3832 return typeof fn === 'function' ? fn : function () { 3833 return fn; 3834 }; 3835 }; 3836}); 3837 3838function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } 3839 3840function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 3841 3842function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3843 3844function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } 3845 3846function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 3847 3848function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 3849 3850function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 3851 3852function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } 3853 3854function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } 3855 3856redesign.define('util/analytics/pageFindingMethodHandler',[], function pageFindingMethodHandler() { 3857 'use strict'; 3858 3859 var pageLoadEvents = ['homepage', 'category', 'product_detail', 'search', 'shopping_cart', 'checkout', 'order_confirmation', 'my_saves', 'store_locator', 'experience', 'my_account']; 3860 var pageFindingMethods = ['product_view_method', 'page_finding_method', 'page_view_method', 'data_text', 'data_action']; 3861 3862 function shouldNullifyPageFindingMethods(eventName) { 3863 var isPageLoadEvent = pageLoadEvents.includes(eventName); 3864 3865 if (!isPageLoadEvent) { 3866 return false;
3867 } 3868 3869 var urlParams = new URLSearchParams(window.location.search); 3870 var hasRelevantUrlParams = ['dataText', 'dataAction', 'pageFindingMethod', 'pageViewMethod', 'productViewMethod', 'pagefm', 'prodvm', 'pagevm'].some(function (param) { 3871 return urlParams.has(param); 3872 }); 3873 3874 if (!hasRelevantUrlParams) { 3875 return false; 3876 } 3877 3878 try { 3879 var _performance$getEntri = performance.getEntriesByType('navigation'), 3880 _performance$getEntri2 = _slicedToArray(_performance$getEntri, 1), 3881 navigation = _performance$getEntri2[0]; 3882 3883 if (navigation && navigation.type === 'back_forward') { 3884 return true; 3885 } // eslint-disable-next-line no-empty 3886 3887 } catch (_unused) {} 3888 3889 var _document = document, 3890 referrer = _document.referrer; 3891 3892 if (!referrer) { 3893 return true; 3894 } 3895 3896 try { 3897 var referrerUrl = new URL(referrer); 3898 var isFromInternalSite = referrerUrl.hostname.includes('abercrombie') || referrerUrl.hostname.includes('hollisterco'); 3899 return !isFromInternalSite; 3900 } catch (_unused2) { 3901 return true; // Invalid URL, treat as external for safety 3902 } 3903 } 3904 3905 function nullifyPageFindingMethods(data) { 3906 var modifiedData = _objectSpread({}, data); 3907 3908 pageFindingMethods.forEach(function (method) { 3909 if (modifiedData[method] !== undefined) { 3910 modifiedData[method] = 'null'; 3911 } 3912 }); 3913 return modifiedData; 3914 } 3915 3916 return { 3917 shouldNullifyPageFindingMethods: shouldNullifyPageFindingMethods, 3918 nullifyPageFindingMethods: nullifyPageFindingMethods 3919 }; 3920}); 3921 3922function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } 3923 3924function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 3925 3926function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } 3927 3928function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } 3929 3930function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 3931 3932function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 3933 3934function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 3935 3936function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 3937 3938function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 3939 3940function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 3941 3942function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } 3943 3944function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); }
3944 else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 3945 3946function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3947 3948/* eslint-env amd,es6 */ 3949 3950/** 3951 * print out to console any information and errors so they don't get lost 3952 * and our partners know something is not right 3953 */ 3954 3955/* eslint-disable no-console */ 3956redesign.define('util/analytics/adapter/tealium',['lib/noop', 'lib/wrapInFn', 'util/analytics/pageFindingMethodHandler'], function analyticsTealiumAdapter(noop, wrapInFn, pageFindingMethodHandler) { 3957 'use strict'; 3958 3959 var numberOfAttemptsToDetectTealium = 10; 3960 var timeBetweenAttemptsToDetectTealium = 10; 3961 var logDebug = noop; 3962 3963 var logInfo = function logInfo() { 3964 var _console; 3965 3966 return (_console = console).info.apply(_console, arguments); 3967 }; 3968 3969 var logError = function logError() { 3970 var _console2; 3971 3972 return (_console2 = console).error.apply(_console2, arguments); 3973 }; 3974 3975 try { 3976 if (window.localStorage.getItem('tealium:adapter:debug') === '1') logDebug = function logDebug() { 3977 var _console3; 3978 3979 return (_console3 = console).debug.apply(_console3, arguments); 3980 }; 3981 } catch (ewww) {// do nothing 3982 } 3983 3984 var uTagView = function uTagView(data) { 3985 var _window$digitalData, _window, _window$utag; 3986 3987 if (((_window$digitalData = window.digitalData) === null || _window$digitalData === void 0 ? void 0 : _window$digitalData.get('flag.analytics-wait-for-onetrust')) === true && shouldAddEventToQueue(data) === true) { 3988 return; 3989 } // Need to spread this out b/c apparently the utag.veiw mutates the data object passed in 3990 3991 3992 (_window = window) === null || _window === void 0 ? void 0 : (_window$utag = _window.utag) === null || _window$utag === void 0 ? void 0 : _window$utag.view(_objectSpread({}, data)); 3993 logDebug('Analytics :: Tealium :: View Call', JSON.stringify(data)); 3994 }; 3995 3996 var uTagLink = function uTagLink(data) { 3997 var _window$digitalData2, _window2, _window2$utag; 3998 3999 if (((_window$digitalData2 = window.digitalData) === null || _window$digitalData2 === void 0 ? void 0 : _window$digitalData2.get('flag.analytics-wait-for-onetrust')) === true && shouldAddEventToQueue(data) === true) { 4000 return; 4001 } // Need to spread this out b/c apparently the utag.link mutates the data object passed in 4002 4003 4004 (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$utag = _window2.utag) === null || _window2$utag === void 0 ? void 0 : _window2$utag.link(_objectSpread({}, data)); 4005 logDebug('Analytics :: Tealium :: Link Call', JSON.stringify(data)); 4006 }; 4007 /** 4008 * Get a promise that is lazily looking for the uTag to be loaded. 4009 * @returns {Promise} the promise that is checking to see if uTag has been loaded 4010 */ 4011 4012 4013 var getUTagDetection = function getUTagDetection() { 4014 if (window.utag) return Promise.resolve(); 4015 var intervalId; 4016 var uTagOnPagePromise = new Promise(function (resolve, reject) { 4017 var tries = numberOfAttemptsToDetectTealium; 4018 if (window.utag) return resolve(); 4019 4020 var handleDiscovery = function handleDiscovery() { 4021 if (window.utag) return resolve(); 4022 4023 if (!intervalId) { 4024 intervalId = setInterval(handleDiscovery, timeBetweenAttemptsToDetectTealium); 4025 return undefined; 4026 } 4027 4028 if (tries < 0) return reject(); 4029 tries = tries - 1; 4030 return undefined; 4031 }; 4032 4033 handleDiscovery(); 4034 return undefined; 4035 }); 4036 uTagOnPagePromise.catch(function () { 4037 logInfo("Analytics :: Tealium :: Unable to detect the Tealium Lib after ".concat(numberOfAttemptsToDetectTealium * timeBetweenAttemptsToDetectTealium, "ms")); 4038 }).finally(function () { 4039 if (intervalId) clearInterval(intervalId); 4040 }); 4041 return uTagOnPagePromise; 4042 }; 4043 4044 var waitForOneTrust = function waitForOneTrust() { 4045 var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 5000; 4046 return new Promise(function (resolve, reject) { 4047 var timeoutId; 4048 var interval; 4049 4050 var tryCheckOneTrust = function tryCheckOneTrust() { 4051 var _window$OneTrust; 4052 4053 if (typeof ((_window$OneTrust = window.OneTrust) === null || _window$OneTrust === void 0 ? void 0 : _window$OneTrust.getGeolocationData) !== 'undefined') { 4054 resolve(); 4055 return true; 4056 } 4057 4058 return false;
4059 }; 4060 4061 if (tryCheckOneTrust()) return; 4062 4063 var onConsentApplied = function onConsentApplied() { 4064 var _window$OneTrust2; 4065 4066 if (typeof ((_window$OneTrust2 = window.OneTrust) === null || _window$OneTrust2 === void 0 ? void 0 : _window$OneTrust2.getGeolocationData) !== 'undefined') { 4067 clearInterval(interval); 4068 clearTimeout(timeoutId); 4069 window.removeEventListener('OneTrustGroupsUpdated', onConsentApplied); 4070 resolve(); 4071 } 4072 }; 4073 4074 interval = setInterval(function () { 4075 if (tryCheckOneTrust()) { 4076 clearInterval(interval); 4077 clearTimeout(timeoutId); 4078 window.removeEventListener('OneTrustGroupsUpdated', onConsentApplied); 4079 resolve(); 4080 } 4081 }, 500); 4082 window.addEventListener('OneTrustGroupsUpdated', onConsentApplied); 4083 timeoutId = setTimeout(function () { 4084 clearInterval(interval); 4085 window.removeEventListener('OneTrustGroupsUpdated', onConsentApplied); 4086 reject(new Error('Analytics :: OneTrust :: OneTrust library load timeout')); 4087 }, timeout); 4088 }); 4089 }; 4090 4091 var uTagDetector; 4092 var oneTrustDetector; 4093 /** 4094 * Set up the handlers for the given event types. 4095 * This is done in a way that allows for code 4096 * to call it and replay the calls 4097 * if uTag is not available yet. 4098 * @private 4099 * @param {Boolean} [reCheckForLib=false] determine if a new check if the uTag is on the page. 4100 * @returns {undefined} undefined 4101 */ 4102 4103 var init = function init() { 4104 var _window$digitalData3; 4105 4106 var reCheckForLib = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; 4107 var shouldWaitForOneTrust = ((_window$digitalData3 = window.digitalData) === null || _window$digitalData3 === void 0 ? void 0 : _window$digitalData3.get('flag.analytics-wait-for-onetrust')) === true; 4108 4109 if (shouldWaitForOneTrust) { 4110 if (uTagDetector && oneTrustDetector && !reCheckForLib) return uTagDetector; 4111 uTagDetector = getUTagDetection(); 4112 oneTrustDetector = waitForOneTrust(); 4113 } else { 4114 if (uTagDetector && !reCheckForLib) return uTagDetector; 4115 uTagDetector = getUTagDetection(); 4116 } 4117 4118 return uTagDetector; 4119 }; 4120 /** 4121 * Validate that the supplied key is a string with length that is not just whitespace or is a number 4122 * @param {string|number} key - the value to be validated 4123 * @returns {Boolean} If the key is valid or not 4124 */ 4125 4126 4127 var isValidKey = function isValidKey(key) { 4128 var _key$trim; 4129 4130 return (key === null || key === void 0 ? void 0 : (_key$trim = key.trim()) === null || _key$trim === void 0 ? void 0 : _key$trim.length) || Number.isFinite(key); 4131 }; 4132 /** 4133 * Remove unwanted values from the set. 4134 * Unwanted Keys: 4135 * - null 4136 * - undefined 4137 * - strings of just whitespace 4138 * - blank strings 4139 * - non-strings 4140 * @private 4141 * @param {Set} set the set to be looped over 4142 * @returns {Set} new set with the unwanted values removed 4143 */ 4144 4145 4146 var removeInvalidKeys = function removeInvalidKeys() { 4147 var set = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set(); 4148 return new Set(_toConsumableArray(set).filter(isValidKey)); 4149 }; 4150 /** 4151 * REDUCER FUNCTION :: add a key value pair to a Map as long as 4152 * 1) the key is a valid key 4153 * 2) the map does not have a value already set 4154 * 4155 * NOTE This does mutate the original map that is supplied 4156 * @private 4157 * @param {Map<string|number, *>} map - the map to be adding data to 4158 * @param {Array} entry - the entry key value pair 4159 * @param {string|number} entry.[0] - the key to be added to the map 4160 * @param {*} entry.[1] - the value to be added to the map 4161 * @returns {Map} the map passed into the function 4162 */ 4163 4164 4165 var addValueResultToMapReducer = function addValueResultToMapReducer(map, _ref) { 4166 var _ref2 = _slicedToArray(_ref, 2), 4167 key = _ref2[0], 4168 value = _ref2[1]; 4169 4170 // Only add if the key is a string or a finite number 4171 if (!isValidKey(key)) return map; 4172 var myValue = wrapInFn(value)(); // Only add the value if it is not null and not undefined 4173 4174 if ([undefined, null].includes(myValue)) return map; // Only add if the key is not already in the map 4175 4176 if (map.has(key)) return map; // Set the key to the value 4177 4178 map.set("".concat(key).trim(), myValue.toString()); 4179 return map; 4180 }; 4181 /** 4182 * REDUCER FUNCTION :: Add the new key if the supplied map has the old key 4183 * NOTE This does mutate the original map that is supplied 4184 * @callback deprecationAndRenameReducerCallback 4185 * @param {Map} map - the map that is being updated 4186 * @param {Array}
4186 entry - the entry key value pair 4187 * @param {string} entry.0 - the old key to copy the value from 4188 * @param {object} entry.1 - the remap object 4189 * @param {string} entry.1.newKey - the new key to be set on the map 4190 * @param {string} [entry.1.deprecationMsg] - the string to display in the debug logging message. 4191 * @return {Map} the map that is passed into the function 4192 */ 4193 4194 /** 4195 * Partial Application to add a renamed key to the map. 4196 * @param {string} eventName - the even name that is being processed, used in logging message 4197 * @returns {deprecationAndRenameReducerCallback} the rest of the partial application 4198 */ 4199 4200 4201 var deprecationAndRenameReducer = function deprecationAndRenameReducer(eventName) { 4202 return function (map, _ref3) { 4203 var _ref4 = _slicedToArray(_ref3, 2), 4204 key = _ref4[0], 4205 _ref4$ = _ref4[1], 4206 newKey = _ref4$.newKey, 4207 deprecationMsg = _ref4$.deprecationMsg; 4208 4209 if (deprecationMsg && !map.has(newKey) && map.has(key)) { 4210 logDebug('Analytics :: Tealium :: Deprecation Message Found', JSON.stringify({ 4211 eventName: eventName, 4212 key: key, 4213 newKey: newKey, 4214 deprecationMsg: deprecationMsg 4215 })); 4216 } 4217 4218 return addValueResultToMapReducer(map, [newKey, map.get(key)]); 4219 }; 4220 }; 4221 /** 4222 * FOREACH FUNCTION :: Checks the key to see if it is in the data, if not logs and error about a missing data point 4223 * @callback logMissingForEachHandlerCallback 4224 * @param {string|number} key - the key to check if it is in the data 4225 * @returns {undefined} undefined 4226 */ 4227 4228 /** 4229 * Partial application for logging missing messages 4230 * @param {Map} data - the data being checked to see if the key exists 4231 * @param {string} eventName - the name of the event being processed. 4232 * @returns {logMissingForEachHandlerCallback} the rest of the partial application 4233 */ 4234 4235 4236 var logMissingForEachHandler = function logMissingForEachHandler(data, eventName) { 4237 return function (key) { 4238 if (!data.has(key)) { 4239 logError(new Error("Analytics :: Tealium :: Missing DataPoint : ".concat(JSON.stringify({ 4240 eventName: eventName, 4241 key: key 4242 })))); 4243 } 4244 }; 4245 }; 4246 /** 4247 * FOREACH FUNCTION :: Removes the key,value pair from the map if it is not an needed data point 4248 * NOTE: This does mutate the data structure that the forEach is called on. 4249 * @callback removeExtraneousKeyFromMapForEachHandlerCallback 4250 * @param {*} value - the value of the Map entry being processed 4251 * @param {*} key - the key of the Map entry being processed 4252 * @param {Map} self - the Map instance being processed 4253 */ 4254 4255 /** 4256 * Partial Application for removing keys from the map that are not needed 4257 * @param {Set} allowedDataPoints - list of keys that are needed to be in the map 4258 * @param {string} [eventName] - the name of the event being processed, used for messaging 4259 * @returns {removeExtraneousKeyFromMapForEachHandlerCallback} the rest of the partial application 4260 */ 4261 4262 4263 var removeExtraneousKeyFromMapForEachHandler = function removeExtraneousKeyFromMapForEachHandler(allowedDataPoints, eventName) { 4264 return function (value, key, self) { 4265 if (!allowedDataPoints.has(key)) { 4266 self.delete(key); 4267 logDebug('Analytics :: Tealium :: Extra Data Being passed that will not be used', JSON.stringify({ 4268 eventName: eventName, 4269 extraneousKey: key 4270 })); 4271 } 4272 }; 4273 }; 4274 /** 4275 * Handles Tealium event queuing based on user consent and geolocation. 4276 * 4277 * If the user is from the UK and has not closed the OneTrust consent alert, 4278 * the event is pushed to the Tealium event queue instead of being sent immediately. 4279 * 4280 * @param {Object} data - The analytics event data to be processed. 4281 * @param {string} data.event_name - The name of the event being tracked. 4282 * @returns {void} 4283 */ 4284 4285 4286 function shouldAddEventToQueue(data) { 4287 var _window$OneTrust3, _window$OneTrust3$get, _window$OneTrust3$get2; 4288 4289 var isUserFromUK = ((_window$OneTrust3 = window.OneTrust) === null || _window$OneTrust3 === void 0 ? void 0 : (_window$OneTrust3$get = _window$OneTrust3.getGeolocationData) === null || _window$OneTrust3$get === void 0 ? void 0 : (_window$OneTrust3$get2 = _window$OneTrust3$get.call(_window$OneTrust3)) === null || _window$OneTrust3$get2 === void 0 ? void 0 : _window$OneTrust3$get2.country.toLowerCase()) === 'gb'; 4290 var hasOptanonCookie = document.cookie.includes('OptanonAlertBoxClosed='); 4291 4292 if (isUserFromUK && !hasOptanonCookie) { 4293 if (!window.tealiumEventQueue) window.tealiumEventQueue = []; 4294 window.tealiumEventQueue.push({ 4295 event: data.event_name, 4296 callData: { 4297 data: _objectSpread({}, data) 4298 }, 4299 utagAction: 'view', 4300 repository: 'crs-app' 4301 }); 4302 return true; 4303 } 4304 4305 return false;
4306 } 4307 /** 4308 * Track an analytics event 4309 * @callback tealiumEventAdapter 4310 * @param {object} settings settings. 4311 * @param {string} [settings.userVersion] - the version of the config require, optional, and remap value to use. 4312 * @param {object} settings.config an event configuration object. 4313 * @param {Boolean} [settings.reCheckForLib=false] - redetect for the uTag lib 4314 * @param {object<(DataPoint|string), (string|number|boolean)>} [settings.config.constants={}] - Data Points that should not change and not changeable by either the supplied dataPoints or dataFetchers 4315 * @param {string[]|Set<string>} [settings.config.required=[]] - the required data points to be included in the analytics call 4316 * @param {string[]|Set<string>} [settings.config.optional=[]] - the optional data points to include in the analytics call 4317 * @param {object<(DATA_POINT|string), (string|number|boolean|function)>} [settings.dataPoints={}] - The data to be tracked 4318 * @param {object<(DataPoint|string), object>} [settings.config.remap={}] - Data Points that need to be re-mapped 4319 * @param {object<string, string>} settings.config.remap.DataPoint.newKey - The DataPoint that is to be used instead of the old DataPoint 4320 * @param {object<string, string>} [settings.config.remap.DataPoint.deprecationMsg] - A message to be included in the debug logs if the key is being remapped to a new key 4321 * 4322 * @return {undefined} undefined 4323 */ 4324 4325 /** 4326 * Partial application for different handlers 4327 * @private 4328 * @param {function} handler the handler to be used when the tealiumEventAdapter is called 4329 * @returns {tealiumEventAdapter} the tealiumEventAdapter to be used with a given handler 4330 */ 4331 4332 4333 var adapter = function adapter(handler) { 4334 return function (_ref5) { 4335 var _wrapInFn, _wrapInFn2; 4336 4337 var config = _ref5.config, 4338 _ref5$dataPoints = _ref5.dataPoints, 4339 dataPoints = _ref5$dataPoints === void 0 ? {} : _ref5$dataPoints, 4340 _ref5$reCheckForLib = _ref5.reCheckForLib, 4341 reCheckForLib = _ref5$reCheckForLib === void 0 ? false : _ref5$reCheckForLib, 4342 useVersion = _ref5.useVersion; 4343 var _config$constants = config.constants, 4344 constants = _config$constants === void 0 ? {} : _config$constants, 4345 eventName = config.eventName, 4346 _config$optional = config.optional, 4347 optional = _config$optional === void 0 ? [] : _config$optional, 4348 _config$remap = config.remap, 4349 remap = _config$remap === void 0 ? {} : _config$remap, 4350 _config$required = config.required, 4351 required = _config$required === void 0 ? [] : _config$required; 4352 var myRequired = removeInvalidKeys((_wrapInFn = wrapInFn(required)(useVersion)) !== null && _wrapInFn !== void 0 ? _wrapInFn : []); 4353 var myOptional = removeInvalidKeys((_wrapInFn2 = wrapInFn(optional)(useVersion)) !== null && _wrapInFn2 !== void 0 ? _wrapInFn2 : []); 4354 var allDataPointsNeeded = new Set([].concat(_toConsumableArray(myRequired), _toConsumableArray(myOptional))); 4355 4356 try { 4357 if (allDataPointsNeeded.size === 0) throw new RangeError('Analytics :: Tealium :: Fatal :: One or more valid Required or Optional Keys is required'); 4358 var data = new Map(); // Add Constants to the map 4359 4360 data = Object.entries(constants).reduce(addValueResultToMapReducer, data); // Add Data Points to the map 4361 4362 data = Object.entries(dataPoints).reduce(addValueResultToMapReducer, data); // Add keys that are being renamed to the data 4363 4364 data = Object.entries(remap).reduce(deprecationAndRenameReducer(eventName), data); // Remove data that is not needed 4365 4366 data.forEach(removeExtraneousKeyFromMapForEachHandler(allDataPointsNeeded, eventName)); // Validate page finding methods 4367 4368 if (data.get('event_name') && pageFindingMethodHandler.shouldNullifyPageFindingMethods(data.get('event_name'))) { 4369 var dataObject = Object.fromEntries(data); 4370 var nullifiedData = pageFindingMethodHandler.nullifyPageFindingMethods(dataObject); 4371 data = new Map(Object.entries(nullifiedData)); 4372 }
4372 // Log missing value 4373 4374 4375 if (typeof required === 'function') { 4376 required().forEach(logMissingForEachHandler(data, eventName)); 4377 } else { 4378 required.forEach(logMissingForEachHandler(data, eventName)); 4379 } 4380 4381 return init(reCheckForLib).then(function () { 4382 return handler(Object.fromEntries(data)); 4383 }).catch(noop); 4384 } catch (e) { 4385 logError(e); 4386 return Promise.reject(e); 4387 } 4388 }; 4389 }; 4390 4391 return { 4392 view: adapter(uTagView), 4393 action: adapter(uTagLink) 4394 }; 4395}); 4396 4397/* eslint-env amd,es6 */ 4398 4399/** 4400 * print out to console any Fatal errors so they don't get lost 4401 */ 4402 4403/* eslint-disable no-console */ 4404redesign.define('util/analytics/adapter',['util/analytics/enum/eventType', 'util/analytics/adapter/tealium', 'lib/noop', 'lib/wrapInFn'], function analyticsAdapter(EVENT_TYPE, tealium) { 4405 'use strict'; 4406 4407 var adapterToTypeLookup = new Map([[EVENT_TYPE.ACTION, function () { 4408 return tealium.action.apply(tealium, arguments); 4409 }], [EVENT_TYPE.VIEW, function () { 4410 return tealium.view.apply(tealium, arguments); 4411 }]]); 4412 /** 4413 * Track an analytics event 4414 * @param {object} settings settings, this will be passed through to the adapters 4415 * @param {object} settings.config an event configuration object. 4416 * @param {Symbol} settings.config.eventType - The type of event 4417 * @throws {SyntaxError} When an adapter for the given event type does not have an adapter 4418 * @return {Promise} The result of calling the adapter 4419 */ 4420 4421 var applyAdapter = function applyAdapter(settings) { 4422 try { 4423 var libAdapter = adapterToTypeLookup.get(settings.config.eventType); 4424 if (typeof libAdapter !== 'function') throw new SyntaxError('Analytics :: Fatal :: Supplied configs eventType does not have a supporting adapter'); 4425 var libAdapterPromise = libAdapter(settings); 4426 return libAdapterPromise instanceof Promise ? libAdapterPromise : Promise.resolve(libAdapterPromise); 4427 } catch (e) { 4428 return Promise.reject(e); 4429 } 4430 }; 4431 4432 return { 4433 exec: applyAdapter 4434 }; 4435}); 4436 4437function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4438 4439/* eslint-env amd,es6 */ 4440redesign.define('util/analytics/event/action/addToBag',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function addToBagActionEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 4441 'use strict'; 4442 4443 var _constants; 4444 4445 return deepFreeze({ 4446 eventName: EVENT_NAME.ACTION.ADD_TO_BAG, 4447 subscriptionName: SUBSCRIPTION_NAME.ACTION.ADD_TO_BAG, 4448 eventType: EVENT_TYPE.ACTION, 4449 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.PRODUCT), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.ACTION.ADD_TO_BAG), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.ACTION.ADD_TO_BAG), _constants), 4450 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, DATA_POINT.SHORT_SKU, DATA_POINT.PRODUCT_ID, DATA_POINT.PRODUCT_QUANTITY, DATA_POINT.KEY_ITEM_COLOR, DATA_POINT.PRICE_FLAG, DATA_POINT.PRICE_LIST_LOCAL, DATA_POINT.PRICE_LIST_USD, DATA_POINT.PRICE_OFFER_LOCAL, DATA_POINT.PRICE_OFFER_USD, DATA_POINT.PRODUCT_COLLECTION, DATA_POINT.PRODUCT_BRA
4450ND, DATA_POINT.CATEGORY_ID, DATA_POINT.TEALIUM_EVENT, DATA_POINT.PRODUCT_RATING, DATA_POINT.LONG_SKU, DATA_POINT.CATEGORY_NAME], 4451 optional: [DATA_POINT.PRODUCT_NAME, DATA_POINT.STICKY_ATB, DATA_POINT.SOCIAL_PROOFING], 4452 remap: {} 4453 }); 4454}); 4455 4456function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4457 4458/* eslint-env amd,es6 */ 4459redesign.define('util/analytics/event/action/loginSuccess',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function loginSuccessActionEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 4460 'use strict'; 4461 4462 var _constants; 4463 4464 return deepFreeze({ 4465 eventName: EVENT_NAME.ACTION.LOGIN_SUCCESS, 4466 subscriptionName: SUBSCRIPTION_NAME.ACTION.LOGIN_SUCCESS, 4467 eventType: EVENT_TYPE.ACTION, 4468 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.USER), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.ACTION.LOGIN_SUCCESS), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.ACTION.LOGIN_SUCCESS), _constants), 4469 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, DATA_POINT.KEEP_ME_LOGGED_IN_FLAG], 4470 optional: [DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.GLOBAL_PAGE_NAME, DATA_POINT.ACCOUNT_ID, DATA_POINT.BRAND_VIEWING, DATA_POINT.CURRENCY_CODE, DATA_POINT.DIGITAL_MARKETING_CONSENT_FLAG, DATA_POINT.IS_MOBILE, DATA_POINT.PAGE_URL, DATA_POINT.PREFERRED_BROWSER_LANGUAGE, DATA_POINT.SITE_LANGUAGE, DATA_POINT.USER_STATE, DATA_POINT.WEBSPHERE_VISITOR_ID, DATA_POINT.WEB_STORE_ID, DATA_POINT.PAGE_TYPE, DATA_POINT.MERCHANDISING_CATEGORY_ID, DATA_POINT.DOMAIN], 4471 remap: {} 4472 }); 4473}); 4474 4475function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4476 4477/* eslint-env amd,es6 */ 4478redesign.define('util/analytics/event/action/removeFromBag',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function removeFromBagActionEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 4479 'use strict'; 4480 4481 var _constants; 4482 4483 return deepFreeze({ 4484 eventName: EVENT_NAME.ACTION.REMOVE_FROM_BAG, 4485 subscriptionName: SUBSCRIPTION_NAME.ACTION.REMOVE_FROM_BAG, 4486 eventType: EVENT_TYPE.ACTION, 4487 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.ORDER), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.ACTION.REMOVE_FROM_BAG), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.ACTION.REMOVE_FROM_BAG), _constants), 4488 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, DATA_POINT.PRICE_LIST_LOCAL, DATA_POINT.PRICE_LIST_USD, DATA_POINT.PRICE_OFFER_LOCAL, DATA_POINT.PRICE_OFFER_USD, DATA_POINT.COLLECTION_ID, DATA_POINT.BRAND, DATA_POINT.LONG_SKU, DATA_POINT.WEB_STORE_ID, DATA_POINT.PRODUCT_NAME, DATA_POINT.CATEGORY_NAME], 4489 optional: [DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.CART_TOTAL, DATA_POINT.CART_UNITS_REMOVED, DATA_POINT.PRICE_FLAG, DATA_POINT.CART_VALUE, DATA_POINT.DEVICE_ID, DATA_POINT.GLOBAL_PAGE_
4489NAME, DATA_POINT.DIGITAL_MARKETING_CONSENT_FLAG, DATA_POINT.IS_MOBILE, DATA_POINT.KEY_ITEM_COLOR, DATA_POINT.PAGE_TYPE, DATA_POINT.PAGE_URL, DATA_POINT.SHORT_SKU, DATA_POINT.USER_STATE, DATA_POINT.WEBSPHERE_VISITOR_ID, DATA_POINT.DOMAIN, DATA_POINT.SITE_LANGUAGE, DATA_POINT.CURRENCY_CODE, DATA_POINT.ACCOUNT_ID], 4490 remap: {} 4491 }); 4492}); 4493 4494function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4495 4496/* eslint-env amd,es6 */ 4497redesign.define('util/analytics/event/action/saveForLater',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function addToBagActionEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 4498 'use strict'; 4499 4500 var _constants; 4501 4502 return deepFreeze({ 4503 eventName: EVENT_NAME.ACTION.SAVE_FOR_LATER, 4504 subscriptionName: SUBSCRIPTION_NAME.ACTION.SAVE_FOR_LATER, 4505 eventType: EVENT_TYPE.ACTION, 4506 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.PRODUCT), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.ACTION.SAVE_FOR_LATER), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.ACTION.SAVE_FOR_LATER), _constants), 4507 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, DATA_POINT.CATEGORY_ID, DATA_POINT.COLLECTION_ID, DATA_POINT.INVENTORY, DATA_POINT.KEY_ITEM_COLOR, DATA_POINT.LONG_SKU, DATA_POINT.SHORT_SKU, DATA_POINT.PRICE_FLAG, DATA_POINT.PRICE_LIST_LOCAL, DATA_POINT.PRICE_LIST_USD, DATA_POINT.PRICE_OFFER_LOCAL, DATA_POINT.PRICE_OFFER_USD, DATA_POINT.PRODUCT_ID, DATA_POINT.BRAND, DATA_POINT.PRODUCT_RATING, DATA_POINT.PRODUCT_NAME], 4508 optional: [DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.GLOBAL_PAGE_NAME, DATA_POINT.CART_UNITS_ADDED, DATA_POINT.ORDER_SUBTOTAL, DATA_POINT.ORDER_SUBTOTAL_USD, DATA_POINT.PAGE_URL, DATA_POINT.SITE_LANGUAGE, DATA_POINT.USER_STATE, DATA_POINT.WEB_STORE_ID, DATA_POINT.PAGE_TYPE, DATA_POINT.ACCOUNT_ID], 4509 remap: {} 4510 }); 4511}); 4512 4513function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4514 4515/* eslint-env amd,es6 */ 4516redesign.define('util/analytics/event/action/filterApplied',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function filterAppliedActionEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 4517 'use strict'; 4518 4519 var _constants; 4520 4521 return deepFreeze({ 4522 eventName: EVENT_NAME.ACTION.FILTER_APPLIED, 4523 subscriptionName: SUBSCRIPTION_NAME.ACTION.FILTER_APPLIED, 4524 eventType: EVENT_TYPE.ACTION, 4525 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.FILTER), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.ACTION.FILTER_APPLIED), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.ACTION.FILTER_APPLIED), _constants), 4526 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, DATA_POINT.SEARCH_FILTER_APPLIED_CATEGORY, DATA_POINT.SEARCH_FILTER_APPLIED_VALUE_NAME], 4527 optional: [], 4528 remap: {} 4529 }); 4530}); 4531 4532function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4533 4534/* eslint-env amd,es6 */ 4535redesign.define('util/analytics/event/action/sortApplied',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function sortAppliedActionEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 4536 'use strict'; 4537 4538 var _constants; 4539 4540 return deepFreeze({ 4541 eventName: EVENT_NAME.ACTION.SORT_APPLIED, 4542 subscriptionName: SUBSCRIPTION_NAME.ACTION.SORT_APPLIED, 4543 eventType: EVENT_TYPE.ACTION, 4544 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.SEARCH), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.ACTION.SORT_APPLIED), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.ACTION.SORT_APPLIED), _constants), 4545 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, DATA_POINT.SEARCH_SORT_VALUE], 4546 optional: [DATA_POINT.ADOBE_MARKETING_CLOUD_ID, DATA_POINT.GLOBAL_PAGE_
4546NAME, DATA_POINT.ACCOUNT_ID, DATA_POINT.BRAND_VIEWING, DATA_POINT.CURRENCY_CODE, DATA_POINT.DIGITAL_MARKETING_CONSENT_FLAG, DATA_POINT.IS_MOBILE, DATA_POINT.PAGE_URL, DATA_POINT.PREFERRED_BROWSER_LANGUAGE, DATA_POINT.SITE_LANGUAGE, DATA_POINT.USER_STATE, DATA_POINT.WEBSPHERE_VISITOR_ID, DATA_POINT.WEB_STORE_ID, DATA_POINT.PAGE_TYPE, DATA_POINT.MERCHANDISING_CATEGORY_ID, DATA_POINT.DOMAIN], 4547 remap: {} 4548 }); 4549}); 4550 4551function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4552 4553/* eslint-env amd,es6 */ 4554redesign.define('util/analytics/event/action/removeFromSaves',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function removeFromSaveActionEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 4555 'use strict'; 4556 4557 var _constants; 4558 4559 return deepFreeze({ 4560 eventName: EVENT_NAME.ACTION.REMOVE_FROM_SAVES, 4561 subscriptionName: SUBSCRIPTION_NAME.ACTION.REMOVE_FROM_SAVES, 4562 eventType: EVENT_TYPE.ACTION, 4563 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.PRODUCT), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.ACTION.REMOVE_FROM_SAVES), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.ACTION.REMOVE_FROM_SAVES), _constants), 4564 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, DATA_POINT.CATEGORY_ID, DATA_POINT.COLLECTION_ID, DATA_POINT.INVENTORY, DATA_POINT.KEY_ITEM_COLOR, DATA_POINT.LONG_SKU, DATA_POINT.SHORT_SKU, DATA_POINT.PRICE_FLAG, DATA_POINT.PRICE_LIST_LOCAL, DATA_POINT.PRICE_LIST_USD, DATA_POINT.PRICE_OFFER_LOCAL, DATA_POINT.PRICE_OFFER_USD, DATA_POINT.PRODUCT_ID, DATA_POINT.BRAND, DATA_POINT.PRODUCT_RATING, DATA_POINT.PRODUCT_NAME], 4565 optional: [], 4566 remap: {} 4567 }); 4568}); 4569 4570function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4571 4572/* eslint-env amd,es6 */ 4573redesign.define('util/analytics/event/action/swatchClick',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function swatchClickEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 4574 'use strict'; 4575 4576 var _constants; 4577 4578 return deepFreeze({ 4579 eventName: EVENT_NAME.ACTION.PDP, 4580 subscriptionName: SUBSCRIPTION_NAME.ACTION.SWATCH_CLICK, 4581 eventType: EVENT_TYPE.ACTION, 4582 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.PRODUCT), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.ACTION.PDP), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.ACTION.SWATCH_CLICK), _constants), 4583 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, DATA_POINT.PAGE_DESCRIPTION, DATA_POINT.BRAND, DATA_POINT.CATEGORY_ID, DATA_POINT.COLLECTION_ID, DATA_POINT.KEY_ITEM_COLOR, DATA_POINT.LONG_SKU, DATA_POINT.PRICE_FLAG, DATA_POINT.PRICE_LIST_LOCAL, DATA_POINT.PRICE_LIST_USD, DATA_POINT.PRICE_OFFER_LOCAL, DATA_POINT.PRICE_OFFER_USD, DATA_POINT.PRODUCT_ID, DATA_POINT.PRODUCT_RATING, DATA_POINT.CATEGORY_NAME, DATA_POINT.PRODUCT_NAME, DATA_POINT.SWATCH_COLOR, DATA_POINT.PRODUCT_BADGE], 4584 optional: [], 4585 remap: {} 4586 }); 4587}); 4588 4589function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4590 4591/* eslint-env amd,es6 */ 4592redesign.define('util/analytics/event/action/quickView',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/analytics/enum/eventType', 'util/analytics/enum/subscriptionName', 'lib/deepFreeze'], function quickViewEventConfig(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, EVENT_TYPE, SUBSCRIPTION_NAME, deepFreeze) { 4593 'use strict'; 4594 4595 var _constants; 4596 4597 return deepFreeze({ 4598 eventName: EVENT_NAME.VIEW.QUICK_VIEW, 4599 subscriptionName: SUBSCRIPTION_NAME.VIEW.QUICK_VIEW, 4600 eventType: EVENT_TYPE.ACTION, 4601 constants: (_constants = {}, _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_TYPE, EVENT_TYPE.PRODUCT), _defineProperty(_constants, GLOBAL_DATA_POINT.EVENT_NAME, EVENT_NAME.VIEW.QUICK_VIEW), _defineProperty(_constants, GLOBAL_DATA_POINT.TEALIUM_EVENT, EVENT_NAME.VIEW.QUICK_VIEW), _constants), 4602 required: [GLOBAL_DATA_POINT.EVENT_TYPE, GLOBAL_DATA_POINT.EVENT_NAME, GLOBAL_DATA_POINT.TEALIUM_EVENT, GLOBAL_DATA_POINT.USER_STATE, GLOBAL_DATA_POINT.USER_WCS_ID, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, GLOBAL_DATA_POINT.USER_HASHED_PHONE, GLOBAL_DATA_POINT.USER_DEVICE_ID, GLOBAL_DATA_POINT.USER_ZIP, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, GLOBAL_DATA_POINT.SITE_BRAND, GLOBAL_DATA_POINT.SITE_LANGUAGE, GLOBAL_DATA_POINT.SITE_COUNTRY, GLOBAL_DATA_POINT.SITE_CURRENCY, GLOBAL_DATA_POINT.SITE_PLATFORM, GLOBAL_DATA_POINT.SITE_DOMAIN, GLOBAL_DATA_POINT.PAGE_TYPE, GLOBAL_DATA_POINT.PAGE_URL, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, GLOBAL_DATA_POINT.AFSOURCE, DATA_POINT.PAGE_DESCRIPTION, DATA_POINT.BRAND, DATA_POINT.CATEGORY_ID, DATA_POINT.COLLECTION_ID, DATA_POINT.KEY_ITEM_COLOR, DATA_POINT.LONG_SKU, DATA_POINT.PRICE_FLAG, DATA_POINT.PRICE_LIST_LOCAL, DATA_POINT.PRICE_LIST_USD, DATA_POINT.PRICE_OFFER_LOCAL, DATA_POINT.PRICE_OFFER_USD, DATA_POINT.PRODUCT_ID, DATA_POINT.INVENTORY, DATA_POINT.PRODUCT_RATING, DATA_POINT.PRODUCT_NAME, DATA_POINT.RCS_ID, DATA_POINT.RECOMMENDATIONS, DATA_POINT.PRODUCT_RECOMMENDATION_POSITION, DATA_POINT.PRODUCT_RECOMMENDATION_PLACEMENT, DATA_POINT.GRID_PRODUCT_POSITION, DATA_POINT.SHORT_DESCRIPTOR, DATA_POINT.PRODUCT_BADGE, DATA_POINT.DATA_TEXT, DATA_POINT.DATA_ACTION], 4603 optional: [], 4604 remap: {} 4605 }); 4606}); 4607 4608/* eslint-env amd,es6 */ 4609redesign.define('util/analytics/event/action/index',['util/analytics/event/action/addToBag', 'util/analytics/event/action/loginSuccess', 'util/analytics/event/action/removeFromBag', 'util/analytics/event/action/saveForLater', 'util/analytics/event/action/filterApplied', 'util/analytics/event/action/sortApplied', 'util/analytics/event/action/removeFromSaves', 'util/analytics/event/action/swatchClick', 'util/analytics/event/action/quickView'], function actionEventConfigIndex(addToBag, loginSuccess, removeFromBag, saveForLater, filterApplied, sortApplied, removeFromSaves, swatchClick, quickView) { 4610 'use strict'; 4611 4612 return { 4613 addToBag: addToBag, 4614 loginSuccess: loginSuccess, 4615 removeFromBag: removeFromBag, 4616 saveForLater: saveForLater, 4617 filterApplied: filterApplied, 4618 sortApplied: sortApplied, 4619 removeFromSaves: removeFromSaves, 4620 swatchClick: swatchClick, 4621 quickView: quickView 4622 }; 4623}); 4624 4625/* eslint-env amd,es6 */ 4626redesign.define('util/analytics/event/index',['util/analytics/event/action/index', 'util/analytics/event/view/index', 'lib/deepFreeze'], function eventConfigIndex(ACTION, VIEW) { 4627 'use strict'; 4628 4629 return { 4630 ACTION: ACTION, 4631 VIEW: VIEW 4632 }; 4633}); 4634 4635/*! 4636 * JavaScript Cookie v2.2.1 4637 * https://github.com/js-cookie/js-cookie 4638 * 4639 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 4640 * Released under the MIT license 4641 */ 4642;(function (factory) { 4643 var registeredInModuleLoader; 4644 if (typeof redesign.define === 'function' && redesign.define.amd) { 4645 redesign.define('jsCookie',factory); 4646 registeredInModuleLoader = true; 4647 } 4648 if (typeof exports === 'object') { 4649 module.exports = factory(); 4650 registeredInModuleLoader = true; 4651 } 4652 if (!registeredInModuleLoader) { 4653 var OldCookies = window.Cookies; 4654 var api = window.Cookies = factory(); 4655 api.noConflict = function () { 4656 window.Cookies = OldCookies; 4657 return api; 4658 }; 4659 } 4660}(function () { 4661 function extend () { 4662 var i = 0; 4663 var result = {}; 4664 for (; i < arguments.length; i++) { 4665 var attributes = arguments[ i ]; 4666 for (var key in attributes) { 4667 result[key] = attributes[key]; 4668 } 4669 } 4670 return result; 4671 } 4672 4673 function decode (s) { 4674 return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); 4675 } 4676 4677 function init (converter) { 4678 function api() {} 4679
4680 function set (key, value, attributes) { 4681 if (typeof document === 'undefined') { 4682 return; 4683 } 4684 4685 attributes = extend({ 4686 path: '/' 4687 }, api.defaults, attributes); 4688 4689 if (typeof attributes.expires === 'number') { 4690 attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5); 4691 } 4692 4693 // We're using "expires" because "max-age" is not supported by IE 4694 attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; 4695 4696 try { 4697 var result = JSON.stringify(value); 4698 if (/^[\{\[]/.test(result)) { 4699 value = result; 4700 } 4701 } catch (e) {} 4702 4703 value = converter.write ? 4704 converter.write(value, key) : 4705 encodeURIComponent(String(value)) 4706 .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); 4707 4708 key = encodeURIComponent(String(key)) 4709 .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) 4710 .replace(/[\(\)]/g, escape); 4711 4712 var stringifiedAttributes = ''; 4713 for (var attributeName in attributes) { 4714 if (!attributes[attributeName]) { 4715 continue; 4716 } 4717 stringifiedAttributes += '; ' + attributeName; 4718 if (attributes[attributeName] === true) { 4719 continue; 4720 } 4721 4722 // Considers RFC 6265 section 5.2: 4723 // ... 4724 // 3. If the remaining unparsed-attributes contains a %x3B (";") 4725 // character: 4726 // Consume the characters of the unparsed-attributes up to, 4727 // not including, the first %x3B (";") character. 4728 // ... 4729 stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; 4730 } 4731 4732 return (document.cookie = key + '=' + value + stringifiedAttributes); 4733 } 4734 4735 function get (key, json) { 4736 if (typeof document === 'undefined') { 4737 return; 4738 } 4739 4740 var jar = {}; 4741 // To prevent the for loop in the first place assign an empty array 4742 // in case there are no cookies at all. 4743 var cookies = document.cookie ? document.cookie.split('; ') : []; 4744 var i = 0; 4745 4746 for (; i < cookies.length; i++) { 4747 var parts = cookies[i].split('='); 4748 var cookie = parts.slice(1).join('='); 4749 4750 if (!json && cookie.charAt(0) === '"') { 4751 cookie = cookie.slice(1, -1); 4752 } 4753 4754 try { 4755 var name = decode(parts[0]); 4756 cookie = (converter.read || converter)(cookie, name) || 4757 decode(cookie); 4758 4759 if (json) { 4760 try { 4761 cookie = JSON.parse(cookie); 4762 } catch (e) {} 4763 } 4764 4765 jar[name] = cookie; 4766 4767 if (key === name) { 4768 break; 4769 } 4770 } catch (e) {} 4771 } 4772 4773 return key ? jar[key] : jar; 4774 } 4775 4776 api.set = set; 4777 api.get = function (key) { 4778 return get(key, false /* read as raw */); 4779 }; 4780 api.getJSON = function (key) { 4781 return get(key, true /* read as json */); 4782 }; 4783 api.remove = function (key, attributes) { 4784 set(key, '', extend(attributes, { 4785 expires: -1 4786 })); 4787 }; 4788 4789 api.defaults = {}; 4790 4791 api.withConverter = init; 4792 4793 return api; 4794 } 4795 4796 return init(function () {}); 4797})); 4798 4799function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 4800 4801function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); _groups.set(_this, groups || _groups.get(re)); return _setPrototypeOf(_this, BabelRegExp.prototype); } _inherits(BabelRegExp, RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; if (_typeof(args[args.length - 1]) !== "object") { args = [].slice.call(args); args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); } 4802 4803function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { c
4803onstructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } 4804 4805function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } 4806 4807function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 4808 4809function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 4810 4811function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 4812 4813function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 4814 4815function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 4816 4817function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 4818 4819/* eslint-env amd,es6 */ 4820redesign.define('util/cookies/wcAuthentication',['jsCookie'], function (cookieLib) { 4821 'use strict'; 4822 4823 var getUserId = function getUserId() { 4824 var allCookies = cookieLib.get(); 4825 var wcAuthenticationId = Object.keys(allCookies).reduce(function (foundKey, key) { 4826 var _pop, _pop$groups; 4827 4828 if (foundKey) return foundKey; 4829 return (_pop = _toConsumableArray(key.matchAll( /*#__PURE__*/_wrapReg
4829Exp(/WC_AUTHENTICATION_(\x2D?[0-9]+)/g, { 4830 authId: 1 4831 }))).pop()) === null || _pop === void 0 ? void 0 : (_pop$groups = _pop.groups) === null || _pop$groups === void 0 ? void 0 : _pop$groups.authId; 4832 }, undefined); 4833 return wcAuthenticationId; 4834 }; 4835 4836 var get = function get() { 4837 return cookieLib.get("WC_AUTHENTICATION_".concat(getUserId())); 4838 }; 4839 4840 return { 4841 exists: function exists() { 4842 return get() !== undefined; 4843 }, 4844 get: get, 4845 getUserId: getUserId, 4846 remove: function remove() { 4847 return cookieLib.noModificationsAllowed(); 4848 }, 4849 set: function set() { 4850 return cookieLib.noModificationsAllowed(); 4851 } 4852 }; 4853}); 4854 4855function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4856 4857function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 4858 4859/* eslint-env amd,es6 */ 4860redesign.define('util/cookies/cookie',['exports', 'jsCookie'], function (exports, cookieLib) { 4861 'use strict'; 4862 4863 var _cookieAccessors; 4864 4865 var cookieTypes = { 4866 JSON: 'json', 4867 STRING: 'string', 4868 NUMBER: 'number' 4869 }; 4870 var cookieAccessors = (_cookieAccessors = {}, _defineProperty(_cookieAccessors, cookieTypes.JSON, function (name) { 4871 var cookieValue = cookieLib.getJSON(name); 4872 return cookieValue && _typeof(cookieValue) === 'object' ? cookieValue : undefined; 4873 }), _defineProperty(_cookieAccessors, cookieTypes.STRING, function (name) { 4874 return cookieLib.get(name); 4875 }), _defineProperty(_cookieAccessors, cookieTypes.NUMBER, function (name) { 4876 return parseInt(cookieLib.get(name), 10); 4877 }), _cookieAccessors); 4878 4879 var wrapFn = function wrapFn(fn) { 4880 return typeof fn === 'function' ? fn : function () { 4881 return fn; 4882 }; 4883 }; 4884 4885 exports.noModificationsAllowed = function () { 4886 throw new Error('cookie should not be modified'); 4887 }; 4888 4889 exports.TYPE = Object.freeze(cookieTypes); 4890 4891 exports.factory = function (_ref) { 4892 var name = _ref.name, 4893 expires = _ref.ttl, 4894 type = _ref.type, 4895 secure = _ref.secure, 4896 domain = _ref.domain; 4897 var getExpires = wrapFn(expires); 4898 var getSecure = wrapFn(secure); 4899 var getDomain = wrapFn(domain); 4900 4901 var getOptions = function getOptions() { 4902 var myExpires = getExpires(); 4903 var mySecure = getSecure(); 4904 var myDomain = getDomain(); 4905 var options = {}; 4906 if (Number.isFinite(myExpires)) options.expires = myExpires; 4907 if (typeof mySecure === 'boolean') options.secure = mySecure; 4908 if (myDomain) options.domain = myDomain; 4909 return options; 4910 }; 4911 4912 return { 4913 exists: function exists() { 4914 return typeof cookieLib.get(name) !== 'undefined'; 4915 }, 4916 get: function get() {
4917 return (cookieAccessors[type] || cookieAccessors[cookieTypes.STRING])(name); 4918 }, 4919 remove: function remove() { 4920 return cookieLib.remove(name, getOptions()); 4921 }, 4922 set: function set(value) { 4923 return cookieLib.set(name, value, getOptions()); 4924 } 4925 }; 4926 }; 4927 4928 return exports; 4929}); 4930 4931/* eslint-env amd,es6 */ 4932redesign.define('util/cookies/userType',['util/cookies/cookie'], function (cookie) { 4933 'use strict'; 4934 4935 return cookie.factory({ 4936 name: 'userType', 4937 type: cookie.TYPE.STRING 4938 }); 4939}); 4940 4941function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } 4942 4943function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 4944 4945function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 4946 4947function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } 4948 4949function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 4950 4951function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 4952 4953function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 4954 4955function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } 4956 4957function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } 4958 4959/* eslint-env amd,es6 */ 4960redesign.define('util/cookies/geoLocation',['util/cookies/cookie'], function (cookie) { 4961 'use strict'; 4962 4963 var factoryMadeGeoLocation = cookie.factory({ 4964 name: 'geoLocation', 4965 type: cookie.TYPE.STRING 4966 }); 4967 4968 var convertToObj = function convertToObj() { 4969 var _factoryMadeGeoLocati, _factoryMadeGeoLocati2; 4970 4971 var _ref = (_factoryMadeGeoLocati = (_factoryMadeGeoLocati2 = factoryMadeGeoLocation.get()) === null || _factoryMadeGeoLocati2 === void 0 ? void 0 : _factoryMadeGeoLocati2.split(':')) !== null && _factoryMadeGeoLocati !== void 0 ? _factoryMadeGeoLocati : [], 4972 _ref2 = _slicedToArray(_ref, 3), 4973 country = _ref2[0], 4974 state = _ref2[1], 4975 zip = _ref2[2]; 4976 4977 return { 4978 country: country, 4979 state: state, 4980 zip: zip 4981 }; 4982 }; 4983 4984 var getKey = function getKey(key) { 4985 return function () { 4986 var _convertToObj; 4987 4988 return (_convertToObj = convertToObj()) === null || _convertToObj === void 0 ? void 0 : _convertToObj[key]; 4989 }; 4990 }; 4991 4992 return _objectSpread(_objectSpread({}, factoryMadeGeoLocation), {}, { 4993 getCountry: getKey('country'), 4994 getState: getKey('state'), 4995 getZip: getKey('zip'), 4996 remove: cookie.noModificationsAllowed, 4997 set: cookie.noModificationsAllowed 4998 }); 4999}); 5000 5001function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } 5002 5003function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); }
5003 else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 5004 5005function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 5006 5007/* eslint-env amd,es6 */ 5008redesign.define('util/cookies/uPref',['util/cookies/cookie', 'util/cookies/geoLocation', 'anfUtil/testFramework'], function (cookie, geoLocationCookie, test) { 5009 'use strict'; 5010 5011 var EXPIRY_DURATION = 365; 5012 var NAME = 'uPref'; 5013 var factoryMadeUPref = cookie.factory({ 5014 name: NAME, 5015 ttl: EXPIRY_DURATION, 5016 type: cookie.TYPE.JSON 5017 }); 5018 5019 var getExpiryDate = function getExpiryDate() { 5020 var date = new Date(); 5021 date.setDate(date.getDate() + EXPIRY_DURATION); 5022 return date; 5023 }; 5024 5025 var uPref = _objectSpread(_objectSpread({}, factoryMadeUPref), {}, { 5026 get: function get() { 5027 return factoryMadeUPref.get() || {}; 5028 }, 5029 getCookieForApps: function getCookieForApps() { 5030 return { 5031 name: NAME, 5032 value: encodeURIComponent(JSON.stringify(uPref.get())), 5033 domain: location.hostname, 5034 expires: getExpiryDate().toISOString() 5035 }; 5036 }, 5037 getMarketingCookieAccept: function getMarketingCookieAccept() { 5038 var _geoLocationCookie$ge, _this$get$marketingCo; 5039 5040 /** 5041 * Setup default value for the MarketingCookieAccept, 5042 * currently only HOL when the user is in California defaults 5043 * to false, everywhere else is true 5044 */ 5045 var defaultMarketingCookieAccept = !(test.store.hol() && ['CA'].includes((_geoLocationCookie$ge = geoLocationCookie.getState()) === null || _geoLocationCookie$ge === void 0 ? void 0 : _geoLocationCookie$ge.toUpperCase())); 5046 var value = (_this$get$marketingCo = this.get().marketingCookieAccept) !== null && _this$get$marketingCo !== void 0 ? _this$get$marketingCo : defaultMarketingCookieAccept; 5047 return ['true', true].includes(value); 5048 } 5049 }); 5050 5051 return uPref; 5052}); 5053 5054redesign.define('coreServices/storage',['jsCookie'], function storageService(cookies) { 5055 'use strict'; 5056 5057 var privateMembers = { 5058 read: function privateRead() { 5059 return cookies.get('sessionCookie') || '{}'; 5060 }, 5061 write: function privateWrite(sessionCookieValue, optionsObject) { 5062 return cookies.set('sessionCookie', sessionCookieValue, optionsObject); 5063 }, 5064 deleteCookie: function privateDeleteCookie(sessionCookieValue, key) { 5065 // eslint-disable-next-line no-param-reassign 5066 delete sessionCookieValue[key]; 5067 return sessionCookieValue; 5068 }, 5069 webstorage: function webstorageFactory() { 5070 var storageType = this; 5071 return { 5072 unsafeSet: function unSafeSetStorage(key, value) { 5073 if (typeof value === 'undefined') return; 5074 5075 var valueToSet = typeof value === 'string' 5076 ? value 5077 : JSON.stringify(value); 5078 5079 storageType.setItem(key, valueToSet); 5080 }, 5081 set: function setStorage(key, value) { 5082 try { 5083 this.unsafeSet(key, value); 5084 } catch (e) { 5085 // keeping Empty. Safety net for Private Mode on Safari, Phone 5086 } 5087 }, 5088 unsafeGet: function unsafeGetStorage(key) { 5089 return storageType.getItem(key); 5090 }, 5091 get: function getStorage(key) { 5092 try { 5093 return this.unsafeGet(key); 5094 } catch (e) { 5095 return null; 5096 } 5097 }, 5098 getBoolean: function getBooleanStorage(key) { 5099 return this.get(key) === 'true'; 5100 }, 5101 unsafeGetJSON: function unsafeGetJSON(key) { 5102 return JSON.parse(this.unsafeGet(key)); 5103 }, 5104 getJSON: function getJSON(key, defaultValue) { 5105 var myDefaultValue = typeof defaultValue !== 'undefined' ? defaultValue : {}; 5106 5107 try { 5108 return this.unsafeGetJSON(key); 5109 } catch (e) { 5110 return myDefaultValue; 5111 } 5112 },
5113 exists: function existsInStorage(key) { 5114 var value = this.get(key); 5115 return typeof value !== 'undefined' && value !== null; 5116 }, 5117 unsafeRemove: function unsafeRemove(key) { 5118 storageType.removeItem(key); 5119 }, 5120 remove: function removeStorage(key) { 5121 try { 5122 this.unsafeRemove(key); 5123 } catch (e) { 5124 // keeping Empty. Safety net for Private Mode on Safari, Phone 5125 } 5126 }, 5127 unsafeClear: function unsafeClear() { 5128 storageType.clear(); 5129 }, 5130 clear: function clearStorage() { 5131 try { 5132 this.unsafeClear(); 5133 } catch (e) { 5134 // keeping Empty. Safety net for Private Mode on Safari, Phone 5135 } 5136 }, 5137 isSupportedByBrowser: function isSupportedByBrowser() { 5138 try { 5139 this.unsafeSet('isSupportedByBrowser', 'test'); 5140 var returnValue = this.unsafeGet('isSupportedByBrowser') === 'test'; 5141 this.unsafeRemove('isSupportedByBrowser'); 5142 return returnValue; 5143 } catch (e) { 5144 return false; 5145 } 5146 } 5147 }; 5148 } 5149 }; 5150 5151 var sessionStorage; 5152 var localStorage; 5153 5154 try { 5155 sessionStorage = window.sessionStorage; 5156 localStorage = window.localStorage; 5157 } catch (exception) { 5158 sessionStorage = null; 5159 localStorage = null; 5160 } 5161 5162 return { 5163 session: privateMembers.webstorage.call(sessionStorage), 5164 local: privateMembers.webstorage.call(localStorage), 5165 cookie: { 5166 get: function getCookie(key) { 5167 var sessionCookieProperty; 5168 var self = this; 5169 var sessionCookie = self.read(); 5170 var sessionCookieObject = JSON.parse(sessionCookie); 5171 if (sessionCookieObject === {}) { 5172 // eslint-disable-next-line no-undefined 5173 return undefined; 5174 } 5175 for (sessionCookieProperty in sessionCookieObject) { 5176 if (sessionCookieObject.hasOwnProperty(sessionCookieProperty) && sessionCookieProperty === key) { 5177 return sessionCookieObject[sessionCookieProperty]; 5178 } 5179 } 5180 // eslint-disable-next-line no-undefined 5181 return undefined; 5182 }, 5183 set: function setCookie(key, value) { 5184 var self = this; 5185 var existingSessionCookie = self.read(); 5186 var existingSessionCookieObject = JSON.parse(existingSessionCookie); 5187 var newPair = {}; 5188 var newSessionCookie; 5189 var optionsObject = {path: '/'}; 5190 5191 newPair[key] = value; 5192 $.extend(existingSessionCookieObject, newPair); 5193 newSessionCookie = JSON.stringify(existingSessionCookieObject); 5194 this.write(newSessionCookie, optionsObject); 5195 }, 5196 read: function readCookie() { 5197 return privateMembers.read(); 5198 }, 5199 write: function writeCookie(sessionCookieValue, optionsObject) { 5200 return privateMembers.write(sessionCookieValue, optionsObject); 5201 }, 5202 exists: function existsCookie(key) { 5203 var self = this; 5204 5205 var exists = typeof self.get(key) !== 'undefined' ? true : false; 5206 5207 return exists; 5208 }, 5209 remove: function removeCookie(key) { 5210 var self = this; 5211 var exists = self.exists(key); 5212 var sessionCookieValue; 5213 var sessionCookieValueObject; 5214 var newSessionCookieValue; 5215 var newSessionCookieValueObject; 5216 var optionsObject = {path: '/'}; 5217 5218 if (exists) { 5219 sessionCookieValue = self.read(); 5220 sessionCookieValueObject = JSON.parse(sessionCookieValue); 5221 newSessionCookieValueObject = self.deleteKey(sessionCookieValueObject, key); 5222 newSessionCookieValue = JSON.stringify(newSessionCookieValueObject); 5223 self.write(newSessionCookieValue, optionsObject); 5224 return true; 5225 } 5226 return false; 5227 }, 5228 deleteKey: function deleteKeyCookie(sessionCookieValue, key) { 5229 var newSessionCookieValue = privateMembers.deleteCookie(sessionCookieValue, key); 5230 return newSessionCookieValue; 5231 }, 5232 clear: function clearCookie() { 5233 var optionsObject = {path: '/'}; 5234 5235 return cookies.remove('sessionCookie', optionsObject); 5236 } 5237 } 5238 }; 5239}); 5240 5241redesign.define('coreServices/clientSideLogger',['coreServices/storage'], function clientSideLogger(storage) { 5242 'use strict'; 5243 5244 /** 5245 * The client side logger 5246 * @module clientSideLogger 5247 */ 5248 5249 /** 5250 * the private methods used internally within this module 5251 * @private 5252 * @module clientSideLogger.privateMembers 5253 */ 5254 5255 var privateMembers = { 5256 5257 /** 5258 * convert the arguments into a message. 5259 * Extracts name and message from Error instances. 5260 * Converts other objects into JSON 5261 * Takes functions and return's there names 5262 * All other data is passed. 5263 * All data is joined by " || " 5264 * @param {mixed[]} args - any data 5265 * @return {String} the message 5266 */ 5267 5268 formatDataIntoMessage: function formatDataIntoMessage(args) { 5269 var message = [];
5270 args.forEach(function forEach(arg) { 5271 var type = typeof arg; 5272 if (type === 'object' && arg !== null) { 5273 if (arg instanceof Error) { 5274 message.push(arg.name, arg.message); 5275 } else { 5276 message.push(JSON.stringify(arg)); 5277 } 5278 } else if (type !== 'function') { 5279 message.push(arg); 5280 } 5281 }); 5282 return message.join(' || '); 5283 } 5284 }; 5285 5286 /** 5287 * the factory responsible for making and managing loggers 5288 * @private 5289 * @module clientSideLogger.LoggerManager 5290 */ 5291 var LoggerManager = { 5292 /** 5293 * the current local storage instance 5294 */ 5295 localStorage: storage.local, 5296 5297 /** 5298 * the local storage key 5299 */ 5300 localStorageKey: 'clientSideLogger', 5301 5302 /** 5303 * a map of all of the loggers 5304 */ 5305 loggers: {}, 5306 5307 /** 5308 * initializes and returns the log setting from local storage 5309 * @return {String} The setting string e.g. !* 5310 */ 5311 5312 getLogSetting: function getLogSetting() { 5313 if (!this.localStorage.get(this.localStorageKey)) { 5314 this.localStorage.set(this.localStorageKey, '!*'); 5315 } 5316 return this.localStorage.get(this.localStorageKey); 5317 }, 5318 5319 /** 5320 * Set the log setting into local storage 5321 * @param {String} value - the log setting to save 5322 */ 5323 5324 setLogSetting: function setLogSetting(value) { 5325 this.localStorage.set(this.localStorageKey, value); 5326 this.updateLoggersState(); 5327 }, 5328 5329 /** 5330 * Append a log setting 5331 * @param {String} value the log setting to append 5332 */ 5333 5334 updateLogSetting: function updateLogSetting(value) { 5335 this.setLogSetting(this.getLogSetting() + ';' + value); 5336 }, 5337 5338 /** 5339 * Get the logger names 5340 * @returns {String[]} An array of the logger name 5341 */ 5342 5343 getLoggerNames: function getLoggerNames() { 5344 return Object.keys(this.loggers).sort(); 5345 }, 5346 5347 /** 5348 * Get the loggers 5349 * @returns {Function[]} An array of the logger functions 5350 */ 5351 5352 getLoggers: function getLoggers() { 5353 return Object.values(this.loggers); 5354 }, 5355 5356 /** 5357 * Check if we have the logger 5358 * @param {String} name - The name of the logger 5359 * @returns {Boolean} if we hae the logger or not 5360 */ 5361 5362 hasLogger: function hasLogger(name) { 5363 return !!this.loggers[name]; 5364 }, 5365 5366 /** 5367 * Get a logger by the name 5368 * @param {String} name - The name of the logger 5369 * @returns {Function} the logger 5370 */ 5371 5372 getLogger: function getLogger(name) { 5373 return this.loggers[name]; 5374 }, 5375 5376 /** 5377 * Check if the logger is enabled or not 5378 * @param {String} name - The name of the logger 5379 * @returns {Boolean} if the logger is enabled or not 5380 */ 5381 5382 loggerEnabled: function loggerEnabled(name) { 5383 if (this.hasLogger(name)) { 5384 return this.getLogger(name).enabled; 5385 } 5386 return false; 5387 }, 5388 5389 /** 5390 * Add the logger and trigger an update to loggers' state 5391 * @param {Function} logger - The logger 5392 * @returns {Object} LoggerManager 5393 */ 5394 5395 addLogger: function addLogger(logger) { 5396 if (!this.hasLogger(logger.name)) { 5397 this.loggers[logger.name] = logger; 5398 this.updateLoggersState(); 5399 } 5400 return this; 5401 }, 5402 5403 /** 5404 * update the state of all the loggers based on the log setting 5405 */ 5406 5407 updateLoggersState: function updateLoggersState() { 5408 var logSettings = this.getLogSetting().split(';'); 5409 5410 for (var i = 0; i < logSettings.length; i++) { 5411 var logSetting = logSettings[i]; 5412 if (logSetting && !logSetting.length) { 5413 continue; 5414 } 5415 5416 var firstChar = logSetting.charAt(0); 5417 var enabled = true; 5418 5419 if (firstChar === '!') { 5420 logSetting = logSetting.slice(1); 5421 enabled = false; 5422 } 5423 5424 var names = this.getLoggerNames(); 5425 for (var j = 0; j < names.length; j++) { 5426 var name = names[j]; 5427 if (logSetting === '*' || name.match(logSetting)) { 5428 var logger = this.getLogger(name); 5429 logger.enabled = enabled; 5430 } 5431 } 5432 } 5433 }, 5434 5435 /** 5436 * Remove a logger 5437 * @param {Function} logger - The logger 5438 * @returns {Object} LoggerManager 5439 */ 5440 5441 removeLogger: function removeLogger(logger) { 5442 if (this.hasLogger(logger.name)) { 5443 delete this.loggers[logger.name]; 5444 } 5445 return this; 5446 }, 5447 5448 /** 5449 * Create a logger 5450 * @param {String} name - The logger name 5451 * @return {Function} the logger 5452 */ 5453 5454 createLogger: function createLogger(name) { 5455 return new Logger(name); 5456 } 5457 }; 5458 5459 /** 5460 * The controls that can be accessed from the console 5461 * @public 5462 * @module clientSideLogger.controls 5463 */ 5464 5465 var Controls = { 5466 /** 5467 * Get the log setting 5468 * @returns {String} the current log setting 5469 */ 5470 getLogSetting: function getLogSetting() { 5471 return LoggerManager.getLogSetting(); 5472 }, 5473 5474 /** 5475 * Clear the log setting 5476 * @returns {Object} the controls module 5477 */ 5478 5479 clearLogSetting: function clearLogSetting() { 5480 LoggerManager.setLogSetting(''); 5481 return this; 5482 }, 5483 5484 /** 5485 * Enable logger(s) 5486 * @param {string} [_value] the name or fragment of a name for logger(s) 5487 * @returns {Object} the controls module 5488 */ 5489 5490 enableLogger: function enableLogger(_value) { 5491 var value = _value || '*'; 5492 LoggerManager.updateLogSetting(value); 5493 return this; 5494 }, 5495 5496 /** 5497 * Enable all loggers 5498 * @returns {Object} the controls module 5499 */ 5500 5501 enableAllLoggers: function enableAllLoggers() { 5502 LoggerManager.setLogSetting('*'); 5503 return this; 5504 }, 5505 5506 /** 5507 * Disable logger(s) 5508 * @param {string} [_value] the name or fragment of a name for logger(s) 5509 * @returns {Object} the controls module 5510 */ 5511 5512 disableLogger: function disableLogger(_value) { 5513 var value = '!' + (_value || '*'); 5514 LoggerManager.updateLogSetting(value); 5515 return this; 5516 }, 5517 5518 /** 5519 * Disable all loggers 5520 * @returns {Object} the controls module 5521 */ 5522 5523 disableAllLoggers: function disableAllLoggers() { 5524 LoggerManager.setLogSetting('!*'); 5525 return this; 5526 }, 5527 5528 /** 5529 * Get all the loggers 5530 * @returns {Function[]} the loggers 5531 */ 5532 5533 getLoggers: function getLoggers() { 5534 return LoggerManager.getLoggers(); 5535 }, 5536 5537 /** 5538 * Check if we have a logger 5539 * @param {String} name - The name of the logger 5540 * @returns {Boolean} if we have the logger or not 5541 */ 5542 5543 hasLogger: function hasLogger(name) { 5544 return LoggerManager.hasLogger(name); 5545 }, 5546 5547 /** 5548 * Get a logger 5549 * @param {String} name - The name of the logger 5550 * @returns {Function} the logger 5551 */ 5552 5553 getLogger: function getLogger(name) { 5554 return LoggerManager.getLogger(name); 5555 }, 5556 5557 /** 5558 * Check if the logger is enabled 5559 * @param {String} name - The name of the logger 5560 * @returns {Boolean} if the logger is enabled or not 5561 */ 5562 5563 loggerEnabled: function loggerEnabled(name) { 5564 return LoggerManager.loggerEnabled(name); 5565 }, 5566 5567 /** 5568 * enable a transport by name 5569 * @param {String} transportName - the transport name 5570 * @returns {Object} the controls module 5571 */ 5572 5573 enableTransport: function enableTransport(transportName) { 5574 Transporter.enableTransport(transportName); 5575 return this; 5576 }, 5577 5578 /** 5579 * disable a transport by name 5580 * @param {String} transportName - the transport name 5581 * @returns {Object} the controls module 5582 */ 5583 5584 disableTransport: function disableTransport(transportName) { 5585 Transporter.disableTransport(transportName); 5586 return this; 5587 }, 5588 5589 /** 5590 * enable all transports 5591 * @returns {Object} the controls module 5592 */ 5593 5594 enableAllTransports: function enableAllTransports() { 5595 Transporter.enableAllTransports(); 5596 return this; 5597 }, 5598 5599 /** 5600 * disable all transports 5601 * @returns {Object} the controls module 5602 */ 5603 5604 disableAllTransports: function disableAllTransports() { 5605 Transporter.disableAllTransports(); 5606 return this; 5607 }, 5608 5609 /** 5610 * get the transports 5611 * @return {Object[]} the transports 5612 */ 5613 getTransports: function getTransports() { 5614 return Transporter.transports.slice(0); 5615 }, 5616 5617 /** 5618 * Set the local storage instance 5619 * @param {Object} localStorage - the local storage instance 5620 * @returns {Object} the controls module 5621 */ 5622 5623 setLocalStorage: function setLocalStorage(localStorage) { 5624 LoggerManager.localStorage = localStorage; 5625 return this; 5626 }, 5627 5628 /** 5629 * Set the sosta logger transport 5630 * @param {Object} SostaLogger - the Sosta Logger 5631 * @returns {Object} the controls module 5632 */ 5633 5634 setSostaLogger: function setSostaLogger(SostaLogger) { 5635 SostaTransport.SostaLogger = SostaLogger; 5636 return this; 5637 }, 5638 5639 /** 5640 * Unset the SostaLogger 5641 * @returns {Object} the controls module 5642 */ 5643
5644 unsetSostaLogger: function unsetSostaLogger() { 5645 SostaTransport.SostaLogger = void 0; 5646 return this; 5647 }, 5648 5649 /** 5650 * Set the Qunatum Metrics API instance 5651 * @param {Object} QuantumMetricAPI - the quantum metrics API 5652 * @returns {Object} the controls module 5653 */ 5654 5655 setQuantumMetricAPI: function setQuantumMetricAPI(QuantumMetricAPI) { 5656 QuantumMetricTransport.QuantumMetricAPI = QuantumMetricAPI; 5657 return this; 5658 }, 5659 5660 /** 5661 * Unset the Quantum Metrics API 5662 * @returns {Object} the controls module 5663 */ 5664 5665 unsetQuantumMetricAPI: function unsetQuantumMetricAPI() { 5666 QuantumMetricTransport.QuantumMetricAPI = void 0; 5667 return this; 5668 }, 5669 5670 /** 5671 * Set the console instance 5672 * @param {Object} console - The console instance 5673 * @returns {Object} the controls module 5674 */ 5675 5676 setConsole: function setConsole(console) { 5677 ConsoleTransport.console = console; 5678 return this; 5679 }, 5680 5681 /** 5682 * Unset the console instance 5683 * @returns {Object} the controls module 5684 */ 5685 5686 unsetConsole: function unsetConsole() { 5687 ConsoleTransport.console = void 0; 5688 return this; 5689 } 5690 5691 }; 5692 5693 /** 5694 * A transport to the console 5695 * @private 5696 * @module clientSideLogger.ConsoleTransport 5697 */ 5698 5699 var ConsoleTransport = { 5700 /** 5701 * name of the transport 5702 */ 5703 name: 'console', 5704 5705 /** 5706 * if it is enabled or not 5707 */ 5708 5709 enabled: true, 5710 5711 /** 5712 * the current console 5713 */ 5714 console: window.console, 5715 5716 /** 5717 * log any arugments to the console 5718 * @param {...mixed} 5719 */ 5720 5721 log: function log() { 5722 this.enabled && this.console && this.console.log.apply(this.console, Array.from(arguments)); 5723 }, 5724 5725 /** 5726 * warn any arugments to the console 5727 * @param {...mixed} 5728 */ 5729 5730 warn: function warn() { 5731 this.enabled && this.console && this.console.warn.apply(this.console, Array.from(arguments)); 5732 }, 5733 5734 /** 5735 * error any arugments to the console 5736 * @param {...mixed} 5737 */ 5738 5739 error: function error() { 5740 this.enabled && this.console && this.console.error.apply(this.console, Array.from(arguments)); 5741 } 5742 }; 5743 5744 /** 5745 * A transport to Quantum Metrics API 5746 * @private 5747 * @module clientSideLogger.QuantumMetricTransport 5748 */ 5749 5750 // TODO: waiting on CS documentation from Analytics team including Brett Hunt 5751 5752 var QuantumMetricTransport = { 5753 /** 5754 * name of the transport 5755 */ 5756 5757 name: 'quantum', 5758 5759 /** 5760 * if it is enabled or not 5761 */ 5762 5763 enabled: true, 5764 5765 /** 5766 * the Quantum Metrics API 5767 */ 5768 QuantumMetricAPI: window.QuantumMetricAPI, 5769 5770 /** 5771 * log to Quantum Metrics 5772 * @param {...mixed} 5773 */ 5774 5775 log: function log() { 5776 // NOOP until futher notice 5777 }, 5778 5779 /** 5780 * warn to Quantum Metrics 5781 * @param {...mixed} 5782 */ 5783 5784 warn: function warn() { 5785 this.enabled && this.send(Array.from(arguments)); 5786 }, 5787 5788 /** 5789 * error to Quantum Metrics 5790 * @param {...mixed} 5791 */ 5792 5793 error: function error() { 5794 this.enabled && this.send(Array.from(arguments)); 5795 }, 5796 5797 /** 5798 * send whatever arguments. 5799 * 5800 * e.g. "checkout.deliveryOptions.sameDayDelivery || .same-day-delivery || some message || { \"some\": \"data\" }" 5801 * 5802 * @param {mixed[]} data - a list of any data 5803 */ 5804 5805 send: function send(data) { 5806 // NOTE: this has been inferred from looking at examples 5807 this.QuantumMetricAPI && this.QuantumMetricAPI.sendEvent(400, 0, privateMembers.formatDataIntoMessage(data)); 5808 } 5809 }; 5810 5811 /** 5812 * A transport to Sosta Logger 5813 * @private 5814 * @deprecated 5815 * @module clientSideLogger.SostaTransport 5816 */ 5817 var SostaTransport = { 5818 /** 5819 * name of the transport 5820 */ 5821 5822 name: 'sosta', 5823 5824 /** 5825 * if it is enabled or not 5826 */ 5827 5828 enabled: false, 5829 5830 /** 5831 * the SostaLogger instance 5832 */ 5833 SostaLogger: (window.BOOMR && window.BOOMR.plugins && window.BOOMR.plugins.Errors) ? window.BOOMR.plugins.Errors : null, 5834 5835 /** 5836 * log to Sosta Logger 5837 * @param {...mixed} 5838 */ 5839 5840 log: function log() { 5841 // NOOP 5842 }, 5843 5844 /** 5845 * warn to Sosta Logger 5846 * @param {...mixed} 5847 */ 5848 5849 warn: function warn() { 5850 // NOOP 5851 }, 5852 5853 /** 5854 * error to Sosta Logger 5855 * @param {String} message - A message to send 5856 */ 5857 5858 error: function error(message, data) { 5859 // NOTE the following code is from the legacy client side logger 5860 var err = {}; 5861 if (message) { 5862 err.message = message; 5863 err.data = data; 5864 5865 this.SostaLogger && this.SostaLogger.send(message); 5866 5867 if (this.SostaLogger) { 5868 // Leave this in, this is the original call which we want to go back to at some point 5869 // this.SostaLogger.send(JSON.stringify(err)); 5870 } else { 5871 // Leave this in, this is the original call which we want to go back to at some point
5872 // consoleTransport.warn(JSON.stringify(err)); 5873 } 5874 } 5875 } 5876 }; 5877 5878 /** 5879 * The logic used in the legacy version of the clientSideLogger 5880 * @private 5881 * @deprecated 5882 * @module clientSideLogger.LegacyClientSideLogger 5883 */ 5884 5885 var LegacyClientSideLogger = { 5886 5887 /** 5888 * error message to the transports 5889 * @param {String} message - message to send 5890 * @param {Object} [data] - data to send 5891 */ 5892 5893 error: function error(message, data) { 5894 SostaTransport.error(message, data); 5895 ConsoleTransport.error(message, data); 5896 }, 5897 5898 /** 5899 * warn message to the transports 5900 * @param {String} message - message to send 5901 */ 5902 5903 warn: function warn(message) { 5904 ConsoleTransport.warn(message); 5905 }, 5906 5907 /** 5908 * log message to the transports 5909 * @param {String} message - message to send 5910 */ 5911 5912 log: function log(message) { 5913 // NOTE: we are not using log here since send doesn't check if the transport is enabled or not 5914 QuantumMetricTransport.send([message]); 5915 ConsoleTransport.log(message); 5916 } 5917 }; 5918 5919 /** 5920 * The transport(s) used to render a log, warn, or error 5921 * @module clientSideLogger.transport 5922 */ 5923 5924 var Transporter = { 5925 5926 /** 5927 * transports that have been configured 5928 */ 5929 5930 transports: [ 5931 ConsoleTransport, 5932 SostaTransport, // NOTE: I believe Sosta is no longer used 5933 QuantumMetricTransport // NOTE: if this is enabled any log, warn, error messages will be transported 5934 ], 5935 5936 /** 5937 * log a message to the transports 5938 */ 5939 5940 log: function log() { 5941 var args = Array.from(arguments); 5942 this.getEnabledTransports().forEach(function handleTransport(transport) { 5943 transport.log && transport.log.apply(transport, args); 5944 }); 5945 }, 5946 5947 /** 5948 * warn a message to the transports 5949 */ 5950 5951 warn: function warn() { 5952 var args = Array.from(arguments); 5953 this.getEnabledTransports().forEach(function handleTransport(transport) { 5954 transport.warn && transport.warn.apply(transport, args); 5955 }); 5956 }, 5957 5958 /** 5959 * error a message to the transports 5960 */ 5961 5962 error: function error() { 5963 var args = Array.from(arguments); 5964 this.getEnabledTransports().forEach(function handleTransport(transport) { 5965 transport.error && transport.error.apply(transport, args); 5966 }); 5967 }, 5968 5969 /** 5970 * get the enabled transports 5971 * @returns {Object[]} only the enabled transports 5972 */ 5973 5974 getEnabledTransports: function getEnabledTransports() { 5975 return this.transports 5976 .filter(function handleTransport(transport) { 5977 return transport.enabled; 5978 }); 5979 }, 5980 5981 /** 5982 * get the disabled transports 5983 * @returns {Object[]} only the disabled transports 5984 */ 5985 5986 getDisabledTransports: function getDisabledTransports() { 5987 return this.transports 5988 .filter(function handleTransport(transport) { 5989 return !transport.enabled; 5990 }); 5991 }, 5992 5993 /** 5994 * get transport by name 5995 * @returns {Object} the transport 5996 */ 5997 5998 getTransport: function getTransport(transportName) { 5999 return this.transports 6000 .find(function handleTransport(transport) { 6001 return transport.name.toLowerCase().match(transportName.toLowerCase()); 6002 }); 6003 }, 6004 6005 /** 6006 * has a transport by name 6007 * @returns {Boolean} if we have the transport or not 6008 */ 6009 6010 hasTransport: function hasTransport(transportName) { 6011 return !!this.getTransport(transportName); 6012 }, 6013 6014 /** 6015 * enable a transport given the name 6016 * @param {String} transportName - name of the transport 6017 * @returns {Object} the transport instance (this) 6018 */ 6019 6020 enableTransport: function enableTransport(transportName) { 6021 if (this.hasTransport(transportName)) { 6022 this.getTransport(transportName).enabled = true; 6023 } 6024 return this; 6025 }, 6026 6027 /** 6028 * disable a transport given the name 6029 * @param {String} transportName - name of the transport 6030 * @returns {Object} the transport instance (this) 6031 */ 6032 6033 disableTransport: function disableTransport(transportName) { 6034 if (this.hasTransport(transportName)) { 6035 this.getTransport(transportName).enabled = false;
6036 } 6037 return this; 6038 }, 6039 6040 /** 6041 * enable all disabled transports given the name 6042 * @returns {Object} the transport instance (this) 6043 */ 6044 6045 enableAllTransports: function enableAllTransports() { 6046 this.getDisabledTransports(function handleTransport(transport) { 6047 this.enableTransport(transport.name); 6048 }.bind(this)); 6049 return this; 6050 }, 6051 6052 /** 6053 * disable all enabled transports given the name 6054 * @returns {Object} the transport instance (this) 6055 */ 6056 6057 disableAllTransports: function disableAllTransports() { 6058 this.getEnabledTransports(function handleTransport(transport) { 6059 this.disableTransport(transport.name); 6060 }.bind(this)); 6061 return this; 6062 } 6063 }; 6064 6065 /** 6066 * Create or get a logger 6067 * @param {String} name - The name of the logger 6068 * @returns {Function} the logger 6069 */ 6070 6071 function Logger(name) { 6072 if (LoggerManager.hasLogger(name)) { 6073 return LoggerManager.getLogger(name); 6074 } 6075 6076 /** 6077 * Initialize a logger based on the parent logger's name 6078 * @param {String} _name - The name of the logger that is appended to the name of the parent 6079 * @returns {Function} the logger 6080 */ 6081 function logger(_name) { 6082 return new Logger(name + '.' + _name); 6083 } 6084 6085 /** 6086 * the transport 6087 */ 6088 logger.transporter = Transporter; 6089 6090 /** 6091 * the name of the logger 6092 */ 6093 Object.defineProperty(logger, 'name', { 6094 get: function get() { 6095 return name; 6096 } 6097 }); 6098 6099 /** 6100 * the state of the logger 6101 */ 6102 logger.enabled = false; 6103 6104 /** 6105 * log a log message and data to the transports 6106 */ 6107 6108 logger.log = function log() { 6109 var args = Array.from(arguments); 6110 args.unshift(this.name); 6111 this.enabled && this.transporter.log.apply(this.transporter, args); 6112 return this; 6113 }; 6114 6115 /** 6116 * log a warn message and data to the transports 6117 */ 6118 6119 logger.warn = function warn() { 6120 var args = Array.from(arguments); 6121 args.unshift(this.name); 6122 // NOTE: if we are enabled or not we want to record errors 6123 this.transporter.warn.apply(this.transporter, args); 6124 return this; 6125 }; 6126 6127 /** 6128 * log an error message and data to the transports 6129 */ 6130 6131 logger.error = function error() { 6132 var args = Array.from(arguments); 6133 args.unshift(this.name); 6134 // NOTE: if we are enabled or not we want to record errors 6135 this.transporter.error.apply(this.transporter, args); 6136 return this; 6137 }; 6138 6139 /** 6140 * destroy / remove this logger 6141 */ 6142 6143 logger.destroy = function distroy() { 6144 this.enabled = false; 6145 LoggerManager.removeLogger(this); 6146 }; 6147 6148 /** 6149 * enable the logger 6150 */ 6151 6152 logger.enable = function enable() { 6153 !Controls.loggerEnabled(this.name) && Controls.enableLogger(this.name); 6154 }; 6155 6156 /** 6157 * disable the logger 6158 */ 6159 6160 logger.disable = function disable() { 6161 Controls.loggerEnabled(this.name) && Controls.disableLogger(this.name); 6162 }; 6163 6164 LoggerManager.addLogger(logger); 6165 6166 return logger; 6167 } 6168 6169 /** 6170 * The public methods other modules can use 6171 * @public 6172 * @module clientSideLogger.publicMembers 6173 */ 6174 6175 var publicMembers = { 6176 /** 6177 * log directly to the legacy client side logger (maintain backward compatibility) 6178 * @deprecated 6179 * @param {mixed} [message] - The message to log 6180 * @param {mixed} [data] - the data to log 6181 */ 6182 6183 log: function log(message) { 6184 // NOTE: this will be updated to use a default logger eventually 6185 LegacyClientSideLogger.log(message); 6186 }, 6187 6188 /** 6189 * warn directly to the legacy client side logger (maintain backward compatibility) 6190 * @deprecated 6191 * @param {mixed} [message] - The message to log 6192 */ 6193 6194 warn: function warn(message) { 6195 // NOTE: this will be updated to use a default logger eventually 6196 LegacyClientSideLogger.warn(message); 6197 }, 6198 6199 /** 6200 * warn directly to the legacy client side logger (maintain backward compatibility) 6201 * @deprecated 6202 * @param {mixed} [message] - The message to log 6203 * @param {mixed} [data] - the data to log 6204 */ 6205 6206 error: function error(message, data) { 6207 // NOTE: this will be updated to use a default logger eventually 6208 LegacyClientSideLogger.error(message, data); 6209 }, 6210 6211 /** 6212 * create a logger 6213 * @param {String} name - the logger Name 6214 * @return {Function} the logger 6215 */ 6216 6217 logger: function logger(name) { 6218 return LoggerManager.createLogger(name); 6219 }, 6220 6221 /** 6222 * expose the controls 6223 */ 6224 6225 controls: Controls 6226 }; 6227 6228 /** 6229 * expose the controls the brower's console 6230 */ 6231 6232 window.clientSideLogger = Controls; 6233 6234 return publicMembers; 6235}); 6236 6237redesign.define('coreServices/window',[], function windowWrapper() { 6238 'use strict'; 6239 var methods = { 6240 /** 6241 * @deprecated 6242 * @param {String} href : the new url to go to 6243 * @returns {undefined} void 6244 */ 6245 goTo: function goTo(href) { 6246 methods.location.setHref(href); 6247 }, 6248 /** 6249 * @deprecated 6250 * @returns {String} window locations hostname 6251 */ 6252 getHostName: function getHostName() { 6253 methods.location.getHostname(); 6254 }, 6255 /** 6256 * @deprecated 6257 * @returns {String} window locations search string 6258 */ 6259 getLocationSearch: function getLocationSearch() { 6260 return methods.location.getSearch(); 6261 }, 6262 getQueryParameter: function getQueryParameter(parameterName) { 6263 var parameterValue = (new RegExp('[?&]' + encodeURIComponent(parameterName) + '=([^&]*)')).exec(methods.location.getSearch()); 6264 return parameterValue ? parameterValue[1] : null; 6265 }, 6266 /** 6267 * @deprecated 6268 * @returns {undefined} void 6269 */ 6270 refreshPage: function refreshPage() { 6271 methods.location.reload(); 6272 }, 6273 width: function width() { 6274 return $(window).width(); 6275 }, 6276 location: { 6277 get: function get() { 6278 return window.location; 6279 }, 6280 set: function set(value) { 6281 window.location = value; 6282 }, 6283 setHash: function setHash(value) { 6284 window.location.hash = value; 6285 }, 6286 getHash: function getHash() { 6287 return window.location.hash; 6288 }, 6289 setHost: function setHost(value) { 6290 window.location.host = value; 6291 }, 6292 getHost: function getHost() { 6293 return window.location.host; 6294 }, 6295 setHostname: function setHostname(value) { 6296 window.location.hostname = value; 6297 }, 6298 getHostname: function getHostname() { 6299 return window.location.hostname; 6300 }, 6301 setHref: function setHref(value) { 6302 window.location.href = value; 6303 }, 6304 getHref: function getHref() { 6305 return window.location.href; 6306 }, 6307 setOrigin: function setOrigin(value) { 6308 window.location.origin = value; 6309 }, 6310 getOrigin: function getOrigin() { 6311 return window.location.origin; 6312 }, 6313 setPathname: function setPathname(value) { 6314 window.location.pathname = value; 6315 }, 6316 getPathname: function getPathname() { 6317 return window.location.pathname; 6318 }, 6319 setProtocol: function setProtocol(value) { 6320 window.location.protocol = value; 6321 }, 6322 getProtocol: function getProtocol() { 6323 return window.location.protocol; 6324 }, 6325 reload: function reload() { 6326 window.location.reload(); 6327 }, 6328 replace: function replace(value) { 6329 window.location.replace(value); 6330 }, 6331 setSearch: function setSearch(value) { 6332 window.location.search = value; 6333 }, 6334 getSearch: function getSearch() { 6335 return window.location.search; 6336 } 6337 } 6338 }; 6339 6340 return methods; 6341}); 6342 6343redesign.define('coreServices/signifyd/deviceFingerprint',[ 6344 'coreServices/clientSideLogger', 6345 'coreServices/window' 6346], function deviceFingerPrint( 6347 clientSideLogger, 6348 windowService 6349) { 6350 'use strict'; 6351 6352 /** 6353 * @module SignifydDeviceFingerPrint 6354 * @desc responsible for maintaing the device fingerprint session 6355 */ 6356 var privateMembers = { 6357 settings: { 6358 key: 'anf-signifyd-fingerprint', 6359 scriptId: 'sig-api', 6360 scriptSrc: ANF.params.storeAttributes.signifydDeviceFingerprintSessionURL, 6361 expirationTime: 60 * 60 * 24 * 1000, 6362 scriptTag: null, 6363 logger: null, 6364 sessionId: null, 6365 expirationPage: 'order-confirmation' 6366 }, 6367 /** 6368 * @private
6369 * @desc - create sessionId using crypto.getRandomValues 6370 * @return {String} the 32 characters that makenup the random bytes 6371 */ 6372 getRandomBytes: function getRandomBytes() { 6373 var buffer = new window.Uint8Array(16); 6374 crypto.getRandomValues(buffer); 6375 return Array.from(buffer).map(function toHex(value) { 6376 return value.toString(16); 6377 }).join(''); 6378 }, 6379 /** 6380 * @private 6381 * @desc - creates getLogger function to reassign logger 6382 * @return {ClientSideLogger} An instance of the client side logger 6383 */ 6384 getLogger: function getLogger() { 6385 if (!this.settings.logger) { 6386 this.settings.logger = clientSideLogger.logger(); 6387 } 6388 return this.settings.logger; 6389 }, 6390 /** 6391 * @private 6392 * @desc - creates sessionStorage ID 6393 * @param {String} value - The sessionId to store 6394 * @return {mixed} The result of storing an item on sessionStorage 6395 */ 6396 setItem: function setItem(value) { 6397 var item = { 6398 value: value, 6399 expiry: Date.now() + this.settings.expirationTime 6400 }; 6401 try { 6402 return window.sessionStorage.setItem(this.settings.key, JSON.stringify(item)); 6403 } catch (e) { 6404 this.getLogger().error(e); 6405 } 6406 return item; 6407 }, 6408 /** 6409 * @private 6410 * @desc - get the sessionStorage token 6411 * @return {Object}
6411 an object containing the value and the and expiration time 6412 */ 6413 getItem: function getItem() { 6414 try { 6415 return JSON.parse(window.sessionStorage.getItem(this.settings.key)); 6416 } catch (err) { 6417 this.getLogger().error(err); 6418 } 6419 return null; 6420 }, 6421 /** 6422 * @private 6423 * @desc - checks if the token is expired or not 6424 * @return {Boolean} if the item is expired 6425 */ 6426 needToExpire: function needToExpire() { 6427 var item = this.getItem(); 6428 return !!item && Date.now() >= item.expiry; 6429 }, 6430 /** 6431 * @private 6432 * @desc - get and store the sessionId made up of random bytes 6433 * @return {String} the sessionId 6434 */ 6435 createSessionId: function createSessionId() { 6436 this.settings.sessionId = this.getRandomBytes(); 6437 this.setItem(this.settings.sessionId); 6438 return this.settings.sessionId; 6439 }, 6440 /** 6441 * @private 6442 * @desc - destroys sessionId 6443 * @return {undefined} nothing 6444 */ 6445 removeSessionId: function removeSessionId() { 6446 window.sessionStorage.removeItem(this.settings.key); 6447 }, 6448 /** 6449 * @private 6450 * @desc - initalizes the session id to be used in the construction of the script tag 6451 * @return {String} the session id 6452 */ 6453 getSessionId: function getSessionId() { 6454 var sessionId; 6455 var match = windowService.location.getHref().match(/sigSessID\=([\w\-]+)\&?/); 6456 if (match) { 6457 sessionId = match[1]; 6458 this.setItem(sessionId); 6459 return sessionId; 6460 } 6461 var item = this.getItem(); 6462 sessionId = item && item.value || this.settings.sessionId; 6463 if (sessionId) { 6464 if (this.needToExpire()) { 6465 this.removeSessionId(); 6466 this.getLogger().log('Time expired so force deletion of sessionId'); 6467 return this.createSessionId(); 6468 } 6469 this.getLogger().log('Present sessiondId is ' + sessionId); 6470 // restore the sessionId to delay it's expiration 6471 this.setItem(sessionId); 6472 return sessionId; 6473 } 6474 this.getLogger().log('No token found! Creating new session token'); 6475 return this.createSessionId(); 6476 }, 6477 /** 6478 * @private 6479 * @desc - checks if script tag exists already or not 6480 * @return {jQuery} returns the script tag wrapped inside of jQuery 6481 */ 6482 getScriptTag: function getScriptTag() { 6483 if (!this.settings.scriptTag || this.settings.scriptTag.length === 0) { 6484 this.settings.scriptTag = this.findScriptTag(); 6485 } 6486 return this.settings.scriptTag; 6487 }, 6488 /** 6489 * @private 6490 * @desc - checks if script tag exists already or not 6491 * @return {Boolean} returns if the script tag exists or not 6492 */ 6493 hasScriptTag: function hasScriptTag() { 6494 return this.getScriptTag().length > 0; 6495 }, 6496 /** 6497 * @private 6498 * @desc - finds the script tag 6499 * @return {jQuery} returns script tags that match 6500 */ 6501 findScriptTag: function findScriptTag() { 6502 return $('script').filter(function filter() { 6503 return String($(this).attr('id')).match(privateMembers.settings.scriptId) ? true : false; 6504 }); 6505 }, 6506 /** 6507 * @private 6508 * @desc - removes the script tag from the dom and releases the reference to it 6509 * @return {undefined} nothing 6510 */ 6511 removeScriptTag: function removeScriptTag() {
6512 this.getScriptTag().remove(); 6513 this.settings.scriptTag = null; 6514 }, 6515 /** 6516 * @private 6517 * @desc - creates the script tag and appends it to the dom using the session id 6518 * @return {undefined} nothing 6519 */ 6520 createScriptTag: function createScriptTag() { 6521 var domScript = document.createElement('script'); 6522 domScript.type = 'text/javascript'; 6523 domScript.setAttribute('src', this.settings.scriptSrc); 6524 domScript.setAttribute('id', this.settings.scriptId); 6525 domScript.setAttribute('data-order-session-id', this.getSessionId()); 6526 document.body.appendChild(domScript); 6527 } 6528 }; 6529 6530 /** 6531 * @module SignifydDeviceFingerprint 6532 * @desc public interface for managing the signifyd fingerprint session id 6533 */ 6534 var publicMembers = { 6535 /** 6536 * @public 6537 * @desc - attaches the script tag to the dom if it doesn't exist (only if we're using signifyd) 6538 * @see {privateMembers.hasScriptTag} 6539 * @see {privateMembers.createScriptTag} 6540 * @return {undefined} nothing 6541 */ 6542 initialize: function initialize() { 6543 if (!this.usingSignifyd()) { 6544 return; 6545 } 6546 if (this.onExpirationPage()) { 6547 this.expireSessionId(); 6548 } else if (!privateMembers.hasScriptTag()) { 6549 privateMembers.createScriptTag(); 6550 } 6551 }, 6552 /** 6553 * @public 6554 * @desc - returns the script tag 6555 * @see {privateMembers.getScriptTag} 6556 * @return {jQuery} the script tag wrapped inside of jQuery 6557 */ 6558 getScriptTag: function getScriptTag() { 6559 return privateMembers.getScriptTag(); 6560 }, 6561 /** 6562 * @public 6563 * @desc - returns the session id 6564 * @see {privateMembers.getSessionId} 6565 * @return {String} the session id 6566 */ 6567 getSessionId: function getSessionId() { 6568 return privateMembers.getSessionId(); 6569 }, 6570 /** 6571 * @public 6572 * @desc - set Max Expiration 6573 * @param {Number} milliseconds - the amount of time the session can live 6574 * @return {undefined} nothing 6575 */ 6576 setMaxExpiration: function setMaxExpiration(milliseconds) { 6577 if (typeof milliseconds === 'number') { 6578 privateMembers.settings.expirationTime = milliseconds; 6579 } 6580 }, 6581 /** 6582 * @public 6583 * @desc - get Max Expiration 6584 * @return {Number} the current expiration time 6585 */ 6586 getMaxExpiration: function getMaxExpiration() { 6587 return privateMembers.settings.expirationTime; 6588 }, 6589 /** 6590 * @public 6591 * @desc - Can be invoked after successful order 6592 * @return {undefined} nothing 6593 */ 6594 expireSessionId: function expireSessionId() { 6595 privateMembers.removeSessionId(); 6596 this.cleanUp(); 6597 }, 6598 /** 6599 * @public 6600 * @desc - cleans up the script and destroys logger 6601 * @return {undefined} nothing 6602 */ 6603 cleanUp: function cleanUp() { 6604 privateMembers.removeScriptTag(); 6605 privateMembers.getLogger().destroy(); 6606 privateMembers.settings.logger = null; 6607 privateMembers.settings.sessionId = null; 6608 }, 6609 /** 6610 * @public 6611 * @desc using signifyd or not 6612 * @return {Boolean} using signifyd or not 6613 */ 6614 usingSignifyd: function usingSignifyd() { 6615 return ANF.params.storeAttributes.signifydFeatureEnabled; 6616 }, 6617 /** 6618 * @public 6619 * @desc checks if we're on the expiration page or not so we can expire the session 6620 * @return {Boolean} return if we're on the expiration page 6621 */ 6622 onExpirationPage: function onExpirationPage() { 6623 return !!String(document.body.getAttribute('data-page')).match(privateMembers.settings.expirationPage); 6624 } 6625 }; 6626 6627 publicMembers.initialize(); 6628 6629 return publicMembers; 6630}); 6631 6632/* eslint-env amd,es6 */ 6633redesign.define('util/analytics/product/addGiftCardToCart',[], function addGiftCardToCart() { 6634 'use strict'; 6635 6636 var sendEvent = function sendEvent() { 6637 var _ANF$models, _ANF$models$cart; 6638 6639 var cartItems = (_ANF$models = ANF.models) === null || _ANF$models === void 0 ? void 0 : (_ANF$models$cart = _ANF$models.cart) === null || _ANF$models$cart === void 0 ? void 0 : _ANF$models$cart.items; 6640 if (!(cartItems !== null && cartItems !== void 0 && cartItems.length)) return; // Check if the user has gift cards in their cart 6641 6642 var giftCards = cartItems.filter(function (item) { 6643 var collection = item.collection, 6644 collectionId = item.collectionId, 6645 itemType = item.itemType; 6646 var isGiftCardItemType = itemType === 'GCRD'; 6647 var isGiftCardCollection = collection === 'EGIFTCARD' || collection === 'GIFTCARD'; 6648 var isGiftCardCollectionId = collectionId === 'EGIFTCARD' || collectionId === 'GIFTCARD'; 6649 return isGiftCardItemType || isGiftCardCollection || isGiftCardCollectionId; 6650 }); 6651 if (!(giftCards !== null && giftCards !== void 0 && giftCards.length)) return; // Get the last gift card added to the cart 6652 6653 var lastGiftCard = giftCards[giftCards.length - 1]; 6654 var eventData = { 6655 collection: lastGiftCard.collection, 6656 quantity: lastGiftCard.quantity, 6657 short_sku: lastGiftCard.shortSku, 6658 price_list_local: lastGiftCard.item.listPrice, 6659 price_list_usd: lastGiftCard.item.listPriceUSD, 6660 price_offer_local: lastGiftCard.item.offerPrice, 6661 price_offer_usd: lastGiftCard.item.offerPriceUSD, 6662 price_flag: lastGiftCard.item.priceFlag ? '1' : '0', 6663 long_sku: lastGiftCard.item.longSku, 6664 key_item_color: lastGiftCard.item.kicId ? lastGiftCard.item.kicId : '', 6665 product_id: lastGiftCard.productId, 6666 product_name: lastGiftCard.productName 6667 }; // Send an add to cart event for the last gift card added to the cart 6668 6669 window.digitalData.trigger('analytics.add_to_cart', eventData); 6670 }; 6671 6672 return { 6673 sendEvent: sendEvent 6674 }; 6675}); 6676 6677redesign.define('util/analytics/pageInterceptor',[], function pageInterceptor() { 6678 'use strict'; 6679 6680 function intercept(from, to, callback) { 6681 var fromPages = Array.isArray(from) ? from : [from]; 6682 var toPages = Array.isArray(to) ? to : [to]; 6683 if (fromPages.length === 0 || toPages.length === 0) return; 6684 var referrerPageCheck = fromPages.some(function (page) { 6685 return document.referrer.includes(page); 6686 }); 6687 if (!referrerPageCheck) return; 6688 window.addEventListener('load', function () { 6689 if (!window.digitalData) return; 6690 var currentPageCheck = toPages.some(function (page) { 6691 return window.digitalData.get('page.pageKind').includes(page); 6692 }); 6693 if (currentPageCheck && referrerPageCheck) callback(); 6694 }); 6695 } 6696 6697 return { 6698 intercept: intercept 6699 }; 6700}); 6701 6702redesign.define('util/analytics/param/parameterMap',[], function parameterMap() { 6703 'use strict'; 6704 6705 return new Map([['pageFindingMethod', 'pagefm'], ['productViewMethod', 'prodvm'], ['pageViewMethod', 'pagevm'], ['afsource', 'afsource']]); 6706}); 6707 6708function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 6709 6710function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 6711 6712function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 6713 6714/* eslint-env amd,es6 */ 6715redesign.define('util/analytics/param/ParameterHelper',['util/analytics/param/parameterMap'], function parameterHelper(parameterMap) { 6716 'use strict'; 6717 /** 6718 * Helper class to get the parameter value from the URL 6719 * @class 6720 * @module ParameterHelper 6721 * @exports ParameterHelper 6722 */ 6723 6724 var ParameterHelper = /*#__PURE__*/function () { 6725 function ParameterHelper() { 6726 _classCallCheck(this, ParameterHelper); 6727 6728 // Create a map of parameters to their mapped values 6729 this.map = parameterMap; // Create an instance of URLSearchParams to get the parameters from the URL 6730 6731 this.instance = window.location.search ? new URLSearchParams(window.location.search) : new URLSearchParams(); // TODO: Figure out why this isn't working to avoid manual updates in the getParameterValue method 6732 // window.addEventListener('popstate', () => { 6733 // if (this.instance.toString() === new URLSearchParams(window.location.search).toString()) return; 6734 // if (!window.location.search) return; 6735 // this.instance = new URLSearchParams(window.location.search); 6736 // }); 6737 } 6738 /** 6739 * Update the instance to account for changes in the URL 6740 * @returns {void} 6741 */ 6742 6743 6744 _createClass(ParameterHelper, [{ 6745 key: "updateInstance", 6746 value: function updateInstance() { 6747 // If the instance is the same as the URLSearchParams, return 6748 if (this.instance.toString() === new URLSearchParams(window.location.search).toString()) return; 6749 this.instance = new URLSearchParams(window.location.search); 6750 } 6751 /** 6752 * Sanitize the input 6753 * @param {string} input the input to sanitize 6754 * @returns {string} the sanitized output 6755 */ 6756 6757 }, {
6758 key: "getParameterValue", 6759 value: 6760 /** 6761 * Get the parameter value from the URL 6762 * @param {string} param the parameter to get the value for 6763 * @returns {string} the value of the parameter 6764 */ 6765 function getParameterValue(param) { 6766 if (!param) return ''; 6767 this.updateInstance(); 6768 var trimmedParam = param.trim(); 6769 var mappedParam = this.map.get(trimmedParam); // Return the value of the mapped parameter if it exists, otherwise return the value of the parameter directly 6770 6771 var value = this.instance.get(mappedParam) || this.instance.get(trimmedParam); 6772 if (!value) return ''; 6773 return ParameterHelper.decode(value); 6774 } 6775 /** 6776 * Set the parameter value in the URL 6777 * @param {string} param the parameter to set the value for 6778 * @param {string} value the value to set 6779 * @returns {void} 6780 */ 6781 6782 }, { 6783 key: "setParameterValue", 6784 value: function setParameterValue(param, value) { 6785 if (!param || !value) return; 6786 this.updateInstance(); 6787 var trimmedParam = param.trim(); // const [trimmedParam, trimmedValue] = (...args) => args.map(arg => arg.trim()); 6788 6789 var encodedValue = ParameterHelper.encode(value); 6790 var mappedParam = this.map.get(trimmedParam); // Set the value of the mapped parameter if it exists, otherwise set the value of the parameter directly 6791 6792 if (mappedParam) { 6793 this.instance.set(mappedParam, encodedValue); 6794 } else { 6795 this.instance.set(trimmedParam, encodedValue); 6796 } 6797 } 6798 }], [{ 6799 key: "sanitize", 6800 value: function sanitize(input) { 6801 if (!input) return ''; // Replace all '+' with spaces 6802 6803 return input.trim().replace(/\+/g, ' '); 6804 } 6805 /** 6806 * Decode the input 6807 * @param {string} input the input to decode 6808 * @returns {string} the decoded output 6809 */ 6810 6811 }, { 6812 key: "decode", 6813 value: function decode(input) { 6814 if (!input) return ''; // Trim the value and decode it 6815 6816 return decodeURIComponent(input.trim()); 6817 } 6818 /** 6819 * Encode the input 6820 * @param {string} input the input to encode 6821 * @returns {string} the encoded output 6822 */ 6823 6824 }, { 6825 key: "encode", 6826 value: function encode(input) { 6827 if (!input) return ''; // Trim the value, sanitize it, and encode it 6828 6829 return encodeURIComponent(ParameterHelper.sanitize(input.trim())); 6830 } 6831 }]); 6832 6833 return ParameterHelper; 6834 }(); 6835 6836 return ParameterHelper; 6837}); 6838 6839function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 6840 6841function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } 6842 6843function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } 6844 6845function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 6846 6847function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 6848 6849function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 6850 6851function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } 6852 6853function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } 6854 6855function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 6856 6857/* eslint-env amd,es6 */ 6858redesign.define('util/analytics/predefinedFetchers',['util/analytics/enum/globalDataPoint', 'util/analytics/enum/dataPoint', 'util/analytics/enum/eventName', 'util/cookies/wcAuthentication', 'util/cookies/userType', 'util/cookies/uPref', 'coreServices/signifyd/deviceFingerprint', 'util/analytics/product/addGiftCardToCart', 'util/analytics/pageInterceptor', 'util/analytics/param/ParameterHelper'], function predefinedAnalyticsFetchers(GLOBAL_DATA_POINT, DATA_POINT, EVENT_NAME, wcAuthentication, userType, uPref, deviceFingerprint, addGiftCardToCart, pageInterceptor, ParameterHelper) { 6859 'use strict'; 6860 /** 6861 * Helper class to get and set parameter values from the URL 6862 */ 6863 6864 var _window7, _window7$digitalData, _window9, _window9$digitalData, _global, _EVENT_NAME$VIEW$HOME, _EVENT_NAME$VIEW$SHOP, _EVENT_NAME$VIEW$CHEC, _EVENT_NAME$VIEW$ORDE, _EVENT_NAME$VIEW$PDP, _EVENT_NAME$ACTION$SW, _EVENT_NAME$VIEW$QUIC, _EVENT_NAME$VIEW$CATE, _EVENT_NAME$VIEW$SEAR, _getFromProductCatalo, _getFromProductCatalo2, _getFromProductCatalo3, _wrapDigitalDataGet, _getShortSku, _EVENT_NAME$ACTION$AD, _getFromProductCatalo4, _wrapDigitalDataGet2, _getShortSku2, _EVENT_NAME$ACTION$SA, _EVENT_NAME$ACTION$RE, _wrapDigitalDataGet3, _EVENT_NAME$ACTION$RE2, _EVENT_NAME$ACTION$FI, _EVENT_NAME$VIEW$MY_A, _ref6; 6865 6866 var parameterHelper = new ParameterHelper(); 6867 /** 6868 * Gets the user id from the wcAuthenticationCookie. 6869 * Defaults the value to '-1002' in case 6870 * no value is returned by wcAuthenticationCookie 6871 * @private 6872 * @returns {string} the user id 6873 */ 6874 6875 var fetchUserId = function fetchUserId() { 6876 var _wcAuthentication$get; 6877 6878 return (_wcAuthentication$get = wcAuthentication.getUserId()) !== null && _wcAuthentication$get !== void 0 ? _wcAuthentication$get : '-1002'; 6879 }; 6880 /** 6881 * Get the current state the user is in. 6882 * @private 6883 * @param {string} currentUserType the type of current user 6884 * @returns {string} the user state 6885 */ 6886 6887 6888 var fetchUserState = function fetchUserState(currentUserType) { 6889 if (JSON.parse(localStorage.getItem('isRemembered'))) return 'remembered'; 6890 if (!currentUserType || currentUserType === 'G') return 'guest'; 6891 return 'authenticated'; 6892 }; 6893 /** 6894 * Get the current OS the user is in. 6895 * @private 6896 * @returns {string} the user OS 6897 */ 6898 6899 6900 var getUserPlatform = function getUserPlatform() { 6901 var _window, _window$navigator; 6902 6903 return (_window = window) === null || _window === void 0 ? void 0 : (_window$navigator = _window.navigator) === null || _window$navigator === void 0 ? void 0 : _window$navigator.userAgent; 6904 }; 6905 /** 6906 * Get the categoric value of the product inventory 6907 * @private 6908 * @returns {string} categoric value of inventory 6909 */ 6910 6911 6912 var getInventory = function getInventory() { 6913 var _document$querySelect, _document$querySelect2; 6914 6915 var pdpInventory = (_document$querySelect = document.querySelector('.js-product-page.active-product')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getAttribute('data-inventory'); 6916 var quickViewInventory = (_document$querySelect2 = document.querySelector('.js-quickview.active-product')) === null || _document$querySelect2 === void 0 ? void 0 : _document$querySelect2.getAttribute('data-inventory'); 6917 var inventory = pdpInventory !== null && pdpInventory !== void 0 ? pdpInventory : quickViewInventory; 6918 if (!inventory) return 'null';
6919 var numericInventory = Number(inventory); 6920 6921 switch (true) { 6922 case numericInventory >= 5 && numericInventory <= 9: 6923 return 'less than 10'; 6924 6925 case numericInventory > 0 && numericInventory <= 4: 6926 return 'less than 5'; 6927 6928 case numericInventory === 0: 6929 return 'sold out'; 6930 6931 default: 6932 return 'full'; 6933 } 6934 }; 6935 /** 6936 * Get the categoric value of the product inventory 6937 * @private 6938 * @param {number} inventory product inventory 6939 * @returns {string} categoric value of inventory 6940 */ 6941 6942 6943 var getProductCartInventory = function getProductCartInventory() { 6944 var _getFromCart; 6945 6946 var items = (_getFromCart = getFromCart('items')()) !== null && _getFromCart !== void 0 ? _getFromCart : []; 6947 var numericInventory = items.map(function (item) { 6948 var _item$item, _item$item$inventory; 6949 6950 return item === null || item === void 0 ? void 0 : (_item$item = item.item) === null || _item$item === void 0 ? void 0 : (_item$item$inventory = _item$item.inventory) === null || _item$item$inventory === void 0 ? void 0 : _item$item$inventory.inventory; 6951 }); 6952 var categoricInventory = numericInventory.map(function (inventory) { 6953 if (typeof inventory !== 'number') return dataPointEmptyValue; 6954 6955 switch (true) { 6956 case inventory >= 5 && inventory <= 9: 6957 return 'less than 10'; 6958 6959 case inventory > 0 && inventory <= 4: 6960 return 'less than 5'; 6961 6962 case inventory === 0: 6963 return 'sold out'; 6964 6965 default: 6966 return 'full'; 6967 } 6968 }).join(';'); 6969 return categoricInventory; 6970 }; 6971 /** 6972 * Simple wrapper to get a curried function to get data from digitalData 6973 * @private 6974 * @param {...Array} rest - Values to be passed thorough to digitalData.get 6975 * @returns {function} curried function to fetch the value from digitalData 6976 */ 6977 6978 6979 var wrapDigitalDataGet = function wrapDigitalDataGet() { 6980 for (var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++) { 6981 rest[_key] = arguments[_key]; 6982 } 6983 6984 return function () { 6985 var _window2, _window2$digitalData; 6986 6987 return (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$digitalData = _window2.digitalData) === null || _window2$digitalData === void 0 ? void 0 : _window2$digitalData.get.apply(_window2$digitalData, rest); 6988 }; 6989 }; 6990 /** 6991 * Deeply fetch a value from an object 6992 * @private 6993 * @param {object} subject object to be searched 6994 * @param {string} key - a '.' separated key to be retrieved. 6995 * @returns {any|undefined} The value from the object or undefined 6996 */ 6997 6998 6999 var deepFetch = function deepFetch(subject, key) { 7000 return key.split('.').reduce(function (object, search) { 7001 return object === null || object === void 0 ? void 0 : object[search]; 7002 }, subject); 7003 }; 7004 /** 7005 * Complete the deepFetchMappers partial applications 7006 * @callback deepFetchMapperCallback 7007 * @private 7008 * @param {object} subject the object to be searched 7009 * @returns {any|undefined} the value from the object that was being searched for 7010 */ 7011 7012 /** 7013 * Deeply fetch to be used with an array's map function. 7014 * @private 7015 * @param {string} key a '.' separated key to be retrieved. 7016 * @returns {deepFetchMapperCallback} The curried function to be supplied to the array's map function 7017 */ 7018 7019 7020 var deepFetchMapper = function deepFetchMapper(key) { 7021 return function (subject) { 7022 return deepFetch(subject, key); 7023 }; 7024 }; 7025 /** 7026 * A quick curried call to wrap deep fetching data from the ANF.models.cart object 7027 * @param {string} key the key that is being looked for in ANF.models.cart 7028 * @returns {any|undefined} value from ANF.models.cart 7029 */ 7030 7031 7032 var getFromCart = function getFromCart(key) { 7033 return function () { 7034 var _ANF, _ANF$models; 7035 7036 return deepFetch((_ANF = ANF) === null || _ANF === void 0 ? void 0 : (_ANF$models = _ANF.models) === null || _ANF$models === void 0 ? void 0 : _ANF$models.cart, key); 7037 }; 7038 }; 7039 7040 var memoizedProcessItems = new WeakMap(); 7041 /** 7042 * 7043 * @typedef {object} NormalizedCartItem 7044 * @property {string} brandViewing the brand of the product 7045 * @property {string} collectionId the collectionId for the product 7046 * @property {string} keyItemColor the KIC of the product, and if the product does not have a KIC then the imageId 7047 * @property {string} productLongSku the long SKU of the product 7048 */ 7049 7050 /** 7051 * Get the list of normalized cart item objects in the current order 7052 * @private 7053 * @returns {Array<NormalizedCartItem>} List of normalized cart item objects 7054 */ 7055 7056 var getCartItemBaseData = function getCartItemBaseData() { 7057 var _getFromCart2, _memoizedProcessItems; 7058 7059 var items = (_getFromCart2 = getFromCart('items')()) !== null && _getFromCart2 !== void 0 ? _getFromCart2 : []; 7060 /** 7061 * if the items have already been processed once, there is not need 7062 * to process again unless the items have changed 7063 * 7064 * !!!! 7065 * This is by ref so if the items array is 7066 * mutated by any of the array methods a 7067 * new processed value will not be created 7068 * because the ref for items is still the same as 7069 * when it was first created. 7070 * !!!! 7071 */ 7072 7073 var normalizedItems = (_memoizedProcessItems = memoizedProcessItems.get(items)) !== null && _memoizedProcessItems !== void 0 ? _memoizedProcessItems : items.reduce(function (acum, _ref) { 7074 var _ref$item = _ref.item; 7075 _ref$item = _ref$item === void 0 ? {}
7075 : _ref$item; 7076 var brand = _ref$item.brand, 7077 collection = _ref$item.collection, 7078 imageId = _ref$item.imageId, 7079 inventory = _ref$item.inventory, 7080 kicId = _ref$item.kicId, 7081 longSku = _ref$item.longSku, 7082 shortSku = _ref$item.shortSku, 7083 listPrice = _ref$item.listPrice, 7084 listPriceUSD = _ref$item.listPriceUSD, 7085 offerPrice = _ref$item.offerPrice, 7086 contractPrice = _ref$item.contractPrice, 7087 offerPriceUSD = _ref$item.offerPriceUSD, 7088 contractPriceUSD = _ref$item.contractPriceUSD, 7089 priceFlag = _ref$item.priceFlag; 7090 acum.push({ 7091 brandViewing: brand, 7092 collectionId: collection, 7093 keyItemColor: kicId || imageId, 7094 productInventory: inventory === null || inventory === void 0 ? void 0 : inventory.inventory, 7095 productLongSku: longSku, 7096 productShortSku: shortSku, 7097 listPrice: listPrice, 7098 listPriceUSD: listPriceUSD, 7099 offerPrice: offerPrice, 7100 contractPrice: contractPrice, 7101 offerPriceUSD: offerPriceUSD, 7102 contractPriceUSD: contractPriceUSD, 7103 priceFlag: priceFlag 7104 }); 7105 return acum; 7106 }, []); 7107 /** 7108 * Save the normalized items object for latter 7109 */ 7110 7111 memoizedProcessItems.set(items, normalizedItems); 7112 return normalizedItems; 7113 }; 7114 /** 7115 * Quick helper function to get an array of the given key in a list of objects 7116 * @private 7117 * @param {Array<Object>} items list of objects to be looped over 7118 * @param {string} key the key to be extracted from the objects 7119 * @returns {Array<any>} the values for the given key in the list of objects 7120 */ 7121 7122 7123 var getArrayOfKeyInItems = function getArrayOfKeyInItems(items, key) { 7124 return items.map(deepFetchMapper(key)); 7125 }; 7126 /** 7127 * Get the values for the given cart item key 7128 * @private 7129 * @param {string} key the key in the cart items you are looking for 7130 * @returns {string} list of values separated by a ';' 7131 */ 7132 7133 7134 var getCartItemsKeyData = function getCartItemsKeyData(key) { 7135 var _getFromCart3; 7136 7137 var items = (_getFromCart3 = getFromCart('items')()) !== null && _getFromCart3 !== void 0 ? _getFromCart3 : []; 7138 return items.map(function (item) { 7139 return item[key]; 7140 }).join(';'); 7141 }; 7142 /** 7143 * Get the values for the given cart Adjustments key 7144 * @private 7145 * @param {string} key the key in the cart Adjustments you are looking for 7146 * @returns {string} list of values separated by a ';' 7147 */ 7148 7149 7150 var getCartAdjustmentsKeyData = function getCartAdjustmentsKeyData(key) { 7151 var _getFromCart4; 7152 7153 var items = (_getFromCart4 = getFromCart('adjustments')()) !== null && _getFromCart4 !== void 0 ? _getFromCart4 : []; 7154 return items.map(function (item) { 7155 return item[key] || 'null'; 7156 }).join(';'); 7157 }; 7158 /** 7159 * Get the values for the given key from the normalized Cart items 7160 * @private 7161 * @param {string} key the key that points to the data in the normalized cart items you are looking for 7162 * @returns {Array<any>} the values for the given key from the normalized Cart items 7163 */ 7164 7165 7166 var getListForKeyInNormalizedIndividualItemsFetcher = function getListForKeyInNormalizedIndividualItemsFetcher(key) { 7167 return function () { 7168 var _getArrayOfKeyInItems; 7169 7170 var items = getCartItemBaseData(); 7171 return (_getArrayOfKeyInItems = getArrayOfKeyInItems(items, key)) === null || _getArrayOfKeyInItems === void 0 ? void 0 : _getArrayOfKeyInItems.join(';'); 7172 }; 7173 }; 7174 /** 7175 * Get the product rating of given product 7176 * @private 7177 * @param {object} productData the product object 7178 * @returns {string} the product rating or 'null' if it doesn't have it 7179 */ 7180 7181 7182 var getProductRating = function getProductRating(productData) { 7183 for (var key in productData) { 7184 if (productData.hasOwnProperty(key)) { 7185 var _productData$ReviewSt; 7186 7187 if (productData !== null && productData !== void 0 && (_productData$ReviewSt = productData.ReviewStatistics) !== null && _productData$ReviewSt !== void 0 && _productData$ReviewSt.AverageOverallRating) { 7188 return productData.ReviewStatistics.AverageOverallRating.toFixed(2); 7189 } 7190 7191 if (_typeof(productData[key]) === 'object') { 7192 var rating = getProductRating(productData[key]); 7193 7194 if (rating !== undefined) { 7195 return rating; 7196 } 7197 } else if (key === 'AverageOverallRating') { 7198 return productData[key].toFixed(2); 7199 } 7200 } 7201 } 7202 7203 return 'null';
7204 }; 7205 7206 var getCountry = function getCountry() { 7207 var _ANF2, _ANF2$params, _ANF2$params$storeAtt, _ANF3, _ANF3$params, _ANF3$params$storeAtt; 7208 7209 return ((_ANF2 = ANF) === null || _ANF2 === void 0 ? void 0 : (_ANF2$params = _ANF2.params) === null || _ANF2$params === void 0 ? void 0 : (_ANF2$params$storeAtt = _ANF2$params.storeAttributes) === null || _ANF2$params$storeAtt === void 0 ? void 0 : _ANF2$params$storeAtt.countryFromIP) || ((_ANF3 = ANF) === null || _ANF3 === void 0 ? void 0 : (_ANF3$params = _ANF3.params) === null || _ANF3$params === void 0 ? void 0 : (_ANF3$params$storeAtt = _ANF3$params.storeAttributes) === null || _ANF3$params$storeAtt === void 0 ? void 0 : _ANF3$params$storeAtt.country); 7210 }; 7211 7212 var getProductId = function getProductId() { 7213 var _ANF4, _ANF4$catalog, _ANF4$catalog$data; 7214 7215 return (_ANF4 = ANF) === null || _ANF4 === void 0 ? void 0 : (_ANF4$catalog = _ANF4.catalog) === null || _ANF4$catalog === void 0 ? void 0 : (_ANF4$catalog$data = _ANF4$catalog.data) === null || _ANF4$catalog$data === void 0 ? void 0 : _ANF4$catalog$data.productId; 7216 }; 7217 7218 var getFromProductCatalogForProduct = function getFromProductCatalogForProduct(key) { 7219 return function () { 7220 var _productCatalog$, _productCatalog; 7221 7222 return deepFetch((_productCatalog$ = (_productCatalog = productCatalog) === null || _productCatalog === void 0 ? void 0 : _productCatalog["".concat(getProductId())]) !== null && _productCatalog$ !== void 0 ? _productCatalog$ : {}, key); 7223 }; 7224 }; 7225 7226 var getStickyAtb = function getStickyAtb() { 7227 var _window3, _window3$digitalData; 7228 7229 return ((_window3 = window) === null || _window3 === void 0 ? void 0 : (_window3$digitalData = _window3.digitalData) === null || _window3$digitalData === void 0 ? void 0 : _window3$digitalData.get('addToBag.stickyAtb')) || false; 7230 }; 7231 7232 var getFromFirstProduct = function getFromFirstProduct(key) { 7233 return function () { 7234 var _Object$values, _productPrices$$items, _productPrices, _productPrices$; 7235 7236 return deepFetch((_Object$values = Object.values((_productPrices$$items = (_productPrices = productPrices) === null || _productPrices === void 0 ? void 0 : (_productPrices$ = _productPrices["".concat(getProductId())]) === null || _productPrices$ === void 0 ? void 0 : _productPrices$.items) !== null && _productPrices$$items !== void 0 ? _productPrices$$items : {})) === null || _Object$values === void 0 ? void 0 : _Object$values[0], key); 7237 }; 7238 }; 7239 7240 var getPriceOfferLocal = function getPriceOfferLocal() { 7241 var _productPrices2, _productPrices2$, _getFromFirstProduct; 7242 7243 var highContractOfferPrice = (_productPrices2 = productPrices) === null || _productPrices2 === void 0 ? void 0 : (_productPrices2$ = _productPrices2["".concat(getProductId())]) === null || _productPrices2$ === void 0 ? void 0 : _productPrices2$.highContractPrice; 7244 var offerPrice = (_getFromFirstProduct = getFromFirstProduct('offerPrice')()) !== null && _getFromFirstProduct !== void 0 ? _getFromFirstProduct : dataPointEmptyValue; 7245 return highContractOfferPrice !== null && highContractOfferPrice !== void 0 ? highContractOfferPrice : offerPrice; 7246 }; 7247 7248 var getCategoryId = function getCategoryId() { 7249 var _ANF5, _ANF5$catalog, _ANF5$catalog$data; 7250 7251 return (_ANF5 = ANF) === null || _ANF5 === void 0 ? void 0 : (_ANF5$catalog = _ANF5.catalog) === null || _ANF5$catalog === void 0 ? void 0 : (_ANF5$catalog$data = _ANF5$catalog.data) === null || _ANF5$catalog$data === void 0 ? void 0 : _ANF5$catalog$data.categoryId; 7252 }; 7253 7254 var getProductQuantity = function getProductQuantity() { 7255 var _document$querySelect3; 7256 7257 return (_document$querySelect3 = document.querySelector("#product-quantity-dropdown_".concat(getProductId(), "_"))) === null || _document$querySelect3 === void 0 ? void 0 : _document$querySelect3.value; 7258 }; 7259 7260 var validateDatapoint = function validateDatapoint(value) { 7261 var validTypes = ['string', 'number', 'boolean']; 7262 7263 for (var _len2 = arguments.length, types = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 7264 types[_key2 - 1] = arguments[_key2]; 7265 } 7266 7267 var currentTypes = types.length ? types : validTypes; 7268 if (currentTypes.some(function (type) { 7269 return _typeof(value) === type && value !== ''; 7270 })) return value; 7271 return 'null';
7272 }; 7273 7274 var dataPointEmptyValue = 'null'; 7275 7276 var getShortSku = function getShortSku() { 7277 return !!getFromProductCatalogForProduct('items')() ? Object.keys(getFromProductCatalogForProduct('items')())[0] : dataPointEmptyValue; 7278 }; 7279 7280 var getPaymentMethod = function getPaymentMethod() { 7281 var _ANF6, _ANF6$models, _ANF6$models$cart; 7282 7283 var paymentObject = (_ANF6 = ANF) === null || _ANF6 === void 0 ? void 0 : (_ANF6$models = _ANF6.models) === null || _ANF6$models === void 0 ? void 0 : (_ANF6$models$cart = _ANF6$models.cart) === null || _ANF6$models$cart === void 0 ? void 0 : _ANF6$models$cart.payment; 7284 var paymentMethods = []; 7285 var paymentLabels = { 7286 apmPayment: 'apm', 7287 applePayPayment: 'apple pay', 7288 cardPayments: 'card', 7289 codPayment: 'cod', 7290 giftCardPayments: 'gift card', 7291 googlePayPayment: 'Google Pay', 7292 klarnaPayment: 'klarna', 7293 paypalPayment: 'paypal', 7294 venmoPayment: 'venmo', 7295 wosaiPayment: 'wosai' 7296 }; 7297 if (!paymentObject) return 'null'; 7298 7299 for (var _i = 0, _Object$entries = Object.entries(paymentObject); _i < _Object$entries.length; _i++) { 7300 var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), 7301 key = _Object$entries$_i[0], 7302 value = _Object$entries$_i[1]; 7303 7304 if (Array.isArray(value) && value.length) { 7305 paymentMethods.push(paymentLabels[key]); 7306 } else if (_typeof(value) === 'object' && value !== null && Object.keys(value).length) { 7307 paymentMethods.push(paymentLabels[key]); 7308 } 7309 } 7310 7311 return paymentMethods.length ? paymentMethods.join(';') : 'null'; 7312 }; 7313 7314 var getProductBadge = function getProductBadge() { 7315 var isNewArrival = getFromProductCatalogForProduct('newArrival')(); 7316 var earlyAccessFlag = getFromProductCatalogForProduct('productAttrs.EarlyAccessIndicator')(); 7317 var isEarlyAccess = earlyAccessFlag ? earlyAccessFlag.toString().toLowerCase() === 'true' : false; 7318 var isTopRated = getFromProductCatalogForProduct('productAttrs.topRated')(); 7319 var isBestSeller = getFromProductCatalogForProduct('productAttrs.bestSeller')(); 7320 var isAppExclusive = getFromProductCatalogForProduct('productAttrs.appExclusive')(); 7321 return isAppExclusive ? 'app exclusive' : [isNewArrival ? 'new' : '', isEarlyAccess ? 'early access' : '', isTopRated ? 'top rated' : '', isBestSeller ? 'top seller' : ''].filter(Boolean).join(', '); 7322 }; 7323 7324 var getFilterFacetsItems = function getFilterFacetsItems(item) { 7325 var _ANF7, _ANF7$catalog, _ANF7$catalog$data, _ANF7$catalog$data$fi; 7326 7327 var filterFacetsObject = (_ANF7 = ANF) === null || _ANF7 === void 0 ? void 0 : (_ANF7$catalog = _ANF7.catalog) === null || _ANF7$catalog === void 0 ? void 0 : (_ANF7$catalog$data = _ANF7$catalog.data) === null || _ANF7$catalog$data === void 0 ? void 0 : (_ANF7$catalog$data$fi = _ANF7$catalog$data.filters) === null || _ANF7$catalog$data$fi === void 0 ? void 0 : _ANF7$catalog$data$fi.facets; 7328 if (!filterFacetsObject) return undefined; 7329 return Object.entries(filterFacetsObject).filter(function (_ref2) { 7330 var _ref3 = _slicedToArray(_ref2, 2), 7331 value = _ref3[1]; 7332 7333 return value.description; 7334 }).map(function (_ref4) { 7335 var _ref5 = _slicedToArray(_ref4, 2), 7336 value = _ref5[1]; 7337 7338 return value[item]; 7339 }).join(';'); 7340 }; 7341 7342 var getLocateInStoreItem = function getLocateInStoreItem(item) { 7343 var _ANF8, _ANF8$catalog, _ANF8$catalog$data, _ANF8$catalog$data$fi; 7344 7345 var locateInStoreObject = (_ANF8 = ANF) === null || _ANF8 === void 0 ? void 0 : (_ANF8$catalog = _ANF8.catalog) === null || _ANF8$catalog === void 0 ? void 0 : (_ANF8$catalog$data = _ANF8$catalog.data) === null || _ANF8$catalog$data === void 0 ? void 0 : (_ANF8$catalog$data$fi = _ANF8$catalog$data.filters) === null || _ANF8$catalog$data$fi === void 0 ? void 0 : _ANF8$catalog$data$fi.locateInStore; 7346 if (!locateInStoreObject) return undefined; 7347 7348 if (locateInStoreObject !== null && locateInStoreObject !== void 0 && locateInStoreObject.checked) { 7349 switch (item) { 7350 case 'search_filter_applied_value_name': 7351 return 'Same Day Delivery'; 7352 7353 case 'search_filter_applied_value_category': 7354 return locateInStoreObject.storeName; 7355 7356 default: 7357 return undefined; 7358 } 7359 } 7360 7361 return undefined; 7362 }; 7363 7364 var formatFilterEventValues = function formatFilterEventValues(filterFacetItem, locateInStoreItem) { 7365 var filterFacetsItems = getFilterFacetsItems(filterFacetItem); 7366 var locateInStoreValue = getLocateInStoreItem(locateInStoreItem);
7367 return [filterFacetsItems, locateInStoreValue].filter(Boolean).join(';'); 7368 }; 7369 7370 var getPromotionProperty = function getPromotionProperty(property) { 7371 var _getFromCart5; 7372 7373 var items = (_getFromCart5 = getFromCart('adjustments')()) !== null && _getFromCart5 !== void 0 ? _getFromCart5 : []; 7374 if (!items.length) return 'null'; 7375 return items.map(function (item) { 7376 return item[property] || ''; 7377 }).join(';'); 7378 }; 7379 /** 7380 * Check if the cart has a promotion of a specific type. 7381 * 7382 * @param {string} type - The type of promotion to check for 7383 * @returns {boolean} - Whether or not the cart has a promotion of the given type 7384 */ 7385 7386 7387 var hasPromotionType = function hasPromotionType(type) { 7388 var _getFromCart6; 7389 7390 // Get the promotions from the cart 7391 var promotions = (_getFromCart6 = getFromCart('adjustments')()) !== null && _getFromCart6 !== void 0 ? _getFromCart6 : []; // If there are no promotions, return false 7392 7393 if (!promotions.length) return false; // Check if any of the promotions have the given type 7394 7395 return promotions.some(function (promotion) { 7396 return promotion[type]; 7397 }); 7398 }; 7399 7400 var getRecommendationsValues = function getRecommendationsValues() { 7401 var _window4, _window4$digitalData; 7402 7403 var algonomyOnClickData = (_window4 = window) === null || _window4 === void 0 ? void 0 : (_window4$digitalData = _window4.digitalData) === null || _window4$digitalData === void 0 ? void 0 : _window4$digitalData.get('algonomy.onClick'); 7404 var algonomyMvtTreatments = algonomyOnClickData === null || algonomyOnClickData === void 0 ? void 0 : algonomyOnClickData.mvtTreatments[0]; 7405 if (!algonomyMvtTreatments) return undefined; 7406 return ['recommendations', algonomyOnClickData === null || algonomyOnClickData === void 0 ? void 0 : algonomyOnClickData.strategyName, (algonomyMvtTreatments === null || algonomyMvtTreatments === void 0 ? void 0 : algonomyMvtTreatments.treatmentId) || ''].join('-'); 7407 }; 7408 7409 var getRecommendationsItems = function getRecommendationsItems(item) { 7410 var _window5, _window5$digitalData, _window6, _window6$digitalData; 7411 7412 var algonomyOnClickTreatmentId = (_window5 = window) === null || _window5 === void 0 ? void 0 : (_window5$digitalData = _window5.digitalData) === null || _window5$digitalData === void 0 ? void 0 : _window5$digitalData.get('algonomy.onClick.mvtTreatments[0].treatmentId'); 7413 if (!algonomyOnClickTreatmentId) return undefined; 7414 return algonomyOnClickTreatmentId ? (_window6 = window) === null || _window6 === void 0 ? void 0 : (_window6$digitalData = _window6.digitalData) === null || _window6$digitalData === void 0 ? void 0 : _window6$digitalData.get(item) : 'null'; 7415 }; 7416 7417 var getAnfCartCategoryName = function getAnfCartCategoryName() { 7418 var _getFromCart7; 7419 7420 var items = (_getFromCart7 = getFromCart('items')()) !== null && _getFromCart7 !== void 0 ? _getFromCart7 : []; 7421 var categoryNames = items.map(function (item) { 7422 if (!(item !== null && item !== void 0 && item.categoryHierarchy.length)) return 'null'; 7423 return item === null || item === void 0 ? void 0 : item.categoryHierarchy.map(function (category) { 7424 return category.categoryName; 7425 }).join(' > '); 7426 }); 7427 return categoryNames.join(';'); 7428 }; 7429 7430 var getCatalogCategoryName = function getCatalogCategoryName() { 7431 var _ANF$catalog$data$cat, _ANF9, _ANF9$catalog, _ANF9$catalog$data; 7432 7433 var items = (_ANF$catalog$data$cat = (_ANF9 = ANF) === null || _ANF9 === void 0 ? void 0 : (_ANF9$catalog = _ANF9.catalog) === null || _ANF9$catalog === void 0 ? void 0 : (_ANF9$catalog$data = _ANF9$catalog.data) === null || _ANF9$catalog$data === void 0 ? void 0 : _ANF9$catalog$data.categoryHierarchyObj) !== null && _ANF$catalog$data$cat !== void 0 ? _ANF$catalog$data$cat : []; 7434 if (!items.length) return undefined; 7435 return items.map(function (category) { 7436 // Default to the english name, otherwise use the localized name 7437 return (category === null || category === void 0 ? void 0 : category.enName) || (category === null || category === void 0 ? void 0 : category.name); 7438 }).join(' > '); 7439 }; 7440 7441 var getMySavesNamesList = function getMySavesNamesList() { 7442 var saveList = wrapDigitalDataGet('page.myListProducts')(); 7443 if (!saveList) return []; 7444 return saveList.map(function (item) { 7445 var _item$product; 7446 7447 return item === null || item === void 0 ? void 0 : (_item$product = item.product) === null || _item$product === void 0 ? void 0 : _item$product.name; 7448 }); 7449 }; 7450 7451 var getListOfValueAsString = function getListOfValueAsString(items) { 7452 if (!items || !items.length > 0) return dataPointEmptyValue; 7453 return items.map(function (item) { 7454 return item; 7455 }).join(';'); 7456 }; 7457 /** 7458 * Maps help sub-page URL slugs to their page_description analytics values. 7459 * The 'Accessibility' key is title-cased because the CMS serves that page at /help/Accessibility (capital A). 7460 * @private 7461 */ 7462 7463 7464 var HELP_SUB_PAGE_DESCRIPTIONS = Object.freeze({ 7465 Accessibility: 'customer service-accessibility',
7466 'cancel-order': 'customer service-change cancel order', 7467 currency: 'customer service-currency', 7468 giftcards: 'customer service-cards Ecards', 7469 'help-faq': 'customer service-myAbercrombie FAQ', 7470 'instore-return-exchange-policy': 'customer service-instore returns exchanges', 7471 'klarna-pay-overtime': 'customer service-klarna faq', 7472 'online-return-exchange-policy': 'customer service-online returns exchanges', 7473 'order-wrong': 'customer service-issue existing order', 7474 'quality-of-merchandise': 'customer service-quality of merchandise', 7475 'shipping-handling': 'customer service-shipping handling' 7476 }); 7477 7478 var getHelpSubPageDescription = function getHelpSubPageDescription() { 7479 var _HELP_SUB_PAGE_DESCRI; 7480 7481 var match = window.location.pathname.match(/\/help\/([^/]+)/); 7482 if (!match) return null; 7483 return (_HELP_SUB_PAGE_DESCRI = HELP_SUB_PAGE_DESCRIPTIONS[match[1]]) !== null && _HELP_SUB_PAGE_DESCRI !== void 0 ? _HELP_SUB_PAGE_DESCRI : null; 7484 }; 7485 7486 var getPageDescription = function getPageDescription() { 7487 var _ANF10, _ANF10$catalog, _ANF10$catalog$data, _ANF10$catalog$data$c, _ANF11, _ANF11$catalog, _ANF11$catalog$data, _ANF11$catalog$data$c; 7488 7489 var helpDescription = getHelpSubPageDescription(); 7490 7491 if (helpDescription) { 7492 // Single call site for the digitalData writes. Keeping them here (not inside 7493 // getHelpSubPageDescription) ensures the side effect fires exactly once per 7494 // analytics cycle. getHelpSubPageDescription is also called from 7495 // getPageFindingMethod; a side effect there would fire a second set() call 7496 // inside the same utag.view handler, which can cause DataBridge re-entrancy 7497 // and duplicate analytics beacons. 7498 window.digitalData.set('page.pageDescription', helpDescription); 7499 window.digitalData.set('page.pageFindingMethod', 'navigation - customer service'); 7500 return helpDescription; 7501 } 7502 7503 var data = { 7504 path: wrapDigitalDataGet('page.url.path')(), 7505 pageName: wrapDigitalDataGet('page.pageName')(), 7506 pageDescription: wrapDigitalDataGet('page.pageDescription')(), 7507 brand: wrapDigitalDataGet('page.brand')(), 7508 pageKind: wrapDigitalDataGet('page.pageKind')(), 7509 defaultCategoryDescription: getCatalogCategoryName() 7510 }; 7511 var marketingCategoryPaths = ['/fierce', '/pride']; 7512 var rewardsDescription = data.brand === 'hol' ? 'hollister house rewards' : 'my abercrombie'; 7513 var marketingDescriptionByPath = [{ 7514 paths: ['/pride'], 7515 description: 'pride' 7516 }, { 7517 paths: ['/activewear'], 7518 description: 'activewear' 7519 }, { 7520 paths: ['/kids/purpose', '/purpose', '/about-us', '/social-tourist/about-the-brand', '/lo-nuevo', '/propósito', '/nieuw', '/doel', '/neuheiten', '/zweck', '/novità', '/finalità', '/novedades', '/objetivo', '/nouveautés', '/résolution', '/nouveautés', '/objectif', '/ce-que-nous-faisons'], 7521 description: 'purpose' 7522 }, { 7523 paths: ['/jeans', '/jean'], 7524 description: 'jeanslp', 7525 ignoreHifen: true 7526 }, { 7527 paths: ['/fierce'], 7528 description: 'fierce' 7529 }, { 7530 paths: ['/superbowlsweepstakes', '/superbowlsweepstakesv3', '/superbowlsweepstakesv4'], 7531 description: 'nfl superbowl sweeps' 7532 }]; 7533 var isPurposePage = (_ANF10 = ANF) === null || _ANF10 === void 0 ? void 0 : (_ANF10$catalog = _ANF10.catalog) === null || _ANF10$catalog === void 0 ? void 0 : (_ANF10$catalog$data = _ANF10$catalog.data) === null || _ANF10$catalog$data === void 0 ? void 0 : (_ANF10$catalog$data$c = _ANF10$catalog$data.categoryHierarchyObj) === null || _ANF10$catalog$data$c === void 0 ? void 0 : _ANF10$catalog$data$c.some(function (item) { 7534 var _item$enName; 7535 7536 return (item === null || item === void 0 ? void 0 : (_item$enName = item.enName) === null || _item$enName === void 0 ? void 0 : _item$enName.toLowerCase()) === 'purpose'; 7537 }); 7538 var isAboutBrandPage = (_ANF11 = ANF) === null || _ANF11 === void 0 ? void 0 : (_ANF11$catalog = _ANF11.catalog) === null || _ANF11$catalog === void 0 ? void 0 : (_ANF11$catalog$data = _ANF11$catalog.data) === null || _ANF11$catalog$data === void 0 ? void 0 : (_ANF11$c
7538atalog$data$c = _ANF11$catalog$data.categoryHierarchyObj) === null || _ANF11$catalog$data$c === void 0 ? void 0 : _ANF11$catalog$data$c.some(function (item) { 7539 var _item$enName2; 7540 7541 return (item === null || item === void 0 ? void 0 : (_item$enName2 = item.enName) === null || _item$enName2 === void 0 ? void 0 : _item$enName2.toLowerCase()) === 'about the brand'; 7542 }); 7543 var pageDescriptions = { 7544 'my account:rewards:overview': rewardsDescription, 7545 'marketing': function marketing() { 7546 var _iterator = _createForOfIteratorHelper(marketingDescriptionByPath), 7547 _step; 7548 7549 try { 7550 for (_iterator.s(); !(_step = _iterator.n()).done;) { 7551 var item = _step.value; 7552 7553 var _iterator2 = _createForOfIteratorHelper(item.paths), 7554 _step2; 7555 7556 try { 7557 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { 7558 var currentPath = _step2.value; 7559 var decodedPath = decodeURIComponent(data.path).toLowerCase(); 7560 if (decodedPath.endsWith(currentPath)) return item.description; 7561 7562 if (item.ignoreHifen) { 7563 var endPath = decodedPath.slice(decodedPath.lastIndexOf('/') + 1); 7564 var splittedPathWithoutHifen = "/".concat(endPath.split('-')[0]); 7565 if (splittedPathWithoutHifen.endsWith(currentPath)) return item.description; 7566 } 7567 7568 if (isPurposePage || isAboutBrandPage) return 'purpose'; 7569 } 7570 } catch (err) { 7571 _iterator2.e(err); 7572 } finally { 7573 _iterator2.f(); 7574 } 7575 } 7576 } catch (err) { 7577 _iterator.e(err); 7578 } finally { 7579 _iterator.f(); 7580 } 7581 7582 return dataPointEmptyValue; 7583 }, 7584 'category': function category() { 7585 var _iterator3 = _createForOfIteratorHelper(marketingCategoryPaths), 7586 _step3; 7587 7588 try { 7589 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { 7590 var _data$path; 7591 7592 var categoryPath = _step3.value; 7593 7594 if (data !== null && data !== void 0 && (_data$path = data.path) !== null && _data$path !== void 0 && _data$path.endsWith(categoryPath)) { 7595 return pageDescriptions.marketing(); 7596 } 7597 } 7598 } catch (err) { 7599 _iterator3.e(err); 7600 } finally { 7601 _iterator3.f(); 7602 } 7603 7604 return getCatalogCategoryName(); 7605 } 7606 }; 7607 var pageName = data.pageName; 7608 7609 if (pageName in pageDescriptions) { 7610 var description = pageDescriptions[pageName]; 7611 7612 if (typeof description === 'function') { 7613 return description(); 7614 } 7615 7616 return description; 7617 } 7618 7619 if (data.pageKind in pageDescriptions) { 7620 return pageDescriptions[data.pageKind](); 7621 } 7622 7623 return data.pageDescription || dataPointEmptyValue; 7624 }; 7625 /** 7626 * Get the page finding method 7627 * @private 7628 * @returns {string} the page finding method 7629 */ 7630 7631 7632 var getPageFindingMethod = function getPageFindingMethod() { 7633 var _getRecommendationsVa; 7634 7635 var helpDescription = getHelpSubPageDescription(); 7636 if (helpDescription) return 'navigation - customer service'; // Get the page finding method from the URL 7637 7638 var valueFromParameter = parameterHelper.getParameterValue('pageFindingMethod'); // If the value is present in the URL, set it in the digitalData object and return it 7639 7640 if (valueFromParameter) { 7641 window.digitalData.set('page.pageFindingMethod', valueFromParameter); 7642 return valueFromParameter; 7643 } // Get the page finding method from the Data Bridge 7644 7645 7646 var valueFromDataBridge = wrapDigitalDataGet('page.pageFindingMethod')(); 7647 if (valueFromDataBridge) return valueFromDataBridge; // Get the page finding method from session storage 7648 7649 var valueFromSessionStorage = sessionStorage.getItem('findingMethod'); 7650 sessionStorage.removeItem('findingMethod'); 7651 var formattedFindingMethod; 7652 var pageBrand = wrapDigitalDataGet('page.brand')(); 7653 var categoryId = getCategoryId(); 7654 var isProductPage = wrapDigitalDataGet('page.pageKind')() === 'product'; 7655 7656 if (valueFromSessionStorage !== null && valueFromSessionStorage !== void 0 && valueFromSessionStorage.
7656includes('recommendations-algonomy=')) { 7657 return valueFromSessionStorage.split('recommendations-algonomy=')[1]; 7658 } 7659 7660 switch (valueFromSessionStorage) { 7661 case 'navigation-main': 7662 if (!valueFromSessionStorage || !pageBrand || !categoryId) { 7663 formattedFindingMethod = dataPointEmptyValue; 7664 break; 7665 } 7666 7667 formattedFindingMethod = "".concat(valueFromSessionStorage, " nav-").concat(pageBrand, "-").concat(categoryId); 7668 break; 7669 7670 case 'internal search': 7671 case 'navigation-logo': 7672 case 'navigation-top nav': 7673 case 'navigation-swatch': 7674 case 'navigation-grid': 7675 case 'navigation-left nav': 7676 case 'navigation-shop similar': 7677 case 'navigation-category dropdown': 7678 case 'navigation-modal quickview': 7679 case 'shop similar': 7680 case 'ugc-widget': 7681 case 'navigation-breadcrumbs': 7682 case 'navigation-footer': 7683 case 'navigation-left rail footer': 7684 case 'recommendations': 7685 case 'recommendations-stylitics': 7686 formattedFindingMethod = valueFromSessionStorage; 7687 break; 7688 7689 case 'navigation-edit': 7690 if (isProductPage) { 7691 formattedFindingMethod = 'navigation-edit'; 7692 break; 7693 } 7694 7695 formattedFindingMethod = ''; 7696 break; 7697 7698 case 'navigation-quickview': 7699 case 'blank': 7700 formattedFindingMethod = ''; 7701 break; 7702 7703 case 'recommendations-other': 7704 formattedFindingMethod = (_getRecommendationsVa = getRecommendationsValues()) !== null && _getRecommendationsVa !== void 0 ? _getRecommendationsVa : sessionStorage.getItem('algonomyOnClick'); 7705 break; 7706 7707 default: 7708 formattedFindingMethod = dataPointEmptyValue; 7709 } 7710 7711 return formattedFindingMethod; 7712 }; 7713 /** 7714 * Get the product view method 7715 * @private 7716 * @returns {string} the product view method 7717 */ 7718 7719 7720 var getProductViewMethod = function getProductViewMethod() { 7721 var valueFromDataBridge = wrapDigitalDataGet('product.productViewMethod')(); 7722 var valueFromParameter = parameterHelper.getParameterValue('productViewMethod'); 7723 if (valueFromDataBridge) return valueFromDataBridge; 7724 if (valueFromParameter) return valueFromParameter; // Get the product view method from session storage 7725 7726 var valueFromSessionStorage = sessionStorage.getItem('productViewMethod'); 7727 sessionStorage.removeItem('productViewMethod'); 7728 7729 if (valueFromSessionStorage !== null && valueFromSessionStorage !== void 0 && valueFromSessionStorage.includes('recommendations-algonomy=')) { 7730 var newRecommendationValue = getRecommendationsValues(); 7731 7732 if (!newRecommendationValue || newRecommendationValue === 'recommendations') { 7733 return sessionStorage.getItem('algonomyOnClick'); 7734 } 7735 7736 return newRecommendationValue; 7737 } 7738 7739 if (valueFromSessionStorage !== null && valueFromSessionStorage !== void 0 && valueFromSessionStorage.includes('recommendations-other')) { 7740 var _getRecommendationsVa2; 7741 7742 var recommendationsProductViewMethod = (_getRecommendationsVa2 = getRecommendationsValues()) !== null && _getRecommendationsVa2 !== void 0 ? _getRecommendationsVa2 : sessionStorage.getItem('algonomyOnClick'); 7743 return recommendationsProductViewMethod; 7744 } 7745 7746 switch (valueFromSessionStorage) { 7747 case 'navigation-swatch': 7748 case 'recommendations-stylitics': 7749 case 'navigation-quickview': 7750 case 'modal-quickview': 7751 case 'internal search': 7752 case 'navigation-grid': 7753 case 'navigation-edit': 7754 case 'navigation-modal quickview': 7755 case 'ugc-widget': 7756 case 'shop similar': 7757 case 'navigation-shop similar': 7758 return valueFromSessionStorage; 7759 7760 case 'navigation-logo': 7761 default: 7762 return dataPointEmptyValue; 7763 } 7764 }; 7765 /** 7766 * Get the page view method 7767 * @private 7768 * @returns {string} the page view method 7769 */ 7770 7771 7772 var getPageViewMethod = function getPageViewMethod() { 7773 // Get the page view method from the URL 7774 var valueFromParameter = parameterHelper.getParameterValue('pageViewMethod'); // If the value is present in the URL, set it in the digitalData object and return it 7775 7776 if (valueFromParameter) { 7777 window.digitalData.set('page.pageViewMethod', valueFromParameter); 7778 return valueFromParameter; 7779 } // Get the page view method from the Data Bridge 7780 7781 7782 var valueFromDataBridge = wrapDigitalDataGet('page.pageViewMethod')(); 7783 if (valueFromDataBridge) return valueFromDataBridge; // Get the page view method from session storage 7784 7785 var DEFAULT_PAGE_VIEW_METHOD = 'page load'; 7786 var valueFromSessionStorage = sessionStorage.getItem('pageViewMethod'); 7787 sessionStorage.removeItem('pageViewMethod'); 7788 7789 if (valueFromSessionStorage !== null && valueFromSessionStorage !== void 0 && valueFromSessionStorage.
7789includes('recommendations-algonomy=')) { 7790 return 'recommendations'; 7791 } 7792 7793 switch (valueFromSessionStorage) { 7794 case 'swatch': 7795 case 'modal-quickview': 7796 case 'recommendations': 7797 case 'modal-shop similar': 7798 return valueFromSessionStorage; 7799 7800 case 'navigation-top nav': 7801 case 'navigation-logo': 7802 default: 7803 return DEFAULT_PAGE_VIEW_METHOD; 7804 } 7805 }; 7806 7807 var getKeepMeLoggedInFlag = function getKeepMeLoggedInFlag() { 7808 var _document$getElementB; 7809 7810 var isKeepMeLoggedInChecked = (_document$getElementB = document.getElementById('keep-me-signed-in-sign-in-form-checkbox')) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.checked; 7811 return Boolean(isKeepMeLoggedInChecked); 7812 }; 7813 7814 if (((_window7 = window) === null || _window7 === void 0 ? void 0 : (_window7$digitalData = _window7.digitalData) === null || _window7$digitalData === void 0 ? void 0 : _window7$digitalData.get('flag.analytics-adapter-search')) !== true) { 7815 var _window8, _window8$digitalData; 7816 7817 (_window8 = window) === null || _window8 === void 0 ? void 0 : (_window8$digitalData = _window8.digitalData) === null || _window8$digitalData === void 0 ? void 0 : _window8$digitalData.subscribe('event:search.search_bar_used', function (event) { 7818 window.digitalData.set('search.search_bar_used', event === null || event === void 0 ? void 0 : event.data); 7819 var hasTheEventBeenTriggered = window.digitalData.get('analytics.hasBeenTriggeredSearch'); 7820 7821 if (hasTheEventBeenTriggered) { 7822 window.digitalData.trigger('search.search_loaded'); 7823 return; 7824 } 7825 7826 window.digitalData.set('analytics.hasBeenTriggeredSearch', true); 7827 }); 7828 } 7829 7830 (_window9 = window) === null || _window9 === void 0 ? void 0 : (_window9$digitalData = _window9.digitalData) === null || _window9$digitalData === void 0 ? void 0 : _window9$digitalData.subscribe('event:analytics.checkout', function () { 7831 var _window10, _window10$digitalData; 7832 7833 (_window10 = window) === null || _window10 === void 0 ? void 0 : (_window10$digitalData = _window10.digitalData) === null || _window10$digitalData === void 0 ? void 0 : _window10$digitalData.subscribe('cart', function () { 7834 var _window11, _window11$digitalData, _window12, _window12$digitalData, _window13, _window13$digitalData; 7835 7836 var isCheckoutCart = ((_window11 = window) === null || _window11 === void 0 ? void 0 : (_window11$digitalData = _window11.digitalData) === null || _window11$digitalData === void 0 ? void 0 : _window11$digitalData.get('cart.origin')) === 'checkout' && ((_window12 = window) === null || _window12 === void 0 ? void 0 : (_window12$digitalData = _window12.digitalData) === null || _window12$digitalData === void 0 ? void 0 : _window12$digitalData.get('cart.action')) === 'load'; 7837 if (!isCheckoutCart) return; 7838 (_window13 = window) === null || _window13 === void 0 ? void 0 : (_window13$digitalData = _window13.digitalData) === null || _window13$digitalData === void 0 ? void 0 : _window13$digitalData.trigger('analytics.checkout_delayed'); 7839 }); 7840 }); // Gets the product position from sessionStorage 7841 7842 var getGridProductPosition = function getGridProductPosition() { 7843 return sessionStorage.getItem('grid-product-position'); 7844 }; 7845 /** 7846 * Gets the total number of items in the cart from the store cookie. 7847 * @returns {string} the total number of items in the cart, or '0' if the value cannot be determined 7848 */ 7849 7850 7851 var getNumberOfCartItems = function getNumberOfCartItems() { 7852 var cookies = document.cookie.split(';').map(function (cookie) { 7853 return cookie.trim(); 7854 }); 7855 var storeId = wrapDigitalDataGet('page.storeId')(); 7856 var cartCookie = cookies.find(function (cookie) { 7857 return cookie.includes("af-minicart-".concat(storeId)); 7858 }); 7859 var numberOfCartItems = cartCookie ? cartCookie.split('=')[1] : 'undefined'; 7860 var isValidCartCookieValue = numberOfCartItems !== 'undefined'; 7861 return isValidCartCookieValue ? numberOfCartItems : '0'; 7862 }; 7863 /** 7864 * Determines if the estimated delivery date has been displayed on the page. 7865 * @returns {string | undefined} the estimated delivery date, or undefined if it cannot be determined 7866 */ 7867 7868 7869 var getEstimatedDeliveryDateVisibility = function getEstimatedDeliveryDateVisibility() { 7870 var _ANF12, _ANF12$models, _ANF12$models$cart, _ANF12$models$cart$sh, _ANF13, _ANF13$models, _ANF13$models$cart, _standardShippingMeth; 7871 7872 var shipMode = window.digitalData.get('cart.data.shipMethod.shipModeType') || ((_ANF12 = ANF) === null || _ANF12 === void 0 ? void 0 : (_ANF12$models = _ANF12.models) === null || _ANF12$models === void 0 ? void 0 : (_ANF12$models$cart = _ANF12$models.cart) === null || _ANF12$models$cart === void 0 ? void 0 : (_ANF12$models$cart$sh = _ANF12$models$cart.shipMethod) === null || _ANF12$models$cart$sh === void 0 ? void 0 : _ANF12$models$cart$sh.shipModeType); 7873 var isHomeDelivery = String(shipMode).toLowerCase() === 'homedelivery'; 7874 if (!isHomeDelivery) return; 7875 var shippingMethods = window.digitalData.get('cart.data.shippingSpeed') || ((_ANF13 = ANF) === null || _ANF13 === void 0 ? void 0 : (_ANF13$models = _ANF13.models) === null || _ANF13$models === void 0 ? void 0 : (_ANF13$models$cart = _ANF13$models.cart) === null || _ANF13$models$cart === void 0 ? void 0 : _ANF13$models$cart.availableShippingMethods); 7876 if (!shippingMethods) return; 7877 var hasHomeDeliveryShippingMethods = shippingMethods.find(function (shippingMethod) { 7878 return String(shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.shipModeType).toLowerCase() === 'homedelivery'; 7879 }); 7880 if (!hasHomeDeliveryShippingMethods) return; 7881 var standardShippingMethod = shippingMethods.find(function (shippingMethod) { 7882 return Number(shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.shipModeId) === 13755; 7883 }); 7884 if (!standardShippingMethod) return; // eslint-disable-next-line consistent-return 7885 7886 return (_standardShippingMeth = standardShippingMethod === null || standardShippingMethod === void 0 ? void 0 : standardShippingMethod.estimatedDeliveryDate) !== null && _standardShippingMeth !== void 0 ? _standardShippingMeth : undefined; 7887 }; // eslint-disable-next-line wrap-iife 7888 7889 7890 (function () { 7891 pageInterceptor.intercept(['egifter', 'giftcards'], 'shopping cart', addGiftCardToCart.sendEvent); 7892 })(); 7893 7894 var getUserHashedEmail = function getUserHashedEmail() { 7895 var userHashedEmail = validateDatapoint(wrapDigitalDataGet('user.hashedEmail')(), 'string'); 7896 return userHashedEmail === 'null' ? '' : userHashedEmail; 7897 }; 7898 7899 var isSoldOutPdp = function isSoldOutPdp() { 7900 var _window14, _window14$digitalData; 7901 7902 var isProductPage = ((_window14 = window) === null || _window14 === void 0 ? void 0 : (_window14$digitalData = _window14.digitalData) === null || _window14$digitalData === void 0 ? void 0 : _window14$digitalData.get('page.pageKind')) === 'product'; 7903 if (!isProductPage) return false;
7904 return !!document.querySelector('#soldout-content'); 7905 }; 7906 7907 var getAfSource = function getAfSource() { 7908 var _window15, _window15$digitalData; 7909 7910 var urlAfSource = parameterHelper.getParameterValue('afsource'); 7911 var productAfSource = (_window15 = window) === null || _window15 === void 0 ? void 0 : (_window15$digitalData = _window15.digitalData) === null || _window15$digitalData === void 0 ? void 0 : _window15$digitalData.get('product.afSource'); 7912 var afSource = urlAfSource || productAfSource; 7913 return afSource || 'null'; 7914 }; 7915 /** 7916 * Gets the social proof status for the items in the cart. 7917 * @returns {string} the social proof status for the items in the cart 7918 */ 7919 7920 7921 var getSocialProofStatusForItems = function getSocialProofStatusForItems() { 7922 var items = wrapDigitalDataGet('cart.data.bagItems.items')(); 7923 var socialProofStatusForItems = Array.isArray(items) ? getArrayOfKeyInItems(items, 'item.socialProof') : []; 7924 var socialProofValueForItems = socialProofStatusForItems.map(function (socialProofStatus) { 7925 return String(!!(socialProofStatus && Object.keys(socialProofStatus).length > 0)); 7926 }); 7927 return socialProofValueForItems.join(';'); 7928 }; 7929 7930 var getIndividualProductShortDescriptor = function getIndividualProductShortDescriptor(firstShortDescriptor, secondShortDescriptor) { 7931 var shortDescriptor = firstShortDescriptor || secondShortDescriptor; 7932 var hasBothShortDescriptors = firstShortDescriptor && secondShortDescriptor; 7933 if (hasBothShortDescriptors) return "".concat(firstShortDescriptor, " | ").concat(secondShortDescriptor); 7934 return shortDescriptor || 'null'; 7935 }; 7936 7937 var getMultipleProductsShortDescriptor = function getMultipleProductsShortDescriptor() { 7938 var _ANF14, _ANF14$models, _ANF14$models$cart; 7939 7940 var cartItems = ((_ANF14 = ANF) === null || _ANF14 === void 0 ? void 0 : (_ANF14$models = _ANF14.models) === null || _ANF14$models === void 0 ? void 0 : (_ANF14$models$cart = _ANF14$models.cart) === null || _ANF14$models$cart === void 0 ? void 0 : _ANF14$models$cart.items) || []; 7941 if (!cartItems.length) return 'null'; 7942 var productShortDescriptor = cartItems.map(function (item) { 7943 var _item$item2, _item$item3; 7944 7945 var firstShortDescriptor = item === null || item === void 0 ? void 0 : (_item$item2 = item.item) === null || _item$item2 === void 0 ? void 0 : _item$item2.shortDesc1; 7946 var secondShortDescriptor = item === null || item === void 0 ? void 0 : (_item$item3 = item.item) === null || _item$item3 === void 0 ? void 0 : _item$item3.shortDesc2; 7947 return getIndividualProductShortDescriptor(firstShortDescriptor, secondShortDescriptor); 7948 }); 7949 return productShortDescriptor.join(';'); 7950 }; 7951 7952 function getAmountOfDaysUntilCurrentDate(stringDate) { 7953 if (!stringDate || isNaN(new Date(stringDate).getTime())) return dataPointEmptyValue; 7954 var date = new Date(stringDate); 7955 var currentDate = new Date(); 7956 var MILLISECONDS_PER_DAY = 1000 * 60 * 60 * 24; 7957 date.setHours(0, 0, 0, 0); 7958 currentDate.setHours(0, 0, 0, 0); 7959 var diffTime = date - currentDate; 7960 return Math.round(diffTime / MILLISECONDS_PER_DAY) + 1; // +1 to include the current day 7961 } 7962 7963 function getSearchProductRecommendationPosition() { 7964 var fromDataBridge = wrapDigitalDataGet('search.search_bar_used.precPos')(); 7965 7966 if (['string', 'number'].includes(_typeof(fromDataBridge))) { 7967 return fromDataBridge; 7968 } 7969 7970 return parameterHelper.getParameterValue('precPos') || 'null'; 7971 } 7972 7973 return _ref6 = { 7974 // SPECIAL KEY - This key is for any global handlers, these handlers can be overwritten by the event 7975 'global': (_global = {}, _defineProperty(_global, GLOBAL_DATA_POINT.USER_WCS_ID, function () { 7976 return validateDatapoint(fetchUserId(), 'string', 'number'); 7977 }), _defineProperty(_global, GLOBAL_DATA_POINT.USER_DIGITAL_MARKETING_CONSENT, function () { 7978 return validateDatapoint(uPref.getMarketingCookieAccept(), 'boolean'); 7979 }), _defineProperty(_global, GLOBAL_DATA_POINT.USER_STATE, function () { 7980 return validateDatapoint(fetchUserState(userType.get()), 'string'); 7981 }), _defineProperty(_global, GLOBAL_DATA_POINT.USER_HASHED_EMAIL, function () { 7982 return getUserHashedEmail(); 7983 }), _defineProperty(_global, GLOBAL_DATA_POINT.USER_HASHED_PHONE, undefined !== null && undefined !== void 0 ? undefined : dataPointEmptyValue), _defineProperty(_global, GLOBAL_DATA_POINT.USER_ZIP, undefined !== null && undefined !== void 0 ? undefined : dataPointEmptyValue), _defineProperty(_global, GLOBAL_DATA_POINT.USER_DEVICE_ID, function () { 7984 return validateDatapoint(deviceFingerprint.getSessionId(), 'string', 'number'); 7985 }), _defineProperty(_global, GLOBAL_DATA_POINT.SITE_CURRENCY, function () { 7986 return validateDatapoint(wrapDigitalDataGet('page.currency')(), 'string'); 7987 }), _defineProperty(_global, GLOBAL_DATA_POINT.SITE_DOMAIN, function () { 7988 return validateDatapoint(wrapDigitalDataGet('page.url.domain.top')(), 'string'); 7989 }), _defineProperty(_global, GLOBAL_DATA_POINT.SITE_LANGUAGE, function () { 7990 return validateDatapoint(wrapDigitalDataGet('page.language')(), 'string'); 7991 }), _defineProperty(_global, GLOBAL_DATA_POINT.SITE_BRAND, function () { 7992 return validateDatapoint(wrapDigitalDataGet('page.brand')(), 'string'); 7993 }), _defineProperty(_global, GLOBAL_DATA_POINT.PAGE_TYPE, function () { 7994 return validateDatapoint(wrapDigitalDataGet('page.pageKind')(), 'string'); 7995 }), _defineProperty(_global, GLOBAL_DATA_POINT.PAGE_URL, function () { 7996 return validateDatapoint("".concat(wrapDigitalDataGet('page.url.domain.top')()).concat(wrapDigitalDataGet('page.url.path')()), 'string'); 7997 }), _defineProperty(_global, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, function () { 7998 return validateDatapoint(wrapDigitalDataGet('page.storeId')(), 'string', 'number'); 7999 }), _defineProperty(_global, GLOBAL_DATA_POINT.SITE_COUNTRY, function () { 8000 return validateDatapoint(getCountry(), 'string'); 8001 }), _defineProperty(_global, GLOBAL_DATA_POINT.SITE_PLATFORM, function () { 8002 return validateDatapoint(getUserPlatform(), 'string'); 8003 }), _defineProperty(_global, GLOBAL_DATA_POINT.MERCHANDISING_CATEGORY_ID, function () { 8004 return validateDatapoint(getCategoryId(), 'string', 'number'); 8005 }), _defineProperty(_global, GLOBAL_DATA_POINT.PRODUCT_VIEW_METHOD, function () { 8006 return validateDatapoint(getProductViewMethod(), 'string'); 8007 }), _defineProperty(_global, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, function () { 8008 return validateDatapoint(getPageFindingMethod(), 'string'); 8009 }), _defineProperty(_global, GLOBAL_DATA_POINT.PAGE_VIEW_METHOD, function () { 8010 return validateDatapoint(getPageViewMethod(), 'string'); 8011 }), _defineProperty(_global, GLOBAL_DATA_POINT.TOTAL_CART_CONTENTS, function () { 8012 return getNumberOfCartItems(); 8013 }), _defineProperty(_global, GLOBAL_DATA_POINT.AFSOURCE, function () { 8014 return validateDatapoint(getAfSource(), 'string'); 8015 }), _global) 8016 }, _defineProperty(_ref6, EVENT_NAME.VIEW.HOMEPAGE, (_EVENT_NAME$VIEW$HOME = {}, _defineProperty(_EVENT_NAME$VIEW$HOME, GLOBAL_DATA_POINT.PAGE_URL, function () { 8017 return validateDatapoint("".concat(wrapDigitalDataGet('page.url.domain.top')()).concat(wrapDigitalDataGet('page.url.path')()) || dataPointEmptyValue, 'string'); 8018 }), _defineProperty(_EVENT_NAME$VIEW$HOME, GLOBAL_DATA_POINT.LOCATION_WEB_STORE_ID, function () { 8019 return validateDatapoint(wrapDigitalDataGet('page.storeId')() || dataPointEmptyValue, 'string', 'number'); 8020 }), _EVENT_NAME$VIEW$HOME)), _defineProperty(_ref6, EVENT_NAME.VIEW.SHOPPING_CART, (_EVENT_NAME$VIEW$SHOP = {}, _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.BRAND, function () { 8021 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('brandViewing')(), 'string'); 8022 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.COLLECTION_ID, function () { 8023 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('collectionId')(), 'string'); 8024 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.KEY_ITEM_COLOR, function () { 8025 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('keyItemColor')(), 'string'); 8026 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PRICE_LIST_LOCAL, function () { 8027 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('listPrice')(), 'string'); 8028 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PRICE_LIST_USD, function () { 8029 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('listPriceUSD')(), 'string'); 8030 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PRICE_OFFER_LOCAL, function () { 8031 return validateDatapoint(getCartItemsKeyData('price'), 'string', 'number'); 8032 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PRICE_OFFER_USD, function () { 8033 return dataPointEmptyValue; 8034 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.LONG_SKU, function () { 8035 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('productLongSku')(), 'string'); 8036 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.SHORT_SKU, function () { 8037 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('productShortSku')(), 'string'); 8038 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PRICE_FLAG, function () { 8039 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('priceFlag')(), 'string'); 8040 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.QUANTITY, function () { 8041 return validateDatapoint(getCartItemsKeyData('quantity'), 'string', 'number'); 8042 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.CARTITEMS_LIST_TOTAL_LOCAL, function () { 8043 return validateDatapoint(getFromCart('totals.productTotal')(), 'string', 'number'); 8044 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.CARTITEMS_LIST_TOTAL_USD, function () { 8045 return validateDatapoint(getFromCart('totals.productTotalUSD')(), 'string', 'number'); 8046 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.CARTITEMS_OFFER_TOTAL_LOCAL, function () { 8047 return validateDatapoint(getFromCart('totals.subTotal')(), 'string', 'number'); 8048 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.CARTITEMS_OFFER_TOTAL_USD, function () { 8049 return validateDatapoint(getFromCart('totals.subTotalUSD')(), 'string', 'number'); 8050 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.SHIPPING_THRESHOLD, function () { 8051 return validateDatapoint(getFromCart('amountToFreeShipping')(), 'string', 'number'); 8052 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PRODUCT_ID, function () { 8053 return validateDatapoint(getCartItemsKeyData('productId'), 'string', 'number'); 8054 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.INVENTORY, function () { 8055 return validateDatapoint(getProductCartInventory(), 'string'); 8056 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PROMOTION_ID, function () { 8057 return getPromotionProperty('promotionCode'); 8058 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PROMOTION_COMP_ID, function () { 8059 return getPromotionProperty('promoCompId'); 8060 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PROMOTION_NAME, function () { 8061 return validateDatapoint(getCartAdjustmentsKeyData('promotionKey'), 'string'); 8062 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PROMOTION_QUANTITY, function () { 8063 var _ANF15, _ANF15$models, _ANF15$models$cart, _ANF15$models$cart$ad; 8064 8065 return validateDatapoint(((_ANF15 = ANF) === null || _ANF15 === void 0 ? void 0 : (_ANF15$models = _ANF15.models) === null || _ANF15$models === void 0 ? void 0 : (_ANF15$models$cart = _ANF15$models.cart) === null || _ANF15$models$cart === void 0 ? void 0 : (_ANF15$models$cart$ad = _ANF15$models$cart.adjustments) === null || _ANF15$models$cart$ad === void 0 ? void 0 : _ANF15$models$cart$ad.length) || dataPointEmptyValue, 'string', 'number'); 8066 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PROMOTION_AMOUNT, function () { 8067 return validateDatapoint(getCartAdjustmentsKeyData('amount'), 'string'); 8068 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PROMOTION_TOTAL_LOCAL, function () { 8069 var _ANF16, _ANF16$models, _ANF16$models$cart, _ANF16$models$cart$ad; 8070 8071 return validateDatapoint((_ANF16 = ANF) !== null && _ANF16 !== void 0 && (_ANF16$models = _ANF16.models) !== null && _ANF16$models !== void 0 && (_ANF16$models$cart = _ANF16$models.cart) !== null && _ANF16$models$cart !== void 0 && (_ANF16$models$cart$ad = _ANF16$models$cart.adjustments) !== null && _ANF16$models$cart$ad !== void 0 && _ANF16$models$cart$ad.length ? getFromCart('totals.totalAdjustment')() : dataPointEmptyValue, 'number', 'string'); 8072 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PROMOTION_TOTAL_USD, function () { 8073 var _ANF17, _ANF17$models, _ANF17$models$cart, _ANF17$models$cart$ad; 8074 8075 return validateDatapoint((_ANF17 = ANF) !== null && _ANF17 !== void 0 && (_ANF17$models = _ANF17.models) !== null && _ANF17$models !== void 0 && (_ANF17$models$cart = _ANF17$models.cart) !== null && _ANF17$models$cart !== void 0 && (_ANF17$models$cart$ad = _ANF17$models$cart.adjustments) !== null && _ANF17$models$cart$ad !== void 0 && _ANF17$models$cart$ad.length ? getFromCart('totals.totalAdjustmentUSD')() : dataPointEmptyValue, 'number', 'string'); 8076 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.PRODUCT_NAME, function () { 8077 return validateDatapoint(getCartItemsKeyData('productName'), 'string'); 8078 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.CATEGORY_NAME, function () {
8079 return validateDatapoint(getAnfCartCategoryName(), 'string'); 8080 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.SOCIAL_PROOFING, function () { 8081 return validateDatapoint(getSocialProofStatusForItems(), 'string'); 8082 }), _defineProperty(_EVENT_NAME$VIEW$SHOP, DATA_POINT.SHORT_DESCRIPTOR, function () { 8083 return validateDatapoint(getMultipleProductsShortDescriptor(), 'string'); 8084 }), _EVENT_NAME$VIEW$SHOP)), _defineProperty(_ref6, EVENT_NAME.VIEW.CHECKOUT, (_EVENT_NAME$VIEW$CHEC = {}, _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.BRAND, function () { 8085 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('brandViewing')(), 'string'); 8086 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.COLLECTION_ID, function () { 8087 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('collectionId')(), 'string'); 8088 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.KEY_ITEM_COLOR, function () { 8089 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('keyItemColor')(), 'string'); 8090 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PRICE_LIST_LOCAL, function () { 8091 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('listPrice')(), 'string'); 8092 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PRICE_LIST_USD, function () { 8093 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('listPriceUSD')(), 'string'); 8094 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PRICE_OFFER_LOCAL, function () { 8095 return validateDatapoint(getCartItemsKeyData('price'), 'string', 'number'); 8096 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PRICE_OFFER_USD, function () { 8097 return dataPointEmptyValue; 8098 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.LONG_SKU, function () { 8099 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('productLongSku')(), 'string'); 8100 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.SHORT_SKU, function () { 8101 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('productShortSku')(), 'string'); 8102 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PRICE_FLAG, function () { 8103 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('priceFlag')(), 'string'); 8104 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.QUANTITY, function () { 8105 return validateDatapoint(getCartItemsKeyData('quantity'), 'string', 'number'); 8106 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.CARTITEMS_LIST_TOTAL_LOCAL, function () { 8107 return validateDatapoint(getFromCart('totals.productTotal')(), 'string', 'number'); 8108 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.CARTITEMS_LIST_TOTAL_USD, function () { 8109 return validateDatapoint(getFromCart('totals.productTotalUSD')(), 'string', 'number'); 8110 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.CARTITEMS_OFFER_TOTAL_LOCAL, function () { 8111 return validateDatapoint(getFromCart('totals.grandTotal')(), 'string', 'number'); 8112 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.CARTITEMS_OFFER_TOTAL_USD, function () { 8113 return validateDatapoint(getFromCart('totals.grandTotalUSD')(), 'string', 'number'); 8114 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.CARTITEMS_SUB_TOTAL_LOCAL, function () { 8115 return validateDatapoint(getFromCart('totals.subTotal')(), 'string', 'number'); 8116 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.CARTITEMS_SUB_TOTAL_USD, function () { 8117 return validateDatapoint(getFromCart('totals.subTotalUSD')(), 'string', 'number'); 8118 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PRODUCT_ID, function () { 8119 return validateDatapoint(getCartItemsKeyData('productId'), 'string', 'number'); 8120 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.INVENTORY, function () { 8121 return validateDatapoint(getProductCartInventory(), 'string'); 8122 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.SHIPPING_FLAG, function () { 8123 return validateDatapoint(getFromCart('totals.shippingCharge')() ? '0' : '1', 'string', 'number'); 8124 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.SHIPPING_LOCAL, function () { 8125 return validateDatapoint(getFromCart('totals.shippingCharge')(), 'string', 'number'); 8126 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.SHIPPING_USD, function () { 8127 return validateDatapoint(getFromCart('totals.shippingChargeUSD')(), 'string', 'number'); 8128 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.TAX, function () { 8129 return validateDatapoint(getFromCart('totals.estimatedTax')(), 'string', 'number'); 8130 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PROMOTION_ID, function () { 8131 return getPromotionProperty('promotionCode'); 8132 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PROMOTION_COMP_ID, function () { 8133 return getPromotionProperty('promoCompId'); 8134 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PROMOTION_NAME, function () { 8135 return validateDatapoint(getCartAdjustmentsKeyData('promotionKey'), 'string'); 8136 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PROMOTION_QUANTITY, function () { 8137 var _ANF18, _ANF18$models, _ANF18$models$cart, _ANF18$models$cart$ad; 8138 8139 return validateDatapoint(((_ANF18 = ANF) === null || _ANF18 === void 0 ? void 0 : (_ANF18$models = _ANF18.models) === null || _ANF18$models === void 0 ? void 0 : (_ANF18$models$cart = _ANF18$models.cart) === null || _ANF18$models$cart === void 0 ? void 0 : (_ANF18$models$cart$ad = _ANF18$models$cart.adjustments) === null || _ANF18$models$cart$ad === void 0 ? void 0 : _ANF18$models$cart$ad.length) || dataPointEmptyValue, 'string', 'number'); 8140 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PROMOTION_AMOUNT, function () { 8141 return validateDatapoint(getCartAdjustmentsKeyData('amount'), 'string'); 8142 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PROMOTION_TOTAL_LOCAL, function () { 8143 var _ANF19, _ANF19$models, _ANF19$models$cart, _ANF19$models$cart$ad; 8144 8145 return validateDatapoint((_ANF19 = ANF) !== null && _ANF19 !== void 0 && (_ANF19$models = _ANF19.models) !== null && _ANF19$models !== void 0 && (_ANF19$models$cart = _ANF19$models.cart) !== null && _ANF19$models$cart !== void 0 && (_ANF19$models$cart$ad = _ANF19$models$cart.adjustments) !== null && _ANF19$models$cart$ad !== void 0 && _ANF19$models$cart$ad.length ? getFromCart('totals.totalAdjustment')() : dataPointEmptyValue, 'number', 'string'); 8146 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PROMOTION_TOTAL_USD, function () { 8147 var _ANF20, _ANF20$models, _ANF20$models$cart, _ANF20$models$cart$ad; 8148 8149 return validateDatapoint((_ANF20 = ANF) !== null && _ANF20 !== void 0 && (_ANF20$models = _ANF20.models) !== null && _ANF20$models !== void 0 && (_ANF20$models$cart = _ANF20$models.cart) !== null && _ANF20$models$cart !== void 0 && (_ANF20$models$cart$ad = _ANF20$models$cart.adjustments) !== null && _ANF20$models$cart$ad !== void 0 && _ANF20$models$cart$ad.length ? getFromCart('totals.totalAdjustmentUSD')() : dataPointEmptyValue, 'number', 'string'); 8150 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.PRODUCT_NAME, function () { 8151 return validateDatapoint(getCartItemsKeyData('productName'), 'string'); 8152 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.CATEGORY_NAME, function () {
8153 return validateDatapoint(getAnfCartCategoryName(), 'string'); 8154 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.ESTIMATED_DELIVERY, function () { 8155 return validateDatapoint(getEstimatedDeliveryDateVisibility(), 'string'); 8156 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.RANGE_FIRST_DATE, function () { 8157 return validateDatapoint(getAmountOfDaysUntilCurrentDate(window.digitalData.get('cart.data.shippingSpeed[0].minEstimatedDeliveryDate')), 'number'); 8158 }), _defineProperty(_EVENT_NAME$VIEW$CHEC, DATA_POINT.RANGE_LAST_DATE, function () { 8159 return validateDatapoint(getAmountOfDaysUntilCurrentDate(window.digitalData.get('cart.data.shippingSpeed[0].maxEstimatedDeliveryDate')), 'number'); 8160 }), _EVENT_NAME$VIEW$CHEC)), _defineProperty(_ref6, EVENT_NAME.VIEW.ORDER_CONFIRMATION, (_EVENT_NAME$VIEW$ORDE = {}, _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.BRAND, function () { 8161 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('brandViewing')(), 'string'); 8162 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.COLLECTION_ID, function () { 8163 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('collectionId')(), 'string'); 8164 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.KEY_ITEM_COLOR, function () { 8165 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('keyItemColor')(), 'string'); 8166 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PRICE_LIST_LOCAL, function () { 8167 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('listPrice')(), 'string'); 8168 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PRICE_LIST_USD, function () { 8169 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('listPriceUSD')(), 'string'); 8170 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PRICE_OFFER_LOCAL, function () { 8171 return validateDatapoint(getCartItemsKeyData('price'), 'string', 'number'); 8172 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PRICE_OFFER_USD, function () { 8173 return dataPointEmptyValue; 8174 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.LONG_SKU, function () { 8175 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('productLongSku')(), 'string'); 8176 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.SHORT_SKU, function () { 8177 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('productShortSku')(), 'string'); 8178 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PRICE_FLAG, function () { 8179 return validateDatapoint(getListForKeyInNormalizedIndividualItemsFetcher('priceFlag')(), 'string'); 8180 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.QUANTITY, function () { 8181 return validateDatapoint(getCartItemsKeyData('quantity'), 'string', 'number'); 8182 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PRODUCT_ID, function () { 8183 return validateDatapoint(getCartItemsKeyData('productId'), 'string', 'number'); 8184 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.SHIPPING_FLAG, function () { 8185 return validateDatapoint(getFromCart('totals.shippingCharge')() ? '0' : '1', 'string', 'number'); 8186 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.SHIPPING_LOCAL, function () { 8187 return validateDatapoint(getFromCart('totals.shippingCharge')(), 'string', 'number'); 8188 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.SHIPPING_USD, function () { 8189 return validateDatapoint(getFromCart('totals.shippingChargeUSD')(), 'string', 'number'); 8190 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.SHIPPING_TYPE, function () { 8191 return validateDatapoint(getFromCart('shipMethod.externalId')(), 'string', 'number'); 8192 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.SMS_FLAG, function () { 8193 var _ANF21, _ANF21$models, _ANF21$models$cart; 8194 8195 return validateDatapoint((_ANF21 = ANF) === null || _ANF21 === void 0 ? void 0 : (_ANF21$models = _ANF21.models) === null || _ANF21$models === void 0 ? void 0 : (_ANF21$models$cart = _ANF21$models.cart) === null || _ANF21$models$cart === void 0 ? void 0 : _ANF21$models$cart.smsOptIn, 'boolean'); 8196 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.TAX, function () { 8197 return validateDatapoint(getFromCart('totals.estimatedTax')(), 'string', 'number'); 8198 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.VAT, function () { 8199 return validateDatapoint(getFromCart('totals.vatIncluded')(), 'boolean'); 8200 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.ORDER_ID, function () { 8201 return validateDatapoint(getFromCart('orderId')(), 'string', 'number'); 8202 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.SUB_TOTAL_LOCAL, function () { 8203 return validateDatapoint(getFromCart('totals.subTotal')(), 'string', 'number'); 8204 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.SUB_TOTAL_USD, function () { 8205 return validateDatapoint(getFromCart('totals.subTotalUSD')(), 'string', 'number'); 8206 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.TOTAL_LOCAL, function () { 8207 return validateDatapoint(getFromCart('totals.grandTotal')(), 'string', 'number'); 8208 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.TOTAL_USD, function () { 8209 return validateDatapoint(getFromCart('totals.grandTotalUSD')(), 'string', 'number'); 8210 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PAYMENT_METHOD, function () { 8211 return validateDatapoint(getPaymentMethod(), 'string'); 8212 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.ORDER_HASHED_EMAIL, function () { 8213 return getUserHashedEmail(); 8214 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_ID, function () { 8215 return getPromotionProperty('promotionCode'); 8216 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_COMP_ID, function () { 8217 return getPromotionProperty('promoCompId'); 8218 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_NAME, function () { 8219 return validateDatapoint(getCartAdjustmentsKeyData('promotionKey'), 'string'); 8220 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_QUANTITY, function () { 8221 var _ANF22, _ANF22$models, _ANF22$models$cart, _ANF22$models$cart$ad; 8222 8223 return validateDatapoint(((_ANF22 = ANF) === null || _ANF22 === void 0 ? void 0 : (_ANF22$models = _ANF22.models) === null || _ANF22$models === void 0 ? void 0 : (_ANF22$models$cart = _ANF22$models.cart) === null || _ANF22$models$cart === void 0 ? void 0 : (_ANF22$models$cart$ad = _ANF22$models$cart.adjustments) === null || _ANF22$models$cart$ad === void 0 ? void 0 : _ANF22$models$cart$ad.length) || dataPointEmptyValue, 'string', 'number'); 8224 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_AMOUNT, function () { 8225 return validateDatapoint(getCartAdjustmentsKeyData('amount'), 'string'); 8226 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_TOTAL_LOCAL, function () { 8227 var _ANF23, _ANF23$models, _ANF23$models$cart, _ANF23$models$cart$ad; 8228 8229 return validateDatapoint((_ANF23 = ANF) !== null && _ANF23 !== void 0 && (_ANF23$models = _ANF23.models) !== null && _ANF23$models !== void 0 && (_ANF23$models$cart = _ANF23$models.cart) !== null && _ANF23$models$cart !== void 0 && (_ANF23$models$cart$ad = _ANF23$models$cart.adjustments) !== null && _ANF23$models$cart$ad !== void 0 && _ANF23$models$cart$ad.length ? getFromCart('totals.totalAdjustment')() : dataPointEmptyValue, 'number', 'string'); 8230 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_TOTAL_USD, function () { 8231 var _ANF24, _ANF24$models, _ANF24$models$cart, _ANF24$models$cart$ad; 8232 8233 return validateDatapoint((_ANF24 = ANF) !== null && _ANF24 !== void 0 && (_ANF24$models = _ANF24.models) !== null && _ANF24$models !== void 0 && (_ANF24$models$cart = _ANF24$models.cart) !== null && _ANF24$models$cart !== void 0 && (_ANF24$models$cart$ad = _ANF24$models$cart.adjustments) !== null && _ANF24$models$cart$ad !== void 0 && _ANF24$models$cart$ad.length ? getFromCart('totals.totalAdjustmentUSD')() : dataPointEmptyValue, 'number', 'string'); 8234 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_FLAG_IMPLICIT, function () { 8235 return validateDatapoint(hasPromotionType('isImplicitPromo'), 'boolean'); 8236 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_FLAG_LOYALTY, function () { 8237 return validateDatapoint(hasPromotionType('isRewardPromo'), 'boolean'); 8238 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PROMOTION_FLAG_FREESHIPPING, function () { 8239 return validateDatapoint(hasPromotionType('isShippingPromo'), 'boolean'); 8240 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.PRODUCT_NAME, function () { 8241 return validateDatapoint(getCartItemsKeyData('productName'), 'string'); 8242 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.CATEGORY_NAME, function () {
8243 return validateDatapoint(getAnfCartCategoryName(), 'string'); 8244 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.SHORT_DESCRIPTOR, function () { 8245 return validateDatapoint(getMultipleProductsShortDescriptor(), 'string'); 8246 }), _defineProperty(_EVENT_NAME$VIEW$ORDE, DATA_POINT.ORDER_BILLING_POSTAL_CODE, function () { 8247 return validateDatapoint(getFromCart('shippingAddress.postalCode')(), 'string', 'number'); 8248 }), _EVENT_NAME$VIEW$ORDE)), _defineProperty(_ref6, EVENT_NAME.VIEW.PDP, (_EVENT_NAME$VIEW$PDP = {}, _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.COLLECTION_ID, function () { 8249 return validateDatapoint(getFromProductCatalogForProduct('collection')(), 'string', 'number'); 8250 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.CATEGORY_ID, function () { 8251 return validateDatapoint(getCategoryId(), 'string', 'number'); 8252 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.BRAND, function () { 8253 return validateDatapoint(getFromProductCatalogForProduct('productAttrs.brand')(), 'string'); 8254 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.INVENTORY, function () { 8255 return validateDatapoint(getInventory(), 'string', 'number'); 8256 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRODUCT_NAME, function () { 8257 return validateDatapoint(getFromProductCatalogForProduct('name')(), 'string'); 8258 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PAGE_DESCRIPTION, function () { 8259 return validateDatapoint(getFromProductCatalogForProduct('name')(), 'string'); 8260 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.KEY_ITEM_COLOR, function () { 8261 return validateDatapoint(getFromProductCatalogForProduct('kicId')(), 'string'); 8262 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.LONG_SKU, function () { 8263 var _document$querySelect4; 8264 8265 return validateDatapoint((_document$querySelect4 = document.querySelector('.js-product-page')) === null || _document$querySelect4 === void 0 ? void 0 : _document$querySelect4.getAttribute('data-long-sku'), 'string'); 8266 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRICE_FLAG, function () { 8267 return validateDatapoint(getFromProductCatalogForProduct('priceFlag')(), 'string', 'number'); 8268 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRICE_LIST_LOCAL, function () { 8269 return validateDatapoint(getFromFirstProduct('listPrice')(), 'string', 'number'); 8270 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRICE_LIST_USD, function () { 8271 return validateDatapoint(getFromFirstProduct('listPriceUSD')(), 'string', 'number'); 8272 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRICE_OFFER_LOCAL, function () { 8273 return validateDatapoint(getPriceOfferLocal(), 'string', 'number'); 8274 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRICE_OFFER_USD, dataPointEmptyValue), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRODUCT_GROUP, function () { 8275 return validateDatapoint(wrapDigitalDataGet('pdp.productGroup')(), 'string'); 8276 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRODUCT_ID, function () { 8277 return validateDatapoint(getFromProductCatalogForProduct('productId')(), 'string', 'number'); 8278 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRODUCT_RATING, function () { 8279 var _ANF25, _ANF25$product; 8280 8281 return validateDatapoint(getProductRating((_ANF25 = ANF) === null || _ANF25 === void 0 ? void 0 : (_ANF25$product = _ANF25.product) === null || _ANF25$product === void 0 ? void 0 : _ANF25$product.data), 'string', 'number'); 8282 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.CATEGORY_NAME, function () { 8283 return validateDatapoint(getCatalogCategoryName(), 'string'); 8284 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.SWATCH_COLOR, function () { 8285 return validateDatapoint(wrapDigitalDataGet('product.data.sequence')(), 'string'); 8286 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.PRODUCT_BADGE, function () { 8287 return validateDatapoint(getProductBadge(), 'string'); 8288 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.GRID_PRODUCT_POSITION, function () { 8289 return validateDatapoint(getGridProductPosition(), 'string', 'number'); 8290 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.SHORT_DESCRIPTOR, function () { 8291 return validateDatapoint(getIndividualProductShortDescriptor(getFromProductCatalogForProduct('shortDesc1')(), getFromProductCatalogForProduct('shortDesc2')()), 'string'); 8292 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.SOLD_OUT_PDP, function () { 8293 return isSoldOutPdp(); 8294 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.DATA_TEXT, function () { 8295 return validateDatapoint(parameterHelper.getParameterValue('dataText')); 8296 }), _defineProperty(_EVENT_NAME$VIEW$PDP, DATA_POINT.DATA_ACTION, function () { 8297 return validateDatapoint(parameterHelper.getParameterValue('dataAction')); 8298 }), _EVENT_NAME$VIEW$PDP)), _defineProperty(_ref6, EVENT_NAME.ACTION.SWATCH_CLICK, (_EVENT_NAME$ACTION$SW = {}, _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.COLLECTION_ID, function () { 8299 return validateDatapoint(getFromProductCatalogForProduct('collection')(), 'string', 'number'); 8300 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.CATEGORY_ID, function () { 8301 return validateDatapoint(getCategoryId(), 'string', 'number'); 8302 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.BRAND, function () { 8303 return validateDatapoint(getFromProductCatalogForProduct('productAttrs.brand')(), 'string'); 8304 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PRODUCT_NAME, function () { 8305 return validateDatapoint(getFromProductCatalogForProduct('name')(), 'string'); 8306 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PAGE_DESCRIPTION, function () { 8307 return validateDatapoint(getFromProductCatalogForProduct('name')(), 'string'); 8308 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.KEY_ITEM_COLOR, function () { 8309 return validateDatapoint(getFromProductCatalogForProduct('kicId')(), 'string'); 8310 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.LONG_SKU, function () { 8311 var _document$querySelect5; 8312 8313 return validateDatapoint((_document$querySelect5 = document.querySelector('.js-product-page')) === null || _document$querySelect5 === void 0 ? void 0 : _document$querySelect5.getAttribute('data-long-sku'), 'string'); 8314 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PRICE_FLAG, function () { 8315 return validateDatapoint(getFromProductCatalogForProduct('priceFlag')(), 'string', 'number'); 8316 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PRICE_LIST_LOCAL, function () { 8317 return validateDatapoint(getFromFirstProduct('listPrice')(), 'string', 'number'); 8318 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PRICE_LIST_USD, function () { 8319 return validateDatapoint(getFromFirstProduct('listPriceUSD')(), 'string', 'number'); 8320 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PRICE_OFFER_LOCAL, function () { 8321 return validateDatapoint(getPriceOfferLocal(), 'string', 'number'); 8322 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PRICE_OFFER_USD, dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PRODUCT_ID, function () { 8323 return validateDatapoint(getFromProductCatalogForProduct('productId')(), 'string', 'number'); 8324 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PRODUCT_RATING, function () { 8325 var _ANF26, _ANF26$product; 8326 8327 return validateDatapoint(getProductRating((_ANF26 = ANF) === null || _ANF26 === void 0 ? void 0 : (_ANF26$product = _ANF26.product) === null || _ANF26$product === void 0 ? void 0 : _ANF26$product.data), 'string', 'number'); 8328 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.CATEGORY_NAME, function () { 8329 return validateDatapoint(getCatalogCategoryName(), 'string'); 8330 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.SWATCH_COLOR, function () { 8331 return validateDatapoint(wrapDigitalDataGet('product.data.sequence')(), 'string'); 8332 }), _defineProperty(_EVENT_NAME$ACTION$SW, DATA_POINT.PRODUCT_BADGE, function () { 8333 return validateDatapoint(getProductBadge(), 'string'); 8334 }), _EVENT_NAME$ACTION$SW)), _defineProperty(_ref6, EVENT_NAME.VIEW.QUICK_VIEW, (_EVENT_NAME$VIEW$QUIC = {}, _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.COLLECTION_ID, function () { 8335 return validateDatapoint(getFromProductCatalogForProduct('collection')(), 'string', 'number'); 8336 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.CATEGORY_ID, function () { 8337 return validateDatapoint(getCategoryId(), 'string', 'number'); 8338 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.BRAND, function () { 8339 return validateDatapoint(getFromProductCatalogForProduct('productAttrs.brand')(), 'string'); 8340 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.KEY_ITEM_COLOR, function () { 8341 return validateDatapoint(getFromProductCatalogForProduct('kicId')(), 'string'); 8342 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.LONG_SKU, function () { 8343 var _document$querySelect6; 8344 8345 return validateDatapoint((_document$querySelect6 = document.querySelector('.active-product')) === null || _document$querySelect6 === void 0 ? void 0 : _document$querySelect6.getAttribute('data-long-sku'), 'string'); 8346 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRICE_FLAG, function () { 8347 return validateDatapoint(getFromProductCatalogForProduct('priceFlag')(), 'string', 'number'); 8348 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRICE_LIST_LOCAL, function () { 8349 return validateDatapoint(getFromFirstProduct('listPrice')(), 'string', 'number'); 8350 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRICE_LIST_USD, function () { 8351 return validateDatapoint(getFromFirstProduct('listPriceUSD')(), 'string', 'number'); 8352 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRICE_OFFER_LOCAL, function () { 8353 return validateDatapoint(getPriceOfferLocal(), 'string', 'number'); 8354 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRICE_OFFER_USD, dataPointEmptyValue), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRODUCT_ID, function () { 8355 return validateDatapoint(getFromProductCatalogForProduct('productId')(), 'string', 'number'); 8356 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.INVENTORY, function () { 8357 return validateDatapoint(getInventory(), 'string', 'number'); 8358 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRODUCT_RATING, function () { 8359 var _ANF27, _ANF27$product; 8360 8361 return validateDatapoint(getProductRating((_ANF27 = ANF) === null || _ANF27 === void 0 ? void 0 : (_ANF27$product = _ANF27.product) === null || _ANF27$product === void 0 ? void 0 : _ANF27$product.data), 'string', 'number'); 8362 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.RCS_ID, function () { 8363 return validateDatapoint(wrapDigitalDataGet('algonomy.onClick.rcs')() || wrapDigitalDataGet('algonomy.onLoad.rcs')(), 'string', 'number'); 8364 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.RECOMMENDATIONS, function () { 8365 return validateDatapoint(getRecommendationsValues(), 'string', 'number'); 8366 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRODUCT_RECOMMENDATION_POSITION, function () { 8367 return validateDatapoint(getRecommendationsItems('algonomy.onClick.position'), 'string', 'number'); 8368 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRODUCT_RECOMMENDATION_PLACEMENT, function () { 8369 return validateDatapoint(getRecommendationsItems('algonomy.onClick.placement'), 'string', 'number'); 8370 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.GRID_PRODUCT_POSITION, function () { 8371 return validateDatapoint(getGridProductPosition(), 'string', 'number'); 8372 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.SHORT_DESCRIPTOR, function () { 8373 return validateDatapoint(getIndividualProductShortDescriptor(getFromProductCatalogForProduct('shortDesc1')(), getFromProductCatalogForProduct('shortDesc2')()), 'string'); 8374 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.PRODUCT_BADGE, function () { 8375 return validateDatapoint(getProductBadge(), 'string'); 8376 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.DATA_TEXT, function () { 8377 return validateDatapoint(wrapDigitalDataGet('product.dataText')()); 8378 }), _defineProperty(_EVENT_NAME$VIEW$QUIC, DATA_POINT.DATA_ACTION, function () { 8379 return validateDatapoint(wrapDigitalDataGet('product.dataAction')()); 8380 }), _EVENT_NAME$VIEW$QUIC)), _defineProperty(_ref6, EVENT_NAME.VIEW.CATEGORY, (_EVENT_NAME$VIEW$CATE = {}, _defineProperty(_EVENT_NAME$VIEW$CATE, DATA_POINT.CATEGORY_ID, function () { 8381 return validateDatapoint(getCategoryId(), 'string', 'number'); 8382 }), _defineProperty(_EVENT_NAME$VIEW$CATE, DATA_POINT.CATEGORY_NAME, function () { 8383 return validateDatapoint(getCatalogCategoryName(), 'string'); 8384 }), _defineProperty(_EVENT_NAME$VIEW$CATE, DATA_POINT.PAGE_DESCRIPTION, function () { 8385 return validateDatapoint(getPageDescription(), 'string'); 8386 }), _EVENT_NAME$VIEW$CATE)), _defineProperty(_ref6, EVENT_NAME.VIEW.SEARCH, (_EVENT_NAME$VIEW$SEAR = {}, _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.PAGE_DESCRIPTION, function () { 8387 return validateDatapoint(getCatalogCategoryName(), 'string'); 8388 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.SEARCH_TERM, function () { 8389 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.search_term')(), 'string'); 8390 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.SEARCH_BAR_SUGGESTION, function () { 8391 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.search_bar_suggestion')(), 'string'); 8392 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.SEARCH_BAR_CATEGORY, function () { 8393 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.search_bar_category')(), 'string'); 8394 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.SEARCH_RESULTS, function () { 8395 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.search_results')(), 'string', 'number'); 8396 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.SEARCH_CORRECTED_SEARCH_TERM, function () { 8397 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.search_corrected_search_term')(), 'string'); 8398 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.DATA_ACTION, function () { 8399 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.data_action')(), 'string', 'number'); 8400 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.DATA_TEXT, function () { 8401 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.data_text')(), 'string'); 8402 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.PRODUCT_RECOMMENDATION_POSITION, function () { 8403 return validateDatapoint(getSearchProductRecommendationPosition(), 'string', 'number'); 8404 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.PRODUCT_RECOMMENDATION_PLACEMENT, function () { 8405 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.precPla')() || parameterHelper.getParameterValue('precPla'), 'string'); 8406 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, GLOBAL_DATA_POINT.PAGE_FINDING_METHOD, function () { 8407 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.pagefm')() || getPageFindingMethod(), 'string'); 8408 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.SEARCH_KIC, function () { 8409 var _getArrayOfKeyInItems2; 8410 8411 var products = wrapDigitalDataGet('search.products')(); 8412 if (!Array.isArray(products) || products.length === 0) return dataPointEmptyValue; 8413 return ((_getArrayOfKeyInItems2 = getArrayOfKeyInItems(products, 'kic')) === null || _getArrayOfKeyInItems2 === void 0 ? void 0 : _getArrayOfKeyInItems2.join(';')) || dataPointEmptyValue; 8414 }), _defineProperty(_EVENT_NAME$VIEW$SEAR, DATA_POINT.VERTEX_ATTRIBUTION_TOKEN, function () { 8415 return validateDatapoint(wrapDigitalDataGet('search.search_bar_used.search_attribution_token')(), 'string'); 8416 }), _EVENT_NAME$VIEW$SEAR)), _defineProperty(_ref6, EVENT_NAME.ACTION.ADD_TO_BAG, (_EVENT_NAME$ACTION$AD = {}, _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.PRODUCT_ID, function () { 8417 var _getProductId; 8418 8419 return (_getProductId = getProductId()) !== null && _getProductId !== void 0 ? _getProductId : dataPointEmptyValue; 8420 }), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.PRODUCT_QUANTITY, function () { 8421 var _getProductQuantity; 8422 8423 return (_getProductQuantity = getProductQuantity()) !== null && _getProductQuantity !== void 0 ? _getProductQuantity : dataPointEmptyValue;
8423 8424 }), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.PRODUCT_COLLECTION, (_getFromProductCatalo = getFromProductCatalogForProduct('collection')) !== null && _getFromProductCatalo !== void 0 ? _getFromProductCatalo : dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.PRICE_FLAG, (_getFromProductCatalo2 = getFromProductCatalogForProduct('priceFlag')) !== null && _getFromProductCatalo2 !== void 0 ? _getFromProductCatalo2 : dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.PRODUCT_NAME, (_getFromProductCatalo3 = getFromProductCatalogForProduct('name')) !== null && _getFromProductCatalo3 !== void 0 ? _getFromProductCatalo3 : dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.PRODUCT_BRAND, (_wrapDigitalDataGet = wrapDigitalDataGet('page.brand')) !== null && _wrapDigitalDataGet !== void 0 ? _wrapDigitalDataGet : dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.SHORT_SKU, (_getShortSku = getShortSku()) !== null && _getShortSku !== void 0 ? _getShortSku : dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.CATEGORY_ID, function () { 8425 var categoryId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getCategoryId(); 8426 return validateDatapoint(categoryId, 'string', 'number'); 8427 }), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.PRODUCT_RATING, function () { 8428 var _ANF28, _ANF28$product; 8429 8430 var productRating = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getProductRating((_ANF28 = ANF) === null || _ANF28 === void 0 ? void 0 : (_ANF28$product = _ANF28.product) === null || _ANF28$product === void 0 ? void 0 : _ANF28$product.data); 8431 return productRating !== null && productRating !== void 0 ? productRating : dataPointEmptyValue; 8432 }), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.CATEGORY_NAME, function () { 8433 return validateDatapoint(getCatalogCategoryName(), 'string'); 8434 }), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.STICKY_ATB, function () { 8435 return validateDatapoint(getStickyAtb(), 'boolean'); 8436 }), _defineProperty(_EVENT_NAME$ACTION$AD, DATA_POINT.SOCIAL_PROOFING, function () { 8437 var _validateDatapoint; 8438 8439 return (_validateDatapoint = validateDatapoint(wrapDigitalDataGet('product.afSource')() === 'social proofing', 'boolean')) !== null && _validateDatapoint !== void 0 ? _validateDatapoint : dataPointEmptyValue; 8440 }), _EVENT_NAME$ACTION$AD)), _defineProperty(_ref6, EVENT_NAME.ACTION.SAVE_FOR_LATER, (_EVENT_NAME$ACTION$SA = {}, _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.PRODUCT_ID, function () { 8441 var _getProductId2; 8442 8443 return (_getProductId2 = getProductId()) !== null && _getProductId2 !== void 0 ? _getProductId2 : dataPointEmptyValue; 8444 }), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.COLLECTION_ID, (_getFromProductCatalo4 = getFromProductCatalogForProduct('collection')) !== null && _getFromProductCatalo4 !== void 0 ? _getFromProductCatalo4 : dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.PRICE_FLAG, getFromProductCatalogForProduct('priceFlag')), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.PRODUCT_BRAND, (_wrapDigitalDataGet2 = wrapDigitalDataGet('page.brand')) !== null && _wrapDigitalDataGet2 !== void 0 ? _wrapDigitalDataGet2 : dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.SHORT_SKU, (_getShortSku2 = getShortSku()) !== null && _getShortSku2 !== void 0 ? _getShortSku2 : dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.CATEGORY_ID, function () { 8445 var _getCategoryId; 8446 8447 return (_getCategoryId = getCategoryId()) !== null && _getCategoryId !== void 0 ? _getCategoryId : dataPointEmptyValue; 8448 }), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.PRODUCT_RATING, function () { 8449 var _ANF29, _ANF29$product; 8450 8451 var productRating = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getProductRating((_ANF29 = ANF) === null || _ANF29 === void 0 ? void 0 : (_ANF29$product = _ANF29.product) === null || _ANF29$product === void 0 ? void 0 : _ANF29$product.data); 8452 return productRating !== null && productRating !== void 0 ? productRating : dataPointEmptyValue; 8453 }), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.INVENTORY, function () { 8454 return validateDatapoint(getInventory(), 'string', 'number'); 8455 }), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.KEY_ITEM_COLOR, function () { 8456 var _getFromProductCatalo5; 8457 8458 return (_getFromProductCatalo5 = getFromProductCatalogForProduct('kicId')()) !== null && _getFromProductCatalo5 !== void 0 ? _getFromProductCatalo5 : dataPointEmptyValue; 8459 }), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.PRICE_LIST_LOCAL, function () { 8460 var _getFromFirstProduct2; 8461 8462 return (_getFromFirstProduct2 = getFromFirstProduct('listPrice')()) !== null && _getFromFirstProduct2 !== void 0 ? _getFromFirstProduct2 : dataPointEmptyValue; 8463 }), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.PRICE_LIST_USD, function () { 8464 var _getFromFirstProduct3; 8465 8466 return (_getFromFirstProduct3 = getFromFirstProduct('listPriceUSD')()) !== null && _getFromFirstProduct3 !== void 0 ? _getFromFirstProduct3 : dataPointEmptyValue; 8467 }), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.PRICE_OFFER_LOCAL, function () { 8468 return validateDatapoint(getPriceOfferLocal(), 'string', 'number'); 8469 }), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.PRODUCT_NAME, function () { 8470 return validateDatapoint(getFromProductCatalogForProduct('name')(), 'string'); 8471 }), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.PRICE_OFFER_USD, dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$SA, DATA_POINT.LONG_SKU, function () { 8472 var _document$querySelect7; 8473 8474 return validateDatapoint((_document$querySelect7 = document.querySelector('.js-product-page')) === null || _document$querySelect7 === void 0 ? void 0 : _document$querySelect7.getAttribute('data-long-sku'), 'string'); 8475 }), _EVENT_NAME$ACTION$SA)), _defineProperty(_ref6, EVENT_NAME.ACTION.REMOVE_FROM_SAVES, (_EVENT_NAME$ACTION$RE = {}, _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.PRODUCT_ID, function () { 8476 return validateDatapoint(getProductId(), 'string', 'number'); 8477 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.COLLECTION_ID, function () { 8478 return validateDatapoint(getFromProductCatalogForProduct('collection')(), 'string'); 8479 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.PRICE_FLAG, function () { 8480 return validateDatapoint(getFromProductCatalogForProduct('priceFlag')(), 'string', 'number'); 8481 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.PRODUCT_BRA
8481ND, function () { 8482 return validateDatapoint(wrapDigitalDataGet('page.brand')(), 'string'); 8483 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.SHORT_SKU, function () { 8484 return validateDatapoint(getShortSku(), 'string', 'number'); 8485 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.CATEGORY_ID, function () { 8486 return validateDatapoint(getCategoryId(), 'string', 'number'); 8487 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.PRODUCT_RATING, function () { 8488 var _ANF30, _ANF30$product; 8489 8490 var productRating = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getProductRating((_ANF30 = ANF) === null || _ANF30 === void 0 ? void 0 : (_ANF30$product = _ANF30.product) === null || _ANF30$product === void 0 ? void 0 : _ANF30$product.data); 8491 return validateDatapoint(productRating, 'string', 'number'); 8492 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.INVENTORY, function () { 8493 return validateDatapoint(getInventory(), 'string', 'number'); 8494 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.KEY_ITEM_COLOR, function () { 8495 return validateDatapoint(getFromProductCatalogForProduct('kicId')(), 'string', 'number'); 8496 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.PRICE_LIST_LOCAL, function () { 8497 return validateDatapoint(getFromFirstProduct('listPrice')(), 'string', 'number'); 8498 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.PRICE_LIST_USD, function () { 8499 return validateDatapoint(getFromFirstProduct('listPriceUSD')(), 'string', 'number'); 8500 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.PRICE_OFFER_LOCAL, function () { 8501 return validateDatapoint(getPriceOfferLocal(), 'string', 'number'); 8502 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.PRODUCT_NAME, function () { 8503 return validateDatapoint(getFromProductCatalogForProduct('name')(), 'string'); 8504 }), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.PRICE_OFFER_USD, dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$RE, DATA_POINT.LONG_SKU, function () { 8505 var _document$querySelect8; 8506 8507 return validateDatapoint((_document$querySelect8 = document.querySelector('.js-product-page')) === null || _document$querySelect8 === void 0 ? void 0 : _document$querySelect8.getAttribute('data-long-sku'), 'string'); 8508 }), _EVENT_NAME$ACTION$RE)), _defineProperty(_ref6, EVENT_NAME.ACTION.REMOVE_FROM_BAG, (_EVENT_NAME$ACTION$RE2 = {}, _defineProperty(_EVENT_NAME$ACTION$RE2, DATA_POINT.WEB_STORE_ID, (_wrapDigitalDataGet3 = wrapDigitalDataGet('page.storeId')) !== null && _wrapDigitalDataGet3 !== void 0 ? _wrapDigitalDataGet3 : dataPointEmptyValue), _defineProperty(_EVENT_NAME$ACTION$RE2, DATA_POINT.CATEGORY_NAME, function () { 8509 return validateDatapoint(getAnfCartCategoryName(), 'string'); 8510 }), _EVENT_NAME$ACTION$RE2)), _defineProperty(_ref6, EVENT_NAME.ACTION.FILTER_APPLIED, (_EVENT_NAME$ACTION$FI = {}, _defineProperty(_EVENT_NAME$ACTION$FI, DATA_POINT.SEARCH_FILTER_APPLIED_CATEGORY, function () { 8511 return validateDatapoint(formatFilterEventValues('id', 'search_filter_applied_value_category'), 'string'); 8512 }), _defineProperty(_EVENT_NAME$ACTION$FI, DATA_POINT.SEARCH_FILTER_APPLIED_VALUE_NAME, function () { 8513 return validateDatapoint(formatFilterEventValues('description', 'search_filter_applied_value_name'), 'string'); 8514 }), _EVENT_NAME$ACTION$FI)), _defineProperty(_ref6, EVENT_NAME.ACTION.SORT_APPLIED, _defineProperty({}, DATA_POINT.SEARCH_SORT_VALUE, function () { 8515 var _ANF31, _ANF31$catalog, _ANF31$catalog$data, _ANF31$catalog$data$s; 8516 8517 return validateDatapoint((_ANF31 = ANF) === null || _ANF31 === void 0 ? void 0 : (_ANF31$catalog = _ANF31.catalog) === null || _ANF31$catalog === void 0 ? void 0 : (_ANF31$catalog$data = _ANF31$catalog.data) === null || _ANF31$catalog$data === void 0 ? void 0 : (_ANF31$catalog$data$s = _ANF31$catalog$data.selectedSort) === null || _ANF31$catalog$data$s === void 0 ? void 0 : _ANF31$catalog$data$s.sortOption, 'string'); 8518 })), _defineProperty(_ref6, EVENT_NAME.VIEW.MY_ACCOUNT, (_EVENT_NAME$VIEW$MY_A = {}, _defineProperty(_EVENT_NAME$VIEW$MY_A, DATA_POINT.LOYALTY_VIP_STATUS, function () { 8519 var _wrapDigitalDataGet4; 8520 8521 return (_wrapDigitalDataGet4 = wrapDigitalDataGet('user.loyalty.tier')()) !== null && _wrapDigitalDataGet4 !== void 0 ? _wrapDigitalDataGet4 : dataPointEmptyValue; 8522 }), _defineProperty(_EVENT_NAME$VIEW$MY_A, DATA_POINT.LOYALTY_POINTS, function () { 8523 var _wrapDigitalDataGet5; 8524 8525 return (_wrapDigitalDataGet5 = wrapDigitalDataGet('user.loyalty.points')()) !== null && _wrapDigitalDataGet5 !== void 0 ? _wrapDigitalDataGet5 : dataPointEmptyValue; 8526 }), _defineProperty(_EVENT_NAME$VIEW$MY_A, DATA_POINT.LOYALTY_TO_NEXT_REWARD, function () { 8527 var _wrapDigitalDataGet6; 8528 8529 return (_wrapDigitalDataGet6 = wrapDigitalDataGet('user.loyalty.nextReward')()) !== null && _wrapDigitalDataGet6 !== void 0 ? _wrapDigitalDataGet6 : dataPointEmptyValue; 8530 }), _defineProperty(_EVENT_NAME$VIEW$MY_A, DATA_POINT.LOYALTY_JOIN_DATE, function () { 8531 var _wrapDigitalDataGet7; 8532 8533 return (_wrapDigitalDataGet7 = wrapDigitalDataGet('user.loyalty.joinDate')()) !== null && _wrapDigitalDataGet7 !== void 0 ? _wrapDigitalDataGet7 : dataPointEmptyValue; 8534 }), _defineProperty(_EVENT_NAME$VIEW$MY_A, DATA_POINT.PAGE_DESCRIPTION, function () { 8535 return validateDatapoint(getPageDescription(), 'string'); 8536 }), _defineProperty(_EVENT_NAME$VIEW$MY_A, DATA_POINT.NUMBER_PROFILE_COMPLETE_FIELDS, function () { 8537 var _wrapDigitalDataGet8; 8538 8539 return (_wrapDigitalDataGet8 = wrapDigitalDataGet('user.profile.numberOfCompletedFields')()) !== null && _wrapDigitalDataGet8 !== void 0 ? _wrapDigitalDataGet8 : dataPointEmptyValue; 8540 }), _defineProperty(_EVENT_NAME$VIEW$MY_A, DATA_POINT.TOTAL_PROFILE_COMPLETE_FIELDS, function () { 8541 var _wrapDigitalDataGet9; 8542 8543 return (_wrapDigitalDataGet9 = wrapDigitalDataGet('user.profile.totalFields')()) !== null && _wrapDigitalDataGet9 !== void 0 ? _wrapDigitalDataGet9 : dataPointEmptyValue; 8544 }), _defineProperty(_EVENT_NAME$VIEW$MY_A, DATA_POINT.PROFILE_COMPLETE_FIELDS, function () { 8545 var _wrapDigitalDataGet10; 8546 8547 return (_wrapDigitalDataGet10 = wrapDigitalDataGet('user.profile.completedFields')()) !== null && _wrapDigitalDataGet10 !== void 0 ? _wrapDigitalDataGet10 : dataPointEmptyValue; 8548 }), _EVENT_NAME$VIEW$MY_A)), _defineProperty(_ref6, EVENT_NAME.VIEW.HELP, _defineProperty({}, DATA_POINT.PAGE_DESCRIPTION, function () { 8549 return validateDatapoint(getPageDescription(), 'string'); 8550 })), _defineProperty(_ref6, EVENT_NAME.VIEW.EXPERIENCE, _defineProperty({}, DATA_POINT.PAGE_DESCRIPTION, function () { 8551 return validateDatapoint(getPageDescription(), 'string'); 8552 })), _defineProperty(_ref6, EVENT_NAME.VIEW.MY_SAVES, _defineProperty({}, DATA_POINT.PRODUCT_NAME, function () { 8553 return validateDatapoint(getListOfValueAsString(getMySavesNamesList()), 'string'); 8554 })), _defineProperty(_ref6, EVENT_NAME.ACTION.LOGIN_SUCCESS, _defineProperty({}, DATA_POINT.KEEP_ME_LOGGED_IN_FLAG, function () { 8555 return getKeepMeLoggedInFlag(); 8556 })), _defineProperty(_ref6, EVENT_NAME.ACCOUNT_CREATE, _defineProperty({}, DATA_POINT.KEEP_ME_LOGGED_IN_FLAG, function () { 8557 return validateDatapoint(getKeepMeLoggedInFlag(), 'boolean'); 8558 })), _defineProperty(_ref6, EVENT_NAME.VIEW.ERROR, _defineProperty({}, DATA_POINT.PAGE_DESCRIPTION, function () { 8559 return validateDatapoint(getPageDescription(), 'string'); 8560 })), _ref6; 8561}); 8562 8563function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 8564 8565function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 8566 8567function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 8568 8569function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 8570 8571function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } 8572 8573function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 8574 8575function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 8576 8577function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 8578 8579/* eslint-env amd,es6 */ 8580redesign.define('util/analytics/pageFindingListeners',[], function pageFindingListeners() { 8581 'use strict'; 8582 8583 var _data, _data2, _data3, _data4, _data5, _data6, _data7, _data8, _data9, _data10, _data11, _data12, _data13, _data14, _data15, _data16, _data17, _data18, _data19, _data20, _data21, _data22, _data23, _data24, _data25, _data26, _data27, _data28, _data29, _data30, _data31, _data32, _data33; 8584 8585 var CONSTANTS = { 8586 FINDING_METHOD: 'findingMethod', 8587 PAGE_VIEW_METHOD: 'pageViewMethod', 8588 PRODUCT_VIEW_METHOD: 'productViewMethod' 8589 }; 8590 var findingMethodsMapping = [{ 8591 classes: '.product-page-v2 .js-quickview.is-stylitics div.view-full-product-wrapper > a', 8592 fatherElement: '.product-page-v2', 8593 methodName: 'recommendations-stylitics' 8594 }, { 8595 classes: '.shop-similar__container a', 8596 methodName: 'navigation-shop similar' 8597 }, { 8598 classes: '.category-view .catalog-productCard-module__product-image-section a, .category-view .catalog-productCard-module__product-content-link', 8599 fatherElement: '.category-view .product-grid-container', 8600 methodName: 'navigation-grid' 8601 }, { 8602 classes: '.js-quickview.is-recommendation-algonomy div.view-full-product-wrapper > a', 8603 fatherElement: '.globalV2', 8604 methodName: 'recommendations' 8605 }, { 8606 classes: '#list-menu-grid-nav__sub-cat-dropdown > li > a', 8607 methodName: 'navigation-category dropdown' 8608 }, { 8609 methodName: 'internal search', 8610 subscriptionName: 'analytics.search' 8611 }]; 8612 var containersMapping = [{ 8613 classes: '.stylitics-container-js .stylitics-card', 8614 classToBeAdded: 'is-stylitics', 8615 elementToListen: '.js-quickview', 8616 fatherElement: '.product-page-v2' 8617 }, {
8618 classes: '.js-recommendation-slider .js-product-card-wrapper', 8619 classToBeAdded: 'is-recommendation-algonomy', 8620 elementToListen: '.js-quickview', 8621 fatherElement: '.globalV2' 8622 }, { 8623 classes: '.catalog-similarModal-module__similarModal .js-product-card-wrapper, .catalog-similarModal-module__similarModal .catalog-similarModal-module__mobileCard', 8624 classToBeAdded: 'is-modal-similar', 8625 elementToListen: '.js-quickview', 8626 fatherElement: '.globalV2' 8627 }]; 8628 var multiMethodsMapping = [{ 8629 id: 'cart-edit', 8630 data: (_data = {}, _defineProperty(_data, CONSTANTS.FINDING_METHOD, 'navigation-edit'), _defineProperty(_data, CONSTANTS.PAGE_VIEW_METHOD, 'modal-quickview'), _defineProperty(_data, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-edit'), _data), 8631 classes: '.product-template-item .productcard .link-button', 8632 fatherElement: '.shopping-bag-mfe' 8633 }, { 8634 id: 'grid', 8635 data: (_data2 = {}, _defineProperty(_data2, CONSTANTS.FINDING_METHOD, 'navigation-grid'), _defineProperty(_data2, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data2, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-grid'), _data2), 8636 classes: '.category-view .catalog-productCard-module__product-image-section a, .category-view .catalog-productCard-module__product-content-link' 8637 }, { 8638 id: 'stylitics-quickview', 8639 data: (_data3 = {}, _defineProperty(_data3, CONSTANTS.FINDING_METHOD, 'recommendations-stylitics'), _defineProperty(_data3, CONSTANTS.PAGE_VIEW_METHOD, 'modal-quickview'), _defineProperty(_data3, CONSTANTS.PRODUCT_VIEW_METHOD, 'recommendations-stylitics'), _data3), 8640 classes: '.stylitics-main-container .js-quickview.product-page-v2-modules div.view-full-product-wrapper > a' 8641 }, { 8642 id: 'quick-view', 8643 data: (_data4 = {}, _defineProperty(_data4, CONSTANTS.FINDING_METHOD, 'navigation-quickview'), _defineProperty(_data4, CONSTANTS.PAGE_VIEW_METHOD, 'modal-quickview'), _defineProperty(_data4, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-quickview'), _data4), 8644 classes: '.catalog-productCard-module__quickview', 8645 fatherElement: '.product-grid__products' 8646 }, { 8647 id: 'logo-main', 8648 data: (_data5 = {}, _defineProperty(_data5, CONSTANTS.FINDING_METHOD, 'navigation-logo'), _defineProperty(_data5, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data5, CONSTANTS.PRODUCT_VIEW_METHOD, ''), _data5), 8649 classes: '.rs-nav__logo' 8650 }, { 8651 id: 'logo-sub', 8652 data: (_data6 = {}, _defineProperty(_data6, CONSTANTS.FINDING_METHOD, 'navigation-top nav'), _defineProperty(_data6, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data6, CONSTANTS.PRODUCT_VIEW_METHOD, ''), _data6), 8653 classes: '.catalog-BrandTabs-module__link' 8654 }, { 8655 id: 'category-swatch', 8656 data: (_data7 = {}, _defineProperty(_data7, CONSTANTS.FINDING_METHOD, 'navigation-swatch'), _defineProperty(_data7, CONSTANTS.PAGE_VIEW_METHOD, 'swatch'), _defineProperty(_data7, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-swatch'), _data7), 8657 classes: '.swatch-tile-group .swtg-input' 8658 }, { 8659 id: 'stylitics-product', 8660 data: (_data8 = {}, _defineProperty(_data8, CONSTANTS.FINDING_METHOD, 'recommendations-stylitics'), _defineProperty(_data8, CONSTANTS.PAGE_VIEW_METHOD, 'modal-quickview'), _defineProperty(_data8, CONSTANTS.PRODUCT_VIEW_METHOD, 'recommendations-stylitics'), _data8), 8661 classes: '.stylitics-card .stylitics-overlay-container .stylitics-overlay, .stylitics-overlay-container .stylitics-overlay', 8662 fatherElement: '.product-page-v2' 8663 }, { 8664 id: 'shop-similar', 8665 data: (_data9 = {}, _defineProperty(_data9, CONSTANTS.FINDING_METHOD, 'navigation-shop similar'), _defineProperty(_data9, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data9, CONSTANTS.PRODUCT_VIEW_METHOD, ''), _data9), 8666 classes: '.shop-similar__container a' 8667 }, { 8668 id: 'QV-shop-similar', 8669 data: (_data10 = {}, _defineProperty(_data10, CONSTANTS.FINDING_METHOD, 'navigation-shop similar'), _defineProperty(_data10, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data10, CONSTANTS.PRODUCT_VIEW_METHOD, ''), _data10), 8670 classes: '.js-quickview .shop-similar__container a', 8671 fatherElement: '.globalV2' 8672 }, { 8673 id: 'product-swatch', 8674 data: (_data11 = {}, _defineProperty(_data11, CONSTANTS.FINDING_METHOD, 'navigation-swatch'), _defineProperty(_data11, CONSTANTS.PAGE_VIEW_METHOD, 'swatch'), _defineProperty(_data11, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-swatch'), _data11), 8675 classes: '.product-swatch__attr input' 8676 }, { 8677 id: 'recommendations-qv-algonomy', 8678 data: (_data12 = {}, _defineProperty(_data12, CONSTANTS.FINDING_METHOD, 'blank'), _defineProperty(_data12, CONSTANTS.PAGE_VIEW_METHOD, 'recommendations'), _defineProperty(_data12, CONSTANTS.PRODUCT_VIEW_METHOD, 'recommendations-algonomy='), _data12),
8679 classes: '.js-recommendation-slider .js-product-card-wrapper, .recommendation-slider, .mfe-personalized-products-recs .catalog-productCard-module__productCard', 8680 fatherElement: '.globalV2' 8681 }, { 8682 id: 'personalized-recommendations-qv-algonomy', 8683 data: (_data13 = {}, _defineProperty(_data13, CONSTANTS.FINDING_METHOD, 'blank'), _defineProperty(_data13, CONSTANTS.PAGE_VIEW_METHOD, 'recommendations'), _defineProperty(_data13, CONSTANTS.PRODUCT_VIEW_METHOD, 'recommendations-algonomy='), _data13), 8684 classes: '.js-quickview .view-full-product-wrapper > a', 8685 fatherElement: '.globalV2', 8686 hasElementOnPage: '.mfe-personalized-products-recs' 8687 }, { 8688 id: 'recommendations-qv-swatch', 8689 data: (_data14 = {}, _defineProperty(_data14, CONSTANTS.FINDING_METHOD, 'blank'), _defineProperty(_data14, CONSTANTS.PAGE_VIEW_METHOD, 'swatch'), _defineProperty(_data14, CONSTANTS.PRODUCT_VIEW_METHOD, 'recommendations-algonomy='), _data14), 8690 classes: 'section.js-quickview.is-recommendation-algonomy ul.product-swatches .product-swatch__attr input', 8691 fatherElement: '.globalV2' 8692 }, { 8693 id: 'navigation-modal quick view', 8694 data: (_data15 = {}, _defineProperty(_data15, CONSTANTS.FINDING_METHOD, 'navigation-modal quickview'), _defineProperty(_data15, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data15, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-modal quickview'), _data15), 8695 classes: '.category-view .js-quickview div.view-full-product-wrapper > a', 8696 fatherElement: '.category-view' 8697 }, { 8698 id: 'navigation shop similar', 8699 data: (_data16 = {}, _defineProperty(_data16, CONSTANTS.FINDING_METHOD, 'shop similar'), _defineProperty(_data16, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data16, CONSTANTS.PRODUCT_VIEW_METHOD, 'shop similar'), _data16), 8700 classes: '.category-view .js-quickview.is-modal-similar div.view-full-product-wrapper > a', 8701 fatherElement: '.category-view' 8702 }, { 8703 id: 'quickview shop similar', 8704 data: (_data17 = {}, _defineProperty(_data17, CONSTANTS.FINDING_METHOD, 'shop similar'), _defineProperty(_data17, CONSTANTS.PAGE_VIEW_METHOD, 'modal-quickview'), _defineProperty(_data17, CONSTANTS.PRODUCT_VIEW_METHOD, 'shop similar'), _data17), 8705 classes: '.catalog-similarModal-module__similarModal .js-product-card-wrapper, .catalog-similarModal-module__similarModal .catalog-similarModal-module__mobileCard', 8706 fatherElement: '.category-view' 8707 }, { 8708 id: 'quickview shop similar search', 8709 data: (_data18 = {}, _defineProperty(_data18, CONSTANTS.FINDING_METHOD, 'shop similar'), _defineProperty(_data18, CONSTANTS.PAGE_VIEW_METHOD, 'modal-quickview'), _defineProperty(_data18, CONSTANTS.PRODUCT_VIEW_METHOD, 'shop similar'), _data18), 8710 classes: '.catalog-similarModal-module__similarModal .js-product-card-wrapper, .catalog-similarModal-module__similarModal .catalog-similarModal-module__mobileCard', 8711 fatherElement: '.search-view' 8712 }, { 8713 id: 'search to shop similar to quickview to pdp', 8714 data: (_data19 = {}, _defineProperty(_data19, CONSTANTS.FINDING_METHOD, 'shop similar'), _defineProperty(_data19, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data19, CONSTANTS.PRODUCT_VIEW_METHOD, 'shop similar'), _data19), 8715 classes: '.js-quickview.is-modal-similar .view-full-product-wrapper > a', 8716 fatherElement: '.search-view' 8717 }, { 8718 id: 'navigation quickview internal search', 8719 data: (_data20 = {}, _defineProperty(_data20, CONSTANTS.FINDING_METHOD, 'internal search'), _defineProperty(_data20, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data20, CONSTANTS.PRODUCT_VIEW_METHOD, 'internal search'), _data20), 8720 classes: '.js-quickview:not(.is-modal-similar) .view-full-product-wrapper > a', 8721 fatherElement: '.search-view' 8722 }, { 8723 id: 'navigation left', 8724 data: (_data21 = {}, _defineProperty(_data21, CONSTANTS.FINDING_METHOD, 'navigation-left nav'), _defineProperty(_data21, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _data21), 8725 classes: '.grid-left-rail__content .mfe-rail-navigation__list-item > a, .grid-left-rail__content .mfe-rail-navigation__list-item .mfe-rail-navigation__list-item-link--current', 8726 fatherElement: '.grid-content-wrap' 8727 }, { 8728 id: 'navigation left no father', 8729 data: (_data22 = {}, _defineProperty(_data22, CONSTANTS.FINDING_METHOD, 'navigation-left nav'), _defineProperty(_data22, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _data22), 8730 classes: '.grid-left-rail__content .mfe-rail-navigation__list-item > a, .grid-left-rail__content .mfe-rail-navigation__list-item .mfe-rail-navigation__list-item-link--current' 8731 }, { 8732 id: 'navigation ugc widget', 8733 data: (_data23 = {}, _defineProperty(_data23, CONSTANTS.FINDING_METHOD, 'ugc-widget'), _defineProperty(_data23, CONSTANTS.PRODUCT_VIEW_METHOD, 'ugc-widget'), _defineProperty(_data23, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _data23), 8734 classes: '.dh-widget-container .ls-detail-link-box > a', 8735 fatherElement: '.home.brand-hol' 8736 }, { 8737 id: 'navigation-breadcrumbs', 8738 data: (_data24 = {}, _defineProperty(_data24, CONSTANTS.FINDING_METHOD, 'navigation-breadcrumbs'), _defineProperty(_data24, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _data24), 8739 classes: '.breadcrumb li a, .breadcrumbs li a' 8740 }, { 8741 id: 'stylitics quickview to pdp', 8742 data: (_data25 = {}, _defineProperty(_data25, CONSTANTS.FINDING_METHOD, 'recommendations-stylitics'), _defineProperty(_data25, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data25, CONSTANTS.PRODUCT_VIEW_METHOD, 'recommendations-stylitics'), _data25), 8743 classes: 'section.js-quickview.is-stylitics div.view-full-product-wrapper', 8744 fatherElement: '.product-page-v2' 8745 }, { 8746 id: 'recommendations quickview to pdp', 8747 data: (_data26 = {}, _defineProperty(_data26, CONSTANTS.FINDING_METHOD, 'recommendations-other'), _defineProperty(_data26, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data26, CONSTANTS.PRODUCT_VIEW_METHOD, 'recommendations-other'), _data26), 8748 classes: 'section.js-quickview.is-recommendation-algonomy div.view-full-product-wrapper', 8749 fatherElement: '.product-page-v2' 8750 }, { 8751 id: 'footer', 8752 data: (_data27 = {}, _defineProperty(_data27, CONSTANTS.FINDING_METHOD, 'navigation-footer'), _defineProperty(_data27, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _data27), 8753 classes: 'footer a' 8754 }, { 8755 id: 'navigation left rail footer', 8756 data: (_data28 = {}, _defineProperty(_data28, CONSTANTS.FINDING_METHOD, 'navigation-left rail footer'), _defineProperty(_data28, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _data28), 8757 classes: 'nav.rs-nav .rs-nav__help-links a' 8758 }, { 8759 id: 'shop similar QV', 8760 data: (_data29 = {}, _defineProperty(_data29, CONSTANTS.FINDING_METHOD, ''), _defineProperty(_data29, CONSTANTS.PAGE_VIEW_METHOD, 'modal-shop similar'), _defineProperty(_data29, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-shop similar'), _data29), 8761 classes: '.pdp-grid-container:not(.hide) .product-grid__products .catalog-productCard-module__buttons button, .pdp-grid-container:not(.hide) .product-grid__products li', 8762 fatherElement: '.product-page-v2' 8763 }, { 8764 id: 'shop similar QV to pdp', 8765 data: (_data30 = {}, _defineProperty(_data30, CONSTANTS.FINDING_METHOD, 'shop similar'), _defineProperty(_data30, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data30, CONSTANTS.PRODUCT_VIEW_METHOD, 'shop similar'), _data30), 8766 classes: 'section.js-quickview:not(.is-recommendation-algonomy):not
8766(.is-stylitics) div.view-full-product-wrapper', 8767 fatherElement: '.product-page-v2' 8768 }, { 8769 id: 'QV-swatch-category', 8770 data: (_data31 = {}, _defineProperty(_data31, CONSTANTS.FINDING_METHOD, 'navigation-swatch'), _defineProperty(_data31, CONSTANTS.PAGE_VIEW_METHOD, 'modal-quickview'), _defineProperty(_data31, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-swatch'), _data31), 8771 classes: '.js-quickview ul.product-swatches .product-swatch__attr input', 8772 fatherElement: '.category-view' 8773 }, { 8774 id: 'QV-swatch-search', 8775 data: (_data32 = {}, _defineProperty(_data32, CONSTANTS.FINDING_METHOD, 'navigation-swatch'), _defineProperty(_data32, CONSTANTS.PAGE_VIEW_METHOD, 'modal-quickview'), _defineProperty(_data32, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-swatch'), _data32), 8776 classes: '.js-quickview ul.product-swatches .product-swatch__attr input', 8777 fatherElement: '.search-view' 8778 }, { 8779 id: 'cart-edit-QV-pdp', 8780 data: (_data33 = {}, _defineProperty(_data33, CONSTANTS.FINDING_METHOD, 'navigation-edit'), _defineProperty(_data33, CONSTANTS.PAGE_VIEW_METHOD, 'page load'), _defineProperty(_data33, CONSTANTS.PRODUCT_VIEW_METHOD, 'navigation-edit'), _data33), 8781 classes: 'section.js-quickview:not(.is-recommendation-algonomy):not(.is-stylitics) .view-full-product-wrapper > a', 8782 fatherElement: '.mfe-bag' 8783 }]; 8784 8785 var handleContainerObserver = function handleContainerObserver(container) { 8786 var shouldAddClass = false; 8787 var observer = new MutationObserver(function (mutationsList) { 8788 var _iterator = _createForOfIteratorHelper(mutationsList), 8789 _step; 8790 8791 try { 8792 for (_iterator.s(); !(_step = _iterator.n()).done;) { 8793 var mutation = _step.value; 8794 8795 if (mutation.type === 'childList') { 8796 if (mutation.addedNodes.length > 0) { 8797 var targetElements = _toConsumableArray(document.querySelectorAll(container.classes)); 8798 8799 var finalTargetElement = document.querySelector(container.elementToListen); 8800 8801 if (targetElements !== null && targetElements !== void 0 && targetElements.length) { 8802 // eslint-disable-next-line no-loop-func 8803 targetElements.forEach(function (item) { 8804 item.addEventListener('click', function () { 8805 shouldAddClass = true; 8806 }); 8807 }); 8808 } 8809 8810 if (!!finalTargetElement && shouldAddClass) { 8811 if (!finalTargetElement.classList.contains(container.classToBeAdded)) { 8812 finalTargetElement.classList.add(container.classToBeAdded); 8813 shouldAddClass = false; 8814 } 8815 } 8816 } 8817 } 8818 } 8819 } catch (err) { 8820 _iterator.e(err); 8821 } finally { 8822 _iterator.f(); 8823 } 8824 }); 8825 var elementToObserve = document.querySelector(container.fatherElement); 8826 8827 if (!!elementToObserve) { 8828 var observerOptions = { 8829 childList: true, 8830 subtree: true 8831 }; 8832 observer.observe(elementToObserve, observerOptions); 8833 } 8834 }; 8835 8836 var addContainerListeners = function addContainerListeners() { 8837 containersMapping.forEach(function (item) { 8838 handleContainerObserver(item); 8839 }); 8840 }; 8841 8842 var getRecommendationsValues = function getRecommendationsValues() { 8843 var _window$digitalData$g, _window, _window$digitalData; 8844 8845 var algonomyOnClickData = (_window$digitalData$g = (_window = window) === null || _window === void 0 ? void 0 : (_window$digitalData = _window.digitalData) === null || _window$digitalData === void 0 ? void 0 : _window$digitalData.get('algonomy.onClick')) !== null && _window$digitalData$g !== void 0 ? _window$digitalData$g : sessionStorage.getItem('algonomyOnClick'); 8846 var algonomyMvtTreatments = algonomyOnClickData === null || algonomyOnClickData === void 0 ? void 0 : algonomyOnClickData.mvtTreatments[0]; 8847 if (!algonomyMvtTreatments) return undefined; 8848 return ['recommendations', algonomyOnClickData === null || algonomyOnClickData === void 0 ? void 0 : algonomyOnClickData.strategyName, (algonomyMvtTreatments === null || algonomyMvtTreatments === void 0 ? void 0 : algonomyMvtTreatments.treatmentId) || ''].join('-'); 8849 }; 8850
8851 var handleItemClick = function handleItemClick(method) { 8852 return function () { 8853 var formattedMethodName; 8854 var recommendationValues; 8855 8856 switch (method.methodName) { 8857 case 'recommendations': 8858 recommendationValues = getRecommendationsValues(); 8859 formattedMethodName = "recommendations-algonomy=".concat(recommendationValues); 8860 sessionStorage.setItem([CONSTANTS.PRODUCT_VIEW_METHOD], formattedMethodName); 8861 sessionStorage.setItem([CONSTANTS.PAGE_VIEW_METHOD], formattedMethodName); 8862 sessionStorage.setItem('algonomyOnClick', recommendationValues); 8863 break; 8864 8865 default: 8866 formattedMethodName = method.methodName; 8867 } 8868 8869 sessionStorage.setItem('findingMethod', formattedMethodName); 8870 }; 8871 }; 8872 8873 var handleEligibleLinkClick = function handleEligibleLinkClick(element, method) { 8874 var hrefItem = element.getAttribute('href'); 8875 var isEligibleLink = (hrefItem === null || hrefItem === void 0 ? void 0 : hrefItem.includes(window.location.origin)) || !(hrefItem !== null && hrefItem !== void 0 && hrefItem.includes('//')); 8876 if (isEligibleLink) element.addEventListener('click', handleItemClick(method)); 8877 }; 8878 8879 var handleObserver = function handleObserver(method) { 8880 var observer = new MutationObserver(function (mutationsList) { 8881 var _iterator2 = _createForOfIteratorHelper(mutationsList), 8882 _step2; 8883 8884 try { 8885 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { 8886 var mutation = _step2.value; 8887 8888 if (mutation.type === 'childList') { 8889 if (mutation.addedNodes.length > 0) { 8890 var targetElements = _toConsumableArray(document.querySelectorAll(method.classes)); 8891 8892 if (targetElements !== null && targetElements !== void 0 && targetElements.length) { 8893 targetElements.forEach(function (item) { 8894 handleEligibleLinkClick(item, method); 8895 }); 8896 } 8897 } 8898 } 8899 } 8900 } catch (err) { 8901 _iterator2.e(err); 8902 } finally { 8903 _iterator2.f(); 8904 } 8905 }); 8906 var elementToObserve = document.querySelector(method.fatherElement); 8907 8908 if (!!elementToObserve) { 8909 var observerOptions = { 8910 childList: true, 8911 subtree: true 8912 }; 8913 observer.observe(elementToObserve, observerOptions); 8914 } 8915 }; 8916 8917 var handleMultiObserver = function handleMultiObserver(method) { 8918 var observer = new MutationObserver(function (mutationsList) { 8919 var _iterator3 = _createForOfIteratorHelper(mutationsList), 8920 _step3; 8921 8922 try { 8923 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { 8924 var mutation = _step3.value; 8925 8926 if (mutation.type === 'childList') { 8927 if (mutation.addedNodes.length > 0) { 8928 if (method.hasElementOnPage && !document.querySelector(method.hasElementOnPage)) return; 8929 8930 var targetElements = _toConsumableArray(document.querySelectorAll(method.classes)); 8931 8932 if (targetElements !== null && targetElements !== void 0 && targetElements.length) { 8933 targetElements.forEach(function (item) { 8934 item.addEventListener('click', function () { 8935 Object.keys(method.data).forEach(function (key) { 8936 sessionStorage.setItem(key, method.data[key]); 8937 8938 if (method.id === 'personalized-recommendations-qv-algonomy') { 8939 sessionStorage.setItem('algonomyOnClick', getRecommendationsValues()); 8940 } 8941 }); 8942 }); 8943 }); 8944 } 8945 } 8946 } 8947 } 8948 } catch (err) { 8949 _iterator3.e(err); 8950 } finally { 8951 _iterator3.f(); 8952 } 8953 }); 8954 var elementToObserve = document.querySelector(method.fatherElement); 8955 8956 if (!!elementToObserve) { 8957 var observerOptions = { 8958 childList: true, 8959 subtree: true 8960 }; 8961 observer.observe(elementToObserve, observerOptions); 8962 } 8963 }; 8964 8965 var handleEventSubscription = function handleEventSubscription(subscriptionName, methodName) { 8966 window.digitalData.subscribe("event:".concat(subscriptionName), function () { 8967 return sessionStorage.setItem('findingMethod', methodName); 8968 }); 8969 }; 8970 8971 var addListeners = function addListeners() { 8972 findingMethodsMapping.forEach(function (method) { 8973 if (method.fatherElement) { 8974 handleObserver(method); 8975 } else if (method.subscriptionName) { 8976 handleEventSubscription(method.subscriptionName, method.methodName); 8977 } else { 8978 var elements = _toConsumableArray(document.querySelectorAll(method.classes)); 8979
8980 elements.forEach(function (item) { 8981 handleEligibleLinkClick(item, method); 8982 }); 8983 } 8984 }); 8985 }; 8986 8987 var addMultiListeners = function addMultiListeners() { 8988 multiMethodsMapping.forEach(function (method) { 8989 if (method.fatherElement || method.isElementOnPage) { 8990 handleMultiObserver(method); 8991 } else if (method.subscriptionName) { 8992 handleEventSubscription(method.subscriptionName, method.methodName); 8993 } else { 8994 var elements = _toConsumableArray(document.querySelectorAll(method.classes)); 8995 8996 elements.forEach(function (item) { 8997 item.addEventListener('click', function () { 8998 Object.keys(method.data).forEach(function (key) { 8999 sessionStorage.setItem(key, method.data[key]); 9000 }); 9001 }); 9002 }); 9003 } 9004 }); 9005 }; 9006 /** 9007 * Add listeners for navigation links. 9008 * @returns {void} 9009 */ 9010 9011 9012 var addNavigationListeners = function addNavigationListeners() { 9013 var parentNavBar = document.getElementById('catalog-mfe-web-service-LargeScreenNavBarFrontEnd'); 9014 if (!parentNavBar) return; 9015 var eventTypes = ['mousedown', 'touchstart', 'keydown']; 9016 var navigationLinks = '.nav .rs-nav-cat-menu, nav ul li, nav .rs-nav-accordion-item, .nav-bar-category-link, .category-link'; 9017 eventTypes.forEach(function (type) { 9018 return parentNavBar.addEventListener(type, function (event) { 9019 return event.target.closest(navigationLinks) && sessionStorage.setItem('findingMethod', 'navigation-main'); 9020 }); 9021 }); 9022 }; 9023 9024 return { 9025 handleItemClick: handleItemClick, 9026 addListeners: addListeners, 9027 addContainerListeners: addContainerListeners, 9028 addMultiListeners: addMultiListeners, 9029 addNavigationListeners: addNavigationListeners 9030 }; 9031}); 9032 9033/* eslint-env amd,es6 */ 9034redesign.define('util/analytics/eventListeners',[], function eventListeners() { 9035 'use strict'; 9036 9037 var CONSTANTS = { 9038 CART_ITEM_REMOVED: 'event:checkout.bag.cartItemRemoved', 9039 MINIBAG_CART_ITEM_REMOVED: 'event:miniBag.cartItemRemoved' 9040 }; 9041 var events = [{ 9042 eventToListen: CONSTANTS.CART_ITEM_REMOVED, 9043 eventToTrigger: 'analytics.remove_from_cart', 9044 specificProp: 'removeFromCart' 9045 }, { 9046 eventToListen: CONSTANTS.MINIBAG_CART_ITEM_REMOVED, 9047 eventToTrigger: 'analytics.remove_from_cart', 9048 specificProp: 'removeFromCart' 9049 }]; 9050 9051 var addListeners = function addListeners() { 9052 events.forEach(function (event) { 9053 window.digitalData.subscribe(event.eventToListen, function (_ref) { 9054 var data = _ref.data; 9055 9056 if (event.specificProp) { 9057 return window.digitalData.trigger(event.eventToTrigger, data[event.specificProp]); 9058 } 9059 9060 return window.digitalData.trigger(event.eventToTrigger, data); 9061 }); 9062 }); 9063 }; 9064 9065 return { 9066 addListeners: addListeners 9067 }; 9068}); 9069 9070/* eslint-env amd,es6 */ 9071 9072/** 9073 * @module productPositionAnalytics 9074 * @description Module for product position analytics 9075 * @returns {Object} The product position analytics module 9076 */ 9077redesign.define('util/analytics/product/position',[], function productPositionAnalytics() { 9078 'use strict'; // The parent elements to watch for changes 9079 9080 var parentElements = ['#catalog-mfe-web-service-SearchResultsPageFrontEnd', '#catalog-mfe-web-service-SearchPageFrontEnd', '#catalog-mfe-web-service-CategoryPageFrontEnd', '#anf-TheWeddingShop']; 9081 var productCardModule = 'catalog-productCard-module__productCard'; 9082 var eventTypes = ['mousedown', 'touchstart', 'keydown']; 9083 /** 9084 * @function getPosition 9085 * @description Get the position of the clicked product 9086 * @param {Event} event The event that triggered the function 9087 * @param {HTMLElement} parentElementSelector The parent element of the product grid 9088 * @param {NodeList} products The product cards 9089 * @returns {undefined} Nothing 9090 */ 9091 9092 var getPosition = function getPosition(event, parentElementSelector) { 9093 var targetElement = event.target; // Traverse up the DOM until we find a product card (accounting for elements that may be a child of the product card) 9094 9095 while (targetElement && !targetElement.classList.contains(productCardModule)) { 9096 // If we've reached the parent element, return 9097 if (targetElement === parentElementSelector) return; 9098 targetElement = targetElement.parentElement; 9099 } // Get the product cards 9100 9101 9102 var products = parentElementSelector.querySelectorAll(".".concat(productCardModule)); 9103 if (!products.length) return; // Get the position of the clicked product 9104 9105 var position = Array.from(products).indexOf(targetElement) + 1; // Set the product position in session storage 9106 9107 window.sessionStorage.setItem('grid-product-position', position); 9108 }; 9109 /** 9110 * @function addListener 9111 * @description Add the product position analytics to the product grid 9112 * @returns {undefined} Nothing 9113 */ 9114 9115 9116 var addListener = function addListener() {
9117 parentElements.forEach(function (parentElement) { 9118 // Get the parent element 9119 var parentElementSelector = document.querySelector(parentElement); 9120 if (!parentElementSelector) return; // Get the product grid 9121 9122 var productGrid = parentElementSelector.querySelector('.product-grid__products'); 9123 if (!productGrid) return; 9124 eventTypes.forEach(function (eventType) { 9125 parentElementSelector.addEventListener(eventType, function (event) { 9126 getPosition(event, parentElementSelector); 9127 }); 9128 }); 9129 }); 9130 }; 9131 /** 9132 * @function init 9133 * @description Initialize the product position analytics module 9134 * @returns {undefined} Nothing 9135 */ 9136 9137 9138 var init = function init() { 9139 return document.readyState === 'complete' ? addListener() : window.addEventListener('load', addListener); 9140 }; 9141 9142 return { 9143 init: init 9144 }; 9145}); 9146 9147function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 9148 9149function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 9150 9151function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 9152 9153function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 9154 9155function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 9156 9157function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 9158 9159function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } 9160 9161function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } 9162 9163function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 9164 9165/* eslint-env amd,es6 */ 9166redesign.define('util/analytics/event',['util/analytics/adapter', 'util/analytics/event/index', 'util/analytics/predefinedFetchers', 'util/analytics/pageFindingListeners', 'util/analytics/eventListeners', 'util/analytics/pageLoadEventHandler', 'util/analytics/product/position', 'anfUtil/constants'], function analyticsEventBinding(analyticsAdapter, events, predefinedFetchers, pageFindingListeners, eventListeners, pageLoadEventHandler, productPositionAnalytics, constants) { 9167 'use strict'; 9168 /** 9169 * Complete the getAnalyticsSubscriptionHandler partial applications 9170 * @callback analyticsSubscriptionHandler 9171 * @private 9172 * @param {object} subject the passed in values from the subscription 9173 * @param {object} subject.data the data from teh subscription event 9174 * @param {object<DATA_POINT, any>} [subject.data.data = {}] the data point to value lookup 9175 * @param {object<DATA_POINT, function>} [subject.data.dataFetchers = {}] specialized fetchers for specific data points 9176 * @returns {any|undefined} the value from the object that was being searched for 9177 */ 9178 9179 /** 9180 * Determines if the current region is enabled for Algonomy analytics. 9181 * Checks if the site is US, CA, UK, or EU. 9182 * @private 9183 * @returns {boolean} True if Algonomy analytics is enabled for the region, otherwise false. 9184 */ 9185 9186 var isAlgonomyEnabledRegion = function isAlgonomyEnabledRegion() { 9187 return constants.anf('params.storeAttributes.siteList.isUSSite') || constants.anf('params.storeAttributes.siteList.isCASite') || constants.anf('params.storeAttributes.siteList.isUKSite') || constants.anf('params.storeAttributes.siteList.isEUSite'); 9188 }; 9189 /** Pairs where the CRS bridge skips dispatch when the flag is on (handled elsewhere). */ 9190 9191
9192 var skipSubscriptionWhenFlagOn = [{ 9193 subscriptionName: 'analytics.login_success', 9194 flagKey: 'flag.analytics-adapter-login-success' 9195 }, { 9196 subscriptionName: 'analytics.homepage', 9197 flagKey: 'flag.enable-homepage-and-category-analytics' 9198 }, { 9199 subscriptionName: 'analytics.product_detail', 9200 flagKey: 'flag.pdp-golden-state-pageload-event' 9201 }, { 9202 subscriptionName: 'analytics.my_account', 9203 flagKey: 'flag.enable-account-golden-state-analytics' 9204 }, { 9205 subscriptionName: 'search.search_loaded', 9206 flagKey: 'flag.enable-search-term-submitted-golden-state' 9207 }, { 9208 subscriptionName: 'analytics.checkout_delayed', 9209 flagKey: 'flag.chk-enable-golden-state-analytics-checkout' 9210 }, { 9211 subscriptionName: 'analytics.my_saves', 9212 flagKey: 'flag.chk-enable-golden-state-analytics-mylist' 9213 }]; 9214 /** 9215 * Partial app to map a config to an instance of and analytics call 9216 * @private 9217 * @param {object} config - configuration to bin to the analytics call 9218 * @returns {analyticsSubscriptionHandler} The actual analytics subscription handler 9219 */ 9220 // eslint-disable-next-line no-unused-vars 9221 9222 var getAnalyticsSubscriptionHandler = function getAnalyticsSubscriptionHandler(config) { 9223 return function (_ref) { 9224 var _predefinedFetchers$g, _predefinedFetchers$c; 9225 9226 var detail = _ref.detail; 9227 var configVersion = window.digitalData.get("flag.analytics_".concat(config.eventName, "_config_version"), 1); 9228 9229 var configData = _objectSpread(_objectSpread(_objectSpread({}, (_predefinedFetchers$g = predefinedFetchers.global) !== null && _predefinedFetchers$g !== void 0 ? _predefinedFetchers$g : {}), (_predefinedFetchers$c = predefinedFetchers[config.eventName]) !== null && _predefinedFetchers$c !== void 0 ? _predefinedFetchers$c : {}), detail !== null && detail !== void 0 ? detail : {}); 9230 9231 var sendEvent = function sendEvent() { 9232 analyticsAdapter.exec({ 9233 config: config, 9234 dataPoints: configData, 9235 useVersion: configVersion 9236 }); 9237 }; 9238 9239 if (config.eventName === 'quick_view' && isAlgonomyEnabledRegion()) { 9240 var subscription = window.digitalData.subscribe('algonomy.onClick', function () { 9241 sendEvent(); 9242 return function unsubscribe() { 9243 if (subscription && typeof subscription.unsubscribe === 'function') { 9244 subscription.unsubscribe(); 9245 } 9246 }; 9247 }).unsubscribe(); 9248 } else { 9249 // For non-quick_view events, just execute the event immediately 9250 sendEvent(); 9251 } 9252 }; 9253 }; 9254 9255 var subscriptions = []; 9256 9257 var init = function init() { 9258 var _subscriptions, _window2, _window2$digitalData, _window3, _window3$digitalData; 9259 9260 var reInitialize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; 9261 9262 /** 9263 * Short circuit if we are not reInitializing and there are already 9264 * subscription controllers 9265 */ 9266 if (!reInitialize && (_subscriptions = subscriptions) !== null && _subscriptions !== void 0 && _subscriptions.length) return; 9267 /** 9268 * Allow for things to be called multiple times yet only be bound once 9269 * 9270 * Wrapped the subscription.abort in a try...catch as a safety check just 9271 * in case a browser does not support it 9272 */ 9273 9274 subscriptions.forEach(function (subscription) { 9275 try { 9276 subscription.abort(); 9277 } catch (_unused) {// do nothing 9278 } 9279 }); // Page finding method listeners 9280 9281 pageFindingListeners.addContainerListeners(); // // Page finding method listeners 9282 9283 pageFindingListeners.addListeners(); // Add listeners for various data points 9284 9285 pageFindingListeners.addMultiListeners(); // Event listeners to retrigger 9286 9287 eventListeners.addListeners(); // Handler for page load events 9288 9289 if (window.digitalData.get('flag.analytics-crs-disable-algonomy-coupling') !== true) { 9290 pageLoadEventHandler.triggerPageLoadEventWithAlgonomy(); 9291 } // Product grid analytics 9292 9293 9294 productPositionAnalytics.init(); // Handler for main navigation link events 9295 9296 pageFindingListeners.addNavigationListeners(); 9297 /** 9298 * Set up the ability for teams to just trigger an even to the digitalData data bridge or
9299 * Dispatch a custom event on the window to capture event data for analytics. 9300 */ 9301 9302 subscriptions = [].concat(_toConsumableArray(Object.values(events.ACTION)), _toConsumableArray(Object.values(events.VIEW))).map(function (config) { 9303 var subscription = window.digitalData.subscribe("event:".concat(config.subscriptionName), function (_ref2) { 9304 var data = _ref2.data; 9305 var shouldSkipEvent = skipSubscriptionWhenFlagOn.some(function (_ref3) { 9306 var _window, _window$digitalData; 9307 9308 var subscriptionName = _ref3.subscriptionName, 9309 flagKey = _ref3.flagKey; 9310 return config.subscriptionName === subscriptionName && ((_window = window) === null || _window === void 0 ? void 0 : (_window$digitalData = _window.digitalData) === null || _window$digitalData === void 0 ? void 0 : _window$digitalData.get(flagKey)) === true; 9311 }); 9312 if (shouldSkipEvent) return; 9313 window.dispatchEvent(new CustomEvent(config.subscriptionName, { 9314 detail: data 9315 })); 9316 }); 9317 /** 9318 * Create a controller that allows us to remove (though abort) the analytics event listeners. 9319 * See https://developer.mozilla.org/en-US/docs/Web/API/AbortController for more information on AbortControllers 9320 */ 9321 9322 var abortController = new AbortController(); 9323 var signal = abortController.signal; // Set up so that when the event is aborted it also cleans up the subscription on the dataBridge. 9324 9325 signal.addEventListener('abort', function () { 9326 return subscription.unsubscribe(); 9327 }); 9328 window.addEventListener(config.subscriptionName, getAnalyticsSubscriptionHandler(config), { 9329 signal: signal, 9330 passive: true 9331 }); 9332 return abortController; 9333 }); 9334 (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$digitalData = _window2.digitalData) === null || _window2$digitalData === void 0 ? void 0 : _window2$digitalData.trigger('crs-app.analytics-subscriptions-initialized'); 9335 (_window3 = window) === null || _window3 === void 0 ? void 0 : (_window3$digitalData = _window3.digitalData) === null || _window3$digitalData === void 0 ? void 0 : _window3$digitalData.set('analytics.isCrsAnalyticsReady', true); 9336 }; 9337 9338 return { 9339 init: init 9340 }; 9341}); 9342 9343 9344redesign.define('coreServices/tombstone',[],function () { 9345 'use strict'; 9346 9347 if (typeof window.tombstone !== 'function') { 9348 window.tombstone = function (key) { 9349 var sessionStorageName = 'imNotDeadYet'; 9350 try { 9351 var imNotDeadYet = sessionStorage.getItem(sessionStorageName); 9352 imNotDeadYet = typeof imNotDeadYet === 'string' ? imNotDeadYet : ''; 9353 9354 if (imNotDeadYet.indexOf(key) === -1) { 9355 imNotDeadYet += key + ';'; 9356 sessionStorage.setItem(sessionStorageName, imNotDeadYet); 9357 } 9358 } catch (e) { 9359 // no side effects allowed 9360 } 9361 }; 9362 } 9363 9364 return window.tombstone; 9365}); 9366 9367/*! 9368 * jQuery JavaScript Library v2.2.4 9369 * http://jquery.com/ 9370 * 9371 * Includes Sizzle.js 9372 * http://sizzlejs.com/ 9373 * 9374 * Copyright jQuery Foundation and other contributors 9375 * Released under the MIT license 9376 * http://jquery.org/license 9377 * 9378 * Date: 2016-05-20T17:23Z 9379 */ 9380 9381(function( global, factory ) { 9382 9383 if ( typeof module === "object" && typeof module.exports === "object" ) { 9384 // For CommonJS and CommonJS-like environments where a proper `window` 9385 // is present, execute the factory and get jQuery. 9386 // For environments that do not have a `window` with a `document` 9387 // (such as Node.js), expose a factory as module.exports. 9388 // This accentuates the need for the creation of a real `window`. 9389 // e.g. var jQuery = require("jquery")(window); 9390 // See ticket #14549 for more info. 9391 module.exports = global.document ? 9392 factory( global, true ) : 9393 function( w ) { 9394 if ( !w.document ) { 9395 throw new Error( "jQuery requires a window with a document" ); 9396 } 9397 return factory( w ); 9398 }; 9399 } else { 9400 factory( global ); 9401 } 9402 9403// Pass this if window is not defined yet 9404}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { 9405 9406// Support: Firefox 18+ 9407// Can't be in strict mode, several libs including ASP.NET trace 9408// the stack via arguments.caller.callee and Firefox dies if 9409// you try to trace through "use strict" call chains. (#13335) 9410//"use strict"; 9411var arr = []; 9412 9413var document = window.document; 9414 9415var slice = arr.slice; 9416 9417var concat = arr.concat; 9418 9419var push = arr.push; 9420 9421var indexOf = arr.indexOf; 9422 9423var class2type = {}; 9424 9425var toString = class2type.toString; 9426 9427var hasOwn = class2type.hasOwnProperty; 9428 9429var support = {}; 9430 9431 9432 9433var 9434 version = "2.2.4", 9435 9436 // Define a local copy of jQuery 9437 jQuery = function( selector, context ) { 9438 9439 // The jQuery object is actually just the init constructor 'enhanced' 9440 // Need init if jQuery is called (just allow error to be thrown if not included) 9441 return new jQuery.fn.init( selector, context ); 9442 }, 9443 9444 // Support: Android<4.1 9445 // Make sure we trim BOM and NBSP 9446 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, 9447 9448 // Matches dashed string for camelizing 9449 rmsPrefix = /^-ms-/, 9450 rdashAlpha = /-([\da-z])/gi, 9451 9452 // Used by jQuery.camelCase as callback to replace() 9453 fcamelCase = function( all, letter ) { 9454 return letter.toUpperCase(); 9455 }; 9456 9457jQuery.fn = jQuery.prototype = { 9458 9459 // The current version of jQuery being used 9460 jquery: version, 9461 9462 constructor: jQuery, 9463 9464 // Start with an empty selector 9465 selector: "", 9466 9467 // The default length of a jQuery object is 0 9468 length: 0, 9469 9470 toArray: function() { 9471 return slice.call( this ); 9472 }, 9473 9474 // Get the Nth element in the matched element set OR 9475 // Get the whole matched element set as a clean array 9476 get: function( num ) { 9477 return num != null ? 9478 9479 // Return just the one element from the set 9480 ( num < 0 ? this[ num + this.length ] : this[ num ] ) : 9481 9482 // Return all the elements in a clean array 9483 slice.call( this ); 9484 }, 9485 9486 // Take an array of elements and push it onto the stack 9487 // (returning the new matched element set) 9488 pushStack: function( elems ) { 9489 9490 // Build a new jQuery matched element set 9491 var ret = jQuery.merge( this.constructor(), elems ); 9492 9493 // Add the old object onto the stack (as a reference)
9494 ret.prevObject = this; 9495 ret.context = this.context; 9496 9497 // Return the newly-formed element set 9498 return ret; 9499 }, 9500 9501 // Execute a callback for every element in the matched set. 9502 each: function( callback ) { 9503 return jQuery.each( this, callback ); 9504 }, 9505 9506 map: function( callback ) { 9507 return this.pushStack( jQuery.map( this, function( elem, i ) { 9508 return callback.call( elem, i, elem ); 9509 } ) ); 9510 }, 9511 9512 slice: function() { 9513 return this.pushStack( slice.apply( this, arguments ) ); 9514 }, 9515 9516 first: function() { 9517 return this.eq( 0 ); 9518 }, 9519 9520 last: function() { 9521 return this.eq( -1 ); 9522 }, 9523 9524 eq: function( i ) { 9525 var len = this.length, 9526 j = +i + ( i < 0 ? len : 0 ); 9527 return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); 9528 }, 9529 9530 end: function() { 9531 return this.prevObject || this.constructor(); 9532 }, 9533 9534 // For internal use only. 9535 // Behaves like an Array's method, not like a jQuery method. 9536 push: push, 9537 sort: arr.sort, 9538 splice: arr.splice 9539}; 9540 9541jQuery.extend = jQuery.fn.extend = function() { 9542 var options, name, src, copy, copyIsArray, clone, 9543 target = arguments[ 0 ] || {}, 9544 i = 1, 9545 length = arguments.length, 9546 deep = false; 9547 9548 // Handle a deep copy situation 9549 if ( typeof target === "boolean" ) { 9550 deep = target; 9551 9552 // Skip the boolean and the target 9553 target = arguments[ i ] || {}; 9554 i++; 9555 } 9556 9557 // Handle case when target is a string or something (possible in deep copy) 9558 if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { 9559 target = {}; 9560 } 9561 9562 // Extend jQuery itself if only one argument is passed 9563 if ( i === length ) { 9564 target = this; 9565 i--; 9566 } 9567 9568 for ( ; i < length; i++ ) { 9569 9570 // Only deal with non-null/undefined values 9571 if ( ( options = arguments[ i ] ) != null ) { 9572 9573 // Extend the base object 9574 for ( name in options ) { 9575 src = target[ name ]; 9576 copy = options[ name ]; 9577 9578 // Prevent never-ending loop 9579 if ( target === copy ) { 9580 continue; 9581 } 9582 9583 // Recurse if we're merging plain objects or arrays 9584 if ( deep && copy && ( jQuery.isPlainObject( copy ) || 9585 ( copyIsArray = jQuery.isArray( copy ) ) ) ) { 9586 9587 if ( copyIsArray ) { 9588 copyIsArray = false; 9589 clone = src && jQuery.isArray( src ) ? src : []; 9590 9591 } else { 9592 clone = src && jQuery.isPlainObject( src ) ? src : {}; 9593 } 9594 9595 // Never move original objects, clone them 9596 target[ name ] = jQuery.extend( deep, clone, copy ); 9597 9598 // Don't bring in undefined values 9599 } else if ( copy !== undefined ) { 9600 target[ name ] = copy; 9601 } 9602 } 9603 } 9604 } 9605 9606 // Return the modified object 9607 return target; 9608}; 9609 9610jQuery.extend( { 9611 9612 // Unique for each copy of jQuery on the page 9613 expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 9614 9615 // Assume jQuery is ready without the ready module 9616 isReady: true, 9617 9618 error: function( msg ) { 9619 throw new Error( msg ); 9620 }, 9621 9622 noop: function() {}, 9623 9624 isFunction: function( obj ) { 9625 return jQuery.type( obj ) === "function"; 9626 }, 9627 9628 isArray: Array.isArray, 9629 9630 isWindow: function( obj ) { 9631 return obj != null && obj === obj.window; 9632 }, 9633 9634 isNumeric: function( obj ) { 9635 9636 // parseFloat NaNs numeric-cast false positives (null|true|false|"") 9637 // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 9638 // subtraction forces infinities to NaN 9639 // adding 1 corrects loss of precision from parseFloat (#15100) 9640 var realStringObj = obj && obj.toString(); 9641 return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; 9642 }, 9643 9644 isPlainObject: function( obj ) { 9645 var key; 9646 9647 // Not plain objects: 9648 // - Any object or value whose internal [[Class]] property is not "[object Object]" 9649 // - DOM nodes 9650 // - window 9651 if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { 9652 return false; 9653 } 9654 9655 // Not own constructor property must be Object 9656 if ( obj.constructor && 9657 !hasOwn.call( obj, "constructor" ) && 9658 !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) { 9659 return false; 9660 } 9661 9662 // Own properties are enumerated firstly, so to speed up, 9663 // if last one is own, then all properties are own 9664 for ( key in obj ) {} 9665 9666 return key === undefined || hasOwn.call( obj, key ); 9667 }, 9668 9669 isEmptyObject: function( obj ) { 9670 var name; 9671 for ( name in obj ) { 9672 return false;
9673 } 9674 return true; 9675 }, 9676 9677 type: function( obj ) { 9678 if ( obj == null ) { 9679 return obj + ""; 9680 } 9681 9682 // Support: Android<4.0, iOS<6 (functionish RegExp) 9683 return typeof obj === "object" || typeof obj === "function" ? 9684 class2type[ toString.call( obj ) ] || "object" : 9685 typeof obj; 9686 }, 9687 9688 // Evaluates a script in a global context 9689 globalEval: function( code ) { 9690 var script, 9691 indirect = eval; 9692 9693 code = jQuery.trim( code ); 9694 9695 if ( code ) { 9696 9697 // If the code includes a valid, prologue position 9698 // strict mode pragma, execute code by injecting a 9699 // script tag into the document. 9700 if ( code.indexOf( "use strict" ) === 1 ) { 9701 script = document.createElement( "script" ); 9702 script.text = code; 9703 document.head.appendChild( script ).parentNode.removeChild( script ); 9704 } else { 9705 9706 // Otherwise, avoid the DOM node creation, insertion 9707 // and removal by using an indirect global eval 9708 9709 indirect( code ); 9710 } 9711 } 9712 }, 9713 9714 // Convert dashed to camelCase; used by the css and data modules 9715 // Support: IE9-11+ 9716 // Microsoft forgot to hump their vendor prefix (#9572) 9717 camelCase: function( string ) { 9718 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 9719 }, 9720
vendor: 30,705 bytes, lines 9721-10830
9721 nodeName: function( elem, name ) { 9722 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 9723 }, 9724 9725 each: function( obj, callback ) { 9726 var length, i = 0; 9727 9728 if ( isArrayLike( obj ) ) { 9729 length = obj.length; 9730 for ( ; i < length; i++ ) { 9731 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 9732 break; 9733 } 9734 } 9735 } else { 9736 for ( i in obj ) { 9737 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 9738 break; 9739 } 9740 } 9741 } 9742 9743 return obj; 9744 }, 9745 9746 // Support: Android<4.1 9747 trim: function( text ) { 9748 return text == null ? 9749 "" : 9750 ( text + "" ).replace( rtrim, "" ); 9751 }, 9752 9753 // results is for internal usage only 9754 makeArray: function( arr, results ) { 9755 var ret = results || []; 9756 9757 if ( arr != null ) { 9758 if ( isArrayLike( Object( arr ) ) ) { 9759 jQuery.merge( ret, 9760 typeof arr === "string" ? 9761 [ arr ] : arr 9762 ); 9763 } else { 9764 push.call( ret, arr ); 9765 } 9766 } 9767 9768 return ret; 9769 }, 9770 9771 inArray: function( elem, arr, i ) { 9772 return arr == null ? -1 : indexOf.call( arr, elem, i ); 9773 }, 9774 9775 merge: function( first, second ) { 9776 var len = +second.length, 9777 j = 0, 9778 i = first.length; 9779 9780 for ( ; j < len; j++ ) { 9781 first[ i++ ] = second[ j ]; 9782 } 9783 9784 first.length = i; 9785 9786 return first; 9787 }, 9788 9789 grep: function( elems, callback, invert ) { 9790 var callbackInverse, 9791 matches = [], 9792 i = 0, 9793 length = elems.length, 9794 callbackExpect = !invert; 9795 9796 // Go through the array, only saving the items 9797 // that pass the validator function 9798 for ( ; i < length; i++ ) { 9799 callbackInverse = !callback( elems[ i ], i ); 9800 if ( callbackInverse !== callbackExpect ) { 9801 matches.push( elems[ i ] ); 9802 } 9803 } 9804 9805 return matches; 9806 }, 9807 9808 // arg is for internal usage only 9809 map: function( elems, callback, arg ) { 9810 var length, value, 9811 i = 0, 9812 ret = []; 9813 9814 // Go through the array, translating each of the items to their new values 9815 if ( isArrayLike( elems ) ) { 9816 length = elems.length; 9817 for ( ; i < length; i++ ) { 9818 value = callback( elems[ i ], i, arg ); 9819 9820 if ( value != null ) { 9821 ret.push( value ); 9822 } 9823 } 9824 9825 // Go through every key on the object, 9826 } else { 9827 for ( i in elems ) { 9828 value = callback( elems[ i ], i, arg ); 9829 9830 if ( value != null ) { 9831 ret.push( value ); 9832 } 9833 } 9834 } 9835 9836 // Flatten any nested arrays 9837 return concat.apply( [], ret ); 9838 }, 9839 9840 // A global GUID counter for objects 9841 guid: 1, 9842 9843 // Bind a function to a context, optionally partially applying any 9844 // arguments. 9845 proxy: function( fn, context ) { 9846 var tmp, args, proxy; 9847 9848 if ( typeof context === "string" ) { 9849 tmp = fn[ context ]; 9850 context = fn; 9851 fn = tmp; 9852 } 9853 9854 // Quick check to determine if target is callable, in the spec 9855 // this throws a TypeError, but we will just return undefined. 9856 if ( !jQuery.isFunction( fn ) ) { 9857 return undefined; 9858 } 9859 9860 // Simulated bind 9861 args = slice.call( arguments, 2 ); 9862 proxy = function() { 9863 return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); 9864 }; 9865 9866 // Set the guid of unique handler to the same of original handler, so it can be removed 9867 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 9868 9869 return proxy; 9870 }, 9871 9872 now: Date.now, 9873 9874 // jQuery.support is not used in Core but other projects attach their 9875 // properties to it so it needs to exist. 9876 support: support 9877} ); 9878 9879// JSHint would error on this code due to the Symbol not being defined in ES5. 9880// Defining this global in .jshintrc would create a danger of using the global 9881// unguarded in another place, it seems safer to just disable JSHint for these 9882// three lines. 9883/* jshint ignore: start */ 9884if ( typeof Symbol === "function" ) { 9885 jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; 9886} 9887/* jshint ignore: end */ 9888 9889// Populate the class2type map 9890jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 9891function( i, name ) { 9892 class2type[ "[object " + name + "]" ] = name.toLowerCase(); 9893} ); 9894 9895function isArrayLike( obj ) { 9896 9897 // Support: iOS 8.2 (not reproducible in simulator) 9898 // `in` check used to prevent JIT error (gh-2145) 9899 // hasOwn isn't used here due to false negatives 9900 // regarding Nodelist length in IE 9901 var length = !!obj && "length" in obj && obj.length, 9902 type = jQuery.type( obj ); 9903 9904 if ( type === "function" || jQuery.isWindow( obj ) ) { 9905 return false; 9906 } 9907 9908 return type === "array" || length === 0 || 9909 typeof length === "number" && length > 0 && ( length - 1 ) in obj; 9910} 9911var Sizzle = 9912/*! 9913 * Sizzle CSS Selector Engine v2.2.1 9914 * http://sizzlejs.com/ 9915 * 9916 * Copyright jQuery Foundation and other contributors 9917 * Released under the MIT license 9918 * http://jquery.org/license 9919 * 9920 * Date: 2015-10-17 9921 */ 9922(function( window ) { 9923 9924var i, 9925 support, 9926 Expr, 9927 getText, 9928 isXML, 9929 tokenize, 9930 compile, 9931 select, 9932 outermostContext, 9933 sortInput, 9934 hasDuplicate, 9935 9936 // Local document vars 9937 setDocument, 9938 document, 9939 docElem, 9940 documentIsHTML, 9941 rbuggyQSA, 9942 rbuggyMatches, 9943 matches, 9944 contains, 9945 9946 // Instance-specific data 9947 expando = "sizzle" + 1 * new Date(), 9948 preferredDoc = window.document, 9949 dirruns = 0, 9950 done = 0, 9951 classCache = createCache(), 9952 tokenCache = createCache(), 9953 compilerCache = createCache(), 9954 sortOrder = function( a, b ) { 9955 if ( a === b ) { 9956 hasDuplicate = true; 9957 } 9958 return 0; 9959 }, 9960 9961 // General-purpose constants 9962 MAX_NEGATIVE = 1 << 31, 9963 9964 // Instance methods 9965 hasOwn = ({}).hasOwnProperty, 9966 arr = [], 9967 pop = arr.pop, 9968 push_native = arr.push, 9969 push = arr.push, 9970 slice = arr.slice, 9971 // Use a stripped-down indexOf as it's faster than native 9972 // http://jsperf.com/thor-indexof-vs-for/5 9973 indexOf = function( list, elem ) { 9974 var i = 0, 9975 len = list.length; 9976 for ( ; i < len; i++ ) { 9977 if ( list[i] === elem ) { 9978 return i; 9979 } 9980 } 9981 return -1; 9982 }, 9983 9984 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", 9985 9986 // Regular expressions 9987 9988 // http://www.w3.org/TR/css3-selectors/#whitespace 9989 whitespace = "[\\x20\\t\\r\\n\\f]", 9990 9991 // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier 9992 identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", 9993 9994 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 9995 attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + 9996 // Operator (capture 2) 9997 "*([*^$|!~]?=)" + whitespace + 9998 // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" 9999 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + 10000 "*\\]", 10001 10002 pseudos = ":(" + identifier + ")(?:\\((" + 10003 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 10004 // 1. quoted (capture 3; capture 4 or capture 5) 10005 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + 10006 // 2. simple (capture 6) 10007 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + 10008 // 3. anything else (capture 2) 10009 ".*" + 10010 ")\\)|)", 10011 10012 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 10013 rwhitespace = new RegExp( whitespace + "+", "g" ), 10014 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), 10015 10016 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), 10017 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), 10018 10019 rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), 10020 10021 rpseudo = new RegExp( pseudos ), 10022 ridentifier = new RegExp( "^" + identifier + "$" ), 10023 10024 matchExpr = { 10025 "ID": new RegExp( "^#(" + identifier + ")" ), 10026 "CLASS": new RegExp( "^\\.(" + identifier + ")" ), 10027 "TAG": new RegExp( "^(" + identifier + "|[*])" ), 10028 "ATTR": new RegExp( "^" + attributes ), 10029 "PSEUDO": new RegExp( "^" + pseudos ), 10030 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + 10031 "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + 10032 "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), 10033 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), 10034 // For use in libraries implementing .is() 10035 // We use this for POS matching in `select` 10036 "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + 10037 whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) 10038 }, 10039 10040 rinputs = /^(?:input|select|textarea|button)$/i, 10041 rheader = /^h\d$/i, 10042 10043 rnative = /^[^{]+\{\s*\[native \w/, 10044 10045 // Easily-parseable/retrievable ID or TAG or CLASS selectors 10046 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 10047 10048 rsibling = /[+~]/, 10049 rescape = /'|\\/g, 10050 10051 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 10052 runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), 10053 funescape = function( _, escaped, escapedWhitespace ) { 10054 var high = "0x" + escaped - 0x10000; 10055 // NaN means non-codepoint 10056 // Support: Firefox<24 10057 // Workaround erroneous numeric interpretation of +"0x" 10058 return high !== high || escapedWhitespace ? 10059 escaped : 10060 high < 0 ? 10061 // BMP codepoint 10062 String.fromCharCode( high + 0x10000 ) : 10063 // Supplemental Plane codepoint (surrogate pair) 10064 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); 10065 }, 10066 10067 // Used for iframes 10068 // See setDocument() 10069 // Removing the function wrapper causes a "Permission Denied" 10070 // error in IE 10071 unloadHandler = function() { 10072 setDocument(); 10073 }; 10074 10075// Optimize for push.apply( _, NodeList ) 10076try { 10077 push.apply( 10078 (arr = slice.call( preferredDoc.childNodes )), 10079 preferredDoc.childNodes 10080 ); 10081 // Support: Android<4.0 10082 // Detect silently failing push.apply 10083 arr[ preferredDoc.childNodes.length ].nodeType; 10084} catch ( e ) { 10085 push = { apply: arr.length ? 10086 10087 // Leverage slice if possible 10088 function( target, els ) { 10089 push_native.apply( target, slice.call(els) ); 10090 } : 10091 10092 // Support: IE<9 10093 // Otherwise append directly 10094 function( target, els ) { 10095 var j = target.length, 10096 i = 0; 10097 // Can't trust NodeList.length 10098 while ( (target[j++] = els[i++]) ) {} 10099 target.length = j - 1; 10100 } 10101 }; 10102} 10103 10104function Sizzle( selector, context, results, seed ) { 10105 var m, i, elem, nid, nidselect, match, groups, newSelector, 10106 newContext = context && context.ownerDocument, 10107 10108 // nodeType defaults to 9, since context defaults to document 10109 nodeType = context ? context.nodeType : 9; 10110 10111 results = results || []; 10112 10113 // Return early from calls with invalid selector or context 10114 if ( typeof selector !== "string" || !selector || 10115 nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { 10116 10117 return results; 10118 } 10119 10120 // Try to shortcut find operations (as opposed to filters) in HTML documents 10121 if ( !seed ) { 10122 10123 if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { 10124 setDocument( context ); 10125 } 10126 context = context || document; 10127 10128 if ( documentIsHTML ) { 10129 10130 // If the selector is sufficiently simple, try using a "get*By*" DOM method 10131 // (excepting DocumentFragment context, where the methods don't exist) 10132 if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { 10133 10134 // ID selector 10135 if ( (m = match[1]) ) { 10136 10137 // Document context 10138 if ( nodeType === 9 ) { 10139 if ( (elem = context.getElementById( m )) ) { 10140 10141 // Support: IE, Opera, Webkit 10142 // TODO: identify versions 10143 // getElementById can match elements by name instead of ID 10144 if ( elem.id === m ) { 10145 results.push( elem ); 10146 return results; 10147 } 10148 } else { 10149 return results; 10150 } 10151 10152 // Element context 10153 } else { 10154 10155 // Support: IE, Opera, Webkit 10156 // TODO: identify versions 10157 // getElementById can match elements by name instead of ID 10158 if ( newContext && (elem = newContext.getElementById( m )) && 10159 contains( context, elem ) && 10160 elem.id === m ) { 10161 10162 results.push( elem ); 10163 return results; 10164 } 10165 } 10166 10167 // Type selector 10168 } else if ( match[2] ) { 10169 push.apply( results, context.getElementsByTagName( selector ) ); 10170 return results; 10171 10172 // Class selector 10173 } else if ( (m = match[3]) && support.getElementsByClassName && 10174 context.getElementsByClassName ) { 10175 10176 push.apply( results, context.getElementsByClassName( m ) ); 10177 return results; 10178 } 10179 } 10180 10181 // Take advantage of querySelectorAll 10182 if ( support.qsa && 10183 !compilerCache[ selector + " " ] && 10184 (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { 10185 10186 if ( nodeType !== 1 ) { 10187 newContext = context; 10188 newSelector = selector; 10189 10190 // qSA looks outside Element context, which is not what we want 10191 // Thanks to Andrew Dupont for this workaround technique 10192 // Support: IE <=8 10193 // Exclude object elements 10194 } else if ( context.nodeName.toLowerCase() !== "object" ) { 10195 10196 // Capture the context ID, setting it first if necessary 10197 if ( (nid = context.getAttribute( "id" )) ) { 10198 nid = nid.replace( rescape, "\\$&" ); 10199 } else { 10200 context.setAttribute( "id", (nid = expando) ); 10201 } 10202 10203 // Prefix every selector in the list 10204 groups = tokenize( selector ); 10205 i = groups.length; 10206 nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; 10207 while ( i-- ) { 10208 groups[i] = nidselect + " " + toSelector( groups[i] ); 10209 } 10210 newSelector = groups.join( "," ); 10211 10212 // Expand context for sibling selectors 10213 newContext = rsibling.test( selector ) && testContext( context.parentNode ) || 10214 context; 10215 } 10216 10217 if ( newSelector ) { 10218 try { 10219 push.apply( results, 10220 newContext.querySelectorAll( newSelector ) 10221 ); 10222 return results; 10223 } catch ( qsaError ) { 10224 } finally { 10225 if ( nid === expando ) { 10226 context.removeAttribute( "id" ); 10227 } 10228 } 10229 } 10230 } 10231 } 10232 } 10233 10234 // All others 10235 return select( selector.replace( rtrim, "$1" ), context, results, seed ); 10236} 10237 10238/** 10239 * Create key-value caches of limited size 10240 * @returns {function(string, object)} Returns the Object data after storing it on itself with 10241 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 10242 * deleting the oldest entry 10243 */ 10244function createCache() { 10245 var keys = []; 10246 10247 function cache( key, value ) { 10248 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 10249 if ( keys.push( key + " " ) > Expr.cacheLength ) { 10250 // Only keep the most recent entries 10251 delete cache[ keys.shift() ]; 10252 } 10253 return (cache[ key + " " ] = value); 10254 } 10255 return cache; 10256} 10257 10258/** 10259 * Mark a function for special use by Sizzle 10260 * @param {Function} fn The function to mark 10261 */ 10262function markFunction( fn ) { 10263 fn[ expando ] = true; 10264 return fn; 10265} 10266 10267/** 10268 * Support testing using an element 10269 * @param {Function} fn Passed the created div and expects a boolean result 10270 */ 10271function assert( fn ) { 10272 var div = document.createElement("div"); 10273 10274 try { 10275 return !!fn( div ); 10276 } catch (e) { 10277 return false; 10278 } finally { 10279 // Remove from its parent by default 10280 if ( div.parentNode ) { 10281 div.parentNode.removeChild( div ); 10282 } 10283 // release memory in IE 10284 div = null; 10285 } 10286} 10287 10288/** 10289 * Adds the same handler for all of the specified attrs 10290 * @param {String} attrs Pipe-separated list of attributes 10291 * @param {Function} handler The method that will be applied 10292 */ 10293function addHandle( attrs, handler ) { 10294 var arr = attrs.split("|"), 10295 i = arr.length; 10296 10297 while ( i-- ) { 10298 Expr.attrHandle[ arr[i] ] = handler; 10299 } 10300} 10301 10302/** 10303 * Checks document order of two siblings 10304 * @param {Element} a 10305 * @param {Element} b 10306 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 10307 */ 10308function siblingCheck( a, b ) { 10309 var cur = b && a, 10310 diff = cur && a.nodeType === 1 && b.nodeType === 1 && 10311 ( ~b.sourceIndex || MAX_NEGATIVE ) - 10312 ( ~a.sourceIndex || MAX_NEGATIVE ); 10313 10314 // Use IE sourceIndex if available on both nodes 10315 if ( diff ) { 10316 return diff; 10317 } 10318 10319 // Check if b follows a 10320 if ( cur ) { 10321 while ( (cur = cur.nextSibling) ) { 10322 if ( cur === b ) { 10323 return -1; 10324 } 10325 } 10326 } 10327 10328 return a ? 1 : -1; 10329} 10330 10331/** 10332 * Returns a function to use in pseudos for input types 10333 * @param {String} type 10334 */ 10335function createInputPseudo( type ) { 10336 return function( elem ) { 10337 var name = elem.nodeName.toLowerCase(); 10338 return name === "input" && elem.type === type; 10339 }; 10340} 10341 10342/** 10343 * Returns a function to use in pseudos for buttons 10344 * @param {String} type 10345 */ 10346function createButtonPseudo( type ) { 10347 return function( elem ) { 10348 var name = elem.nodeName.toLowerCase(); 10349 return (name === "input" || name === "button") && elem.type === type; 10350 }; 10351} 10352 10353/** 10354 * Returns a function to use in pseudos for positionals 10355 * @param {Function} fn 10356 */ 10357function createPositionalPseudo( fn ) { 10358 return markFunction(function( argument ) { 10359 argument = +argument; 10360 return markFunction(function( seed, matches ) { 10361 var j, 10362 matchIndexes = fn( [], seed.length, argument ), 10363 i = matchIndexes.length; 10364 10365 // Match elements found at the specified indexes 10366 while ( i-- ) { 10367 if ( seed[ (j = matchIndexes[i]) ] ) { 10368 seed[j] = !(matches[j] = seed[j]); 10369 } 10370 } 10371 }); 10372 }); 10373} 10374 10375/** 10376 * Checks a node for validity as a Sizzle context 10377 * @param {Element|Object=} context 10378 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 10379 */ 10380function testContext( context ) { 10381 return context && typeof context.getElementsByTagName !== "undefined" && context; 10382} 10383 10384// Expose support vars for convenience 10385support = Sizzle.support = {}; 10386 10387/** 10388 * Detects XML nodes 10389 * @param {Element|Object} elem An element or a document 10390 * @returns {Boolean} True iff elem is a non-HTML XML node 10391 */ 10392isXML = Sizzle.isXML = function( elem ) { 10393 // documentElement is verified for cases where it doesn't yet exist 10394 // (such as loading iframes in IE - #4833) 10395 var documentElement = elem && (elem.ownerDocument || elem).documentElement; 10396 return documentElement ? documentElement.nodeName !== "HTML" : false; 10397}; 10398 10399/** 10400 * Sets document-related variables once based on the current document 10401 * @param {Element|Object} [doc] An element or document object to use to set the document 10402 * @returns {Object} Returns the current document 10403 */ 10404setDocument = Sizzle.setDocument = function( node ) { 10405 var hasCompare, parent, 10406 doc = node ? node.ownerDocument || node : preferredDoc; 10407 10408 // Return early if doc is invalid or already selected 10409 if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { 10410 return document; 10411 } 10412 10413 // Update global variables 10414 document = doc; 10415 docElem = document.documentElement; 10416 documentIsHTML = !isXML( document ); 10417 10418 // Support: IE 9-11, Edge 10419 // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) 10420 if ( (parent = document.defaultView) && parent.top !== parent ) { 10421 // Support: IE 11 10422 if ( parent.addEventListener ) { 10423 parent.addEventListener( "unload", unloadHandler, false ); 10424 10425 // Support: IE 9 - 10 only 10426 } else if ( parent.attachEvent ) { 10427 parent.attachEvent( "onunload", unloadHandler ); 10428 } 10429 } 10430 10431 /* Attributes 10432 ---------------------------------------------------------------------- */ 10433 10434 // Support: IE<8 10435 // Verify that getAttribute really returns attributes and not properties 10436 // (excepting IE8 booleans) 10437 support.attributes = assert(function( div ) { 10438 div.className = "i"; 10439 return !div.getAttribute("className"); 10440 }); 10441 10442 /* getElement(s)By* 10443 ---------------------------------------------------------------------- */ 10444 10445 // Check if getElementsByTagName("*") returns only elements 10446 support.getElementsByTagName = assert(function( div ) { 10447 div.appendChild( document.createComment("") ); 10448 return !div.getElementsByTagName("*").length; 10449 }); 10450 10451 // Support: IE<9 10452 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); 10453 10454 // Support: IE<10 10455 // Check if getElementById returns elements by name 10456 // The broken getElementById methods don't pick up programatically-set names, 10457 // so use a roundabout getElementsByName test 10458 support.getById = assert(function( div ) { 10459 docElem.appendChild( div ).id = expando; 10460 return !document.getElementsByName || !document.getElementsByName( expando ).length; 10461 }); 10462 10463 // ID find and filter 10464 if ( support.getById ) { 10465 Expr.find["ID"] = function( id, context ) { 10466 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 10467 var m = context.getElementById( id ); 10468 return m ? [ m ] : []; 10469 } 10470 }; 10471 Expr.filter["ID"] = function( id ) { 10472 var attrId = id.replace( runescape, funescape ); 10473 return function( elem ) { 10474 return elem.getAttribute("id") === attrId; 10475 }; 10476 }; 10477 } else { 10478 // Support: IE6/7 10479 // getElementById is not reliable as a find shortcut 10480 delete Expr.find["ID"]; 10481 10482 Expr.filter["ID"] = function( id ) { 10483 var attrId = id.replace( runescape, funescape ); 10484 return function( elem ) { 10485 var node = typeof elem.getAttributeNode !== "undefined" && 10486 elem.getAttributeNode("id"); 10487 return node && node.value === attrId; 10488 }; 10489 }; 10490 } 10491 10492 // Tag 10493 Expr.find["TAG"] = support.getElementsByTagName ? 10494 function( tag, context ) { 10495 if ( typeof context.getElementsByTagName !== "undefined" ) { 10496 return context.getElementsByTagName( tag ); 10497 10498 // DocumentFragment nodes don't have gEBTN 10499 } else if ( support.qsa ) { 10500 return context.querySelectorAll( tag ); 10501 } 10502 } : 10503 10504 function( tag, context ) { 10505 var elem, 10506 tmp = [], 10507 i = 0, 10508 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 10509 results = context.getElementsByTagName( tag ); 10510 10511 // Filter out possible comments 10512 if ( tag === "*" ) { 10513 while ( (elem = results[i++]) ) { 10514 if ( elem.nodeType === 1 ) { 10515 tmp.push( elem ); 10516 } 10517 } 10518 10519 return tmp; 10520 } 10521 return results; 10522 }; 10523 10524 // Class 10525 Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { 10526 if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { 10527 return context.getElementsByClassName( className ); 10528 } 10529 }; 10530 10531 /* QSA/matchesSelector 10532 ---------------------------------------------------------------------- */ 10533 10534 // QSA and matchesSelector support 10535 10536 // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 10537 rbuggyMatches = []; 10538 10539 // qSa(:focus) reports false when true (Chrome 21) 10540 // We allow this because of a bug in IE8/9 that throws an error 10541 // whenever `document.activeElement` is accessed on an iframe 10542 // So, we allow :focus to pass through QSA all the time to avoid the IE error 10543 // See http://bugs.jquery.com/ticket/13378 10544 rbuggyQSA = []; 10545 10546 if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { 10547 // Build QSA regex 10548 // Regex strategy adopted from Diego Perini 10549 assert(function( div ) { 10550 // Select is set to empty string on purpose 10551 // This is to test IE's treatment of not explicitly 10552 // setting a boolean content attribute, 10553 // since its presence should be enough 10554 // http://bugs.jquery.com/ticket/12359 10555 docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" + 10556 "<select id='" + expando + "-\r\\' msallowcapture=''>" + 10557 "<option selected=''></option></select>"; 10558 10559 // Support: IE8, Opera 11-12.16 10560 // Nothing should be selected when empty strings follow ^= or $= or *= 10561 // The test attribute must be unknown in Opera but "safe" for WinRT 10562 // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 10563 if ( div.querySelectorAll("[msallowcapture^='']").length ) { 10564 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); 10565 } 10566 10567 // Support: IE8 10568 // Boolean attributes and "value" are not treated correctly 10569 if ( !div.querySelectorAll("[selected]").length ) { 10570 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); 10571 } 10572 10573 // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 10574 if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { 10575 rbuggyQSA.push("~="); 10576 } 10577 10578 // Webkit/Opera - :checked should return selected option elements 10579 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 10580 // IE8 throws error here and will not see later tests 10581 if ( !div.querySelectorAll(":checked").length ) { 10582 rbuggyQSA.push(":checked"); 10583 } 10584 10585 // Support: Safari 8+, iOS 8+ 10586 // https://bugs.webkit.org/show_bug.cgi?id=136851 10587 // In-page `selector#id sibing-combinator selector` fails 10588 if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { 10589 rbuggyQSA.push(".#.+[+~]"); 10590 } 10591 }); 10592 10593 assert(function( div ) { 10594 // Support: Windows 8 Native Apps 10595 // The type and name attributes are restricted during .innerHTML assignment 10596 var input = document.createElement("input"); 10597 input.setAttribute( "type", "hidden" ); 10598 div.appendChild( input ).setAttribute( "name", "D" ); 10599 10600 // Support: IE8 10601 // Enforce case-sensitivity of name attribute 10602 if ( div.querySelectorAll("[name=d]").length ) { 10603 rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); 10604 } 10605 10606 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 10607 // IE8 throws error here and will not see later tests 10608 if ( !div.querySelectorAll(":enabled").length ) { 10609 rbuggyQSA.push( ":enabled", ":disabled" ); 10610 } 10611 10612 // Opera 10-11 does not throw on post-comma invalid pseudos 10613 div.querySelectorAll("*,:x"); 10614 rbuggyQSA.push(",.*:"); 10615 }); 10616 } 10617 10618 if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || 10619 docElem.webkitMatchesSelector || 10620 docElem.mozMatchesSelector || 10621 docElem.oMatchesSelector || 10622 docElem.msMatchesSelector) )) ) { 10623 10624 assert(function( div ) { 10625 // Check to see if it's possible to do matchesSelector 10626 // on a disconnected node (IE 9) 10627 support.disconnectedMatch = matches.call( div, "div" ); 10628 10629 // This should fail with an exception 10630 // Gecko does not error, returns false instead 10631 matches.call( div, "[s!='']:x" ); 10632 rbuggyMatches.push( "!=", pseudos ); 10633 }); 10634 } 10635 10636 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); 10637 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); 10638 10639 /* Contains 10640 ---------------------------------------------------------------------- */ 10641 hasCompare = rnative.test( docElem.compareDocumentPosition ); 10642 10643 // Element contains another 10644 // Purposefully self-exclusive 10645 // As in, an element does not contain itself 10646 contains = hasCompare || rnative.test( docElem.contains ) ? 10647 function( a, b ) { 10648 var adown = a.nodeType === 9 ? a.documentElement : a, 10649 bup = b && b.parentNode; 10650 return a === bup || !!( bup && bup.nodeType === 1 && ( 10651 adown.contains ? 10652 adown.contains( bup ) : 10653 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 10654 )); 10655 } : 10656 function( a, b ) { 10657 if ( b ) { 10658 while ( (b = b.parentNode) ) { 10659 if ( b === a ) { 10660 return true; 10661 } 10662 } 10663 } 10664 return false; 10665 }; 10666 10667 /* Sorting 10668 ---------------------------------------------------------------------- */ 10669 10670 // Document order sorting 10671 sortOrder = hasCompare ? 10672 function( a, b ) { 10673 10674 // Flag for duplicate removal 10675 if ( a === b ) { 10676 hasDuplicate = true; 10677 return 0; 10678 } 10679 10680 // Sort on method existence if only one input has compareDocumentPosition 10681 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 10682 if ( compare ) { 10683 return compare; 10684 } 10685 10686 // Calculate position if both inputs belong to the same document 10687 compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? 10688 a.compareDocumentPosition( b ) : 10689 10690 // Otherwise we know they are disconnected 10691 1; 10692 10693 // Disconnected nodes 10694 if ( compare & 1 || 10695 (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { 10696 10697 // Choose the first element that is related to our preferred document 10698 if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { 10699 return -1; 10700 } 10701 if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { 10702 return 1; 10703 } 10704 10705 // Maintain original order 10706 return sortInput ? 10707 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 10708 0; 10709 } 10710 10711 return compare & 4 ? -1 : 1; 10712 } : 10713 function( a, b ) { 10714 // Exit early if the nodes are identical 10715 if ( a === b ) { 10716 hasDuplicate = true; 10717 return 0; 10718 } 10719 10720 var cur, 10721 i = 0, 10722 aup = a.parentNode, 10723 bup = b.parentNode, 10724 ap = [ a ], 10725 bp = [ b ]; 10726 10727 // Parentless nodes are either documents or disconnected 10728 if ( !aup || !bup ) { 10729 return a === document ? -1 : 10730 b === document ? 1 : 10731 aup ? -1 : 10732 bup ? 1 : 10733 sortInput ? 10734 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 10735 0; 10736 10737 // If the nodes are siblings, we can do a quick check 10738 } else if ( aup === bup ) { 10739 return siblingCheck( a, b ); 10740 } 10741 10742 // Otherwise we need full lists of their ancestors for comparison 10743 cur = a; 10744 while ( (cur = cur.parentNode) ) { 10745 ap.unshift( cur ); 10746 } 10747 cur = b; 10748 while ( (cur = cur.parentNode) ) { 10749 bp.unshift( cur ); 10750 } 10751 10752 // Walk down the tree looking for a discrepancy 10753 while ( ap[i] === bp[i] ) { 10754 i++; 10755 } 10756 10757 return i ? 10758 // Do a sibling check if the nodes have a common ancestor 10759 siblingCheck( ap[i], bp[i] ) : 10760 10761 // Otherwise nodes in our document sort first 10762 ap[i] === preferredDoc ? -1 : 10763 bp[i] === preferredDoc ? 1 : 10764 0; 10765 }; 10766 10767 return document; 10768}; 10769 10770Sizzle.matches = function( expr, elements ) { 10771 return Sizzle( expr, null, null, elements ); 10772}; 10773 10774Sizzle.matchesSelector = function( elem, expr ) { 10775 // Set document vars if needed 10776 if ( ( elem.ownerDocument || elem ) !== document ) { 10777 setDocument( elem ); 10778 } 10779 10780 // Make sure that attribute selectors are quoted 10781 expr = expr.replace( rattributeQuotes, "='$1']" ); 10782 10783 if ( support.matchesSelector && documentIsHTML && 10784 !compilerCache[ expr + " " ] && 10785 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && 10786 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { 10787 10788 try { 10789 var ret = matches.call( elem, expr ); 10790 10791 // IE 9's matchesSelector returns false on disconnected nodes 10792 if ( ret || support.disconnectedMatch || 10793 // As well, disconnected nodes are said to be in a document 10794 // fragment in IE 9 10795 elem.document && elem.document.nodeType !== 11 ) { 10796 return ret; 10797 } 10798 } catch (e) {} 10799 } 10800 10801 return Sizzle( expr, document, null, [ elem ] ).length > 0; 10802}; 10803 10804Sizzle.contains = function( context, elem ) { 10805 // Set document vars if needed 10806 if ( ( context.ownerDocument || context ) !== document ) { 10807 setDocument( context ); 10808 } 10809 return contains( context, elem ); 10810}; 10811 10812Sizzle.attr = function( elem, name ) { 10813 // Set document vars if needed 10814 if ( ( elem.ownerDocument || elem ) !== document ) { 10815 setDocument( elem ); 10816 } 10817 10818 var fn = Expr.attrHandle[ name.toLowerCase() ], 10819 // Don't get fooled by Object.prototype properties (jQuery #13807) 10820 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? 10821 fn( elem, name, !documentIsHTML ) : 10822 undefined; 10823 10824 return val !== undefined ? 10825 val : 10826 support.attributes || !documentIsHTML ? 10827 elem.getAttribute( name ) : 10828 (val = elem.getAttributeNode(name)) && val.specified ? 10829 val.value : 10830 null
vendor: 13,569 bytes, lines 10830-11300
10830; 10831}; 10832 10833Sizzle.error = function( msg ) { 10834 throw new Error( "Syntax error, unrecognized expression: " + msg ); 10835}; 10836 10837/** 10838 * Document sorting and removing duplicates 10839 * @param {ArrayLike} results 10840 */ 10841Sizzle.uniqueSort = function( results ) { 10842 var elem, 10843 duplicates = [], 10844 j = 0, 10845 i = 0; 10846 10847 // Unless we *know* we can detect duplicates, assume their presence 10848 hasDuplicate = !support.detectDuplicates; 10849 sortInput = !support.sortStable && results.slice( 0 ); 10850 results.sort( sortOrder ); 10851 10852 if ( hasDuplicate ) { 10853 while ( (elem = results[i++]) ) { 10854 if ( elem === results[ i ] ) { 10855 j = duplicates.push( i ); 10856 } 10857 } 10858 while ( j-- ) { 10859 results.splice( duplicates[ j ], 1 ); 10860 } 10861 } 10862 10863 // Clear input after sorting to release objects 10864 // See https://github.com/jquery/sizzle/pull/225 10865 sortInput = null; 10866 10867 return results; 10868}; 10869 10870/** 10871 * Utility function for retrieving the text value of an array of DOM nodes 10872 * @param {Array|Element} elem 10873 */ 10874getText = Sizzle.getText = function( elem ) { 10875 var node, 10876 ret = "", 10877 i = 0, 10878 nodeType = elem.nodeType; 10879 10880 if ( !nodeType ) { 10881 // If no nodeType, this is expected to be an array 10882 while ( (node = elem[i++]) ) { 10883 // Do not traverse comment nodes 10884 ret += getText( node ); 10885 } 10886 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 10887 // Use textContent for elements 10888 // innerText usage removed for consistency of new lines (jQuery #11153) 10889 if ( typeof elem.textContent === "string" ) { 10890 return elem.textContent; 10891 } else { 10892 // Traverse its children 10893 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 10894 ret += getText( elem ); 10895 } 10896 } 10897 } else if ( nodeType === 3 || nodeType === 4 ) { 10898 return elem.nodeValue; 10899 } 10900 // Do not include comment or processing instruction nodes 10901 10902 return ret; 10903}; 10904 10905Expr = Sizzle.selectors = { 10906 10907 // Can be adjusted by the user 10908 cacheLength: 50, 10909 10910 createPseudo: markFunction, 10911 10912 match: matchExpr, 10913 10914 attrHandle: {}, 10915 10916 find: {}, 10917 10918 relative: { 10919 ">": { dir: "parentNode", first: true }, 10920 " ": { dir: "parentNode" }, 10921 "+": { dir: "previousSibling", first: true }, 10922 "~": { dir: "previousSibling" } 10923 }, 10924 10925 preFilter: { 10926 "ATTR": function( match ) { 10927 match[1] = match[1].replace( runescape, funescape ); 10928 10929 // Move the given value to match[3] whether quoted or unquoted 10930 match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); 10931 10932 if ( match[2] === "~=" ) { 10933 match[3] = " " + match[3] + " "; 10934 } 10935 10936 return match.slice( 0, 4 ); 10937 }, 10938 10939 "CHILD": function( match ) { 10940 /* matches from matchExpr["CHILD"] 10941 1 type (only|nth|...) 10942 2 what (child|of-type) 10943 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 10944 4 xn-component of xn+y argument ([+-]?\d*n|) 10945 5 sign of xn-component 10946 6 x of xn-component 10947 7 sign of y-component 10948 8 y of y-component 10949 */ 10950 match[1] = match[1].toLowerCase(); 10951 10952 if ( match[1].slice( 0, 3 ) === "nth" ) { 10953 // nth-* requires argument 10954 if ( !match[3] ) { 10955 Sizzle.error( match[0] ); 10956 } 10957 10958 // numeric x and y parameters for Expr.filter.CHILD 10959 // remember that false/true cast respectively to 0/1 10960 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); 10961 match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); 10962 10963 // other types prohibit arguments 10964 } else if ( match[3] ) { 10965 Sizzle.error( match[0] ); 10966 } 10967 10968 return match; 10969 }, 10970 10971 "PSEUDO": function( match ) { 10972 var excess, 10973 unquoted = !match[6] && match[2]; 10974 10975 if ( matchExpr["CHILD"].test( match[0] ) ) { 10976 return null; 10977 } 10978 10979 // Accept quoted arguments as-is 10980 if ( match[3] ) { 10981 match[2] = match[4] || match[5] || ""; 10982 10983 // Strip excess characters from unquoted arguments 10984 } else if ( unquoted && rpseudo.test( unquoted ) && 10985 // Get excess from tokenize (recursively) 10986 (excess = tokenize( unquoted, true )) && 10987 // advance to the next closing parenthesis 10988 (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { 10989 10990 // excess is a negative index 10991 match[0] = match[0].slice( 0, excess ); 10992 match[2] = unquoted.slice( 0, excess ); 10993 } 10994 10995 // Return only captures needed by the pseudo filter method (type and argument) 10996 return match.slice( 0, 3 ); 10997 } 10998 }, 10999 11000 filter: { 11001 11002 "TAG": function( nodeNameSelector ) { 11003 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); 11004 return nodeNameSelector === "*" ? 11005 function() { return true; } : 11006 function( elem ) { 11007 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 11008 }; 11009 }, 11010 11011 "CLASS": function( className ) { 11012 var pattern = classCache[ className + " " ]; 11013 11014 return pattern || 11015 (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && 11016 classCache( className, function( elem ) { 11017 return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); 11018 }); 11019 }, 11020 11021 "ATTR": function( name, operator, check ) { 11022 return function( elem ) { 11023 var result = Sizzle.attr( elem, name ); 11024 11025 if ( result == null ) { 11026 return operator === "!="; 11027 } 11028 if ( !operator ) { 11029 return true; 11030 } 11031 11032 result += ""; 11033 11034 return operator === "=" ? result === check : 11035 operator === "!=" ? result !== check : 11036 operator === "^=" ? check && result.indexOf( check ) === 0 : 11037 operator === "*=" ? check && result.indexOf( check ) > -1 : 11038 operator === "$=" ? check && result.slice( -check.length ) === check : 11039 operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : 11040 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : 11041 false; 11042 }; 11043 }, 11044 11045 "CHILD": function( type, what, argument, first, last ) { 11046 var simple = type.slice( 0, 3 ) !== "nth", 11047 forward = type.slice( -4 ) !== "last", 11048 ofType = what === "of-type"; 11049 11050 return first === 1 && last === 0 ? 11051 11052 // Shortcut for :nth-*(n) 11053 function( elem ) { 11054 return !!elem.parentNode; 11055 } : 11056 11057 function( elem, context, xml ) { 11058 var cache, uniqueCache, outerCache, node, nodeIndex, start, 11059 dir = simple !== forward ? "nextSibling" : "previousSibling", 11060 parent = elem.parentNode, 11061 name = ofType && elem.nodeName.toLowerCase(), 11062 useCache = !xml && !ofType, 11063 diff = false; 11064 11065 if ( parent ) { 11066 11067 // :(first|last|only)-(child|of-type) 11068 if ( simple ) { 11069 while ( dir ) { 11070 node = elem; 11071 while ( (node = node[ dir ]) ) { 11072 if ( ofType ? 11073 node.nodeName.toLowerCase() === name : 11074 node.nodeType === 1 ) { 11075 11076 return false; 11077 } 11078 } 11079 // Reverse direction for :only-* (if we haven't yet done so) 11080 start = dir = type === "only" && !start && "nextSibling"; 11081 } 11082 return true; 11083 } 11084 11085 start = [ forward ? parent.firstChild : parent.lastChild ]; 11086 11087 // non-xml :nth-child(...) stores cache data on `parent` 11088 if ( forward && useCache ) { 11089 11090 // Seek `elem` from a previously-cached index 11091 11092 // ...in a gzip-friendly way 11093 node = parent; 11094 outerCache = node[ expando ] || (node[ expando ] = {}); 11095 11096 // Support: IE <9 only 11097 // Defend against cloned attroperties (jQuery gh-1709) 11098 uniqueCache = outerCache[ node.uniqueID ] || 11099 (outerCache[ node.uniqueID ] = {}); 11100 11101 cache = uniqueCache[ type ] || []; 11102 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 11103 diff = nodeIndex && cache[ 2 ]; 11104 node = nodeIndex && parent.childNodes[ nodeIndex ]; 11105 11106 while ( (node = ++nodeIndex && node && node[ dir ] || 11107 11108 // Fallback to seeking `elem` from the start 11109 (diff = nodeIndex = 0) || start.pop()) ) { 11110 11111 // When found, cache indexes on `parent` and break 11112 if ( node.nodeType === 1 && ++diff && node === elem ) { 11113 uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; 11114 break; 11115 } 11116 } 11117 11118 } else { 11119 // Use previously-cached element index if available 11120 if ( useCache ) { 11121 // ...in a gzip-friendly way 11122 node = elem; 11123 outerCache = node[ expando ] || (node[ expando ] = {}); 11124 11125 // Support: IE <9 only 11126 // Defend against cloned attroperties (jQuery gh-1709) 11127 uniqueCache = outerCache[ node.uniqueID ] || 11128 (outerCache[ node.uniqueID ] = {}); 11129 11130 cache = uniqueCache[ type ] || []; 11131 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 11132 diff = nodeIndex; 11133 } 11134 11135 // xml :nth-child(...) 11136 // or :nth-last-child(...) or :nth(-last)?-of-type(...) 11137 if ( diff === false ) { 11138 // Use the same loop as above to seek `elem` from the start 11139 while ( (node = ++nodeIndex && node && node[ dir ] || 11140 (diff = nodeIndex = 0) || start.pop()) ) { 11141 11142 if ( ( ofType ? 11143 node.nodeName.toLowerCase() === name : 11144 node.nodeType === 1 ) && 11145 ++diff ) { 11146 11147 // Cache the index of each encountered element 11148 if ( useCache ) { 11149 outerCache = node[ expando ] || (node[ expando ] = {}); 11150 11151 // Support: IE <9 only 11152 // Defend against cloned attroperties (jQuery gh-1709) 11153 uniqueCache = outerCache[ node.uniqueID ] || 11154 (outerCache[ node.uniqueID ] = {}); 11155 11156 uniqueCache[ type ] = [ dirruns, diff ]; 11157 } 11158 11159 if ( node === elem ) { 11160 break; 11161 } 11162 } 11163 } 11164 } 11165 } 11166 11167 // Incorporate the offset, then check against cycle size 11168 diff -= last; 11169 return diff === first || ( diff % first === 0 && diff / first >= 0 ); 11170 } 11171 }; 11172 }, 11173 11174 "PSEUDO": function( pseudo, argument ) { 11175 // pseudo-class names are case-insensitive 11176 // http://www.w3.org/TR/selectors/#pseudo-classes 11177 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 11178 // Remember that setFilters inherits from pseudos 11179 var args, 11180 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || 11181 Sizzle.error( "unsupported pseudo: " + pseudo ); 11182 11183 // The user may use createPseudo to indicate that 11184 // arguments are needed to create the filter function 11185 // just as Sizzle does 11186 if ( fn[ expando ] ) { 11187 return fn( argument ); 11188 } 11189 11190 // But maintain support for old signatures 11191 if ( fn.length > 1 ) { 11192 args = [ pseudo, pseudo, "", argument ]; 11193 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? 11194 markFunction(function( seed, matches ) { 11195 var idx, 11196 matched = fn( seed, argument ), 11197 i = matched.length; 11198 while ( i-- ) { 11199 idx = indexOf( seed, matched[i] ); 11200 seed[ idx ] = !( matches[ idx ] = matched[i] ); 11201 } 11202 }) : 11203 function( elem ) { 11204 return fn( elem, 0, args ); 11205 }; 11206 } 11207 11208 return fn; 11209 } 11210 }, 11211 11212 pseudos: { 11213 // Potentially complex pseudos 11214 "not": markFunction(function( selector ) { 11215 // Trim the selector passed to compile 11216 // to avoid treating leading and trailing 11217 // spaces as combinators 11218 var input = [], 11219 results = [], 11220 matcher = compile( selector.replace( rtrim, "$1" ) ); 11221 11222 return matcher[ expando ] ? 11223 markFunction(function( seed, matches, context, xml ) { 11224 var elem, 11225 unmatched = matcher( seed, null, xml, [] ), 11226 i = seed.length; 11227 11228 // Match elements unmatched by `matcher` 11229 while ( i-- ) { 11230 if ( (elem = unmatched[i]) ) { 11231 seed[i] = !(matches[i] = elem); 11232 } 11233 } 11234 }) : 11235 function( elem, context, xml ) { 11236 input[0] = elem; 11237 matcher( input, null, xml, results ); 11238 // Don't keep the element (issue #299) 11239 input[0] = null; 11240 return !results.pop(); 11241 }; 11242 }), 11243 11244 "has": markFunction(function( selector ) { 11245 return function( elem ) { 11246 return Sizzle( selector, elem ).length > 0; 11247 }; 11248 }), 11249 11250 "contains": markFunction(function( text ) { 11251 text = text.replace( runescape, funescape ); 11252 return function( elem ) { 11253 return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; 11254 }; 11255 }), 11256 11257 // "Whether an element is represented by a :lang() selector 11258 // is based solely on the element's language value 11259 // being equal to the identifier C, 11260 // or beginning with the identifier C immediately followed by "-". 11261 // The matching of C against the element's language value is performed case-insensitively. 11262 // The identifier C does not have to be a valid language name." 11263 // http://www.w3.org/TR/selectors/#lang-pseudo 11264 "lang": markFunction( function( lang ) { 11265 // lang value must be a valid identifier 11266 if ( !ridentifier.test(lang || "") ) { 11267 Sizzle.error( "unsupported lang: " + lang ); 11268 } 11269 lang = lang.replace( runescape, funescape ).toLowerCase(); 11270 return function( elem ) { 11271 var elemLang; 11272 do { 11273 if ( (elemLang = documentIsHTML ? 11274 elem.lang : 11275 elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { 11276 11277 elemLang = elemLang.toLowerCase(); 11278 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; 11279 } 11280 } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); 11281 return false; 11282 }; 11283 }), 11284 11285 // Miscellaneous 11286 "target": function( elem ) { 11287 var hash = window.location && window.location.hash; 11288 return hash && hash.slice( 1 ) === elem.id; 11289 }, 11290 11291 "root": function( elem ) { 11292 return elem === docElem; 11293 }, 11294 11295 "focus": function( elem ) { 11296 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); 11297 }, 11298 11299 // Boolean properties 11300 "enabled":
vendor: 6,738 bytes, lines 11300-11551
11300function( elem ) { 11301 return elem.disabled === false; 11302 }, 11303 11304 "disabled": function( elem ) { 11305 return elem.disabled === true; 11306 }, 11307 11308 "checked": function( elem ) { 11309 // In CSS3, :checked should return both checked and selected elements 11310 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 11311 var nodeName = elem.nodeName.toLowerCase(); 11312 return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); 11313 }, 11314 11315 "selected": function( elem ) { 11316 // Accessing this property makes selected-by-default 11317 // options in Safari work properly 11318 if ( elem.parentNode ) { 11319 elem.parentNode.selectedIndex; 11320 } 11321 11322 return elem.selected === true; 11323 }, 11324 11325 // Contents 11326 "empty": function( elem ) { 11327 // http://www.w3.org/TR/selectors/#empty-pseudo 11328 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 11329 // but not by others (comment: 8; processing instruction: 7; etc.) 11330 // nodeType < 6 works because attributes (2) do not appear as children 11331 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 11332 if ( elem.nodeType < 6 ) { 11333 return false; 11334 } 11335 } 11336 return true; 11337 }, 11338 11339 "parent": function( elem ) { 11340 return !Expr.pseudos["empty"]( elem ); 11341 }, 11342 11343 // Element/input types 11344 "header": function( elem ) { 11345 return rheader.test( elem.nodeName ); 11346 }, 11347 11348 "input": function( elem ) { 11349 return rinputs.test( elem.nodeName ); 11350 }, 11351 11352 "button": function( elem ) { 11353 var name = elem.nodeName.toLowerCase(); 11354 return name === "input" && elem.type === "button" || name === "button"; 11355 }, 11356 11357 "text": function( elem ) { 11358 var attr; 11359 return elem.nodeName.toLowerCase() === "input" && 11360 elem.type === "text" && 11361 11362 // Support: IE<8 11363 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 11364 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); 11365 }, 11366 11367 // Position-in-collection 11368 "first": createPositionalPseudo(function() { 11369 return [ 0 ]; 11370 }), 11371 11372 "last": createPositionalPseudo(function( matchIndexes, length ) { 11373 return [ length - 1 ]; 11374 }), 11375 11376 "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { 11377 return [ argument < 0 ? argument + length : argument ]; 11378 }), 11379 11380 "even": createPositionalPseudo(function( matchIndexes, length ) { 11381 var i = 0; 11382 for ( ; i < length; i += 2 ) { 11383 matchIndexes.push( i ); 11384 } 11385 return matchIndexes; 11386 }), 11387 11388 "odd": createPositionalPseudo(function( matchIndexes, length ) { 11389 var i = 1; 11390 for ( ; i < length; i += 2 ) { 11391 matchIndexes.push( i ); 11392 } 11393 return matchIndexes; 11394 }), 11395 11396 "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { 11397 var i = argument < 0 ? argument + length : argument; 11398 for ( ; --i >= 0; ) { 11399 matchIndexes.push( i ); 11400 } 11401 return matchIndexes; 11402 }), 11403 11404 "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { 11405 var i = argument < 0 ? argument + length : argument; 11406 for ( ; ++i < length; ) { 11407 matchIndexes.push( i ); 11408 } 11409 return matchIndexes; 11410 }) 11411 } 11412}; 11413 11414Expr.pseudos["nth"] = Expr.pseudos["eq"]; 11415 11416// Add button/input type pseudos 11417for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { 11418 Expr.pseudos[ i ] = createInputPseudo( i ); 11419} 11420for ( i in { submit: true, reset: true } ) { 11421 Expr.pseudos[ i ] = createButtonPseudo( i ); 11422} 11423 11424// Easy API for creating new setFilters 11425function setFilters() {} 11426setFilters.prototype = Expr.filters = Expr.pseudos; 11427Expr.setFilters = new setFilters(); 11428 11429tokenize = Sizzle.tokenize = function( selector, parseOnly ) { 11430 var matched, match, tokens, type, 11431 soFar, groups, preFilters, 11432 cached = tokenCache[ selector + " " ]; 11433 11434 if ( cached ) { 11435 return parseOnly ? 0 : cached.slice( 0 ); 11436 } 11437 11438 soFar = selector; 11439 groups = []; 11440 preFilters = Expr.preFilter; 11441 11442 while ( soFar ) { 11443 11444 // Comma and first run 11445 if ( !matched || (match = rcomma.exec( soFar )) ) { 11446 if ( match ) { 11447 // Don't consume trailing commas as valid 11448 soFar = soFar.slice( match[0].length ) || soFar; 11449 } 11450 groups.push( (tokens = []) ); 11451 } 11452 11453 matched = false; 11454 11455 // Combinators 11456 if ( (match = rcombinators.exec( soFar )) ) { 11457 matched = match.shift(); 11458 tokens.push({ 11459 value: matched, 11460 // Cast descendant combinators to space 11461 type: match[0].replace( rtrim, " " ) 11462 }); 11463 soFar = soFar.slice( matched.length ); 11464 } 11465 11466 // Filters 11467 for ( type in Expr.filter ) { 11468 if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || 11469 (match = preFilters[ type ]( match ))) ) { 11470 matched = match.shift(); 11471 tokens.push({ 11472 value: matched, 11473 type: type, 11474 matches: match 11475 }); 11476 soFar = soFar.slice( matched.length ); 11477 } 11478 } 11479 11480 if ( !matched ) { 11481 break; 11482 } 11483 } 11484 11485 // Return the length of the invalid excess 11486 // if we're just parsing 11487 // Otherwise, throw an error or return tokens 11488 return parseOnly ? 11489 soFar.length : 11490 soFar ? 11491 Sizzle.error( selector ) : 11492 // Cache the tokens 11493 tokenCache( selector, groups ).slice( 0 ); 11494}; 11495 11496function toSelector( tokens ) { 11497 var i = 0, 11498 len = tokens.length, 11499 selector = ""; 11500 for ( ; i < len; i++ ) { 11501 selector += tokens[i].value; 11502 } 11503 return selector; 11504} 11505 11506function addCombinator( matcher, combinator, base ) { 11507 var dir = combinator.dir, 11508 checkNonElements = base && dir === "parentNode", 11509 doneName = done++; 11510 11511 return combinator.first ? 11512 // Check against closest ancestor/preceding element 11513 function( elem, context, xml ) { 11514 while ( (elem = elem[ dir ]) ) { 11515 if ( elem.nodeType === 1 || checkNonElements ) { 11516 return matcher( elem, context, xml ); 11517 } 11518 } 11519 } : 11520 11521 // Check against all ancestor/preceding elements 11522 function( elem, context, xml ) { 11523 var oldCache, uniqueCache, outerCache, 11524 newCache = [ dirruns, doneName ]; 11525 11526 // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching 11527 if ( xml ) { 11528 while ( (elem = elem[ dir ]) ) { 11529 if ( elem.nodeType === 1 || checkNonElements ) { 11530 if ( matcher( elem, context, xml ) ) { 11531 return true; 11532 } 11533 } 11534 } 11535 } else { 11536 while ( (elem = elem[ dir ]) ) { 11537 if ( elem.nodeType === 1 || checkNonElements ) { 11538 outerCache = elem[ expando ] || (elem[ expando ] = {}); 11539 11540 // Support: IE <9 only 11541 // Defend against cloned attroperties (jQuery gh-1709) 11542 uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); 11543 11544 if ( (oldCache = uniqueCache[ dir ]) && 11545 oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { 11546 11547 // Assign to newCache so results back-propagate to previous elements 11548 return (newCache[ 2 ] = oldCache[ 2 ]); 11549 } else { 11550 // Reuse newcache so results back-propagate to previous elements 11551 uniqueCache[ dir
vendor: 12,959 bytes, lines 11551-11994
11551 ] = newCache; 11552 11553 // A match means we're done; a fail means we have to keep checking 11554 if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { 11555 return true; 11556 } 11557 } 11558 } 11559 } 11560 } 11561 }; 11562} 11563 11564function elementMatcher( matchers ) { 11565 return matchers.length > 1 ? 11566 function( elem, context, xml ) { 11567 var i = matchers.length; 11568 while ( i-- ) { 11569 if ( !matchers[i]( elem, context, xml ) ) { 11570 return false; 11571 } 11572 } 11573 return true; 11574 } : 11575 matchers[0]; 11576} 11577 11578function multipleContexts( selector, contexts, results ) { 11579 var i = 0, 11580 len = contexts.length; 11581 for ( ; i < len; i++ ) { 11582 Sizzle( selector, contexts[i], results ); 11583 } 11584 return results; 11585} 11586 11587function condense( unmatched, map, filter, context, xml ) { 11588 var elem, 11589 newUnmatched = [], 11590 i = 0, 11591 len = unmatched.length, 11592 mapped = map != null; 11593 11594 for ( ; i < len; i++ ) { 11595 if ( (elem = unmatched[i]) ) { 11596 if ( !filter || filter( elem, context, xml ) ) { 11597 newUnmatched.push( elem ); 11598 if ( mapped ) { 11599 map.push( i ); 11600 } 11601 } 11602 } 11603 } 11604 11605 return newUnmatched; 11606} 11607 11608function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { 11609 if ( postFilter && !postFilter[ expando ] ) { 11610 postFilter = setMatcher( postFilter ); 11611 } 11612 if ( postFinder && !postFinder[ expando ] ) { 11613 postFinder = setMatcher( postFinder, postSelector ); 11614 } 11615 return markFunction(function( seed, results, context, xml ) { 11616 var temp, i, elem, 11617 preMap = [], 11618 postMap = [], 11619 preexisting = results.length, 11620 11621 // Get initial elements from seed or context 11622 elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), 11623 11624 // Prefilter to get matcher input, preserving a map for seed-results synchronization 11625 matcherIn = preFilter && ( seed || !selector ) ? 11626 condense( elems, preMap, preFilter, context, xml ) : 11627 elems, 11628 11629 matcherOut = matcher ? 11630 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 11631 postFinder || ( seed ? preFilter : preexisting || postFilter ) ? 11632 11633 // ...intermediate processing is necessary 11634 [] : 11635 11636 // ...otherwise use results directly 11637 results : 11638 matcherIn; 11639 11640 // Find primary matches 11641 if ( matcher ) { 11642 matcher( matcherIn, matcherOut, context, xml ); 11643 } 11644 11645 // Apply postFilter 11646 if ( postFilter ) { 11647 temp = condense( matcherOut, postMap ); 11648 postFilter( temp, [], context, xml ); 11649 11650 // Un-match failing elements by moving them back to matcherIn 11651 i = temp.length; 11652 while ( i-- ) { 11653 if ( (elem = temp[i]) ) { 11654 matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); 11655 } 11656 } 11657 } 11658 11659 if ( seed ) { 11660 if ( postFinder || preFilter ) { 11661 if ( postFinder ) { 11662 // Get the final matcherOut by condensing this intermediate into postFinder contexts 11663 temp = []; 11664 i = matcherOut.length; 11665 while ( i-- ) { 11666 if ( (elem = matcherOut[i]) ) { 11667 // Restore matcherIn since elem is not yet a final match 11668 temp.push( (matcherIn[i] = elem) ); 11669 } 11670 } 11671 postFinder( null, (matcherOut = []), temp, xml ); 11672 } 11673 11674 // Move matched elements from seed to results to keep them synchronized 11675 i = matcherOut.length; 11676 while ( i-- ) { 11677 if ( (elem = matcherOut[i]) && 11678 (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { 11679 11680 seed[temp] = !(results[temp] = elem); 11681 } 11682 } 11683 } 11684 11685 // Add elements to results, through postFinder if defined 11686 } else { 11687 matcherOut = condense( 11688 matcherOut === results ? 11689 matcherOut.splice( preexisting, matcherOut.length ) : 11690 matcherOut 11691 ); 11692 if ( postFinder ) { 11693 postFinder( null, results, matcherOut, xml ); 11694 } else { 11695 push.apply( results, matcherOut ); 11696 } 11697 } 11698 }); 11699} 11700 11701function matcherFromTokens( tokens ) { 11702 var checkContext, matcher, j, 11703 len = tokens.length, 11704 leadingRelative = Expr.relative[ tokens[0].type ], 11705 implicitRelative = leadingRelative || Expr.relative[" "], 11706 i = leadingRelative ? 1 : 0, 11707 11708 // The foundational matcher ensures that elements are reachable from top-level context(s) 11709 matchContext = addCombinator( function( elem ) { 11710 return elem === checkContext; 11711 }, implicitRelative, true ), 11712 matchAnyContext = addCombinator( function( elem ) { 11713 return indexOf( checkContext, elem ) > -1; 11714 }, implicitRelative, true ), 11715 matchers = [ function( elem, context, xml ) { 11716 var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( 11717 (checkContext = context).nodeType ? 11718 matchContext( elem, context, xml ) : 11719 matchAnyContext( elem, context, xml ) ); 11720 // Avoid hanging onto element (issue #299) 11721 checkContext = null; 11722 return ret; 11723 } ]; 11724 11725 for ( ; i < len; i++ ) { 11726 if ( (matcher = Expr.relative[ tokens[i].type ]) ) { 11727 matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; 11728 } else { 11729 matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); 11730 11731 // Return special upon seeing a positional matcher 11732 if ( matcher[ expando ] ) { 11733 // Find the next relative operator (if any) for proper handling 11734 j = ++i; 11735 for ( ; j < len; j++ ) { 11736 if ( Expr.relative[ tokens[j].type ] ) { 11737 break; 11738 } 11739 } 11740 return setMatcher( 11741 i > 1 && elementMatcher( matchers ), 11742 i > 1 && toSelector( 11743 // If the preceding token was a descendant combinator, insert an implicit any-element `*` 11744 tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) 11745 ).replace( rtrim, "$1" ), 11746 matcher, 11747 i < j && matcherFromTokens( tokens.slice( i, j ) ), 11748 j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), 11749 j < len && toSelector( tokens ) 11750 ); 11751 } 11752 matchers.push( matcher ); 11753 } 11754 } 11755 11756 return elementMatcher( matchers ); 11757} 11758 11759function matcherFromGroupMatchers( elementMatchers, setMatchers ) { 11760 var bySet = setMatchers.length > 0, 11761 byElement = elementMatchers.length > 0, 11762 superMatcher = function( seed, context, xml, results, outermost ) { 11763 var elem, j, matcher, 11764 matchedCount = 0, 11765 i = "0", 11766 unmatched = seed && [], 11767 setMatched = [], 11768 contextBackup = outermostContext, 11769 // We must always have either seed elements or outermost context 11770 elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), 11771 // Use integer dirruns iff this is the outermost matcher 11772 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), 11773 len = elems.length; 11774 11775 if ( outermost ) { 11776 outermostContext = context === document || context || outermost; 11777 } 11778 11779 // Add elements passing elementMatchers directly to results 11780 // Support: IE<9, Safari 11781 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 11782 for ( ; i !== len && (elem = elems[i]) != null; i++ ) { 11783 if ( byElement && elem ) { 11784 j = 0; 11785 if ( !context && elem.ownerDocument !== document ) { 11786 setDocument( elem ); 11787 xml = !documentIsHTML; 11788 } 11789 while ( (matcher = elementMatchers[j++]) ) { 11790 if ( matcher( elem, context || document, xml) ) { 11791 results.push( elem ); 11792 break; 11793 } 11794 } 11795 if ( outermost ) { 11796 dirruns = dirrunsUnique; 11797 } 11798 } 11799 11800 // Track unmatched elements for set filters 11801 if ( bySet ) { 11802 // They will have gone through all possible matchers 11803 if ( (elem = !matcher && elem) ) { 11804 matchedCount--; 11805 } 11806 11807 // Lengthen the array for every element, matched or not 11808 if ( seed ) { 11809 unmatched.push( elem ); 11810 } 11811 } 11812 } 11813 11814 // `i` is now the count of elements visited above, and adding it to `matchedCount` 11815 // makes the latter nonnegative. 11816 matchedCount += i; 11817 11818 // Apply set filters to unmatched elements 11819 // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` 11820 // equals `i`), unless we didn't visit _any_ elements in the above loop because we have 11821 // no element matchers and no seed. 11822 // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that 11823 // case, which will result in a "00" `matchedCount` that differs from `i` but is also 11824 // numerically zero. 11825 if ( bySet && i !== matchedCount ) { 11826 j = 0; 11827 while ( (matcher = setMatchers[j++]) ) { 11828 matcher( unmatched, setMatched, context, xml ); 11829 } 11830 11831 if ( seed ) { 11832 // Reintegrate element matches to eliminate the need for sorting 11833 if ( matchedCount > 0 ) { 11834 while ( i-- ) { 11835 if ( !(unmatched[i] || setMatched[i]) ) { 11836 setMatched[i] = pop.call( results ); 11837 } 11838 } 11839 } 11840 11841 // Discard index placeholder values to get only actual matches 11842 setMatched = condense( setMatched ); 11843 } 11844 11845 // Add matches to results 11846 push.apply( results, setMatched ); 11847 11848 // Seedless set matches succeeding multiple successful matchers stipulate sorting 11849 if ( outermost && !seed && setMatched.length > 0 && 11850 ( matchedCount + setMatchers.length ) > 1 ) { 11851 11852 Sizzle.uniqueSort( results ); 11853 } 11854 } 11855 11856 // Override manipulation of globals by nested matchers 11857 if ( outermost ) { 11858 dirruns = dirrunsUnique; 11859 outermostContext = contextBackup; 11860 } 11861 11862 return unmatched; 11863 }; 11864 11865 return bySet ? 11866 markFunction( superMatcher ) : 11867 superMatcher; 11868} 11869 11870compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { 11871 var i, 11872 setMatchers = [], 11873 elementMatchers = [], 11874 cached = compilerCache[ selector + " " ]; 11875 11876 if ( !cached ) { 11877 // Generate a function of recursive functions that can be used to check each element 11878 if ( !match ) { 11879 match = tokenize( selector ); 11880 } 11881 i = match.length; 11882 while ( i-- ) { 11883 cached = matcherFromTokens( match[i] ); 11884 if ( cached[ expando ] ) { 11885 setMatchers.push( cached ); 11886 } else { 11887 elementMatchers.push( cached ); 11888 } 11889 } 11890 11891 // Cache the compiled function 11892 cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); 11893 11894 // Save selector and tokenization 11895 cached.selector = selector; 11896 } 11897 return cached; 11898}; 11899 11900/** 11901 * A low-level selection function that works with Sizzle's compiled 11902 * selector functions 11903 * @param {String|Function} selector A selector or a pre-compiled 11904 * selector function built with Sizzle.compile 11905 * @param {Element} context 11906 * @param {Array} [results] 11907 * @param {Array} [seed] A set of elements to match against 11908 */ 11909select = Sizzle.select = function( selector, context, results, seed ) { 11910 var i, tokens, token, type, find, 11911 compiled = typeof selector === "function" && selector, 11912 match = !seed && tokenize( (selector = compiled.selector || selector) ); 11913 11914 results = results || []; 11915 11916 // Try to minimize operations if there is only one selector in the list and no seed 11917 // (the latter of which guarantees us context) 11918 if ( match.length === 1 ) { 11919 11920 // Reduce context if the leading compound selector is an ID 11921 tokens = match[0] = match[0].slice( 0 ); 11922 if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && 11923 support.getById && context.nodeType === 9 && documentIsHTML && 11924 Expr.relative[ tokens[1].type ] ) { 11925 11926 context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; 11927 if ( !context ) { 11928 return results; 11929 11930 // Precompiled matchers will still verify ancestry, so step up a level 11931 } else if ( compiled ) { 11932 context = context.parentNode; 11933 } 11934 11935 selector = selector.slice( tokens.shift().value.length ); 11936 } 11937 11938 // Fetch a seed set for right-to-left matching 11939 i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; 11940 while ( i-- ) { 11941 token = tokens[i]; 11942 11943 // Abort if we hit a combinator 11944 if ( Expr.relative[ (type = token.type) ] ) { 11945 break; 11946 } 11947 if ( (find = Expr.find[ type ]) ) { 11948 // Search, expanding context for leading sibling combinators 11949 if ( (seed = find( 11950 token.matches[0].replace( runescape, funescape ), 11951 rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context 11952 )) ) { 11953 11954 // If seed is empty or no tokens remain, we can return early 11955 tokens.splice( i, 1 ); 11956 selector = seed.length && toSelector( tokens ); 11957 if ( !selector ) { 11958 push.apply( results, seed ); 11959 return results; 11960 } 11961 11962 break; 11963 } 11964 } 11965 } 11966 } 11967 11968 // Compile and execute a filtering function if one is not provided 11969 // Provide `match` to avoid retokenization if we modified the selector above 11970 ( compiled || compile( selector, match ) )( 11971 seed, 11972 context, 11973 !documentIsHTML, 11974 results, 11975 !context || rsibling.test( selector ) && testContext( context.parentNode ) || context 11976 ); 11977 return results; 11978}; 11979 11980// One-time assignments 11981 11982// Sort stability 11983support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; 11984 11985// Support: Chrome 14-35+ 11986// Always assume duplicates if they aren't passed to the comparison function 11987support.detectDuplicates = !!hasDuplicate; 11988 11989// Initialize against the default document 11990setDocument(); 11991 11992// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 11993// Detached nodes confoundingly follow *each other* 11994support.sortDetached = assert(function(
vendor: 3,544 bytes, lines 11994-12147
11994div1 ) { 11995 // Should return 1, but returns 4 (following) 11996 return div1.compareDocumentPosition( document.createElement("div") ) & 1; 11997}); 11998 11999// Support: IE<8 12000// Prevent attribute/property "interpolation" 12001// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 12002if ( !assert(function( div ) { 12003 div.innerHTML = "<a href='#'></a>"; 12004 return div.firstChild.getAttribute("href") === "#" ; 12005}) ) { 12006 addHandle( "type|href|height|width", function( elem, name, isXML ) { 12007 if ( !isXML ) { 12008 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); 12009 } 12010 }); 12011} 12012 12013// Support: IE<9 12014// Use defaultValue in place of getAttribute("value") 12015if ( !support.attributes || !assert(function( div ) { 12016 div.innerHTML = "<input/>"; 12017 div.firstChild.setAttribute( "value", "" ); 12018 return div.firstChild.getAttribute( "value" ) === ""; 12019}) ) { 12020 addHandle( "value", function( elem, name, isXML ) { 12021 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { 12022 return elem.defaultValue; 12023 } 12024 }); 12025} 12026 12027// Support: IE<9 12028// Use getAttributeNode to fetch booleans when getAttribute lies 12029if ( !assert(function( div ) { 12030 return div.getAttribute("disabled") == null; 12031}) ) { 12032 addHandle( booleans, function( elem, name, isXML ) { 12033 var val; 12034 if ( !isXML ) { 12035 return elem[ name ] === true ? name.toLowerCase() : 12036 (val = elem.getAttributeNode( name )) && val.specified ? 12037 val.value : 12038 null; 12039 } 12040 }); 12041} 12042 12043return Sizzle; 12044 12045})( window ); 12046 12047 12048 12049jQuery.find = Sizzle; 12050jQuery.expr = Sizzle.selectors; 12051jQuery.expr[ ":" ] = jQuery.expr.pseudos; 12052jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 12053jQuery.text = Sizzle.getText; 12054jQuery.isXMLDoc = Sizzle.isXML; 12055jQuery.contains = Sizzle.contains; 12056 12057 12058 12059var dir = function( elem, dir, until ) { 12060 var matched = [], 12061 truncate = until !== undefined; 12062 12063 while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { 12064 if ( elem.nodeType === 1 ) { 12065 if ( truncate && jQuery( elem ).is( until ) ) { 12066 break; 12067 } 12068 matched.push( elem ); 12069 } 12070 } 12071 return matched; 12072}; 12073 12074 12075var siblings = function( n, elem ) { 12076 var matched = []; 12077 12078 for ( ; n; n = n.nextSibling ) { 12079 if ( n.nodeType === 1 && n !== elem ) { 12080 matched.push( n ); 12081 } 12082 } 12083 12084 return matched; 12085}; 12086 12087 12088var rneedsContext = jQuery.expr.match.needsContext; 12089 12090var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); 12091 12092 12093 12094var risSimple = /^.[^:#\[\.,]*$/; 12095 12096// Implement the identical functionality for filter and not 12097function winnow( elements, qualifier, not ) { 12098 if ( jQuery.isFunction( qualifier ) ) { 12099 return jQuery.grep( elements, function( elem, i ) { 12100 /* jshint -W018 */ 12101 return !!qualifier.call( elem, i, elem ) !== not; 12102 } ); 12103 12104 } 12105 12106 if ( qualifier.nodeType ) { 12107 return jQuery.grep( elements, function( elem ) { 12108 return ( elem === qualifier ) !== not; 12109 } ); 12110 12111 } 12112 12113 if ( typeof qualifier === "string" ) { 12114 if ( risSimple.test( qualifier ) ) { 12115 return jQuery.filter( qualifier, elements, not ); 12116 } 12117 12118 qualifier = jQuery.filter( qualifier, elements ); 12119 } 12120 12121 return jQuery.grep( elements, function( elem ) { 12122 return ( indexOf.call( qualifier, elem ) > -1 ) !== not; 12123 } ); 12124} 12125 12126jQuery.filter = function( expr, elems, not ) { 12127 var elem = elems[ 0 ]; 12128 12129 if ( not ) { 12130 expr = ":not(" + expr + ")"; 12131 } 12132 12133 return elems.length === 1 && elem.nodeType === 1 ? 12134 jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : 12135 jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { 12136 return elem.nodeType === 1; 12137 } ) ); 12138}; 12139 12140jQuery.fn.extend( { 12141 find: function( selector ) { 12142 var i, 12143 len = this.length, 12144 ret = [], 12145 self = this; 12146 12147 if ( typeof selector !== "string" ) {
12148 return this.pushStack( jQuery( selector ).filter( function() { 12149 for ( i = 0; i < len; i++ ) { 12150 if ( jQuery.contains( self[ i ], this ) ) { 12151 return true; 12152 } 12153 } 12154 } ) ); 12155 } 12156 12157 for ( i = 0; i < len; i++ ) { 12158 jQuery.find( selector, self[ i ], ret ); 12159 } 12160 12161 // Needed because $( selector, context ) becomes $( context ).find( selector ) 12162 ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); 12163 ret.selector = this.selector ? this.selector + " " + selector : selector; 12164 return ret; 12165 }, 12166 filter: function( selector ) { 12167 return this.pushStack( winnow( this, selector || [], false ) ); 12168 }, 12169 not: function( selector ) { 12170 return this.pushStack( winnow( this, selector || [], true ) ); 12171 }, 12172 is: function( selector ) { 12173 return !!winnow( 12174 this, 12175 12176 // If this is a positional/relative selector, check membership in the returned set 12177 // so $("p:first").is("p:last") won't return true for a doc with two "p". 12178 typeof selector === "string" && rneedsContext.test( selector ) ? 12179 jQuery( selector ) : 12180 selector || [], 12181 false 12182 ).length; 12183 } 12184} ); 12185 12186 12187// Initialize a jQuery object 12188 12189 12190// A central reference to the root jQuery(document) 12191var rootjQuery, 12192 12193 // A simple way to check for HTML strings 12194 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 12195 // Strict HTML recognition (#11290: must start with <) 12196 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, 12197 12198 init = jQuery.fn.init = function( selector, context, root ) { 12199 var match, elem; 12200 12201 // HANDLE: $(""), $(null), $(undefined), $(false) 12202 if ( !selector ) { 12203 return this; 12204 } 12205 12206 // Method init() accepts an alternate rootjQuery 12207 // so migrate can support jQuery.sub (gh-2101) 12208 root = root || rootjQuery; 12209 12210 // Handle HTML strings 12211 if ( typeof selector === "string" ) { 12212 if ( selector[ 0 ] === "<" && 12213 selector[ selector.length - 1 ] === ">" && 12214 selector.length >= 3 ) { 12215 12216 // Assume that strings that start and end with <> are HTML and skip the regex check 12217 match = [ null, selector, null ]; 12218 12219 } else { 12220 match = rquickExpr.exec( selector ); 12221 } 12222 12223 // Match html or make sure no context is specified for #id 12224 if ( match && ( match[ 1 ] || !context ) ) { 12225 12226 // HANDLE: $(html) -> $(array) 12227 if ( match[ 1 ] ) { 12228 context = context instanceof jQuery ? context[ 0 ] : context; 12229 12230 // Option to run scripts is true for back-compat 12231 // Intentionally let the error be thrown if parseHTML is not present 12232 jQuery.merge( this, jQuery.parseHTML( 12233 match[ 1 ], 12234 context && context.nodeType ? context.ownerDocument || context : document, 12235 true 12236 ) ); 12237 12238 // HANDLE: $(html, props) 12239 if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { 12240 for ( match in context ) { 12241 12242 // Properties of context are called as methods if possible 12243 if ( jQuery.isFunction( this[ match ] ) ) { 12244 this[ match ]( context[ match ] ); 12245 12246 // ...and otherwise set as attributes 12247 } else { 12248 this.attr( match, context[ match ] ); 12249 } 12250 } 12251 } 12252 12253 return this; 12254 12255 // HANDLE: $(#id) 12256 } else { 12257 elem = document.getElementById( match[ 2 ] ); 12258 12259 // Support: Blackberry 4.6 12260 // gEBID returns nodes no longer in the document (#6963) 12261 if ( elem && elem.parentNode ) { 12262 12263 // Inject the element directly into the jQuery object 12264 this.length = 1; 12265 this[ 0 ] = elem; 12266 } 12267 12268 this.context = document; 12269 this.selector = selector; 12270 return this; 12271 } 12272 12273 // HANDLE: $(expr, $(...)) 12274 } else if ( !context || context.jquery ) { 12275 return ( context || root ).find( selector ); 12276 12277 // HANDLE: $(expr, context) 12278 // (which is just equivalent to: $(context).find(expr) 12279 } else { 12280 return this.constructor( context ).find( selector ); 12281 } 12282 12283 // HANDLE: $(DOMElement) 12284 } else if ( selector.nodeType ) { 12285 this.context = this[ 0 ] = selector; 12286 this.length = 1; 12287 return this; 12288 12289 // HANDLE: $(function) 12290 // Shortcut for document ready 12291 } else if ( jQuery.isFunction( selector ) ) { 12292 return root.ready !== undefined ? 12293 root.ready( selector ) : 12294 12295 // Execute immediately if ready is not present 12296 selector( jQuery ); 12297 } 12298 12299 if ( selector.selector !== undefined ) { 12300 this.selector = selector.selector; 12301 this.context = selector.context; 12302 } 12303 12304 return jQuery.makeArray( selector, this ); 12305 }; 12306 12307// Give the init function the jQuery prototype for later instantiation 12308init.prototype = jQuery.fn; 12309 12310// Initialize central reference 12311rootjQuery = jQuery( document ); 12312 12313 12314var rparentsprev = /^(?:parents|prev(?:Until|All))/, 12315 12316 // Methods guaranteed to produce a unique set when starting from a unique set 12317 guaranteedUnique = { 12318 children: true, 12319 contents: true, 12320 next: true, 12321 prev: true 12322 }; 12323 12324jQuery.fn.extend( { 12325 has: function( target ) { 12326 var targets = jQuery( target, this ), 12327 l = targets.length; 12328 12329 return this.filter( function() { 12330 var i = 0; 12331 for ( ; i < l; i++ ) { 12332 if ( jQuery.contains( this, targets[ i ] ) ) { 12333 return true; 12334 } 12335 } 12336 } ); 12337 }, 12338 12339 closest: function( selectors, context ) { 12340 var cur, 12341 i = 0, 12342 l = this.length, 12343 matched = [], 12344 pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
vendor: 5,466 bytes, lines 12345-12558
12345 jQuery( selectors, context || this.context ) : 12346 0; 12347 12348 for ( ; i < l; i++ ) { 12349 for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { 12350 12351 // Always skip document fragments 12352 if ( cur.nodeType < 11 && ( pos ? 12353 pos.index( cur ) > -1 : 12354 12355 // Don't pass non-elements to Sizzle 12356 cur.nodeType === 1 && 12357 jQuery.find.matchesSelector( cur, selectors ) ) ) { 12358 12359 matched.push( cur ); 12360 break; 12361 } 12362 } 12363 } 12364 12365 return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); 12366 }, 12367 12368 // Determine the position of an element within the set 12369 index: function( elem ) { 12370 12371 // No argument, return index in parent 12372 if ( !elem ) { 12373 return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; 12374 } 12375 12376 // Index in selector 12377 if ( typeof elem === "string" ) { 12378 return indexOf.call( jQuery( elem ), this[ 0 ] ); 12379 } 12380 12381 // Locate the position of the desired element 12382 return indexOf.call( this, 12383 12384 // If it receives a jQuery object, the first element is used 12385 elem.jquery ? elem[ 0 ] : elem 12386 ); 12387 }, 12388 12389 add: function( selector, context ) { 12390 return this.pushStack( 12391 jQuery.uniqueSort( 12392 jQuery.merge( this.get(), jQuery( selector, context ) ) 12393 ) 12394 ); 12395 }, 12396 12397 addBack: function( selector ) { 12398 return this.add( selector == null ? 12399 this.prevObject : this.prevObject.filter( selector ) 12400 ); 12401 } 12402} ); 12403 12404function sibling( cur, dir ) { 12405 while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} 12406 return cur; 12407} 12408 12409jQuery.each( { 12410 parent: function( elem ) { 12411 var parent = elem.parentNode; 12412 return parent && parent.nodeType !== 11 ? parent : null; 12413 }, 12414 parents: function( elem ) { 12415 return dir( elem, "parentNode" ); 12416 }, 12417 parentsUntil: function( elem, i, until ) { 12418 return dir( elem, "parentNode", until ); 12419 }, 12420 next: function( elem ) { 12421 return sibling( elem, "nextSibling" ); 12422 }, 12423 prev: function( elem ) { 12424 return sibling( elem, "previousSibling" ); 12425 }, 12426 nextAll: function( elem ) { 12427 return dir( elem, "nextSibling" ); 12428 }, 12429 prevAll: function( elem ) { 12430 return dir( elem, "previousSibling" ); 12431 }, 12432 nextUntil: function( elem, i, until ) { 12433 return dir( elem, "nextSibling", until ); 12434 }, 12435 prevUntil: function( elem, i, until ) { 12436 return dir( elem, "previousSibling", until ); 12437 }, 12438 siblings: function( elem ) { 12439 return siblings( ( elem.parentNode || {} ).firstChild, elem ); 12440 }, 12441 children: function( elem ) { 12442 return siblings( elem.firstChild ); 12443 }, 12444 contents: function( elem ) { 12445 return elem.contentDocument || jQuery.merge( [], elem.childNodes ); 12446 } 12447}, function( name, fn ) { 12448 jQuery.fn[ name ] = function( until, selector ) { 12449 var matched = jQuery.map( this, fn, until ); 12450 12451 if ( name.slice( -5 ) !== "Until" ) { 12452 selector = until; 12453 } 12454 12455 if ( selector && typeof selector === "string" ) { 12456 matched = jQuery.filter( selector, matched ); 12457 } 12458 12459 if ( this.length > 1 ) { 12460 12461 // Remove duplicates 12462 if ( !guaranteedUnique[ name ] ) { 12463 jQuery.uniqueSort( matched ); 12464 } 12465 12466 // Reverse order for parents* and prev-derivatives 12467 if ( rparentsprev.test( name ) ) { 12468 matched.reverse(); 12469 } 12470 } 12471 12472 return this.pushStack( matched ); 12473 }; 12474} ); 12475var rnotwhite = ( /\S+/g ); 12476 12477 12478 12479// Convert String-formatted options into Object-formatted ones 12480function createOptions( options ) { 12481 var object = {}; 12482 jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { 12483 object[ flag ] = true; 12484 } ); 12485 return object; 12486} 12487 12488/* 12489 * Create a callback list using the following parameters: 12490 * 12491 * options: an optional list of space-separated options that will change how 12492 * the callback list behaves or a more traditional option object 12493 * 12494 * By default a callback list will act like an event callback list and can be 12495 * "fired" multiple times. 12496 * 12497 * Possible options: 12498 * 12499 * once: will ensure the callback list can only be fired once (like a Deferred) 12500 * 12501 * memory: will keep track of previous values and will call any callback added 12502 * after the list has been fired right away with the latest "memorized" 12503 * values (like a Deferred) 12504 * 12505 * unique: will ensure a callback can only be added once (no duplicate in the list) 12506 * 12507 * stopOnFalse: interrupt callings when a callback returns false 12508 * 12509 */ 12510jQuery.Callbacks = function( options ) { 12511 12512 // Convert options from String-formatted to Object-formatted if needed 12513 // (we check in cache first) 12514 options = typeof options === "string" ? 12515 createOptions( options ) : 12516 jQuery.extend( {}, options ); 12517 12518 var // Flag to know if list is currently firing 12519 firing, 12520 12521 // Last fire value for non-forgettable lists 12522 memory, 12523 12524 // Flag to know if list was already fired 12525 fired, 12526 12527 // Flag to prevent firing 12528 locked, 12529 12530 // Actual callback list 12531 list = [], 12532 12533 // Queue of execution data for repeatable lists 12534 queue = [], 12535 12536 // Index of currently firing callback (modified by add/remove as needed) 12537 firingIndex = -1, 12538 12539 // Fire callbacks 12540 fire = function() { 12541 12542 // Enforce single-firing 12543 locked = options.once; 12544 12545 // Execute callbacks for all pending executions, 12546 // respecting firingIndex overrides and runtime changes 12547 fired = firing = true; 12548 for ( ; queue.length; firingIndex = -1 ) { 12549 memory = queue.shift(); 12550 while ( ++firingIndex < list.length ) { 12551 12552 // Run callback and check for early termination 12553 if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && 12554 options.stopOnFalse ) { 12555 12556 // Jump to end and forget the data so .add doesn't re-fire 12557 firingIndex = list.length; 12558 memory = false;
12559 } 12560 } 12561 } 12562 12563 // Forget the data if we're done with it 12564 if ( !options.memory ) { 12565 memory = false; 12566 } 12567 12568 firing = false; 12569 12570 // Clean up if we're done firing for good 12571 if ( locked ) { 12572 12573 // Keep an empty list if we have data for future add calls 12574 if ( memory ) { 12575 list = []; 12576 12577 // Otherwise, this object is spent 12578 } else { 12579 list = ""; 12580 } 12581 } 12582 }, 12583 12584 // Actual Callbacks object 12585 self = { 12586 12587 // Add a callback or a collection of callbacks to the list 12588 add: function() { 12589 if ( list ) { 12590 12591 // If we have memory from a past run, we should fire after adding 12592 if ( memory && !firing ) { 12593 firingIndex = list.length - 1; 12594 queue.push( memory ); 12595 } 12596 12597 ( function add( args ) { 12598 jQuery.each( args, function( _, arg ) { 12599 if ( jQuery.isFunction( arg ) ) { 12600 if ( !options.unique || !self.has( arg ) ) { 12601 list.push( arg ); 12602 } 12603 } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { 12604 12605 // Inspect recursively 12606 add( arg ); 12607 } 12608 } ); 12609 } )( arguments ); 12610 12611 if ( memory && !firing ) { 12612 fire(); 12613 } 12614 } 12615 return this; 12616 }, 12617 12618 // Remove a callback from the list 12619 remove: function() { 12620 jQuery.each( arguments, function( _, arg ) { 12621 var index; 12622 while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { 12623 list.splice( index, 1 ); 12624 12625 // Handle firing indexes 12626 if ( index <= firingIndex ) { 12627 firingIndex--; 12628 } 12629 } 12630 } ); 12631 return this; 12632 }, 12633 12634 // Check if a given callback is in the list. 12635 // If no argument is given, return whether or not list has callbacks attached. 12636 has: function( fn ) { 12637 return fn ? 12638 jQuery.inArray( fn, list ) > -1 : 12639 list.length > 0; 12640 }, 12641 12642 // Remove all callbacks from the list 12643 empty: function() { 12644 if ( list ) { 12645 list = []; 12646 } 12647 return this; 12648 }, 12649 12650 // Disable .fire and .add 12651 // Abort any current/pending executions 12652 // Clear all callbacks and values 12653 disable: function() { 12654 locked = queue = []; 12655 list = memory = ""; 12656 return this; 12657 }, 12658 disabled: function() { 12659 return !list; 12660 }, 12661 12662 // Disable .fire 12663 // Also disable .add unless we have memory (since it would have no effect) 12664 // Abort any pending executions 12665 lock: function() { 12666 locked = queue = []; 12667 if ( !memory ) { 12668 list = memory = ""; 12669 } 12670 return this; 12671 }, 12672 locked: function() { 12673 return !!locked; 12674 }, 12675 12676 // Call all callbacks with the given context and arguments 12677 fireWith: function( context, args ) { 12678 if ( !locked ) { 12679 args = args || []; 12680 args = [ context, args.slice ? args.slice() : args ]; 12681 queue.push( args ); 12682 if ( !firing ) { 12683 fire(); 12684 } 12685 } 12686 return this; 12687 }, 12688 12689 // Call all the callbacks with the given arguments 12690 fire: function() { 12691 self.fireWith( this, arguments ); 12692 return this; 12693 }, 12694 12695 // To know if the callbacks have already been called at least once 12696 fired: function() { 12697 return !!fired; 12698 } 12699 }; 12700 12701 return self; 12702}; 12703 12704 12705jQuery.extend( { 12706 12707 Deferred: function( func ) { 12708 var tuples = [ 12709 12710 // action, add listener, listener list, final state 12711 [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], 12712 [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], 12713 [ "notify", "progress", jQuery.Callbacks( "memory" ) ] 12714 ], 12715 state = "pending", 12716 promise = { 12717 state: function() { 12718 return state; 12719 }, 12720 always: function() { 12721 deferred.done( arguments ).fail( arguments ); 12722 return this; 12723 }, 12724 then: function( /* fnDone, fnFail, fnProgress */ ) { 12725 var fns = arguments; 12726 return jQuery.Deferred( function( newDefer ) { 12727 jQuery.each( tuples, function( i, tuple ) { 12728 var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; 12729 12730 // deferred[ done | fail | progress ] for forwarding actions to newDefer 12731 deferred[ tuple[ 1 ] ]( function() { 12732 var returned = fn && fn.apply( this, arguments ); 12733 if ( returned && jQuery.isFunction( returned.promise ) ) { 12734 returned.promise() 12735 .progress( newDefer.notify ) 12736 .done( newDefer.resolve ) 12737 .fail( newDefer.reject ); 12738 } else { 12739 newDefer[ tuple[ 0 ] + "With" ]( 12740 this === promise ? newDefer.promise() : this, 12741 fn ? [ returned ] : arguments 12742 ); 12743 } 12744 } ); 12745 } ); 12746 fns = null; 12747 } ).promise(); 12748 }, 12749 12750 // Get a promise for this deferred 12751 // If obj is provided, the promise aspect is added to the object 12752 promise: function( obj ) { 12753 return obj != null ? jQuery.extend( obj, promise ) : promise; 12754 } 12755 }, 12756 deferred = {}; 12757 12758 // Keep pipe for back-compat 12759 promise.pipe = promise.then; 12760 12761 // Add list-specific methods 12762 jQuery.each( tuples, function( i, tuple ) { 12763 var list = tuple[ 2 ], 12764 stateString = tuple[ 3 ]; 12765 12766 // promise[ done | fail | progress ] = list.add 12767 promise[ tuple[ 1 ] ] = list.add; 12768 12769 // Handle state 12770 if ( stateString ) { 12771 list.add( function() { 12772 12773 // state = [ resolved | rejected ] 12774 state = stateString; 12775 12776 // [ reject_list | resolve_list ].disable; progress_list.lock 12777 }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); 12778 } 12779 12780 // deferred[ resolve | reject | notify ] 12781 deferred[ tuple[ 0 ] ] = function() { 12782 deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); 12783 return this; 12784 }; 12785 deferred[ tuple[ 0 ] + "With" ] = list.fireWith; 12786 } ); 12787 12788 // Make the deferred a promise 12789 promise.promise( deferred ); 12790 12791 // Call given func if any 12792 if ( func ) { 12793 func.call( deferred, deferred ); 12794 } 12795 12796 // All done! 12797 return deferred; 12798 }, 12799 12800 // Deferred helper 12801 when: function( subordinate /* , ..., subordinateN */ ) { 12802 var i = 0, 12803 resolveValues = slice.call( arguments ), 12804 length = resolveValues.length, 12805 12806 // the count of uncompleted subordinates 12807 remaining = length !== 1 || 12808 ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, 12809 12810 // the master Deferred. 12811 // If resolveValues consist of only a single Deferred, just use that. 12812 deferred = remaining === 1 ? subordinate : jQuery.Deferred(), 12813 12814 // Update function for both resolve and progress values 12815 updateFunc = function( i, contexts, values ) { 12816 return function( value ) { 12817 contexts[ i ] = this; 12818 values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; 12819 if ( values === progressValues ) { 12820 deferred.notifyWith( contexts, values ); 12821 } else if ( !( --remaining ) ) { 12822 deferred.resolveWith( contexts, values ); 12823 } 12824 }; 12825 }, 12826 12827 progressValues, progressContexts, resolveContexts; 12828 12829 // Add listeners to Deferred subordinates; treat others as resolved 12830 if ( length > 1 ) { 12831 progressValues = new Array( length ); 12832 progressContexts = new Array( length ); 12833 resolveContexts = new Array( length ); 12834 for ( ; i < length; i++ ) { 12835 if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { 12836 resolveValues[ i ].promise() 12837 .progress( updateFunc( i, progressContexts, progressValues ) ) 12838 .done( updateFunc( i, resolveContexts, resolveValues ) ) 12839 .fail( deferred.reject ); 12840 } else { 12841 --remaining; 12842 } 12843 } 12844 } 12845 12846 // If we're not waiting on anything, resolve the master 12847 if ( !remaining ) {
12848 deferred.resolveWith( resolveContexts, resolveValues ); 12849 } 12850 12851 return deferred.promise(); 12852 } 12853} ); 12854 12855 12856// The deferred used on DOM ready 12857var readyList; 12858 12859jQuery.fn.ready = function( fn ) { 12860 12861 // Add the callback 12862 jQuery.ready.promise().done( fn ); 12863 12864 return this; 12865}; 12866 12867jQuery.extend( { 12868 12869 // Is the DOM ready to be used? Set to true once it occurs. 12870 isReady: false, 12871 12872 // A counter to track how many items to wait for before 12873 // the ready event fires. See #6781 12874 readyWait: 1, 12875 12876 // Hold (or release) the ready event 12877 holdReady: function( hold ) { 12878 if ( hold ) { 12879 jQuery.readyWait++; 12880 } else { 12881 jQuery.ready( true ); 12882 } 12883 }, 12884 12885 // Handle when the DOM is ready 12886 ready: function( wait ) { 12887 12888 // Abort if there are pending holds or we're already ready 12889 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 12890 return; 12891 } 12892 12893 // Remember that the DOM is ready 12894 jQuery.isReady = true; 12895 12896 // If a normal DOM Ready event fired, decrement, and wait if need be 12897 if ( wait !== true && --jQuery.readyWait > 0 ) { 12898 return; 12899 } 12900 12901 // If there are functions bound, to execute 12902 readyList.resolveWith( document, [ jQuery ] ); 12903 12904 // Trigger any bound ready events 12905 if ( jQuery.fn.triggerHandler ) { 12906 jQuery( document ).triggerHandler( "ready" ); 12907 jQuery( document ).off( "ready" ); 12908 } 12909 } 12910} ); 12911 12912/** 12913 * The ready event handler and self cleanup method 12914 */ 12915function completed() { 12916 document.removeEventListener( "DOMContentLoaded", completed ); 12917 window.removeEventListener( "load", completed ); 12918 jQuery.ready(); 12919} 12920 12921jQuery.ready.promise = function( obj ) { 12922 if ( !readyList ) { 12923 12924 readyList = jQuery.Deferred(); 12925 12926 // Catch cases where $(document).ready() is called 12927 // after the browser event has already occurred.
12928 // Support: IE9-10 only 12929 // Older IE sometimes signals "interactive" too soon 12930 if ( document.readyState === "complete" || 12931 ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { 12932 12933 // Handle it asynchronously to allow scripts the opportunity to delay ready 12934 window.setTimeout( jQuery.ready ); 12935 12936 } else { 12937 12938 // Use the handy event callback 12939 document.addEventListener( "DOMContentLoaded", completed ); 12940 12941 // A fallback to window.onload, that will always work 12942 window.addEventListener( "load", completed ); 12943 } 12944 } 12945 return readyList.promise( obj ); 12946}; 12947 12948// Kick off the DOM ready check even if the user does not 12949jQuery.ready.promise(); 12950 12951 12952 12953 12954// Multifunctional method to get and set values of a collection 12955// The value/s can optionally be executed if it's a function 12956var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 12957 var i = 0, 12958 len = elems.length, 12959 bulk = key == null; 12960 12961 // Sets many values 12962 if ( jQuery.type( key ) === "object" ) { 12963 chainable = true; 12964 for ( i in key ) { 12965 access( elems, fn, i, key[ i ], true, emptyGet, raw ); 12966 } 12967 12968 // Sets one value 12969 } else if ( value !== undefined ) { 12970 chainable = true; 12971 12972 if ( !jQuery.isFunction( value ) ) { 12973 raw = true; 12974 } 12975 12976 if ( bulk ) { 12977 12978 // Bulk operations run against the entire set 12979 if ( raw ) { 12980 fn.call( elems, value ); 12981 fn = null; 12982 12983 // ...except when executing function values 12984 } else { 12985 bulk = fn; 12986 fn = function( elem, key, value ) { 12987 return bulk.call( jQuery( elem ), value ); 12988 }; 12989 } 12990 } 12991 12992 if ( fn ) { 12993 for ( ; i < len; i++ ) { 12994 fn( 12995 elems[ i ], key, raw ? 12996 value : 12997 value.call( elems[ i ], i, fn( elems[ i ], key ) ) 12998 ); 12999 } 13000 } 13001 } 13002 13003 return chainable ? 13004 elems : 13005 13006 // Gets 13007 bulk ? 13008 fn.call( elems ) : 13009 len ? fn( elems[ 0 ], key ) : emptyGet; 13010}; 13011var acceptData = function( owner ) { 13012 13013 // Accepts only: 13014 // - Node 13015 // - Node.ELEMENT_NODE 13016 // - Node.DOCUMENT_NODE 13017 // - Object 13018 // - Any 13019 /* jshint -W018 */ 13020 return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 13021}; 13022 13023 13024 13025 13026function Data() { 13027 this.expando = jQuery.expando + Data.uid++; 13028} 13029 13030Data.uid = 1; 13031 13032Data.prototype = { 13033 13034 register: function( owner, initial ) { 13035 var value = initial || {}; 13036 13037 // If it is a node unlikely to be stringify-ed or looped over 13038 // use plain assignment 13039 if ( owner.nodeType ) { 13040 owner[ this.expando ] = value; 13041 13042 // Otherwise secure it in a non-enumerable, non-writable property 13043 // configurability must be true to allow the property to be 13044 // deleted with the delete operator 13045 } else { 13046 Object.defineProperty( owner, this.expando, { 13047 value: value, 13048 writable: true, 13049 configurable: true 13050 } ); 13051 } 13052 return owner[ this.expando ]; 13053 }, 13054 cache: function( owner ) { 13055 13056 // We can accept data for non-element nodes in modern browsers, 13057 // but we should not, see #8335. 13058 // Always return an empty object. 13059 if ( !acceptData( owner ) ) { 13060 return {}; 13061 } 13062 13063 // Check if the owner object already has a cache 13064 var value = owner[ this.expando ]; 13065 13066 // If not, create one 13067 if ( !value ) { 13068 value = {}; 13069 13070 // We can accept data for non-element nodes in modern browsers, 13071 // but we should not, see #8335. 13072 // Always return an empty object. 13073 if ( acceptData( owner ) ) { 13074 13075 // If it is a node unlikely to be stringify-ed or looped over 13076 // use plain assignment 13077 if ( owner.nodeType ) { 13078 owner[ this.expando ] = value; 13079 13080 // Otherwise secure it in a non-enumerable property 13081 // configurable must be true to allow the property to be 13082 // deleted when data is removed 13083 } else { 13084 Object.defineProperty( owner, this.expando, { 13085 value: value, 13086 configurable: true 13087 } ); 13088 } 13089 } 13090 } 13091 13092 return value; 13093 }, 13094 set: function( owner, data, value ) { 13095 var prop, 13096 cache = this.cache( owner ); 13097 13098 // Handle: [ owner, key, value ] args 13099 if ( typeof data === "string" ) { 13100 cache[ data ] = value; 13101 13102 // Handle: [ owner, { properties } ] args 13103 } else { 13104 13105 // Copy the properties one-by-one to the cache object 13106 for ( prop in data ) { 13107 cache[ prop ] = data[ prop ]; 13108 } 13109 } 13110 return cache; 13111 }, 13112 get: function( owner, key ) { 13113 return key === undefined ? 13114 this.cache( owner ) : 13115 owner[ this.expando ] && owner[ this.expando ][ key ]; 13116 }, 13117 access: function( owner, key, value ) { 13118 var stored; 13119 13120 // In cases where either: 13121 // 13122 // 1. No key was specified
13123 // 2. A string key was specified, but no value provided 13124 // 13125 // Take the "read" path and allow the get method to determine 13126 // which value to return, respectively either: 13127 // 13128 // 1. The entire cache object 13129 // 2. The data stored at the key 13130 // 13131 if ( key === undefined || 13132 ( ( key && typeof key === "string" ) && value === undefined ) ) { 13133 13134 stored = this.get( owner, key ); 13135 13136 return stored !== undefined ? 13137 stored : this.get( owner, jQuery.camelCase( key ) ); 13138 } 13139 13140 // When the key is not a string, or both a key and value 13141 // are specified, set or extend (existing objects) with either: 13142 // 13143 // 1. An object of properties 13144 // 2. A key and value 13145 // 13146 this.set( owner, key, value ); 13147 13148 // Since the "set" path can have two possible entry points 13149 // return the expected data based on which path was taken[*] 13150 return value !== undefined ? value : key; 13151 }, 13152 remove: function( owner, key ) { 13153 var i, name, camel, 13154 cache = owner[ this.expando ]; 13155 13156 if ( cache === undefined ) { 13157 return; 13158 } 13159 13160 if ( key === undefined ) { 13161 this.register( owner ); 13162 13163 } else { 13164 13165 // Support array or space separated string of keys 13166 if ( jQuery.isArray( key ) ) { 13167 13168 // If "name" is an array of keys... 13169 // When data is initially created, via ("key", "val") signature, 13170 // keys will be converted to camelCase. 13171 // Since there is no way to tell _how_ a key was added, remove 13172 // both plain key and camelCase key. #12786 13173 // This will only penalize the array argument path. 13174 name = key.concat( key.map( jQuery.camelCase ) ); 13175 } else { 13176 camel = jQuery.camelCase( key ); 13177 13178 // Try the string as a key before any manipulation 13179 if ( key in cache ) { 13180 name = [ key, camel ]; 13181 } else { 13182 13183 // If a key with the spaces exists, use it. 13184 // Otherwise, create an array by matching non-whitespace 13185 name = camel; 13186 name = name in cache ? 13187 [ name ] : ( name.match( rnotwhite ) || [] ); 13188 } 13189 } 13190 13191 i = name.length; 13192 13193 while ( i-- ) { 13194 delete cache[ name[ i ] ]; 13195 } 13196 } 13197 13198 // Remove the expando if there's no more data 13199 if ( key === undefined || jQuery.isEmptyObject( cache ) ) { 13200 13201 // Support: Chrome <= 35-45+ 13202 // Webkit & Blink performance suffers when deleting properties 13203 // from DOM nodes, so set to undefined instead 13204 // https://code.google.com/p/chromium/issues/detail?id=378607 13205 if ( owner.nodeType ) { 13206 owner[ this.expando ] = undefined; 13207 } else { 13208 delete owner[ this.expando ]; 13209 } 13210 } 13211 }, 13212 hasData: function( owner ) { 13213 var cache = owner[ this.expando ]; 13214 return cache !== undefined && !jQuery.isEmptyObject( cache ); 13215 } 13216}; 13217var dataPriv = new Data(); 13218 13219var dataUser = new Data(); 13220 13221 13222 13223// Implementation Summary 13224// 13225// 1. Enforce API surface and semantic compatibility with 1.9.x branch 13226// 2. Improve the module's maintainability by reducing the storage 13227// paths to a single mechanism. 13228// 3. Use the same single mechanism to support "private" and "user" data. 13229// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 13230// 5. Avoid exposing implementation details on user objects (eg. expando properties) 13231// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 13232 13233var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 13234 rmultiDash = /[A-Z]/g; 13235 13236function dataAttr( elem, key, data ) { 13237 var name; 13238 13239 // If nothing was found internally, try to fetch any 13240 // data from the HTML5 data-* attribute 13241 if ( data === undefined && elem.nodeType === 1 ) { 13242 name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); 13243 data = elem.getAttribute( name ); 13244 13245 if ( typeof data === "string" ) { 13246 try { 13247 data = data === "true" ? true : 13248 data === "false" ? false : 13249 data === "null" ? null : 13250 13251 // Only convert to a number if it doesn't change the string 13252 +data + "" === data ? +data : 13253 rbrace.test( data ) ? jQuery.parseJSON( data ) : 13254 data; 13255 } catch ( e ) {} 13256 13257 // Make sure we set the data so it isn't changed later 13258 dataUser.set( elem, key, data ); 13259 } else { 13260 data = undefined; 13261 } 13262 } 13263 return data; 13264} 13265 13266jQuery.extend( { 13267 hasData: function( elem ) { 13268 return dataUser.hasData( elem ) || dataPriv.hasData( elem ); 13269 }, 13270 13271 data: function( elem, name, data ) { 13272 return dataUser.access( elem, name, data ); 13273 }, 13274 13275 removeData: function( elem, name ) { 13276 dataUser.remove( elem, name ); 13277 }, 13278 13279 // TODO: Now that all calls to _data and _removeData have been replaced 13280 // with direct calls to dataPriv methods, these can be deprecated. 13281 _data: function( elem, name, data ) { 13282 return dataPriv.access( elem, name, data ); 13283 }, 13284 13285 _removeData: function( elem, name ) { 13286 dataPriv.remove( elem, name ); 13287 } 13288} ); 13289 13290jQuery.fn.extend( { 13291 data: function( key, value ) { 13292 var i, name, data, 13293 elem = this[ 0 ], 13294 attrs = elem && elem.attributes; 13295 13296 // Gets all values 13297 if ( key === undefined ) { 13298 if ( this.length ) { 13299 data = dataUser.get( elem ); 13300 13301 if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { 13302 i = attrs.length; 13303 while ( i-- ) { 13304
13305 // Support: IE11+ 13306 // The attrs elements can be null (#14894) 13307 if ( attrs[ i ] ) { 13308 name = attrs[ i ].name; 13309 if ( name.indexOf( "data-" ) === 0 ) { 13310 name = jQuery.camelCase( name.slice( 5 ) ); 13311 dataAttr( elem, name, data[ name ] ); 13312 } 13313 } 13314 } 13315 dataPriv.set( elem, "hasDataAttrs", true ); 13316 } 13317 } 13318 13319 return data; 13320 } 13321 13322 // Sets multiple values 13323 if ( typeof key === "object" ) { 13324 return this.each( function() { 13325 dataUser.set( this, key ); 13326 } ); 13327 } 13328 13329 return access( this, function( value ) { 13330 var data, camelKey; 13331 13332 // The calling jQuery object (element matches) is not empty 13333 // (and therefore has an element appears at this[ 0 ]) and the 13334 // `value` parameter was not undefined. An empty jQuery object 13335 // will result in `undefined` for elem = this[ 0 ] which will 13336 // throw an exception if an attempt to read a data cache is made. 13337 if ( elem && value === undefined ) { 13338 13339 // Attempt to get data from the cache 13340 // with the key as-is 13341 data = dataUser.get( elem, key ) || 13342 13343 // Try to find dashed key if it exists (gh-2779) 13344 // This is for 2.2.x only 13345 dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() ); 13346 13347 if ( data !== undefined ) { 13348 return data; 13349 } 13350 13351 camelKey = jQuery.camelCase( key ); 13352 13353 // Attempt to get data from the cache 13354 // with the key camelized 13355 data = dataUser.get( elem, camelKey ); 13356 if ( data !== undefined ) { 13357 return data; 13358 } 13359 13360 // Attempt to "discover" the data in 13361 // HTML5 custom data-* attrs 13362 data = dataAttr( elem, camelKey, undefined ); 13363 if ( data !== undefined ) { 13364 return data; 13365 } 13366 13367 // We tried really hard, but the data doesn't exist. 13368 return; 13369 } 13370 13371 // Set the data... 13372 camelKey = jQuery.camelCase( key ); 13373 this.each( function() { 13374 13375 // First, attempt to store a copy or reference of any 13376 // data that might've been store with a camelCased key. 13377 var data = dataUser.get( this, camelKey ); 13378 13379 // For HTML5 data-* attribute interop, we have to 13380 // store property names with dashes in a camelCase form. 13381 // This might not apply to all properties...* 13382 dataUser.set( this, camelKey, value ); 13383 13384 // *... In the case of properties that might _actually_ 13385 // have dashes, we need to also store a copy of that 13386 // unchanged property. 13387 if ( key.indexOf( "-" ) > -1 && data !== undefined ) { 13388 dataUser.set( this, key, value ); 13389 } 13390 } ); 13391 }, null, value, arguments.length > 1, null, true ); 13392 }, 13393 13394 removeData: function( key ) { 13395 return this.each( function() { 13396 dataUser.remove( this, key ); 13397 } ); 13398 } 13399} ); 13400 13401 13402jQuery.extend( { 13403 queue: function( elem, type, data ) { 13404 var queue; 13405 13406 if ( elem ) { 13407 type = ( type || "fx" ) + "queue"; 13408 queue = dataPriv.get( elem, type ); 13409 13410 // Speed up dequeue by getting out quickly if this is just a lookup 13411 if ( data ) { 13412 if ( !queue || jQuery.isArray( data ) ) { 13413 queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); 13414 } else { 13415 queue.push( data ); 13416 } 13417 } 13418 return queue || []; 13419 } 13420 }, 13421 13422 dequeue: function( elem, type ) { 13423 type = type || "fx"; 13424 13425 var queue = jQuery.queue( elem, type ), 13426 startLength = queue.length, 13427 fn = queue.shift(), 13428 hooks = jQuery._queueHooks( elem, type ), 13429 next = function() { 13430 jQuery.dequeue( elem, type ); 13431 }; 13432 13433 // If the fx queue is dequeued, always remove the progress sentinel 13434 if ( fn === "inprogress" ) { 13435 fn = queue.shift(); 13436 startLength--; 13437 } 13438 13439 if ( fn ) { 13440 13441 // Add a progress sentinel to prevent the fx queue from being 13442 // automatically dequeued 13443 if ( type === "fx" ) { 13444 queue.unshift( "inprogress" ); 13445 } 13446 13447 // Clear up the last queue stop function 13448 delete hooks.stop; 13449 fn.call( elem, next, hooks ); 13450 } 13451 13452 if ( !startLength && hooks ) { 13453 hooks.empty.fire(); 13454 } 13455 }, 13456 13457 // Not public - generate a queueHooks object, or return the current one 13458 _queueHooks: function( elem, type ) { 13459 var key = type + "queueHooks"; 13460 return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { 13461 empty: jQuery.Callbacks( "once memory" ).add( function() {
vendor: 17,961 bytes, lines 13462-14133
13462 dataPriv.remove( elem, [ type + "queue", key ] ); 13463 } ) 13464 } ); 13465 } 13466} ); 13467 13468jQuery.fn.extend( { 13469 queue: function( type, data ) { 13470 var setter = 2; 13471 13472 if ( typeof type !== "string" ) { 13473 data = type; 13474 type = "fx"; 13475 setter--; 13476 } 13477 13478 if ( arguments.length < setter ) { 13479 return jQuery.queue( this[ 0 ], type ); 13480 } 13481 13482 return data === undefined ? 13483 this : 13484 this.each( function() { 13485 var queue = jQuery.queue( this, type, data ); 13486 13487 // Ensure a hooks for this queue 13488 jQuery._queueHooks( this, type ); 13489 13490 if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { 13491 jQuery.dequeue( this, type ); 13492 } 13493 } ); 13494 }, 13495 dequeue: function( type ) { 13496 return this.each( function() { 13497 jQuery.dequeue( this, type ); 13498 } ); 13499 }, 13500 clearQueue: function( type ) { 13501 return this.queue( type || "fx", [] ); 13502 }, 13503 13504 // Get a promise resolved when queues of a certain type 13505 // are emptied (fx is the type by default) 13506 promise: function( type, obj ) { 13507 var tmp, 13508 count = 1, 13509 defer = jQuery.Deferred(), 13510 elements = this, 13511 i = this.length, 13512 resolve = function() { 13513 if ( !( --count ) ) { 13514 defer.resolveWith( elements, [ elements ] ); 13515 } 13516 }; 13517 13518 if ( typeof type !== "string" ) { 13519 obj = type; 13520 type = undefined; 13521 } 13522 type = type || "fx"; 13523 13524 while ( i-- ) { 13525 tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); 13526 if ( tmp && tmp.empty ) { 13527 count++; 13528 tmp.empty.add( resolve ); 13529 } 13530 } 13531 resolve(); 13532 return defer.promise( obj ); 13533 } 13534} ); 13535var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 13536 13537var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); 13538 13539 13540var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; 13541 13542var isHidden = function( elem, el ) { 13543 13544 // isHidden might be called from jQuery#filter function; 13545 // in that case, element will be second argument 13546 elem = el || elem; 13547 return jQuery.css( elem, "display" ) === "none" || 13548 !jQuery.contains( elem.ownerDocument, elem ); 13549 }; 13550 13551 13552 13553function adjustCSS( elem, prop, valueParts, tween ) { 13554 var adjusted, 13555 scale = 1, 13556 maxIterations = 20, 13557 currentValue = tween ? 13558 function() { return tween.cur(); } : 13559 function() { return jQuery.css( elem, prop, "" ); }, 13560 initial = currentValue(), 13561 unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), 13562 13563 // Starting value computation is required for potential unit mismatches 13564 initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && 13565 rcssNum.exec( jQuery.css( elem, prop ) ); 13566 13567 if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { 13568 13569 // Trust units reported by jQuery.css 13570 unit = unit || initialInUnit[ 3 ]; 13571 13572 // Make sure we update the tween properties later on 13573 valueParts = valueParts || []; 13574 13575 // Iteratively approximate from a nonzero starting point 13576 initialInUnit = +initial || 1; 13577 13578 do { 13579 13580 // If previous iteration zeroed out, double until we get *something*. 13581 // Use string for doubling so we don't accidentally see scale as unchanged below 13582 scale = scale || ".5"; 13583 13584 // Adjust and apply 13585 initialInUnit = initialInUnit / scale; 13586 jQuery.style( elem, prop, initialInUnit + unit ); 13587 13588 // Update scale, tolerating zero or NaN from tween.cur() 13589 // Break the loop if scale is unchanged or perfect, or if we've just had enough. 13590 } while ( 13591 scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations 13592 ); 13593 } 13594 13595 if ( valueParts ) { 13596 initialInUnit = +initialInUnit || +initial || 0; 13597 13598 // Apply relative offset (+=/-=) if specified 13599 adjusted = valueParts[ 1 ] ? 13600 initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : 13601 +valueParts[ 2 ]; 13602 if ( tween ) { 13603 tween.unit = unit; 13604 tween.start = initialInUnit; 13605 tween.end = adjusted; 13606 } 13607 } 13608 return adjusted; 13609} 13610var rcheckableType = ( /^(?:checkbox|radio)$/i ); 13611 13612var rtagName = ( /<([\w:-]+)/ ); 13613 13614var rscriptType = ( /^$|\/(?:java|ecma)script/i ); 13615 13616 13617 13618// We have to close these tags to support XHTML (#13200) 13619var wrapMap = { 13620 13621 // Support: IE9 13622 option: [ 1, "<select multiple='multiple'>", "</select>" ], 13623 13624 // XHTML parsers do not magically insert elements in the 13625 // same way that tag soup parsers do. So we cannot shorten 13626 // this by omitting <tbody> or other required elements. 13627 thead: [ 1, "<table>", "</table>" ], 13628 col: [ 2, "<table><colgroup>", "</colgroup></table>" ], 13629 tr: [ 2, "<table><tbody>", "</tbody></table>" ], 13630 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], 13631 13632 _default: [ 0, "", "" ] 13633}; 13634 13635// Support: IE9 13636wrapMap.optgroup = wrapMap.option; 13637 13638wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 13639wrapMap.th = wrapMap.td; 13640 13641 13642function getAll( context, tag ) { 13643 13644 // Support: IE9-11+ 13645 // Use typeof to avoid zero-argument method invocation on host objects (#15151) 13646 var ret = typeof context.getElementsByTagName !== "undefined" ? 13647 context.getElementsByTagName( tag || "*" ) : 13648 typeof context.querySelectorAll !== "undefined" ? 13649 context.querySelectorAll( tag || "*" ) : 13650 []; 13651 13652 return tag === undefined || tag && jQuery.nodeName( context, tag ) ? 13653 jQuery.merge( [ context ], ret ) : 13654 ret; 13655} 13656 13657 13658// Mark scripts as having already been evaluated 13659function setGlobalEval( elems, refElements ) { 13660 var i = 0, 13661 l = elems.length; 13662 13663 for ( ; i < l; i++ ) { 13664 dataPriv.set( 13665 elems[ i ], 13666 "globalEval", 13667 !refElements || dataPriv.get( refElements[ i ], "globalEval" ) 13668 ); 13669 } 13670} 13671 13672 13673var rhtml = /<|&#?\w+;/; 13674 13675function buildFragment( elems, context, scripts, selection, ignored ) { 13676 var elem, tmp, tag, wrap, contains, j, 13677 fragment = context.createDocumentFragment(), 13678 nodes = [], 13679 i = 0, 13680 l = elems.length; 13681 13682 for ( ; i < l; i++ ) { 13683 elem = elems[ i ]; 13684 13685 if ( elem || elem === 0 ) { 13686 13687 // Add nodes directly 13688 if ( jQuery.type( elem ) === "object" ) { 13689 13690 // Support: Android<4.1, PhantomJS<2 13691 // push.apply(_, arraylike) throws on ancient WebKit 13692 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); 13693 13694 // Convert non-html into a text node 13695 } else if ( !rhtml.test( elem ) ) { 13696 nodes.push( context.createTextNode( elem ) ); 13697 13698 // Convert html into DOM nodes 13699 } else { 13700 tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); 13701 13702 // Deserialize a standard representation 13703 tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); 13704 wrap = wrapMap[ tag ] || wrapMap._default; 13705 tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; 13706 13707 // Descend through wrappers to the right content 13708 j = wrap[ 0 ]; 13709 while ( j-- ) { 13710 tmp = tmp.lastChild; 13711 } 13712 13713 // Support: Android<4.1, PhantomJS<2 13714 // push.apply(_, arraylike) throws on ancient WebKit 13715 jQuery.merge( nodes, tmp.childNodes ); 13716 13717 // Remember the top-level container 13718 tmp = fragment.firstChild; 13719 13720 // Ensure the created nodes are orphaned (#12392) 13721 tmp.textContent = ""; 13722 } 13723 } 13724 } 13725 13726 // Remove wrapper from fragment 13727 fragment.textContent = ""; 13728 13729 i = 0; 13730 while ( ( elem = nodes[ i++ ] ) ) { 13731 13732 // Skip elements already in the context collection (trac-4087) 13733 if ( selection && jQuery.inArray( elem, selection ) > -1 ) { 13734 if ( ignored ) { 13735 ignored.push( elem ); 13736 } 13737 continue; 13738 } 13739 13740 contains = jQuery.contains( elem.ownerDocument, elem ); 13741 13742 // Append to fragment 13743 tmp = getAll( fragment.appendChild( elem ), "script" ); 13744 13745 // Preserve script evaluation history 13746 if ( contains ) { 13747 setGlobalEval( tmp ); 13748 } 13749 13750 // Capture executables 13751 if ( scripts ) { 13752 j = 0; 13753 while ( ( elem = tmp[ j++ ] ) ) { 13754 if ( rscriptType.test( elem.type || "" ) ) { 13755 scripts.push( elem ); 13756 } 13757 } 13758 } 13759 } 13760 13761 return fragment; 13762} 13763 13764 13765( function() { 13766 var fragment = document.createDocumentFragment(), 13767 div = fragment.appendChild( document.createElement( "div" ) ), 13768 input = document.createElement( "input" ); 13769 13770 // Support: Android 4.0-4.3, Safari<=5.1 13771 // Check state lost if the name is set (#11217) 13772 // Support: Windows Web Apps (WWA) 13773 // `name` and `type` must use .setAttribute for WWA (#14901) 13774 input.setAttribute( "type", "radio" ); 13775 input.setAttribute( "checked", "checked" ); 13776 input.setAttribute( "name", "t" ); 13777 13778 div.appendChild( input ); 13779 13780 // Support: Safari<=5.1, Android<4.2 13781 // Older WebKit doesn't clone checked state correctly in fragments 13782 support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 13783 13784 // Support: IE<=11+ 13785 // Make sure textarea (and checkbox) defaultValue is properly cloned 13786 div.innerHTML = "<textarea>x</textarea>"; 13787 support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 13788} )(); 13789 13790 13791var 13792 rkeyEvent = /^key/, 13793 rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, 13794 rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 13795 13796function returnTrue() { 13797 return true; 13798} 13799 13800function returnFalse() { 13801 return false; 13802} 13803 13804// Support: IE9 13805// See #13393 for more info 13806function safeActiveElement() { 13807 try { 13808 return document.activeElement; 13809 } catch ( err ) { } 13810} 13811 13812function on( elem, types, selector, data, fn, one ) { 13813 var origFn, type; 13814 13815 // Types can be a map of types/handlers 13816 if ( typeof types === "object" ) { 13817 13818 // ( types-Object, selector, data ) 13819 if ( typeof selector !== "string" ) { 13820 13821 // ( types-Object, data ) 13822 data = data || selector; 13823 selector = undefined; 13824 } 13825 for ( type in types ) { 13826 on( elem, type, selector, data, types[ type ], one ); 13827 } 13828 return elem; 13829 } 13830 13831 if ( data == null && fn == null ) { 13832 13833 // ( types, fn ) 13834 fn = selector; 13835 data = selector = undefined; 13836 } else if ( fn == null ) { 13837 if ( typeof selector === "string" ) { 13838 13839 // ( types, selector, fn ) 13840 fn = data; 13841 data = undefined; 13842 } else { 13843 13844 // ( types, data, fn ) 13845 fn = data; 13846 data = selector; 13847 selector = undefined; 13848 } 13849 } 13850 if ( fn === false ) { 13851 fn = returnFalse; 13852 } else if ( !fn ) { 13853 return elem; 13854 } 13855 13856 if ( one === 1 ) { 13857 origFn = fn; 13858 fn = function( event ) { 13859 13860 // Can use an empty set, since event contains the info 13861 jQuery().off( event ); 13862 return origFn.apply( this, arguments ); 13863 }; 13864 13865 // Use same guid so caller can remove using origFn 13866 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); 13867 } 13868 return elem.each( function() { 13869 jQuery.event.add( this, types, fn, data, selector ); 13870 } ); 13871} 13872 13873/* 13874 * Helper functions for managing events -- not part of the public interface. 13875 * Props to Dean Edwards' addEvent library for many of the ideas. 13876 */ 13877jQuery.event = { 13878 13879 global: {}, 13880 13881 add: function( elem, types, handler, data, selector ) { 13882 13883 var handleObjIn, eventHandle, tmp, 13884 events, t, handleObj, 13885 special, handlers, type, namespaces, origType, 13886 elemData = dataPriv.get( elem ); 13887 13888 // Don't attach events to noData or text/comment nodes (but allow plain objects) 13889 if ( !elemData ) { 13890 return; 13891 } 13892 13893 // Caller can pass in an object of custom data in lieu of the handler 13894 if ( handler.handler ) { 13895 handleObjIn = handler; 13896 handler = handleObjIn.handler; 13897 selector = handleObjIn.selector; 13898 } 13899 13900 // Make sure that the handler has a unique ID, used to find/remove it later 13901 if ( !handler.guid ) { 13902 handler.guid = jQuery.guid++; 13903 } 13904 13905 // Init the element's event structure and main handler, if this is the first 13906 if ( !( events = elemData.events ) ) { 13907 events = elemData.events = {}; 13908 } 13909 if ( !( eventHandle = elemData.handle ) ) { 13910 eventHandle = elemData.handle = function( e ) { 13911 13912 // Discard the second event of a jQuery.event.trigger() and 13913 // when an event is called after a page has unloaded 13914 return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? 13915 jQuery.event.dispatch.apply( elem, arguments ) : undefined; 13916 }; 13917 } 13918 13919 // Handle multiple events separated by a space 13920 types = ( types || "" ).match( rnotwhite ) || [ "" ]; 13921 t = types.length; 13922 while ( t-- ) { 13923 tmp = rtypenamespace.exec( types[ t ] ) || []; 13924 type = origType = tmp[ 1 ]; 13925 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 13926 13927 // There *must* be a type, no attaching namespace-only handlers 13928 if ( !type ) { 13929 continue; 13930 } 13931 13932 // If event changes its type, use the special event handlers for the changed type 13933 special = jQuery.event.special[ type ] || {}; 13934 13935 // If selector defined, determine special event api type, otherwise given type 13936 type = ( selector ? special.delegateType : special.bindType ) || type; 13937 13938 // Update special based on newly reset type 13939 special = jQuery.event.special[ type ] || {}; 13940 13941 // handleObj is passed to all event handlers 13942 handleObj = jQuery.extend( { 13943 type: type, 13944 origType: origType, 13945 data: data, 13946 handler: handler, 13947 guid: handler.guid, 13948 selector: selector, 13949 needsContext: selector && jQuery.expr.match.needsContext.test( selector ), 13950 namespace: namespaces.join( "." ) 13951 }, handleObjIn ); 13952 13953 // Init the event handler queue if we're the first 13954 if ( !( handlers = events[ type ] ) ) { 13955 handlers = events[ type ] = []; 13956 handlers.delegateCount = 0; 13957 13958 // Only use addEventListener if the special events handler returns false 13959 if ( !special.setup || 13960 special.setup.call( elem, data, namespaces, eventHandle ) === false ) { 13961 13962 if ( elem.addEventListener ) { 13963 elem.addEventListener( type, eventHandle ); 13964 } 13965 } 13966 } 13967 13968 if ( special.add ) { 13969 special.add.call( elem, handleObj ); 13970 13971 if ( !handleObj.handler.guid ) { 13972 handleObj.handler.guid = handler.guid; 13973 } 13974 } 13975 13976 // Add to the element's handler list, delegates in front 13977 if ( selector ) { 13978 handlers.splice( handlers.delegateCount++, 0, handleObj ); 13979 } else { 13980 handlers.push( handleObj ); 13981 } 13982 13983 // Keep track of which events have ever been used, for event optimization 13984 jQuery.event.global[ type ] = true; 13985 } 13986 13987 }, 13988 13989 // Detach an event or set of events from an element 13990 remove: function( elem, types, handler, selector, mappedTypes ) { 13991 13992 var j, origCount, tmp, 13993 events, t, handleObj, 13994 special, handlers, type, namespaces, origType, 13995 elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); 13996 13997 if ( !elemData || !( events = elemData.events ) ) { 13998 return; 13999 } 14000 14001 // Once for each type.namespace in types; type may be omitted 14002 types = ( types || "" ).match( rnotwhite ) || [ "" ]; 14003 t = types.length; 14004 while ( t-- ) { 14005 tmp = rtypenamespace.exec( types[ t ] ) || []; 14006 type = origType = tmp[ 1 ]; 14007 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 14008 14009 // Unbind all events (on this namespace, if provided) for the element 14010 if ( !type ) { 14011 for ( type in events ) { 14012 jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); 14013 } 14014 continue; 14015 } 14016 14017 special = jQuery.event.special[ type ] || {}; 14018 type = ( selector ? special.delegateType : special.bindType ) || type; 14019 handlers = events[ type ] || []; 14020 tmp = tmp[ 2 ] && 14021 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); 14022 14023 // Remove matching events 14024 origCount = j = handlers.length; 14025 while ( j-- ) { 14026 handleObj = handlers[ j ]; 14027 14028 if ( ( mappedTypes || origType === handleObj.origType ) && 14029 ( !handler || handler.guid === handleObj.guid ) && 14030 ( !tmp || tmp.test( handleObj.namespace ) ) && 14031 ( !selector || selector === handleObj.selector || 14032 selector === "**" && handleObj.selector ) ) { 14033 handlers.splice( j, 1 ); 14034 14035 if ( handleObj.selector ) { 14036 handlers.delegateCount--; 14037 } 14038 if ( special.remove ) { 14039 special.remove.call( elem, handleObj ); 14040 } 14041 } 14042 } 14043 14044 // Remove generic event handler if we removed something and no more handlers exist 14045 // (avoids potential for endless recursion during removal of special event handlers) 14046 if ( origCount && !handlers.length ) { 14047 if ( !special.teardown || 14048 special.teardown.call( elem, namespaces, elemData.handle ) === false ) { 14049 14050 jQuery.removeEvent( elem, type, elemData.handle ); 14051 } 14052 14053 delete events[ type ]; 14054 } 14055 } 14056 14057 // Remove data and the expando if it's no longer used 14058 if ( jQuery.isEmptyObject( events ) ) { 14059 dataPriv.remove( elem, "handle events" ); 14060 } 14061 }, 14062 14063 dispatch: function( event ) { 14064 14065 // Make a writable jQuery.Event from the native event object 14066 event = jQuery.event.fix( event ); 14067 14068 var i, j, ret, matched, handleObj, 14069 handlerQueue = [], 14070 args = slice.call( arguments ), 14071 handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], 14072 special = jQuery.event.special[ event.type ] || {}; 14073 14074 // Use the fix-ed jQuery.Event rather than the (read-only) native event 14075 args[ 0 ] = event; 14076 event.delegateTarget = this; 14077 14078 // Call the preDispatch hook for the mapped type, and let it bail if desired 14079 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { 14080 return; 14081 } 14082 14083 // Determine handlers 14084 handlerQueue = jQuery.event.handlers.call( this, event, handlers ); 14085 14086 // Run delegates first; they may want to stop propagation beneath us 14087 i = 0; 14088 while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { 14089 event.currentTarget = matched.elem; 14090 14091 j = 0; 14092 while ( ( handleObj = matched.handlers[ j++ ] ) && 14093 !event.isImmediatePropagationStopped() ) { 14094 14095 // Triggered event must either 1) have no namespace, or 2) have namespace(s) 14096 // a subset or equal to those in the bound event (both can have no namespace). 14097 if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { 14098 14099 event.handleObj = handleObj; 14100 event.data = handleObj.data; 14101 14102 ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || 14103 handleObj.handler ).apply( matched.elem, args ); 14104 14105 if ( ret !== undefined ) { 14106 if ( ( event.result = ret ) === false ) { 14107 event.preventDefault(); 14108 event.stopPropagation(); 14109 } 14110 } 14111 } 14112 } 14113 } 14114 14115 // Call the postDispatch hook for the mapped type 14116 if ( special.postDispatch ) { 14117 special.postDispatch.call( this, event ); 14118 } 14119 14120 return event.result; 14121 }, 14122 14123 handlers: function( event, handlers ) { 14124 var i, matches, sel, handleObj, 14125 handlerQueue = [], 14126 delegateCount = handlers.delegateCount, 14127 cur = event.target; 14128 14129 // Support (at least): Chrome, IE9 14130 // Find delegate handlers 14131 // Black-hole SVG <use> instance trees (#13180) 14132 // 14133 // Support: Firefox<=42+
14134 // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) 14135 if ( delegateCount && cur.nodeType && 14136 ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { 14137 14138 for ( ; cur !== this; cur = cur.parentNode || this ) { 14139 14140 // Don't check non-elements (#13208) 14141 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 14142 if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { 14143 matches = []; 14144 for ( i = 0; i < delegateCount; i++ ) { 14145 handleObj = handlers[ i ]; 14146 14147 // Don't conflict with Object.prototype properties (#13203) 14148 sel = handleObj.selector + " "; 14149 14150 if ( matches[ sel ] === undefined ) { 14151 matches[ sel ] = handleObj.needsContext ? 14152 jQuery( sel, this ).index( cur ) > -1 : 14153 jQuery.find( sel, this, null, [ cur ] ).length; 14154 } 14155 if ( matches[ sel ] ) { 14156 matches.push( handleObj ); 14157 } 14158 } 14159 if ( matches.length ) { 14160 handlerQueue.push( { elem: cur, handlers: matches } ); 14161 } 14162 } 14163 } 14164 } 14165 14166 // Add the remaining (directly-bound) handlers 14167 if ( delegateCount < handlers.length ) { 14168 handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); 14169 } 14170 14171 return handlerQueue; 14172 }, 14173 14174 // Includes some event props shared by KeyEvent and MouseEvent 14175 props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + 14176 "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), 14177 14178 fixHooks: {}, 14179 14180 keyHooks: { 14181 props: "char charCode key keyCode".split( " " ), 14182 filter: function( event, original ) { 14183 14184 // Add which for key events 14185 if ( event.which == null ) { 14186 event.which = original.charCode != null ? original.charCode : original.keyCode; 14187 } 14188 14189 return event; 14190 } 14191 }, 14192 14193 mouseHooks: { 14194 props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " + 14195 "screenX screenY toElement" ).split( " " ), 14196 filter: function( event, original ) { 14197 var eventDoc, doc, body, 14198 button = original.button; 14199 14200 // Calculate pageX/Y if missing and clientX/Y available 14201 if ( event.pageX == null && original.clientX != null ) { 14202 eventDoc = event.target.ownerDocument || document; 14203 doc = eventDoc.documentElement; 14204 body = eventDoc.body; 14205 14206 event.pageX = original.clientX + 14207 ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - 14208 ( doc && doc.clientLeft || body && body.clientLeft || 0 ); 14209 event.pageY = original.clientY + 14210 ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - 14211 ( doc && doc.clientTop || body && body.clientTop || 0 ); 14212 } 14213 14214 // Add which for click: 1 === left; 2 === middle; 3 === right 14215 // Note: button is not normalized, so don't use it 14216 if ( !event.which && button !== undefined ) { 14217 event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); 14218 } 14219 14220 return event; 14221 } 14222 }, 14223 14224 fix: function( event ) { 14225 if ( event[ jQuery.expando ] ) { 14226 return event; 14227 } 14228 14229 // Create a writable copy of the event object and normalize some properties 14230 var i, prop, copy, 14231 type = event.type, 14232 originalEvent = event, 14233 fixHook = this.fixHooks[ type ]; 14234 14235 if ( !fixHook ) { 14236 this.fixHooks[ type ] = fixHook = 14237 rmouseEvent.test( type ) ? this.mouseHooks : 14238 rkeyEvent.test( type ) ? this.keyHooks : 14239 {}; 14240 } 14241 copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; 14242 14243 event = new jQuery.Event( originalEvent ); 14244 14245 i = copy.length; 14246 while ( i-- ) { 14247 prop = copy[ i ]; 14248 event[ prop ] = originalEvent[ prop ]; 14249 } 14250 14251 // Support: Cordova 2.5 (WebKit) (#13255) 14252 // All events should have a target; Cordova deviceready doesn't 14253 if ( !event.target ) { 14254 event.target = document; 14255 } 14256 14257 // Support: Safari 6.0+, Chrome<28 14258 // Target should not be a text node (#504, #13143) 14259 if ( event.target.nodeType === 3 ) { 14260 event.target = event.target.parentNode; 14261 } 14262 14263 return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; 14264 }, 14265 14266 special: { 14267 load: { 14268 14269 // Prevent triggered image.load events from bubbling to window.load 14270 noBubble: true 14271 }, 14272 focus: { 14273 14274 // Fire native event if possible so blur/focus sequence is correct 14275 trigger: function() { 14276 if ( this !== safeActiveElement() && this.focus ) { 14277 this.focus(); 14278 return false;
vendor: 12,508 bytes, lines 14279-14755
14279 } 14280 }, 14281 delegateType: "focusin" 14282 }, 14283 blur: { 14284 trigger: function() { 14285 if ( this === safeActiveElement() && this.blur ) { 14286 this.blur(); 14287 return false; 14288 } 14289 }, 14290 delegateType: "focusout" 14291 }, 14292 click: { 14293 14294 // For checkbox, fire native event so checked state will be right 14295 trigger: function() { 14296 if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { 14297 this.click(); 14298 return false; 14299 } 14300 }, 14301 14302 // For cross-browser consistency, don't fire native .click() on links 14303 _default: function( event ) { 14304 return jQuery.nodeName( event.target, "a" ); 14305 } 14306 }, 14307 14308 beforeunload: { 14309 postDispatch: function( event ) { 14310 14311 // Support: Firefox 20+ 14312 // Firefox doesn't alert if the returnValue field is not set. 14313 if ( event.result !== undefined && event.originalEvent ) { 14314 event.originalEvent.returnValue = event.result; 14315 } 14316 } 14317 } 14318 } 14319}; 14320 14321jQuery.removeEvent = function( elem, type, handle ) { 14322 14323 // This "if" is needed for plain objects 14324 if ( elem.removeEventListener ) { 14325 elem.removeEventListener( type, handle ); 14326 } 14327}; 14328 14329jQuery.Event = function( src, props ) { 14330 14331 // Allow instantiation without the 'new' keyword 14332 if ( !( this instanceof jQuery.Event ) ) { 14333 return new jQuery.Event( src, props ); 14334 } 14335 14336 // Event object 14337 if ( src && src.type ) { 14338 this.originalEvent = src; 14339 this.type = src.type; 14340 14341 // Events bubbling up the document may have been marked as prevented 14342 // by a handler lower down the tree; reflect the correct value. 14343 this.isDefaultPrevented = src.defaultPrevented || 14344 src.defaultPrevented === undefined && 14345 14346 // Support: Android<4.0 14347 src.returnValue === false ? 14348 returnTrue : 14349 returnFalse; 14350 14351 // Event type 14352 } else { 14353 this.type = src; 14354 } 14355 14356 // Put explicitly provided properties onto the event object 14357 if ( props ) { 14358 jQuery.extend( this, props ); 14359 } 14360 14361 // Create a timestamp if incoming event doesn't have one 14362 this.timeStamp = src && src.timeStamp || jQuery.now(); 14363 14364 // Mark it as fixed 14365 this[ jQuery.expando ] = true; 14366}; 14367 14368// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 14369// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 14370jQuery.Event.prototype = { 14371 constructor: jQuery.Event, 14372 isDefaultPrevented: returnFalse, 14373 isPropagationStopped: returnFalse, 14374 isImmediatePropagationStopped: returnFalse, 14375 isSimulated: false, 14376 14377 preventDefault: function() { 14378 var e = this.originalEvent; 14379 14380 this.isDefaultPrevented = returnTrue; 14381 14382 if ( e && !this.isSimulated ) { 14383 e.preventDefault(); 14384 } 14385 }, 14386 stopPropagation: function() { 14387 var e = this.originalEvent; 14388 14389 this.isPropagationStopped = returnTrue; 14390 14391 if ( e && !this.isSimulated ) { 14392 e.stopPropagation(); 14393 } 14394 }, 14395 stopImmediatePropagation: function() { 14396 var e = this.originalEvent; 14397 14398 this.isImmediatePropagationStopped = returnTrue; 14399 14400 if ( e && !this.isSimulated ) { 14401 e.stopImmediatePropagation(); 14402 } 14403 14404 this.stopPropagation(); 14405 } 14406}; 14407 14408// Create mouseenter/leave events using mouseover/out and event-time checks 14409// so that event delegation works in jQuery. 14410// Do the same for pointerenter/pointerleave and pointerover/pointerout 14411// 14412// Support: Safari 7 only 14413// Safari sends mouseenter too often; see: 14414// https://code.google.com/p/chromium/issues/detail?id=470258 14415// for the description of the bug (it existed in older Chrome versions as well). 14416jQuery.each( { 14417 mouseenter: "mouseover", 14418 mouseleave: "mouseout", 14419 pointerenter: "pointerover", 14420 pointerleave: "pointerout" 14421}, function( orig, fix ) { 14422 jQuery.event.special[ orig ] = { 14423 delegateType: fix, 14424 bindType: fix, 14425 14426 handle: function( event ) { 14427 var ret, 14428 target = this, 14429 related = event.relatedTarget, 14430 handleObj = event.handleObj; 14431 14432 // For mouseenter/leave call the handler if related is outside the target. 14433 // NB: No relatedTarget if the mouse left/entered the browser window 14434 if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { 14435 event.type = handleObj.origType; 14436 ret = handleObj.handler.apply( this, arguments ); 14437 event.type = fix; 14438 } 14439 return ret; 14440 } 14441 }; 14442} ); 14443 14444jQuery.fn.extend( { 14445 on: function( types, selector, data, fn ) { 14446 return on( this, types, selector, data, fn ); 14447 }, 14448 one: function( types, selector, data, fn ) { 14449 return on( this, types, selector, data, fn, 1 ); 14450 }, 14451 off: function( types, selector, fn ) { 14452 var handleObj, type; 14453 if ( types && types.preventDefault && types.handleObj ) { 14454 14455 // ( event ) dispatched jQuery.Event 14456 handleObj = types.handleObj; 14457 jQuery( types.delegateTarget ).off( 14458 handleObj.namespace ? 14459 handleObj.origType + "." + handleObj.namespace : 14460 handleObj.origType, 14461 handleObj.selector, 14462 handleObj.handler 14463 ); 14464 return this; 14465 } 14466 if ( typeof types === "object" ) { 14467 14468 // ( types-object [, selector] ) 14469 for ( type in types ) { 14470 this.off( type, selector, types[ type ] ); 14471 } 14472 return this; 14473 } 14474 if ( selector === false || typeof selector === "function" ) { 14475 14476 // ( types [, fn] ) 14477 fn = selector; 14478 selector = undefined; 14479 } 14480 if ( fn === false ) { 14481 fn = returnFalse; 14482 } 14483 return this.each( function() { 14484 jQuery.event.remove( this, types, fn, selector ); 14485 } ); 14486 } 14487} ); 14488 14489 14490var 14491 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, 14492 14493 // Support: IE 10-11, Edge 10240+ 14494 // In IE/Edge using regex groups here causes severe slowdowns. 14495 // See https://connect.microsoft.com/IE/feedback/details/1736512/ 14496 rnoInnerhtml = /<script|<style|<link/i, 14497 14498 // checked="checked" or checked 14499 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 14500 rscriptTypeMasked = /^true\/(.*)/, 14501 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; 14502 14503// Manipulating tables requires a tbody 14504function manipulationTarget( elem, content ) { 14505 return jQuery.nodeName( elem, "table" ) && 14506 jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? 14507 14508 elem.getElementsByTagName( "tbody" )[ 0 ] || 14509 elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : 14510 elem; 14511} 14512 14513// Replace/restore the type attribute of script elements for safe DOM manipulation 14514function disableScript( elem ) { 14515 elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; 14516 return elem; 14517} 14518function restoreScript( elem ) { 14519 var match = rscriptTypeMasked.exec( elem.type ); 14520 14521 if ( match ) { 14522 elem.type = match[ 1 ]; 14523 } else { 14524 elem.removeAttribute( "type" ); 14525 } 14526 14527 return elem; 14528} 14529 14530function cloneCopyEvent( src, dest ) { 14531 var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; 14532 14533 if ( dest.nodeType !== 1 ) { 14534 return; 14535 } 14536 14537 // 1. Copy private data: events, handlers, etc. 14538 if ( dataPriv.hasData( src ) ) { 14539 pdataOld = dataPriv.access( src ); 14540 pdataCur = dataPriv.set( dest, pdataOld ); 14541 events = pdataOld.events; 14542 14543 if ( events ) { 14544 delete pdataCur.handle; 14545 pdataCur.events = {}; 14546 14547 for ( type in events ) { 14548 for ( i = 0, l = events[ type ].length; i < l; i++ ) { 14549 jQuery.event.add( dest, type, events[ type ][ i ] ); 14550 } 14551 } 14552 } 14553 } 14554 14555 // 2. Copy user data 14556 if ( dataUser.hasData( src ) ) { 14557 udataOld = dataUser.access( src ); 14558 udataCur = jQuery.extend( {}, udataOld ); 14559 14560 dataUser.set( dest, udataCur ); 14561 } 14562} 14563 14564// Fix IE bugs, see support tests 14565function fixInput( src, dest ) { 14566 var nodeName = dest.nodeName.toLowerCase(); 14567 14568 // Fails to persist the checked state of a cloned checkbox or radio button. 14569 if ( nodeName === "input" && rcheckableType.test( src.type ) ) { 14570 dest.checked = src.checked; 14571 14572 // Fails to return the selected option to the default selected state when cloning options 14573 } else if ( nodeName === "input" || nodeName === "textarea" ) { 14574 dest.defaultValue = src.defaultValue; 14575 } 14576} 14577 14578function domManip( collection, args, callback, ignored ) { 14579 14580 // Flatten any nested arrays 14581 args = concat.apply( [], args ); 14582 14583 var fragment, first, scripts, hasScripts, node, doc, 14584 i = 0, 14585 l = collection.length, 14586 iNoClone = l - 1, 14587 value = args[ 0 ], 14588 isFunction = jQuery.isFunction( value ); 14589 14590 // We can't cloneNode fragments that contain checked, in WebKit 14591 if ( isFunction || 14592 ( l > 1 && typeof value === "string" && 14593 !support.checkClone && rchecked.test( value ) ) ) { 14594 return collection.each( function( index ) { 14595 var self = collection.eq( index ); 14596 if ( isFunction ) { 14597 args[ 0 ] = value.call( this, index, self.html() ); 14598 } 14599 domManip( self, args, callback, ignored ); 14600 } ); 14601 } 14602 14603 if ( l ) { 14604 fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); 14605 first = fragment.firstChild; 14606 14607 if ( fragment.childNodes.length === 1 ) { 14608 fragment = first; 14609 } 14610 14611 // Require either new content or an interest in ignored elements to invoke the callback 14612 if ( first || ignored ) { 14613 scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); 14614 hasScripts = scripts.length; 14615 14616 // Use the original fragment for the last item 14617 // instead of the first because it can end up 14618 // being emptied incorrectly in certain situations (#8070). 14619 for ( ; i < l; i++ ) { 14620 node = fragment; 14621 14622 if ( i !== iNoClone ) { 14623 node = jQuery.clone( node, true, true ); 14624 14625 // Keep references to cloned scripts for later restoration 14626 if ( hasScripts ) { 14627 14628 // Support: Android<4.1, PhantomJS<2 14629 // push.apply(_, arraylike) throws on ancient WebKit 14630 jQuery.merge( scripts, getAll( node, "script" ) ); 14631 } 14632 } 14633 14634 callback.call( collection[ i ], node, i ); 14635 } 14636 14637 if ( hasScripts ) { 14638 doc = scripts[ scripts.length - 1 ].ownerDocument; 14639 14640 // Reenable scripts 14641 jQuery.map( scripts, restoreScript ); 14642 14643 // Evaluate executable scripts on first document insertion 14644 for ( i = 0; i < hasScripts; i++ ) { 14645 node = scripts[ i ]; 14646 if ( rscriptType.test( node.type || "" ) && 14647 !dataPriv.access( node, "globalEval" ) && 14648 jQuery.contains( doc, node ) ) { 14649 14650 if ( node.src ) { 14651 14652 // Optional AJAX dependency, but won't run scripts if not present 14653 if ( jQuery._evalUrl ) { 14654 jQuery._evalUrl( node.src ); 14655 } 14656 } else { 14657 jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); 14658 } 14659 } 14660 } 14661 } 14662 } 14663 } 14664 14665 return collection; 14666} 14667 14668function remove( elem, selector, keepData ) { 14669 var node, 14670 nodes = selector ? jQuery.filter( selector, elem ) : elem, 14671 i = 0; 14672 14673 for ( ; ( node = nodes[ i ] ) != null; i++ ) { 14674 if ( !keepData && node.nodeType === 1 ) { 14675 jQuery.cleanData( getAll( node ) ); 14676 } 14677 14678 if ( node.parentNode ) { 14679 if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { 14680 setGlobalEval( getAll( node, "script" ) ); 14681 } 14682 node.parentNode.removeChild( node ); 14683 } 14684 } 14685 14686 return elem; 14687} 14688 14689jQuery.extend( { 14690 htmlPrefilter: function( html ) { 14691 return html.replace( rxhtmlTag, "<$1></$2>" ); 14692 }, 14693 14694 clone: function( elem, dataAndEvents, deepDataAndEvents ) { 14695 var i, l, srcElements, destElements, 14696 clone = elem.cloneNode( true ), 14697 inPage = jQuery.contains( elem.ownerDocument, elem ); 14698 14699 // Fix IE cloning issues 14700 if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && 14701 !jQuery.isXMLDoc( elem ) ) { 14702 14703 // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 14704 destElements = getAll( clone ); 14705 srcElements = getAll( elem ); 14706 14707 for ( i = 0, l = srcElements.length; i < l; i++ ) { 14708 fixInput( srcElements[ i ], destElements[ i ] ); 14709 } 14710 } 14711 14712 // Copy the events from the original to the clone 14713 if ( dataAndEvents ) { 14714 if ( deepDataAndEvents ) { 14715 srcElements = srcElements || getAll( elem ); 14716 destElements = destElements || getAll( clone ); 14717 14718 for ( i = 0, l = srcElements.length; i < l; i++ ) { 14719 cloneCopyEvent( srcElements[ i ], destElements[ i ] ); 14720 } 14721 } else { 14722 cloneCopyEvent( elem, clone ); 14723 } 14724 } 14725 14726 // Preserve script evaluation history 14727 destElements = getAll( clone, "script" ); 14728 if ( destElements.length > 0 ) { 14729 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); 14730 } 14731 14732 // Return the cloned set 14733 return clone; 14734 }, 14735 14736 cleanData: function( elems ) { 14737 var data, elem, type, 14738 special = jQuery.event.special, 14739 i = 0; 14740 14741 for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { 14742 if ( acceptData( elem ) ) { 14743 if ( ( data = elem[ dataPriv.expando ] ) ) { 14744 if ( data.events ) { 14745 for ( type in data.events ) { 14746 if ( special[ type ] ) { 14747 jQuery.event.remove( elem, type ); 14748 14749 // This is a shortcut to avoid jQuery.event.remove's overhead 14750 } else { 14751 jQuery.removeEvent( elem, type, data.handle ); 14752 } 14753 } 14754 } 14755
vendor: 1,186 bytes, lines 14756-14804
14756 // Support: Chrome <= 35-45+ 14757 // Assign undefined instead of using delete, see Data#remove 14758 elem[ dataPriv.expando ] = undefined; 14759 } 14760 if ( elem[ dataUser.expando ] ) { 14761 14762 // Support: Chrome <= 35-45+ 14763 // Assign undefined instead of using delete, see Data#remove 14764 elem[ dataUser.expando ] = undefined; 14765 } 14766 } 14767 } 14768 } 14769} ); 14770 14771jQuery.fn.extend( { 14772 14773 // Keep domManip exposed until 3.0 (gh-2225) 14774 domManip: domManip, 14775 14776 detach: function( selector ) { 14777 return remove( this, selector, true ); 14778 }, 14779 14780 remove: function( selector ) { 14781 return remove( this, selector ); 14782 }, 14783 14784 text: function( value ) { 14785 return access( this, function( value ) { 14786 return value === undefined ? 14787 jQuery.text( this ) : 14788 this.empty().each( function() { 14789 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 14790 this.textContent = value; 14791 } 14792 } ); 14793 }, null, value, arguments.length ); 14794 }, 14795 14796 append: function() { 14797 return domManip( this, arguments, function( elem ) { 14798 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 14799 var target = manipulationTarget( this, elem ); 14800 target.appendChild( elem ); 14801 } 14802 } ); 14803 }, 14804
vendor: 4,383 bytes, lines 14805-14988
14805 prepend: function() { 14806 return domManip( this, arguments, function( elem ) { 14807 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 14808 var target = manipulationTarget( this, elem ); 14809 target.insertBefore( elem, target.firstChild ); 14810 } 14811 } ); 14812 }, 14813 14814 before: function() { 14815 return domManip( this, arguments, function( elem ) { 14816 if ( this.parentNode ) { 14817 this.parentNode.insertBefore( elem, this ); 14818 } 14819 } ); 14820 }, 14821 14822 after: function() { 14823 return domManip( this, arguments, function( elem ) { 14824 if ( this.parentNode ) { 14825 this.parentNode.insertBefore( elem, this.nextSibling ); 14826 } 14827 } ); 14828 }, 14829 14830 empty: function() { 14831 var elem, 14832 i = 0; 14833 14834 for ( ; ( elem = this[ i ] ) != null; i++ ) { 14835 if ( elem.nodeType === 1 ) { 14836 14837 // Prevent memory leaks 14838 jQuery.cleanData( getAll( elem, false ) ); 14839 14840 // Remove any remaining nodes 14841 elem.textContent = ""; 14842 } 14843 } 14844 14845 return this; 14846 }, 14847 14848 clone: function( dataAndEvents, deepDataAndEvents ) { 14849 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 14850 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 14851 14852 return this.map( function() { 14853 return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); 14854 } ); 14855 }, 14856 14857 html: function( value ) { 14858 return access( this, function( value ) { 14859 var elem = this[ 0 ] || {}, 14860 i = 0, 14861 l = this.length; 14862 14863 if ( value === undefined && elem.nodeType === 1 ) { 14864 return elem.innerHTML; 14865 } 14866 14867 // See if we can take a shortcut and just use innerHTML 14868 if ( typeof value === "string" && !rnoInnerhtml.test( value ) && 14869 !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { 14870 14871 value = jQuery.htmlPrefilter( value ); 14872 14873 try { 14874 for ( ; i < l; i++ ) { 14875 elem = this[ i ] || {}; 14876 14877 // Remove element nodes and prevent memory leaks 14878 if ( elem.nodeType === 1 ) { 14879 jQuery.cleanData( getAll( elem, false ) ); 14880 elem.innerHTML = value; 14881 } 14882 } 14883 14884 elem = 0; 14885 14886 // If using innerHTML throws an exception, use the fallback method 14887 } catch ( e ) {} 14888 } 14889 14890 if ( elem ) { 14891 this.empty().append( value ); 14892 } 14893 }, null, value, arguments.length ); 14894 }, 14895 14896 replaceWith: function() { 14897 var ignored = []; 14898 14899 // Make the changes, replacing each non-ignored context element with the new content 14900 return domManip( this, arguments, function( elem ) { 14901 var parent = this.parentNode; 14902 14903 if ( jQuery.inArray( this, ignored ) < 0 ) { 14904 jQuery.cleanData( getAll( this ) ); 14905 if ( parent ) { 14906 parent.replaceChild( elem, this ); 14907 } 14908 } 14909 14910 // Force callback invocation 14911 }, ignored ); 14912 } 14913} ); 14914 14915jQuery.each( { 14916 appendTo: "append", 14917 prependTo: "prepend", 14918 insertBefore: "before", 14919 insertAfter: "after", 14920 replaceAll: "replaceWith" 14921}, function( name, original ) { 14922 jQuery.fn[ name ] = function( selector ) { 14923 var elems, 14924 ret = [], 14925 insert = jQuery( selector ), 14926 last = insert.length - 1, 14927 i = 0; 14928 14929 for ( ; i <= last; i++ ) { 14930 elems = i === last ? this : this.clone( true ); 14931 jQuery( insert[ i ] )[ original ]( elems ); 14932 14933 // Support: QtWebKit 14934 // .get() because push.apply(_, arraylike) throws 14935 push.apply( ret, elems.get() ); 14936 } 14937 14938 return this.pushStack( ret ); 14939 }; 14940} ); 14941 14942 14943var iframe, 14944 elemdisplay = { 14945 14946 // Support: Firefox 14947 // We have to pre-define these values for FF (#10227) 14948 HTML: "block", 14949 BODY: "block" 14950 }; 14951 14952/** 14953 * Retrieve the actual display of a element 14954 * @param {String} name nodeName of the element 14955 * @param {Object} doc Document object 14956 */ 14957 14958// Called only from within defaultDisplay 14959function actualDisplay( name, doc ) { 14960 var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), 14961 14962 display = jQuery.css( elem[ 0 ], "display" ); 14963 14964 // We don't have any data stored on the element, 14965 // so use "detach" method as fast way to get rid of the element 14966 elem.detach(); 14967 14968 return display; 14969} 14970 14971/** 14972 * Try to determine the default display value of an element 14973 * @param {String} nodeName 14974 */ 14975function defaultDisplay( nodeName ) { 14976 var doc = document, 14977 display = elemdisplay[ nodeName ]; 14978 14979 if ( !display ) { 14980 display = actualDisplay( nodeName, doc ); 14981 14982 // If the simple way fails, read from inside an iframe 14983 if ( display === "none" || !display ) { 14984 14985 // Use the already-created iframe if possible 14986 iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) ) 14987 .appendTo( doc.documentElement ); 14988
14989 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse 14990 doc = iframe[ 0 ].contentDocument; 14991 14992 // Support: IE 14993 doc.write(); 14994 doc.close(); 14995 14996 display = actualDisplay( nodeName, doc ); 14997 iframe.detach(); 14998 } 14999 15000 // Store the correct default display 15001 elemdisplay[ nodeName ] = display; 15002 } 15003 15004 return display; 15005} 15006var rmargin = ( /^margin/ ); 15007 15008var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 15009 15010var getStyles = function( elem ) { 15011 15012 // Support: IE<=11+, Firefox<=30+ (#15098, #14150) 15013 // IE throws on elements created in popups 15014 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 15015 var view = elem.ownerDocument.defaultView; 15016 15017 if ( !view || !view.opener ) { 15018 view = window; 15019 } 15020 15021 return view.getComputedStyle( elem ); 15022 }; 15023 15024var swap = function( elem, options, callback, args ) { 15025 var ret, name, 15026 old = {}; 15027 15028 // Remember the old values, and insert the new ones 15029 for ( name in options ) { 15030 old[ name ] = elem.style[ name ]; 15031 elem.style[ name ] = options[ name ]; 15032 } 15033 15034 ret = callback.apply( elem, args || [] ); 15035 15036 // Revert the old values 15037 for ( name in options ) { 15038 elem.style[ name ] = old[ name ]; 15039 } 15040 15041 return ret; 15042}; 15043 15044 15045var documentElement = document.documentElement; 15046 15047 15048 15049( function() { 15050 var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, 15051 container = document.createElement( "div" ), 15052 div = document.createElement( "div" ); 15053 15054 // Finish early in limited (non-browser) environments 15055 if ( !div.style ) { 15056 return; 15057 } 15058 15059 // Support: IE9-11+ 15060 // Style of cloned element affects source element cloned (#8908) 15061 div.style.backgroundClip = "content-box"; 15062 div.cloneNode( true ).style.backgroundClip = ""; 15063 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 15064 15065 container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + 15066 "padding:0;margin-top:1px;position:absolute"; 15067 container.appendChild( div ); 15068 15069 // Executing both pixelPosition & boxSizingReliable tests require only one layout 15070 // so they're executed at the same time to save the second computation. 15071 function computeStyleTests() { 15072 div.style.cssText = 15073 15074 // Support: Firefox<29, Android 2.3 15075 // Vendor-prefix box-sizing 15076 "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" + 15077 "position:relative;display:block;" + 15078 "margin:auto;border:1px;padding:1px;" + 15079 "top:1%;width:50%"; 15080 div.innerHTML = ""; 15081 documentElement.appendChild( container ); 15082 15083 var divStyle = window.getComputedStyle( div ); 15084 pixelPositionVal = divStyle.top !== "1%"; 15085 reliableMarginLeftVal = divStyle.marginLeft === "2px"; 15086 boxSizingReliableVal = divStyle.width === "4px"; 15087 15088 // Support: Android 4.0 - 4.3 only 15089 // Some styles come back with percentage values, even though they shouldn't 15090 div.style.marginRight = "50%"; 15091 pixelMarginRightVal = divStyle.marginRight === "4px"; 15092 15093 documentElement.removeChild( container ); 15094 } 15095 15096 jQuery.extend( support, { 15097 pixelPosition: function() { 15098 15099 // This test is executed only once but we still do memoizing 15100 // since we can use the boxSizingReliable pre-computing. 15101 // No need to check if the test was already performed, though. 15102 computeStyleTests(); 15103 return pixelPositionVal; 15104 }, 15105 boxSizingReliable: function() { 15106 if ( boxSizingReliableVal == null ) { 15107 computeStyleTests(); 15108 } 15109 return boxSizingReliableVal; 15110 }, 15111 pixelMarginRight: function() { 15112 15113 // Support: Android 4.0-4.3 15114 // We're checking for boxSizingReliableVal here instead of pixelMarginRightVal 15115 // since that compresses better and they're computed together anyway. 15116 if ( boxSizingReliableVal == null ) { 15117 computeStyleTests(); 15118 } 15119 return pixelMarginRightVal; 15120 }, 15121 reliableMarginLeft: function() { 15122 15123 // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37 15124 if ( boxSizingReliableVal == null ) { 15125 computeStyleTests(); 15126 } 15127 return reliableMarginLeftVal; 15128 }, 15129 reliableMarginRight: function() { 15130 15131 // Support: Android 2.3 15132 // Check if div with explicit width and no margin-right incorrectly 15133 // gets computed margin-right based on width of container. (#3333) 15134 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right 15135 // This support function is only executed once so no memoizing is needed. 15136 var ret, 15137 marginDiv = div.appendChild( document.createElement( "div" ) ); 15138 15139 // Reset CSS: box-sizing; display; margin; border; padding 15140 marginDiv.style.cssText = div.style.cssText = 15141
15142 // Support: Android 2.3 15143 // Vendor-prefix box-sizing 15144 "-webkit-box-sizing:content-box;box-sizing:content-box;" + 15145 "display:block;margin:0;border:0;padding:0"; 15146 marginDiv.style.marginRight = marginDiv.style.width = "0"; 15147 div.style.width = "1px"; 15148 documentElement.appendChild( container ); 15149 15150 ret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight ); 15151 15152 documentElement.removeChild( container ); 15153 div.removeChild( marginDiv ); 15154 15155 return ret; 15156 } 15157 } ); 15158} )(); 15159 15160 15161function curCSS( elem, name, computed ) { 15162 var width, minWidth, maxWidth, ret, 15163 style = elem.style; 15164 15165 computed = computed || getStyles( elem ); 15166 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined; 15167 15168 // Support: Opera 12.1x only 15169 // Fall back to style even without computed 15170 // computed is undefined for elems on document fragments 15171 if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) { 15172 ret = jQuery.style( elem, name ); 15173 } 15174 15175 // Support: IE9 15176 // getPropertyValue is only needed for .css('filter') (#12537) 15177 if ( computed ) { 15178 15179 // A tribute to the "awesome hack by Dean Edwards" 15180 // Android Browser returns percentage for some values, 15181 // but width seems to be reliably pixels. 15182 // This is against the CSSOM draft spec: 15183 // http://dev.w3.org/csswg/cssom/#resolved-values 15184 if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { 15185 15186 // Remember the original values 15187 width = style.width; 15188 minWidth = style.minWidth; 15189 maxWidth = style.maxWidth; 15190 15191 // Put in the new values to get a computed value out 15192 style.minWidth = style.maxWidth = style.width = ret; 15193 ret = computed.width; 15194 15195 // Revert the changed values 15196 style.width = width; 15197 style.minWidth = minWidth; 15198 style.maxWidth = maxWidth; 15199 } 15200 } 15201 15202 return ret !== undefined ? 15203 15204 // Support: IE9-11+ 15205 // IE returns zIndex value as an integer. 15206 ret + "" : 15207 ret; 15208} 15209 15210 15211function addGetHookIf( conditionFn, hookFn ) { 15212 15213 // Define the hook, we'll check on the first run if it's really needed. 15214 return { 15215 get: function() { 15216 if ( conditionFn() ) { 15217 15218 // Hook not needed (or it's not possible to use it due 15219 // to missing dependency), remove it. 15220 delete this.get; 15221 return; 15222 } 15223 15224 // Hook needed; redefine it so that the support test is not executed again. 15225 return ( this.get = hookFn ).apply( this, arguments ); 15226 } 15227 }; 15228} 15229 15230 15231var 15232 15233 // Swappable if display is none or starts with table 15234 // except "table", "table-cell", or "table-caption" 15235 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 15236 rdisplayswap = /^(none|table(?!-c[ea]).+)/, 15237 15238 cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 15239 cssNormalTransform = { 15240 letterSpacing: "0", 15241 fontWeight: "400" 15242 }, 15243 15244 cssPrefixes = [ "Webkit", "O", "Moz", "ms" ], 15245 emptyStyle = document.createElement( "div" ).style; 15246 15247// Return a css property mapped to a potentially vendor prefixed property 15248function vendorPropName( name ) { 15249 15250 // Shortcut for names that are not vendor prefixed 15251 if ( name in emptyStyle ) { 15252 return name; 15253 } 15254 15255 // Check for vendor prefixed names 15256 var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), 15257 i = cssPrefixes.length; 15258 15259 while ( i-- ) { 15260 name = cssPrefixes[ i ] + capName; 15261 if ( name in emptyStyle ) { 15262 return name; 15263 } 15264 } 15265} 15266 15267function setPositiveNumber( elem, value, subtract ) { 15268 15269 // Any relative (+/-) values have already been 15270 // normalized at this point 15271 var matches = rcssNum.exec( value ); 15272 return matches ? 15273 15274 // Guard against undefined "subtract", e.g., when used as in cssHooks 15275 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : 15276 value; 15277} 15278 15279function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { 15280 var i = extra === ( isBorderBox ? "border" : "content" ) ? 15281 15282 // If we already have the right measurement, avoid augmentation 15283 4 : 15284 15285 // Otherwise initialize for horizontal or vertical properties 15286 name === "width" ? 1 : 0, 15287 15288 val = 0; 15289 15290 for ( ; i < 4; i += 2 ) { 15291 15292 // Both box models exclude margin, so add it if we want it 15293 if ( extra === "margin" ) { 15294 val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); 15295 } 15296 15297 if ( isBorderBox ) { 15298 15299 // border-box includes padding, so remove it if we want content 15300 if ( extra === "content" ) { 15301 val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 15302 } 15303 15304 // At this point, extra isn't border nor margin, so remove border 15305 if ( extra !== "margin" ) { 15306 val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 15307 } 15308 } else { 15309 15310 // At this point, extra isn't content, so add padding 15311 val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 15312 15313 // At this point, extra isn't content nor padding, so add border 15314 if ( extra !== "padding" ) { 15315 val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 15316 } 15317 } 15318 } 15319 15320 return val; 15321} 15322 15323function getWidthOrHeight( elem, name, extra ) { 15324 15325 // Start with offset property, which is equivalent to the border-box value 15326 var valueIsBorderBox = true, 15327 val = name === "width" ? elem.offsetWidth : elem.offsetHeight, 15328 styles = getStyles( elem ), 15329 isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 15330 15331 // Some non-html elements return undefined for offsetWidth, so check for null/undefined 15332 // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 15333 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 15334 if ( val <= 0 || val == null ) { 15335 15336 // Fall back to computed then uncomputed css if necessary 15337 val = curCSS( elem, name, styles ); 15338 if ( val < 0 || val == null ) { 15339 val = elem.style[ name ]; 15340 } 15341 15342 // Computed unit is not pixels. Stop here and return. 15343 if ( rnumnonpx.test( val ) ) { 15344 return val; 15345 } 15346 15347 // Check for style in case a browser which returns unreliable values 15348 // for getComputedStyle silently falls back to the reliable elem.style 15349 valueIsBorderBox = isBorderBox && 15350 ( support.boxSizingReliable() || val === elem.style[ name ] ); 15351 15352 // Normalize "", auto, and prepare for extra 15353 val = parseFloat( val ) || 0; 15354 } 15355 15356 // Use the active box-sizing model to add/subtract irrelevant styles 15357 return ( val + 15358 augmentWidthOrHeight( 15359 elem, 15360 name, 15361 extra || ( isBorderBox ? "border" : "content" ), 15362 valueIsBorderBox, 15363 styles 15364 ) 15365 ) + "px"; 15366} 15367 15368function showHide( elements, show ) { 15369 var display, elem, hidden, 15370 values = [], 15371 index = 0, 15372 length = elements.length; 15373 15374 for ( ; index < length; index++ ) { 15375 elem = elements[ index ]; 15376 if ( !elem.style ) { 15377 continue; 15378 } 15379 15380 values[ index ] = dataPriv.get( elem, "olddisplay" ); 15381 display = elem.style.display; 15382 if ( show ) { 15383 15384 // Reset the inline display of this element to learn if it is 15385 // being hidden by cascaded rules or not 15386 if ( !values[ index ] && display === "none" ) { 15387 elem.style.display = ""; 15388 } 15389 15390 // Set elements which have been overridden with display: none 15391 // in a stylesheet to whatever the default browser style is 15392 // for such an element 15393 if ( elem.style.display === "" && isHidden( elem ) ) { 15394 values[ index ] = dataPriv.access( 15395 elem, 15396 "olddisplay", 15397 defaultDisplay( elem.nodeName ) 15398 ); 15399 } 15400 } else { 15401 hidden = isHidden( elem ); 15402 15403 if ( display !== "none" || !hidden ) { 15404 dataPriv.set( 15405 elem, 15406 "olddisplay",
vendor: 7,760 bytes, lines 15407-15711
15407 hidden ? display : jQuery.css( elem, "display" ) 15408 ); 15409 } 15410 } 15411 } 15412 15413 // Set the display of most of the elements in a second loop 15414 // to avoid the constant reflow 15415 for ( index = 0; index < length; index++ ) { 15416 elem = elements[ index ]; 15417 if ( !elem.style ) { 15418 continue; 15419 } 15420 if ( !show || elem.style.display === "none" || elem.style.display === "" ) { 15421 elem.style.display = show ? values[ index ] || "" : "none"; 15422 } 15423 } 15424 15425 return elements; 15426} 15427 15428jQuery.extend( { 15429 15430 // Add in style property hooks for overriding the default 15431 // behavior of getting and setting a style property 15432 cssHooks: { 15433 opacity: { 15434 get: function( elem, computed ) { 15435 if ( computed ) { 15436 15437 // We should always get a number back from opacity 15438 var ret = curCSS( elem, "opacity" ); 15439 return ret === "" ? "1" : ret; 15440 } 15441 } 15442 } 15443 }, 15444 15445 // Don't automatically add "px" to these possibly-unitless properties 15446 cssNumber: { 15447 "animationIterationCount": true, 15448 "columnCount": true, 15449 "fillOpacity": true, 15450 "flexGrow": true, 15451 "flexShrink": true, 15452 "fontWeight": true, 15453 "lineHeight": true, 15454 "opacity": true, 15455 "order": true, 15456 "orphans": true, 15457 "widows": true, 15458 "zIndex": true, 15459 "zoom": true 15460 }, 15461 15462 // Add in properties whose names you wish to fix before 15463 // setting or getting the value 15464 cssProps: { 15465 "float": "cssFloat" 15466 }, 15467 15468 // Get and set the style property on a DOM Node 15469 style: function( elem, name, value, extra ) { 15470 15471 // Don't set styles on text and comment nodes 15472 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { 15473 return; 15474 } 15475 15476 // Make sure that we're working with the right name 15477 var ret, type, hooks, 15478 origName = jQuery.camelCase( name ), 15479 style = elem.style; 15480 15481 name = jQuery.cssProps[ origName ] || 15482 ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); 15483 15484 // Gets hook for the prefixed version, then unprefixed version 15485 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 15486 15487 // Check if we're setting a value 15488 if ( value !== undefined ) { 15489 type = typeof value; 15490 15491 // Convert "+=" or "-=" to relative numbers (#7345) 15492 if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { 15493 value = adjustCSS( elem, name, ret ); 15494 15495 // Fixes bug #9237 15496 type = "number"; 15497 } 15498 15499 // Make sure that null and NaN values aren't set (#7116) 15500 if ( value == null || value !== value ) { 15501 return; 15502 } 15503 15504 // If a number was passed in, add the unit (except for certain CSS properties) 15505 if ( type === "number" ) { 15506 value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); 15507 } 15508 15509 // Support: IE9-11+ 15510 // background-* props affect original clone's values 15511 if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { 15512 style[ name ] = "inherit"; 15513 } 15514 15515 // If a hook was provided, use that value, otherwise just set the specified value 15516 if ( !hooks || !( "set" in hooks ) || 15517 ( value = hooks.set( elem, value, extra ) ) !== undefined ) { 15518 15519 style[ name ] = value; 15520 } 15521 15522 } else { 15523 15524 // If a hook was provided get the non-computed value from there 15525 if ( hooks && "get" in hooks && 15526 ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { 15527 15528 return ret; 15529 } 15530 15531 // Otherwise just get the value from the style object 15532 return style[ name ]; 15533 } 15534 }, 15535 15536 css: function( elem, name, extra, styles ) { 15537 var val, num, hooks, 15538 origName = jQuery.camelCase( name ); 15539 15540 // Make sure that we're working with the right name 15541 name = jQuery.cssProps[ origName ] || 15542 ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); 15543 15544 // Try prefixed name followed by the unprefixed name 15545 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 15546 15547 // If a hook was provided get the computed value from there 15548 if ( hooks && "get" in hooks ) { 15549 val = hooks.get( elem, true, extra ); 15550 } 15551 15552 // Otherwise, if a way to get the computed value exists, use that 15553 if ( val === undefined ) { 15554 val = curCSS( elem, name, styles ); 15555 } 15556 15557 // Convert "normal" to computed value 15558 if ( val === "normal" && name in cssNormalTransform ) { 15559 val = cssNormalTransform[ name ]; 15560 } 15561 15562 // Make numeric if forced or a qualifier was provided and val looks numeric 15563 if ( extra === "" || extra ) { 15564 num = parseFloat( val ); 15565 return extra === true || isFinite( num ) ? num || 0 : val; 15566 } 15567 return val; 15568 } 15569} ); 15570 15571jQuery.each( [ "height", "width" ], function( i, name ) { 15572 jQuery.cssHooks[ name ] = { 15573 get: function( elem, computed, extra ) { 15574 if ( computed ) { 15575 15576 // Certain elements can have dimension info if we invisibly show them 15577 // but it must have a current display style that would benefit 15578 return rdisplayswap.test( jQuery.css( elem, "display" ) ) && 15579 elem.offsetWidth === 0 ? 15580 swap( elem, cssShow, function() { 15581 return getWidthOrHeight( elem, name, extra ); 15582 } ) : 15583 getWidthOrHeight( elem, name, extra ); 15584 } 15585 }, 15586 15587 set: function( elem, value, extra ) { 15588 var matches, 15589 styles = extra && getStyles( elem ), 15590 subtract = extra && augmentWidthOrHeight( 15591 elem, 15592 name, 15593 extra, 15594 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 15595 styles 15596 ); 15597 15598 // Convert to pixels if value adjustment is needed 15599 if ( subtract && ( matches = rcssNum.exec( value ) ) && 15600 ( matches[ 3 ] || "px" ) !== "px" ) { 15601 15602 elem.style[ name ] = value; 15603 value = jQuery.css( elem, name ); 15604 } 15605 15606 return setPositiveNumber( elem, value, subtract ); 15607 } 15608 }; 15609} ); 15610 15611jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, 15612 function( elem, computed ) { 15613 if ( computed ) { 15614 return ( parseFloat( curCSS( elem, "marginLeft" ) ) || 15615 elem.getBoundingClientRect().left - 15616 swap( elem, { marginLeft: 0 }, function() { 15617 return elem.getBoundingClientRect().left; 15618 } ) 15619 ) + "px"; 15620 } 15621 } 15622); 15623 15624// Support: Android 2.3 15625jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight, 15626 function( elem, computed ) { 15627 if ( computed ) { 15628 return swap( elem, { "display": "inline-block" }, 15629 curCSS, [ elem, "marginRight" ] ); 15630 } 15631 } 15632); 15633 15634// These hooks are used by animate to expand properties 15635jQuery.each( { 15636 margin: "", 15637 padding: "", 15638 border: "Width" 15639}, function( prefix, suffix ) { 15640 jQuery.cssHooks[ prefix + suffix ] = { 15641 expand: function( value ) { 15642 var i = 0, 15643 expanded = {}, 15644 15645 // Assumes a single number if not a string 15646 parts = typeof value === "string" ? value.split( " " ) : [ value ]; 15647 15648 for ( ; i < 4; i++ ) { 15649 expanded[ prefix + cssExpand[ i ] + suffix ] = 15650 parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; 15651 } 15652 15653 return expanded; 15654 } 15655 }; 15656 15657 if ( !rmargin.test( prefix ) ) { 15658 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; 15659 } 15660} ); 15661 15662jQuery.fn.extend( { 15663 css: function( name, value ) { 15664 return access( this, function( elem, name, value ) { 15665 var styles, len, 15666 map = {}, 15667 i = 0; 15668 15669 if ( jQuery.isArray( name ) ) { 15670 styles = getStyles( elem ); 15671 len = name.length; 15672 15673 for ( ; i < len; i++ ) { 15674 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); 15675 } 15676 15677 return map; 15678 } 15679 15680 return value !== undefined ? 15681 jQuery.style( elem, name, value ) : 15682 jQuery.css( elem, name ); 15683 }, name, value, arguments.length > 1 ); 15684 }, 15685 show: function() { 15686 return showHide( this, true ); 15687 }, 15688 hide: function() { 15689 return showHide( this ); 15690 }, 15691 toggle: function( state ) { 15692 if ( typeof state === "boolean" ) { 15693 return state ? this.show() : this.hide(); 15694 } 15695 15696 return this.each( function() { 15697 if ( isHidden( this ) ) { 15698 jQuery( this ).show(); 15699 } else { 15700 jQuery( this ).hide(); 15701 } 15702 } ); 15703 } 15704} ); 15705 15706 15707function Tween( elem, options, prop, end, easing ) { 15708 return new Tween.prototype.init( elem, options, prop, end, easing ); 15709} 15710jQuery.Tween = Tween; 15711
vendor: 5,170 bytes, lines 15712-15911
15712Tween.prototype = { 15713 constructor: Tween, 15714 init: function( elem, options, prop, end, easing, unit ) { 15715 this.elem = elem; 15716 this.prop = prop; 15717 this.easing = easing || jQuery.easing._default; 15718 this.options = options; 15719 this.start = this.now = this.cur(); 15720 this.end = end; 15721 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 15722 }, 15723 cur: function() { 15724 var hooks = Tween.propHooks[ this.prop ]; 15725 15726 return hooks && hooks.get ? 15727 hooks.get( this ) : 15728 Tween.propHooks._default.get( this ); 15729 }, 15730 run: function( percent ) { 15731 var eased, 15732 hooks = Tween.propHooks[ this.prop ]; 15733 15734 if ( this.options.duration ) { 15735 this.pos = eased = jQuery.easing[ this.easing ]( 15736 percent, this.options.duration * percent, 0, 1, this.options.duration 15737 ); 15738 } else { 15739 this.pos = eased = percent; 15740 } 15741 this.now = ( this.end - this.start ) * eased + this.start; 15742 15743 if ( this.options.step ) { 15744 this.options.step.call( this.elem, this.now, this ); 15745 } 15746 15747 if ( hooks && hooks.set ) { 15748 hooks.set( this ); 15749 } else { 15750 Tween.propHooks._default.set( this ); 15751 } 15752 return this; 15753 } 15754}; 15755 15756Tween.prototype.init.prototype = Tween.prototype; 15757 15758Tween.propHooks = { 15759 _default: { 15760 get: function( tween ) { 15761 var result; 15762 15763 // Use a property on the element directly when it is not a DOM element, 15764 // or when there is no matching style property that exists. 15765 if ( tween.elem.nodeType !== 1 || 15766 tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { 15767 return tween.elem[ tween.prop ]; 15768 } 15769 15770 // Passing an empty string as a 3rd parameter to .css will automatically 15771 // attempt a parseFloat and fallback to a string if the parse fails. 15772 // Simple values such as "10px" are parsed to Float; 15773 // complex values such as "rotate(1rad)" are returned as-is. 15774 result = jQuery.css( tween.elem, tween.prop, "" ); 15775 15776 // Empty strings, null, undefined and "auto" are converted to 0. 15777 return !result || result === "auto" ? 0 : result; 15778 }, 15779 set: function( tween ) { 15780 15781 // Use step hook for back compat. 15782 // Use cssHook if its there. 15783 // Use .style if available and use plain properties where available. 15784 if ( jQuery.fx.step[ tween.prop ] ) { 15785 jQuery.fx.step[ tween.prop ]( tween ); 15786 } else if ( tween.elem.nodeType === 1 && 15787 ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || 15788 jQuery.cssHooks[ tween.prop ] ) ) { 15789 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); 15790 } else { 15791 tween.elem[ tween.prop ] = tween.now; 15792 } 15793 } 15794 } 15795}; 15796 15797// Support: IE9 15798// Panic based approach to setting things on disconnected nodes 15799Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 15800 set: function( tween ) { 15801 if ( tween.elem.nodeType && tween.elem.parentNode ) { 15802 tween.elem[ tween.prop ] = tween.now; 15803 } 15804 } 15805}; 15806 15807jQuery.easing = { 15808 linear: function( p ) { 15809 return p; 15810 }, 15811 swing: function( p ) { 15812 return 0.5 - Math.cos( p * Math.PI ) / 2; 15813 }, 15814 _default: "swing" 15815}; 15816 15817jQuery.fx = Tween.prototype.init; 15818 15819// Back Compat <1.8 extension point 15820jQuery.fx.step = {}; 15821 15822 15823 15824 15825var 15826 fxNow, timerId, 15827 rfxtypes = /^(?:toggle|show|hide)$/, 15828 rrun = /queueHooks$/; 15829 15830// Animations created synchronously will run synchronously 15831function createFxNow() { 15832 window.setTimeout( function() { 15833 fxNow = undefined; 15834 } ); 15835 return ( fxNow = jQuery.now() ); 15836} 15837 15838// Generate parameters to create a standard animation 15839function genFx( type, includeWidth ) { 15840 var which, 15841 i = 0, 15842 attrs = { height: type }; 15843 15844 // If we include width, step value is 1 to do all cssExpand values, 15845 // otherwise step value is 2 to skip over Left and Right 15846 includeWidth = includeWidth ? 1 : 0; 15847 for ( ; i < 4 ; i += 2 - includeWidth ) { 15848 which = cssExpand[ i ]; 15849 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; 15850 } 15851 15852 if ( includeWidth ) { 15853 attrs.opacity = attrs.width = type; 15854 } 15855 15856 return attrs; 15857} 15858 15859function createTween( value, prop, animation ) { 15860 var tween, 15861 collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), 15862 index = 0, 15863 length = collection.length; 15864 for ( ; index < length; index++ ) { 15865 if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { 15866 15867 // We're done with this property 15868 return tween; 15869 } 15870 } 15871} 15872 15873function defaultPrefilter( elem, props, opts ) { 15874 /* jshint validthis: true */ 15875 var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, 15876 anim = this, 15877 orig = {}, 15878 style = elem.style, 15879 hidden = elem.nodeType && isHidden( elem ), 15880 dataShow = dataPriv.get( elem, "fxshow" ); 15881 15882 // Handle queue: false promises 15883 if ( !opts.queue ) { 15884 hooks = jQuery._queueHooks( elem, "fx" ); 15885 if ( hooks.unqueued == null ) { 15886 hooks.unqueued = 0; 15887 oldfire = hooks.empty.fire; 15888 hooks.empty.fire = function() { 15889 if ( !hooks.unqueued ) { 15890 oldfire(); 15891 } 15892 }; 15893 } 15894 hooks.unqueued++; 15895 15896 anim.always( function() { 15897 15898 // Ensure the complete handler is called before this completes 15899 anim.always( function() { 15900 hooks.unqueued--; 15901 if ( !jQuery.queue( elem, "fx" ).length ) { 15902 hooks.empty.fire(); 15903 } 15904 } ); 15905 } ); 15906 } 15907 15908 // Height/width overflow pass 15909 if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { 15910 15911 // Make sure that nothing sneaks out
15912 // Record all 3 overflow attributes because IE9-10 do not 15913 // change the overflow attribute when overflowX and 15914 // overflowY are set to the same value 15915 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; 15916 15917 // Set display property to inline-block for height/width 15918 // animations on inline elements that are having width/height animated 15919 display = jQuery.css( elem, "display" ); 15920 15921 // Test default display if display is currently "none" 15922 checkDisplay = display === "none" ? 15923 dataPriv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; 15924 15925 if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { 15926 style.display = "inline-block"; 15927 } 15928 } 15929 15930 if ( opts.overflow ) { 15931 style.overflow = "hidden"; 15932 anim.always( function() { 15933 style.overflow = opts.overflow[ 0 ]; 15934 style.overflowX = opts.overflow[ 1 ]; 15935 style.overflowY = opts.overflow[ 2 ]; 15936 } ); 15937 } 15938 15939 // show/hide pass 15940 for ( prop in props ) { 15941 value = props[ prop ]; 15942 if ( rfxtypes.exec( value ) ) { 15943 delete props[ prop ]; 15944 toggle = toggle || value === "toggle"; 15945 if ( value === ( hidden ? "hide" : "show" ) ) { 15946 15947 // If there is dataShow left over from a stopped hide or show 15948 // and we are going to proceed with show, we should pretend to be hidden 15949 if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { 15950 hidden = true; 15951 } else { 15952 continue; 15953 } 15954 } 15955 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); 15956 15957 // Any non-fx value stops us from restoring the original display value 15958 } else { 15959 display = undefined; 15960 } 15961 } 15962 15963 if ( !jQuery.isEmptyObject( orig ) ) { 15964 if ( dataShow ) { 15965 if ( "hidden" in dataShow ) { 15966 hidden = dataShow.hidden; 15967 } 15968 } else { 15969 dataShow = dataPriv.access( elem, "fxshow", {} ); 15970 } 15971 15972 // Store state if its toggle - enables .stop().toggle() to "reverse" 15973 if ( toggle ) { 15974 dataShow.hidden = !hidden; 15975 } 15976 if ( hidden ) { 15977 jQuery( elem ).show(); 15978 } else { 15979 anim.done( function() { 15980 jQuery( elem ).hide(); 15981 } ); 15982 } 15983 anim.done( function() { 15984 var prop; 15985 15986 dataPriv.remove( elem, "fxshow" ); 15987 for ( prop in orig ) { 15988 jQuery.style( elem, prop, orig[ prop ] ); 15989 } 15990 } ); 15991 for ( prop in orig ) { 15992 tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); 15993 15994 if ( !( prop in dataShow ) ) { 15995 dataShow[ prop ] = tween.start; 15996 if ( hidden ) { 15997 tween.end = tween.start; 15998 tween.start = prop === "width" || prop === "height" ? 1 : 0; 15999 } 16000 } 16001 } 16002 16003 // If this is a noop like .hide().hide(), restore an overwritten display value 16004 } else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) { 16005 style.display = display; 16006 } 16007} 16008 16009function propFilter( props, specialEasing ) { 16010 var index, name, easing, value, hooks; 16011 16012 // camelCase, specialEasing and expand cssHook pass 16013 for ( index in props ) { 16014 name = jQuery.camelCase( index ); 16015 easing = specialEasing[ name ]; 16016 value = props[ index ]; 16017 if ( jQuery.isArray( value ) ) { 16018 easing = value[ 1 ]; 16019 value = props[ index ] = value[ 0 ]; 16020 } 16021 16022 if ( index !== name ) { 16023 props[ name ] = value; 16024 delete props[ index ]; 16025 } 16026 16027 hooks = jQuery.cssHooks[ name ]; 16028 if ( hooks && "expand" in hooks ) { 16029 value = hooks.expand( value ); 16030 delete props[ name ]; 16031 16032 // Not quite $.extend, this won't overwrite existing keys. 16033 // Reusing 'index' because we have the correct "name" 16034 for ( index in value ) { 16035 if ( !( index in props ) ) { 16036 props[ index ] = value[ index ]; 16037 specialEasing[ index ] = easing; 16038 } 16039 } 16040 } else { 16041 specialEasing[ name ] = easing; 16042 } 16043 } 16044} 16045 16046function Animation( elem, properties, options ) { 16047 var result, 16048 stopped, 16049 index = 0, 16050 length = Animation.prefilters.length, 16051 deferred = jQuery.Deferred().always( function() { 16052 16053 // Don't match elem in the :animated selector 16054 delete tick.elem; 16055 } ), 16056 tick = function() { 16057 if ( stopped ) { 16058 return false; 16059 } 16060 var currentTime = fxNow || createFxNow(), 16061 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), 16062
vendor: 9,405 bytes, lines 16063-16434
16063 // Support: Android 2.3 16064 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) 16065 temp = remaining / animation.duration || 0, 16066 percent = 1 - temp, 16067 index = 0, 16068 length = animation.tweens.length; 16069 16070 for ( ; index < length ; index++ ) { 16071 animation.tweens[ index ].run( percent ); 16072 } 16073 16074 deferred.notifyWith( elem, [ animation, percent, remaining ] ); 16075 16076 if ( percent < 1 && length ) { 16077 return remaining; 16078 } else { 16079 deferred.resolveWith( elem, [ animation ] ); 16080 return false; 16081 } 16082 }, 16083 animation = deferred.promise( { 16084 elem: elem, 16085 props: jQuery.extend( {}, properties ), 16086 opts: jQuery.extend( true, { 16087 specialEasing: {}, 16088 easing: jQuery.easing._default 16089 }, options ), 16090 originalProperties: properties, 16091 originalOptions: options, 16092 startTime: fxNow || createFxNow(), 16093 duration: options.duration, 16094 tweens: [], 16095 createTween: function( prop, end ) { 16096 var tween = jQuery.Tween( elem, animation.opts, prop, end, 16097 animation.opts.specialEasing[ prop ] || animation.opts.easing ); 16098 animation.tweens.push( tween ); 16099 return tween; 16100 }, 16101 stop: function( gotoEnd ) { 16102 var index = 0, 16103 16104 // If we are going to the end, we want to run all the tweens 16105 // otherwise we skip this part 16106 length = gotoEnd ? animation.tweens.length : 0; 16107 if ( stopped ) { 16108 return this; 16109 } 16110 stopped = true; 16111 for ( ; index < length ; index++ ) { 16112 animation.tweens[ index ].run( 1 ); 16113 } 16114 16115 // Resolve when we played the last frame; otherwise, reject 16116 if ( gotoEnd ) { 16117 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 16118 deferred.resolveWith( elem, [ animation, gotoEnd ] ); 16119 } else { 16120 deferred.rejectWith( elem, [ animation, gotoEnd ] ); 16121 } 16122 return this; 16123 } 16124 } ), 16125 props = animation.props; 16126 16127 propFilter( props, animation.opts.specialEasing ); 16128 16129 for ( ; index < length ; index++ ) { 16130 result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); 16131 if ( result ) { 16132 if ( jQuery.isFunction( result.stop ) ) { 16133 jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = 16134 jQuery.proxy( result.stop, result ); 16135 } 16136 return result; 16137 } 16138 } 16139 16140 jQuery.map( props, createTween, animation ); 16141 16142 if ( jQuery.isFunction( animation.opts.start ) ) { 16143 animation.opts.start.call( elem, animation ); 16144 } 16145 16146 jQuery.fx.timer( 16147 jQuery.extend( tick, { 16148 elem: elem, 16149 anim: animation, 16150 queue: animation.opts.queue 16151 } ) 16152 ); 16153 16154 // attach callbacks from options 16155 return animation.progress( animation.opts.progress ) 16156 .done( animation.opts.done, animation.opts.complete ) 16157 .fail( animation.opts.fail ) 16158 .always( animation.opts.always ); 16159} 16160 16161jQuery.Animation = jQuery.extend( Animation, { 16162 tweeners: { 16163 "*": [ function( prop, value ) { 16164 var tween = this.createTween( prop, value ); 16165 adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); 16166 return tween; 16167 } ] 16168 }, 16169 16170 tweener: function( props, callback ) { 16171 if ( jQuery.isFunction( props ) ) { 16172 callback = props; 16173 props = [ "*" ]; 16174 } else { 16175 props = props.match( rnotwhite ); 16176 } 16177 16178 var prop, 16179 index = 0, 16180 length = props.length; 16181 16182 for ( ; index < length ; index++ ) { 16183 prop = props[ index ]; 16184 Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; 16185 Animation.tweeners[ prop ].unshift( callback ); 16186 } 16187 }, 16188 16189 prefilters: [ defaultPrefilter ], 16190 16191 prefilter: function( callback, prepend ) { 16192 if ( prepend ) { 16193 Animation.prefilters.unshift( callback ); 16194 } else { 16195 Animation.prefilters.push( callback ); 16196 } 16197 } 16198} ); 16199 16200jQuery.speed = function( speed, easing, fn ) { 16201 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { 16202 complete: fn || !fn && easing || 16203 jQuery.isFunction( speed ) && speed, 16204 duration: speed, 16205 easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing 16206 }; 16207 16208 opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? 16209 opt.duration : opt.duration in jQuery.fx.speeds ? 16210 jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; 16211 16212 // Normalize opt.queue - true/undefined/null -> "fx" 16213 if ( opt.queue == null || opt.queue === true ) { 16214 opt.queue = "fx"; 16215 } 16216 16217 // Queueing 16218 opt.old = opt.complete; 16219 16220 opt.complete = function() { 16221 if ( jQuery.isFunction( opt.old ) ) { 16222 opt.old.call( this ); 16223 } 16224 16225 if ( opt.queue ) { 16226 jQuery.dequeue( this, opt.queue ); 16227 } 16228 }; 16229 16230 return opt; 16231}; 16232 16233jQuery.fn.extend( { 16234 fadeTo: function( speed, to, easing, callback ) { 16235 16236 // Show any hidden elements after setting opacity to 0 16237 return this.filter( isHidden ).css( "opacity", 0 ).show() 16238 16239 // Animate to the value specified 16240 .end().animate( { opacity: to }, speed, easing, callback ); 16241 }, 16242 animate: function( prop, speed, easing, callback ) { 16243 var empty = jQuery.isEmptyObject( prop ), 16244 optall = jQuery.speed( speed, easing, callback ), 16245 doAnimation = function() { 16246 16247 // Operate on a copy of prop so per-property easing won't be lost 16248 var anim = Animation( this, jQuery.extend( {}, prop ), optall ); 16249 16250 // Empty animations, or finishing resolves immediately 16251 if ( empty || dataPriv.get( this, "finish" ) ) { 16252 anim.stop( true ); 16253 } 16254 }; 16255 doAnimation.finish = doAnimation; 16256 16257 return empty || optall.queue === false ? 16258 this.each( doAnimation ) : 16259 this.queue( optall.queue, doAnimation ); 16260 }, 16261 stop: function( type, clearQueue, gotoEnd ) { 16262 var stopQueue = function( hooks ) { 16263 var stop = hooks.stop; 16264 delete hooks.stop; 16265 stop( gotoEnd ); 16266 }; 16267 16268 if ( typeof type !== "string" ) { 16269 gotoEnd = clearQueue; 16270 clearQueue = type; 16271 type = undefined; 16272 } 16273 if ( clearQueue && type !== false ) { 16274 this.queue( type || "fx", [] ); 16275 } 16276 16277 return this.each( function() { 16278 var dequeue = true, 16279 index = type != null && type + "queueHooks", 16280 timers = jQuery.timers, 16281 data = dataPriv.get( this ); 16282 16283 if ( index ) { 16284 if ( data[ index ] && data[ index ].stop ) { 16285 stopQueue( data[ index ] ); 16286 } 16287 } else { 16288 for ( index in data ) { 16289 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { 16290 stopQueue( data[ index ] ); 16291 } 16292 } 16293 } 16294 16295 for ( index = timers.length; index--; ) { 16296 if ( timers[ index ].elem === this && 16297 ( type == null || timers[ index ].queue === type ) ) { 16298 16299 timers[ index ].anim.stop( gotoEnd ); 16300 dequeue = false; 16301 timers.splice( index, 1 ); 16302 } 16303 } 16304 16305 // Start the next in the queue if the last step wasn't forced. 16306 // Timers currently will call their complete callbacks, which 16307 // will dequeue but only if they were gotoEnd. 16308 if ( dequeue || !gotoEnd ) { 16309 jQuery.dequeue( this, type ); 16310 } 16311 } ); 16312 }, 16313 finish: function( type ) { 16314 if ( type !== false ) { 16315 type = type || "fx"; 16316 } 16317 return this.each( function() { 16318 var index, 16319 data = dataPriv.get( this ), 16320 queue = data[ type + "queue" ], 16321 hooks = data[ type + "queueHooks" ], 16322 timers = jQuery.timers, 16323 length = queue ? queue.length : 0; 16324 16325 // Enable finishing flag on private data 16326 data.finish = true; 16327 16328 // Empty the queue first 16329 jQuery.queue( this, type, [] ); 16330 16331 if ( hooks && hooks.stop ) { 16332 hooks.stop.call( this, true ); 16333 } 16334 16335 // Look for any active animations, and finish them 16336 for ( index = timers.length; index--; ) { 16337 if ( timers[ index ].elem === this && timers[ index ].queue === type ) { 16338 timers[ index ].anim.stop( true ); 16339 timers.splice( index, 1 ); 16340 } 16341 } 16342 16343 // Look for any animations in the old queue and finish them 16344 for ( index = 0; index < length; index++ ) { 16345 if ( queue[ index ] && queue[ index ].finish ) { 16346 queue[ index ].finish.call( this ); 16347 } 16348 } 16349 16350 // Turn off finishing flag 16351 delete data.finish; 16352 } ); 16353 } 16354} ); 16355 16356jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { 16357 var cssFn = jQuery.fn[ name ]; 16358 jQuery.fn[ name ] = function( speed, easing, callback ) { 16359 return speed == null || typeof speed === "boolean" ? 16360 cssFn.apply( this, arguments ) : 16361 this.animate( genFx( name, true ), speed, easing, callback ); 16362 }; 16363} ); 16364 16365// Generate shortcuts for custom animations 16366jQuery.each( { 16367 slideDown: genFx( "show" ), 16368 slideUp: genFx( "hide" ), 16369 slideToggle: genFx( "toggle" ), 16370 fadeIn: { opacity: "show" }, 16371 fadeOut: { opacity: "hide" }, 16372 fadeToggle: { opacity: "toggle" } 16373}, function( name, props ) { 16374 jQuery.fn[ name ] = function( speed, easing, callback ) { 16375 return this.animate( props, speed, easing, callback ); 16376 }; 16377} ); 16378 16379jQuery.timers = []; 16380jQuery.fx.tick = function() { 16381 var timer, 16382 i = 0, 16383 timers = jQuery.timers; 16384 16385 fxNow = jQuery.now(); 16386 16387 for ( ; i < timers.length; i++ ) { 16388 timer = timers[ i ]; 16389 16390 // Checks the timer has not already been removed 16391 if ( !timer() && timers[ i ] === timer ) { 16392 timers.splice( i--, 1 ); 16393 } 16394 } 16395 16396 if ( !timers.length ) { 16397 jQuery.fx.stop(); 16398 } 16399 fxNow = undefined; 16400}; 16401 16402jQuery.fx.timer = function( timer ) { 16403 jQuery.timers.push( timer ); 16404 if ( timer() ) { 16405 jQuery.fx.start(); 16406 } else { 16407 jQuery.timers.pop(); 16408 } 16409}; 16410 16411jQuery.fx.interval = 13; 16412jQuery.fx.start = function() { 16413 if ( !timerId ) { 16414 timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval ); 16415 } 16416}; 16417 16418jQuery.fx.stop = function() { 16419 window.clearInterval( timerId ); 16420 16421 timerId = null; 16422}; 16423 16424jQuery.fx.speeds = { 16425 slow: 600, 16426 fast: 200, 16427 16428 // Default speed 16429 _default: 400 16430}; 16431 16432 16433// Based off of the plugin by Clint Helfers, with permission. 16434// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
vendor: 20,418 bytes, lines 16435-17279
16435jQuery.fn.delay = function( time, type ) { 16436 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 16437 type = type || "fx"; 16438 16439 return this.queue( type, function( next, hooks ) { 16440 var timeout = window.setTimeout( next, time ); 16441 hooks.stop = function() { 16442 window.clearTimeout( timeout ); 16443 }; 16444 } ); 16445}; 16446 16447 16448( function() { 16449 var input = document.createElement( "input" ), 16450 select = document.createElement( "select" ), 16451 opt = select.appendChild( document.createElement( "option" ) ); 16452 16453 input.type = "checkbox"; 16454 16455 // Support: iOS<=5.1, Android<=4.2+ 16456 // Default value for a checkbox should be "on" 16457 support.checkOn = input.value !== ""; 16458 16459 // Support: IE<=11+ 16460 // Must access selectedIndex to make default options select 16461 support.optSelected = opt.selected; 16462 16463 // Support: Android<=2.3 16464 // Options inside disabled selects are incorrectly marked as disabled 16465 select.disabled = true; 16466 support.optDisabled = !opt.disabled; 16467 16468 // Support: IE<=11+ 16469 // An input loses its value after becoming a radio 16470 input = document.createElement( "input" ); 16471 input.value = "t"; 16472 input.type = "radio"; 16473 support.radioValue = input.value === "t"; 16474} )(); 16475 16476 16477var boolHook, 16478 attrHandle = jQuery.expr.attrHandle; 16479 16480jQuery.fn.extend( { 16481 attr: function( name, value ) { 16482 return access( this, jQuery.attr, name, value, arguments.length > 1 ); 16483 }, 16484 16485 removeAttr: function( name ) { 16486 return this.each( function() { 16487 jQuery.removeAttr( this, name ); 16488 } ); 16489 } 16490} ); 16491 16492jQuery.extend( { 16493 attr: function( elem, name, value ) { 16494 var ret, hooks, 16495 nType = elem.nodeType; 16496 16497 // Don't get/set attributes on text, comment and attribute nodes 16498 if ( nType === 3 || nType === 8 || nType === 2 ) { 16499 return; 16500 } 16501 16502 // Fallback to prop when attributes are not supported 16503 if ( typeof elem.getAttribute === "undefined" ) { 16504 return jQuery.prop( elem, name, value ); 16505 } 16506 16507 // All attributes are lowercase 16508 // Grab necessary hook if one is defined 16509 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 16510 name = name.toLowerCase(); 16511 hooks = jQuery.attrHooks[ name ] || 16512 ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); 16513 } 16514 16515 if ( value !== undefined ) { 16516 if ( value === null ) { 16517 jQuery.removeAttr( elem, name ); 16518 return; 16519 } 16520 16521 if ( hooks && "set" in hooks && 16522 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 16523 return ret; 16524 } 16525 16526 elem.setAttribute( name, value + "" ); 16527 return value; 16528 } 16529 16530 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 16531 return ret; 16532 } 16533 16534 ret = jQuery.find.attr( elem, name ); 16535 16536 // Non-existent attributes return null, we normalize to undefined 16537 return ret == null ? undefined : ret; 16538 }, 16539 16540 attrHooks: { 16541 type: { 16542 set: function( elem, value ) { 16543 if ( !support.radioValue && value === "radio" && 16544 jQuery.nodeName( elem, "input" ) ) { 16545 var val = elem.value; 16546 elem.setAttribute( "type", value ); 16547 if ( val ) { 16548 elem.value = val; 16549 } 16550 return value; 16551 } 16552 } 16553 } 16554 }, 16555 16556 removeAttr: function( elem, value ) { 16557 var name, propName, 16558 i = 0, 16559 attrNames = value && value.match( rnotwhite ); 16560 16561 if ( attrNames && elem.nodeType === 1 ) { 16562 while ( ( name = attrNames[ i++ ] ) ) { 16563 propName = jQuery.propFix[ name ] || name; 16564 16565 // Boolean attributes get special treatment (#10870) 16566 if ( jQuery.expr.match.bool.test( name ) ) { 16567 16568 // Set corresponding property to false 16569 elem[ propName ] = false; 16570 } 16571 16572 elem.removeAttribute( name ); 16573 } 16574 } 16575 } 16576} ); 16577 16578// Hooks for boolean attributes 16579boolHook = { 16580 set: function( elem, value, name ) { 16581 if ( value === false ) { 16582 16583 // Remove boolean attributes when set to false 16584 jQuery.removeAttr( elem, name ); 16585 } else { 16586 elem.setAttribute( name, name ); 16587 } 16588 return name; 16589 } 16590}; 16591jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { 16592 var getter = attrHandle[ name ] || jQuery.find.attr; 16593 16594 attrHandle[ name ] = function( elem, name, isXML ) { 16595 var ret, handle; 16596 if ( !isXML ) { 16597 16598 // Avoid an infinite loop by temporarily removing this function from the getter 16599 handle = attrHandle[ name ]; 16600 attrHandle[ name ] = ret; 16601 ret = getter( elem, name, isXML ) != null ? 16602 name.toLowerCase() : 16603 null; 16604 attrHandle[ name ] = handle; 16605 } 16606 return ret; 16607 }; 16608} ); 16609 16610 16611 16612 16613var rfocusable = /^(?:input|select|textarea|button)$/i, 16614 rclickable = /^(?:a|area)$/i; 16615 16616jQuery.fn.extend( { 16617 prop: function( name, value ) { 16618 return access( this, jQuery.prop, name, value, arguments.length > 1 ); 16619 }, 16620 16621 removeProp: function( name ) { 16622 return this.each( function() { 16623 delete this[ jQuery.propFix[ name ] || name ]; 16624 } ); 16625 } 16626} ); 16627 16628jQuery.extend( { 16629 prop: function( elem, name, value ) { 16630 var ret, hooks, 16631 nType = elem.nodeType; 16632 16633 // Don't get/set properties on text, comment and attribute nodes 16634 if ( nType === 3 || nType === 8 || nType === 2 ) { 16635 return; 16636 } 16637 16638 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 16639 16640 // Fix name and attach hooks 16641 name = jQuery.propFix[ name ] || name; 16642 hooks = jQuery.propHooks[ name ]; 16643 } 16644 16645 if ( value !== undefined ) { 16646 if ( hooks && "set" in hooks && 16647 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 16648 return ret; 16649 } 16650 16651 return ( elem[ name ] = value ); 16652 } 16653 16654 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 16655 return ret; 16656 } 16657 16658 return elem[ name ]; 16659 }, 16660 16661 propHooks: { 16662 tabIndex: { 16663 get: function( elem ) { 16664 16665 // elem.tabIndex doesn't always return the 16666 // correct value when it hasn't been explicitly set 16667 // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 16668 // Use proper attribute retrieval(#12072) 16669 var tabindex = jQuery.find.attr( elem, "tabindex" ); 16670 16671 return tabindex ? 16672 parseInt( tabindex, 10 ) : 16673 rfocusable.test( elem.nodeName ) || 16674 rclickable.test( elem.nodeName ) && elem.href ? 16675 0 : 16676 -1; 16677 } 16678 } 16679 }, 16680 16681 propFix: { 16682 "for": "htmlFor", 16683 "class": "className" 16684 } 16685} ); 16686 16687// Support: IE <=11 only 16688// Accessing the selectedIndex property 16689// forces the browser to respect setting selected 16690// on the option 16691// The getter ensures a default option is selected 16692// when in an optgroup 16693if ( !support.optSelected ) { 16694 jQuery.propHooks.selected = { 16695 get: function( elem ) { 16696 var parent = elem.parentNode; 16697 if ( parent && parent.parentNode ) { 16698 parent.parentNode.selectedIndex; 16699 } 16700 return null; 16701 }, 16702 set: function( elem ) { 16703 var parent = elem.parentNode; 16704 if ( parent ) { 16705 parent.selectedIndex; 16706 16707 if ( parent.parentNode ) { 16708 parent.parentNode.selectedIndex; 16709 } 16710 } 16711 } 16712 }; 16713} 16714 16715jQuery.each( [ 16716 "tabIndex", 16717 "readOnly", 16718 "maxLength", 16719 "cellSpacing", 16720 "cellPadding", 16721 "rowSpan", 16722 "colSpan", 16723 "useMap", 16724 "frameBorder", 16725 "contentEditable" 16726], function() { 16727 jQuery.propFix[ this.toLowerCase() ] = this; 16728} ); 16729 16730 16731 16732 16733var rclass = /[\t\r\n\f]/g; 16734 16735function getClass( elem ) { 16736 return elem.getAttribute && elem.getAttribute( "class" ) || ""; 16737} 16738 16739jQuery.fn.extend( { 16740 addClass: function( value ) { 16741 var classes, elem, cur, curValue, clazz, j, finalValue, 16742 i = 0; 16743 16744 if ( jQuery.isFunction( value ) ) { 16745 return this.each( function( j ) { 16746 jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); 16747 } ); 16748 } 16749 16750 if ( typeof value === "string" && value ) { 16751 classes = value.match( rnotwhite ) || []; 16752 16753 while ( ( elem = this[ i++ ] ) ) { 16754 curValue = getClass( elem ); 16755 cur = elem.nodeType === 1 && 16756 ( " " + curValue + " " ).replace( rclass, " " ); 16757 16758 if ( cur ) { 16759 j = 0; 16760 while ( ( clazz = classes[ j++ ] ) ) { 16761 if ( cur.indexOf( " " + clazz + " " ) < 0 ) { 16762 cur += clazz + " "; 16763 } 16764 } 16765 16766 // Only assign if different to avoid unneeded rendering. 16767 finalValue = jQuery.trim( cur ); 16768 if ( curValue !== finalValue ) { 16769 elem.setAttribute( "class", finalValue ); 16770 } 16771 } 16772 } 16773 } 16774 16775 return this; 16776 }, 16777 16778 removeClass: function( value ) { 16779 var classes, elem, cur, curValue, clazz, j, finalValue, 16780 i = 0; 16781 16782 if ( jQuery.isFunction( value ) ) { 16783 return this.each( function( j ) { 16784 jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); 16785 } ); 16786 } 16787 16788 if ( !arguments.length ) { 16789 return this.attr( "class", "" ); 16790 } 16791 16792 if ( typeof value === "string" && value ) { 16793 classes = value.match( rnotwhite ) || []; 16794 16795 while ( ( elem = this[ i++ ] ) ) { 16796 curValue = getClass( elem ); 16797 16798 // This expression is here for better compressibility (see addClass) 16799 cur = elem.nodeType === 1 && 16800 ( " " + curValue + " " ).replace( rclass, " " ); 16801 16802 if ( cur ) { 16803 j = 0; 16804 while ( ( clazz = classes[ j++ ] ) ) { 16805 16806 // Remove *all* instances 16807 while ( cur.indexOf( " " + clazz + " " ) > -1 ) { 16808 cur = cur.replace( " " + clazz + " ", " " ); 16809 } 16810 } 16811 16812 // Only assign if different to avoid unneeded rendering. 16813 finalValue = jQuery.trim( cur ); 16814 if ( curValue !== finalValue ) { 16815 elem.setAttribute( "class", finalValue ); 16816 } 16817 } 16818 } 16819 } 16820 16821 return this; 16822 }, 16823 16824 toggleClass: function( value, stateVal ) { 16825 var type = typeof value; 16826 16827 if ( typeof stateVal === "boolean" && type === "string" ) { 16828 return stateVal ? this.addClass( value ) : this.removeClass( value ); 16829 } 16830 16831 if ( jQuery.isFunction( value ) ) { 16832 return this.each( function( i ) { 16833 jQuery( this ).toggleClass( 16834 value.call( this, i, getClass( this ), stateVal ), 16835 stateVal 16836 ); 16837 } ); 16838 } 16839 16840 return this.each( function() { 16841 var className, i, self, classNames; 16842 16843 if ( type === "string" ) { 16844 16845 // Toggle individual class names 16846 i = 0; 16847 self = jQuery( this ); 16848 classNames = value.match( rnotwhite ) || []; 16849 16850 while ( ( className = classNames[ i++ ] ) ) { 16851 16852 // Check each className given, space separated list 16853 if ( self.hasClass( className ) ) { 16854 self.removeClass( className ); 16855 } else { 16856 self.addClass( className ); 16857 } 16858 } 16859 16860 // Toggle whole class name 16861 } else if ( value === undefined || type === "boolean" ) { 16862 className = getClass( this ); 16863 if ( className ) { 16864 16865 // Store className if set 16866 dataPriv.set( this, "__className__", className ); 16867 } 16868 16869 // If the element has a class name or if we're passed `false`, 16870 // then remove the whole classname (if there was one, the above saved it). 16871 // Otherwise bring back whatever was previously saved (if anything), 16872 // falling back to the empty string if nothing was stored. 16873 if ( this.setAttribute ) { 16874 this.setAttribute( "class", 16875 className || value === false ? 16876 "" : 16877 dataPriv.get( this, "__className__" ) || "" 16878 ); 16879 } 16880 } 16881 } ); 16882 }, 16883 16884 hasClass: function( selector ) { 16885 var className, elem, 16886 i = 0; 16887 16888 className = " " + selector + " "; 16889 while ( ( elem = this[ i++ ] ) ) { 16890 if ( elem.nodeType === 1 && 16891 ( " " + getClass( elem ) + " " ).replace( rclass, " " ) 16892 .indexOf( className ) > -1 16893 ) { 16894 return true; 16895 } 16896 } 16897 16898 return false; 16899 } 16900} ); 16901 16902 16903 16904 16905var rreturn = /\r/g, 16906 rspaces = /[\x20\t\r\n\f]+/g; 16907 16908jQuery.fn.extend( { 16909 val: function( value ) { 16910 var hooks, ret, isFunction, 16911 elem = this[ 0 ]; 16912 16913 if ( !arguments.length ) { 16914 if ( elem ) { 16915 hooks = jQuery.valHooks[ elem.type ] || 16916 jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 16917 16918 if ( hooks && 16919 "get" in hooks && 16920 ( ret = hooks.get( elem, "value" ) ) !== undefined 16921 ) { 16922 return ret; 16923 } 16924 16925 ret = elem.value; 16926 16927 return typeof ret === "string" ? 16928 16929 // Handle most common string cases 16930 ret.replace( rreturn, "" ) : 16931 16932 // Handle cases where value is null/undef or number 16933 ret == null ? "" : ret; 16934 } 16935 16936 return; 16937 } 16938 16939 isFunction = jQuery.isFunction( value ); 16940 16941 return this.each( function( i ) { 16942 var val; 16943 16944 if ( this.nodeType !== 1 ) { 16945 return; 16946 } 16947 16948 if ( isFunction ) { 16949 val = value.call( this, i, jQuery( this ).val() ); 16950 } else { 16951 val = value; 16952 } 16953 16954 // Treat null/undefined as ""; convert numbers to string 16955 if ( val == null ) { 16956 val = ""; 16957 16958 } else if ( typeof val === "number" ) { 16959 val += ""; 16960 16961 } else if ( jQuery.isArray( val ) ) { 16962 val = jQuery.map( val, function( value ) { 16963 return value == null ? "" : value + ""; 16964 } ); 16965 } 16966 16967 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 16968 16969 // If set returns undefined, fall back to normal setting 16970 if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { 16971 this.value = val; 16972 } 16973 } ); 16974 } 16975} ); 16976 16977jQuery.extend( { 16978 valHooks: { 16979 option: { 16980 get: function( elem ) { 16981 16982 var val = jQuery.find.attr( elem, "value" ); 16983 return val != null ? 16984 val : 16985 16986 // Support: IE10-11+ 16987 // option.text throws exceptions (#14686, #14858) 16988 // Strip and collapse whitespace 16989 // https://html.spec.whatwg.org/#strip-and-collapse-whitespace 16990 jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " ); 16991 } 16992 }, 16993 select: { 16994 get: function( elem ) { 16995 var value, option, 16996 options = elem.options, 16997 index = elem.selectedIndex, 16998 one = elem.type === "select-one" || index < 0, 16999 values = one ? null : [], 17000 max = one ? index + 1 : options.length, 17001 i = index < 0 ? 17002 max : 17003 one ? index : 0; 17004 17005 // Loop through all the selected options 17006 for ( ; i < max; i++ ) { 17007 option = options[ i ]; 17008 17009 // IE8-9 doesn't update selected after form reset (#2551) 17010 if ( ( option.selected || i === index ) && 17011 17012 // Don't return options that are disabled or in a disabled optgroup 17013 ( support.optDisabled ? 17014 !option.disabled : option.getAttribute( "disabled" ) === null ) && 17015 ( !option.parentNode.disabled || 17016 !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { 17017 17018 // Get the specific value for the option 17019 value = jQuery( option ).val(); 17020 17021 // We don't need an array for one selects 17022 if ( one ) { 17023 return value; 17024 } 17025 17026 // Multi-Selects return an array 17027 values.push( value ); 17028 } 17029 } 17030 17031 return values; 17032 }, 17033 17034 set: function( elem, value ) { 17035 var optionSet, option, 17036 options = elem.options, 17037 values = jQuery.makeArray( value ), 17038 i = options.length; 17039 17040 while ( i-- ) { 17041 option = options[ i ]; 17042 if ( option.selected = 17043 jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 17044 ) { 17045 optionSet = true; 17046 } 17047 } 17048 17049 // Force browsers to behave consistently when non-matching value is set 17050 if ( !optionSet ) { 17051 elem.selectedIndex = -1; 17052 } 17053 return values; 17054 } 17055 } 17056 } 17057} ); 17058 17059// Radios and checkboxes getter/setter 17060jQuery.each( [ "radio", "checkbox" ], function() { 17061 jQuery.valHooks[ this ] = { 17062 set: function( elem, value ) { 17063 if ( jQuery.isArray( value ) ) { 17064 return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); 17065 } 17066 } 17067 }; 17068 if ( !support.checkOn ) { 17069 jQuery.valHooks[ this ].get = function( elem ) { 17070 return elem.getAttribute( "value" ) === null ? "on" : elem.value; 17071 }; 17072 } 17073} ); 17074 17075 17076 17077 17078// Return jQuery for attributes-only inclusion 17079 17080 17081var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; 17082 17083jQuery.extend( jQuery.event, { 17084 17085 trigger: function( event, data, elem, onlyHandlers ) { 17086 17087 var i, cur, tmp, bubbleType, ontype, handle, special, 17088 eventPath = [ elem || document ], 17089 type = hasOwn.call( event, "type" ) ? event.type : event, 17090 namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; 17091 17092 cur = tmp = elem = elem || document; 17093 17094 // Don't do events on text and comment nodes 17095 if ( elem.nodeType === 3 || elem.nodeType === 8 ) { 17096 return; 17097 } 17098 17099 // focus/blur morphs to focusin/out; ensure we're not firing them right now 17100 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { 17101 return; 17102 } 17103 17104 if ( type.indexOf( "." ) > -1 ) { 17105 17106 // Namespaced trigger; create a regexp to match event type in handle() 17107 namespaces = type.split( "." ); 17108 type = namespaces.shift(); 17109 namespaces.sort(); 17110 } 17111 ontype = type.indexOf( ":" ) < 0 && "on" + type; 17112 17113 // Caller can pass in a jQuery.Event object, Object, or just an event type string 17114 event = event[ jQuery.expando ] ? 17115 event : 17116 new jQuery.Event( type, typeof event === "object" && event ); 17117 17118 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 17119 event.isTrigger = onlyHandlers ? 2 : 3; 17120 event.namespace = namespaces.join( "." ); 17121 event.rnamespace = event.namespace ? 17122 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : 17123 null; 17124 17125 // Clean up the event in case it is being reused 17126 event.result = undefined; 17127 if ( !event.target ) { 17128 event.target = elem; 17129 } 17130 17131 // Clone any incoming data and prepend the event, creating the handler arg list 17132 data = data == null ? 17133 [ event ] : 17134 jQuery.makeArray( data, [ event ] ); 17135 17136 // Allow special events to draw outside the lines 17137 special = jQuery.event.special[ type ] || {}; 17138 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { 17139 return; 17140 } 17141 17142 // Determine event propagation path in advance, per W3C events spec (#9951) 17143 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 17144 if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { 17145 17146 bubbleType = special.delegateType || type; 17147 if ( !rfocusMorph.test( bubbleType + type ) ) { 17148 cur = cur.parentNode; 17149 } 17150 for ( ; cur; cur = cur.parentNode ) { 17151 eventPath.push( cur ); 17152 tmp = cur; 17153 } 17154 17155 // Only add window if we got to document (e.g., not plain obj or detached DOM) 17156 if ( tmp === ( elem.ownerDocument || document ) ) { 17157 eventPath.push( tmp.defaultView || tmp.parentWindow || window ); 17158 } 17159 } 17160 17161 // Fire handlers on the event path 17162 i = 0; 17163 while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { 17164 17165 event.type = i > 1 ? 17166 bubbleType : 17167 special.bindType || type; 17168 17169 // jQuery handler 17170 handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && 17171 dataPriv.get( cur, "handle" ); 17172 if ( handle ) { 17173 handle.apply( cur, data ); 17174 } 17175 17176 // Native handler 17177 handle = ontype && cur[ ontype ]; 17178 if ( handle && handle.apply && acceptData( cur ) ) { 17179 event.result = handle.apply( cur, data ); 17180 if ( event.result === false ) { 17181 event.preventDefault(); 17182 } 17183 } 17184 } 17185 event.type = type; 17186 17187 // If nobody prevented the default action, do it now 17188 if ( !onlyHandlers && !event.isDefaultPrevented() ) { 17189 17190 if ( ( !special._default || 17191 special._default.apply( eventPath.pop(), data ) === false ) && 17192 acceptData( elem ) ) { 17193 17194 // Call a native DOM method on the target with the same name name as the event. 17195 // Don't do default actions on window, that's where global variables be (#6170) 17196 if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { 17197 17198 // Don't re-trigger an onFOO event when we call its FOO() method 17199 tmp = elem[ ontype ]; 17200 17201 if ( tmp ) { 17202 elem[ ontype ] = null; 17203 } 17204 17205 // Prevent re-triggering of the same event, since we already bubbled it above 17206 jQuery.event.triggered = type; 17207 elem[ type ](); 17208 jQuery.event.triggered = undefined; 17209 17210 if ( tmp ) { 17211 elem[ ontype ] = tmp; 17212 } 17213 } 17214 } 17215 } 17216 17217 return event.result; 17218 }, 17219 17220 // Piggyback on a donor event to simulate a different one 17221 // Used only for `focus(in | out)` events 17222 simulate: function( type, elem, event ) { 17223 var e = jQuery.extend( 17224 new jQuery.Event(), 17225 event, 17226 { 17227 type: type, 17228 isSimulated: true 17229 } 17230 ); 17231 17232 jQuery.event.trigger( e, null, elem ); 17233 } 17234 17235} ); 17236 17237jQuery.fn.extend( { 17238 17239 trigger: function( type, data ) { 17240 return this.each( function() { 17241 jQuery.event.trigger( type, data, this ); 17242 } ); 17243 }, 17244 triggerHandler: function( type, data ) { 17245 var elem = this[ 0 ]; 17246 if ( elem ) { 17247 return jQuery.event.trigger( type, data, elem, true ); 17248 } 17249 } 17250} ); 17251 17252 17253jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " + 17254 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 17255 "change select submit keydown keypress keyup error contextmenu" ).split( " " ), 17256 function( i, name ) { 17257 17258 // Handle event binding 17259 jQuery.fn[ name ] = function( data, fn ) { 17260 return arguments.length > 0 ? 17261 this.on( name, null, data, fn ) : 17262 this.trigger( name ); 17263 }; 17264} ); 17265 17266jQuery.fn.extend( { 17267 hover: function( fnOver, fnOut ) { 17268 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 17269 } 17270} ); 17271 17272 17273 17274 17275support.focusin = "onfocusin" in window; 17276 17277 17278// Support: Firefox 17279// Firefox doesn't have focus(in | out) events
17280// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 17281// 17282// Support: Chrome, Safari 17283// focus(in | out) events fire after focus & blur events, 17284// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order 17285// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857 17286if ( !support.focusin ) { 17287 jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { 17288 17289 // Attach a single capturing handler on the document while someone wants focusin/focusout 17290 var handler = function( event ) { 17291 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); 17292 }; 17293 17294 jQuery.event.special[ fix ] = { 17295 setup: function() { 17296 var doc = this.ownerDocument || this, 17297 attaches = dataPriv.access( doc, fix ); 17298 17299 if ( !attaches ) { 17300 doc.addEventListener( orig, handler, true ); 17301 } 17302 dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); 17303 }, 17304 teardown: function() { 17305 var doc = this.ownerDocument || this, 17306 attaches = dataPriv.access( doc, fix ) - 1; 17307 17308 if ( !attaches ) { 17309 doc.removeEventListener( orig, handler, true ); 17310 dataPriv.remove( doc, fix ); 17311 17312 } else { 17313 dataPriv.access( doc, fix, attaches ); 17314 } 17315 } 17316 }; 17317 } ); 17318} 17319var location = window.location; 17320 17321var nonce = jQuery.now(); 17322 17323var rquery = ( /\?/ ); 17324 17325 17326 17327// Support: Android 2.3 17328// Workaround failure to string-cast null input 17329jQuery.parseJSON = function( data ) { 17330 return JSON.parse( data + "" ); 17331}; 17332 17333 17334// Cross-browser xml parsing 17335jQuery.parseXML = function( data ) { 17336 var xml; 17337 if ( !data || typeof data !== "string" ) { 17338 return null; 17339 } 17340 17341 // Support: IE9 17342 try { 17343 xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 17344 } catch ( e ) { 17345 xml = undefined; 17346 } 17347 17348 if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 17349 jQuery.error( "Invalid XML: " + data ); 17350 } 17351 return xml; 17352}; 17353 17354 17355var 17356 rhash = /#.*$/, 17357 rts = /([?&])_=[^&]*/, 17358 rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, 17359 17360 // #7653, #8125, #8152: local protocol detection 17361 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 17362 rnoContent = /^(?:GET|HEAD)$/, 17363 rprotocol = /^\/\//, 17364 17365 /* Prefilters 17366 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 17367 * 2) These are called: 17368 * - BEFORE asking for a transport 17369 * - AFTER param serialization (s.data is a string if s.processData is true) 17370 * 3) key is the dataType 17371 * 4) the catchall symbol "*" can be used 17372 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 17373 */ 17374 prefilters = {}, 17375 17376 /* Transports bindings 17377 * 1) key is the dataType 17378 * 2) the catchall symbol "*" can be used 17379 * 3) selection will start with transport dataType and THEN go to "*" if needed 17380 */ 17381 transports = {}, 17382 17383 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 17384 allTypes = "*/".concat( "*" ), 17385 17386 // Anchor tag for parsing the document origin 17387 originAnchor = document.createElement( "a" ); 17388 originAnchor.href = location.href; 17389 17390// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 17391function addToPrefiltersOrTransports( structure ) { 17392 17393 // dataTypeExpression is optional and defaults to "*" 17394 return function( dataTypeExpression, func ) { 17395 17396 if ( typeof dataTypeExpression !== "string" ) { 17397 func = dataTypeExpression; 17398 dataTypeExpression = "*"; 17399 } 17400 17401 var dataType, 17402 i = 0, 17403 dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; 17404 17405 if ( jQuery.isFunction( func ) ) { 17406 17407 // For each dataType in the dataTypeExpression 17408 while ( ( dataType = dataTypes[ i++ ] ) ) { 17409 17410 // Prepend if requested 17411 if ( dataType[ 0 ] === "+" ) { 17412 dataType = dataType.slice( 1 ) || "*"; 17413 ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); 17414 17415 // Otherwise append 17416 } else { 17417 ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); 17418 } 17419 } 17420 } 17421 }; 17422} 17423 17424// Base inspection function for prefilters and transports 17425function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { 17426 17427 var inspected = {}, 17428 seekingTransport = ( structure === transports ); 17429 17430 function inspect( dataType ) { 17431 var selected; 17432 inspected[ dataType ] = true; 17433 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { 17434 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); 17435 if ( typeof dataTypeOrTransport === "string" && 17436 !seekingTransport && !inspected[ dataTypeOrTransport ] ) { 17437 17438 options.dataTypes.unshift( dataTypeOrTransport ); 17439 inspect( dataTypeOrTransport ); 17440 return false;
vendor: 5,117 bytes, lines 17441-17651
17441 } else if ( seekingTransport ) { 17442 return !( selected = dataTypeOrTransport ); 17443 } 17444 } ); 17445 return selected; 17446 } 17447 17448 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); 17449} 17450 17451// A special extend for ajax options 17452// that takes "flat" options (not to be deep extended) 17453// Fixes #9887 17454function ajaxExtend( target, src ) { 17455 var key, deep, 17456 flatOptions = jQuery.ajaxSettings.flatOptions || {}; 17457 17458 for ( key in src ) { 17459 if ( src[ key ] !== undefined ) { 17460 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; 17461 } 17462 } 17463 if ( deep ) { 17464 jQuery.extend( true, target, deep ); 17465 } 17466 17467 return target; 17468} 17469 17470/* Handles responses to an ajax request: 17471 * - finds the right dataType (mediates between content-type and expected dataType) 17472 * - returns the corresponding response 17473 */ 17474function ajaxHandleResponses( s, jqXHR, responses ) { 17475 17476 var ct, type, finalDataType, firstDataType, 17477 contents = s.contents, 17478 dataTypes = s.dataTypes; 17479 17480 // Remove auto dataType and get content-type in the process 17481 while ( dataTypes[ 0 ] === "*" ) { 17482 dataTypes.shift(); 17483 if ( ct === undefined ) { 17484 ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); 17485 } 17486 } 17487 17488 // Check if we're dealing with a known content-type 17489 if ( ct ) { 17490 for ( type in contents ) { 17491 if ( contents[ type ] && contents[ type ].test( ct ) ) { 17492 dataTypes.unshift( type ); 17493 break; 17494 } 17495 } 17496 } 17497 17498 // Check to see if we have a response for the expected dataType 17499 if ( dataTypes[ 0 ] in responses ) { 17500 finalDataType = dataTypes[ 0 ]; 17501 } else { 17502 17503 // Try convertible dataTypes 17504 for ( type in responses ) { 17505 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { 17506 finalDataType = type; 17507 break; 17508 } 17509 if ( !firstDataType ) { 17510 firstDataType = type; 17511 } 17512 } 17513 17514 // Or just use first one 17515 finalDataType = finalDataType || firstDataType; 17516 } 17517 17518 // If we found a dataType 17519 // We add the dataType to the list if needed 17520 // and return the corresponding response 17521 if ( finalDataType ) { 17522 if ( finalDataType !== dataTypes[ 0 ] ) { 17523 dataTypes.unshift( finalDataType ); 17524 } 17525 return responses[ finalDataType ]; 17526 } 17527} 17528 17529/* Chain conversions given the request and the original response 17530 * Also sets the responseXXX fields on the jqXHR instance 17531 */ 17532function ajaxConvert( s, response, jqXHR, isSuccess ) { 17533 var conv2, current, conv, tmp, prev, 17534 converters = {}, 17535 17536 // Work with a copy of dataTypes in case we need to modify it for conversion 17537 dataTypes = s.dataTypes.slice(); 17538 17539 // Create converters map with lowercased keys 17540 if ( dataTypes[ 1 ] ) { 17541 for ( conv in s.converters ) { 17542 converters[ conv.toLowerCase() ] = s.converters[ conv ]; 17543 } 17544 } 17545 17546 current = dataTypes.shift(); 17547 17548 // Convert to each sequential dataType 17549 while ( current ) { 17550 17551 if ( s.responseFields[ current ] ) { 17552 jqXHR[ s.responseFields[ current ] ] = response; 17553 } 17554 17555 // Apply the dataFilter if provided 17556 if ( !prev && isSuccess && s.dataFilter ) { 17557 response = s.dataFilter( response, s.dataType ); 17558 } 17559 17560 prev = current; 17561 current = dataTypes.shift(); 17562 17563 if ( current ) { 17564 17565 // There's only work to do if current dataType is non-auto 17566 if ( current === "*" ) { 17567 17568 current = prev; 17569 17570 // Convert response if prev dataType is non-auto and differs from current 17571 } else if ( prev !== "*" && prev !== current ) { 17572 17573 // Seek a direct converter 17574 conv = converters[ prev + " " + current ] || converters[ "* " + current ]; 17575 17576 // If none found, seek a pair 17577 if ( !conv ) { 17578 for ( conv2 in converters ) { 17579 17580 // If conv2 outputs current 17581 tmp = conv2.split( " " ); 17582 if ( tmp[ 1 ] === current ) { 17583 17584 // If prev can be converted to accepted input 17585 conv = converters[ prev + " " + tmp[ 0 ] ] || 17586 converters[ "* " + tmp[ 0 ] ]; 17587 if ( conv ) { 17588 17589 // Condense equivalence converters 17590 if ( conv === true ) { 17591 conv = converters[ conv2 ]; 17592 17593 // Otherwise, insert the intermediate dataType 17594 } else if ( converters[ conv2 ] !== true ) { 17595 current = tmp[ 0 ]; 17596 dataTypes.unshift( tmp[ 1 ] ); 17597 } 17598 break; 17599 } 17600 } 17601 } 17602 } 17603 17604 // Apply converter (if not an equivalence) 17605 if ( conv !== true ) { 17606 17607 // Unless errors are allowed to bubble, catch and return them 17608 if ( conv && s.throws ) { 17609 response = conv( response ); 17610 } else { 17611 try { 17612 response = conv( response ); 17613 } catch ( e ) { 17614 return { 17615 state: "parsererror", 17616 error: conv ? e : "No conversion from " + prev + " to " + current 17617 }; 17618 } 17619 } 17620 } 17621 } 17622 } 17623 } 17624 17625 return { state: "success", data: response }; 17626} 17627 17628jQuery.extend( { 17629 17630 // Counter for holding the number of active queries 17631 active: 0, 17632 17633 // Last-Modified header cache for next request 17634 lastModified: {}, 17635 etag: {}, 17636 17637 ajaxSettings: { 17638 url: location.href, 17639 type: "GET", 17640 isLocal: rlocalProtocol.test( location.protocol ), 17641 global: true, 17642 processData: true, 17643 async: true, 17644 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 17645 /* 17646 timeout: 0, 17647 data: null, 17648 dataType: null, 17649 username: null, 17650 password: null, 17651 cache: null,
17652 throws: false, 17653 traditional: false, 17654 headers: {}, 17655 */ 17656 17657 accepts: { 17658 "*": allTypes, 17659 text: "text/plain", 17660 html: "text/html", 17661 xml: "application/xml, text/xml", 17662 json: "application/json, text/javascript" 17663 }, 17664 17665 contents: { 17666 xml: /\bxml\b/, 17667 html: /\bhtml/, 17668 json: /\bjson\b/ 17669 }, 17670 17671 responseFields: { 17672 xml: "responseXML", 17673 text: "responseText", 17674 json: "responseJSON" 17675 }, 17676 17677 // Data converters 17678 // Keys separate source (or catchall "*") and destination types with a single space 17679 converters: { 17680 17681 // Convert anything to text 17682 "* text": String, 17683 17684 // Text to html (true = no transformation) 17685 "text html": true, 17686 17687 // Evaluate text as a json expression 17688 "text json": jQuery.parseJSON, 17689 17690 // Parse text as xml 17691 "text xml": jQuery.parseXML 17692 }, 17693 17694 // For options that shouldn't be deep extended: 17695 // you can add your own custom options here if 17696 // and when you create one that shouldn't be 17697 // deep extended (see ajaxExtend) 17698 flatOptions: { 17699 url: true, 17700 context: true 17701 } 17702 }, 17703 17704 // Creates a full fledged settings object into target 17705 // with both ajaxSettings and settings fields. 17706 // If target is omitted, writes into ajaxSettings. 17707 ajaxSetup: function( target, settings ) { 17708 return settings ? 17709 17710 // Building a settings object 17711 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : 17712 17713 // Extending ajaxSettings 17714 ajaxExtend( jQuery.ajaxSettings, target ); 17715 }, 17716 17717 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), 17718 ajaxTransport: addToPrefiltersOrTransports( transports ), 17719 17720 // Main method 17721 ajax: function( url, options ) { 17722 17723 // If url is an object, simulate pre-1.5 signature 17724 if ( typeof url === "object" ) { 17725 options = url; 17726 url = undefined; 17727 } 17728 17729 // Force options to be an object 17730 options = options || {}; 17731 17732 var transport, 17733 17734 // URL without anti-cache param 17735 cacheURL, 17736 17737 // Response headers 17738 responseHeadersString, 17739 responseHeaders, 17740 17741 // timeout handle 17742 timeoutTimer, 17743 17744 // Url cleanup var 17745 urlAnchor, 17746 17747 // To know if global events are to be dispatched 17748 fireGlobals, 17749 17750 // Loop variable 17751 i, 17752 17753 // Create the final options object 17754 s = jQuery.ajaxSetup( {}, options ), 17755 17756 // Callbacks context 17757 callbackContext = s.context || s, 17758 17759 // Context for global events is callbackContext if it is a DOM node or jQuery collection 17760 globalEventContext = s.context && 17761 ( callbackContext.nodeType || callbackContext.jquery ) ? 17762 jQuery( callbackContext ) : 17763 jQuery.event, 17764 17765 // Deferreds 17766 deferred = jQuery.Deferred(), 17767 completeDeferred = jQuery.Callbacks( "once memory" ), 17768 17769 // Status-dependent callbacks 17770 statusCode = s.statusCode || {}, 17771 17772 // Headers (they are sent all at once) 17773 requestHeaders = {}, 17774 requestHeadersNames = {}, 17775 17776 // The jqXHR state 17777 state = 0, 17778 17779 // Default abort message 17780 strAbort = "canceled", 17781 17782 // Fake xhr 17783 jqXHR = { 17784 readyState: 0, 17785 17786 // Builds headers hashtable if needed 17787 getResponseHeader: function( key ) { 17788 var match; 17789 if ( state === 2 ) { 17790 if ( !responseHeaders ) { 17791 responseHeaders = {}; 17792 while ( ( match = rheaders.exec( responseHeadersString ) ) ) { 17793 responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; 17794 } 17795 } 17796 match = responseHeaders[ key.toLowerCase() ]; 17797 } 17798 return match == null ? null : match; 17799 }, 17800 17801 // Raw string 17802 getAllResponseHeaders: function() { 17803 return state === 2 ? responseHeadersString : null; 17804 }, 17805 17806 // Caches the header 17807 setRequestHeader: function( name, value ) { 17808 var lname = name.toLowerCase(); 17809 if ( !state ) { 17810 name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; 17811 requestHeaders[ name ] = value; 17812 } 17813 return this; 17814 }, 17815 17816 // Overrides response content-type header 17817 overrideMimeType: function( type ) { 17818 if ( !state ) { 17819 s.mimeType = type; 17820 } 17821 return this; 17822 }, 17823 17824 // Status-dependent callbacks 17825 statusCode: function( map ) { 17826 var code; 17827 if ( map ) { 17828 if ( state < 2 ) { 17829 for ( code in map ) { 17830 17831 // Lazy-add the new callback in a way that preserves old ones 17832 statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; 17833 } 17834 } else { 17835 17836 // Execute the appropriate callbacks 17837 jqXHR.always( map[ jqXHR.status ] ); 17838 } 17839 } 17840 return this; 17841 }, 17842 17843 // Cancel the request 17844 abort: function( statusText ) { 17845 var finalText = statusText || strAbort; 17846 if ( transport ) { 17847 transport.abort( finalText ); 17848 } 17849 done( 0, finalText ); 17850 return this; 17851 } 17852 }; 17853 17854 // Attach deferreds 17855 deferred.promise( jqXHR ).complete = completeDeferred.add; 17856 jqXHR.success = jqXHR.done; 17857 jqXHR.error = jqXHR.fail; 17858 17859 // Remove hash character (#7531: and string promotion) 17860 // Add protocol if not provided (prefilters might expect it) 17861 // Handle falsy url in the settings object (#10093: consistency with old signature) 17862 // We also use the url parameter if available 17863 s.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" ) 17864 .replace( rprotocol, location.protocol + "//" ); 17865 17866 // Alias method option to type as per ticket #12004 17867 s.type = options.method || options.type || s.method || s.type; 17868 17869 // Extract dataTypes list 17870 s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ]; 17871 17872 // A cross-domain request is in order when the origin doesn't match the current origin. 17873 if ( s.crossDomain == null ) { 17874 urlAnchor = document.createElement( "a" ); 17875
17876 // Support: IE8-11+ 17877 // IE throws exception if url is malformed, e.g. http://example.com:80x/ 17878 try { 17879 urlAnchor.href = s.url; 17880 17881 // Support: IE8-11+ 17882 // Anchor's host property isn't correctly set when s.url is relative 17883 urlAnchor.href = urlAnchor.href; 17884 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== 17885 urlAnchor.protocol + "//" + urlAnchor.host; 17886 } catch ( e ) { 17887 17888 // If there is an error parsing the URL, assume it is crossDomain, 17889 // it can be rejected by the transport if it is invalid 17890 s.crossDomain = true; 17891 } 17892 } 17893 17894 // Convert data if not already a string 17895 if ( s.data && s.processData && typeof s.data !== "string" ) { 17896 s.data = jQuery.param( s.data, s.traditional ); 17897 } 17898 17899 // Apply prefilters 17900 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); 17901 17902 // If request was aborted inside a prefilter, stop there 17903 if ( state === 2 ) { 17904 return jqXHR; 17905 } 17906 17907 // We can fire global events as of now if asked to 17908 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) 17909 fireGlobals = jQuery.event && s.global; 17910 17911 // Watch for a new set of requests 17912 if ( fireGlobals && jQuery.active++ === 0 ) { 17913 jQuery.event.trigger( "ajaxStart" ); 17914 } 17915 17916 // Uppercase the type 17917 s.type = s.type.toUpperCase(); 17918 17919 // Determine if request has content 17920 s.hasContent = !rnoContent.test( s.type ); 17921 17922 // Save the URL in case we're toying with the If-Modified-Since 17923 // and/or If-None-Match header later on 17924 cacheURL = s.url; 17925 17926 // More options handling for requests with no content 17927 if ( !s.hasContent ) { 17928 17929 // If data is available, append data to url 17930 if ( s.data ) { 17931 cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); 17932 17933 // #9682: remove data so that it's not used in an eventual retry 17934 delete s.data; 17935 } 17936 17937 // Add anti-cache in url if needed 17938 if ( s.cache === false ) { 17939 s.url = rts.test( cacheURL ) ? 17940 17941 // If there is already a '_' parameter, set its value 17942 cacheURL.replace( rts, "$1_=" + nonce++ ) : 17943 17944 // Otherwise add one to the end 17945 cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++; 17946 } 17947 } 17948 17949 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 17950 if ( s.ifModified ) { 17951 if ( jQuery.lastModified[ cacheURL ] ) { 17952 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); 17953 } 17954 if ( jQuery.etag[ cacheURL ] ) { 17955 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); 17956 } 17957 } 17958 17959 // Set the correct header, if data is being sent 17960 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { 17961 jqXHR.setRequestHeader( "Content-Type", s.contentType ); 17962 } 17963 17964 // Set the Accepts header for the server, depending on the dataType 17965 jqXHR.setRequestHeader( 17966 "Accept", 17967 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? 17968 s.accepts[ s.dataTypes[ 0 ] ] + 17969 ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : 17970 s.accepts[ "*" ] 17971 ); 17972 17973 // Check for headers option 17974 for ( i in s.headers ) { 17975 jqXHR.setRequestHeader( i, s.headers[ i ] ); 17976 } 17977 17978 // Allow custom headers/mimetypes and early abort 17979 if ( s.beforeSend && 17980 ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { 17981 17982 // Abort if not done already and return 17983 return jqXHR.abort(); 17984 } 17985 17986 // Aborting is no longer a cancellation 17987 strAbort = "abort"; 17988 17989 // Install callbacks on deferreds 17990 for ( i in { success: 1, error: 1, complete: 1 } ) { 17991 jqXHR[ i ]( s[ i ] ); 17992 } 17993 17994 // Get transport 17995 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); 17996 17997 // If no transport, we auto-abort 17998 if ( !transport ) { 17999 done( -1, "No Transport" ); 18000 } else { 18001 jqXHR.readyState = 1; 18002 18003 // Send global event 18004 if ( fireGlobals ) { 18005 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); 18006 } 18007 18008 // If request was aborted inside ajaxSend, stop there 18009 if ( state === 2 ) { 18010 return jqXHR; 18011 } 18012 18013 // Timeout 18014 if ( s.async && s.timeout > 0 ) { 18015 timeoutTimer = window.setTimeout( function() { 18016 jqXHR.abort( "timeout" ); 18017 }, s.timeout ); 18018 } 18019 18020 try { 18021 state = 1; 18022 transport.send( requestHeaders, done ); 18023 } catch ( e ) { 18024 18025 // Propagate exception as error if not done 18026 if ( state < 2 ) { 18027 done( -1, e ); 18028 18029 // Simply rethrow otherwise 18030 } else { 18031 throw e; 18032 } 18033 } 18034 } 18035 18036 // Callback for when everything is done 18037 function done( status, nativeStatusText, responses, headers ) { 18038 var isSuccess, success, error, response, modified, 18039 statusText = nativeStatusText; 18040 18041 // Called once 18042 if ( state === 2 ) { 18043 return; 18044 } 18045 18046 // State is "done" now 18047 state = 2; 18048 18049 // Clear timeout if it exists 18050 if ( timeoutTimer ) { 18051 window.clearTimeout( timeoutTimer ); 18052 } 18053 18054 // Dereference transport for early garbage collection 18055 // (no matter how long the jqXHR object will be used) 18056 transport = undefined; 18057 18058 // Cache response headers 18059 responseHeadersString = headers || ""; 18060 18061 // Set readyState 18062 jqXHR.readyState = status > 0 ? 4 : 0; 18063 18064 // Determine if successful 18065 isSuccess = status >= 200 && status < 300 || status === 304; 18066 18067 // Get response data 18068 if ( responses ) { 18069 response = ajaxHandleResponses( s, jqXHR, responses ); 18070 } 18071 18072 // Convert no matter what (that way responseXXX fields are always set) 18073 response = ajaxConvert( s, response, jqXHR, isSuccess ); 18074 18075 // If successful, handle type chaining 18076 if ( isSuccess ) { 18077 18078 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 18079 if ( s.ifModified ) { 18080 modified = jqXHR.getResponseHeader( "Last-Modified" ); 18081 if ( modified ) { 18082 jQuery.lastModified[ cacheURL ] = modified; 18083 } 18084 modified = jqXHR.getResponseHeader( "etag" ); 18085 if ( modified ) { 18086 jQuery.etag[ cacheURL ] = modified; 18087 } 18088 } 18089 18090 // if no content 18091 if ( status === 204 || s.type === "HEAD" ) { 18092 statusText = "nocontent"; 18093 18094 // if not modified 18095 } else if ( status === 304 ) { 18096 statusText = "notmodified"; 18097 18098 // If we have data, let's convert it 18099 } else { 18100 statusText = response.state; 18101 success = response.data; 18102 error = response.error; 18103 isSuccess = !error; 18104 } 18105 } else { 18106 18107 // Extract error from statusText and normalize for non-aborts 18108 error = statusText; 18109 if ( status || !statusText ) { 18110 statusText = "error"; 18111 if ( status < 0 ) { 18112 status = 0; 18113 } 18114 } 18115 } 18116 18117 // Set data for the fake xhr object 18118 jqXHR.status = status; 18119 jqXHR.statusText = ( nativeStatusText || statusText ) + ""; 18120 18121 // Success/Error 18122 if ( isSuccess ) { 18123 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); 18124 } else { 18125 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); 18126 } 18127 18128 // Status-dependent callbacks 18129 jqXHR.statusCode( statusCode ); 18130 statusCode = undefined; 18131 18132 if ( fireGlobals ) { 18133 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", 18134 [ jqXHR, s, isSuccess ? success : error ] ); 18135 } 18136 18137 // Complete 18138 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); 18139 18140 if ( fireGlobals ) { 18141 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); 18142 18143 // Handle the global AJAX counter 18144 if ( !( --jQuery.active ) ) { 18145 jQuery.event.trigger( "ajaxStop" ); 18146 } 18147 } 18148 } 18149 18150 return jqXHR; 18151 }, 18152 18153 getJSON: function( url, data, callback ) { 18154 return jQuery.get( url, data, callback, "json" ); 18155 }, 18156 18157 getScript: function( url, callback ) { 18158 return jQuery.get( url, undefined, callback, "script" ); 18159 } 18160} ); 18161 18162jQuery.each( [ "get", "post" ], function( i, method ) { 18163 jQuery[ method ] = function( url, data, callback, type ) { 18164 18165 // Shift arguments if data argument was omitted 18166 if ( jQuery.isFunction( data ) ) { 18167 type = type || callback; 18168 callback = data; 18169 data = undefined; 18170 } 18171 18172 // The url can be an options object (which then must have .url) 18173 return jQuery.ajax( jQuery.extend( { 18174 url: url, 18175 type: method, 18176 dataType: type, 18177 data: data, 18178 success: callback 18179 }, jQuery.isPlainObject( url ) && url ) ); 18180 }; 18181} ); 18182 18183 18184jQuery._evalUrl = function( url ) { 18185 return jQuery.ajax( { 18186 url: url, 18187 18188 // Make this explicit, since user can override this through ajaxSetup (#11264) 18189 type: "GET", 18190 dataType: "script", 18191 async: false, 18192 global: false, 18193 "throws": true 18194 } ); 18195}; 18196 18197 18198jQuery.fn.extend( { 18199 wrapAll: function( html ) { 18200 var wrap; 18201 18202 if ( jQuery.isFunction( html ) ) { 18203 return this.each( function( i ) { 18204 jQuery( this ).wrapAll( html.call( this, i ) ); 18205 } ); 18206 } 18207 18208 if ( this[ 0 ] ) { 18209 18210 // The elements to wrap the target around 18211 wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); 18212 18213 if ( this[ 0 ].parentNode ) { 18214 wrap.insertBefore( this[ 0 ] ); 18215 } 18216 18217 wrap.map( function() { 18218 var elem = this; 18219 18220 while ( elem.firstElementChild ) { 18221 elem = elem.firstElementChild; 18222 } 18223 18224 return elem; 18225 } ).append( this ); 18226 } 18227 18228 return this; 18229 }, 18230 18231 wrapInner: function( html ) { 18232 if ( jQuery.isFunction( html ) ) { 18233 return this.each( function( i ) { 18234 jQuery( this ).wrapInner( html.call( this, i ) ); 18235 } ); 18236 } 18237 18238 return this.each( function() { 18239 var self = jQuery( this ), 18240 contents = self.contents(); 18241 18242 if ( contents.length ) { 18243 contents.wrapAll( html ); 18244 18245 } else { 18246 self.append( html ); 18247 } 18248 } ); 18249 }, 18250 18251 wrap: function( html ) { 18252 var isFunction = jQuery.isFunction( html ); 18253 18254 return this.each( function( i ) { 18255 jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); 18256 } ); 18257 }, 18258 18259 unwrap: function() { 18260 return this.parent().each( function() { 18261 if ( !jQuery.nodeName( this, "body" ) ) { 18262 jQuery( this ).replaceWith( this.childNodes ); 18263 } 18264 } ).end(); 18265 } 18266} ); 18267 18268 18269jQuery.expr.filters.hidden = function( elem ) { 18270 return !jQuery.expr.filters.visible( elem ); 18271}; 18272jQuery.expr.filters.visible = function( elem ) { 18273 18274 // Support: Opera <= 12.12 18275 // Opera reports offsetWidths and offsetHeights less than zero on some elements 18276 // Use OR instead of AND as the element is not visible if either is true 18277 // See tickets #10406 and #13132 18278 return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0; 18279}; 18280 18281 18282 18283 18284var r20 = /%20/g, 18285 rbracket = /\[\]$/, 18286 rCRLF = /\r?\n/g, 18287 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 18288 rsubmittable = /^(?:input|select|textarea|keygen)/i; 18289 18290function buildParams( prefix, obj, traditional, add ) { 18291 var name; 18292 18293 if ( jQuery.isArray( obj ) ) { 18294 18295 // Serialize array item. 18296 jQuery.each( obj, function( i, v ) { 18297 if ( traditional || rbracket.test( prefix ) ) { 18298 18299 // Treat each array item as a scalar. 18300 add( prefix, v ); 18301 18302 } else { 18303 18304 // Item is non-scalar (array or object), encode its numeric index. 18305 buildParams( 18306 prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", 18307 v, 18308 traditional, 18309 add 18310 ); 18311 } 18312 } ); 18313 18314 } else if ( !traditional && jQuery.type( obj ) === "object" ) { 18315 18316 // Serialize object item. 18317 for ( name in obj ) { 18318 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); 18319 } 18320 18321 } else { 18322 18323 // Serialize scalar item. 18324 add( prefix, obj ); 18325 } 18326} 18327 18328// Serialize an array of form elements or a set of 18329// key/values into a query string 18330jQuery.param = function( a, traditional ) { 18331 var prefix, 18332 s = [], 18333 add = function( key, value ) { 18334 18335 // If value is a function, invoke it and return its value
18336 value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); 18337 s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); 18338 }; 18339 18340 // Set traditional to true for jQuery <= 1.3.2 behavior. 18341 if ( traditional === undefined ) { 18342 traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; 18343 } 18344 18345 // If an array was passed in, assume that it is an array of form elements. 18346 if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 18347 18348 // Serialize the form elements 18349 jQuery.each( a, function() { 18350 add( this.name, this.value ); 18351 } ); 18352 18353 } else { 18354 18355 // If traditional, encode the "old" way (the way 1.3.2 or older 18356 // did it), otherwise encode params recursively. 18357 for ( prefix in a ) { 18358 buildParams( prefix, a[ prefix ], traditional, add ); 18359 } 18360 } 18361 18362 // Return the resulting serialization 18363 return s.join( "&" ).replace( r20, "+" ); 18364}; 18365 18366jQuery.fn.extend( { 18367 serialize: function() { 18368 return jQuery.param( this.serializeArray() ); 18369 }, 18370 serializeArray: function() { 18371 return this.map( function() { 18372 18373 // Can add propHook for "elements" to filter or add form elements 18374 var elements = jQuery.prop( this, "elements" ); 18375 return elements ? jQuery.makeArray( elements ) : this; 18376 } ) 18377 .filter( function() { 18378 var type = this.type; 18379 18380 // Use .is( ":disabled" ) so that fieldset[disabled] works 18381 return this.name && !jQuery( this ).is( ":disabled" ) && 18382 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && 18383 ( this.checked || !rcheckableType.test( type ) ); 18384 } ) 18385 .map( function( i, elem ) { 18386 var val = jQuery( this ).val(); 18387 18388 return val == null ? 18389 null : 18390 jQuery.isArray( val ) ? 18391 jQuery.map( val, function( val ) { 18392 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 18393 } ) : 18394 { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 18395 } ).get(); 18396 } 18397} ); 18398 18399 18400jQuery.ajaxSettings.xhr = function() { 18401 try { 18402 return new window.XMLHttpRequest(); 18403 } catch ( e ) {} 18404}; 18405 18406var xhrSuccessStatus = { 18407 18408 // File protocol always yields status code 0, assume 200 18409 0: 200, 18410 18411 // Support: IE9 18412 // #1450: sometimes IE returns 1223 when it should be 204 18413 1223: 204 18414 }, 18415 xhrSupported = jQuery.ajaxSettings.xhr(); 18416 18417support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); 18418support.ajax = xhrSupported = !!xhrSupported; 18419 18420jQuery.ajaxTransport( function( options ) { 18421 var callback, errorCallback; 18422 18423 // Cross domain only allowed if supported through XMLHttpRequest 18424 if ( support.cors || xhrSupported && !options.crossDomain ) { 18425 return { 18426 send: function( headers, complete ) { 18427 var i, 18428 xhr = options.xhr(); 18429 18430 xhr.open( 18431 options.type, 18432 options.url, 18433 options.async, 18434 options.username, 18435 options.password 18436 ); 18437 18438 // Apply custom fields if provided 18439 if ( options.xhrFields ) { 18440 for ( i in options.xhrFields ) { 18441 xhr[ i ] = options.xhrFields[ i ]; 18442 } 18443 } 18444 18445 // Override mime type if needed 18446 if ( options.mimeType && xhr.overrideMimeType ) { 18447 xhr.overrideMimeType( options.mimeType ); 18448 } 18449 18450 // X-Requested-With header 18451 // For cross-domain requests, seeing as conditions for a preflight are 18452 // akin to a jigsaw puzzle, we simply never set it to be sure. 18453 // (it can always be set on a per-request basis or even using ajaxSetup)
vendor: 5,386 bytes, lines 18454-18667
18454 // For same-domain requests, won't change header if already provided. 18455 if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { 18456 headers[ "X-Requested-With" ] = "XMLHttpRequest"; 18457 } 18458 18459 // Set headers 18460 for ( i in headers ) { 18461 xhr.setRequestHeader( i, headers[ i ] ); 18462 } 18463 18464 // Callback 18465 callback = function( type ) { 18466 return function() { 18467 if ( callback ) { 18468 callback = errorCallback = xhr.onload = 18469 xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; 18470 18471 if ( type === "abort" ) { 18472 xhr.abort(); 18473 } else if ( type === "error" ) { 18474 18475 // Support: IE9 18476 // On a manual native abort, IE9 throws 18477 // errors on any property access that is not readyState 18478 if ( typeof xhr.status !== "number" ) { 18479 complete( 0, "error" ); 18480 } else { 18481 complete( 18482 18483 // File: protocol always yields status 0; see #8605, #14207 18484 xhr.status, 18485 xhr.statusText 18486 ); 18487 } 18488 } else { 18489 complete( 18490 xhrSuccessStatus[ xhr.status ] || xhr.status, 18491 xhr.statusText, 18492 18493 // Support: IE9 only 18494 // IE9 has no XHR2 but throws on binary (trac-11426) 18495 // For XHR2 non-text, let the caller handle it (gh-2498) 18496 ( xhr.responseType || "text" ) !== "text" || 18497 typeof xhr.responseText !== "string" ? 18498 { binary: xhr.response } : 18499 { text: xhr.responseText }, 18500 xhr.getAllResponseHeaders() 18501 ); 18502 } 18503 } 18504 }; 18505 }; 18506 18507 // Listen to events 18508 xhr.onload = callback(); 18509 errorCallback = xhr.onerror = callback( "error" ); 18510 18511 // Support: IE9 18512 // Use onreadystatechange to replace onabort 18513 // to handle uncaught aborts 18514 if ( xhr.onabort !== undefined ) { 18515 xhr.onabort = errorCallback; 18516 } else { 18517 xhr.onreadystatechange = function() { 18518 18519 // Check readyState before timeout as it changes 18520 if ( xhr.readyState === 4 ) { 18521 18522 // Allow onerror to be called first, 18523 // but that will not handle a native abort 18524 // Also, save errorCallback to a variable 18525 // as xhr.onerror cannot be accessed 18526 window.setTimeout( function() { 18527 if ( callback ) { 18528 errorCallback(); 18529 } 18530 } ); 18531 } 18532 }; 18533 } 18534 18535 // Create the abort callback 18536 callback = callback( "abort" ); 18537 18538 try { 18539 18540 // Do send the request (this may raise an exception) 18541 xhr.send( options.hasContent && options.data || null ); 18542 } catch ( e ) { 18543 18544 // #14683: Only rethrow if this hasn't been notified as an error yet 18545 if ( callback ) { 18546 throw e; 18547 } 18548 } 18549 }, 18550 18551 abort: function() { 18552 if ( callback ) { 18553 callback(); 18554 } 18555 } 18556 }; 18557 } 18558} ); 18559 18560 18561 18562 18563// Install script dataType 18564jQuery.ajaxSetup( { 18565 accepts: { 18566 script: "text/javascript, application/javascript, " + 18567 "application/ecmascript, application/x-ecmascript" 18568 }, 18569 contents: { 18570 script: /\b(?:java|ecma)script\b/ 18571 }, 18572 converters: { 18573 "text script": function( text ) { 18574 jQuery.globalEval( text ); 18575 return text; 18576 } 18577 } 18578} ); 18579 18580// Handle cache's special case and crossDomain 18581jQuery.ajaxPrefilter( "script", function( s ) { 18582 if ( s.cache === undefined ) { 18583 s.cache = false; 18584 } 18585 if ( s.crossDomain ) { 18586 s.type = "GET"; 18587 } 18588} ); 18589 18590// Bind script tag hack transport 18591jQuery.ajaxTransport( "script", function( s ) { 18592 18593 // This transport only deals with cross domain requests 18594 if ( s.crossDomain ) { 18595 var script, callback; 18596 return { 18597 send: function( _, complete ) { 18598 script = jQuery( "<script>" ).prop( { 18599 charset: s.scriptCharset, 18600 src: s.url 18601 } ).on( 18602 "load error", 18603 callback = function( evt ) { 18604 script.remove(); 18605 callback = null; 18606 if ( evt ) { 18607 complete( evt.type === "error" ? 404 : 200, evt.type ); 18608 } 18609 } 18610 ); 18611 18612 // Use native DOM manipulation to avoid our domManip AJAX trickery 18613 document.head.appendChild( script[ 0 ] ); 18614 }, 18615 abort: function() { 18616 if ( callback ) { 18617 callback(); 18618 } 18619 } 18620 }; 18621 } 18622} ); 18623 18624 18625 18626 18627var oldCallbacks = [], 18628 rjsonp = /(=)\?(?=&|$)|\?\?/; 18629 18630// Default jsonp settings 18631jQuery.ajaxSetup( { 18632 jsonp: "callback", 18633 jsonpCallback: function() { 18634 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); 18635 this[ callback ] = true; 18636 return callback; 18637 } 18638} ); 18639 18640// Detect, normalize options and install callbacks for jsonp requests 18641jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 18642 18643 var callbackName, overwritten, responseContainer, 18644 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 18645 "url" : 18646 typeof s.data === "string" && 18647 ( s.contentType || "" ) 18648 .indexOf( "application/x-www-form-urlencoded" ) === 0 && 18649 rjsonp.test( s.data ) && "data" 18650 ); 18651 18652 // Handle iff the expected data type is "jsonp" or we have a parameter to set 18653 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 18654 18655 // Get callback name, remembering preexisting value associated with it 18656 callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? 18657 s.jsonpCallback() : 18658 s.jsonpCallback; 18659 18660 // Insert callback into url or form data 18661 if ( jsonProp ) { 18662 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 18663 } else if ( s.jsonp !== false ) { 18664 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 18665 } 18666 18667 // Use data converter to retrieve json after script execution
18668 s.converters[ "script json" ] = function() { 18669 if ( !responseContainer ) { 18670 jQuery.error( callbackName + " was not called" ); 18671 } 18672 return responseContainer[ 0 ]; 18673 }; 18674 18675 // Force json dataType 18676 s.dataTypes[ 0 ] = "json"; 18677 18678 // Install callback 18679 overwritten = window[ callbackName ]; 18680 window[ callbackName ] = function() { 18681 responseContainer = arguments; 18682 }; 18683 18684 // Clean-up function (fires after converters) 18685 jqXHR.always( function() { 18686 18687 // If previous value didn't exist - remove it 18688 if ( overwritten === undefined ) { 18689 jQuery( window ).removeProp( callbackName ); 18690 18691 // Otherwise restore preexisting value 18692 } else { 18693 window[ callbackName ] = overwritten; 18694 } 18695 18696 // Save back as free 18697 if ( s[ callbackName ] ) { 18698 18699 // Make sure that re-using the options doesn't screw things around 18700 s.jsonpCallback = originalSettings.jsonpCallback; 18701 18702 // Save the callback name for future use 18703 oldCallbacks.push( callbackName ); 18704 } 18705 18706 // Call if it was a function and we have a response 18707 if ( responseContainer && jQuery.isFunction( overwritten ) ) { 18708 overwritten( responseContainer[ 0 ] ); 18709 } 18710 18711 responseContainer = overwritten = undefined; 18712 } ); 18713 18714 // Delegate to script 18715 return "script"; 18716 } 18717} ); 18718 18719 18720 18721 18722// Argument "data" should be string of html 18723// context (optional): If specified, the fragment will be created in this context, 18724// defaults to document 18725// keepScripts (optional): If true, will include scripts passed in the html string 18726jQuery.parseHTML = function( data, context, keepScripts ) { 18727 if ( !data || typeof data !== "string" ) { 18728 return null; 18729 } 18730 if ( typeof context === "boolean" ) { 18731 keepScripts = context; 18732 context = false; 18733 } 18734 context = context || document; 18735 18736 var parsed = rsingleTag.exec( data ), 18737 scripts = !keepScripts && []; 18738 18739 // Single tag 18740 if ( parsed ) { 18741 return [ context.createElement( parsed[ 1 ] ) ]; 18742 } 18743 18744 parsed = buildFragment( [ data ], context, scripts ); 18745 18746 if ( scripts && scripts.length ) {
18747 jQuery( scripts ).remove(); 18748 } 18749 18750 return jQuery.merge( [], parsed.childNodes ); 18751}; 18752 18753 18754// Keep a copy of the old load method 18755var _load = jQuery.fn.load; 18756 18757/** 18758 * Load a url into a page 18759 */ 18760jQuery.fn.load = function( url, params, callback ) { 18761 if ( typeof url !== "string" && _load ) { 18762 return _load.apply( this, arguments ); 18763 } 18764 18765 var selector, type, response, 18766 self = this, 18767 off = url.indexOf( " " ); 18768 18769 if ( off > -1 ) { 18770 selector = jQuery.trim( url.slice( off ) ); 18771 url = url.slice( 0, off ); 18772 } 18773 18774 // If it's a function 18775 if ( jQuery.isFunction( params ) ) { 18776 18777 // We assume that it's the callback 18778 callback = params; 18779 params = undefined; 18780 18781 // Otherwise, build a param string 18782 } else if ( params && typeof params === "object" ) { 18783 type = "POST"; 18784 } 18785 18786 // If we have elements to modify, make the request 18787 if ( self.length > 0 ) { 18788 jQuery.ajax( { 18789 url: url, 18790 18791 // If "type" variable is undefined, then "GET" method will be used. 18792 // Make value of this field explicit since 18793 // user can override it through ajaxSetup method 18794 type: type || "GET", 18795 dataType: "html", 18796 data: params 18797 } ).done( function( responseText ) { 18798 18799 // Save response for use in complete callback 18800 response = arguments; 18801 18802 self.html( selector ? 18803 18804 // If a selector was specified, locate the right elements in a dummy div 18805 // Exclude scripts to avoid IE 'Permission Denied' errors 18806 jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 18807 18808 // Otherwise use the full result 18809 responseText ); 18810 18811 // If the request succeeds, this function gets "data", "status", "jqXHR" 18812 // but they are ignored because response was set above. 18813 // If it fails, this function gets "jqXHR", "status", "error" 18814 } ).always( callback && function( jqXHR, status ) { 18815 self.each( function() { 18816 callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 18817 } ); 18818 } ); 18819 } 18820 18821 return this; 18822}; 18823 18824 18825 18826 18827// Attach a bunch of functions for handling common AJAX events 18828jQuery.each( [ 18829 "ajaxStart", 18830 "ajaxStop", 18831 "ajaxComplete", 18832 "ajaxError", 18833 "ajaxSuccess", 18834 "ajaxSend" 18835], function( i, type ) { 18836 jQuery.fn[ type ] = function( fn ) { 18837 return this.on( type, fn ); 18838 }; 18839} ); 18840 18841 18842 18843 18844jQuery.expr.filters.animated = function( elem ) { 18845 return jQuery.grep( jQuery.timers, function( fn ) { 18846 return elem === fn.elem; 18847 } ).length; 18848}; 18849 18850 18851 18852 18853/** 18854 * Gets a window from an element 18855 */ 18856function getWindow( elem ) { 18857 return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView; 18858} 18859 18860jQuery.offset = { 18861 setOffset: function( elem, options, i ) { 18862 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, 18863 position = jQuery.css( elem, "position" ), 18864 curElem = jQuery( elem ), 18865 props = {}; 18866 18867 // Set position first, in-case top/left are set even on static elem 18868 if ( position === "static" ) { 18869 elem.style.position = "relative"; 18870 } 18871 18872 curOffset = curElem.offset(); 18873 curCSSTop = jQuery.css( elem, "top" ); 18874 curCSSLeft = jQuery.css( elem, "left" ); 18875 calculatePosition = ( position === "absolute" || position === "fixed" ) && 18876 ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; 18877 18878 // Need to be able to calculate position if either 18879 // top or left is auto and position is either absolute or fixed 18880 if ( calculatePosition ) { 18881 curPosition = curElem.position(); 18882 curTop = curPosition.top; 18883 curLeft = curPosition.left; 18884 18885 } else { 18886 curTop = parseFloat( curCSSTop ) || 0; 18887 curLeft = parseFloat( curCSSLeft ) || 0; 18888 } 18889 18890 if ( jQuery.isFunction( options ) ) { 18891 18892 // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 18893 options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); 18894 } 18895 18896 if ( options.top != null ) { 18897 props.top = ( options.top - curOffset.top ) + curTop; 18898 } 18899 if ( options.left != null ) { 18900 props.left = ( options.left - curOffset.left ) + curLeft; 18901 } 18902 18903 if ( "using" in options ) { 18904 options.using.call( elem, props ); 18905 18906 } else { 18907 curElem.css( props ); 18908 } 18909 } 18910}; 18911 18912jQuery.fn.extend( { 18913 offset: function( options ) { 18914 if ( arguments.length ) { 18915 return options === undefined ? 18916 this : 18917 this.each( function( i ) { 18918 jQuery.offset.setOffset( this, options, i ); 18919 } ); 18920 } 18921 18922 var docElem, win, 18923 elem = this[ 0 ], 18924 box = { top: 0, left: 0 }, 18925 doc = elem && elem.ownerDocument; 18926 18927 if ( !doc ) { 18928 return; 18929 } 18930 18931 docElem = doc.documentElement; 18932 18933 // Make sure it's not a disconnected DOM node 18934 if ( !jQuery.contains( docElem, elem ) ) { 18935 return box; 18936 } 18937 18938 box = elem.getBoundingClientRect(); 18939 win = getWindow( doc ); 18940 return { 18941 top: box.top + win.pageYOffset - docElem.clientTop, 18942 left: box.left + win.pageXOffset - docElem.clientLeft 18943 }; 18944 }, 18945 18946 position: function() { 18947 if ( !this[ 0 ] ) { 18948 return; 18949 } 18950 18951 var offsetParent, offset, 18952 elem = this[ 0 ], 18953 parentOffset = { top: 0, left: 0 }; 18954 18955 // Fixed elements are offset from window (parentOffset = {top:0, left
vendor: 6,137 bytes, lines 18955-19141
18955: 0}, 18956 // because it is its only offset parent 18957 if ( jQuery.css( elem, "position" ) === "fixed" ) { 18958 18959 // Assume getBoundingClientRect is there when computed position is fixed 18960 offset = elem.getBoundingClientRect(); 18961 18962 } else { 18963 18964 // Get *real* offsetParent 18965 offsetParent = this.offsetParent(); 18966 18967 // Get correct offsets 18968 offset = this.offset(); 18969 if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { 18970 parentOffset = offsetParent.offset(); 18971 } 18972 18973 // Add offsetParent borders 18974 parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); 18975 parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); 18976 } 18977 18978 // Subtract parent offsets and element margins 18979 return { 18980 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), 18981 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) 18982 }; 18983 }, 18984 18985 // This method will return documentElement in the following cases: 18986 // 1) For the element inside the iframe without offsetParent, this method will return 18987 // documentElement of the parent window 18988 // 2) For the hidden or detached element 18989 // 3) For body or html element, i.e. in case of the html node - it will return itself 18990 // 18991 // but those exceptions were never presented as a real life use-cases 18992 // and might be considered as more preferable results. 18993 // 18994 // This logic, however, is not guaranteed and can change at any point in the future 18995 offsetParent: function() { 18996 return this.map( function() { 18997 var offsetParent = this.offsetParent; 18998 18999 while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { 19000 offsetParent = offsetParent.offsetParent; 19001 } 19002 19003 return offsetParent || documentElement; 19004 } ); 19005 } 19006} ); 19007 19008// Create scrollLeft and scrollTop methods 19009jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { 19010 var top = "pageYOffset" === prop; 19011 19012 jQuery.fn[ method ] = function( val ) { 19013 return access( this, function( elem, method, val ) { 19014 var win = getWindow( elem ); 19015 19016 if ( val === undefined ) { 19017 return win ? win[ prop ] : elem[ method ]; 19018 } 19019 19020 if ( win ) { 19021 win.scrollTo( 19022 !top ? val : win.pageXOffset, 19023 top ? val : win.pageYOffset 19024 ); 19025 19026 } else { 19027 elem[ method ] = val; 19028 } 19029 }, method, val, arguments.length ); 19030 }; 19031} ); 19032 19033// Support: Safari<7-8+, Chrome<37-44+ 19034// Add the top/left cssHooks using jQuery.fn.position 19035// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 19036// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280 19037// getComputedStyle returns percent when specified for top/left/bottom/right; 19038// rather than make the css module depend on the offset module, just check for it here 19039jQuery.each( [ "top", "left" ], function( i, prop ) { 19040 jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, 19041 function( elem, computed ) { 19042 if ( computed ) { 19043 computed = curCSS( elem, prop ); 19044 19045 // If curCSS returns percentage, fallback to offset 19046 return rnumnonpx.test( computed ) ? 19047 jQuery( elem ).position()[ prop ] + "px" : 19048 computed; 19049 } 19050 } 19051 ); 19052} ); 19053 19054 19055// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 19056jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { 19057 jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, 19058 function( defaultExtra, funcName ) { 19059 19060 // Margin is only for outerHeight, outerWidth 19061 jQuery.fn[ funcName ] = function( margin, value ) { 19062 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), 19063 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); 19064 19065 return access( this, function( elem, type, value ) { 19066 var doc; 19067 19068 if ( jQuery.isWindow( elem ) ) { 19069 19070 // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there 19071 // isn't a whole lot we can do. See pull request at this URL for discussion: 19072 // https://github.com/jquery/jquery/pull/764 19073 return elem.document.documentElement[ "client" + name ]; 19074 } 19075 19076 // Get document width or height 19077 if ( elem.nodeType === 9 ) { 19078 doc = elem.documentElement; 19079 19080 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 19081 // whichever is greatest 19082 return Math.max( 19083 elem.body[ "scroll" + name ], doc[ "scroll" + name ], 19084 elem.body[ "offset" + name ], doc[ "offset" + name ], 19085 doc[ "client" + name ] 19086 ); 19087 } 19088 19089 return value === undefined ? 19090 19091 // Get width or height on the element, requesting but not forcing parseFloat 19092 jQuery.css( elem, type, extra ) : 19093 19094 // Set width or height on the element 19095 jQuery.style( elem, type, value, extra ); 19096 }, type, chainable ? margin : undefined, chainable, null ); 19097 }; 19098 } ); 19099} ); 19100 19101 19102jQuery.fn.extend( { 19103 19104 bind: function( types, data, fn ) { 19105 return this.on( types, null, data, fn ); 19106 }, 19107 unbind: function( types, fn ) { 19108 return this.off( types, null, fn ); 19109 }, 19110 19111 delegate: function( selector, types, data, fn ) { 19112 return this.on( types, selector, data, fn ); 19113 }, 19114 undelegate: function( selector, types, fn ) { 19115 19116 // ( namespace ) or ( selector, types [, fn] ) 19117 return arguments.length === 1 ? 19118 this.off( selector, "**" ) : 19119 this.off( types, selector || "**", fn ); 19120 }, 19121 size: function() { 19122 return this.length; 19123 } 19124} ); 19125 19126jQuery.fn.andSelf = jQuery.fn.addBack; 19127 19128 19129 19130 19131// Register as a named AMD module, since jQuery can be concatenated with other 19132// files that may use define, but not via a proper concatenation script that 19133// understands anonymous AMD modules. A named AMD is safest and most robust 19134// way to register. Lowercase jquery is used because AMD module names are 19135// derived from file names, and jQuery is normally delivered in a lowercase 19136// file name. Do this after creating the global so that if an AMD module wants 19137// to call noConflict to hide this version of jQuery, it will work. 19138 19139// Note that for maximum portability, libraries that are not jQuery should 19140// declare themselves as anonymous modules, and avoid setting a global if an 19141// AMD loader is present. jQuery is a special case. For more information, see
19142// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 19143 19144if ( typeof redesign.define === 'function' && redesign.define.amd ) { 19145 redesign.define( "jquery", [], function() { 19146 return jQuery; 19147 } ); 19148} 19149 19150 19151 19152var 19153 19154 // Map over jQuery in case of overwrite 19155 _jQuery = window.jQuery, 19156 19157 // Map over the $ in case of overwrite 19158 _$ = window.$; 19159 19160jQuery.noConflict = function( deep ) { 19161 if ( window.$ === jQuery ) { 19162 window.$ = _$; 19163 } 19164 19165 if ( deep && window.jQuery === jQuery ) { 19166 window.jQuery = _jQuery; 19167 } 19168 19169 return jQuery; 19170}; 19171 19172// Expose jQuery and $ identifiers, even in AMD 19173// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 19174// and CommonJS for browser emulators (#13566) 19175if ( !noGlobal ) { 19176 window.jQuery = window.$ = jQuery; 19177} 19178 19179return jQuery; 19180})); 19181 19182/*! 19183 * jQuery Migrate - v1.3.0 - 2016-01-13 19184 * Copyright jQuery Foundation and other contributors 19185 */ 19186(function( jQuery, window, undefined ) { 19187// See http://bugs.jquery.com/ticket/13335 19188// "use strict"; 19189 19190 19191jQuery.migrateVersion = "1.3.0"; 19192 19193 19194var warnedAbout = {}; 19195 19196// List of warnings already given; public read only 19197jQuery.migrateWarnings = []; 19198 19199// Set to true to prevent console output; migrateWarnings still maintained 19200// jQuery.migrateMute = false; 19201 19202// Show a message on the console so devs know we're active 19203if ( !jQuery.migrateMute && window.console && window.console.log ) { 19204 window.console.log("JQMIGRATE: Logging is active"); 19205} 19206 19207// Set to false to disable traces that appear with warnings 19208if ( jQuery.migrateTrace === undefined ) { 19209 jQuery.migrateTrace = true; 19210} 19211 19212// Forget any warnings we've already given; public 19213jQuery.migrateReset = function() { 19214 warnedAbout = {}; 19215 jQuery.migrateWarnings.length = 0; 19216}; 19217 19218function migrateWarn( msg) { 19219 var console = window.console; 19220 if ( !warnedAbout[ msg ] ) { 19221 warnedAbout[ msg ] = true; 19222 jQuery.migrateWarnings.push( msg ); 19223 if ( console && console.warn && !jQuery.migrateMute ) { 19224 console.warn( "JQMIGRATE: " + msg ); 19225 if ( jQuery.migrateTrace && console.trace ) { 19226 console.trace(); 19227 } 19228 } 19229 } 19230} 19231 19232function migrateWarnProp( obj, prop, value, msg ) { 19233 if ( Object.defineProperty ) { 19234 // On ES5 browsers (non-oldIE), warn if the code tries to get prop; 19235 // allow property to be overwritten in case some other plugin wants it 19236 try { 19237 Object.defineProperty( obj, prop, { 19238 configurable: true, 19239 enumerable: true, 19240 get: function() { 19241 migrateWarn( msg ); 19242 return value; 19243 }, 19244 set: function( newValue ) { 19245 migrateWarn( msg ); 19246 value = newValue; 19247 } 19248 }); 19249 return; 19250 } catch( err ) { 19251 // IE8 is a dope about Object.defineProperty, can't warn there 19252 } 19253 } 19254 19255 // Non-ES5 (or broken) browser; just set the property 19256 jQuery._definePropertyBroken = true; 19257 obj[ prop ] = value; 19258} 19259 19260if ( document.compatMode === "BackCompat" ) { 19261 // jQuery has never supported or tested Quirks Mode 19262 migrateWarn( "jQuery is not compatible with Quirks Mode" ); 19263} 19264 19265 19266var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn, 19267 oldAttr = jQuery.attr, 19268 valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get || 19269 function() { return null; }, 19270 valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set || 19271 function() { return undefined; }, 19272 rnoType = /^(?:input|button)$/i, 19273 rnoAttrNodeType = /^[238]$/, 19274 rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, 19275 ruseDefault = /^(?:checked|selected)$/i; 19276 19277// jQuery.attrFn 19278migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" ); 19279 19280jQuery.attr = function( elem, name, value, pass ) { 19281 var lowerName = name.toLowerCase(), 19282 nType = elem && elem.nodeType; 19283 19284 if ( pass ) { 19285 // Since pass is used internally, we only warn for new jQuery 19286 // versions where there isn't a pass arg in the formal params 19287 if ( oldAttr.length < 4 ) { 19288 migrateWarn("jQuery.fn.attr( props, pass ) is deprecated"); 19289 } 19290 if ( elem && !rnoAttrNodeType.test( nType ) && 19291 (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) { 19292 return jQuery( elem )[ name ]( value ); 19293 } 19294 } 19295 19296 // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking 19297 // for disconnected elements we don't warn on $( "<button>", { type: "button" } ). 19298 if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) && elem.parentNode ) { 19299 migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8"); 19300 } 19301 19302 // Restore boolHook for boolean property/attribute synchronization 19303 if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) { 19304 jQuery.attrHooks[ lowerName ] = { 19305 get: function( elem, name ) { 19306 // Align boolean attributes with corresponding properties 19307 // Fall back to attribute presence where some booleans are not supported 19308 var attrNode, 19309 property = jQuery.prop( elem, name ); 19310 return property === true || typeof property !== "boolean" && 19311 ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? 19312 19313 name.toLowerCase() : 19314 undefined; 19315 },
19316 set: function( elem, value, name ) { 19317 var propName; 19318 if ( value === false ) { 19319 // Remove boolean attributes when set to false 19320 jQuery.removeAttr( elem, name ); 19321 } else { 19322 // value is true since we know at this point it's type boolean and not false 19323 // Set boolean attributes to the same name and set the DOM property 19324 propName = jQuery.propFix[ name ] || name; 19325 if ( propName in elem ) { 19326 // Only set the IDL specifically if it already exists on the element 19327 elem[ propName ] = true; 19328 } 19329 19330 elem.setAttribute( name, name.toLowerCase() ); 19331 } 19332 return name; 19333 } 19334 }; 19335 19336 // Warn only for attributes that can remain distinct from their properties post-1.9 19337 if ( ruseDefault.test( lowerName ) ) { 19338 migrateWarn( "jQuery.fn.attr('" + lowerName + "') might use property instead of attribute" ); 19339 } 19340 } 19341 19342 return oldAttr.call( jQuery, elem, name, value ); 19343}; 19344 19345// attrHooks: value 19346jQuery.attrHooks.value = { 19347 get: function( elem, name ) { 19348 var nodeName = ( elem.nodeName || "" ).toLowerCase(); 19349 if ( nodeName === "button" ) { 19350 return valueAttrGet.apply( this, arguments ); 19351 } 19352 if ( nodeName !== "input" && nodeName !== "option" ) { 19353 migrateWarn("jQuery.fn.attr('value') no longer gets properties"); 19354 } 19355 return name in elem ? 19356 elem.value : 19357 null; 19358 }, 19359 set: function( elem, value ) { 19360 var nodeName = ( elem.nodeName || "" ).toLowerCase(); 19361 if ( nodeName === "button" ) { 19362 return valueAttrSet.apply( this, arguments ); 19363 } 19364 if ( nodeName !== "input" && nodeName !== "option" ) { 19365 migrateWarn("jQuery.fn.attr('value', val) no longer sets properties"); 19366 } 19367 // Does not return so that setAttribute is also used 19368 elem.value = value; 19369 } 19370}; 19371 19372 19373var matched, browser, 19374 oldInit = jQuery.fn.init, 19375 oldParseJSON = jQuery.parseJSON, 19376 rspaceAngle = /^\s*</, 19377 // Note: XSS check is done below after string is trimmed 19378 rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/; 19379 19380// $(html) "looks like html" rule change 19381jQuery.fn.init = function( selector, context, rootjQuery ) { 19382 var match, ret; 19383 19384 if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) && 19385 (match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) { 19386 // This is an HTML string according to the "old" rules; is it still? 19387 if ( !rspaceAngle.test( selector ) ) { 19388 migrateWarn("$(html) HTML strings must start with '<' character"); 19389 } 19390 if ( match[ 3 ] ) { 19391 migrateWarn("$(html) HTML text after last tag is ignored"); 19392 } 19393 19394 // Consistently reject any HTML-like string starting with a hash (#9521) 19395 // Note that this may break jQuery 1.6.x code that otherwise would work. 19396 if ( match[ 0 ].charAt( 0 ) === "#" ) { 19397 migrateWarn("HTML string cannot start with a '#' character"); 19398 jQuery.error("JQMIGRATE: Invalid selector string (XSS)"); 19399 } 19400 // Now process using loose rules; let pre-1.8 play too 19401 if ( context && context.context ) { 19402 // jQuery object as context; parseHTML expects a DOM object 19403 context = context.context; 19404 } 19405 if ( jQuery.parseHTML ) { 19406 return oldInit.call( this, 19407 jQuery.parseHTML( match[ 2 ], context && context.ownerDocument || 19408 context || document, true ), context, rootjQuery ); 19409 } 19410 } 19411 19412 // jQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0 19413 if ( selector === "#" ) { 19414 migrateWarn( "jQuery( '#' ) is not a valid selector" ); 19415 selector = []; 19416 } 19417 19418 ret = oldInit.apply( this, arguments ); 19419 19420 // Fill in selector and context properties so .live() works 19421 if ( selector && selector.selector !== undefined ) { 19422 // A jQuery object, copy its properties 19423 ret.selector = selector.selector; 19424 ret.context = selector.context; 19425 19426 } else { 19427 ret.selector = typeof selector === "string" ? selector : ""; 19428 if ( selector ) { 19429 ret.context = selector.nodeType? selector : context || document; 19430 } 19431 } 19432 19433 return ret; 19434}; 19435jQuery.fn.init.prototype = jQuery.fn; 19436 19437// Let $.parseJSON(falsy_value) return null 19438jQuery.parseJSON = function( json ) { 19439 if ( !json ) { 19440 migrateWarn("jQuery.parseJSON requires a valid JSON string"); 19441 return null; 19442 } 19443 return oldParseJSON.apply( this, arguments ); 19444}; 19445 19446jQuery.uaMatch = function( ua ) { 19447 ua = ua.toLowerCase(); 19448 19449 var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || 19450 /(webkit)[ \/]([\w.]+)/.exec( ua ) || 19451 /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || 19452 /(msie) ([\w.]+)/.exec( ua ) || 19453 ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || 19454 []; 19455 19456 return { 19457 browser: match[ 1 ] || "", 19458 version: match[ 2 ] || "0" 19459 }; 19460}; 19461 19462// Don't clobber any existing jQuery.browser in case it's different 19463if ( !jQuery.browser ) { 19464 matched = jQuery.uaMatch( navigator.userAgent ); 19465 browser = {}; 19466 19467 if ( matched.browser ) { 19468 browser[ matched.browser ] = true; 19469 browser.version = matched.version; 19470 } 19471 19472 // Chrome is Webkit, but Webkit is also Safari. 19473 if ( browser.chrome ) { 19474 browser.webkit = true; 19475 } else if ( browser.webkit ) { 19476 browser.safari = true; 19477 } 19478 19479 jQuery.browser = browser; 19480} 19481 19482// Warn if the code tries to get jQuery.browser 19483migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" ); 19484
19485// jQuery.boxModel deprecated in 1.3, jQuery.support.boxModel deprecated in 1.7 19486jQuery.boxModel = jQuery.support.boxModel = (document.compatMode === "CSS1Compat"); 19487migrateWarnProp( jQuery, "boxModel", jQuery.boxModel, "jQuery.boxModel is deprecated" ); 19488migrateWarnProp( jQuery.support, "boxModel", jQuery.support.boxModel, "jQuery.support.boxModel is deprecated" ); 19489 19490jQuery.sub = function() { 19491 function jQuerySub( selector, context ) { 19492 return new jQuerySub.fn.init( selector, context ); 19493 } 19494 jQuery.extend( true, jQuerySub, this ); 19495 jQuerySub.superclass = this; 19496 jQuerySub.fn = jQuerySub.prototype = this(); 19497 jQuerySub.fn.constructor = jQuerySub; 19498 jQuerySub.sub = this.sub; 19499 jQuerySub.fn.init = function init( selector, context ) { 19500 var instance = jQuery.fn.init.call( this, selector, context, rootjQuerySub ); 19501 return instance instanceof jQuerySub ? 19502 instance : 19503 jQuerySub( instance ); 19504 }; 19505 jQuerySub.fn.init.prototype = jQuerySub.fn; 19506 var rootjQuerySub = jQuerySub(document); 19507 migrateWarn( "jQuery.sub() is deprecated" ); 19508 return jQuerySub; 19509}; 19510 19511// The number of elements contained in the matched element set 19512jQuery.fn.size = function() { 19513 migrateWarn( "jQuery.fn.size() is deprecated; use the .length property" ); 19514 return this.length; 19515}; 19516 19517 19518var internalSwapCall = false; 19519 19520// If this version of jQuery has .swap(), don't false-alarm on internal uses 19521if ( jQuery.swap ) { 19522 jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) { 19523 var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get; 19524 19525 if ( oldHook ) { 19526 jQuery.cssHooks[ name ].get = function() { 19527 var ret; 19528 19529 internalSwapCall = true; 19530 ret = oldHook.apply( this, arguments ); 19531 internalSwapCall = false; 19532 return ret; 19533 }; 19534 } 19535 }); 19536} 19537 19538jQuery.swap = function( elem, options, callback, args ) { 19539 var ret, name, 19540 old = {}; 19541 19542 if ( !internalSwapCall ) { 19543 migrateWarn( "jQuery.swap() is undocumented and deprecated" ); 19544 } 19545 19546 // Remember the old values, and insert the new ones 19547 for ( name in options ) { 19548 old[ name ] = elem.style[ name ]; 19549 elem.style[ name ] = options[ name ]; 19550 } 19551 19552 ret = callback.apply( elem, args || [] ); 19553 19554 // Revert the old values 19555 for ( name in options ) { 19556 elem.style[ name ] = old[ name ]; 19557 } 19558 19559 return ret; 19560}; 19561 19562 19563// Ensure that $.ajax gets the new parseJSON defined in core.js 19564jQuery.ajaxSetup({ 19565 converters: { 19566 "text json": jQuery.parseJSON 19567 } 19568}); 19569 19570 19571var oldFnData = jQuery.fn.data; 19572 19573jQuery.fn.data = function( name ) { 19574 var ret, evt, 19575 elem = this[0]; 19576 19577 // Handles 1.7 which has this behavior and 1.8 which doesn't 19578 if ( elem && name === "events" && arguments.length === 1 ) { 19579 ret = jQuery.data( elem, name ); 19580 evt = jQuery._data( elem, name ); 19581 if ( ( ret === undefined || ret === evt ) && evt !== undefined ) { 19582 migrateWarn("Use of jQuery.fn.data('events') is deprecated"); 19583 return evt; 19584 } 19585 } 19586 return oldFnData.apply( this, arguments ); 19587}; 19588 19589 19590var rscriptType = /\/(java|ecma)script/i; 19591 19592// Since jQuery.clean is used internally on older versions, we only shim if it's missing 19593if ( !jQuery.clean ) { 19594 jQuery.clean = function( elems, context, fragment, scripts ) { 19595 // Set context per 1.8 logic 19596 context = context || document; 19597 context = !context.nodeType && context[0] || context; 19598 context = context.ownerDocument || context; 19599 19600 migrateWarn("jQuery.clean() is deprecated"); 19601 19602 var i, elem, handleScript, jsTags, 19603 ret = []; 19604 19605 jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes ); 19606 19607 // Complex logic lifted directly from jQuery 1.8 19608 if ( fragment ) { 19609 // Special handling of each script element 19610 handleScript = function( elem ) { 19611 // Check if we consider it executable 19612 if ( !elem.type || rscriptType.test( elem.type ) ) { 19613 // Detach the script and store it in the scripts array (if provided) or the fragment 19614 // Return truthy to indicate that it has been handled 19615 return scripts ? 19616 scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) : 19617 fragment.appendChild( elem ); 19618 } 19619 }; 19620 19621 for ( i = 0; (elem = ret[i]) != null; i++ ) { 19622 // Check if we're done after handling an executable script 19623 if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) { 19624 // Append to fragment and handle embedded scripts 19625 fragment.appendChild( elem ); 19626 if ( typeof elem.getElementsByTagName !== "undefined" ) { 19627 // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration 19628 jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript ); 19629 19630 // Splice the scripts into ret after their former ancestor and advance our index beyond them 19631 ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); 19632 i += jsTags.length; 19633 } 19634 } 19635 } 19636 } 19637 19638 return ret; 19639 }; 19640} 19641 19642var eventAdd = jQuery.event.add, 19643 eventRemove = jQuery.event.remove, 19644 eventTrigger = jQuery.event.trigger, 19645 oldToggle = jQuery.fn.toggle, 19646 oldLive = jQuery.fn.live, 19647 oldDie = jQuery.fn.die, 19648 oldLoad = jQuery.fn.load, 19649 ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess", 19650 rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ), 19651 rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, 19652 hoverHack = function( events ) { 19653 if ( typeof( events ) !== "string" || jQuery.event.special.hover ) { 19654 return events; 19655 } 19656 if ( rhoverHack.test( events ) ) { 19657 migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"); 19658 } 19659 return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); 19660 }; 19661 19662// Event props removed in 1.9, put them back if needed; no practical way to warn them 19663if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) { 19664 jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" ); 19665} 19666 19667// Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7 19668if ( jQuery.event.dispatch ) { 19669 migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" ); 19670} 19671 19672// Support for 'hover' pseudo-event and ajax event warnings 19673jQuery.event.add = function( elem, types, handler, data, selector ){ 19674 if ( elem !== document && rajaxEvent.test( types ) ) { 19675 migrateWarn( "AJAX events should be attached to document: " + types ); 19676 } 19677 eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector ); 19678}; 19679jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){ 19680 eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes ); 19681}; 19682 19683jQuery.each( [ "load", "unload", "error" ], function( _, name ) { 19684 19685 jQuery.fn[ name ] = function() { 19686 var args = Array.prototype.slice.call( arguments, 0 ); 19687 migrateWarn( "jQuery.fn." + name + "() is deprecated" ); 19688 19689 // If this is an ajax load() the first arg should be the string URL; 19690 // technically this could also be the "Anything" arg of the event .load() 19691 // which just goes to show why this dumb signature has been deprecated! 19692 // jQuery custom builds that exclude the Ajax module justifiably die here. 19693 if ( name === "load" && typeof arguments[ 0 ] === "string" ) { 19694 return oldLoad.apply( this, arguments ); 19695 } 19696 19697 args.splice( 0, 0, name ); 19698 if ( arguments.length ) { 19699 return this.bind.apply( this, args ); 19700 } 19701 19702 // Use .triggerHandler here because: 19703 // - load and unload events don't need to bubble, only applied to window or image 19704 // - error event should not bubble to window, although it does pre-1.7 19705 // See http://bugs.jquery.com/ticket/11820 19706 this.triggerHandler.apply( this, args ); 19707 return this; 19708 }; 19709 19710}); 19711 19712jQuery.fn.toggle = function( fn, fn2 ) { 19713 19714 // Don't mess with animation or css toggles 19715 if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) { 19716 return oldToggle.apply( this, arguments ); 19717 } 19718 migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated"); 19719 19720 // Save reference to arguments for access in closure 19721 var args = arguments, 19722 guid = fn.guid || jQuery.guid++, 19723 i = 0, 19724 toggler = function( event ) { 19725 // Figure out which function to execute 19726 var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; 19727 jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); 19728 19729 // Make sure that clicks stop 19730 event.preventDefault(); 19731 19732 // and execute the function 19733 return args[ lastToggle ].apply( this, arguments ) || false; 19734 }; 19735 19736 // link all the functions, so any of them can unbind this click handler 19737 toggler.guid = guid; 19738 while ( i < args.length ) { 19739 args[ i++ ].guid = guid; 19740 } 19741 19742 return this.click( toggler ); 19743}; 19744 19745jQuery.fn.live = function( types, data, fn ) { 19746 migrateWarn("jQuery.fn.live() is deprecated"); 19747 if ( oldLive ) { 19748 return oldLive.apply( this, arguments ); 19749 } 19750 jQuery( this.context ).on( types, this.selector, data, fn ); 19751 return this; 19752}; 19753 19754jQuery.fn.die = function( types, fn ) { 19755 migrateWarn("jQuery.fn.die() is deprecated"); 19756 if ( oldDie ) { 19757 return oldDie.apply( this, arguments ); 19758 } 19759 jQuery( this.context ).off( types, this.selector || "**", fn ); 19760 return this; 19761}; 19762 19763// Turn global events into document-triggered events 19764jQuery.event.trigger = function( event, data, elem, onlyHandlers ){ 19765 if ( !elem && !rajaxEvent.test( event ) ) { 19766 migrateWarn( "Global events are undocumented and deprecated" ); 19767 } 19768 return eventTrigger.call( this, event, data, elem || document, onlyHandlers ); 19769}; 19770jQuery.each( ajaxEvents.split("|"), 19771 function( _, name ) { 19772 jQuery.event.special[ name ] = { 19773 setup: function() { 19774 var elem = this; 19775 19776 // The document needs no shimming; must be !== for oldIE 19777 if ( elem !== document ) { 19778 jQuery.event.add( document, name + "." + jQuery.guid, function() { 19779 jQuery.event.trigger( name, Array.prototype.slice.call( arguments, 1 ), elem, true ); 19780 }); 19781 jQuery._data( this, name, jQuery.guid++ ); 19782 } 19783 return false;
19784 }, 19785 teardown: function() { 19786 if ( this !== document ) { 19787 jQuery.event.remove( document, name + "." + jQuery._data( this, name ) ); 19788 } 19789 return false; 19790 } 19791 }; 19792 } 19793); 19794 19795jQuery.event.special.ready = { 19796 setup: function() { migrateWarn( "'ready' event is deprecated" ); } 19797}; 19798 19799var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack, 19800 oldFind = jQuery.fn.find; 19801 19802jQuery.fn.andSelf = function() { 19803 migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"); 19804 return oldSelf.apply( this, arguments ); 19805}; 19806 19807jQuery.fn.find = function( selector ) { 19808 var ret = oldFind.apply( this, arguments ); 19809 ret.context = this.context; 19810 ret.selector = this.selector ? this.selector + " " + selector : selector; 19811 return ret; 19812}; 19813 19814 19815// jQuery 1.6 did not support Callbacks, do not warn there 19816if ( jQuery.Callbacks ) { 19817 19818 var oldDeferred = jQuery.Deferred, 19819 tuples = [ 19820 // action, add listener, callbacks, .then handlers, final state 19821 [ "resolve", "done", jQuery.Callbacks("once memory"), 19822 jQuery.Callbacks("once memory"), "resolved" ], 19823 [ "reject", "fail", jQuery.Callbacks("once memory"), 19824 jQuery.Callbacks("once memory"), "rejected" ], 19825 [ "notify", "progress", jQuery.Callbacks("memory"), 19826 jQuery.Callbacks("memory") ] 19827 ]; 19828 19829 jQuery.Deferred = function( func ) { 19830 var deferred = oldDeferred(), 19831 promise = deferred.promise(); 19832 19833 deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) { 19834 var fns = arguments; 19835 19836 migrateWarn( "deferred.pipe() is deprecated" ); 19837 19838 return jQuery.Deferred(function( newDefer ) { 19839 jQuery.each( tuples, function( i, tuple ) { 19840 var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; 19841 // deferred.done(function() { bind to newDefer or newDefer.resolve }) 19842 // deferred.fail(function() { bind to newDefer or newDefer.reject }) 19843 // deferred.progress(function() { bind to newDefer or newDefer.notify }) 19844 deferred[ tuple[1] ](function() { 19845 var returned = fn && fn.apply( this, arguments ); 19846 if ( returned && jQuery.isFunction( returned.promise ) ) { 19847 returned.promise() 19848 .done( newDefer.resolve ) 19849 .fail( newDefer.reject ) 19850 .progress( newDefer.notify ); 19851 } else { 19852 newDefer[ tuple[ 0 ] + "With" ]( 19853 this === promise ? newDefer.promise() : this, 19854 fn ? [ returned ] : arguments 19855 ); 19856 } 19857 }); 19858 }); 19859 fns = null; 19860 }).promise(); 19861 19862 }; 19863 19864 deferred.isResolved = function() { 19865 migrateWarn( "deferred.isResolved is deprecated" ); 19866 return deferred.state() === "resolved"; 19867 }; 19868 19869 deferred.isRejected = function() { 19870 migrateWarn( "deferred.isRejected is deprecated" ); 19871 return deferred.state() === "rejected"; 19872 }; 19873 19874 if ( func ) { 19875 func.call( deferred, deferred ); 19876 } 19877 19878 return deferred; 19879 }; 19880 19881} 19882 19883})( jQuery, window ); 19884redesign.define("base/js/global/lib/jquery.migrate", function(){}); 19885 19886/** 19887 * menu-aim is a jQuery plugin for dropdown menus that can differentiate 19888 * between a user trying hover over a dropdown item vs trying to navigate into 19889 * a submenu's contents. 19890 * 19891 * menu-aim assumes that you have are using a menu with submenus that expand 19892 * to the menu's right. It will fire events when the user's mouse enters a new 19893 * dropdown item *and* when that item is being intentionally hovered over. 19894 * 19895 * __________________________ 19896 * | Monkeys >| Gorilla | 19897 * | Gorillas >| Content | 19898 * | Chimps >| Here | 19899 * |___________|____________| 19900 * 19901 * In the above example, "Gorillas" is selected and its submenu content is 19902 * being shown on the right. Imagine that the user's cursor is hovering over 19903 * "Gorillas." When they move their mouse into the "Gorilla Content" area, they 19904 * may briefly hover over "Chimps." This shouldn't close the "Gorilla Content" 19905 * area. 19906 * 19907 * This problem is normally solved using timeouts and delays. menu-aim tries to 19908 * solve this by detecting the direction of the user's mouse movement. This can 19909 * make for quicker transitions when navigating up and down the menu. The 19910 * experience is hopefully similar to amazon.com/'s "Shop by Department" 19911 * dropdown. 19912 * 19913 * Use like so: 19914 * 19915 * $("#menu").menuAim({ 19916 * activate: $.noop, // fired on row activation 19917 * deactivate: $.noop // fired on row deactivation 19918 * }); 19919 * 19920 * ...to receive events when a menu's row has been purposefully (de)activated. 19921 * 19922 * The following options can be passed to menuAim. All functions execute with 19923 * the relevant row's HTML element as the execution context ('this'): 19924 * 19925 * .menuAim({ 19926 * // Function to call when a row is purposefully activated. Use this 19927 * // to show a submenu's content for the activated row. 19928 * activate: function() {}, 19929 * 19930 * // Function to call when a row is deactivated. 19931 * deactivate: function() {}, 19932 * 19933 * // Function to call when mouse enters a menu row. Entering a row 19934 * // does not mean the row has been activated, as the user may be 19935 * // mousing over to a submenu. 19936 * enter: function() {}, 19937 * 19938 * // Function to call when mouse exits a menu row. 19939 * exit: function() {}, 19940 * 19941 * // Selector for identifying which elements in the menu are rows 19942 * // that can trigger the above events. Defaults to "> li". 19943 * rowSelector: "> li", 19944 * 19945 * // You may have some menu rows that aren't submenus and therefore 19946 * // shouldn't ever need to "activate." If so, filter submenu rows w/ 19947 * // this selector. Defaults to "*" (all elements). 19948 * submenuSelector: "*", 19949 * 19950 * // Direction the submenu opens relative to the main menu. Can be 19951 * // left, right, above, or below. Defaults to "right". 19952 * submenuDirection: "right" 19953 * }); 19954 * 19955 * https://github.com/kamens/jQuery-menu-aim 19956*/ 19957(function($) { 19958 19959 "use strict"; 19960 19961 var MenuAim = function(element, options) { 19962 this.$menu = 19963 this.activeRow = 19964 this.mouseLocs = 19965 this.lastDelayLoc = 19966 this.timeoutId = 19967 this.options = null; 19968 19969 this.init(element, options); 19970 }; 19971 19972 MenuAim.DEFAULTS = { 19973 rowSelector: "> li", 19974 submenuSelector: "*", 19975 submenuDirection: "right", 19976 tolerance: 75, // bigger = more forgivey when entering submenu 19977 enter: $.noop, 19978 exit: $.noop, 19979 activate: $.noop, 19980 deactivate: $.noop, 19981 exitMenu: $.noop 19982 }; 19983 19984 MenuAim.prototype.getDefaults = function() {
19985 return MenuAim.DEFAULTS; 19986 }; 19987 19988 /** 19989 * Keep track of the last few locations of the mouse. 19990 */ 19991 MenuAim.prototype.mousemoveDocument = function(e) { 19992 this.mouseLocs.push({x: e.pageX, y: e.pageY}); 19993 19994 if (this.mouseLocs.length > this.MOUSE_LOCS_TRACKED) { 19995 this.mouseLocs.shift(); 19996 } 19997 }; 19998 19999 /** 20000 * Cancel possible row activations when leaving the menu entirely 20001 */ 20002 MenuAim.prototype.mouseleaveMenu = function() { 20003 if (this.timeoutId) { 20004 clearTimeout(this.timeoutId); 20005 } 20006 20007 // If exitMenu is supplied and returns true, deactivate the 20008 // currently active row on menu exit. 20009 if (this.options.exitMenu(this)) { 20010 if (this.activeRow) { 20011 this.options.deactivate(this.activeRow); 20012 } 20013 20014 this.activeRow = null; 20015 } 20016 }; 20017 20018 /** 20019 * Trigger a possible row activation whenever entering a new row. 20020 */ 20021 MenuAim.prototype.mouseenterRow = function(ev) { 20022 if (this.timeoutId) { 20023 // Cancel any previous activation delays 20024 clearTimeout(this.timeoutId); 20025 } 20026 20027 this.options.enter(ev.currentTarget); 20028 this.possiblyActivate(ev.currentTarget); 20029 }; 20030 20031 MenuAim.prototype.mouseleaveRow = function(ev) { 20032 this.options.exit(ev.currentTarget); 20033 }; 20034 20035 /* 20036 * Immediately activate a row if the user clicks on it. 20037 */ 20038 MenuAim.prototype.clickRow = function(ev) { 20039 this.activate(ev.currentTarget); 20040 }; 20041 20042 /** 20043 * Activate a menu row. 20044 */ 20045 MenuAim.prototype.activate = function(row) { 20046 if (row == this.activeRow) { 20047 return; 20048 } 20049 20050 if (this.activeRow) { 20051 this.options.deactivate(this.activeRow); 20052 } 20053 20054 this.options.activate(row); 20055 this.activeRow = row; 20056 }; 20057 20058 20059 /** 20060 * Possibly activate a menu row. If mouse movement indicates that we 20061 * shouldn't activate yet because user may be trying to enter 20062 * a submenu's content, then delay and check again later. 20063 */ 20064 MenuAim.prototype.possiblyActivate = function(row) { 20065 var delay = this.activationDelay() 20066 , self = this; 20067 20068 if (delay) { 20069 this.timeoutId = setTimeout(function() { 20070 self.possiblyActivate(row); 20071 }, delay); 20072 } else { 20073 this.activate(row); 20074 } 20075 }; 20076 20077 /** 20078 * Return the amount of time that should be used as a delay before the 20079 * currently hovered row is activated. 20080 * 20081 * Returns 0 if the activation should happen immediately. Otherwise, 20082 * returns the number of milliseconds that should be delayed before 20083 * checking again to see if the row should be activated. 20084 */ 20085 MenuAim.prototype.activationDelay = function() { 20086 if (!this.activeRow || !$(this.activeRow).is(this.options.submenuSelector)) { 20087 // If there is no other submenu row already active, then 20088 // go ahead and activate immediately. 20089 return 0; 20090 } 20091 20092 var offset = this.$menu.offset(), 20093 upperLeft = { 20094 x: offset.left, 20095 y: offset.top 20096 }, 20097 upperRight = { 20098 x: offset.left + this.$menu.outerWidth(), 20099 y: upperLeft.y 20100 }, 20101 lowerLeft = { 20102 x: offset.left, 20103 y: offset.top + this.$menu.outerHeight() 20104 }, 20105 lowerRight = { 20106 x: offset.left + this.$menu.outerWidth(), 20107 y: lowerLeft.y 20108 }, 20109 loc = this.mouseLocs[this.mouseLocs.length - 1], 20110 prevLoc = this.mouseLocs[0]; 20111 20112 if (!loc) { 20113 return 0; 20114 } 20115 20116 if (!prevLoc) { 20117 prevLoc = loc; 20118 } 20119 20120 /* https://github.com/kamens/jQuery-menu-aim/pull/22/commits - thanks to tuckbick */ 20121 // Adjust the corner points to enable tolerance. 20122 if (this.options.submenuDirection == "right") { 20123 upperRight.y -= this.options.tolerance; 20124 lowerRight.y += this.options.tolerance; 20125 } else if (this.options.submenuDirection == "left") { 20126 upperLeft.y -= this.options.tolerance; 20127 lowerLeft.y += this.options.tolerance; 20128 } else if (this.options.submenuDirection == "above") { 20129 upperLeft.x -= this.options.tolerance; 20130 upperRight.x += this.options.tolerance; 20131 } else if (this.options.submenuDirection == "below") { 20132 lowerLeft.x -= this.options.tolerance; 20133 lowerRight.x += this.options.tolerance; 20134 } 20135 20136 if (prevLoc.x < offset.left || prevLoc.x > lowerRight.x || 20137 prevLoc.y < offset.top || prevLoc.y > lowerRight.y) { 20138 // If the previous mouse location was outside of the entire 20139 // menu's bounds, immediately activate. 20140 return 0; 20141 } 20142 20143 if (this.lastDelayLoc && 20144 loc.x == this.lastDelayLoc.x && loc.y == this.lastDelayLoc.y) { 20145 // If the mouse hasn't moved since the last time we checked 20146 // for activation status, immediately activate. 20147 return 0; 20148 } 20149 20150 // Detect if the user is moving towards the currently activated 20151 // submenu. 20152 // 20153 // If the mouse is heading relatively clearly towards 20154 // the submenu's content, we should wait and give the user more 20155 // time before activating a new row. If the mouse is heading 20156 // elsewhere, we can immediately activate a new row. 20157 // 20158 // We detect this by calculating the slope formed between the 20159 // current mouse location and the upper/lower right points of 20160 // the menu. We do the same for the previous mouse location. 20161 // If the current mouse location's slopes are 20162 // increasing/decreasing appropriately compared to the 20163 // previous's, we know the user is moving toward the submenu. 20164 // 20165 // Note that since the y-axis increases as the cursor moves 20166 // down the screen, we are looking for the slope between the 20167 // cursor and the upper right corner to decrease over time, not 20168 // increase (somewhat counterintuitively). 20169 function slope(a, b) { 20170 return (b.y - a.y) / (b.x - a.x); 20171 } 20172 20173 var decreasingCorner = upperRight, 20174 increasingCorner = lowerRight; 20175 20176 // Our expectations for decreasing or increasing slope values 20177 // depends on which direction the submenu opens relative to the 20178 // main menu. By default, if the menu opens on the right, we 20179 // expect the slope between the cursor and the upper right 20180 // corner to decrease over time, as explained above. If the 20181 // submenu opens in a different direction, we change our slope 20182 // expectations. 20183 if (this.options.submenuDirection == "left") { 20184 decreasingCorner = lowerLeft; 20185 increasingCorner = upperLeft; 20186 } else if (this.options.submenuDirection == "below") { 20187 decreasingCorner = lowerRight; 20188 increasingCorner = lowerLeft; 20189 } else if (this.options.submenuDirection == "above") { 20190 decreasingCorner = upperLeft; 20191 increasingCorner = upperRight; 20192 } 20193 20194 var decreasingSlope = slope(loc, decreasingCorner), 20195 increasingSlope = slope(loc, increasingCorner), 20196 prevDecreasingSlope = slope(prevLoc, decreasingCorner), 20197 prevIncreasingSlope = slope(prevLoc, increasingCorner); 20198 20199 if (decreasingSlope < prevDecreasingSlope && 20200 increasingSlope > prevIncreasingSlope) { 20201 // Mouse is moving from previous location towards the 20202 // currently activated submenu. Delay before activating a 20203 // new menu row, because user may be moving into submenu. 20204 this.lastDelayLoc = loc; 20205 return this.DELAY; 20206 } 20207 20208 this.lastDelayLoc = null; 20209 return 0; 20210 }; 20211 20212 MenuAim.prototype.destroy = function() { 20213 this.$menu.removeData("jquery.menu-aim"); 20214 20215 this.$menu.off(".menu-aim") 20216 .find(this.options.rowSelector) 20217 .off(".menu-aim"); 20218 20219 $(document).off(".menu-aim"); 20220 }; 20221 20222 MenuAim.prototype.reset = function(triggerDeactivate) { 20223 if (this.timeoutId) { 20224 clearTimeout(this.timeoutId); 20225 } 20226 20227 if (this.activeRow && triggerDeactivate) { 20228 this.options.deactivate(this.activeRow); 20229 } 20230 20231 this.activeRow = null; 20232 }; 20233 20234 MenuAim.prototype.init = function(element, option) { 20235 this.$menu = $(element); 20236 this.activeRow = null; 20237 this.mouseLocs = []; 20238 this.lastDelayLoc = null; 20239 this.timeoutId = null; 20240 this.options = $.extend({}, this.getDefaults(), option); 20241 20242 this.MOUSE_LOCS_TRACKED = 3; // number of past mouse locations to track 20243 this.DELAY = 300; // ms delay when user appears to be entering submenu 20244 20245 /** 20246 * Hook up initial menu events 20247 */ 20248 20249 this.$menu 20250 .on("mouseleave.menu-aim", $.proxy(this.mouseleaveMenu, this)) 20251 .find(this.options.rowSelector) 20252 .on("mouseenter.menu-aim", $.proxy(this.mouseenterRow, this)) 20253 .on("mouseleave.menu-aim", $.proxy(this.mouseleaveRow, this)) 20254 .on("click.menu-aim", $.proxy(this.clickRow, this)); 20255 20256 $(document).on("mousemove.menu-aim", $.proxy(this.mousemoveDocument, this)); 20257 20258 }; 20259 20260 $.fn.menuAim = function(opts) { 20261 return this.each(function() { 20262 var $this = $(this) 20263 , data = $this.data("jquery.menu-aim") 20264 , options = typeof opts == "object" && opts; 20265 20266 if (!data) { 20267 $this.data("jquery.menu-aim", (data = new MenuAim(this, options))); 20268 } 20269 20270 if (typeof opts == "string") { 20271 data[opts](); 20272 } 20273 20274 }); 20275 }; 20276 20277})(jQuery); 20278redesign.define("jquery_menuAim", ["jquery"], function(){}); 20279 20280/** 20281 * Copyright (c) 2011-2014 Felix Gnass 20282 * Licensed under the MIT license 20283 * http://spin.js.org/ 20284 * 20285 * Example: 20286 var opts = { 20287 lines: 12 // The number of lines to draw 20288 , length: 7 // The length of each line 20289 , width: 5 // The line thickness 20290 , radius: 10 // The radius of the inner circle 20291 , scale: 1.0 // Scales overall size of the spinner 20292 , corners: 1 // Roundness (0..1) 20293 , color: '#000' // #rgb or #rrggbb 20294 , opacity: 1/4 // Opacity of the lines 20295 , rotate: 0 // Rotation offset 20296 , direction: 1 // 1: clockwise, -1: counterclockwise 20297 , speed: 1 // Rounds per second 20298 , trail: 100 // Afterglow percentage 20299 , fps: 20 // Frames per second when using setTimeout() 20300 , zIndex: 2e9 // Use a high z-index by default 20301 , className: 'spinner' // CSS class to assign to the element 20302 , top: '50%' // center vertically 20303 , left: '50%' // center horizontally 20304 , shadow: false // Whether to render a shadow 20305 , hwaccel: false // Whether to use hardware acceleration (might be buggy) 20306 , position: 'absolute' // Element positioning 20307 } 20308 var target = document.getElementById('foo') 20309 var spinner = new Spinner(opts).spin(target) 20310 */ 20311;(function (root, factory) { 20312 20313 /* CommonJS */ 20314 if (typeof module == 'object' && module.exports) module.exports = factory() 20315 20316 /* AMD module */ 20317 else if (typeof redesign.define === 'function' && redesign.define.amd) redesign.define('spin',factory) 20318 20319 /* Browser global */ 20320 else root.Spinner = factory() 20321}(this, function () { 20322 "use strict" 20323 20324 var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */ 20325 , animations = {} /* Animation rules keyed by their name */ 20326 , useCssAnimations /* Whether to use CSS animations or setTimeout */ 20327 , sheet /* A stylesheet to hold the @keyframe or VML rules. */ 20328 20329 /** 20330 * Utility function to create elements. If no tag name is given, 20331 * a DIV is created. Optionally properties can be passed. 20332 */ 20333 function createEl (tag, prop) { 20334 var el = document.createElement(tag || 'div') 20335 , n 20336 20337 for (n in prop) el[n] = prop[n] 20338 return el 20339 } 20340 20341 /** 20342 * Appends children and returns the parent. 20343 */ 20344 function ins (parent /* child1, child2, ...*/) { 20345 for (var i = 1, n = arguments.length; i < n; i++) { 20346 parent.appendChild(arguments[i]) 20347 } 20348 20349 return parent 20350 } 20351 20352 /** 20353 * Creates an opacity keyframe animation rule and returns its name. 20354 * Since most mobile Webkits have timing issues with animation-delay, 20355 * we create separate rules for each line/segment. 20356 */ 20357 function addAnimation (alpha, trail, i, lines) { 20358 var name = ['opacity', trail, ~~(alpha * 100), i, lines].join('-') 20359 , start = 0.01 + i/lines * 100 20360 , z = Math.max(1 - (1-alpha) / trail * (100-start), alpha) 20361 , prefix = useCssAnimations.substring(0, useCssAnimations.indexOf('Animation')).toLowerCase() 20362 , pre = prefix && '-' + prefix + '-' || '' 20363 20364 if (!animations[name]) { 20365 sheet.insertRule( 20366 '@' + pre + 'keyframes ' + name + '{' + 20367 '0%{opacity:' + z + '}' + 20368 start + '%{opacity:' + alpha + '}' + 20369 (start+0.01) + '%{opacity:1}' + 20370 (start+trail) % 100 + '%{opacity:' + alpha + '}' + 20371 '100%{opacity:' + z + '}' + 20372 '}', sheet.cssRules.length) 20373 20374 animations[name] = 1 20375 } 20376 20377 return name 20378 } 20379 20380 /**
20381 * Tries various vendor prefixes and returns the first supported property. 20382 */ 20383 function vendor (el, prop) { 20384 var s = el.style 20385 , pp 20386 , i 20387 20388 prop = prop.charAt(0).toUpperCase() + prop.slice(1) 20389 if (s[prop] !== undefined) return prop 20390 for (i = 0; i < prefixes.length; i++) { 20391 pp = prefixes[i]+prop 20392 if (s[pp] !== undefined) return pp 20393 } 20394 } 20395 20396 /** 20397 * Sets multiple style properties at once. 20398 */ 20399 function css (el, prop) { 20400 for (var n in prop) { 20401 el.style[vendor(el, n) || n] = prop[n] 20402 } 20403 20404 return el 20405 } 20406 20407 /** 20408 * Fills in default values. 20409 */ 20410 function merge (obj) { 20411 for (var i = 1; i < arguments.length; i++) { 20412 var def = arguments[i] 20413 for (var n in def) { 20414 if (obj[n] === undefined) obj[n] = def[n] 20415 } 20416 } 20417 return obj 20418 } 20419 20420 /** 20421 * Returns the line color from the given string or array. 20422 */ 20423 function getColor (color, idx) { 20424 return typeof color == 'string' ? color : color[idx % color.length] 20425 } 20426 20427 // Built-in defaults 20428 20429 var defaults = { 20430 lines: 12 // The number of lines to draw 20431 , length: 7 // The length of each line 20432 , width: 5 // The line thickness 20433 , radius: 10 // The radius of the inner circle 20434 , scale: 1.0 // Scales overall size of the spinner 20435 , corners: 1 // Roundness (0..1) 20436 , color: '#000' // #rgb or #rrggbb 20437 , opacity: 1/4 // Opacity of the lines 20438 , rotate: 0 // Rotation offset 20439 , direction: 1 // 1: clockwise, -1: counterclockwise 20440 , speed: 1 // Rounds per second 20441 , trail: 100 // Afterglow percentage 20442 , fps: 20 // Frames per second when using setTimeout() 20443 , zIndex: 2e9 // Use a high z-index by default 20444 , className: 'spinner' // CSS class to assign to the element 20445 , top: '50%' // center vertically 20446 , left: '50%' // center horizontally 20447 , shadow: false // Whether to render a shadow 20448 , hwaccel: false // Whether to use hardware acceleration (might be buggy) 20449 , position: 'absolute' // Element positioning 20450 } 20451 20452 /** The constructor */ 20453 function Spinner (o) { 20454 this.opts = merge(o || {}, Spinner.defaults, defaults) 20455 } 20456 20457 // Global defaults that override the built-ins: 20458 Spinner.defaults = {} 20459 20460 merge(Spinner.prototype, { 20461 /** 20462 * Adds the spinner to the given target element. If this instance is already 20463 * spinning, it is automatically removed from its previous target b calling 20464 * stop() internally. 20465 */ 20466 spin: function (target) { 20467 this.stop() 20468 20469 var self = this 20470 , o = self.opts 20471 , el = self.el = createEl(null, {className: o.className}) 20472 20473 css(el, { 20474 position: o.position 20475 , width: 0 20476 , zIndex: o.zIndex 20477 , left: o.left 20478 , top: o.top 20479 }) 20480 20481 if (target) { 20482 target.insertBefore(el, target.firstChild || null) 20483 } 20484 20485 el.setAttribute('role', 'progressbar') 20486 self.lines(el, self.opts) 20487 20488 if (!useCssAnimations) { 20489 // No CSS animation support, use setTimeout() instead 20490 var i = 0 20491 , start = (o.lines - 1) * (1 - o.direction) / 2 20492 , alpha 20493 , fps = o.fps 20494 , f = fps / o.speed 20495 , ostep = (1 - o.opacity) / (f * o.trail / 100) 20496 , astep = f / o.lines 20497 20498 ;(function anim () { 20499 i++ 20500 for (var j = 0; j < o.lines; j++) { 20501 alpha = Math.max(1 - (i + (o.lines - j) * astep) % f * ostep, o.opacity) 20502 20503 self.opacity(el, j * o.direction + start, alpha, o) 20504 } 20505 self.timeout = self.el && setTimeout(anim, ~~(1000 / fps)) 20506 })() 20507 } 20508 return self 20509 } 20510 20511 /** 20512 * Stops and removes the Spinner. 20513 */ 20514 , stop: function () { 20515 var el = this.el 20516 if (el) { 20517 clearTimeout(this.timeout) 20518 if (el.parentNode) el.parentNode.removeChild(el) 20519 this.el = undefined 20520 } 20521 return this 20522 } 20523 20524 /** 20525 * Internal method that draws the individual lines. Will be overwritten 20526 * in VML fallback mode below. 20527 */ 20528 , lines: function (el, o) { 20529 var i = 0 20530 , start = (o.lines - 1) * (1 - o.direction) / 2 20531 , seg 20532 20533 function fill (color, shadow) { 20534 return css(createEl(), { 20535 position: 'absolute' 20536 , width: o.scale * (o.length + o.width) + 'px' 20537 , height: o.scale * o.width + 'px' 20538 , background: color 20539 , boxShadow: shadow 20540 , transformOrigin: 'left' 20541 , transform: 'rotate(' + ~~(360/o.lines*i + o.rotate) + 'deg) translate(' + o.scale*o.radius + 'px' + ',0)' 20542 , borderRadius: (o.corners * o.scale * o.width >> 1) + 'px' 20543 }) 20544 } 20545 20546 for (; i < o.lines; i++) { 20547 seg = css(createEl(), { 20548 position: 'absolute' 20549 , top: 1 + ~(o.scale * o.width / 2) + 'px'
20550 , transform: o.hwaccel ? 'translate3d(0,0,0)' : '' 20551 , opacity: o.opacity 20552 , animation: useCssAnimations && addAnimation(o.opacity, o.trail, start + i * o.direction, o.lines) + ' ' + 1 / o.speed + 's linear infinite' 20553 }) 20554 20555 if (o.shadow) ins(seg, css(fill('#000', '0 0 4px #000'), {top: '2px'})) 20556 ins(el, ins(seg, fill(getColor(o.color, i), '0 0 1px rgba(0,0,0,.1)'))) 20557 } 20558 return el 20559 } 20560 20561 /** 20562 * Internal method that adjusts the opacity of a single line. 20563 * Will be overwritten in VML fallback mode below. 20564 */ 20565 , opacity: function (el, i, val) { 20566 if (i < el.childNodes.length) el.childNodes[i].style.opacity = val 20567 } 20568 20569 }) 20570 20571 20572 function initVML () { 20573 20574 /* Utility function to create a VML tag */ 20575 function vml (tag, attr) { 20576 return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr) 20577 } 20578 20579 // No CSS transforms but VML support, add a CSS rule for VML elements: 20580 sheet.addRule('.spin-vml', 'behavior:url(#default#VML)') 20581 20582 Spinner.prototype.lines = function (el, o) { 20583 var r = o.scale * (o.length + o.width) 20584 , s = o.scale * 2 * r 20585 20586 function grp () { 20587 return css( 20588 vml('group', { 20589 coordsize: s + ' ' + s 20590 , coordorigin: -r + ' ' + -r 20591 }) 20592 , { width: s, height: s } 20593 ) 20594 } 20595 20596 var margin = -(o.width + o.length) * o.scale * 2 + 'px' 20597 , g = css(grp(), {position: 'absolute', top: margin, left: margin}) 20598 , i 20599 20600 function seg (i, dx, filter) { 20601 ins( 20602 g 20603 , ins( 20604 css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}) 20605 , ins( 20606 css( 20607 vml('roundrect', {arcsize: o.corners}) 20608 , { width: r 20609 , height: o.scale * o.width 20610 , left: o.scale * o.radius 20611 , top: -o.scale * o.width >> 1 20612 , filter: filter 20613 } 20614 ) 20615 , vml('fill', {color: getColor(o.color, i), opacity: o.opacity}) 20616 , vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change 20617 ) 20618 ) 20619 ) 20620 } 20621 20622 if (o.shadow) 20623 for (i = 1; i <= o.lines; i++) { 20624 seg(i, -2, 'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)') 20625 } 20626 20627 for (i = 1; i <= o.lines; i++) seg(i) 20628 return ins(el, g) 20629 } 20630 20631 Spinner.prototype.opacity = function (el, i, val, o) { 20632 var c = el.firstChild 20633 o = o.shadow && o.lines || 0 20634 if (c && i + o < c.childNodes.length) { 20635 c = c.childNodes[i + o]; c = c && c.firstChild; c = c && c.firstChild 20636 if (c) c.opacity = val 20637 } 20638 } 20639 } 20640 20641 if (typeof document !== 'undefined') { 20642 sheet = (function () { 20643 var el = createEl('style', {type : 'text/css'}) 20644 ins(document.getElementsByTagName('head')[0], el) 20645 return el.sheet || el.styleSheet 20646 }()) 20647 20648 var probe = css(createEl('group'), {behavior: 'url(#default#VML)'}) 20649 20650 if (!vendor(probe, 'transform') && probe.adj) initVML() 20651 else useCssAnimations = vendor(probe, 'animation') 20652 } 20653 20654 return Spinner 20655 20656})); 20657 20658 20659/** 20660 * Copyright (c) 2011-2014 Felix Gnass 20661 * Licensed under the MIT license 20662 * http://spin.js.org/ 20663 */ 20664 20665/* 20666 20667Basic Usage: 20668============ 20669 20670$('#el').spin(); // Creates a default Spinner using the text color of #el 20671$('#el').spin({ ... }); // Creates a Spinner using the provided options 20672 20673$('#el').spin(false); // Stops and removes the spinner 20674 20675Using Presets: 20676============== 20677 20678$('#el').spin('small'); // Creates a 'small' Spinner using the text color of #el 20679$('#el').spin('large', '#fff'); // Creates a 'large' white Spinner 20680 20681Adding a custom preset: 20682======================= 20683 20684$.fn.spin.presets.flower = { 20685 lines: 9, 20686 length: 10, 20687 width: 20, 20688 radius: 0 20689}; 20690 20691$('#el').spin('flower', 'red'); 20692 20693*/ 20694 20695;(function(factory) { 20696 20697 if (typeof exports == 'object') { 20698 // CommonJS 20699 factory(require('jquery'), require('spin.js')); 20700 } 20701 else if (typeof redesign.define === 'function' && redesign.define.amd) { 20702 // AMD, register as anonymous module 20703 redesign.define('jquery_spin',['jquery', 'spin'], factory); 20704 } 20705 else { 20706 // Browser globals 20707 if (!window.Spinner) throw new Error('Spin.js not present'); 20708 factory(window.jQuery, window.Spinner); 20709 } 20710 20711}(function($, Spinner) { 20712 20713 $.fn.spin = function(opts, color) { 20714 20715 return this.each(function() { 20716 var $this = $(this); 20717 var data = $this.data(); 20718 20719 if (data.spinner) { 20720 data.spinner.stop(); 20721 delete data.spinner; 20722 } 20723 if (opts !== false) { 20724 opts = $.extend( 20725 { color: color || $this.css('color') }, 20726 $.fn.spin.presets[opts] || opts 20727 ); 20728 data.spinner = new Spinner(opts).spin(this); 20729 } 20730 }); 20731 }; 20732 20733 $.fn.spin.presets = { 20734 tiny: { lines: 8, length: 2, width: 2, radius: 3 }, 20735 small: { lines: 8, length: 4, width: 3, radius: 5 }, 20736 large: { lines: 10, length: 8, width: 4, radius: 8 } 20737 }; 20738 20739})); 20740 20741/*! LAB.js (LABjs :: Loading And Blocking JavaScript) 20742 v2.0.3 (c) Kyle Simpson 20743 MIT License 20744*/ 20745(function(o){var K=o.$LAB,y="UseLocalXHR",z="AlwaysPreserveOrder",u="AllowDuplicates",A="CacheBust",B="BasePath",C=/^[^?#]*\//.exec(location.href)[0],D=/^\w+\:\/\/\/?[^\/]+/.exec(C)[0],i=document.head||document.getElementsByTagName("head"),L=(o.opera&&Object.prototype.toString.call(o.opera)=="[object Opera]")||("MozAppearance"in document.documentElement.style),q=document.createElement("script"),E=typeof q.preload=="boolean",r=E||(q.readyState&&q.readyState=="uninitialized"),F=!r&&q.async===true,M=!r&&!F&&!L;function G(a){return Object.prototype.toString.call(a)=="[object Function]"}function H(a){return Object.prototype.toString.call(a)=="[object Array]"}function N(a,c){var b=/^\w+\:\/\//;if(/^\/\/\/?/.test(a)){a=location.protocol+a}else if(!b.test(a)&&a.charAt(0)!="/"){a=(c||"")+a}return b.test(a)?a:((a.charAt(0)=="/"?D:C)+a)}function s(a,c){for(var b in a){if(a.hasOwnProperty(b)){c[b]=a[b]}}return c}function O(a){var c=false;for(var b=0;b<a.scripts.length;b++){if(a.scripts[b].ready&&a.scripts[b].exec_trigger){c=true;a.scripts[b].exec_trigger();a.scripts[b].exec_trigger=null}}return c}function t(a,c,b,d){a.onload=a.onreadystatechange=function(){if((a.readyState&&a.readyState!="complete"&&a.readyState!="loaded")||c[b])return;a.onload=a.onreadystatechange=null;d()}}function I(a){a.ready=a.finished=true;for(var c=0;c<a.finished_listeners.length;c++){a.finished_listeners[c]()}a.ready_listeners=[];a.finished_listeners=[]}function P(d,f,e,g,h){setTimeout(function(){var a,c=f.real_src,b;if("item"in i){if(!i[0]){setTimeout(arguments.callee,25);return}i=i[0]}a=document.createElement("script");
20745if(f.type)a.type=f.type;if(f.charset)a.charset=f.charset;if(h){if(r){e.elem=a;if(E){a.preload=true;a.onpreload=g}else{a.onreadystatechange=function(){if(a.readyState=="loaded")g()}}a.src=c}else if(h&&c.indexOf(D)==0&&d[y]){b=new XMLHttpRequest();b.onreadystatechange=function(){if(b.readyState==4){b.onreadystatechange=function(){};e.text=b.responseText+"\n//@ sourceURL="+c;g()}};b.open("GET",c);b.send()}else{a.type="text/cache-script";t(a,e,"ready",function(){i.removeChild(a);g()});a.src=c;i.insertBefore(a,i.firstChild)}}else if(F){a.async=false;t(a,e,"finished",g);a.src=c;i.insertBefore(a,i.firstChild)}else{t(a,e,"finished",g);a.src=c;i.insertBefore(a,i.firstChild)}},0)}function J(){var l={},Q=r||M,n=[],p={},m;l[y]=true;l[z]=false;l[u]=false;l[A]=false;l[B]="";function R(a,c,b){var d;function f(){if(d!=null){d=null;I(b)}}if(p[c.src].finished)return;if(!a[u])p[c.src].finished=true;d=b.elem||document.createElement("script");if(c.type)d.type=c.type;if(c.charset)d.charset=c.charset;t(d,b,"finished",f);if(b.elem){b.elem=null}else if(b.text){d.onload=d.onreadystatechange=null;d.text=b.text}else{d.src=c.real_src}i.insertBefore(d,i.firstChild);if(b.text){f()}}function S(c,b,d,f){var e,g,h=function(){b.ready_cb(b,function(){R(c,b,e)})},j=function(){b.finished_cb(b,d)};b.src=N(b.src,c[B]);b.real_src=b.src+(c[A]?((/\?.*$/.test(b.src)?"&_":"?_")+~~(Math.random()*1E9)+"="):"");if(!p[b.src])p[b.src]={items:[],finished:false};g=p[b.src].items;if(c[u]||g.length==0){e=g[g.length]={ready:false,finished:false,ready_listeners:[h],finished_listeners:[j]};P(c,b,e,((f)?function(){e.ready=true;for(var a=0;a<e.ready_listeners.length;a++){e.ready_listeners[a]()}e.ready_listeners=[]}:function(){I(e)}),f)}else{e=g[0];if(e.finished){j()}else{e.finished_listeners.push(j)}}}function v(){var e,g=s(l,{}),h=[],j=0,w=false,k;function T(a,c){a.ready=true;a.exec_trigger=c;x()}function U(a,c){a.ready=a.finished=true;a.exec_trigger=null;for(var b=0;b<c.scripts.length;b++){if(!c.scripts[b].finished)return}c.finished=true;x()}function x(){while(j<h.length){if(G(h[j])){try{h[j++]()}catch(err){}continue}else if(!h[j].finished){if(O(h[j]))continue;break}j++}if(j==h.length){w=false;k=false}}function V(){if(!k||!k.scripts){h.push(k={scripts:[],finished:true})}}e={script:function(){for(var f=0;f<arguments.length;f++){(function(a,c){var b;if(!H(a)){c=[a]}for(var d=0;d<c.length;d++){V();a=c[d];if(G(a))a=a();if(!a)continue;if(H(a)){b=[].slice.call(a);b.unshift(d,1);[].splice.apply(c,b);d--;continue}if(typeof a=="string")a={src:a};a=s(a,{ready:false,ready_cb:T,finished:false,finished_cb:U});k.finished=false;k.scripts.push(a);S(g,a,k,(Q&&w));w=true;if(g[z])e.wait()}})(arguments[f],arguments[f])}return e},wait:function(){if(arguments.length>0){for(var a=0;a<arguments.length;a++){h.push(arguments[a])}k=h[h.length-1]}else k=false;x();return e}};return{script:e.script,wait:e.wait,setOptions:function(a){s(a,g);return e}}}m={setGlobalDefaults:function(a){s(a,l);return m},setOptions:function(){return v().setOptions.apply(null,arguments)},script:function(){return v().script.apply(null,arguments)},wait:function(){return v().wait.apply(null,arguments)},queueScript:function(){n[n.length]={type:"script",args:[].slice.call(arguments)};return m},queueWait:function(){n[n.length]={type:"wait",args:[].slice.call(arguments)};return m},runQueue:function(){var a=m,c=n.length,b=c,d;for(;--b>=0;){d=n.shift();a=a[d.type].apply(null,d.args)}return a},noConflict:function(){o.$LAB=K;return m},sandbox:function(){return J()}};return m}o.$LAB=J();(function(a,c,b){if(document.readyState==null&&document[a]){document.readyState="loading";document[a](c,b=function(){document.removeEventListener(c,b,false);document.readyState="complete"},false)}})("addEventListener","DOMContentLoaded")})(this); 20746redesign.define("base/js/global/lib/LAB", function(){}); 20747 20748/*! Hammer.JS - v2.0.8 - 2016-09-30 20749 * http://hammerjs.github.io/ 20750 * 20751 * Copyright (c) Jorik Tangelder; 20752 * Licensed under the MIT license */ 20753(function(window, document, exportName, undefined) { 20754 20755/** 20756 * @private 20757 * use the val2 when val1 is undefined 20758 * @param {*} val1 20759 * @param {*} val2 20760 * @returns {*} 20761 */ 20762function ifUndefined(val1, val2) { 20763 return val1 === undefined ? val2 : val1; 20764} 20765 20766var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; 20767var TEST_ELEMENT = document.createElement('div'); 20768 20769var TYPE_FUNCTION = 'function'; 20770
20771var round = Math.round; 20772var abs = Math.abs; 20773var now = Date.now; 20774 20775/** 20776 * @private 20777 * get the prefixed property 20778 * @param {Object} obj 20779 * @param {String} property 20780 * @returns {String|Undefined} prefixed 20781 */ 20782function prefixed(obj, property) { 20783 var prefix = void 0; 20784 var prop = void 0; 20785 var camelProp = property[0].toUpperCase() + property.slice(1); 20786 20787 var i = 0; 20788 while (i < VENDOR_PREFIXES.length) { 20789 prefix = VENDOR_PREFIXES[i]; 20790 prop = prefix ? prefix + camelProp : property; 20791 20792 if (prop in obj) { 20793 return prop; 20794 } 20795 i++; 20796 } 20797 return undefined; 20798} 20799 20800function getTouchActionProps() { 20801 if (!NATIVE_TOUCH_ACTION) { 20802 return false; 20803 } 20804 var touchMap = {}; 20805 var cssSupports = window.CSS && window.CSS.supports; 20806 ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) { 20807 20808 // If css.supports is not supported but there is native touch-action assume it supports 20809 // all values. This is the case for IE 10 and 11. 20810 return touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true; 20811 }); 20812 return touchMap; 20813} 20814 20815var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); 20816var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; 20817 20818// magical touchAction value 20819var TOUCH_ACTION_COMPUTE = 'compute'; 20820var TOUCH_ACTION_AUTO = 'auto'; 20821var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented 20822var TOUCH_ACTION_NONE = 'none'; 20823var TOUCH_ACTION_PAN_X = 'pan-x'; 20824var TOUCH_ACTION_PAN_Y = 'pan-y'; 20825var TOUCH_ACTION_MAP = getTouchActionProps(); 20826 20827var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; 20828 20829var SUPPORT_TOUCH = 'ontouchstart' in window; 20830var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; 20831var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); 20832 20833var INPUT_TYPE_TOUCH = 'touch'; 20834var INPUT_TYPE_PEN = 'pen'; 20835var INPUT_TYPE_MOUSE = 'mouse'; 20836var INPUT_TYPE_KINECT = 'kinect'; 20837 20838var COMPUTE_INTERVAL = 25; 20839 20840var INPUT_START = 1; 20841var INPUT_MOVE = 2; 20842var INPUT_END = 4; 20843var INPUT_CANCEL = 8; 20844 20845var DIRECTION_NONE = 1; 20846var DIRECTION_LEFT = 2; 20847var DIRECTION_RIGHT = 4; 20848var DIRECTION_UP = 8; 20849var DIRECTION_DOWN = 16; 20850 20851var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; 20852var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; 20853var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; 20854 20855var PROPS_XY = ['x', 'y']; 20856var PROPS_CLIENT_XY = ['clientX', 'clientY']; 20857 20858var STATE_POSSIBLE = 1; 20859var STATE_BEGAN = 2; 20860var STATE_CHANGED = 4; 20861var STATE_ENDED = 8; 20862var STATE_RECOGNIZED = STATE_ENDED; 20863var STATE_CANCELLED = 16; 20864var STATE_FAILED = 32; 20865 20866/** 20867 * @private 20868 * extend object. 20869 * means that properties in dest will be overwritten by the ones in src. 20870 * @param {Object} target 20871 * @param {...Object} objects_to_assign 20872 * @returns {Object} target 20873 */ 20874var assign = void 0; 20875if (typeof Object.assign !== 'function') { 20876 assign = function assign(target) { 20877 if (target === undefined || target === null) { 20878 throw new TypeError('Cannot convert undefined or null to object'); 20879 } 20880 20881 var output = Object(target); 20882 for (var index = 1; index < arguments.length; index++) { 20883 var source = arguments[index]; 20884 if (source !== undefined && source !== null) { 20885 for (var nextKey in source) { 20886 if (source.hasOwnProperty(nextKey)) { 20887 output[nextKey] = source[nextKey]; 20888 } 20889 } 20890 } 20891 } 20892 return output; 20893 }; 20894} else { 20895 assign = Object.assign; 20896} 20897 20898var assign$1 = assign; 20899 20900/** 20901 * @private 20902 * get a unique id 20903 * @returns {number} uniqueId 20904 */ 20905var _uniqueId = 1; 20906function uniqueId() { 20907 return _uniqueId++; 20908} 20909 20910/** 20911 * @private 20912 * walk objects and arrays 20913 * @param {Object} obj 20914 * @param {Function} iterator 20915 * @param {Object} context 20916 */ 20917function each(obj, iterator, context) { 20918 var i = void 0; 20919 20920 if (!obj) { 20921 return; 20922 } 20923 20924 if (obj.forEach) { 20925 obj.forEach(iterator, context); 20926 } else if (obj.length !== undefined) { 20927 i = 0; 20928 while (i < obj.length) { 20929 iterator.call(context, obj[i], i, obj); 20930 i++; 20931 } 20932 } else { 20933 for (i in obj) { 20934 obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); 20935 } 20936 } 20937} 20938 20939/** 20940 * @private 20941 * if the argument is an array, we want to execute the fn on each entry 20942 * if it aint an array we don't want to do a thing. 20943 * this is used by all the methods that accept a single and array argument. 20944 * @param {*|Array} arg 20945 * @param {String} fn 20946 * @param {Object} [context] 20947 * @returns {Boolean} 20948 */ 20949function invokeArrayArg(arg, fn, context) { 20950 if (Array.isArray(arg)) { 20951 each(arg, context[fn], context); 20952 return true; 20953 } 20954 return false;
20955} 20956 20957/** 20958 * @private 20959 * find if a array contains the object using indexOf or a simple polyFill 20960 * @param {Array} src 20961 * @param {String} find 20962 * @param {String} [findByKey] 20963 * @return {Boolean|Number} false when not found, or the index 20964 */ 20965function inArray(src, find, findByKey) { 20966 if (src.indexOf && !findByKey) { 20967 return src.indexOf(find); 20968 } else { 20969 var i = 0; 20970 while (i < src.length) { 20971 if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) { 20972 // do not use === here, test fails 20973 return i; 20974 } 20975 i++; 20976 } 20977 return -1; 20978 } 20979} 20980 20981var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { 20982 return typeof obj; 20983} : function (obj) { 20984 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 20985}; 20986 20987var asyncGenerator = function () { 20988 function AwaitValue(value) { 20989 this.value = value; 20990 } 20991 20992 function AsyncGenerator(gen) { 20993 var front, back; 20994 20995 function send(key, arg) { 20996 return new Promise(function (resolve, reject) { 20997 var request = { 20998 key: key, 20999 arg: arg, 21000 resolve: resolve, 21001 reject: reject, 21002 next: null 21003 }; 21004 21005 if (back) { 21006 back = back.next = request; 21007 } else { 21008 front = back = request; 21009 resume(key, arg); 21010 } 21011 }); 21012 } 21013 21014 function resume(key, arg) { 21015 try { 21016 var result = gen[key](arg); 21017 var value = result.value; 21018 21019 if (value instanceof AwaitValue) { 21020 Promise.resolve(value.value).then(function (arg) { 21021 resume("next", arg); 21022 }, function (arg) { 21023 resume("throw", arg); 21024 }); 21025 } else { 21026 settle(result.done ? "return" : "normal", result.value); 21027 } 21028 } catch (err) { 21029 settle("throw", err); 21030 } 21031 } 21032 21033 function settle(type, value) { 21034 switch (type) { 21035 case "return": 21036 front.resolve({ 21037 value: value, 21038 done: true 21039 }); 21040 break; 21041 21042 case "throw": 21043 front.reject(value); 21044 break; 21045 21046 default: 21047 front.resolve({ 21048 value: value, 21049 done: false 21050 }); 21051 break; 21052 } 21053 21054 front = front.next; 21055 21056 if (front) { 21057 resume(front.key, front.arg); 21058 } else { 21059 back = null; 21060 } 21061 } 21062 21063 this._invoke = send; 21064 21065 if (typeof gen.return !== "function") { 21066 this.return = undefined; 21067 } 21068 } 21069 21070 if (typeof Symbol === "function" && Symbol.asyncIterator) { 21071 AsyncGenerator.prototype[Symbol.asyncIterator] = function () { 21072 return this; 21073 }; 21074 } 21075 21076 AsyncGenerator.prototype.next = function (arg) { 21077 return this._invoke("next", arg); 21078 }; 21079 21080 AsyncGenerator.prototype.throw = function (arg) { 21081 return this._invoke("throw", arg); 21082 }; 21083 21084 AsyncGenerator.prototype.return = function (arg) { 21085 return this._invoke("return", arg); 21086 }; 21087 21088 return { 21089 wrap: function (fn) { 21090 return function () { 21091 return new AsyncGenerator(fn.apply(this, arguments)); 21092 }; 21093 }, 21094 await: function (value) { 21095 return new AwaitValue(value); 21096 } 21097 }; 21098}(); 21099 21100var classCallCheck = function (instance, Constructor) { 21101 if (!(instance instanceof Constructor)) { 21102 throw new TypeError("Cannot call a class as a function"); 21103 } 21104}; 21105 21106var createClass = function () { 21107 function defineProperties(target, props) { 21108 for (var i = 0; i < props.length; i++) { 21109 var descriptor = props[i]; 21110 descriptor.enumerable = descriptor.enumerable || false; 21111 descriptor.configurable = true; 21112 if ("value" in descriptor) descriptor.writable = true; 21113 Object.defineProperty(target, descriptor.key, descriptor); 21114 } 21115 } 21116 21117 return function (Constructor, protoProps, staticProps) { 21118 if (protoProps) defineProperties(Constructor.prototype, protoProps); 21119 if (staticProps) defineProperties(Constructor, staticProps); 21120 return Constructor; 21121 }; 21122}(); 21123 21124var get = function get(object, property, receiver) { 21125 if (object === null) object = Function.prototype; 21126 var desc = Object.getOwnPropertyDescriptor(object, property); 21127 21128 if (desc === undefined) { 21129 var parent = Object.getPrototypeOf(object); 21130 21131 if (parent === null) { 21132 return undefined; 21133 } else { 21134 return get(parent, property, receiver); 21135 } 21136 } else if ("value" in desc) { 21137 return desc.value; 21138 } else { 21139 var getter = desc.get; 21140 21141 if (getter === undefined) { 21142 return undefined; 21143 } 21144 21145 return getter.call(receiver); 21146 } 21147}; 21148 21149var inherits = function (subClass, superClass) { 21150 if (typeof superClass !== "function" && superClass !== null) { 21151 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); 21152 } 21153 21154 subClass.prototype = Object.create(superClass && superClass.prototype, { 21155 constructor: { 21156 value: subClass, 21157 enumerable: false, 21158 writable: true, 21159 configurable: true 21160 } 21161 }); 21162 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; 21163}; 21164 21165var possibleConstructorReturn = function (self, call) { 21166 if (!self) { 21167 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 21168 } 21169 21170 return call && (typeof call === "object" || typeof call === "function") ? call : self; 21171}; 21172 21173var slicedToArray = function () { 21174 function sliceIterator(arr, i) { 21175 var _arr = []; 21176 var _n = true; 21177 var _d = false;
21178 var _e = undefined; 21179 21180 try { 21181 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { 21182 _arr.push(_s.value); 21183 21184 if (i && _arr.length === i) break; 21185 } 21186 } catch (err) { 21187 _d = true; 21188 _e = err; 21189 } finally { 21190 try { 21191 if (!_n && _i["return"]) _i["return"](); 21192 } finally { 21193 if (_d) throw _e; 21194 } 21195 } 21196 21197 return _arr; 21198 } 21199 21200 return function (arr, i) { 21201 if (Array.isArray(arr)) { 21202 return arr; 21203 } else if (Symbol.iterator in Object(arr)) { 21204 return sliceIterator(arr, i); 21205 } else { 21206 throw new TypeError("Invalid attempt to destructure non-iterable instance"); 21207 } 21208 }; 21209}(); 21210 21211/** 21212 * @private 21213 * let a boolean value also be a function that must return a boolean 21214 * this first item in args will be used as the context 21215 * @param {Boolean|Function} val 21216 * @param {Array} [args] 21217 * @returns {Boolean} 21218 */ 21219function boolOrFn(val, args) { 21220 if ((typeof val === 'undefined' ? 'undefined' : _typeof(val)) === TYPE_FUNCTION) { 21221 return val.apply(args ? args[0] || undefined : undefined, args); 21222 } 21223 return val; 21224} 21225 21226/** 21227 * @private 21228 * get a recognizer by name if it is bound to a manager 21229 * @param {Recognizer|String} otherRecognizer 21230 * @param {Recognizer} recognizer 21231 * @returns {Recognizer} 21232 */ 21233function getRecognizerByNameIfManager(otherRecognizer, recognizer) { 21234 var manager = recognizer.manager; 21235 21236 if (manager) { 21237 return manager.get(otherRecognizer); 21238 } 21239 return otherRecognizer; 21240} 21241 21242/** 21243 * @private 21244 * get a usable string, used as event postfix 21245 * @param {constant} state 21246 * @returns {String} state 21247 */ 21248function stateStr(state) { 21249 if (state & STATE_CANCELLED) { 21250 return 'cancel'; 21251 } else if (state & STATE_ENDED) { 21252 return 'end'; 21253 } else if (state & STATE_CHANGED) { 21254 return 'move'; 21255 } else if (state & STATE_BEGAN) { 21256 return 'start'; 21257 } 21258 return ''; 21259} 21260 21261/** 21262 * @private 21263 * Recognizer flow explained; * 21264 * All recognizers have the initial state of POSSIBLE when a input session starts. 21265 * The definition of a input session is from the first input until the last input, with all it's movement in it. * 21266 * Example session for mouse-input: mousedown -> mousemove -> mouseup 21267 * 21268 * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed 21269 * which determines with state it should be. 21270 * 21271 * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to 21272 * POSSIBLE to give it another change on the next cycle. 21273 * 21274 * Possible 21275 * | 21276 * +-----+---------------+ 21277 * | | 21278 * +-----+-----+ | 21279 * | | | 21280 * Failed Cancelled | 21281 * +-------+------+ 21282 * | | 21283 * Recognized Began 21284 * | 21285 * Changed 21286 * | 21287 * Ended/Recognized 21288 */ 21289 21290/** 21291 * @private 21292 * Recognizer 21293 * Every recognizer needs to extend from this class. 21294 * @constructor 21295 * @param {Object} options 21296 */ 21297 21298var Recognizer = function () { 21299 function Recognizer(options) { 21300 classCallCheck(this, Recognizer); 21301 21302 this.options = assign$1({}, this.defaults, options || {}); 21303 21304 this.id = uniqueId(); 21305 21306 this.manager = null; 21307 21308 // default is enable true 21309 this.options.enable = ifUndefined(this.options.enable, true); 21310 21311 this.state = STATE_POSSIBLE; 21312 this.simultaneous = {}; 21313 this.requireFail = []; 21314 } 21315 21316 /** 21317 * @private 21318 * set options 21319 * @param {Object} options 21320 * @return {Recognizer} 21321 */ 21322 21323 21324 createClass(Recognizer, [{ 21325 key: 'set', 21326 value: function set(options) { 21327 assign$1(this.options, options); 21328 21329 // also update the touchAction, in case something changed about the directions/enabled state 21330 this.manager && this.manager.touchAction.update(); 21331 return this; 21332 } 21333 21334 /** 21335 * @private 21336 * recognize simultaneous with an other recognizer. 21337 * @param {Recognizer} otherRecognizer 21338 * @returns {Recognizer} this 21339 */ 21340 21341 }, { 21342 key: 'recognizeWith', 21343 value: function recognizeWith(otherRecognizer) { 21344 if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { 21345 return this; 21346 } 21347 21348 var simultaneous = this.simultaneous; 21349 21350 otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); 21351 if (!simultaneous[otherRecognizer.id]) { 21352 simultaneous[otherRecognizer.id] = otherRecognizer; 21353 otherRecognizer.recognizeWith(this); 21354 } 21355 return this; 21356 } 21357 21358 /** 21359 * @private 21360 * drop the simultaneous link. it doesnt remove the link on the other recognizer. 21361 * @param {Recognizer} otherRecognizer 21362 * @returns {Recognizer} this 21363 */ 21364 21365 }, { 21366 key: 'dropRecognizeWith', 21367 value: function dropRecognizeWith(otherRecognizer) { 21368 if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { 21369 return this; 21370 } 21371 21372 otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); 21373 delete this.simultaneous[otherRecognizer.id]; 21374 return this; 21375 } 21376 21377 /** 21378 * @private 21379 * recognizer can only run when an other is failing 21380 * @param {Recognizer} otherRecognizer 21381 * @returns {Recognizer} this 21382 */ 21383 21384 }, { 21385 key: 'requireFailure', 21386 value: function requireFailure(otherRecognizer) { 21387 if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { 21388 return this; 21389 } 21390 21391 var requireFail = this.requireFail; 21392 21393 otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); 21394 if (inArray(requireFail, otherRecognizer) === -1) { 21395 requireFail.push(otherRecognizer); 21396 otherRecognizer.requireFailure(this); 21397 } 21398 return this; 21399 } 21400 21401 /** 21402 * @private 21403 * drop the requireFailure link. it does not remove the link on the other recognizer. 21404 * @param {Recognizer} otherRecognizer 21405 * @returns {Recognizer} this 21406 */ 21407 21408 }, { 21409 key: 'dropRequireFailure', 21410 value: function dropRequireFailure(otherRecognizer) { 21411 if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { 21412 return this; 21413 } 21414 21415 otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); 21416 var index = inArray(this.requireFail, otherRecognizer); 21417 if (index > -1) { 21418 this.requireFail.splice(index, 1); 21419 } 21420 return this; 21421 } 21422 21423 /** 21424 * @private 21425 * has require failures boolean 21426 * @returns {boolean} 21427 */ 21428 21429 }, { 21430 key: 'hasRequireFailures', 21431 value: function hasRequireFailures() { 21432 return this.requireFail.length > 0; 21433 } 21434 21435 /** 21436 * @private 21437 * if the recognizer can recognize simultaneous with an other recognizer 21438 * @param {Recognizer} otherRecognizer 21439 * @returns {Boolean} 21440 */ 21441 21442 }, { 21443 key: 'canRecognizeWith', 21444 value: function canRecognizeWith(otherRecognizer) { 21445 return !!this.simultaneous[otherRecognizer.id]; 21446 } 21447 21448 /** 21449 * @private 21450 * You should use `tryEmit` instead of `emit` directly to check 21451 * that all the needed recognizers has failed before emitting. 21452 * @param {Object} input 21453 */ 21454 21455 }, { 21456 key: 'emit', 21457 value: function emit(input) { 21458 var self = this; 21459 var state = this.state; 21460 21461 21462 function emit(event) { 21463 self.manager.emit(event, input); 21464 } 21465 21466 // 'panstart' and 'panmove' 21467 if (state < STATE_ENDED) { 21468 emit(self.options.event + stateStr(state)); 21469 } 21470 21471 emit(self.options.event); // simple 'eventName' events 21472 21473 if (input.additionalEvent) { 21474 // additional event(panleft, panright, pinchin, pinchout...) 21475 emit(input.additionalEvent); 21476 } 21477 21478 // panend and pancancel 21479 if (state >= STATE_ENDED) { 21480 emit(self.options.event + stateStr(state)); 21481 } 21482 } 21483 21484 /** 21485 * @private 21486 * Check that all the require failure recognizers has failed, 21487 * if true, it emits a gesture event, 21488 * otherwise, setup the state to FAILED. 21489 * @param {Object} input 21490 */ 21491 21492 }, { 21493 key: 'tryEmit', 21494 value: function tryEmit(input) { 21495 if (this.canEmit()) {
21496 return this.emit(input); 21497 } 21498 // it's failing anyway 21499 this.state = STATE_FAILED; 21500 } 21501 21502 /** 21503 * @private 21504 * can we emit? 21505 * @returns {boolean} 21506 */ 21507 21508 }, { 21509 key: 'canEmit', 21510 value: function canEmit() { 21511 var i = 0; 21512 while (i < this.requireFail.length) { 21513 if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { 21514 return false; 21515 } 21516 i++; 21517 } 21518 return true; 21519 } 21520 21521 /** 21522 * @private 21523 * update the recognizer 21524 * @param {Object} inputData 21525 */ 21526 21527 }, { 21528 key: 'recognize', 21529 value: function recognize(inputData) { 21530 // make a new copy of the inputData 21531 // so we can change the inputData without messing up the other recognizers 21532 var inputDataClone = assign$1({}, inputData); 21533 21534 // is is enabled and allow recognizing? 21535 if (!boolOrFn(this.options.enable, [this, inputDataClone])) { 21536 this.reset(); 21537 this.state = STATE_FAILED; 21538 return; 21539 } 21540 21541 // reset when we've reached the end 21542 if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { 21543 this.state = STATE_POSSIBLE; 21544 } 21545 21546 this.state = this.process(inputDataClone); 21547 21548 // the recognizer has recognized a gesture 21549 // so trigger an event 21550 if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { 21551 this.tryEmit(inputDataClone); 21552 } 21553 } 21554 21555 /** 21556 * @private 21557 * return the state of the recognizer 21558 * the actual recognizing happens in this method 21559 * @virtual 21560 * @param {Object} inputData 21561 * @returns {constant} STATE 21562 */ 21563 21564 /* jshint ignore:start */ 21565 21566 }, { 21567 key: 'process', 21568 value: function process(inputData) {} 21569 /* jshint ignore:end */ 21570 21571 /** 21572 * @private 21573 * return the preferred touch-action 21574 * @virtual 21575 * @returns {Array} 21576 */ 21577 21578 }, { 21579 key: 'getTouchAction', 21580 value: function getTouchAction() {} 21581 21582 /** 21583 * @private 21584 * called when the gesture isn't allowed to recognize 21585 * like when another is being recognized or it is disabled 21586 * @virtual 21587 */ 21588 21589 }, { 21590 key: 'reset', 21591 value: function reset() {} 21592 }]); 21593 return Recognizer; 21594}(); 21595 21596Recognizer.prototype.defaults = {}; 21597 21598/** 21599 * @private 21600 * This recognizer is just used as a base for the simple attribute recognizers. 21601 * @constructor 21602 * @extends Recognizer 21603 */ 21604 21605var AttrRecognizer = function (_Recognizer) { 21606 inherits(AttrRecognizer, _Recognizer); 21607 21608 function AttrRecognizer() { 21609 classCallCheck(this, AttrRecognizer); 21610 return possibleConstructorReturn(this, (AttrRecognizer.__proto__ || Object.getPrototypeOf(AttrRecognizer)).apply(this, arguments)); 21611 } 21612 21613 /** 21614 * @private 21615 * Used to check if it the recognizer receives valid input, like input.distance > 10. 21616 * @memberof AttrRecognizer 21617 * @param {Object} input 21618 * @returns {Boolean} recognized 21619 */ 21620 21621 21622 createClass(AttrRecognizer, [{ 21623 key: 'attrTest', 21624 value: function attrTest(input) { 21625 var optionPointers = this.options.pointers; 21626 return optionPointers === 0 || input.pointers.length === optionPointers; 21627 } 21628 21629 /** 21630 * @private 21631 * Process the input and return the state for the recognizer 21632 * @memberof AttrRecognizer 21633 * @param {Object} input 21634 * @returns {*} State 21635 */ 21636 21637 }, { 21638 key: 'process', 21639 value: function process(input) { 21640 var state = this.state; 21641 var eventType = input.eventType; 21642 21643 21644 var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); 21645 var isValid = this.attrTest(input); 21646 21647 // on cancel input and we've recognized before, return STATE_CANCELLED 21648 if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { 21649 return state | STATE_CANCELLED; 21650 } else if (isRecognized || isValid) { 21651 if (eventType & INPUT_END) { 21652 return state | STATE_ENDED; 21653 } else if (!(state & STATE_BEGAN)) { 21654 return STATE_BEGAN; 21655 } 21656 return state | STATE_CHANGED; 21657 } 21658 return STATE_FAILED; 21659 } 21660 }]); 21661 return AttrRecognizer; 21662}(Recognizer); 21663 21664AttrRecognizer.prototype.defaults = { 21665 /** 21666 * @private 21667 * @type {Number} 21668 * @default 1 21669 */ 21670 pointers: 1 21671}; 21672 21673/** 21674 * @private 21675 * Rotate
21676 * Recognized when two or more pointer are moving in a circular motion. 21677 * @constructor 21678 * @extends AttrRecognizer 21679 */ 21680 21681var RotateRecognizer = function (_AttrRecognizer) { 21682 inherits(RotateRecognizer, _AttrRecognizer); 21683 21684 function RotateRecognizer() { 21685 classCallCheck(this, RotateRecognizer); 21686 return possibleConstructorReturn(this, (RotateRecognizer.__proto__ || Object.getPrototypeOf(RotateRecognizer)).apply(this, arguments)); 21687 } 21688 21689 createClass(RotateRecognizer, [{ 21690 key: 'getTouchAction', 21691 value: function getTouchAction() { 21692 return [TOUCH_ACTION_NONE]; 21693 } 21694 }, { 21695 key: 'attrTest', 21696 value: function attrTest(input) { 21697 return get(RotateRecognizer.prototype.__proto__ || Object.getPrototypeOf(RotateRecognizer.prototype), 'attrTest', this).call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); 21698 } 21699 }]); 21700 return RotateRecognizer; 21701}(AttrRecognizer); 21702 21703RotateRecognizer.prototype.defaults = { 21704 event: 'rotate', 21705 threshold: 0, 21706 pointers: 2 21707}; 21708 21709/** 21710 * @private 21711 * Pinch
21712 * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). 21713 * @constructor 21714 * @extends AttrRecognizer 21715 */ 21716 21717var PinchRecognizer = function (_AttrRecognizer) { 21718 inherits(PinchRecognizer, _AttrRecognizer); 21719 21720 function PinchRecognizer() { 21721 classCallCheck(this, PinchRecognizer); 21722 return possibleConstructorReturn(this, (PinchRecognizer.__proto__ || Object.getPrototypeOf(PinchRecognizer)).apply(this, arguments)); 21723 } 21724 21725 createClass(PinchRecognizer, [{ 21726 key: 'getTouchAction', 21727 value: function getTouchAction() { 21728 return [TOUCH_ACTION_NONE]; 21729 } 21730 }, { 21731 key: 'attrTest', 21732 value: function attrTest(input) { 21733 return get(PinchRecognizer.prototype.__proto__ || Object.getPrototypeOf(PinchRecognizer.prototype), 'attrTest', this).call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); 21734 } 21735 }, { 21736 key: 'emit', 21737 value: function emit(input) { 21738 if (input.scale !== 1) { 21739 var inOut = input.scale < 1 ? 'in' : 'out'; 21740 input.additionalEvent = this.options.event + inOut; 21741 } 21742 get(PinchRecognizer.prototype.__proto__ || Object.getPrototypeOf(PinchRecognizer.prototype), 'emit', this).call(this, input); 21743 } 21744 }]); 21745 return PinchRecognizer; 21746}(AttrRecognizer); 21747 21748PinchRecognizer.prototype.defaults = { 21749 event: 'pinch', 21750 threshold: 0, 21751 pointers: 2 21752}; 21753 21754/** 21755 * @private 21756 * direction cons to string 21757 * @param {constant} direction 21758 * @returns {String} 21759 */ 21760function directionStr(direction) { 21761 if (direction === DIRECTION_DOWN) { 21762 return 'down'; 21763 } else if (direction === DIRECTION_UP) { 21764 return 'up'; 21765 } else if (direction === DIRECTION_LEFT) { 21766 return 'left'; 21767 } else if (direction === DIRECTION_RIGHT) { 21768 return 'right'; 21769 } 21770 return ''; 21771} 21772 21773/** 21774 * @private 21775 * Pan
21776 * Recognized when the pointer is down and moved in the allowed direction. 21777 * @constructor 21778 * @extends AttrRecognizer 21779 */ 21780 21781var PanRecognizer = function (_AttrRecognizer) { 21782 inherits(PanRecognizer, _AttrRecognizer); 21783 21784 function PanRecognizer() { 21785 classCallCheck(this, PanRecognizer); 21786 21787 var _this = possibleConstructorReturn(this, (PanRecognizer.__proto__ || Object.getPrototypeOf(PanRecognizer)).apply(this, arguments)); 21788 21789 _this.pX = null; 21790 _this.pY = null; 21791 return _this; 21792 } 21793 21794 createClass(PanRecognizer, [{ 21795 key: 'getTouchAction', 21796 value: function getTouchAction() { 21797 var direction = this.options.direction; 21798 21799 var actions = []; 21800 if (direction & DIRECTION_HORIZONTAL) { 21801 actions.push(TOUCH_ACTION_PAN_Y); 21802 } 21803 if (direction & DIRECTION_VERTICAL) { 21804 actions.push(TOUCH_ACTION_PAN_X); 21805 } 21806 return actions; 21807 } 21808 }, { 21809 key: 'directionTest', 21810 value: function directionTest(input) { 21811 var options = this.options; 21812 21813 var hasMoved = true; 21814 var distance = input.distance; 21815 var direction = input.direction; 21816 21817 var x = input.deltaX; 21818 var y = input.deltaY; 21819 21820 // lock to axis? 21821 if (!(direction & options.direction)) { 21822 if (options.direction & DIRECTION_HORIZONTAL) { 21823 direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; 21824 hasMoved = x !== this.pX; 21825 distance = Math.abs(input.deltaX); 21826 } else { 21827 direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN; 21828 hasMoved = y !== this.pY; 21829 distance = Math.abs(input.deltaY); 21830 } 21831 } 21832 input.direction = direction; 21833 return hasMoved && distance > options.threshold && direction & options.direction; 21834 } 21835 }, { 21836 key: 'attrTest', 21837 value: function attrTest(input) { 21838 return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call 21839 this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input)); 21840 } 21841 }, { 21842 key: 'emit', 21843 value: function emit(input) { 21844 21845 this.pX = input.deltaX; 21846 this.pY = input.deltaY; 21847 21848 var direction = directionStr(input.direction); 21849 21850 if (direction) { 21851 input.additionalEvent = this.options.event + direction; 21852 } 21853 get(PanRecognizer.prototype.__proto__ || Object.getPrototypeOf(PanRecognizer.prototype), 'emit', this).call(this, input); 21854 } 21855 }]); 21856 return PanRecognizer; 21857}(AttrRecognizer); 21858 21859PanRecognizer.prototype.defaults = { 21860 event: 'pan', 21861 threshold: 10, 21862 pointers: 1, 21863 direction: DIRECTION_ALL 21864}; 21865 21866/** 21867 * @private 21868 * Swipe
21869 * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. 21870 * @constructor 21871 * @extends AttrRecognizer 21872 */ 21873 21874var SwipeRecognizer = function (_AttrRecognizer) { 21875 inherits(SwipeRecognizer, _AttrRecognizer); 21876 21877 function SwipeRecognizer() { 21878 classCallCheck(this, SwipeRecognizer); 21879 return possibleConstructorReturn(this, (SwipeRecognizer.__proto__ || Object.getPrototypeOf(SwipeRecognizer)).apply(this, arguments)); 21880 } 21881 21882 createClass(SwipeRecognizer, [{ 21883 key: 'getTouchAction', 21884 value: function getTouchAction() { 21885 return PanRecognizer.prototype.getTouchAction.call(this); 21886 } 21887 }, { 21888 key: 'attrTest', 21889 value: function attrTest(input) { 21890 var direction = this.options.direction; 21891 21892 var velocity = void 0; 21893 21894 if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { 21895 velocity = input.overallVelocity; 21896 } else if (direction & DIRECTION_HORIZONTAL) { 21897 velocity = input.overallVelocityX; 21898 } else if (direction & DIRECTION_VERTICAL) { 21899 velocity = input.overallVelocityY; 21900 } 21901 21902 return get(SwipeRecognizer.prototype.__proto__ || Object.getPrototypeOf(SwipeRecognizer.prototype), 'attrTest', this).call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END; 21903 } 21904 }, { 21905 key: 'emit', 21906 value: function emit(input) { 21907 var direction = directionStr(input.offsetDirection); 21908 if (direction) { 21909 this.manager.emit(this.options.event + direction, input); 21910 } 21911 21912 this.manager.emit(this.options.event, input); 21913 } 21914 }]); 21915 return SwipeRecognizer; 21916}(AttrRecognizer); 21917 21918SwipeRecognizer.prototype.defaults = { 21919 event: 'swipe', 21920 threshold: 10, 21921 velocity: 0.3, 21922 direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, 21923 pointers: 1 21924}; 21925 21926/** 21927 * @private 21928 * simple function bind 21929 * @param {Function} fn 21930 * @param {Object} context 21931 * @returns {Function} 21932 */ 21933function bindFn(fn, context) { 21934 return function boundFn() { 21935 return fn.apply(context, arguments); 21936 }; 21937} 21938 21939/** 21940 * @private 21941 * set a timeout with a given scope 21942 * @param {Function} fn 21943 * @param {Number} timeout 21944 * @param {Object} context 21945 * @returns {number} 21946 */ 21947function setTimeoutContext(fn, timeout, context) { 21948 return setTimeout(bindFn(fn, context), timeout); 21949} 21950 21951/** 21952 * @private 21953 * calculate the absolute distance between two points 21954 * @param {Object} p1 {x, y} 21955 * @param {Object} p2 {x, y} 21956 * @param {Array} [props] containing x and y keys 21957 * @return {Number} distance 21958 */ 21959function getDistance(p1, p2, props) { 21960 if (!props) { 21961 props = PROPS_XY; 21962 } 21963 var x = p2[props[0]] - p1[props[0]]; 21964 var y = p2[props[1]] - p1[props[1]]; 21965 21966 return Math.sqrt(x * x + y * y); 21967} 21968 21969/** 21970 * @private 21971 * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur 21972 * between the given interval and position. The delay option can be used to recognize multi-taps without firing 21973 * a single tap. 21974 * 21975 * The eventData from the emitted event contains the property `tapCount`, which contains the amount of 21976 * multi-taps being recognized. 21977 * @constructor 21978 * @extends Recognizer 21979 */ 21980 21981var TapRecognizer = function (_Recognizer) { 21982 inherits(TapRecognizer, _Recognizer); 21983 21984 function TapRecognizer() { 21985 classCallCheck(this, TapRecognizer); 21986 21987 // previous time and center, 21988 // used for tap counting 21989 var _this = possibleConstructorReturn(this, (TapRecognizer.__proto__ || Object.getPrototypeOf(TapRecognizer)).apply(this, arguments)); 21990 21991 _this.pTime = false; 21992 _this.pCenter = false; 21993 21994 _this._timer = null; 21995 _this._input = null; 21996 _this.count = 0; 21997 return _this; 21998 } 21999 22000 createClass(TapRecognizer, [{ 22001 key: 'getTouchAction', 22002 value: function getTouchAction() { 22003 return [TOUCH_ACTION_MANIPULATION]; 22004 } 22005 }, { 22006 key: 'process', 22007 value: function process(input) { 22008 var _this2 = this; 22009 22010 var options = this.options; 22011 22012 22013 var validPointers = input.pointers.length === options.pointers;
22014 var validMovement = input.distance < options.threshold; 22015 var validTouchTime = input.deltaTime < options.time; 22016 22017 this.reset(); 22018 22019 if (input.eventType & INPUT_START && this.count === 0) { 22020 return this.failTimeout(); 22021 } 22022 22023 // we only allow little movement 22024 // and we've reached an end event, so a tap is possible 22025 if (validMovement && validTouchTime && validPointers) { 22026 if (input.eventType !== INPUT_END) { 22027 return this.failTimeout(); 22028 } 22029 22030 var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true; 22031 var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; 22032 22033 this.pTime = input.timeStamp; 22034 this.pCenter = input.center; 22035 22036 if (!validMultiTap || !validInterval) { 22037 this.count = 1; 22038 } else { 22039 this.count += 1; 22040 } 22041 22042 this._input = input; 22043 22044 // if tap count matches we have recognized it, 22045 // else it has began recognizing... 22046 var tapCount = this.count % options.taps; 22047 if (tapCount === 0) { 22048 // no failing requirements, immediately trigger the tap event 22049 // or wait as long as the multitap interval to trigger 22050 if (!this.hasRequireFailures()) { 22051 return STATE_RECOGNIZED; 22052 } else { 22053 this._timer = setTimeoutContext(function () { 22054 _this2.state = STATE_RECOGNIZED; 22055 _this2.tryEmit(); 22056 }, options.interval, this); 22057 return STATE_BEGAN; 22058 } 22059 } 22060 } 22061 return STATE_FAILED; 22062 } 22063 }, { 22064 key: 'failTimeout', 22065 value: function failTimeout() { 22066 var _this3 = this; 22067 22068 this._timer = setTimeoutContext(function () { 22069 _this3.state = STATE_FAILED; 22070 }, this.options.interval, this); 22071 return STATE_FAILED; 22072 } 22073 }, { 22074 key: 'reset', 22075 value: function reset() { 22076 clearTimeout(this._timer); 22077 } 22078 }, { 22079 key: 'emit', 22080 value: function emit() { 22081 if (this.state === STATE_RECOGNIZED) { 22082 this._input.tapCount = this.count; 22083 this.manager.emit(this.options.event, this._input); 22084 } 22085 } 22086 }]); 22087 return TapRecognizer; 22088}(Recognizer); 22089 22090TapRecognizer.prototype.defaults = { 22091 event: 'tap', 22092 pointers: 1, 22093 taps: 1, 22094 interval: 300, // max time between the multi-tap taps 22095 time: 250, // max time of the pointer to be down (like finger on the screen) 22096 threshold: 9, // a minimal movement is ok, but keep it low 22097 posThreshold: 10 // a multi-tap can be a bit off the initial position 22098}; 22099 22100/** 22101 * @private 22102 * Press
22103 * Recognized when the pointer is down for x ms without any movement. 22104 * @constructor 22105 * @extends Recognizer 22106 */ 22107 22108var PressRecognizer = function (_Recognizer) { 22109 inherits(PressRecognizer, _Recognizer); 22110 22111 function PressRecognizer() { 22112 classCallCheck(this, PressRecognizer); 22113 22114 var _this = possibleConstructorReturn(this, (PressRecognizer.__proto__ || Object.getPrototypeOf(PressRecognizer)).apply(this, arguments)); 22115 22116 _this._timer = null; 22117 _this._input = null; 22118 return _this; 22119 } 22120 22121 createClass(PressRecognizer, [{ 22122 key: 'getTouchAction', 22123 value: function getTouchAction() { 22124 return [TOUCH_ACTION_AUTO]; 22125 } 22126 }, { 22127 key: 'process', 22128 value: function process(input) { 22129 var _this2 = this; 22130 22131 var options = this.options; 22132 22133 var validPointers = input.pointers.length === options.pointers; 22134 var validMovement = input.distance < options.threshold; 22135 var validTime = input.deltaTime > options.time; 22136 22137 this._input = input; 22138 22139 // we only allow little movement 22140 // and we've reached an end event, so a tap is possible 22141 if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) { 22142 this.reset(); 22143 } else if (input.eventType & INPUT_START) { 22144 this.reset(); 22145 this._timer = setTimeoutContext(function () { 22146 _this2.state = STATE_RECOGNIZED; 22147 _this2.tryEmit(); 22148 }, options.time, this); 22149 } else if (input.eventType & INPUT_END) { 22150 return STATE_RECOGNIZED; 22151 } 22152 return STATE_FAILED; 22153 } 22154 }, { 22155 key: 'reset', 22156 value: function reset() { 22157 clearTimeout(this._timer); 22158 } 22159 }, { 22160 key: 'emit', 22161 value: function emit(input) { 22162 if (this.state !== STATE_RECOGNIZED) { 22163 return; 22164 } 22165 22166 if (input && input.eventType & INPUT_END) { 22167 this.manager.emit(this.options.event + 'up', input); 22168 } else { 22169 this._input.timeStamp = now(); 22170 this.manager.emit(this.options.event, this._input); 22171 } 22172 } 22173 }]); 22174 return PressRecognizer; 22175}(Recognizer); 22176 22177PressRecognizer.prototype.defaults = { 22178 event: 'press', 22179 pointers: 1, 22180 time: 251, // minimal time of the pointer to be pressed 22181 threshold: 9 // a minimal movement is ok, but keep it low 22182}; 22183 22184/** 22185 * @private 22186 * small indexOf wrapper 22187 * @param {String} str 22188 * @param {String} find 22189 * @returns {Boolean} found 22190 */ 22191function inStr(str, find) { 22192 return str.indexOf(find) > -1; 22193} 22194 22195/** 22196 * @private 22197 * when the touchActions are collected they are not a valid value, so we need to clean things up. * 22198 * @param {String} actions 22199 * @returns {*} 22200 */ 22201function cleanTouchActions(actions) { 22202 // none 22203 if (inStr(actions, TOUCH_ACTION_NONE)) { 22204 return TOUCH_ACTION_NONE; 22205 } 22206 22207 var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); 22208 var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); 22209 22210 // if both pan-x and pan-y are set (different recognizers 22211 // for different directions, e.g. horizontal pan but vertical swipe?) 22212 // we need none (as otherwise with pan-x pan-y combined none of these 22213 // recognizers will work, since the browser would handle all panning 22214 if (hasPanX && hasPanY) { 22215 return TOUCH_ACTION_NONE; 22216 } 22217 22218 // pan-x OR pan-y 22219 if (hasPanX || hasPanY) { 22220 return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; 22221 } 22222 22223 // manipulation 22224 if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { 22225 return TOUCH_ACTION_MANIPULATION; 22226 } 22227 22228 return TOUCH_ACTION_AUTO; 22229} 22230 22231/** 22232 * @private 22233 * Touch Action 22234 * sets the touchAction property or uses the js alternative 22235 * @param {Manager} manager 22236 * @param {String} value 22237 * @constructor 22238 */ 22239 22240var TouchAction = function () { 22241 function TouchAction(manager, value) { 22242 classCallCheck(this, TouchAction); 22243 22244 this.manager = manager; 22245 this.set(value); 22246 } 22247 22248 /** 22249 * @private 22250 * set the touchAction value on the element or enable the polyfill 22251 * @param {String} value 22252 */ 22253 22254 22255 createClass(TouchAction, [{ 22256 key: 'set', 22257 value: function set(value) { 22258 // find out the touch-action by the event handlers 22259 if (value === TOUCH_ACTION_COMPUTE) { 22260 value = this.compute(); 22261 } 22262 22263 if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { 22264 this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; 22265 } 22266 this.actions = value.toLowerCase().trim(); 22267 } 22268 22269 /** 22270 * @private 22271 * just re-set the touchAction value 22272 */ 22273 22274 }, { 22275 key: 'update',
vendor: 11,577 bytes, lines 22276-22708
22276 value: function update() { 22277 this.set(this.manager.options.touchAction); 22278 } 22279 22280 /** 22281 * @private 22282 * compute the value for the touchAction property based on the recognizer's settings 22283 * @returns {String} value 22284 */ 22285 22286 }, { 22287 key: 'compute', 22288 value: function compute() { 22289 var actions = []; 22290 each(this.manager.recognizers, function (recognizer) { 22291 if (boolOrFn(recognizer.options.enable, [recognizer])) { 22292 actions = actions.concat(recognizer.getTouchAction()); 22293 } 22294 }); 22295 return cleanTouchActions(actions.join(' ')); 22296 } 22297 22298 /** 22299 * @private 22300 * this method is called on each input cycle and provides the preventing of the browser behavior 22301 * @param {Object} input 22302 */ 22303 22304 }, { 22305 key: 'preventDefaults', 22306 value: function preventDefaults(input) { 22307 var srcEvent = input.srcEvent; 22308 22309 var direction = input.offsetDirection; 22310 22311 // if the touch action did prevented once this session 22312 if (this.manager.session.prevented) { 22313 srcEvent.preventDefault(); 22314 return; 22315 } 22316 22317 var actions = this.actions; 22318 22319 var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; 22320 var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; 22321 var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; 22322 22323 if (hasNone) { 22324 // do not prevent defaults if this is a tap gesture 22325 var isTapPointer = input.pointers.length === 1; 22326 var isTapMovement = input.distance < 2; 22327 var isTapTouchTime = input.deltaTime < 250; 22328 22329 if (isTapPointer && isTapMovement && isTapTouchTime) { 22330 return; 22331 } 22332 } 22333 22334 if (hasPanX && hasPanY) { 22335 // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent 22336 return; 22337 } 22338 22339 if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) { 22340 return this.preventSrc(srcEvent); 22341 } 22342 } 22343 22344 /** 22345 * @private 22346 * call preventDefault to prevent the browser's default behavior (scrolling in most cases) 22347 * @param {Object} srcEvent 22348 */ 22349 22350 }, { 22351 key: 'preventSrc', 22352 value: function preventSrc(srcEvent) { 22353 this.manager.session.prevented = true; 22354 srcEvent.preventDefault(); 22355 } 22356 }]); 22357 return TouchAction; 22358}(); 22359 22360/** 22361 * @private 22362 * find if a node is in the given parent 22363 * @method hasParent 22364 * @param {HTMLElement} node 22365 * @param {HTMLElement} parent 22366 * @return {Boolean} found 22367 */ 22368function hasParent(node, parent) { 22369 while (node) { 22370 if (node === parent) { 22371 return true; 22372 } 22373 node = node.parentNode; 22374 } 22375 return false; 22376} 22377 22378/** 22379 * @private 22380 * get the center of all the pointers 22381 * @param {Array} pointers 22382 * @return {Object} center contains `x` and `y` properties 22383 */ 22384function getCenter(pointers) { 22385 var pointersLength = pointers.length; 22386 22387 // no need to loop when only one touch 22388 if (pointersLength === 1) { 22389 return { 22390 x: round(pointers[0].clientX), 22391 y: round(pointers[0].clientY) 22392 }; 22393 } 22394 22395 var x = 0; 22396 var y = 0; 22397 var i = 0; 22398 while (i < pointersLength) { 22399 x += pointers[i].clientX; 22400 y += pointers[i].clientY; 22401 i++; 22402 } 22403 22404 return { 22405 x: round(x / pointersLength), 22406 y: round(y / pointersLength) 22407 }; 22408} 22409 22410/** 22411 * @private 22412 * create a simple clone from the input used for storage of firstInput and firstMultiple 22413 * @param {Object} input 22414 * @returns {Object} clonedInputData 22415 */ 22416function simpleCloneInputData(input) { 22417 // make a simple copy of the pointers because we will get a reference if we don't 22418 // we only need clientXY for the calculations 22419 var pointers = []; 22420 var i = 0; 22421 while (i < input.pointers.length) { 22422 pointers[i] = { 22423 clientX: round(input.pointers[i].clientX), 22424 clientY: round(input.pointers[i].clientY) 22425 }; 22426 i++; 22427 } 22428 22429 return { 22430 timeStamp: now(), 22431 pointers: pointers, 22432 center: getCenter(pointers), 22433 deltaX: input.deltaX, 22434 deltaY: input.deltaY 22435 }; 22436} 22437 22438/** 22439 * @private 22440 * calculate the angle between two coordinates 22441 * @param {Object} p1 22442 * @param {Object} p2 22443 * @param {Array} [props] containing x and y keys 22444 * @return {Number} angle 22445 */ 22446function getAngle(p1, p2, props) { 22447 if (!props) { 22448 props = PROPS_XY; 22449 } 22450 var x = p2[props[0]] - p1[props[0]]; 22451 var y = p2[props[1]] - p1[props[1]]; 22452 return Math.atan2(y, x) * 180 / Math.PI; 22453} 22454 22455/** 22456 * @private 22457 * get the direction between two points 22458 * @param {Number} x 22459 * @param {Number} y 22460 * @return {Number} direction 22461 */ 22462function getDirection(x, y) { 22463 if (x === y) { 22464 return DIRECTION_NONE; 22465 } 22466 22467 if (abs(x) >= abs(y)) { 22468 return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; 22469 } 22470 return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; 22471} 22472 22473function computeDeltaXY(session, input) { 22474 var center = input.center; 22475 // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session; 22476 // jscs throwing error on defalut destructured values and without defaults tests fail 22477 22478 var offset = session.offsetDelta || {}; 22479 var prevDelta = session.prevDelta || {}; 22480 var prevInput = session.prevInput || {}; 22481 22482 if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { 22483 prevDelta = session.prevDelta = { 22484 x: prevInput.deltaX || 0, 22485 y: prevInput.deltaY || 0 22486 }; 22487 22488 offset = session.offsetDelta = { 22489 x: center.x, 22490 y: center.y 22491 }; 22492 } 22493 22494 input.deltaX = prevDelta.x + (center.x - offset.x); 22495 input.deltaY = prevDelta.y + (center.y - offset.y); 22496} 22497 22498/** 22499 * @private 22500 * calculate the velocity between two points. unit is in px per ms. 22501 * @param {Number} deltaTime 22502 * @param {Number} x 22503 * @param {Number} y 22504 * @return {Object} velocity `x` and `y` 22505 */ 22506function getVelocity(deltaTime, x, y) { 22507 return { 22508 x: x / deltaTime || 0, 22509 y: y / deltaTime || 0 22510 }; 22511} 22512 22513/** 22514 * @private 22515 * calculate the scale factor between two pointersets 22516 * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out 22517 * @param {Array} start array of pointers 22518 * @param {Array} end array of pointers 22519 * @return {Number} scale 22520 */ 22521function getScale(start, end) { 22522 return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); 22523} 22524 22525/** 22526 * @private 22527 * calculate the rotation degrees between two pointersets 22528 * @param {Array} start array of pointers 22529 * @param {Array} end array of pointers 22530 * @return {Number} rotation 22531 */ 22532function getRotation(start, end) { 22533 return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); 22534} 22535 22536/** 22537 * @private 22538 * velocity is calculated every x ms 22539 * @param {Object} session 22540 * @param {Object} input 22541 */ 22542function computeIntervalInputData(session, input) { 22543 var last = session.lastInterval || input; 22544 var deltaTime = input.timeStamp - last.timeStamp; 22545 var velocity = void 0; 22546 var velocityX = void 0; 22547 var velocityY = void 0; 22548 var direction = void 0; 22549 22550 if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { 22551 var deltaX = input.deltaX - last.deltaX; 22552 var deltaY = input.deltaY - last.deltaY; 22553 22554 var v = getVelocity(deltaTime, deltaX, deltaY); 22555 velocityX = v.x; 22556 velocityY = v.y; 22557 velocity = abs(v.x) > abs(v.y) ? v.x : v.y; 22558 direction = getDirection(deltaX, deltaY); 22559 22560 session.lastInterval = input; 22561 } else { 22562 // use latest velocity info if it doesn't overtake a minimum period 22563 velocity = last.velocity; 22564 velocityX = last.velocityX; 22565 velocityY = last.velocityY; 22566 direction = last.direction; 22567 } 22568 22569 input.velocity = velocity; 22570 input.velocityX = velocityX; 22571 input.velocityY = velocityY; 22572 input.direction = direction; 22573} 22574 22575/** 22576* @private 22577 * extend the data with some usable properties like scale, rotate, velocity etc 22578 * @param {Object} manager 22579 * @param {Object} input 22580 */ 22581function computeInputData(manager, input) { 22582 var session = manager.session; 22583 var pointers = input.pointers; 22584 var pointersLength = pointers.length; 22585 22586 // store the first input to calculate the distance and direction 22587 22588 if (!session.firstInput) { 22589 session.firstInput = simpleCloneInputData(input); 22590 } 22591 22592 // to compute scale and rotation we need to store the multiple touches 22593 if (pointersLength > 1 && !session.firstMultiple) { 22594 session.firstMultiple = simpleCloneInputData(input); 22595 } else if (pointersLength === 1) { 22596 session.firstMultiple = false; 22597 } 22598 22599 var firstInput = session.firstInput; 22600 var firstMultiple = session.firstMultiple; 22601 22602 var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; 22603 22604 var center = input.center = getCenter(pointers); 22605 input.timeStamp = now(); 22606 input.deltaTime = input.timeStamp - firstInput.timeStamp; 22607 22608 input.angle = getAngle(offsetCenter, center); 22609 input.distance = getDistance(offsetCenter, center); 22610 22611 computeDeltaXY(session, input); 22612 input.offsetDirection = getDirection(input.deltaX, input.deltaY); 22613 22614 var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); 22615 input.overallVelocityX = overallVelocity.x; 22616 input.overallVelocityY = overallVelocity.y; 22617 input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y; 22618 22619 input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; 22620 input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; 22621 22622 input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers; 22623 22624 computeIntervalInputData(session, input); 22625 22626 // find the correct target 22627 var target = manager.element; 22628 if (hasParent(input.srcEvent.target, target)) { 22629 target = input.srcEvent.target; 22630 } 22631 input.target = target; 22632} 22633 22634/** 22635 * @private 22636 * handle input events 22637 * @param {Manager} manager 22638 * @param {String} eventType 22639 * @param {Object} input 22640 */ 22641function inputHandler(manager, eventType, input) { 22642 var pointersLen = input.pointers.length; 22643 var changedPointersLen = input.changedPointers.length; 22644 var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0; 22645 var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0; 22646 22647 input.isFirst = !!isFirst; 22648 input.isFinal = !!isFinal; 22649 22650 if (isFirst) { 22651 manager.session = {}; 22652 } 22653 22654 // source event is the normalized value of the domEvents 22655 // like 'touchstart, mouseup, pointerdown' 22656 input.eventType = eventType; 22657 22658 // compute scale, rotation etc 22659 computeInputData(manager, input); 22660 22661 // emit secret event 22662 manager.emit('hammer.input', input); 22663 22664 manager.recognize(input); 22665 manager.session.prevInput = input; 22666} 22667 22668/** 22669 * @private 22670 * split string on whitespace 22671 * @param {String} str 22672 * @returns {Array} words 22673 */ 22674 22675function splitStr(str) { 22676 return str.trim().split(/\s+/g); 22677} 22678 22679/** 22680 * @private 22681 * addEventListener with multiple events at once 22682 * @param {EventTarget} target 22683 * @param {String} types 22684 * @param {Function} handler 22685 */ 22686function addEventListeners(target, types, handler) { 22687 each(splitStr(types), function (type) { 22688 target.addEventListener(type, handler, false); 22689 }); 22690} 22691 22692/** 22693 * @private 22694 * removeEventListener with multiple events at once 22695 * @param {EventTarget} target 22696 * @param {String} types 22697 * @param {Function} handler 22698 */ 22699function removeEventListeners(target, types, handler) { 22700 each(splitStr(types), function (type) { 22701 target.removeEventListener(type, handler, false); 22702 }); 22703} 22704 22705/** 22706 * @private 22707 * get the window object of an element 22708 * @param {HTMLElement} element
22709 * @returns {DocumentView|Window} 22710 */ 22711function getWindowForElement(element) { 22712 var doc = element.ownerDocument || element; 22713 return doc.defaultView || doc.parentWindow || window; 22714} 22715 22716/** 22717 * @private 22718 * create new input type manager 22719 * @param {Manager} manager 22720 * @param {Function} callback 22721 * @returns {Input} 22722 * @constructor 22723 */ 22724 22725var Input = function () { 22726 function Input(manager, callback) { 22727 classCallCheck(this, Input); 22728 22729 var self = this; 22730 this.manager = manager; 22731 this.callback = callback; 22732 this.element = manager.element; 22733 this.target = manager.options.inputTarget; 22734 22735 // smaller wrapper around the handler, for the scope and the enabled state of the manager, 22736 // so when disabled the input events are completely bypassed. 22737 this.domHandler = function (ev) { 22738 if (boolOrFn(manager.options.enable, [manager])) { 22739 self.handler(ev); 22740 } 22741 }; 22742 22743 this.init(); 22744 } 22745 /** 22746 * @private 22747 * should handle the inputEvent data and trigger the callback 22748 * @virtual 22749 */ 22750 22751 22752 createClass(Input, [{ 22753 key: 'handler', 22754 value: function handler() {} 22755 22756 /** 22757 * @private 22758 * bind the events 22759 */ 22760 22761 }, { 22762 key: 'init', 22763 value: function init() { 22764 this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); 22765 this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); 22766 this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); 22767 } 22768 22769 /** 22770 * @private 22771 * unbind the events 22772 */ 22773 22774 }, { 22775 key: 'destroy', 22776 value: function destroy() { 22777 this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); 22778 this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); 22779 this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); 22780 } 22781 }]); 22782 return Input; 22783}(); 22784 22785var POINTER_INPUT_MAP = { 22786 pointerdown: INPUT_START, 22787 pointermove: INPUT_MOVE, 22788 pointerup: INPUT_END, 22789 pointercancel: INPUT_CANCEL, 22790 pointerout: INPUT_CANCEL 22791}; 22792 22793// in IE10 the pointer types is defined as an enum 22794var IE10_POINTER_TYPE_ENUM = { 22795 2: INPUT_TYPE_TOUCH, 22796 3: INPUT_TYPE_PEN, 22797 4: INPUT_TYPE_MOUSE, 22798 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 22799}; 22800 22801var POINTER_ELEMENT_EVENTS = 'pointerdown'; 22802var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; 22803 22804// IE10 has prefixed support, and case-sensitive 22805if (window.MSPointerEvent && !window.PointerEvent) { 22806 POINTER_ELEMENT_EVENTS = 'MSPointerDown'; 22807 POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; 22808} 22809 22810/** 22811 * @private 22812 * Pointer events input 22813 * @constructor 22814 * @extends Input 22815 */ 22816 22817var PointerEventInput = function (_Input) { 22818 inherits(PointerEventInput, _Input); 22819 22820 function PointerEventInput() { 22821 classCallCheck(this, PointerEventInput); 22822 22823 var _this = possibleConstructorReturn(this, (PointerEventInput.__proto__ || Object.getPrototypeOf(PointerEventInput)).apply(this, arguments)); 22824 22825 _this.evEl = POINTER_ELEMENT_EVENTS; 22826 _this.evWin = POINTER_WINDOW_EVENTS; 22827 22828 _this.store = _this.manager.session.pointerEvents = []; 22829 return _this; 22830 } 22831 22832 /** 22833 * @private 22834 * handle mouse events 22835 * @param {Object} ev 22836 */ 22837 22838 22839 createClass(PointerEventInput, [{ 22840 key: 'handler', 22841 value: function handler(ev) { 22842 var store = this.store; 22843 22844 var removePointer = false; 22845 22846 var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); 22847 var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; 22848 var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; 22849 22850 var isTouch = pointerType === INPUT_TYPE_TOUCH; 22851 22852 // get index of the event in the store 22853 var storeIndex = inArray(store, ev.pointerId, 'pointerId'); 22854 22855 // start and mouse must be down 22856 if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { 22857 if (storeIndex < 0) { 22858 store.push(ev); 22859 storeIndex = store.length - 1; 22860 } 22861 } else if (eventType & (INPUT_END | INPUT_CANCEL)) { 22862 removePointer = true; 22863 } 22864 22865 // it not found, so the pointer hasn't been down (so it's probably a hover) 22866 if (storeIndex < 0) { 22867 return; 22868 } 22869 22870 // update the event in the store 22871 store[storeIndex] = ev; 22872 22873 this.callback(this.manager, eventType, { 22874 pointers: store, 22875 changedPointers: [ev], 22876 pointerType: pointerType, 22877 srcEvent: ev 22878 }); 22879 22880 if (removePointer) { 22881 // remove from the store 22882 store.splice(storeIndex, 1); 22883 } 22884 } 22885 }]); 22886 return PointerEventInput; 22887}(Input); 22888 22889/** 22890 * @private 22891 * convert array-like objects to real arrays 22892 * @param {Object} obj 22893 * @returns {Array} 22894 */ 22895function toArray$1(obj) { 22896 return Array.prototype.slice.call(obj, 0); 22897} 22898 22899/** 22900 * @private 22901 * unique array with objects based on a key (like 'id') or just by the array's value 22902 * @param {Array} src [{id:1},{id:2},{id:1}] 22903 * @param {String} [key] 22904 * @param {Boolean} [sort=False] 22905 * @returns {Array} [{id:1},{id:2}
22905] 22906 */ 22907function uniqueArray(src, key, sort) { 22908 var results = []; 22909 var values = []; 22910 var i = 0; 22911 22912 while (i < src.length) { 22913 var val = key ? src[i][key] : src[i]; 22914 if (inArray(values, val) < 0) { 22915 results.push(src[i]); 22916 } 22917 values[i] = val; 22918 i++; 22919 } 22920 22921 if (sort) { 22922 if (!key) { 22923 results = results.sort(); 22924 } else { 22925 results = results.sort(function (a, b) { 22926 return a[key] > b[key]; 22927 }); 22928 } 22929 } 22930 22931 return results; 22932} 22933 22934var TOUCH_INPUT_MAP = { 22935 touchstart: INPUT_START, 22936 touchmove: INPUT_MOVE, 22937 touchend: INPUT_END, 22938 touchcancel: INPUT_CANCEL 22939}; 22940 22941var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; 22942 22943/** 22944 * @private 22945 * Multi-user touch events input 22946 * @constructor 22947 * @extends Input 22948 */ 22949 22950var TouchInput = function (_Input) { 22951 inherits(TouchInput, _Input); 22952 22953 function TouchInput() { 22954 classCallCheck(this, TouchInput); 22955 22956 TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS; 22957 TouchInput.prototype.targetIds = {}; 22958 22959 var _this = possibleConstructorReturn(this, (TouchInput.__proto__ || Object.getPrototypeOf(TouchInput)).apply(this, arguments)); 22960 22961 _this.evTarget = TOUCH_TARGET_EVENTS; 22962 _this.targetIds = {}; 22963 return _this; 22964 } 22965 22966 createClass(TouchInput, [{ 22967 key: 'handler', 22968 value: function handler(ev) { 22969 var type = TOUCH_INPUT_MAP[ev.type]; 22970 var touches = getTouches.call(this, ev, type); 22971 if (!touches) { 22972 return; 22973 } 22974 22975 this.callback(this.manager, type, { 22976 pointers: touches[0], 22977 changedPointers: touches[1], 22978 pointerType: INPUT_TYPE_TOUCH, 22979 srcEvent: ev 22980 }); 22981 } 22982 }]); 22983 return TouchInput; 22984}(Input); 22985 22986function getTouches(ev, type) { 22987 var allTouches = toArray$1(ev.touches); 22988 var targetIds = this.targetIds; 22989 22990 // when there is only one touch, the process can be simplified 22991 22992 if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { 22993 targetIds[allTouches[0].identifier] = true; 22994 return [allTouches, allTouches]; 22995 } 22996 22997 var i = void 0; 22998 var targetTouches = void 0; 22999 var changedTouches = toArray$1(ev.changedTouches); 23000 var changedTargetTouches = []; 23001 var target = this.target; 23002 23003 // get target touches from touches 23004 23005 targetTouches = allTouches.filter(function (touch) { 23006 return hasParent(touch.target, target); 23007 }); 23008 23009 // collect touches 23010 if (type === INPUT_START) { 23011 i = 0; 23012 while (i < targetTouches.length) { 23013 targetIds[targetTouches[i].identifier] = true; 23014 i++; 23015 } 23016 } 23017 23018 // filter changed touches to only contain touches that exist in the collected target ids 23019 i = 0; 23020 while (i < changedTouches.length) { 23021 if (targetIds[changedTouches[i].identifier]) { 23022 changedTargetTouches.push(changedTouches[i]); 23023 } 23024 23025 // cleanup removed touches 23026 if (type & (INPUT_END | INPUT_CANCEL)) { 23027 delete targetIds[changedTouches[i].identifier]; 23028 } 23029 i++; 23030 } 23031 23032 if (!changedTargetTouches.length) { 23033 return; 23034 } 23035 23036 return [ 23037 // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' 23038 uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches]; 23039} 23040 23041var MOUSE_INPUT_MAP = { 23042 mousedown: INPUT_START, 23043 mousemove: INPUT_MOVE, 23044 mouseup: INPUT_END 23045}; 23046 23047var MOUSE_ELEMENT_EVENTS = 'mousedown'; 23048var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; 23049 23050/** 23051 * @private 23052 * Mouse events input 23053 * @constructor 23054 * @extends Input 23055 */ 23056 23057var MouseInput = function (_Input) { 23058 inherits(MouseInput, _Input); 23059 23060 function MouseInput() { 23061 classCallCheck(this, MouseInput); 23062 23063 var _this = possibleConstructorReturn(this, (MouseInput.__proto__ || Object.getPrototypeOf(MouseInput)).apply(this, arguments)); 23064 23065 _this.evEl = MOUSE_ELEMENT_EVENTS; 23066 _this.evWin = MOUSE_WINDOW_EVENTS; 23067 23068 _this.pressed = false; // mousedown state 23069 return _this; 23070 } 23071 23072 /** 23073 * @private 23074 * handle mouse events 23075 * @param {Object} ev 23076 */ 23077 23078 23079 createClass(MouseInput, [{ 23080 key: 'handler', 23081 value: function handler(ev) { 23082 var eventType = MOUSE_INPUT_MAP[ev.type]; 23083 23084 // on start we want to have the left mouse button down 23085 if (eventType & INPUT_START && ev.button === 0) { 23086 this.pressed = true; 23087 } 23088 23089 if (eventType & INPUT_MOVE && ev.which !== 1) { 23090 eventType = INPUT_END; 23091 } 23092 23093 // mouse must be down 23094 if (!this.pressed) { 23095 return; 23096 } 23097 23098 if (eventType & INPUT_END) { 23099 this.pressed = false;
23100 } 23101 23102 this.callback(this.manager, eventType, { 23103 pointers: [ev], 23104 changedPointers: [ev], 23105 pointerType: INPUT_TYPE_MOUSE, 23106 srcEvent: ev 23107 }); 23108 } 23109 }]); 23110 return MouseInput; 23111}(Input); 23112 23113/** 23114 * @private 23115 * Combined touch and mouse input 23116 * 23117 * Touch has a higher priority then mouse, and while touching no mouse events are allowed. 23118 * This because touch devices also emit mouse events while doing a touch. 23119 * 23120 * @constructor 23121 * @extends Input 23122 */ 23123 23124var DEDUP_TIMEOUT = 2500; 23125var DEDUP_DISTANCE = 25; 23126 23127var TouchMouseInput = function (_Input) { 23128 inherits(TouchMouseInput, _Input); 23129 23130 function TouchMouseInput() { 23131 classCallCheck(this, TouchMouseInput); 23132 23133 var _this = possibleConstructorReturn(this, (TouchMouseInput.__proto__ || Object.getPrototypeOf(TouchMouseInput)).apply(this, arguments)); 23134 23135 var handler = bindFn(_this.handler, _this); 23136 _this.touch = new TouchInput(_this.manager, handler); 23137 _this.mouse = new MouseInput(_this.manager, handler); 23138 23139 _this.primaryTouch = null; 23140 _this.lastTouches = []; 23141 return _this; 23142 } 23143 23144 /** 23145 * @private 23146 * handle mouse and touch events 23147 * @param {Hammer} manager 23148 * @param {String} inputEvent 23149 * @param {Object} inputData 23150 */ 23151 23152 23153 createClass(TouchMouseInput, [{ 23154 key: 'handler', 23155 value: function handler(manager, inputEvent, inputData) { 23156 var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH; 23157 var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE; 23158 23159 if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { 23160 return; 23161 } 23162 23163 // when we're in a touch event, record touches to de-dupe synthetic mouse event 23164 if (isTouch) { 23165 recordTouches.call(this, inputEvent, inputData); 23166 } else if (isMouse && isSyntheticEvent.call(this, inputData)) { 23167 return; 23168 } 23169 23170 this.callback(manager, inputEvent, inputData); 23171 } 23172 23173 /** 23174 * @private 23175 * remove the event listeners 23176 */ 23177 23178 }, { 23179 key: 'destroy', 23180 value: function destroy() { 23181 this.touch.destroy(); 23182 this.mouse.destroy(); 23183 } 23184 }]); 23185 return TouchMouseInput; 23186}(Input); 23187 23188function recordTouches(eventType, eventData) { 23189 if (eventType & INPUT_START) { 23190 this.primaryTouch = eventData.changedPointers[0].identifier; 23191 setLastTouch.call(this, eventData); 23192 } else if (eventType & (INPUT_END | INPUT_CANCEL)) { 23193 setLastTouch.call(this, eventData); 23194 } 23195} 23196 23197function setLastTouch(eventData) { 23198 var _this2 = this; 23199 23200 var _eventData$changedPoi = slicedToArray(eventData.changedPointers, 1); 23201 23202 var touch = _eventData$changedPoi[0]; 23203 23204 if (touch.identifier === this.primaryTouch) { 23205 (function () { 23206 var lastTouch = { x: touch.clientX, y: touch.clientY }; 23207 _this2.lastTouches.push(lastTouch); 23208 var lts = _this2.lastTouches; 23209 var removeLastTouch = function removeLastTouch() { 23210 var i = lts.indexOf(lastTouch); 23211 if (i > -1) { 23212 lts.splice(i, 1); 23213 } 23214 }; 23215 setTimeout(removeLastTouch, DEDUP_TIMEOUT); 23216 })(); 23217 } 23218} 23219 23220function isSyntheticEvent(eventData) { 23221 var x = eventData.srcEvent.clientX; 23222 var y = eventData.srcEvent.clientY; 23223 for (var i = 0; i < this.lastTouches.length; i++) { 23224 var t = this.lastTouches[i]; 23225 var dx = Math.abs(x - t.x); 23226 var dy = Math.abs(y - t.y); 23227 if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { 23228 return true; 23229 } 23230 } 23231 return false; 23232} 23233 23234/** 23235 * @private 23236 * create new input type manager 23237 * called by the Manager constructor 23238 * @param {Hammer} manager 23239 * @returns {Input} 23240 */ 23241function createInputInstance(manager) { 23242 var Type = void 0; 23243 // let inputClass = manager.options.inputClass; 23244 var inputClass = manager.options.inputClass; 23245 23246 if (inputClass) { 23247 Type = inputClass; 23248 } else if (SUPPORT_POINTER_EVENTS) { 23249 Type = PointerEventInput; 23250 } else if (SUPPORT_ONLY_TOUCH) { 23251 Type = TouchInput; 23252 } else if (!SUPPORT_TOUCH) { 23253 Type = MouseInput; 23254 } else { 23255 Type = TouchMouseInput; 23256 } 23257 return new Type(manager, inputHandler); 23258} 23259 23260var STOP = 1; 23261var FORCED_STOP = 2; 23262 23263/** 23264* @private 23265 * Manager 23266 * @param {HTMLElement} element 23267 * @param {Object} [options] 23268 * @constructor 23269 */ 23270 23271var Manager = function () { 23272 function Manager(element, options) { 23273 var _this = this; 23274 23275 classCallCheck(this, Manager); 23276 23277 this.options = assign$1({}, Hammer.defaults, options || {}); 23278 23279 this.options.inputTarget = this.options.inputTarget || element; 23280 23281 this.handlers = {}; 23282 this.session = {}; 23283 this.recognizers = []; 23284 this.oldCssProps = {}; 23285 23286 this.element = element; 23287 this.input = createInputInstance(this); 23288 this.touchAction = new TouchAction(this, this.options.touchAction); 23289 23290 toggleCssProps(this, true); 23291 23292 each(this.options.recognizers, function (item) { 23293 var recognizer = _this.add(new item[0](item[1])); 23294 item[2] && recognizer.recognizeWith(item[2]); 23295 item[3] && recognizer.requireFailure(item[3]); 23296 }, this); 23297 } 23298 23299 /** 23300 * @private 23301 * set options 23302 * @param {Object} options 23303 * @returns {Manager} 23304 */ 23305 23306 23307 createClass(Manager, [{ 23308 key: 'set', 23309 value: function set(options) { 23310 assign$1(this.options, options); 23311 23312 // Options that need a little more setup 23313 if (options.touchAction) { 23314 this.touchAction.update(); 23315 } 23316 if (options.inputTarget) { 23317 // Clean up existing event listeners and reinitialize 23318 this.input.destroy(); 23319 this.input.target = options.inputTarget; 23320 this.input.init(); 23321 } 23322 return this; 23323 } 23324 23325 /** 23326 * @private 23327 * stop recognizing for this session. 23328 * This session will be discarded, when a new [input]start event is fired. 23329 * When forced, the recognizer cycle is stopped immediately. 23330 * @param {Boolean} [force] 23331 */ 23332 23333 }, { 23334 key: 'stop', 23335 value: function stop(force) { 23336 this.session.stopped = force ? FORCED_STOP : STOP; 23337 } 23338 23339 /** 23340 * @private 23341 * run the recognizers! 23342 * called by the inputHandler function on every movement of the pointers (touches) 23343 * it walks through all the recognizers and tries to detect the gesture that is being made 23344 * @param {Object} inputData 23345 */ 23346 23347 }, { 23348 key: 'recognize', 23349 value: function recognize(inputData) { 23350 var session = this.session; 23351 23352 if (session.stopped) { 23353 return; 23354 } 23355 23356 // run the touch-action polyfill 23357 this.touchAction.preventDefaults(inputData); 23358 23359 var recognizer = void 0; 23360 var recognizers = this.recognizers; 23361 23362 // this holds the recognizer that is being recognized. 23363 // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED 23364 // if no recognizer is detecting a thing, it is set to `null` 23365 23366 var curRecognizer = session.curRecognizer; 23367 23368 // reset when the last recognizer is recognized 23369 // or when we're in a new session 23370 23371 if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) { 23372 curRecognizer = session.curRecognizer = null; 23373 } 23374 23375 var i = 0; 23376 while (i < recognizers.length) { 23377 recognizer = recognizers[i]; 23378 23379 // find out if we are allowed try to recognize the input for this one. 23380 // 1. allow if the session is NOT forced stopped (see the .stop() method) 23381 // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one 23382 // that is being recognized. 23383 // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. 23384 // this can be setup with the `recognizeWith()` method on the recognizer. 23385 if (session.stopped !== FORCED_STOP && ( // 1 23386 !curRecognizer || recognizer === curRecognizer || // 2 23387 recognizer.canRecognizeWith(curRecognizer))) { 23388 // 3 23389 recognizer.recognize(inputData); 23390 } else { 23391 recognizer.reset(); 23392 } 23393 23394 // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the 23395 // current active recognizer. but only if we don't already have an active recognizer 23396 if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { 23397 curRecognizer = session.curRecognizer = recognizer; 23398 } 23399 i++; 23400 } 23401 } 23402 23403 /** 23404 * @private 23405 * get a recognizer by its event name. 23406 * @param {Recognizer|String} recognizer 23407 * @returns {Recognizer|Null} 23408 */ 23409 23410 }, { 23411 key: 'get', 23412 value: function get(recognizer) { 23413 if (recognizer instanceof Recognizer) { 23414 return recognizer; 23415 } 23416 23417 var recognizers = this.recognizers; 23418 23419 for (var i = 0; i < recognizers.length; i++) { 23420 if (recognizers[i].options.event === recognizer) { 23421 return recognizers[i]; 23422 } 23423 } 23424 return null; 23425 } 23426 23427 /**
vendor: 5,940 bytes, lines 23428-23696
23428 * @private add a recognizer to the manager 23429 * existing recognizers with the same event name will be removed 23430 * @param {Recognizer} recognizer 23431 * @returns {Recognizer|Manager} 23432 */ 23433 23434 }, { 23435 key: 'add', 23436 value: function add(recognizer) { 23437 if (invokeArrayArg(recognizer, 'add', this)) { 23438 return this; 23439 } 23440 23441 // remove existing 23442 var existing = this.get(recognizer.options.event); 23443 if (existing) { 23444 this.remove(existing); 23445 } 23446 23447 this.recognizers.push(recognizer); 23448 recognizer.manager = this; 23449 23450 this.touchAction.update(); 23451 return recognizer; 23452 } 23453 23454 /** 23455 * @private 23456 * remove a recognizer by name or instance 23457 * @param {Recognizer|String} recognizer 23458 * @returns {Manager} 23459 */ 23460 23461 }, { 23462 key: 'remove', 23463 value: function remove(recognizer) { 23464 if (invokeArrayArg(recognizer, 'remove', this)) { 23465 return this; 23466 } 23467 23468 recognizer = this.get(recognizer); 23469 23470 // let's make sure this recognizer exists 23471 if (recognizer) { 23472 var recognizers = this.recognizers; 23473 23474 var index = inArray(recognizers, recognizer); 23475 23476 if (index !== -1) { 23477 recognizers.splice(index, 1); 23478 this.touchAction.update(); 23479 } 23480 } 23481 23482 return this; 23483 } 23484 23485 /** 23486 * @private 23487 * bind event 23488 * @param {String} events 23489 * @param {Function} handler 23490 * @returns {EventEmitter} this 23491 */ 23492 23493 }, { 23494 key: 'on', 23495 value: function on(events, handler) { 23496 if (events === undefined) { 23497 return; 23498 } 23499 if (handler === undefined) { 23500 return; 23501 } 23502 23503 var handlers = this.handlers; 23504 23505 each(splitStr(events), function (event) { 23506 handlers[event] = handlers[event] || []; 23507 handlers[event].push(handler); 23508 }); 23509 return this; 23510 } 23511 23512 /** 23513 * @private unbind event, leave emit blank to remove all handlers 23514 * @param {String} events 23515 * @param {Function} [handler] 23516 * @returns {EventEmitter} this 23517 */ 23518 23519 }, { 23520 key: 'off', 23521 value: function off(events, handler) { 23522 if (events === undefined) { 23523 return; 23524 } 23525 23526 var handlers = this.handlers; 23527 23528 each(splitStr(events), function (event) { 23529 if (!handler) { 23530 delete handlers[event]; 23531 } else { 23532 handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); 23533 } 23534 }); 23535 return this; 23536 } 23537 23538 /** 23539 * @private emit event to the listeners 23540 * @param {String} event 23541 * @param {Object} data 23542 */ 23543 23544 }, { 23545 key: 'emit', 23546 value: function emit(event, data) { 23547 // we also want to trigger dom events 23548 if (this.options.domEvents) { 23549 triggerDomEvent(event, data); 23550 } 23551 23552 // no handlers, so skip it all 23553 var handlers = this.handlers[event] && this.handlers[event].slice(); 23554 if (!handlers || !handlers.length) { 23555 return; 23556 } 23557 23558 data.type = event; 23559 data.preventDefault = function () { 23560 data.srcEvent.preventDefault(); 23561 }; 23562 23563 var i = 0; 23564 while (i < handlers.length) { 23565 handlers[i](data); 23566 i++; 23567 } 23568 } 23569 23570 /** 23571 * @private 23572 * destroy the manager and unbinds all events 23573 * it doesn't unbind dom events, that is the user own responsibility 23574 */ 23575 23576 }, { 23577 key: 'destroy', 23578 value: function destroy() { 23579 this.element && toggleCssProps(this, false); 23580 23581 this.handlers = {}; 23582 this.session = {}; 23583 this.input.destroy(); 23584 this.element = null; 23585 } 23586 }]); 23587 return Manager; 23588}(); 23589 23590function toggleCssProps(manager, add) { 23591 var element = manager.element; 23592 23593 if (!element.style) { 23594 return; 23595 } 23596 var prop = void 0; 23597 each(manager.options.cssProps, function (value, name) { 23598 prop = prefixed(element.style, name); 23599 if (add) { 23600 manager.oldCssProps[prop] = element.style[prop]; 23601 element.style[prop] = value; 23602 } else { 23603 element.style[prop] = manager.oldCssProps[prop] || ''; 23604 } 23605 }); 23606 if (!add) { 23607 manager.oldCssProps = {}; 23608 } 23609} 23610 23611/** 23612 * @private 23613 * trigger dom event 23614 * @param {String} event 23615 * @param {Object} data 23616 */ 23617function triggerDomEvent(event, data) { 23618 var gestureEvent = document.createEvent('Event'); 23619 gestureEvent.initEvent(event, true, true); 23620 gestureEvent.gesture = data; 23621 data.target.dispatchEvent(gestureEvent); 23622} 23623 23624/** 23625 * @private 23626 * Simple way to create a manager with a default set of recognizers. 23627 * @param {HTMLElement} element 23628 * @param {Object} [options] 23629 * @constructor 23630 */ 23631 23632var Hammer = function Hammer(element, options) { 23633 classCallCheck(this, Hammer); 23634 23635 options = options || {}; 23636 options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); 23637 return new Manager(element, options); 23638}; 23639 23640Hammer.VERSION = '2.0.8'; 23641 23642/** 23643 * @private 23644 * default settings 23645 * @namespace 23646 */ 23647Hammer.defaults = { 23648 /** 23649 * @private 23650 * set if DOM events are being triggered. 23651 * But this is slower and unused by simple implementations, so disabled by default. 23652 * @type {Boolean} 23653 * @default false 23654 */ 23655 domEvents: false, 23656 23657 /** 23658 * @private 23659 * The value for the touchAction property/fallback. 23660 * When set to `compute` it will magically set the correct value based on the added recognizers. 23661 * @type {String} 23662 * @default compute 23663 */ 23664 touchAction: TOUCH_ACTION_COMPUTE, 23665 23666 /** 23667 * @private 23668 * @type {Boolean} 23669 * @default true 23670 */ 23671 enable: true, 23672 23673 /** 23674 * @private 23675 * EXPERIMENTAL FEATURE -- can be removed/changed 23676 * Change the parent input target element. 23677 * If Null, then it is being set the to main element. 23678 * @type {Null|EventTarget} 23679 * @default null 23680 */ 23681 inputTarget: null, 23682 23683 /** 23684 * @private 23685 * force an input class 23686 * @type {Null|Function} 23687 * @default null 23688 */ 23689 inputClass: null, 23690 23691 /** 23692 * @private 23693 * Default recognizer setup when calling `Hammer()` 23694 * When creating a new Manager these will be skipped. 23695 * @type {Array} 23696 */
23697 preset: [ 23698 // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] 23699 [RotateRecognizer, { enable: false }], [PinchRecognizer, { enable: false }, ['rotate']], [SwipeRecognizer, { direction: DIRECTION_HORIZONTAL }], [PanRecognizer, { direction: DIRECTION_HORIZONTAL }, ['swipe']], [TapRecognizer], [TapRecognizer, { event: 'doubletap', taps: 2 }, ['tap']], [PressRecognizer]], 23700 23701 /** 23702 * @private 23703 * Some CSS properties can be used to improve the working of Hammer. 23704 * Add them to this method and they will be set when creating a new Manager. 23705 * @namespace 23706 */ 23707 cssProps: { 23708 /** 23709 * @private 23710 * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. 23711 * @type {String} 23712 * @default 'none' 23713 */ 23714 userSelect: 'none', 23715 23716 /** 23717 * @private 23718 * Disable the Windows Phone grippers when pressing an element. 23719 * @type {String} 23720 * @default 'none' 23721 */ 23722 touchSelect: 'none', 23723 23724 /** 23725 * @private 23726 * Disables the default callout shown when you touch and hold a touch target. 23727 * On iOS, when you touch and hold a touch target such as a link, Safari displays 23728 * a callout containing information about the link. This property allows you to disable that callout. 23729 * @type {String} 23730 * @default 'none' 23731 */ 23732 touchCallout: 'none', 23733 23734 /** 23735 * @private 23736 * Specifies whether zooming is enabled. Used by IE10> 23737 * @type {String} 23738 * @default 'none' 23739 */ 23740 contentZooming: 'none', 23741 23742 /** 23743 * @private 23744 * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. 23745 * @type {String} 23746 * @default 'none' 23747 */ 23748 userDrag: 'none', 23749 23750 /** 23751 * @private 23752 * Overrides the highlight color shown when the user taps a link or a JavaScript 23753 * clickable element in iOS. This property obeys the alpha value, if specified. 23754 * @type {String} 23755 * @default 'rgba(0,0,0,0)' 23756 */ 23757 tapHighlightColor: 'rgba(0,0,0,0)' 23758 } 23759}; 23760 23761var SINGLE_TOUCH_INPUT_MAP = { 23762 touchstart: INPUT_START, 23763 touchmove: INPUT_MOVE, 23764 touchend: INPUT_END, 23765 touchcancel: INPUT_CANCEL 23766}; 23767 23768var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; 23769var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; 23770 23771/** 23772 * @private 23773 * Touch events input 23774 * @constructor 23775 * @extends Input 23776 */ 23777 23778var SingleTouchInput = function (_Input) { 23779 inherits(SingleTouchInput, _Input); 23780 23781 function SingleTouchInput() { 23782 classCallCheck(this, SingleTouchInput); 23783 23784 var _this = possibleConstructorReturn(this, (SingleTouchInput.__proto__ || Object.getPrototypeOf(SingleTouchInput)).apply(this, arguments)); 23785 23786 _this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; 23787 _this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; 23788 _this.started = false; 23789 23790 Input.apply(_this, arguments); 23791 return _this; 23792 } 23793 23794 createClass(SingleTouchInput, [{ 23795 key: 'handler', 23796 value: function handler(ev) { 23797 var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; 23798 23799 // should we handle the touch events? 23800 if (type === INPUT_START) { 23801 this.started = true; 23802 } 23803 23804 if (!this.started) { 23805 return; 23806 } 23807 23808 var touches = normalizeSingleTouches.call(this, ev, type); 23809 23810 // when done, reset the started state 23811 if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { 23812 this.started = false; 23813 } 23814 23815 this.callback(this.manager, type, { 23816 pointers: touches[0], 23817 changedPointers: touches[1], 23818 pointerType: INPUT_TYPE_TOUCH, 23819 srcEvent: ev 23820 }); 23821 } 23822 }]); 23823 return SingleTouchInput; 23824}(Input); 23825 23826function normalizeSingleTouches(ev, type) { 23827 var all = toArray$1(ev.touches); 23828 var changed = toArray$1(ev.changedTouches); 23829 23830 if (type & (INPUT_END | INPUT_CANCEL)) { 23831 all = uniqueArray(all.concat(changed), 'identifier', true); 23832 } 23833 23834 return [all, changed]; 23835} 23836 23837/** 23838 * @private 23839 * wrap a method with a deprecation warning and stack trace 23840 * @param {Function} method 23841 * @param {String} name 23842 * @param {String} message 23843 * @returns {Function} A new function wrapping the supplied method. 23844 */ 23845function deprecate(method, name, message) { 23846 var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n'; 23847 return function () { 23848 var e = new Error('get-stack-trace'); 23849 var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '').replace(/^\s+at\s+/gm, '').replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; 23850 23851 var log = window.console && (window.console.warn || window.console.log); 23852 if (log) { 23853 log.call(window.console, deprecationMessage, stack); 23854 } 23855 return method.apply(this, arguments); 23856 }; 23857} 23858 23859/** 23860 * @private 23861 * extend object. 23862 * means that properties in dest will be overwritten by the ones in src. 23863 * @param {Object} dest 23864 * @param {Object} src 23865 * @param {Boolean} [merge=false] 23866 * @returns {Object} dest 23867 */ 23868var extend = deprecate(function (dest, src, merge) { 23869 var keys = Object.keys(src); 23870 var i = 0;
23871 while (i < keys.length) { 23872 if (!merge || merge && dest[keys[i]] === undefined) { 23873 dest[keys[i]] = src[keys[i]]; 23874 } 23875 i++; 23876 } 23877 return dest; 23878}, 'extend', 'Use `assign`.'); 23879 23880/** 23881 * @private 23882 * merge the values from src in the dest. 23883 * means that properties that exist in dest will not be overwritten by src 23884 * @param {Object} dest 23885 * @param {Object} src 23886 * @returns {Object} dest 23887 */ 23888var merge = deprecate(function (dest, src) { 23889 return extend(dest, src, true); 23890}, 'merge', 'Use `assign`.'); 23891 23892/** 23893 * @private 23894 * simple class inheritance 23895 * @param {Function} child 23896 * @param {Function} base 23897 * @param {Object} [properties] 23898 */ 23899function inherit(child, base, properties) { 23900 var baseP = base.prototype; 23901 var childP = void 0; 23902 23903 childP = child.prototype = Object.create(baseP); 23904 childP.constructor = child; 23905 childP._super = baseP; 23906 23907 if (properties) { 23908 assign$1(childP, properties); 23909 } 23910} 23911 23912// this prevents errors when Hammer is loaded in the presence of an AMD 23913// style loader but by script tag, not by the loader. 23914 23915assign$1(Hammer, { 23916 INPUT_START: INPUT_START, 23917 INPUT_MOVE: INPUT_MOVE, 23918 INPUT_END: INPUT_END, 23919 INPUT_CANCEL: INPUT_CANCEL, 23920 23921 STATE_POSSIBLE: STATE_POSSIBLE, 23922 STATE_BEGAN: STATE_BEGAN, 23923 STATE_CHANGED: STATE_CHANGED, 23924 STATE_ENDED: STATE_ENDED, 23925 STATE_RECOGNIZED: STATE_RECOGNIZED, 23926 STATE_CANCELLED: STATE_CANCELLED, 23927 STATE_FAILED: STATE_FAILED, 23928 23929 DIRECTION_NONE: DIRECTION_NONE, 23930 DIRECTION_LEFT: DIRECTION_LEFT, 23931 DIRECTION_RIGHT: DIRECTION_RIGHT, 23932 DIRECTION_UP: DIRECTION_UP, 23933 DIRECTION_DOWN: DIRECTION_DOWN, 23934 DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, 23935 DIRECTION_VERTICAL: DIRECTION_VERTICAL, 23936 DIRECTION_ALL: DIRECTION_ALL, 23937 23938 Manager: Manager, 23939 Input: Input, 23940 TouchAction: TouchAction, 23941 23942 TouchInput: TouchInput, 23943 MouseInput: MouseInput, 23944 PointerEventInput: PointerEventInput, 23945 TouchMouseInput: TouchMouseInput, 23946 SingleTouchInput: SingleTouchInput, 23947 23948 Recognizer: Recognizer, 23949 AttrRecognizer: AttrRecognizer, 23950 Tap: TapRecognizer, 23951 Pan: PanRecognizer, 23952 Swipe: SwipeRecognizer, 23953 Pinch: PinchRecognizer, 23954 Rotate: RotateRecognizer, 23955 Press: PressRecognizer, 23956 23957 on: addEventListeners, 23958 off: removeEventListeners, 23959 each: each, 23960 merge: merge, 23961 extend: extend, 23962 assign: assign$1, 23963 inherit: inherit, 23964 bindFn: bindFn, 23965 prefixed: prefixed, 23966 toArray: toArray$1, 23967 inArray: inArray, 23968 uniqueArray: uniqueArray, 23969 splitStr: splitStr, 23970 boolOrFn: boolOrFn, 23971 hasParent: hasParent, 23972 addEventListeners: addEventListeners, 23973 removeEventListeners: removeEventListeners 23974}); 23975 23976/* jshint ignore:start */ 23977if (typeof redesign.define === 'function' && redesign.define.amd) { 23978 redesign.define('hammerjs',[],function () { 23979 return Hammer; 23980 }); 23981} else if (typeof module !== 'undefined' && module.exports) { 23982 module.exports = Hammer; 23983} else { 23984 window[exportName] = Hammer; 23985} 23986/* jshint ignore:end */ 23987})(window, document, 'Hammer'); 23988(function(factory) { 23989 if (typeof redesign.define === 'function' && redesign.define.amd) { 23990 redesign.define('jquery_hammer',['jquery', 'hammerjs'], factory); 23991 } else if (typeof exports === 'object') { 23992 factory(require('jquery'), require('hammerjs')); 23993 } else { 23994 factory(jQuery, Hammer); 23995 } 23996}(function($, Hammer) { 23997 function hammerify(el, options) { 23998 var $el = $(el); 23999 if(!$el.data("hammer")) { 24000 $el.data("hammer", new Hammer($el[0], options)); 24001 } 24002 } 24003 24004 $.fn.hammer = function(options) { 24005 return this.each(function() { 24006 hammerify(this, options); 24007 }); 24008 }; 24009 24010 // extend the emit method to also trigger jQuery events 24011 Hammer.Manager.prototype.emit = (function(originalEmit) { 24012 return function(type, data) { 24013 originalEmit.call(this, type, data); 24014 $(this.element).trigger({ 24015 type: type, 24016 gesture: data 24017 }); 24018 }; 24019 })(Hammer.Manager.prototype.emit); 24020})); 24021/*! 24022Waypoints - 4.0.1 24023Copyright © 2011-2016 Caleb Troughton 24024Licensed under the MIT license. 24025https://github.com/imakewebthings/waypoints/blob/master/licenses.txt 24026*/ 24027(function() { 24028 'use strict' 24029 24030 var keyCounter = 0 24031 var allWaypoints = {} 24032 24033 /* http://imakewebthings.com/waypoints/api/waypoint */ 24034 function Waypoint(options) { 24035 if (!options) { 24036 throw new Error('No options passed to Waypoint constructor') 24037 } 24038 if (!options.element) { 24039 throw new Error('No element option passed to Waypoint constructor') 24040 } 24041 if (!options.handler) { 24042 throw new Error('No handler option passed to Waypoint constructor') 24043 } 24044 24045 this.key = 'waypoint-' + keyCounter 24046 this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options) 24047 this.element = this.options.element 24048 this.adapter = new Waypoint.Adapter(this.element) 24049 this.callback = options.handler 24050 this.axis = this.options.horizontal ? 'horizontal' : 'vertical' 24051 this.enabled = this.options.enabled 24052 this.triggerPoint = null 24053 this.group = Waypoint.Group.findOrCreate({ 24054 name: this.options.group, 24055 axis: this.axis 24056 }) 24057 this.context = Waypoint.Context.findOrCreateByElement(this.options.context) 24058 24059 if (Waypoint.offsetAliases[this.options.offset]) { 24060 this.options.offset = Waypoint.offsetAliases[this.options.offset] 24061 } 24062 this.group.add(this) 24063 this.context.add(this) 24064 allWaypoints[this.key] = this 24065 keyCounter += 1 24066 } 24067 24068 /* Private */ 24069 Waypoint.prototype.queueTrigger = function(direction) { 24070 this.group.queueTrigger(this, direction) 24071 } 24072 24073 /* Private */ 24074 Waypoint.prototype.trigger = function(args) { 24075 if (!this.enabled) { 24076 return 24077 } 24078 if (this.callback) { 24079 this.callback.apply(this, args) 24080 } 24081 } 24082 24083 /* Public */ 24084 /* http://imakewebthings.com/waypoints/api/destroy */ 24085 Waypoint.prototype.destroy = function() { 24086 this.context.remove(this) 24087 this.group.remove(this) 24088 delete allWaypoints[this.key] 24089 } 24090 24091 /* Public */ 24092 /* http://imakewebthings.com/waypoints/api/disable */ 24093 Waypoint.prototype.disable = function() { 24094 this.enabled = false 24095 return this 24096 } 24097 24098 /* Public */ 24099 /* http://imakewebthings.com/waypoints/api/enable */ 24100 Waypoint.prototype.enable = function() { 24101 this.context.refresh() 24102 this.enabled = true 24103 return this 24104 } 24105 24106 /* Public */ 24107 /* http://imakewebthings.com/waypoints/api/next */ 24108 Waypoint.prototype.next = function() { 24109 return this.group.next(this) 24110 } 24111 24112 /* Public */ 24113 /* http://imakewebthings.com/waypoints/api/previous */ 24114 Waypoint.prototype.previous = function() { 24115 return this.group.previous(this) 24116 } 24117 24118 /* Private */ 24119 Waypoint.invokeAll = function(method) { 24120 var allWaypointsArray = []
24121 for (var waypointKey in allWaypoints) { 24122 allWaypointsArray.push(allWaypoints[waypointKey]) 24123 } 24124 for (var i = 0, end = allWaypointsArray.length; i < end; i++) { 24125 allWaypointsArray[i][method]() 24126 } 24127 } 24128 24129 /* Public */ 24130 /* http://imakewebthings.com/waypoints/api/destroy-all */ 24131 Waypoint.destroyAll = function() { 24132 Waypoint.invokeAll('destroy') 24133 } 24134 24135 /* Public */ 24136 /* http://imakewebthings.com/waypoints/api/disable-all */ 24137 Waypoint.disableAll = function() { 24138 Waypoint.invokeAll('disable') 24139 } 24140 24141 /* Public */ 24142 /* http://imakewebthings.com/waypoints/api/enable-all */ 24143 Waypoint.enableAll = function() { 24144 Waypoint.Context.refreshAll() 24145 for (var waypointKey in allWaypoints) { 24146 allWaypoints[waypointKey].enabled = true 24147 } 24148 return this 24149 } 24150 24151 /* Public */ 24152 /* http://imakewebthings.com/waypoints/api/refresh-all */ 24153 Waypoint.refreshAll = function() { 24154 Waypoint.Context.refreshAll() 24155 } 24156 24157 /* Public */ 24158 /* http://imakewebthings.com/waypoints/api/viewport-height */ 24159 Waypoint.viewportHeight = function() { 24160 return window.innerHeight || document.documentElement.clientHeight 24161 } 24162 24163 /* Public */ 24164 /* http://imakewebthings.com/waypoints/api/viewport-width */ 24165 Waypoint.viewportWidth = function() { 24166 return document.documentElement.clientWidth 24167 } 24168 24169 Waypoint.adapters = [] 24170 24171 Waypoint.defaults = { 24172 context: window, 24173 continuous: true, 24174 enabled: true, 24175 group: 'default', 24176 horizontal: false, 24177 offset: 0 24178 } 24179 24180 Waypoint.offsetAliases = { 24181 'bottom-in-view': function() { 24182 return this.context.innerHeight() - this.adapter.outerHeight() 24183 }, 24184 'right-in-view': function() { 24185 return this.context.innerWidth() - this.adapter.outerWidth() 24186 } 24187 } 24188 24189 window.Waypoint = Waypoint 24190}()) 24191;(function() { 24192 'use strict' 24193 24194 function requestAnimationFrameShim(callback) { 24195 window.setTimeout(callback, 1000 / 60) 24196 } 24197 24198 var keyCounter = 0 24199 var contexts = {} 24200 var Waypoint = window.Waypoint 24201 var oldWindowLoad = window.onload 24202 24203 /* http://imakewebthings.com/waypoints/api/context */ 24204 function Context(element) { 24205 this.element = element 24206 this.Adapter = Waypoint.Adapter 24207 this.adapter = new this.Adapter(element) 24208 this.key = 'waypoint-context-' + keyCounter 24209 this.didScroll = false 24210 this.didResize = false 24211 this.oldScroll = { 24212 x: this.adapter.scrollLeft(), 24213 y: this.adapter.scrollTop() 24214 } 24215 this.waypoints = { 24216 vertical: {}, 24217 horizontal: {} 24218 } 24219 24220 element.waypointContextKey = this.key 24221 contexts[element.waypointContextKey] = this 24222 keyCounter += 1 24223 if (!Waypoint.windowContext) { 24224 Waypoint.windowContext = true 24225 Waypoint.windowContext = new Context(window) 24226 } 24227 24228 this.createThrottledScrollHandler() 24229 this.createThrottledResizeHandler() 24230 } 24231 24232 /* Private */ 24233 Context.prototype.add = function(waypoint) { 24234 var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical' 24235 this.waypoints[axis][waypoint.key] = waypoint 24236 this.refresh() 24237 } 24238 24239 /* Private */ 24240 Context.prototype.checkEmpty = function() { 24241 var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal) 24242 var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical) 24243 var isWindow = this.element == this.element.window 24244 if (horizontalEmpty && verticalEmpty && !isWindow) { 24245 this.adapter.off('.waypoints') 24246 delete contexts[this.key] 24247 } 24248 } 24249 24250 /* Private */ 24251 Context.prototype.createThrottledResizeHandler = function() { 24252 var self = this 24253 24254 function resizeHandler() { 24255 self.handleResize() 24256 self.didResize = false 24257 } 24258 24259 this.adapter.on('resize.waypoints', function() { 24260 if (!self.didResize) { 24261 self.didResize = true 24262 Waypoint.requestAnimationFrame(resizeHandler) 24263 } 24264 }) 24265 } 24266 24267 /* Private */ 24268 Context.prototype.createThrottledScrollHandler = function() { 24269 var self = this 24270 function scrollHandler() { 24271 self.handleScroll() 24272 self.didScroll = false 24273 } 24274 24275 this.adapter.on('scroll.waypoints', function() { 24276 if (!self.didScroll || Waypoint.isTouch) { 24277 self.didScroll = true 24278 Waypoint.requestAnimationFrame(scrollHandler) 24279 } 24280 }) 24281 } 24282 24283 /* Private */ 24284 Context.prototype.handleResize = function() { 24285 Waypoint.Context.refreshAll() 24286 } 24287 24288 /* Private */ 24289 Context.prototype.handleScroll = function() { 24290 var triggeredGroups = {} 24291 var axes = { 24292 horizontal: { 24293 newScroll: this.adapter.scrollLeft(), 24294 oldScroll: this.oldScroll.x, 24295 forward: 'right', 24296 backward: 'left' 24297 }, 24298 vertical: { 24299 newScroll: this.adapter.scrollTop(), 24300 oldScroll: this.oldScroll.y, 24301 forward: 'down', 24302 backward: 'up' 24303 } 24304 } 24305 24306 for (var axisKey in axes) { 24307 var axis = axes[axisKey] 24308 var isForward = axis.newScroll > axis.oldScroll 24309 var direction = isForward ? axis.forward : axis.backward 24310
24311 for (var waypointKey in this.waypoints[axisKey]) { 24312 var waypoint = this.waypoints[axisKey][waypointKey] 24313 if (waypoint.triggerPoint === null) { 24314 continue 24315 } 24316 var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint 24317 var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint 24318 var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint 24319 var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint 24320 if (crossedForward || crossedBackward) { 24321 waypoint.queueTrigger(direction) 24322 triggeredGroups[waypoint.group.id] = waypoint.group 24323 } 24324 } 24325 } 24326 24327 for (var groupKey in triggeredGroups) { 24328 triggeredGroups[groupKey].flushTriggers() 24329 } 24330 24331 this.oldScroll = { 24332 x: axes.horizontal.newScroll, 24333 y: axes.vertical.newScroll 24334 } 24335 } 24336 24337 /* Private */ 24338 Context.prototype.innerHeight = function() { 24339 /*eslint-disable eqeqeq */ 24340 if (this.element == this.element.window) { 24341 return Waypoint.viewportHeight() 24342 } 24343 /*eslint-enable eqeqeq */ 24344 return this.adapter.innerHeight() 24345 } 24346 24347 /* Private */ 24348 Context.prototype.remove = function(waypoint) { 24349 delete this.waypoints[waypoint.axis][waypoint.key] 24350 this.checkEmpty() 24351 } 24352 24353 /* Private */ 24354 Context.prototype.innerWidth = function() { 24355 /*eslint-disable eqeqeq */ 24356 if (this.element == this.element.window) { 24357 return Waypoint.viewportWidth() 24358 } 24359 /*eslint-enable eqeqeq */ 24360 return this.adapter.innerWidth() 24361 } 24362 24363 /* Public */ 24364 /* http://imakewebthings.com/waypoints/api/context-destroy */ 24365 Context.prototype.destroy = function() { 24366 var allWaypoints = [] 24367 for (var axis in this.waypoints) {
24368 for (var waypointKey in this.waypoints[axis]) { 24369 allWaypoints.push(this.waypoints[axis][waypointKey]) 24370 } 24371 } 24372 for (var i = 0, end = allWaypoints.length; i < end; i++) { 24373 allWaypoints[i].destroy() 24374 } 24375 } 24376 24377 /* Public */ 24378 /* http://imakewebthings.com/waypoints/api/context-refresh */ 24379 Context.prototype.refresh = function() { 24380 /*eslint-disable eqeqeq */ 24381 var isWindow = this.element == this.element.window 24382 /*eslint-enable eqeqeq */ 24383 var contextOffset = isWindow ? undefined : this.adapter.offset() 24384 var triggeredGroups = {} 24385 var axes 24386 24387 this.handleScroll() 24388 axes = { 24389 horizontal: { 24390 contextOffset: isWindow ? 0 : contextOffset.left, 24391 contextScroll: isWindow ? 0 : this.oldScroll.x, 24392 contextDimension: this.innerWidth(), 24393 oldScroll: this.oldScroll.x, 24394 forward: 'right', 24395 backward: 'left', 24396 offsetProp: 'left' 24397 }, 24398 vertical: { 24399 contextOffset: isWindow ? 0 : contextOffset.top, 24400 contextScroll: isWindow ? 0 : this.oldScroll.y, 24401 contextDimension: this.innerHeight(), 24402 oldScroll: this.oldScroll.y, 24403 forward: 'down', 24404 backward: 'up', 24405 offsetProp: 'top' 24406 } 24407 } 24408 24409 for (var axisKey in axes) { 24410 var axis = axes[axisKey]
24411 for (var waypointKey in this.waypoints[axisKey]) { 24412 var waypoint = this.waypoints[axisKey][waypointKey] 24413 var adjustment = waypoint.options.offset 24414 var oldTriggerPoint = waypoint.triggerPoint 24415 var elementOffset = 0 24416 var freshWaypoint = oldTriggerPoint == null 24417 var contextModifier, wasBeforeScroll, nowAfterScroll 24418 var triggeredBackward, triggeredForward 24419 24420 if (waypoint.element !== waypoint.element.window) { 24421 elementOffset = waypoint.adapter.offset()[axis.offsetProp] 24422 } 24423 24424 if (typeof adjustment === 'function') { 24425 adjustment = adjustment.apply(waypoint) 24426 } 24427 else if (typeof adjustment === 'string') { 24428 adjustment = parseFloat(adjustment) 24429 if (waypoint.options.offset.indexOf('%') > - 1) { 24430 adjustment = Math.ceil(axis.contextDimension * adjustment / 100) 24431 } 24432 } 24433 24434 contextModifier = axis.contextScroll - axis.contextOffset 24435 waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment) 24436 wasBeforeScroll = oldTriggerPoint < axis.oldScroll 24437 nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll 24438 triggeredBackward = wasBeforeScroll && nowAfterScroll 24439 triggeredForward = !wasBeforeScroll && !nowAfterScroll 24440 24441 if (!freshWaypoint && triggeredBackward) { 24442 waypoint.queueTrigger(axis.backward) 24443 triggeredGroups[waypoint.group.id] = waypoint.group 24444 } 24445 else if (!freshWaypoint && triggeredForward) { 24446 waypoint.queueTrigger(axis.forward) 24447 triggeredGroups[waypoint.group.id] = waypoint.group 24448 } 24449 else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) { 24450 waypoint.queueTrigger(axis.forward) 24451 triggeredGroups[waypoint.group.id] = waypoint.group 24452 } 24453 } 24454 } 24455 24456 Waypoint.requestAnimationFrame(function() { 24457 for (var groupKey in triggeredGroups) { 24458 triggeredGroups[groupKey].flushTriggers() 24459 } 24460 }) 24461 24462 return this 24463 } 24464 24465 /* Private */ 24466 Context.findOrCreateByElement = function(element) { 24467 return Context.findByElement(element) || new Context(element) 24468 } 24469 24470 /* Private */ 24471 Context.refreshAll = function() { 24472 for (var contextId in contexts) { 24473 contexts[contextId].refresh() 24474 } 24475 } 24476 24477 /* Public */ 24478 /* http://imakewebthings.com/waypoints/api/context-find-by-element */ 24479 Context.findByElement = function(element) { 24480 return contexts[element.waypointContextKey] 24481 } 24482 24483 window.onload = function() { 24484 if (oldWindowLoad) { 24485 oldWindowLoad() 24486 } 24487 Context.refreshAll() 24488 } 24489 24490 24491 Waypoint.requestAnimationFrame = function(callback) { 24492 var requestFn = window.requestAnimationFrame || 24493 window.mozRequestAnimationFrame || 24494 window.webkitRequestAnimationFrame || 24495 requestAnimationFrameShim 24496 requestFn.call(window, callback) 24497 } 24498 Waypoint.Context = Context 24499}()) 24500;(function() { 24501 'use strict' 24502 24503 function byTriggerPoint(a, b) { 24504 return a.triggerPoint - b.triggerPoint 24505 } 24506 24507 function byReverseTriggerPoint(a, b) { 24508 return b.triggerPoint - a.triggerPoint 24509 } 24510 24511 var groups = { 24512 vertical: {}, 24513 horizontal: {} 24514 } 24515 var Waypoint = window.Waypoint 24516 24517 /* http://imakewebthings.com/waypoints/api/group */ 24518 function Group(options) { 24519 this.name = options.name 24520 this.axis = options.axis 24521 this.id = this.name + '-' + this.axis 24522 this.waypoints = [] 24523 this.clearTriggerQueues() 24524 groups[this.axis][this.name] = this 24525 } 24526 24527 /* Private */ 24528 Group.prototype.add = function(waypoint) { 24529 this.waypoints.push(waypoint) 24530 } 24531 24532 /* Private */ 24533 Group.prototype.clearTriggerQueues = function() { 24534 this.triggerQueues = { 24535 up: [], 24536 down: [], 24537 left: [], 24538 right: [] 24539 } 24540 } 24541 24542 /* Private */ 24543 Group.prototype.flushTriggers = function() { 24544 for (var direction in this.triggerQueues) { 24545 var waypoints = this.triggerQueues[direction] 24546 var reverse = direction === 'up' || direction === 'left' 24547 waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint) 24548 for (var i = 0, end = waypoints.length; i < end; i += 1) { 24549 var waypoint = waypoints[i] 24550 if (waypoint.options.continuous || i === waypoints.length - 1) { 24551 waypoint.trigger([direction]) 24552 } 24553 } 24554 } 24555 this.clearTriggerQueues() 24556 } 24557 24558 /* Private */ 24559 Group.prototype.next = function(waypoint) { 24560 this.waypoints.sort(byTriggerPoint) 24561 var index = Waypoint.Adapter.inArray(waypoint, this.waypoints) 24562 var isLast = index === this.waypoints.length - 1 24563 return isLast ? null : this.waypoints[index + 1] 24564 } 24565 24566 /* Private */ 24567 Group.prototype.previous = function(waypoint) { 24568 this.waypoints.sort(byTriggerPoint) 24569 var index = Waypoint.Adapter.inArray(waypoint, this.waypoints) 24570 return index ? this.waypoints[index - 1] : null 24571 } 24572 24573 /* Private */ 24574 Group.prototype.queueTrigger = function(waypoint, direction) { 24575 this.triggerQueues[direction].push(waypoint) 24576 } 24577 24578 /* Private */ 24579 Group.prototype.remove = function(waypoint) { 24580 var index = Waypoint.Adapter.inArray(waypoint, this.waypoints) 24581 if (index > -1) { 24582 this.waypoints.splice(index, 1) 24583 } 24584 } 24585 24586 /* Public */ 24587 /* http://imakewebthings.com/waypoints/api/first */ 24588 Group.prototype.first = function() { 24589 return this.waypoints[0] 24590 } 24591 24592 /* Public */ 24593 /* http://imakewebthings.com/waypoints/api/last */ 24594 Group.prototype.last = function() { 24595 return this.waypoints[this.waypoints.length - 1] 24596 } 24597 24598 /* Private */ 24599 Group.findOrCreate = function(options) { 24600 return groups[options.axis][options.name] || new Group(options) 24601 } 24602 24603 Waypoint.Group = Group 24604}()) 24605;(function() { 24606 'use strict' 24607 24608 var $ = window.jQuery 24609 var Waypoint = window.Waypoint 24610 24611 function JQueryAdapter(element) { 24612 this.$element = $(element) 24613 } 24614 24615 $.each([
24616 'innerHeight', 24617 'innerWidth', 24618 'off', 24619 'offset', 24620 'on', 24621 'outerHeight', 24622 'outerWidth', 24623 'scrollLeft', 24624 'scrollTop' 24625 ], function(i, method) { 24626 JQueryAdapter.prototype[method] = function() { 24627 var args = Array.prototype.slice.call(arguments) 24628 return this.$element[method].apply(this.$element, args) 24629 } 24630 }) 24631 24632 $.each([ 24633 'extend', 24634 'inArray', 24635 'isEmptyObject' 24636 ], function(i, method) { 24637 JQueryAdapter[method] = $[method] 24638 }) 24639 24640 Waypoint.adapters.push({ 24641 name: 'jquery', 24642 Adapter: JQueryAdapter 24643 }) 24644 Waypoint.Adapter = JQueryAdapter 24645}()) 24646;(function() { 24647 'use strict' 24648 24649 var Waypoint = window.Waypoint 24650 24651 function createExtension(framework) { 24652 return function() { 24653 var waypoints = [] 24654 var overrides = arguments[0] 24655 24656 if (framework.isFunction(arguments[0])) { 24657 overrides = framework.extend({}, arguments[1]) 24658 overrides.handler = arguments[0] 24659 } 24660 24661 this.each(function() { 24662 var options = framework.extend({}, overrides, { 24663 element: this 24664 }) 24665 if (typeof options.context === 'string') { 24666 options.context = framework(this).closest(options.context)[0] 24667 } 24668 waypoints.push(new Waypoint(options)) 24669 }) 24670 24671 return waypoints 24672 } 24673 } 24674 24675 if (window.jQuery) { 24676 window.jQuery.fn.waypoint = createExtension(window.jQuery) 24677 } 24678 if (window.Zepto) { 24679 window.Zepto.fn.waypoint = createExtension(window.Zepto) 24680 } 24681}()) 24682; 24683redesign.define("jquery_waypoint", ["jquery"], function(){}); 24684 24685/**! 24686 24687 @license 24688 handlebars v4.0.11 24689 24690Copyright (C) 2011-2017 by Yehuda Katz 24691 24692Permission is hereby granted, free of charge, to any person obtaining a copy 24693of this software and associated documentation files (the "Software"), to deal 24694in the Software without restriction, including without limitation the rights 24695to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 24696copies of the Software, and to permit persons to whom the Software is 24697furnished to do so, subject to the following conditions: 24698 24699The above copyright notice and this permission notice shall be included in 24700all copies or substantial portions of the Software. 24701 24702THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24703IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24704FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24705AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24706LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24707OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24708THE SOFTWARE. 24709 24710*/ 24711(function webpackUniversalModuleDefinition(root, factory) { 24712 if(typeof exports === 'object' && typeof module === 'object') 24713 module.exports = factory(); 24714 else if(typeof redesign.define === 'function' && redesign.define.amd) 24715 redesign.define('handlebars',[], factory); 24716 else if(typeof exports === 'object') 24717 exports["Handlebars"] = factory(); 24718 else 24719 root["Handlebars"] = factory(); 24720})(this, function() { 24721return /******/ (function(modules) { // webpackBootstrap 24722/******/ // The module cache 24723/******/ var installedModules = {}; 24724 24725/******/ // The require function 24726/******/ function __webpack_require__(moduleId) { 24727 24728/******/ // Check if module is in cache 24729/******/ if(installedModules[moduleId]) 24730/******/ return installedModules[moduleId].exports; 24731 24732/******/ // Create a new module (and put it into the cache) 24733/******/ var module = installedModules[moduleId] = { 24734/******/ exports: {}, 24735/******/ id: moduleId, 24736/******/ loaded: false 24737/******/ }; 24738 24739/******/ // Execute the module function 24740/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 24741 24742/******/ // Flag the module as loaded 24743/******/ module.loaded = true; 24744 24745/******/ // Return the exports of the module 24746/******/ return module.exports; 24747/******/ } 24748 24749 24750/******/ // expose the modules object (__webpack_modules__) 24751/******/ __webpack_require__.m = modules; 24752 24753/******/ // expose the module cache 24754/******/ __webpack_require__.c = installedModules; 24755 24756/******/ // __webpack_public_path__ 24757/******/ __webpack_require__.p = ""; 24758 24759/******/ // Load entry module and return exports 24760/******/ return __webpack_require__(0); 24761/******/ }) 24762/************************************************************************/ 24763/******/ ([ 24764/* 0 */ 24765/***/ (function(module, exports, __webpack_require__) { 24766 24767 'use strict'; 24768 24769 var _interopRequireWildcard = __webpack_require__(1)['default']; 24770 24771 var _interopRequireDefault = __webpack_require__(2)['default']; 24772 24773 exports.__esModule = true; 24774 24775 var _handlebarsBase = __webpack_require__(3); 24776 24777 var base = _interopRequireWildcard(_handlebarsBase); 24778 24779 // Each of these augment the Handlebars object. No need to setup here. 24780 // (This is done to easily share code between commonjs and browse envs) 24781 24782 var _handlebarsSafeString = __webpack_require__(20); 24783 24784 var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); 24785 24786 var _handlebarsException = __webpack_require__(5); 24787 24788 var _handlebarsException2 = _interopRequireDefault(_handlebarsException); 24789 24790 var _handlebarsUtils = __webpack_require__(4); 24791 24792 var Utils = _interopRequireWildcard(_handlebarsUtils); 24793 24794 var _handlebarsRuntime = __webpack_require__(21); 24795 24796 var runtime = _interopRequireWildcard(_handlebarsRuntime); 24797 24798 var _handlebarsNoConflict = __webpack_require__(33); 24799 24800 var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); 24801 24802 // For compatibility and usage outside of module systems, make the Handlebars object a namespace 24803 function create() { 24804 var hb = new base.HandlebarsEnvironment(); 24805 24806 Utils.extend(hb, base); 24807 hb.SafeString = _handlebarsSafeString2['default']; 24808 hb.Exception = _handlebarsException2['default']; 24809 hb.Utils = Utils; 24810 hb.escapeExpression = Utils.escapeExpression; 24811 24812 hb.VM = runtime; 24813 hb.template = function (spec) { 24814 return runtime.template(spec, hb); 24815 }; 24816 24817 return hb; 24818 } 24819 24820 var inst = create(); 24821 inst.create = create; 24822 24823 _handlebarsNoConflict2['default'](inst); 24824 24825 inst['default'] = inst; 24826 24827 exports['default'] = inst; 24828 module.exports = exports['default']; 24829 24830/***/ }), 24831/* 1 */
vendor: 31,902 bytes, lines 24832-25989
24832/***/ (function(module, exports) { 24833 24834 "use strict"; 24835 24836 exports["default"] = function (obj) { 24837 if (obj && obj.__esModule) { 24838 return obj; 24839 } else { 24840 var newObj = {}; 24841 24842 if (obj != null) { 24843 for (var key in obj) { 24844 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; 24845 } 24846 } 24847 24848 newObj["default"] = obj; 24849 return newObj; 24850 } 24851 }; 24852 24853 exports.__esModule = true; 24854 24855/***/ }), 24856/* 2 */ 24857/***/ (function(module, exports) { 24858 24859 "use strict"; 24860 24861 exports["default"] = function (obj) { 24862 return obj && obj.__esModule ? obj : { 24863 "default": obj 24864 }; 24865 }; 24866 24867 exports.__esModule = true; 24868 24869/***/ }), 24870/* 3 */ 24871/***/ (function(module, exports, __webpack_require__) { 24872 24873 'use strict'; 24874 24875 var _interopRequireDefault = __webpack_require__(2)['default']; 24876 24877 exports.__esModule = true; 24878 exports.HandlebarsEnvironment = HandlebarsEnvironment; 24879 24880 var _utils = __webpack_require__(4); 24881 24882 var _exception = __webpack_require__(5); 24883 24884 var _exception2 = _interopRequireDefault(_exception); 24885 24886 var _helpers = __webpack_require__(9); 24887 24888 var _decorators = __webpack_require__(17); 24889 24890 var _logger = __webpack_require__(19); 24891 24892 var _logger2 = _interopRequireDefault(_logger); 24893 24894 var VERSION = '4.0.11'; 24895 exports.VERSION = VERSION; 24896 var COMPILER_REVISION = 7; 24897 24898 exports.COMPILER_REVISION = COMPILER_REVISION; 24899 var REVISION_CHANGES = { 24900 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it 24901 2: '== 1.0.0-rc.3', 24902 3: '== 1.0.0-rc.4', 24903 4: '== 1.x.x', 24904 5: '== 2.0.0-alpha.x', 24905 6: '>= 2.0.0-beta.1', 24906 7: '>= 4.0.0' 24907 }; 24908 24909 exports.REVISION_CHANGES = REVISION_CHANGES; 24910 var objectType = '[object Object]'; 24911 24912 function HandlebarsEnvironment(helpers, partials, decorators) { 24913 this.helpers = helpers || {}; 24914 this.partials = partials || {}; 24915 this.decorators = decorators || {}; 24916 24917 _helpers.registerDefaultHelpers(this); 24918 _decorators.registerDefaultDecorators(this); 24919 } 24920 24921 HandlebarsEnvironment.prototype = { 24922 constructor: HandlebarsEnvironment, 24923 24924 logger: _logger2['default'], 24925 log: _logger2['default'].log, 24926 24927 registerHelper: function registerHelper(name, fn) { 24928 if (_utils.toString.call(name) === objectType) { 24929 if (fn) { 24930 throw new _exception2['default']('Arg not supported with multiple helpers'); 24931 } 24932 _utils.extend(this.helpers, name); 24933 } else { 24934 this.helpers[name] = fn; 24935 } 24936 }, 24937 unregisterHelper: function unregisterHelper(name) { 24938 delete this.helpers[name]; 24939 }, 24940 24941 registerPartial: function registerPartial(name, partial) { 24942 if (_utils.toString.call(name) === objectType) { 24943 _utils.extend(this.partials, name); 24944 } else { 24945 if (typeof partial === 'undefined') { 24946 throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); 24947 } 24948 this.partials[name] = partial; 24949 } 24950 }, 24951 unregisterPartial: function unregisterPartial(name) { 24952 delete this.partials[name]; 24953 }, 24954 24955 registerDecorator: function registerDecorator(name, fn) { 24956 if (_utils.toString.call(name) === objectType) { 24957 if (fn) { 24958 throw new _exception2['default']('Arg not supported with multiple decorators'); 24959 } 24960 _utils.extend(this.decorators, name); 24961 } else { 24962 this.decorators[name] = fn; 24963 } 24964 }, 24965 unregisterDecorator: function unregisterDecorator(name) { 24966 delete this.decorators[name]; 24967 } 24968 }; 24969 24970 var log = _logger2['default'].log; 24971 24972 exports.log = log; 24973 exports.createFrame = _utils.createFrame; 24974 exports.logger = _logger2['default']; 24975 24976/***/ }), 24977/* 4 */ 24978/***/ (function(module, exports) { 24979 24980 'use strict'; 24981 24982 exports.__esModule = true; 24983 exports.extend = extend; 24984 exports.indexOf = indexOf; 24985 exports.escapeExpression = escapeExpression; 24986 exports.isEmpty = isEmpty; 24987 exports.createFrame = createFrame; 24988 exports.blockParams = blockParams; 24989 exports.appendContextPath = appendContextPath; 24990 var escape = { 24991 '&': '&', 24992 '<': '<', 24993 '>': '>', 24994 '"': '"', 24995 "'": ''', 24996 '`': '`', 24997 '=': '=' 24998 }; 24999 25000 var badChars = /[&<>"'`=]/g, 25001 possible = /[&<>"'`=]/; 25002 25003 function escapeChar(chr) { 25004 return escape[chr]; 25005 } 25006 25007 function extend(obj /* , ...source */) { 25008 for (var i = 1; i < arguments.length; i++) { 25009 for (var key in arguments[i]) { 25010 if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { 25011 obj[key] = arguments[i][key]; 25012 } 25013 } 25014 } 25015 25016 return obj; 25017 } 25018 25019 var toString = Object.prototype.toString; 25020 25021 exports.toString = toString; 25022 // Sourced from lodash 25023 // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt 25024 /* eslint-disable func-style */ 25025 var isFunction = function isFunction(value) { 25026 return typeof value === 'function'; 25027 }; 25028 // fallback for older versions of Chrome and Safari 25029 /* istanbul ignore next */ 25030 if (isFunction(/x/)) { 25031 exports.isFunction = isFunction = function (value) { 25032 return typeof value === 'function' && toString.call(value) === '[object Function]'; 25033 }; 25034 } 25035 exports.isFunction = isFunction; 25036 25037 /* eslint-enable func-style */ 25038 25039 /* istanbul ignore next */ 25040 var isArray = Array.isArray || function (value) { 25041 return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; 25042 }; 25043 25044 exports.isArray = isArray; 25045 // Older IE versions do not directly support indexOf so we must implement our own, sadly. 25046 25047 function indexOf(array, value) { 25048 for (var i = 0, len = array.length; i < len; i++) { 25049 if (array[i] === value) { 25050 return i; 25051 } 25052 } 25053 return -1; 25054 } 25055 25056 function escapeExpression(string) { 25057 if (typeof string !== 'string') { 25058 // don't escape SafeStrings, since they're already safe 25059 if (string && string.toHTML) { 25060 return string.toHTML(); 25061 } else if (string == null) { 25062 return ''; 25063 } else if (!string) { 25064 return string + ''; 25065 } 25066 25067 // Force a string conversion as this will be done by the append regardless and 25068 // the regex test will do this transparently behind the scenes, causing issues if 25069 // an object's to string has escaped characters in it. 25070 string = '' + string; 25071 } 25072 25073 if (!possible.test(string)) { 25074 return string; 25075 } 25076 return string.replace(badChars, escapeChar); 25077 } 25078 25079 function isEmpty(value) { 25080 if (!value && value !== 0) { 25081 return true; 25082 } else if (isArray(value) && value.length === 0) { 25083 return true; 25084 } else { 25085 return false; 25086 } 25087 } 25088 25089 function createFrame(object) { 25090 var frame = extend({}, object); 25091 frame._parent = object; 25092 return frame; 25093 } 25094 25095 function blockParams(params, ids) { 25096 params.path = ids; 25097 return params; 25098 } 25099 25100 function appendContextPath(contextPath, id) { 25101 return (contextPath ? contextPath + '.' : '') + id; 25102 } 25103 25104/***/ }), 25105/* 5 */ 25106/***/ (function(module, exports, __webpack_require__) { 25107 25108 'use strict'; 25109 25110 var _Object$defineProperty = __webpack_require__(6)['default']; 25111 25112 exports.__esModule = true; 25113 25114 var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; 25115 25116 function Exception(message, node) { 25117 var loc = node && node.loc, 25118 line = undefined, 25119 column = undefined; 25120 if (loc) { 25121 line = loc.start.line; 25122 column = loc.start.column; 25123 25124 message += ' - ' + line + ':' + column; 25125 } 25126 25127 var tmp = Error.prototype.constructor.call(this, message); 25128 25129 // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. 25130 for (var idx = 0; idx < errorProps.length; idx++) { 25131 this[errorProps[idx]] = tmp[errorProps[idx]]; 25132 } 25133 25134 /* istanbul ignore else */ 25135 if (Error.captureStackTrace) { 25136 Error.captureStackTrace(this, Exception); 25137 } 25138 25139 try { 25140 if (loc) { 25141 this.lineNumber = line; 25142 25143 // Work around issue under safari where we can't directly set the column value 25144 /* istanbul ignore next */ 25145 if (_Object$defineProperty) { 25146 Object.defineProperty(this, 'column', { 25147 value: column, 25148 enumerable: true 25149 }); 25150 } else { 25151 this.column = column; 25152 } 25153 } 25154 } catch (nop) { 25155 /* Ignore if the browser is very particular */ 25156 } 25157 } 25158 25159 Exception.prototype = new Error(); 25160 25161 exports['default'] = Exception; 25162 module.exports = exports['default']; 25163 25164/***/ }), 25165/* 6 */ 25166/***/ (function(module, exports, __webpack_require__) { 25167 25168 module.exports = { "default": __webpack_require__(7), __esModule: true }; 25169 25170/***/ }), 25171/* 7 */ 25172/***/ (function(module, exports, __webpack_require__) { 25173 25174 var $ = __webpack_require__(8); 25175 module.exports = function defineProperty(it, key, desc){ 25176 return $.setDesc(it, key, desc); 25177 }; 25178 25179/***/ }), 25180/* 8 */ 25181/***/ (function(module, exports) { 25182 25183 var $Object = Object; 25184 module.exports = { 25185 create: $Object.create, 25186 getProto: $Object.getPrototypeOf, 25187 isEnum: {}.propertyIsEnumerable, 25188 getDesc: $Object.getOwnPropertyDescriptor, 25189 setDesc: $Object.defineProperty, 25190 setDescs: $Object.defineProperties, 25191 getKeys: $Object.keys, 25192 getNames: $Object.getOwnPropertyNames, 25193 getSymbols: $Object.getOwnPropertySymbols, 25194 each: [].forEach 25195 }; 25196 25197/***/ }), 25198/* 9 */ 25199/***/ (function(module, exports, __webpack_require__) { 25200 25201 'use strict'; 25202 25203 var _interopRequireDefault = __webpack_require__(2)['default']; 25204 25205 exports.__esModule = true; 25206 exports.registerDefaultHelpers = registerDefaultHelpers; 25207 25208 var _helpersBlockHelperMissing = __webpack_require__(10); 25209 25210 var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); 25211 25212 var _helpersEach = __webpack_require__(11); 25213 25214 var _helpersEach2 = _interopRequireDefault(_helpersEach); 25215 25216 var _helpersHelperMissing = __webpack_require__(12); 25217 25218 var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); 25219 25220 var _helpersIf = __webpack_require__(13); 25221 25222 var _helpersIf2 = _interopRequireDefault(_helpersIf); 25223 25224 var _helpersLog = __webpack_require__(14); 25225 25226 var _helpersLog2 = _interopRequireDefault(_helpersLog); 25227 25228 var _helpersLookup = __webpack_require__(15); 25229 25230 var _helpersLookup2 = _interopRequireDefault(_helpersLookup); 25231 25232 var _helpersWith = __webpack_require__(16); 25233 25234 var _helpersWith2 = _interopRequireDefault(_helpersWith); 25235 25236 function registerDefaultHelpers(instance) { 25237 _helpersBlockHelperMissing2['default'](instance); 25238 _helpersEach2['default'](instance); 25239 _helpersHelperMissing2['default'](instance); 25240 _helpersIf2['default'](instance); 25241 _helpersLog2['default'](instance); 25242 _helpersLookup2['default'](instance); 25243 _helpersWith2['default'](instance); 25244 } 25245 25246/***/ }), 25247/* 10 */ 25248/***/ (function(module, exports, __webpack_require__) { 25249 25250 'use strict'; 25251 25252 exports.__esModule = true; 25253 25254 var _utils = __webpack_require__(4); 25255 25256 exports['default'] = function (instance) { 25257 instance.registerHelper('blockHelperMissing', function (context, options) { 25258 var inverse = options.inverse, 25259 fn = options.fn; 25260 25261 if (context === true) { 25262 return fn(this); 25263 } else if (context === false || context == null) { 25264 return inverse(this); 25265 } else if (_utils.isArray(context)) { 25266 if (context.length > 0) { 25267 if (options.ids) { 25268 options.ids = [options.name]; 25269 } 25270 25271 return instance.helpers.each(context, options); 25272 } else { 25273 return inverse(this); 25274 } 25275 } else { 25276 if (options.data && options.ids) { 25277 var data = _utils.createFrame(options.data); 25278 data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); 25279 options = { data: data }; 25280 } 25281 25282 return fn(context, options); 25283 } 25284 }); 25285 }; 25286 25287 module.exports = exports['default']; 25288 25289/***/ }), 25290/* 11 */ 25291/***/ (function(module, exports, __webpack_require__) { 25292 25293 'use strict'; 25294 25295 var _interopRequireDefault = __webpack_require__(2)['default']; 25296 25297 exports.__esModule = true; 25298 25299 var _utils = __webpack_require__(4); 25300 25301 var _exception = __webpack_require__(5); 25302 25303 var _exception2 = _interopRequireDefault(_exception); 25304 25305 exports['default'] = function (instance) { 25306 instance.registerHelper('each', function (context, options) { 25307 if (!options) { 25308 throw new _exception2['default']('Must pass iterator to #each'); 25309 } 25310 25311 var fn = options.fn, 25312 inverse = options.inverse, 25313 i = 0, 25314 ret = '', 25315 data = undefined, 25316 contextPath = undefined; 25317 25318 if (options.data && options.ids) { 25319 contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; 25320 } 25321 25322 if (_utils.isFunction(context)) { 25323 context = context.call(this); 25324 } 25325 25326 if (options.data) { 25327 data = _utils.createFrame(options.data); 25328 } 25329 25330 function execIteration(field, index, last) { 25331 if (data) { 25332 data.key = field; 25333 data.index = index; 25334 data.first = index === 0; 25335 data.last = !!last; 25336 25337 if (contextPath) { 25338 data.contextPath = contextPath + field; 25339 } 25340 } 25341 25342 ret = ret + fn(context[field], { 25343 data: data, 25344 blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) 25345 }); 25346 } 25347 25348 if (context && typeof context === 'object') { 25349 if (_utils.isArray(context)) { 25350 for (var j = context.length; i < j; i++) { 25351 if (i in context) { 25352 execIteration(i, i, i === context.length - 1); 25353 } 25354 } 25355 } else { 25356 var priorKey = undefined; 25357 25358 for (var key in context) { 25359 if (context.hasOwnProperty(key)) { 25360 // We're running the iterations one step out of sync so we can detect 25361 // the last iteration without have to scan the object twice and create 25362 // an itermediate keys array. 25363 if (priorKey !== undefined) { 25364 execIteration(priorKey, i - 1); 25365 } 25366 priorKey = key; 25367 i++; 25368 } 25369 } 25370 if (priorKey !== undefined) { 25371 execIteration(priorKey, i - 1, true); 25372 } 25373 } 25374 } 25375 25376 if (i === 0) { 25377 ret = inverse(this); 25378 } 25379 25380 return ret; 25381 }); 25382 }; 25383 25384 module.exports = exports['default']; 25385 25386/***/ }), 25387/* 12 */ 25388/***/ (function(module, exports, __webpack_require__) { 25389 25390 'use strict'; 25391 25392 var _interopRequireDefault = __webpack_require__(2)['default']; 25393 25394 exports.__esModule = true; 25395 25396 var _exception = __webpack_require__(5); 25397 25398 var _exception2 = _interopRequireDefault(_exception); 25399 25400 exports['default'] = function (instance) { 25401 instance.registerHelper('helperMissing', function () /* [args, ]options */{ 25402 if (arguments.length === 1) { 25403 // A missing field in a {{foo}} construct. 25404 return undefined; 25405 } else { 25406 // Someone is actually trying to call something, blow up. 25407 throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); 25408 } 25409 }); 25410 }; 25411 25412 module.exports = exports['default']; 25413 25414/***/ }), 25415/* 13 */ 25416/***/ (function(module, exports, __webpack_require__) { 25417 25418 'use strict'; 25419 25420 exports.__esModule = true; 25421 25422 var _utils = __webpack_require__(4); 25423 25424 exports['default'] = function (instance) { 25425 instance.registerHelper('if', function (conditional, options) { 25426 if (_utils.isFunction(conditional)) { 25427 conditional = conditional.call(this); 25428 } 25429 25430 // Default behavior is to render the positive path if the value is truthy and not empty. 25431 // The `includeZero` option may be set to treat the condtional as purely not empty based on the 25432 // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. 25433 if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { 25434 return options.inverse(this); 25435 } else { 25436 return options.fn(this); 25437 } 25438 }); 25439 25440 instance.registerHelper('unless', function (conditional, options) { 25441 return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); 25442 }); 25443 }; 25444 25445 module.exports = exports['default']; 25446 25447/***/ }), 25448/* 14 */ 25449/***/ (function(module, exports) { 25450 25451 'use strict'; 25452 25453 exports.__esModule = true; 25454 25455 exports['default'] = function (instance) { 25456 instance.registerHelper('log', function () /* message, options */{ 25457 var args = [undefined], 25458 options = arguments[arguments.length - 1]; 25459 for (var i = 0; i < arguments.length - 1; i++) { 25460 args.push(arguments[i]); 25461 } 25462 25463 var level = 1; 25464 if (options.hash.level != null) { 25465 level = options.hash.level; 25466 } else if (options.data && options.data.level != null) { 25467 level = options.data.level; 25468 } 25469 args[0] = level; 25470 25471 instance.log.apply(instance, args); 25472 }); 25473 }; 25474 25475 module.exports = exports['default']; 25476 25477/***/ }), 25478/* 15 */ 25479/***/ (function(module, exports) { 25480 25481 'use strict'; 25482 25483 exports.__esModule = true; 25484 25485 exports['default'] = function (instance) { 25486 instance.registerHelper('lookup', function (obj, field) { 25487 return obj && obj[field]; 25488 }); 25489 }; 25490 25491 module.exports = exports['default']; 25492 25493/***/ }), 25494/* 16 */ 25495/***/ (function(module, exports, __webpack_require__) { 25496 25497 'use strict'; 25498 25499 exports.__esModule = true; 25500 25501 var _utils = __webpack_require__(4); 25502 25503 exports['default'] = function (instance) { 25504 instance.registerHelper('with', function (context, options) { 25505 if (_utils.isFunction(context)) { 25506 context = context.call(this); 25507 } 25508 25509 var fn = options.fn; 25510 25511 if (!_utils.isEmpty(context)) { 25512 var data = options.data; 25513 if (options.data && options.ids) { 25514 data = _utils.createFrame(options.data); 25515 data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); 25516 } 25517 25518 return fn(context, { 25519 data: data, 25520 blockParams: _utils.blockParams([context], [data && data.contextPath]) 25521 }); 25522 } else { 25523 return options.inverse(this); 25524 } 25525 }); 25526 }; 25527 25528 module.exports = exports['default']; 25529 25530/***/ }), 25531/* 17 */ 25532/***/ (function(module, exports, __webpack_require__) { 25533 25534 'use strict'; 25535 25536 var _interopRequireDefault = __webpack_require__(2)['default']; 25537 25538 exports.__esModule = true; 25539 exports.registerDefaultDecorators = registerDefaultDecorators; 25540 25541 var _decoratorsInline = __webpack_require__(18); 25542 25543 var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); 25544 25545 function registerDefaultDecorators(instance) { 25546 _decoratorsInline2['default'](instance); 25547 } 25548 25549/***/ }), 25550/* 18 */ 25551/***/ (function(module, exports, __webpack_require__) { 25552 25553 'use strict'; 25554 25555 exports.__esModule = true; 25556 25557 var _utils = __webpack_require__(4); 25558 25559 exports['default'] = function (instance) { 25560 instance.registerDecorator('inline', function (fn, props, container, options) { 25561 var ret = fn; 25562 if (!props.partials) { 25563 props.partials = {}; 25564 ret = function (context, options) { 25565 // Create a new partials stack frame prior to exec. 25566 var original = container.partials; 25567 container.partials = _utils.extend({}, original, props.partials); 25568 var ret = fn(context, options); 25569 container.partials = original; 25570 return ret; 25571 }; 25572 } 25573 25574 props.partials[options.args[0]] = options.fn; 25575 25576 return ret; 25577 }); 25578 }; 25579 25580 module.exports = exports['default']; 25581 25582/***/ }), 25583/* 19 */ 25584/***/ (function(module, exports, __webpack_require__) { 25585 25586 'use strict'; 25587 25588 exports.__esModule = true; 25589 25590 var _utils = __webpack_require__(4); 25591 25592 var logger = { 25593 methodMap: ['debug', 'info', 'warn', 'error'], 25594 level: 'info', 25595 25596 // Maps a given level value to the `methodMap` indexes above. 25597 lookupLevel: function lookupLevel(level) { 25598 if (typeof level === 'string') { 25599 var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); 25600 if (levelMap >= 0) { 25601 level = levelMap; 25602 } else { 25603 level = parseInt(level, 10); 25604 } 25605 } 25606 25607 return level; 25608 }, 25609 25610 // Can be overridden in the host environment 25611 log: function log(level) { 25612 level = logger.lookupLevel(level); 25613 25614 if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { 25615 var method = logger.methodMap[level]; 25616 if (!console[method]) { 25617 // eslint-disable-line no-console 25618 method = 'log'; 25619 } 25620 25621 for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 25622 message[_key - 1] = arguments[_key]; 25623 } 25624 25625 console[method].apply(console, message); // eslint-disable-line no-console 25626 } 25627 } 25628 }; 25629 25630 exports['default'] = logger; 25631 module.exports = exports['default']; 25632 25633/***/ }), 25634/* 20 */ 25635/***/ (function(module, exports) { 25636 25637 // Build out our basic SafeString type 25638 'use strict'; 25639 25640 exports.__esModule = true; 25641 function SafeString(string) { 25642 this.string = string; 25643 } 25644 25645 SafeString.prototype.toString = SafeString.prototype.toHTML = function () { 25646 return '' + this.string; 25647 }; 25648 25649 exports['default'] = SafeString; 25650 module.exports = exports['default']; 25651 25652/***/ }), 25653/* 21 */ 25654/***/ (function(module, exports, __webpack_require__) { 25655 25656 'use strict'; 25657 25658 var _Object$seal = __webpack_require__(22)['default']; 25659 25660 var _interopRequireWildcard = __webpack_require__(1)['default']; 25661 25662 var _interopRequireDefault = __webpack_require__(2)['default']; 25663 25664 exports.__esModule = true; 25665 exports.checkRevision = checkRevision; 25666 exports.template = template; 25667 exports.wrapProgram = wrapProgram; 25668 exports.resolvePartial = resolvePartial; 25669 exports.invokePartial = invokePartial; 25670 exports.noop = noop; 25671 25672 var _utils = __webpack_require__(4); 25673 25674 var Utils = _interopRequireWildcard(_utils); 25675 25676 var _exception = __webpack_require__(5); 25677 25678 var _exception2 = _interopRequireDefault(_exception); 25679 25680 var _base = __webpack_require__(3); 25681 25682 function checkRevision(compilerInfo) { 25683 var compilerRevision = compilerInfo && compilerInfo[0] || 1, 25684 currentRevision = _base.COMPILER_REVISION; 25685 25686 if (compilerRevision !== currentRevision) { 25687 if (compilerRevision < currentRevision) { 25688 var runtimeVersions = _base.REVISION_CHANGES[currentRevision], 25689 compilerVersions = _base.REVISION_CHANGES[compilerRevision]; 25690 throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); 25691 } else { 25692 // Use the embedded version info since the runtime doesn't know about this revision yet 25693 throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); 25694 } 25695 } 25696 } 25697 25698 function template(templateSpec, env) { 25699 /* istanbul ignore next */ 25700 if (!env) { 25701 throw new _exception2['default']('No environment passed to template'); 25702 } 25703 if (!templateSpec || !templateSpec.main) { 25704 throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); 25705 } 25706 25707 templateSpec.main.decorator = templateSpec.main_d; 25708 25709 // Note: Using env.VM references rather than local var references throughout this section to allow 25710 // for external users to override these as psuedo-supported APIs. 25711 env.VM.checkRevision(templateSpec.compiler); 25712 25713 function invokePartialWrapper(partial, context, options) { 25714 if (options.hash) { 25715 context = Utils.extend({}, context, options.hash); 25716 if (options.ids) { 25717 options.ids[0] = true; 25718 } 25719 } 25720 25721 partial = env.VM.resolvePartial.call(this, partial, context, options); 25722 var result = env.VM.invokePartial.call(this, partial, context, options); 25723 25724 if (result == null && env.compile) { 25725 options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); 25726 result = options.partials[options.name](context, options); 25727 } 25728 if (result != null) { 25729 if (options.indent) { 25730 var lines = result.split('\n'); 25731 for (var i = 0, l = lines.length; i < l; i++) { 25732 if (!lines[i] && i + 1 === l) { 25733 break; 25734 } 25735 25736 lines[i] = options.indent + lines[i]; 25737 } 25738 result = lines.join('\n'); 25739 } 25740 return result; 25741 } else { 25742 throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); 25743 } 25744 } 25745 25746 // Just add water 25747 var container = { 25748 strict: function strict(obj, name) { 25749 if (!(name in obj)) { 25750 throw new _exception2['default']('"' + name + '" not defined in ' + obj); 25751 } 25752 return obj[name]; 25753 }, 25754 lookup: function lookup(depths, name) { 25755 var len = depths.length; 25756 for (var i = 0; i < len; i++) { 25757 if (depths[i] && depths[i][name] != null) { 25758 return depths[i][name]; 25759 } 25760 } 25761 }, 25762 lambda: function lambda(current, context) { 25763 return typeof current === 'function' ? current.call(context) : current; 25764 }, 25765 25766 escapeExpression: Utils.escapeExpression, 25767 invokePartial: invokePartialWrapper, 25768 25769 fn: function fn(i) { 25770 var ret = templateSpec[i]; 25771 ret.decorator = templateSpec[i + '_d']; 25772 return ret; 25773 }, 25774 25775 programs: [], 25776 program: function program(i, data, declaredBlockParams, blockParams, depths) { 25777 var programWrapper = this.programs[i], 25778 fn = this.fn(i); 25779 if (data || depths || blockParams || declaredBlockParams) { 25780 programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); 25781 } else if (!programWrapper) { 25782 programWrapper = this.programs[i] = wrapProgram(this, i, fn); 25783 } 25784 return programWrapper; 25785 }, 25786 25787 data: function data(value, depth) { 25788 while (value && depth--) { 25789 value = value._parent; 25790 } 25791 return value; 25792 }, 25793 merge: function merge(param, common) { 25794 var obj = param || common; 25795 25796 if (param && common && param !== common) { 25797 obj = Utils.extend({}, common, param); 25798 } 25799 25800 return obj; 25801 }, 25802 // An empty object to use as replacement for null-contexts 25803 nullContext: _Object$seal({}), 25804 25805 noop: env.VM.noop, 25806 compilerInfo: templateSpec.compiler 25807 }; 25808 25809 function ret(context) { 25810 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 25811 25812 var data = options.data; 25813 25814 ret._setup(options); 25815 if (!options.partial && templateSpec.useData) { 25816 data = initData(context, data); 25817 } 25818 var depths = undefined, 25819 blockParams = templateSpec.useBlockParams ? [] : undefined; 25820 if (templateSpec.useDepths) { 25821 if (options.depths) { 25822 depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; 25823 } else { 25824 depths = [context]; 25825 } 25826 } 25827 25828 function main(context /*, options*/) { 25829 return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); 25830 } 25831 main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); 25832 return main(context, options); 25833 } 25834 ret.isTop = true; 25835 25836 ret._setup = function (options) { 25837 if (!options.partial) { 25838 container.helpers = container.merge(options.helpers, env.helpers); 25839 25840 if (templateSpec.usePartial) { 25841 container.partials = container.merge(options.partials, env.partials); 25842 } 25843 if (templateSpec.usePartial || templateSpec.useDecorators) { 25844 container.decorators = container.merge(options.decorators, env.decorators); 25845 } 25846 } else { 25847 container.helpers = options.helpers; 25848 container.partials = options.partials; 25849 container.decorators = options.decorators; 25850 } 25851 }; 25852 25853 ret._child = function (i, data, blockParams, depths) { 25854 if (templateSpec.useBlockParams && !blockParams) { 25855 throw new _exception2['default']('must pass block params'); 25856 } 25857 if (templateSpec.useDepths && !depths) { 25858 throw new _exception2['default']('must pass parent depths'); 25859 } 25860 25861 return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); 25862 }; 25863 return ret; 25864 } 25865 25866 function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { 25867 function prog(context) { 25868 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 25869 25870 var currentDepths = depths; 25871 if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { 25872 currentDepths = [context].concat(depths); 25873 } 25874 25875 return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); 25876 } 25877 25878 prog = executeDecorators(fn, prog, container, depths, data, blockParams); 25879 25880 prog.program = i; 25881 prog.depth = depths ? depths.length : 0; 25882 prog.blockParams = declaredBlockParams || 0; 25883 return prog; 25884 } 25885 25886 function resolvePartial(partial, context, options) { 25887 if (!partial) { 25888 if (options.name === '@partial-block') { 25889 partial = options.data['partial-block']; 25890 } else { 25891 partial = options.partials[options.name]; 25892 } 25893 } else if (!partial.call && !options.name) { 25894 // This is a dynamic partial that returned a string 25895 options.name = partial; 25896 partial = options.partials[partial]; 25897 } 25898 return partial; 25899 } 25900 25901 function invokePartial(partial, context, options) { 25902 // Use the current closure context to save the partial-block if this partial 25903 var currentPartialBlock = options.data && options.data['partial-block']; 25904 options.partial = true; 25905 if (options.ids) { 25906 options.data.contextPath = options.ids[0] || options.data.contextPath; 25907 } 25908 25909 var partialBlock = undefined; 25910 if (options.fn && options.fn !== noop) { 25911 (function () { 25912 options.data = _base.createFrame(options.data); 25913 // Wrapper function to get access to currentPartialBlock from the closure 25914 var fn = options.fn; 25915 partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { 25916 var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; 25917 25918 // Restore the partial-block from the closure for the execution of the block 25919 // i.e. the part inside the block of the partial call. 25920 options.data = _base.createFrame(options.data); 25921 options.data['partial-block'] = currentPartialBlock; 25922 return fn(context, options); 25923 }; 25924 if (fn.partials) { 25925 options.partials = Utils.extend({}, options.partials, fn.partials); 25926 } 25927 })(); 25928 } 25929 25930 if (partial === undefined && partialBlock) { 25931 partial = partialBlock; 25932 } 25933 25934 if (partial === undefined) { 25935 throw new _exception2['default']('The partial ' + options.name + ' could not be found'); 25936 } else if (partial instanceof Function) { 25937 return partial(context, options); 25938 } 25939 } 25940 25941 function noop() { 25942 return ''; 25943 } 25944 25945 function initData(context, data) { 25946 if (!data || !('root' in data)) { 25947 data = data ? _base.createFrame(data) : {}; 25948 data.root = context; 25949 } 25950 return data; 25951 } 25952 25953 function executeDecorators(fn, prog, container, depths, data, blockParams) { 25954 if (fn.decorator) { 25955 var props = {}; 25956 prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); 25957 Utils.extend(prog, props); 25958 } 25959 return prog; 25960 } 25961 25962/***/ }), 25963/* 22 */ 25964/***/ (function(module, exports, __webpack_require__) { 25965 25966 module.exports = { "default": __webpack_require__(23), __esModule: true }; 25967 25968/***/ }), 25969/* 23 */ 25970/***/ (function(module, exports, __webpack_require__) { 25971 25972 __webpack_require__(24); 25973 module.exports = __webpack_require__(29).Object.seal; 25974 25975/***/ }), 25976/* 24 */ 25977/***/ (function(module, exports, __webpack_require__) { 25978 25979 // 19.1.2.17 Object.seal(O) 25980 var isObject = __webpack_require__(25); 25981 25982 __webpack_require__(26)('seal', function($seal){ 25983 return function seal(it){ 25984 return $seal && isObject(it) ? $seal(it) : it; 25985 }; 25986 }); 25987 25988/***/ }), 25989/* 25 */
vendor: 4,662 bytes, lines 25990-26152
25990/***/ (function(module, exports) { 25991 25992 module.exports = function(it){ 25993 return typeof it === 'object' ? it !== null : typeof it === 'function'; 25994 }; 25995 25996/***/ }), 25997/* 26 */ 25998/***/ (function(module, exports, __webpack_require__) { 25999 26000 // most Object methods by ES6 should accept primitives 26001 var $export = __webpack_require__(27) 26002 , core = __webpack_require__(29) 26003 , fails = __webpack_require__(32); 26004 module.exports = function(KEY, exec){ 26005 var fn = (core.Object || {})[KEY] || Object[KEY] 26006 , exp = {}; 26007 exp[KEY] = exec(fn); 26008 $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); 26009 }; 26010 26011/***/ }), 26012/* 27 */ 26013/***/ (function(module, exports, __webpack_require__) { 26014 26015 var global = __webpack_require__(28) 26016 , core = __webpack_require__(29) 26017 , ctx = __webpack_require__(30) 26018 , PROTOTYPE = 'prototype'; 26019 26020 var $export = function(type, name, source){ 26021 var IS_FORCED = type & $export.F 26022 , IS_GLOBAL = type & $export.G 26023 , IS_STATIC = type & $export.S 26024 , IS_PROTO = type & $export.P 26025 , IS_BIND = type & $export.B 26026 , IS_WRAP = type & $export.W 26027 , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) 26028 , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] 26029 , key, own, out; 26030 if(IS_GLOBAL)source = name; 26031 for(key in source){ 26032 // contains in native 26033 own = !IS_FORCED && target && key in target; 26034 if(own && key in exports)continue; 26035 // export native or passed 26036 out = own ? target[key] : source[key]; 26037 // prevent global pollution for namespaces 26038 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] 26039 // bind timers to global for call from export context 26040 : IS_BIND && own ? ctx(out, global) 26041 // wrap global constructors for prevent change them in library 26042 : IS_WRAP && target[key] == out ? (function(C){ 26043 var F = function(param){ 26044 return this instanceof C ? new C(param) : C(param); 26045 }; 26046 F[PROTOTYPE] = C[PROTOTYPE]; 26047 return F; 26048 // make static versions for prototype methods 26049 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; 26050 if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; 26051 } 26052 }; 26053 // type bitmap 26054 $export.F = 1; // forced 26055 $export.G = 2; // global 26056 $export.S = 4; // static 26057 $export.P = 8; // proto 26058 $export.B = 16; // bind 26059 $export.W = 32; // wrap 26060 module.exports = $export; 26061 26062/***/ }), 26063/* 28 */ 26064/***/ (function(module, exports) { 26065 26066 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 26067 var global = module.exports = typeof window != 'undefined' && window.Math == Math 26068 ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); 26069 if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef 26070 26071/***/ }), 26072/* 29 */ 26073/***/ (function(module, exports) { 26074 26075 var core = module.exports = {version: '1.2.6'}; 26076 if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef 26077 26078/***/ }), 26079/* 30 */ 26080/***/ (function(module, exports, __webpack_require__) { 26081 26082 // optional / simple context binding 26083 var aFunction = __webpack_require__(31); 26084 module.exports = function(fn, that, length){ 26085 aFunction(fn); 26086 if(that === undefined)return fn; 26087 switch(length){ 26088 case 1: return function(a){ 26089 return fn.call(that, a); 26090 }; 26091 case 2: return function(a, b){ 26092 return fn.call(that, a, b); 26093 }; 26094 case 3: return function(a, b, c){ 26095 return fn.call(that, a, b, c); 26096 }; 26097 } 26098 return function(/* ...args */){ 26099 return fn.apply(that, arguments); 26100 }; 26101 }; 26102 26103/***/ }), 26104/* 31 */ 26105/***/ (function(module, exports) { 26106 26107 module.exports = function(it){ 26108 if(typeof it != 'function')throw TypeError(it + ' is not a function!'); 26109 return it; 26110 }; 26111 26112/***/ }), 26113/* 32 */ 26114/***/ (function(module, exports) { 26115 26116 module.exports = function(exec){ 26117 try { 26118 return !!exec(); 26119 } catch(e){ 26120 return true; 26121 } 26122 }; 26123 26124/***/ }), 26125/* 33 */ 26126/***/ (function(module, exports) { 26127 26128 /* WEBPACK VAR INJECTION */(function(global) {/* global window */ 26129 'use strict'; 26130 26131 exports.__esModule = true; 26132 26133 exports['default'] = function (Handlebars) { 26134 /* istanbul ignore next */ 26135 var root = typeof global !== 'undefined' ? global : window, 26136 $Handlebars = root.Handlebars; 26137 /* istanbul ignore next */ 26138 Handlebars.noConflict = function () { 26139 if (root.Handlebars === Handlebars) { 26140 root.Handlebars = $Handlebars; 26141 } 26142 return Handlebars; 26143 }; 26144 }; 26145 26146 module.exports = exports['default']; 26147 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) 26148 26149/***/ }) 26150/******/ ]) 26151}); 26152;
26153redesign.define('corePartial/url',['handlebars'], function(Handlebars) { 26154 26155this["ANF"] = this["ANF"] || {}; 26156this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 26157 26158Handlebars.registerPartial("url", this["ANF"]["templates"]["url"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 26159 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 26160 26161 return ((stack1 = helpers["if"].call(alias1,((stack1 = (data && data.root)) && stack1.protocol),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 26162 + ((stack1 = helpers["if"].call(alias1,((stack1 = (data && data.root)) && stack1.user),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 26163 + container.escapeExpression(container.lambda((depth0 != null ? depth0.host : depth0), depth0)) 26164 + ((stack1 = helpers["if"].call(alias1,((stack1 = (data && data.root)) && stack1.port),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 26165},"2":function(container,depth0,helpers,partials,data) { 26166 var stack1; 26167 26168 return container.escapeExpression(container.lambda(((stack1 = (data && data.root)) && stack1.protocol), depth0)) 26169 + "://"; 26170},"4":function(container,depth0,helpers,partials,data) { 26171 var stack1; 26172 26173 return container.escapeExpression(container.lambda(((stack1 = (data && data.root)) && stack1.user), depth0)) 26174 + "@"; 26175},"6":function(container,depth0,helpers,partials,data) { 26176 var stack1; 26177 26178 return ":" 26179 + container.escapeExpression(container.lambda(((stack1 = (data && data.root)) && stack1.port), depth0)); 26180},"8":function(container,depth0,helpers,partials,data) { 26181 var stack1; 26182 26183 return ((stack1 = container.lambda(((stack1 = (data && data.root)) && stack1.path), depth0)) != null ? stack1 : ""); 26184},"10":function(container,depth0,helpers,partials,data) { 26185 var stack1; 26186 26187 return "?" 26188 + ((stack1 = container.lambda(((stack1 = (data && data.root)) && stack1.search), depth0)) != null ? stack1 : ""); 26189},"12":function(container,depth0,helpers,partials,data) { 26190 var stack1; 26191 26192 return "#" 26193 + container.escapeExpression(container.lambda(((stack1 = (data && data.root)) && stack1.hash), depth0)); 26194},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 26195 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 26196 26197 return ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.host : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 26198 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.path : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 26199 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.search : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 26200 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.hash : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 26201},"useData":true})); 26202 26203return this["ANF"]; 26204 26205}); 26206redesign.define('coreServices/url',[
26207 'corePartial/url', 26208 'anfUtil/testFramework', 26209 'coreServices/window', 26210 'anfUtil/constants' 26211], function urlService( 26212 corePartialUrl, 26213 test, 26214 windowService, 26215 constants 26216) { 26217 'use strict'; 26218 26219 var changeLanguageOnSEOUrl = function changeLanguageOnSEOUrl(url, languageCode) { 26220 var baseLang = constants.anf('params.storeAttributes.siteList.isCNSite') ? 26221 'zh' : 26222 'en'; 26223 26224 var myLanguageCode = (languageCode.toLowerCase() !== baseLang) ? '-' + languageCode : ''; 26225 26226 return url.replace( 26227 /(\/shop\/(us|eu|wd|ca|uk|am|cn))(-.{2})?/, 26228 '$1' + myLanguageCode 26229 ); 26230 }; 26231 26232 26233 /** 26234 * @module coreServices/url 26235 * @see module:anfUtil/testFramework 26236 */ 26237 26238 /** 26239 * @alias module:coreServices/url 26240 */ 26241 var service = { 26242 /* ****************************** START parseUri 1.2.2 ****************************** */ 26243 /* parseUri 1.2.2 26244 * (c) Steven Levithan <stevenlevithan.com> 26245 * MIT License 26246 */ 26247 /** 26248 * @name _parseUri 26249 * @description Parse the supplied URI 26250 * @param {string} str The URI to parse 26251 * @param {boolean} useStrict Enable strict parsing 26252 * @return {string} The parsed URI 26253 * @private 26254 */ 26255 _parseUri: function _parseUri(str, useStrict) { 26256 var o = { 26257 strictMode: (typeof useStrict === 'boolean') ? useStrict : false, 26258 key: ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'], 26259 q: { 26260 name: 'queryKey', 26261 parser: /(?:^|&)([^&=]*)=?([^&]*)/g 26262 }, 26263 parser: { 26264 strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, 26265 loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ 26266 } 26267 }; 26268 var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str); 26269 var uri = {}; 26270 var i = 14; 26271 26272 while (i--) uri[o.key[i]] = m[i] || ''; 26273 26274 uri[o.q.name] = {}; 26275 uri[o.key[12]].replace(o.q.parser, function replaceFunc($0, $1, $2) { 26276 var keyName = $1; 26277 var keyValue = $2; 26278 var uriKeyName = o.q.name; 26279 26280 if (keyName) { 26281 // uri[uriSingleKeyName][keyName] = keyValue; 26282 uri[uriKeyName][keyName] = uri[uriKeyName][keyName] || []; 26283 uri[uriKeyName][keyName].push(keyValue); 26284 } 26285 }); 26286 return uri; 26287 }, 26288 /* ****************************** END parseUri 1.2.2 ****************************** */ 26289 'construct': function construct(urlObject) { 26290 var myUrl = $.extend(true, {}, urlObject); 26291 26292 if ( 26293 test.object.containsKey(myUrl, 'search', false) && 26294 test.type.object(myUrl.search) && 26295 test.object.not.null(myUrl.search, false) 26296 ) { 26297 myUrl.search = $.param(myUrl.search); 26298 } else if (test.object.containsKey(myUrl, 'search', false)) { 26299 delete myUrl.search; 26300 } 26301 26302 return corePartialUrl.templates.url(myUrl); 26303 }, 26304 /** 26305 * @description: Breaks down a url into its parts and returns it as a JS Object. 26306 * @param {string} url - a url to be parsed 26307 * @param {boolean} decode Enable decoding of the URL 26308 * @return {Object} 26309 **/ 26310 'deconstruct': function deconstruct(url, decode) { 26311 var parsedUri = {}; 26312 var urlObj = {}; 26313 var uriDecode = decode; 26314 26315 uriDecode = (typeof uriDecode === 'boolean' ? uriDecode : true); 26316 parsedUri = this._parseUri(url); 26317 urlObj = { 26318 hash: parsedUri.anchor, 26319 protocol: parsedUri.protocol, 26320 search: parsedUri.queryKey, 26321 host: parsedUri.host, 26322 port: parsedUri.port, 26323 path: parsedUri.path 26324 }; 26325 26326 if ( 26327 test.object.containsKey(urlObj, 'search', false) && 26328 test.object.not.empty(urlObj.search, false) 26329 ) { 26330 urlObj.search = Object.keys(urlObj.search) 26331 .map(function outerMapFunc(keyName) { 26332 var keyValue = urlObj.search[keyName]; 26333 if (test.array.not.empty(keyValue, false)) { 26334 return keyValue.map(function innerMapFunc(value) { 26335 var keySubValue = value; 26336 keySubValue = uriDecode ? decodeURIComponent(keySubValue) : keySubValue; 26337 return { 26338 'name': keyName, 26339 'value': keySubValue 26340 }; 26341 }); 26342 } 26343 26344 return []; 26345 }) 26346 .filter(function filterFunc(value) { 26347 return test.array.not.empty(value, false); 26348 }) 26349 .reduce(function reduceFunc(previousValue, currentValue) { 26350 return previousValue.concat(currentValue); 26351 }, []); 26352 } else if ( 26353 test.object.containsKey(urlObj, 'search', false) && 26354 test.object.empty(urlObj.search, false) 26355 ) { 26356 urlObj.search = []; 26357 } 26358 26359 return urlObj; 26360 }, 26361 /**
26362 * @description: Checks to see if a url or deconstructed url is a ANF SEO url 26363 * @param {string|object} url - the url to be checked 26364 * @returns {boolean} return true if the supplied object is an ANF SEO url 26365 **/ 26366 'isSEO': function isSEO(url) { 26367 var urlToCheck = url; 26368 26369 if (test.string.not.empty(urlToCheck, false)) { 26370 urlToCheck = this.deconstruct(urlToCheck); 26371 } 26372 26373 urlToCheck = test.object.empty(urlToCheck, true) ? {} : urlToCheck; 26374 26375 return (( 26376 test.string.empty(urlToCheck.host, true) || 26377 ( 26378 test.string.not.empty(urlToCheck.host) && 26379 /(abercrombie|hollisterco)/.test(urlToCheck.host) 26380 ) 26381 ) && 26382 test.string.not.empty(urlToCheck.path, false) && 26383 /^\/shop\/.{2}(-.{2})?(\/|$)/.test(urlToCheck.path)); 26384 }, 26385 /** 26386 * @description: Updates the query string of a url 26387 * @param {string} url - the url to be modified 26388 * @param {array} objArray - a list of objects contains the name and value of a query string parameter 26389 * @param {boolean} [writeover=true] - flag to over write the values that are currently in the query string, if they exists 26390 * @returns {string} the modified url string 26391 */ 26392 'modifySearch': function modifySearch(url, objArray, writeover) { 26393 var overwrite = writeover; 26394 var params = objArray; 26395 var urlToModify = url; 26396 26397 overwrite = test.type.boolean(overwrite) ? overwrite : true; 26398 params = test.type.array(params) ? params : []; 26399 urlToModify = test.type.string(urlToModify) ? this.deconstruct(urlToModify) : urlToModify; 26400 urlToModify.search = test.type.array(urlToModify.search) ? urlToModify.search : []; 26401 26402 if (overwrite) { 26403 var uniuqeParamKeys = Object.keys( 26404 params.reduce(function reduceFunc(previousValue, currentValue) { 26405 previousValue[currentValue.name] = 1; 26406 return previousValue; 26407 }, {}) 26408 ); 26409 26410 urlToModify.search = urlToModify.search.filter(function filterFunc(currentValue) { 26411 return uniuqeParamKeys.indexOf(currentValue.name) === -1; 26412 }); 26413 } 26414 26415 params = params.filter(function filterFunc(currentValue) { 26416 return test.type.defined(currentValue.value) && test.object.not.null(currentValue.value, true); 26417 }); 26418 26419 urlToModify.search = urlToModify.search.concat(params); 26420 26421 return this.construct(urlToModify); 26422 }, 26423 26424 /** 26425 * @description: Update a PDP url - Multiple page Page Defs 26426 * @param {string} url - the url to be modified 26427 * @param {array} params - a list of objects contains the name and value of a query string parameter 26428 * @param {boolean} [overwrite=true] - flag to over write the values that are currently in the query string, if they exists 26429 * @returns {string} the modified url string 26430 */ 26431 'updatePdpUrl': function updatePdpUrl(url, params, overwrite) { 26432 return this.modifySearch(url, params, overwrite); 26433 }, 26434 26435 /** 26436 * Get Current Page URL 26437 * @returns {string} Page URL 26438 */ 26439 getCurrentPageUrl: windowService.location.getHref, 26440 26441 /** 26442 * Modify current URL history entry 26443 * @param {Object} stateObj State of the Object 26444 * @param {string} documentTitle Document title 26445 * @param {string} url Url 26446 * @returns {true|*} is updated 26447 */ 26448 replaceUrlState: function replaceUrlState(stateObj, documentTitle, url) { 26449 return history.replaceState(stateObj, documentTitle, url); 26450 }, 26451 26452 replaceLanguage: function replaceLanguage(url, langCode, langId) { 26453 return this.isSEO(url) 26454 ? changeLanguageOnSEOUrl(url, langCode) 26455 : this.modifySearch(url, [{name: 'langId', value: langId}], true); 26456 } 26457 }; 26458 26459 ANF = ANF || {}; 26460 ANF.legacy = ANF.legacy || {}; 26461 ANF.legacy.url = service; 26462 26463 ANF_helper.utility = ANF_helper.utility || {}; 26464 ANF_helper.utility.url = service; 26465 26466 return service; 26467}); 26468 26469(function serializeObjectUMD(factory) { 26470 'use strict'; 26471 if (typeof redesign.define === 'function' && redesign.define.amd) { 26472 // AMD (Register as an anonymous module) 26473 redesign.define('base/js/include/serializeObject',['jquery'], factory); 26474 } else if (typeof exports === 'object') { 26475 // Node/CommonJS 26476 module.exports = factory(require('jquery')); 26477 } else { 26478 // Browser globals 26479 factory(jQuery); 26480 } 26481}(function serializeObjectFactory($) { 26482 'use strict'; 26483 // http://stackoverflow.com/questions/1184624/convert-form-data-to-javascript-object-with-jquery 26484 // eslint-disable-next-line no-param-reassign 26485 $.fn.serializeObject = function serializeObject() { 26486 var o = {}; 26487 var a = this.serializeArray(); 26488 $.each(a, function serializeEachObject() { 26489 // eslint-disable-next-line no-undefined 26490 if (o[this.name] !== undefined) { 26491 if (!o[this.name].push) { 26492 o[this.name] = [o[this.name]]; 26493 } 26494 o[this.name].push(this.value || ''); 26495 } else { 26496 o[this.name] = this.value || ''; 26497 } 26498 }); 26499 return o; 26500 }; 26501})); 26502 26503redesign.define('base/js/site/catalog/giftcard',[ 26504 'coreServices/window', 26505 'coreServices/url', 26506 'anfUtil/constants', 26507 'jsCookie', 26508 'base/js/include/serializeObject' 26509], function siteCatalogGiftcard( 26510 windowService, 26511 urlService, 26512 anfConstants, 26513 cookies 26514) { 26515 'use strict'; 26516 26517 (function giftcard($, ANF) { 26518 var dynamicCurrency = { 26519 refresh: function refresh() { 26520 windowService.location.reload(); 26521 }, 26522 submitToAPI: function submitToAPI(event) { 26523 var ajaxData = {}; 26524 var ajaxSettings = {}; 26525 var formData = {}; 26526 var jqForm = $(this); 26527 26528 event.preventDefault(); 26529 26530 if (jqForm.length >= 1) { 26531 formData = jqForm.serializeObject(); 26532 26533 ajaxData.country = formData.country; 26534 ajaxData.currency = formData.currency; 26535 26536 ajaxSettings = { 26537 url: urlService.construct({ 26538 host: windowService.location.getHost(), 26539 path: anfConstants.anf('params.storeAttributes.apiURLRoot').
26539concat('/session/preferences/currencies'), 26540 protocol: 'https' 26541 }), 26542 dataType: 'json', 26543 contentType: 'application/json', 26544 type: 'POST', 26545 data: JSON.stringify(ajaxData), 26546 xhrFields: { 26547 withCredentials: true 26548 } 26549 }; 26550 $.ajax(ajaxSettings).success(dynamicCurrency.refresh); 26551 } 26552 return false; 26553 }, 26554 getUPrefCookie: function getUPrefCookie() { 26555 var cookie = cookies.get('uPref') || '{}'; 26556 var response = {}; 26557 26558 if (typeof cookie === 'string' && cookie.trim().length >= 1) { 26559 response = JSON.parse(cookie); 26560 } 26561 26562 return response; 26563 }, 26564 canPurchaseGC: function canPurchaseGC(settings) { 26565 var mySettings = { 26566 currency: '' 26567 }; 26568 var response = false; 26569 var storeCurrency = ANF.params.storeAttributes.currency || 'USD'; 26570 26571 $.extend(mySettings, settings); 26572 26573 if (ANF.params.storeAttributes.userPreference.currency.enabled !== true || $('.has-user-preference').length < 1 || 26574 ($('.has-user-preference').length >= 1 && 26575 typeof mySettings.currency === 'string' && mySettings.currency.trim().length >= 1 && 26576 typeof storeCurrency === 'string' && storeCurrency.trim().length >= 1 && 26577 mySettings.currency.trim().toLowerCase() === storeCurrency.trim().toLowerCase()) 26578 26579 ) { 26580 response = true; 26581 } 26582 26583 return response; 26584 }, 26585 updateForm: function updateForm(settings) { 26586 var mySettings = { 26587 invalidCurrency: { 26588 iso: '', 26589 symbol: '' 26590 }, 26591 validCurrency: { 26592 iso: '', 26593 symbol: '' 26594 }, 26595 country: { 26596 iso: '' 26597 } 26598 }; 26599 var jqGcCurrencyChangeForm = $(); 26600 var invalidCurrencyName = ''; 26601 var validCurrencyName = ''; 26602 26603 $.extend(true, mySettings, settings); 26604 26605 invalidCurrencyName = mySettings.invalidCurrency.iso; 26606 26607 if (typeof mySettings.invalidCurrency.symbol === 'string' && mySettings.invalidCurrency.symbol.trim().length >= 1) { 26608 invalidCurrencyName = mySettings.invalidCurrency.symbol + ' ' + invalidCurrencyName; 26609 } 26610 26611 validCurrencyName = mySettings.validCurrency.iso; 26612 26613 if (typeof mySettings.validCurrency.symbol === 'string' && mySettings.validCurrency.symbol.trim().length >= 1) { 26614 validCurrencyName = mySettings.validCurrency.symbol + ' ' + validCurrencyName; 26615 } 26616 26617 jqGcCurrencyChangeForm = $('.dynamic-currency-message'); 26618 26619 jqGcCurrencyChangeForm.find('input[name=country]').val(mySettings.country.iso); 26620 jqGcCurrencyChangeForm.find('input[name=currency]').val(mySettings.validCurrency.iso); 26621 26622 jqGcCurrencyChangeForm.find('.dynamic-currency-message__invalid-currency-name').html(invalidCurrencyName); 26623 jqGcCurrencyChangeForm.find('.dynamic-currency-message__valid-currency-name').html(validCurrencyName); 26624 26625 if (!ANF.params.storeAttributes.catalogV2.hasEGifter) { 26626 jqGcCurrencyChangeForm.find('input[type=submit]').val(validCurrencyName); 26627 } 26628 jqGcCurrencyChangeForm.on('submit', dynamicCurrency.submitToAPI); 26629 26630 $('.gc-wrapper__disabled-currency-message .dynamic-currency-message__valid-currency-name').html(validCurrencyName); 26631 }, 26632 init: function init() { 26633 var uPref = { 26634 cur: ANF.params.storeAttributes.currency, 26635 sf: ANF.params.storeAttributes.country 26636 }; 26637 var userPreference = ANF.params.storeAttributes.userPreference; 26638 $.extend(uPref, dynamicCurrency.getUPrefCookie()); 26639 26640 if (!dynamicCurrency.canPurchaseGC({currency: uPref.cur})) { 26641 var $giftcardContent = $('.giftcard-content'); 26642 var $giftCardUAEMessaging = $giftcardContent.find('.giftcard-error-message_UAE'); 26643 var $giftCardStandardMessaging = $giftcardContent.find('.giftcard-error-message, .dynamic-currency-message__action--active'); 26644 26645 dynamicCurrency.updateForm({ 26646 invalidCurrency: userPreference.currency.map[uPref.cur], 26647 validCurrency: userPreference.currency.map[ANF.params.storeAttributes.currency], 26648 country: userPreference.countries.map[uPref.sf] 26649 }); 26650 if (userPreference.currency.map[uPref.cur].iso === 'AED') { 26651 $giftCardStandardMessaging.hide(); 26652 $giftCardUAEMessaging.show(); 26653 } else { 26654 $giftCardStandardMessaging.show(); 26655 $giftCardUAEMessaging.hide(); 26656 } 26657 $('.giftcard-content').addClass('cannot-purchase-gift-card'); 26658 } else { 26659 // This class is used as a way to defer the user from clicking the buy 26660 // button until the page has full completed loading. Otherwise the user can select 26661 // the gift card button even when the user has a non-USD currency. 26662 $('.giftcard-content').addClass('can-purchase-gift-card'); 26663 } 26664 } 26665 }; 26666 26667 var checkForApps = function checkForApps() { 26668 if (window.location.href.indexOf('cmp=AnfMobileApp') > -1) { 26669 $('.can-purchase-gift-card a').each(function appendAppRedirect() { 26670 if (this.href.indexOf('giftcards.abercrombie.com/gifter') > -1 || this.href.indexOf('giftcards.hollisterco.com/gifter') > -1) { 26671 this.href = this.href + '&AppRedirect=bag'; 26672 } 26673 }); 26674 } 26675 }; 26676 26677 ANF.catalog.giftcard = (function giftcardInit() { 26678 return { 26679 init: $.noop 26680 }; 26681 })(); 26682 26683 ANF.catalog.giftcard.category = (function giftcardCategory() { 26684 return {
26685 init: function init() { 26686 dynamicCurrency.init(); 26687 checkForApps(); 26688 } 26689 }; 26690 })(); 26691 })(jQuery, ANF, ANF_helper); 26692}); 26693 26694(function (factory) { 26695 if (typeof redesign.define === 'function' && redesign.define.amd) { 26696 // AMD (Register as an anonymous module) 26697 redesign.define('base/js/include/imageLoadFix',['jquery'], factory); 26698 } else if (typeof exports === 'object') { 26699 // Node/CommonJS 26700 module.exports = factory(require('jquery')); 26701 } else { 26702 // Browser globals 26703 factory(jQuery); 26704 } 26705}(function ($) { 26706 /* 26707 * @author Robert Campbell 26708 * @description Plugin to allow the accurate load event of images. See section "Caveats of the load event when used with images" on http://api.jquery.com/load-event/ 26709 */ 26710 var timeoutIdDataVarName = 'imageLoadFixTimeoutId'; 26711 var namespace = 'imageLoadFix'; 26712 var timeoutCleanup = function () { 26713 var timeoutId = $(this).data(timeoutIdDataVarName); 26714 if (timeoutId) { 26715 try { 26716 clearTimeout(timeoutId); 26717 } catch (e) { 26718 // do nothing 26719 } finally { 26720 $(this).imageLoadFix('destroy'); 26721 } 26722 } 26723 }; 26724 var callbacks = { 26725 /* 26726 * @author Robert Campbell 26727 * @description handler for when the image loads with no issue. 26728 */ 26729 load: timeoutCleanup, 26730 /* 26731 * @author Robert Campbell 26732 * @description handler for when the image does not load correctly. 26733 */ 26734 error: timeoutCleanup, 26735 /* 26736 * @author Robert Campbell 26737 * @description handler for when the image has yet to finish downloading. 26738 */ 26739 notThereYet: function () { 26740 var $this = $(this); 26741 $this.data(timeoutIdDataVarName, setTimeout(function () { 26742 checkLoaded.apply($this); 26743 }, 100)); 26744 } 26745 }; 26746 var methods = { 26747 /* 26748 * @author Robert Campbell 26749 * @description This will initialize the plugin for the given elements that are images and do not already have the class imageLoadFix to avoid binding to things that do not need the events bound. The following evnets are bound by this plugin : load.imageLoadFix, error.imageLoadFix, notThereYet.imageLoadFix. 26750 */ 26751 init: function () { 26752 this.filter('img').not('.' + namespace) 26753 .on(getFunctionNamespace('load'), callbacks.load) 26754 .on(getFunctionNamespace('error'), callbacks.error) 26755 .on(getFunctionNamespace('notThereYet'), callbacks.notThereYet) 26756 .addClass(namespace) 26757 .end() 26758 .trigger('notThereYet'); 26759 return this; 26760 }, 26761 /* 26762 * @author Robert Campbell 26763 * @description This is a clean up method. This will remove all events in the .imageLoadFix event namespace 26764 */ 26765 destroy: function () { 26766 this.filter('img') 26767 .off('.' + namespace) 26768 .removeClass(namespace) 26769 .each(function (index, element) { 26770 var $element = $(this); 26771 var timeoutId = $element.data(timeoutIdDataVarName); 26772 if (timeoutId) { 26773 clearTimeout(timeoutId); 26774 $element.data(timeoutIdDataVarName, ''); 26775 } 26776 }); 26777 return this; 26778 } 26779 }; 26780 26781 /* 26782 * @author Robert Campbell 26783 * @description Helper function to concatenate the eName, '.', and the namespace. If namespace is empty it will just return the eName. 26784 * @param eName A string to be postFixed with the namespace. 26785 * @return a string following the convention of <eName>.<namespace> || <eName> 26786 */ 26787 function getFunctionNamespace(eName) { 26788 if (namespace) { 26789 return eName + '.' + namespace; 26790 } 26791 return eName; 26792 } 26793 26794 function checkLoaded() { 26795 var $this = $(this); 26796 var img = $this.get(0); 26797 var $img = $(img); 26798 if (img.src === '') { 26799 $img.trigger('error'); 26800 } 26801 if (img.complete || img.readyState === 4) { 26802 if (img.naturalWidth !== 0 && img.naturalHeight !== 0) { 26803 $img.trigger('load'); 26804 } else { 26805 $img.trigger('error'); 26806 } 26807 } else { 26808 $img.trigger('notThereYet'); 26809 } 26810 } 26811 26812 $.fn.imageLoadFix = function (method) { 26813 if (methods[method]) { 26814 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 26815 } 26816 return methods.init.apply(this, arguments); 26817 }; 26818})); 26819 26820/* 26821 26822Name: validate 26823Type: jQuery plugin 26824Author: Jay Sylvester, Abercrombie & Fitch 26825Date: 15-Nov-2010 26826 26827Purpose: Performs form field validation. 26828 26829Requirements: All inputs must have a valid ID. A list of IDs is returned when fields 26830 fail validation. 26831 26832 Required form inputs must have one of the following to be recognized by the 26833 validator: 26834 26835 1. REQUIRED attribute (short or long form) 26836 2. Class of "required" on the input 26837 3. Class of "required" on the input's parent 26838 26839 26840 Data validation is based upon the input's PATTERN attribute first, followed
26841 by the TYPE attribute if PATTERN isn't specified. ASCII 0-255 is assumed 26842 when no TYPE is present or TYPE is e. 26843 26844 <input id="phone-field" name="phone" type="tel" value="" required /> 26845 26846 26847 Additional validation is provided based on the following: 26848 26849 1. Credit cards can be validated based on the LUHN algorithm by placing 26850 a class of "credit-card-number" on the input. 26851 26852 <input id="cc-number" name="cc-number" class="credit-card-number" value="" required /> 26853 26854 26855 To validate matching fields (e-mail confirmation, for example), one of the 26856 fields must have a custom attribute of DATA-MATCH-FIELD containing the ID 26857 of the matching field. 26858 26859 <input id="email" name="email" type="email" value="" data-match-field="email-confirm" required /> 26860 <input id="email-confirm" name="email-confirm" type="email" value="" required /> 26861 26862 For password creation forms you can also ensure that the password does not contain 26863 the string from the email/username field (or any other field). By setting the 26864 passwordCompareEmail option to true or a valid jquery selector the value of the 26865 field will be added to the password validation pattern. 26866 26867 $(document).on('submit.validate', 'form', function(e) { 26868 $(this).validate({ 26869 e : e, 26870 stopOnFail : true, 26871 listFields : true, 26872 returnType : 'html', 26873 appendBefore: true, // append error message before element (false by default) 26874 passwordCompareEmail: true // validate against the default [name=logonId] 26875 }); 26876 }); 26877 26878 $(document).on('submit.validate', 'form', function(e) { 26879 $(this).validate({ 26880 e : e, 26881 stopOnFail : true, 26882 listFields : true, 26883 returnType : 'html', 26884 passwordCompareEmail: '#email' // validate against the #email 26885 }); 26886 }); 26887 26888 Usage examples: 26889 26890 You can validate an entire form on submit, prevent submission on failure, 26891 and add markup to flag and show errors. If you want the validator to stop 26892 the form from submitting if there's an error, you must pass both the 26893 event (e) and the stopOnFail option. 26894 26895 $(document).on('submit.validate', 'form', function(e) { 26896 $(this).validate({ 26897 e : e, 26898 stopOnFail : true, 26899 listFields : true, 26900 returnType : 'html' 26901 }); 26902 }); 26903 26904 26905 You can also validate a single field and return feedback data only. 26906 26907 var emailValidation = $('#email-field').validate(); 26908 if (emailValidation.success) { 26909 *** do a jig *** 26910 }; 26911 26912 In addition you can st the 'appendBefore' flag true and the error 26913 message will be displayed before the element. 'appendBefore' is false by default. 26914 26915 $(document).on('submit.validate', 'form', function(e) { 26916 $(this).validate({ 26917 e : e, 26918 stopOnFail : true, 26919 listFields : true, 26920 returnType : 'html', 26921 appendBefore: true, // append error message before element (false by default) 26922 passwordCompareEmail: true // validate agians the default [name=logonId] 26923 }); 26924 }); 26925 26926*/ 26927 26928(function ($, ANF) { 26929 $.fn.validate = function (options) { 26930 var $toValidate = $(this); 26931 26932 var settings = { 26933 method: 'init', 26934 returnType: 'data', 26935 appendMessagingTo: $(this), 26936 invalidCharMessage: ANF.messaging.error.INVALID_CHAR, 26937 formatMessage: ANF.messaging.error.REQUIRED_GENERIC, 26938 requiredMessage: ANF.messaging.error.REQUIRED_GENERIC, 26939 mismatchMessage: ANF.messaging.error.REQUIRED_GENERIC, 26940 alphaNumericMessage: ANF.messaging.error.INVALID_ALPHANUMERIC_ONLY, 26941 poboxMessage: ANF.messaging.error.PONOTAVAILABLE, // This is only a tempory message as part of ECOMM-10890 26942 listFields: false, 26943 stopOnFail: false, 26944 passwordCompareEmail: false, 26945 appendBefore: false, 26946 addInlineErrors: true, 26947 addMainError: true 26948 }; 26949 26950 var feedback = { 26951 success: true, 26952 status: 'valid', 26953 errorFields: {} 26954 }; 26955 26956 var methods = { 26957 26958 init: function () { 26959 if (options) { 26960 $.extend(settings, options); 26961 } 26962 // Grab parent form element of $this to allow for multiple uses of same code. 26963 settings.parentEl = $toValidate.closest('form'); 26964 26965 if (!$toValidate.is('input')) {
26966 $toValidate = $toValidate.find('input:not([type="hidden"],[type="submit"],[type="reset"],[type="button"]), select, textarea'); 26967 } 26968 if (settings.returnType === 'html') { 26969 methods.cleanup(); 26970 } 26971 if (settings.method === 'init') { 26972 methods.required(); 26973 if (feedback.success) { 26974 if (settings.returnType === 'html') { 26975 methods.cleanup(); 26976 } 26977 methods.format(); 26978 } 26979 if (feedback.success) { 26980 if (settings.returnType === 'html') { 26981 methods.cleanup(); 26982 } 26983 methods.match(); 26984 } 26985 } else { 26986 methods[settings.method].apply(); 26987 } 26988 }, 26989 26990 required: function () { 26991 var i = 0; 26992 $toValidate.each(function () { 26993 var thisInput = $(this); 26994 if ( 26995 ( // [required=""] is a semi-hack to get around issues with recognizing [required] in IE6/IE7 26996 thisInput.is('[required=""]') || 26997 thisInput.is('[required="required"]') || 26998 thisInput.is('.required') || 26999 thisInput.parent().is('.required') 27000 ) && 27001 ( 27002 (!thisInput.is('[type="checkbox"]') && !$.trim(thisInput.val())) || 27003 (thisInput.is('[type="checkbox"]') && !thisInput.is(':checked')) 27004 ) 27005 ) { 27006 feedback.success = false; 27007 feedback.status = 'missingRequiredFields'; 27008 feedback.errorFields[i] = { 27009 id: thisInput.attr('id') 27010 }; 27011 i += 1; 27012 } 27013 }); 27014 if (!feedback.success) { 27015 methods.fail(); 27016 } 27017 }, 27018 27019 format: function () { 27020 var i = 0; 27021 $toValidate.each(function () { 27022 var thisInput = $(this); 27023 var thisRegex; 27024 var thisRegexLen; 27025 var thisRegexPassword; 27026 var thisRegexEmail; 27027 var thisId = thisInput.attr('id'); 27028 /* 27029 jQuery has a bug that prevents .attr() from working with HTML5 27030 attributes not directly supported by the browser 27031 */ 27032 var thisPattern = document.getElementById(thisId).getAttribute('pattern'); 27033 var thisPatternLen; 27034 var thisPatternPassword; 27035 var thisPatternEmail; 27036 var thisElement = document.getElementById(thisId); 27037 var thisType = thisElement.hasAttribute('data-validation-type') ? thisElement.getAttribute('data-validation-type') : thisElement.getAttribute('type'); 27038 var thisValue = thisInput.val(); 27039 var spaceLength = 0; 27040 var spaceRegex; 27041 var statusOfFailure = ''; 27042 27043 if (!thisInput.is('select, textarea, [type="checkbox"], [type="radio"],[type="file"]') && thisValue && !thisInput.hasClass('noValidate')) { 27044 if (thisPattern === undefined || thisPattern === null || !thisPattern.length) { 27045 switch (thisType) { 27046 case 'email': 27047 thisPattern = /[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/i; 27048 break; 27049 case 'number': 27050 thisPattern = /\b\d+\b/; 27051 break; 27052 case 'password': 27053 thisPattern = /^.*(?=.*\d)(?=.*[a-zA-Z]).*$/; 27054 thisPatternLen = /^.{8,}$/; 27055 // Determine if the email can not be in the password 27056 if (settings.passwordCompareEmail) { 27057 var filterSel = typeof settings.passwordCompareEmail === 'string' ? settings.passwordCompareEmail : 'input[name=logonId]'; 27058 var $email = $toValidate.filter(filterSel); 27059 var emailExp = $email.val() ? $email.val().replace('.', '\\.') : ''; 27060 thisPatternPassword = '^(?!.*password|.*' + emailExp + ').*$'; 27061 } else { 27062 thisPatternPassword = /^(?!.*password).*$/; 27063 } 27064 break; 27065 case 'tel': 27066 /* strip non-digits */ 27067 var stripPhoneNumber = thisValue.replace(/[^0-9]/g, ''); 27068 thisValue = stripPhoneNumber; 27069 thisInput.val(thisValue); 27070 27071 thisPattern = /^\d{1,25}$/; 27072 break; 27073 case 'chineseRegex':
27074 thisPattern = /^((?![_×÷])[\u0027-\u007B\u007D-\u007E\u00BF-\u00DF\u00E0-\u00FF\u0100-\u024F\u4e00-\u62ff\u6300-\u77ff\u7800-\u8cff\u8d00-\u9fcc\u3000-\u303F\u3040-\u309F\u30A0-\u30FF ])+$/; 27075 break; 27076 case 'postalCN': 27077 thisPattern = /^\d{6}$/; 27078 break; 27079 case 'postalSG': 27080 thisPattern = /^[0-9]{3}-?[0-9]{3}$/; 27081 break; 27082 case 'postalJP': 27083 thisPattern = /^[0-9]{3}-?[0-9]{4}$/; 27084 break; 27085 default: 27086 thisPattern = /^[\u0000-\u00FF]+$/; 27087 break; 27088 } 27089 } 27090 // Need this hack to bypass IE 7 bug with Regex look aheads 27091 if (thisType === 'password') { 27092 thisRegex = new RegExp(thisPattern); 27093 thisRegexLen = new RegExp(thisPatternLen); 27094 thisRegexPassword = new RegExp(thisPatternPassword); 27095 spaceRegex = new RegExp(/\s/g); 27096 spaceLength = spaceRegex.test(thisValue); 27097 if (!thisRegex.test(thisValue) || !thisRegexLen.test(thisValue) || !thisRegexPassword.test(thisValue) || spaceLength > 0) { 27098 feedback.success = false; 27099 feedback.status = 'invalid'; 27100 feedback.errorFields[i] = { 27101 id: thisId 27102 }; 27103 i += 1; 27104 } 27105 } else if (thisType === 'email' || thisType === 'number' || thisType === 'password' || thisType === 'tel' || thisInput.is('#zip-code-field')) { 27106 thisRegex = new RegExp(thisPattern); 27107 if (!thisRegex.test(thisValue)) { 27108 feedback.success = false; 27109 feedback.status = 'invalid'; 27110 feedback.errorFields[i] = { 27111 id: thisId 27112 }; 27113 i += 1; 27114 } 27115 } else { 27116 if (thisInput.hasClass('alphaNumericOnly')) { 27117 thisRegex = new RegExp(/^[a-zA-Z0-9]+$/); 27118 statusOfFailure = 'alphaNumeric'; 27119 } else { 27120 thisRegex = new RegExp(thisPattern); 27121 statusOfFailure = 'invalidChar'; 27122 } 27123 27124 if (!thisRegex.test(thisValue)) { 27125 feedback.success = false; 27126 feedback.status = statusOfFailure; 27127 feedback.errorFields[i] = { 27128 id: thisId 27129 }; 27130 i += 1; 27131 } 27132 } 27133 } 27134 if (thisInput.is('.credit-card-number')) { 27135 new function () { 27136 var cardNumber = thisValue.replace(/\D/g, ''); 27137 var total = 0; 27138 for (var j = 0; j < cardNumber.length; j++) { 27139 var digit = cardNumber.charAt(j); 27140 if (j % 2 === (cardNumber.length % 2)) { 27141 digit *= 2; 27142 if (digit > 9) { 27143 digit -= 9; 27144 } 27145 } 27146 total += parseInt(digit); 27147 } 27148 if ($('#card-brand-field').val() === 'anf') { 27149 if (!(/^8\d{8}$/).test(cardNumber)) { 27150 feedback.success = false; 27151 feedback.status = 'invalid'; 27152 feedback.errorFields[i] = { 27153 id: thisId 27154 }; 27155 } 27156 } else if (total % 10) { 27157 feedback.success = false; 27158 feedback.status = 'invalid'; 27159 feedback.errorFields[i] = { 27160 id: thisId 27161 }; 27162 i += 1; 27163 } 27164 }(); 27165 } 27166 // New Credit Card Validation, to match Checkout 27167 if (thisType === 'cardInput' && thisInput.prop('required') === true) { 27168 thisRegex = new RegExp(/[0-9 ]+/); 27169 if (!thisRegex.test(thisValue)) { 27170 feedback.success = false; 27171 feedback.status = 'invalid'; 27172 feedback.errorFields[i] = { 27173 id: thisId 27174 }; 27175 i += 1; 27176 } 27177 } 27178 if (thisType === 'expDateInput' && thisInput.prop('required') === true) { 27179 thisRegex = new RegExp(/([0][1-9]|[1][0-2]) \/ [0-9]{2}/); 27180 if (!thisRegex.test(thisValue)) { // First failure, bad structure (MM / YY) 27181 feedback.success = false;
27182 feedback.status = 'invalid'; 27183 feedback.errorFields[i] = { 27184 id: thisId 27185 }; 27186 i += 1; 27187 } else { // Second Failure, bad date (current or later) 27188 var today; var someday; 27189 var dateArr = thisValue.split(' / '); 27190 today = new Date(); 27191 someday = new Date(); 27192 someday.setFullYear('20' + dateArr[1], dateArr[0], 1); 27193 27194 if (someday < today) { 27195 feedback.success = false; 27196 feedback.status = 'invalid'; 27197 feedback.errorFields[i] = { 27198 id: thisId 27199 }; 27200 i += 1; 27201 } 27202 } 27203 } 27204 if (thisInput.is('#csv-field') && thisInput.parent().hasClass('required')) { 27205 new function () { 27206 if ($('#csv-field').val() && ($('#csv-field').val().length < 3 || (isNaN($('#csv-field').val()) && !($('#csv-field').val() == '***' || $('#csv-field').val() == '****')))) { 27207 feedback.success = false; 27208 feedback.status = 'invalid'; 27209 feedback.errorFields[i] = { 27210 id: ('csv-field') 27211 }; 27212 i += 1; 27213 } 27214 }(); 27215 } 27216 if (thisInput.is('#csv-field-two') && thisInput.parent().hasClass('required')) { 27217 new function () { 27218 if ($('#csv-field-two').val() && ($('#csv-field-two').val().length < 3 || (isNaN($('#csv-field-two').val()) && !($('#csv-field-two').val() == '***' || $('#csv-field-two').val() == '****')))) { 27219 feedback.success = false; 27220 feedback.status = 'invalid'; 27221 feedback.errorFields[i] = { 27222 id: ('csv-field-two') 27223 }; 27224 i += 1; 27225 } 27226 }(); 27227 } 27228 if (thisInput.is('#card-exp-year.required')) { 27229 new function () { 27230 var d = new Date(); 27231 var month = d.getMonth() + 1; 27232 var year = d.getFullYear(); 27233 if ($('#card-exp-year').val() == year && $('#card-exp-month').val() < month) { 27234 feedback.success = false; 27235 feedback.status = 'invalid'; 27236 feedback.errorFields[i] = { 27237 id: ('card-exp-year') 27238 }; 27239 i += 1; 27240 } 27241 }(); 27242 } 27243 if (thisInput.is('#card-exp-year-two.required')) { 27244 new function () { 27245 var d = new Date(); 27246 var month = d.getMonth() + 1; 27247 var year = d.getFullYear(); 27248 if ($('#card-exp-year-two').val() == year && $('#card-exp-month-two').val() < month) { 27249 feedback.success = false; 27250 feedback.status = 'invalid'; 27251 feedback.errorFields[i] = { 27252 id: ('card-exp-year-two') 27253 }; 27254 } 27255 }(); 27256 } 27257 if (thisInput.is('.gift-message input')) { 27258 new function () { 27259 var printableAsciiCharacterPattern = new RegExp(/^[\u0020-\u007E]*$/); 27260 if (!printableAsciiCharacterPattern.test(thisValue)) { 27261 feedback.success = false; 27262 feedback.status = 'invalidChar'; 27263 feedback.errorFields[i] = { 27264 id: thisId 27265 }; 27266 i += 1; 27267 } 27268 }(); 27269 } 27270 if (thisInput.is('.address input[type=text]')) { 27271 new function () { 27272 var invalidCharsPattern = new RegExp(/[|\\]/); 27273 if (invalidCharsPattern.test(thisValue)) { 27274 feedback.success = false; 27275 feedback.status = 'invalidChar'; 27276 feedback.errorFields[i] = { 27277 id: thisId 27278 }; 27279 i += 1; 27280 } 27281 }(); 27282 } 27283 }); 27284 if (!feedback.success) { 27285 methods.fail(); 27286 } 27287 }, 27288 27289 match: function () { 27290 var i = 0; 27291 $toValidate.each(function () { 27292 var thisAttrValue; 27293 var thisInput = $(this); 27294 var thisMatch; 27295 27296 thisAttrValue = thisInput.attr('data-match-field'); 27297 27298 if (typeof thisAttrValue === 'string' && thisAttrValue.trim().length > 0) { 27299 thisMatch = $(settings.parentEl.find('#' + thisAttrValue)); 27300 // If thisMatch is blank, fall back to default selection criteria 27301 if (thisMatch.length === 0) { 27302 thisMatch = $('#' + thisAttrValue); 27303 } 27304 } 27305 27306 if (thisMatch && thisMatch.length && thisInput.val() !== thisMatch.val()) { 27307 feedback.success = false;
27308 feedback.status = 'mismatch'; 27309 feedback.errorFields[i] = { 27310 id: thisInput.attr('id'), 27311 matchId: thisMatch.attr('id') 27312 }; 27313 i += 1; 27314 } 27315 }); 27316 if (!feedback.success) { 27317 methods.fail(); 27318 } 27319 }, 27320 27321 fail: function () { 27322 if (settings.stopOnFail) { 27323 options.e.preventDefault(); 27324 } 27325 if (settings.returnType === 'html') { 27326 methods.markup({ 27327 status: feedback.status, 27328 fields: feedback.errorFields 27329 }); 27330 } 27331 }, 27332 27333 markup: function (params) { 27334 var errorMessage; 27335 var input; 27336 var analyticsObj = ANF.analytics; 27337 27338 if (settings.addMainError) { 27339 if (settings.appendBefore === true) { 27340 $(settings.appendMessagingTo).find('>:last').before('<div class="validator"><ul></ul></div>'); 27341 } else { 27342 $(settings.appendMessagingTo).append('<div class="validator"><ul></ul></div>'); 27343 } 27344 } 27345 switch (params.status) { 27346 case 'missingRequiredFields': 27347 $.each(params.fields, function (key, value) { 27348 value.form = $('#' + value.id).closest('form').attr('name') || $('#' + value.id).closest('form').attr('id'); 27349 if (analyticsObj.global && analyticsObj.global.formValidationMissingRequiredFields) { 27350 analyticsObj.global.formValidationMissingRequiredFields(value); 27351 } 27352 input = $(settings.parentEl.find('#' + value.id)); 27353 // If input is blank, fall back to default selection criteria 27354 if (input.length == 0) { 27355 input = $('#' + value.id); 27356 } 27357 methods.inlineError(input, 'required', 'validator-error-required'); 27358 }); 27359 $(settings.appendMessagingTo).find('div.validator ul').addClass('all-required-error').append('<li class="message">' + settings.requiredMessage + '</li>'); 27360 break; 27361 case 'invalid': 27362 $.each(params.fields, function (key, value) { 27363 value.form = $('#' + value.id).closest('form').attr('name') || $('#' + value.id).closest('form').attr('id'); 27364 if (analyticsObj.global && analyticsObj.global.formValidationInvalidField) { 27365 analyticsObj.global.formValidationInvalidField(value); 27366 } 27367 input = $(settings.parentEl.find('#' + value.id)); 27368 // If input is blank, fall back to default selection criteria 27369 if (input.length == 0) { 27370 input = $('#' + value.id); 27371 } 27372 methods.inlineError(input, 'format', 'validator-error-invalid'); 27373 }); 27374 $(settings.appendMessagingTo).find('div.validator ul').addClass('data-error').append('<li class="message">' + settings.formatMessage + '</li>'); 27375 break; 27376 case 'invalidChar': 27377 $.each(params.fields, function (key, value) { 27378 value.form = $('#' + value.id).closest('form').attr('name') || $('#' + value.id).closest('form').attr('id'); 27379 if (analyticsObj.global && analyticsObj.global.formValidationInvalidField) { 27380 analyticsObj.global.formValidationInvalidField(value); 27381 } 27382 input = $(settings.parentEl.find('#' + value.id)); 27383 // If input is blank, fall back to default selection criteria 27384 if (input.length == 0) { 27385 input = $('#' + value.id); 27386 } 27387 methods.inlineError(input, 'format', 'validator-error-invalid-char'); 27388 }); 27389 $(settings.appendMessagingTo).find('div.validator ul').addClass('data-error').append('<li class="message">' + settings.invalidCharMessage + '</li>'); 27390 break; 27391 case 'alphaNumeric': 27392 $.each(params.fields, function (key, value) { 27393 value.form = $('#' + value.id).closest('form').attr('name') || $('#' + value.id).closest('form').attr('id'); 27394 if (analyticsObj.global && analyticsObj.global.formValidationInvalidField) { 27395 analyticsObj.global.formValidationInvalidField(value); 27396 } 27397 input = $(settings.parentEl.find('#' + value.id)); 27398 // If input is blank, fall back to default selection criteria 27399 if (input.length == 0) { 27400 input = $('#' + value.id); 27401 } 27402 methods.inlineError(input, 'format', 'validator-error-alphanumeric-only'); 27403 }); 27404 $(settings.appendMessagingTo).find('div.validator ul').addClass('data-error').append('<li class="message">' + settings.alphaNumericMessage + '</li>'); 27405 break; 27406 case 'mismatch': 27407 $.each(params.fields, function (key, value) { 27408 value.form = $('#' + value.id).closest('form').attr('name') || $('#' + value.id).closest('form').attr('id'); 27409 analyticsObj.global.formValidationFieldMismatch(value); 27410 input = $(settings.parentEl.find('#' + value.id)); 27411 // If input is blank, fall back to default selection criteria 27412 if (input.length == 0) { 27413 input = $('#' + value.id); 27414 } 27415 methods.inlineError(input, 'match', 'validator-error-mismatch'); 27416 input.parent().addClass('validator-error-mismatch'); 27417 }); 27418 27419 $(settings.appendMessagingTo).find('div.validator ul').addClass('mismatch-error').append('<li class="message">' + settings.mismatchMessage + '</li>'); 27420 break; 27421 // The below 'case' is only a tempory solution as part of jira ECOMM-10890 and will be removed 27422 case 'pobox': 27423 $.each(params.fields, function (key, value) { 27424 value.form = $('#' + value.id).closest('form').attr('name') || $('#' + value.id).closest('form').attr('id'); 27425 if (analyticsObj.global && analyticsObj.global.formValidationInvalidField) { 27426 analyticsObj.global.formValidationInvalidField(value); 27427 } 27428 input = $(settings.parentEl.find('#' + value.id)); 27429 // If input is blank, fall back to default selection criteria 27430 if (input.length == 0) { 27431 input = $('#' + value.id); 27432 } 27433 methods.inlineError(input, 'format', 'validator-error-invalid'); 27434 }); 27435 $(settings.appendMessagingTo).find('div.validator ul').addClass('data-error').append('<li class="message">' + settings.poboxMessage + '</li>'); 27436 break; 27437 } 27438 if (settings.listFields) { 27439 switch (params.status) { 27440 case 'mismatch': 27441 $(settings.appendMessagingTo).find('div.validator ul').append('<li class="error-fields"><ul></ul></li>'); 27442 $.each(params.fields, function (key, value) { 27443 var label = $('label[for="' + value.id + '"]'); 27444 var matchLabel = $('label[for="' + value.matchId + '"]'); 27445 $(settings.appendMessagingTo).find('div.validator ul li.error-fields ul').append('<li>' + label.text() + '/' + matchLabel.text() + '</li>'); 27446 }); 27447 break; 27448 default: 27449 $(settings.appendMessagingTo).find('div.validator ul').append('<li class="error-fields"><ul></ul></li>'); 27450 $.each(params.fields, function (key, value) { 27451 var label = $('label[for="' + value.id + '"]'); 27452 $(settings.appendMessagingTo).find('div.validator ul li.error-fields ul').append('<li>' + label.text() + '</li>'); 27453 }); 27454 break; 27455 } 27456 } 27457 $toValidate.add(settings.appendMessagingTo).triggerHandler('validation.errorMsgDispEvent'); 27458 }, 27459 27460 /** 27461 @author: Alex Okolish 27462 @description: adds an error message to the dom near an input (after the last element with the li) 27463 @param {jQuery} input The input with the error 27464 @param {string} errorType The type of error (e.g. 'required' or 'format') 27465 @param {string} parentClass Class to add to parent (usually a li) 27466 */ 27467 inlineError: function (input, errorType, parentClass) { 27468 var errorMessage = ANF.messaging.error[errorType][input.attr('id').replace(/-/g, '')]; 27469 var messageHTML = '<p class="error">msg</p>'; 27470 var $inlineErrorElement = null; 27471 27472 // sets specific error for gift box required 27473 if ((typeof errorMessage === 'undefined') && (input.attr('id').replace(/-/g, '').substring(0, 3) == 'GBS')) { 27474 errorMessage = ANF.messaging.error[errorType].dbs; 27475 } 27476 27477 if (input.parent().find('p.error').length > 0) { 27478 // there is already an error message in the li - do not add another 27479 // for example, credit card expiration dates are 2 selects in an li and they want 1 error message 27480 // this makes that work 27481 return false;
27482 } else if (errorType === 'required' && typeof input.attr('data-required-msg') !== 'undefined') { 27483 errorMessage = input.attr('data-required-msg'); 27484 } else if (errorType === 'format' && typeof input.attr('data-format-msg') !== 'undefined') { 27485 errorMessage = input.attr('data-format-msg'); 27486 } else if (errorType === 'match' && typeof input.attr('data-match-msg') !== 'undefined') { 27487 errorMessage = input.attr('data-match-msg'); 27488 } 27489 27490 if (typeof errorMessage === 'undefined') { 27491 errorMessage = ''; 27492 } 27493 27494 messageHTML = messageHTML.replace(/msg/, errorMessage); 27495 27496 $inlineErrorElement = input.siblings().addBack().last(); 27497 if (settings.addInlineErrors) { 27498 $inlineErrorElement.after(messageHTML); 27499 } 27500 $inlineErrorElement.parent().addClass(parentClass) 27501 .addClass('invalid'); // For the 1892 validation styling. 27502 27503 input.parent().triggerHandler('validation.errorMsgDispEvent'); 27504 }, 27505 27506 cleanup: function () { 27507 $('form').find('div.validator').remove(); 27508 $toValidate.each(function () { 27509 $(this).parent().find('p.error').remove(); 27510 $(this).parent().removeClass('invalid'); 27511 $(this).parent().removeClass('validator-error-required'); 27512 $(this).parent().removeClass('validator-error-invalid'); 27513 $(this).parent().removeClass('validator-error-mismatch'); 27514 $(this).parent().removeClass('validator-error-invalid-char'); 27515 $(this).parent().removeClass('validator-error-alphanumeric-only'); 27516 }); 27517 $toValidate.add('form').triggerHandler('validation.errorMsgDispEvent'); 27518 } 27519 }; 27520 27521 methods.init(); 27522 return feedback; 27523 }; 27524})(jQuery, ANF); 27525 27526redesign.define("base/js/site/global/validate", ["jquery"], function(){}); 27527 27528redesign.define('coreServices/device',[ 27529 'anfUtil/testFramework' 27530], function deviceService( 27531 test 27532) { 27533 'use strict'; 27534 27535 function getSearchUserAgent(regExpTest) { 27536 return function searchUserAgent(userAgent) { 27537 return regExpTest.test(userAgent); 27538 }; 27539 } 27540 27541 function getGetVersionFromUserAgent(reg) { 27542 return function getVersionFromUserAgent(userAgent) { 27543 var version; 27544 var matches = userAgent.match(reg); 27545 27546 if (matches && matches.length > 0) { 27547 version = matches.shift().toString().trim().replace('_', '.'); 27548 } 27549 27550 return version; 27551 }; 27552 } 27553 27554 return { 27555 is: { 27556 weChatApp: getSearchUserAgent(new RegExp('MicroMessenger', 'i')), 27557 iOS: getSearchUserAgent(new RegExp('iphone|ipad|ipod', 'i')), 27558 android: getSearchUserAgent(new RegExp('android', 'i')), 27559 winIE: getSearchUserAgent(new RegExp('MSIE |Trident/|Edge/', 'i'))// function can't start with an uppercase like IE 27560 }, 27561 version: { 27562 iOS: getGetVersionFromUserAgent(new RegExp('OS\\s+([\\d\\.|\\d\\_]+)')), 27563 android: getGetVersionFromUserAgent(new RegExp('Android\\s+([\\d\\.|\\d_]+)')) 27564 }, 27565 osName: Object.freeze({ 27566 iOS: 'ios', 27567 android: 'android' 27568 }), 27569 /** 27570 * @description Gets the OS name based off the supplied userAgent 27571 * @param {String} userAgent the user agent string that contains the devices os 27572 * @throws Error 27573 * @returns {String} the os name 27574 */ 27575 getDeviceOS: function getDeviceOS(userAgent) { 27576 var deviceTypesThatHaveOsName = Object.keys(this.osName) 27577 .filter(function getMatchingUserAgents(key) { 27578 return this.is[key](userAgent); 27579 }, this) 27580 .filter(function getCorspondingOsName(key) { 27581 return this.osName[key]; 27582 }, this); 27583 27584 if (deviceTypesThatHaveOsName.length === 0) { 27585 throw new Error('User Agent could not be parsed for device OS'); 27586 } 27587 27588 return this.osName[deviceTypesThatHaveOsName.shift()]; 27589 }, 27590 /** 27591 * @description Gets the OS version based off the supplied userAgent 27592 * @param {String} userAgent the user agent string that contains the devices version 27593 * @throws Error 27594 * @returns {String} the os version 27595 */ 27596 getDeviceVersion: function getDeviceVersion(userAgent) { 27597 var deviceTypesThatHaveVersionCheck = Object.keys(this.version) 27598 .filter(function getMatchingUserAgents(key) { 27599 return this.is[key](userAgent); 27600 }, this) 27601 .filter(function getCorspondingVersionFn(key) { 27602 return this.version[key]; 27603 }, this); 27604 var version; 27605
27606 try { 27607 version = this.version[deviceTypesThatHaveVersionCheck.shift()](userAgent); 27608 if (!version) { 27609 throw new Error('Version was undefined or empty'); 27610 } 27611 return version; 27612 } catch (e) { 27613 throw new Error('User Agent could not be parsed for device OS version'); 27614 } 27615 }, 27616 getUserAgent: function getUserAgent() { 27617 return navigator.userAgent; 27618 }, 27619 getAppVersion: function getAppVersion() { 27620 return navigator.appVersion; 27621 }, 27622 getVendor: function getVendor() { 27623 return navigator.vendor; 27624 }, 27625 getLanguage: function getLanguage() { 27626 return navigator.language; 27627 }, 27628 getStandalone: function getStandalone() { 27629 return navigator.standalone; 27630 }, 27631 geolocation: { 27632 getCurrentPosition: function getCurrentPosition(onSuccess, onError, options) { 27633 var noop = function noop() {}; 27634 var myOptions = Object.assign({}, options); 27635 var myOnSuccess = test.type.function(onSuccess) ? onSuccess : noop; 27636 var myOnError = test.type.function(onError) ? onError : noop; 27637 return navigator.geolocation.getCurrentPosition(myOnSuccess, myOnError, myOptions); 27638 } 27639 } 27640 }; 27641}); 27642 27643redesign.define('base/js/site/global/global',[ 27644 'coreServices/window', 27645 'coreServices/device', 27646 'jsCookie' 27647], function ( 27648 windowService, 27649 device, 27650 cookies 27651) { 27652 'use strict'; 27653 27654 27655 ANF.global = (function ($, ANF) { 27656 var mobileDeviceDetection = function mobileDeviceDetection() { 27657 var ua = navigator.userAgent.toLowerCase(); 27658 var isAndroid = ua.indexOf('android') > -1; 27659 if (isAndroid) { 27660 var androidUa = window.navigator.userAgent.match(/Android\s+([\d\.]+)/); 27661 var androidOSVersion = (androidUa[0]).toString(); // Matches up OS and version 27662 var androidOSversionNumber = androidOSVersion.substring(0, 9); // returns Android* 27663 return androidOSversionNumber; 27664 } 27665 // Check for iOS devices 27666 if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) { 27667 var iOSua = window.navigator.userAgent.match(/OS\s+([\d\.]+)/); 27668 var iOSVersion = (iOSua[0]).toString(); // Matches up OS and version 27669 var iOSversionNumber = iOSVersion.substring(0, 4); // returns OS*; use above .match to drill down to iOS device specific 27670 return iOSversionNumber; 27671 } 27672 }; 27673 27674 27675 return { 27676 /** 27677 @author Josh Krumm 27678 @description returns an array of query string parameters. 27679 */ 27680 getUrlParams: function () { 27681 var params = {}; 27682 windowService.location.getSearch().replace(/[?&]+([^=&]+)=([^&]*)/gi, function (str, key, value) { 27683 params[key] = value; 27684 }); 27685 return params; 27686 }, 27687 27688 /** 27689 * @author : Robert Campbell 27690 * @description: This is used to wrap the window.location so that the commands that are called with this will have the storeId, catalogId, and langId in the url query string. 27691 * @param serlizedArray : This should be what is returned when you do $(element).serlizeArray(); 27692 * @return object : name:value or name:[value1, value2, ..., valueN] 27693 */ 27694 jQuerySerlizeArrayToObj: function (serlizedArray) { 27695 var rtObj = {}; 27696 $.each(serlizedArray, function (i, field) { 27697 var name = field.name; 27698 var value = field.value; 27699 if (rtObj[name] != null) { 27700 if (typeof (rtObj[name]) === 'array') { 27701 rtObj[name].push(value); 27702 } else { 27703 rtObj[name] = [rtObj[name], value]; 27704 } 27705 } else { 27706 rtObj[name] = value; 27707 } 27708 }); 27709 return rtObj; 27710 }, 27711 /** 27712 * @author : Robert Campbell 27713 * @description: This is used to wrap the window.location so that the commands that are called with this will have the storeId, catalogId, and langId in the url query string. 27714 * @param cmd : the name of the command to be called 27715 * @param param : object of name to value of the variables to be used for the query string 27716 * @param include_defaults (optional) : This defaults to true. Setting this to fal
27716se will cause the defaults to not be extended into the passed in param 27717 * @param reverse_extend (optional) : This defaults to false. This determines if the defaults overwrite what is in the param or vice-versa. If true it will over write what is in the param with the defaults. 27718 * @param createQueryStringCallback (optional) : This is to be a function that accepts an object ( similar to the param but with, with out, or just the defaults ). The function should return the query string that is to be used. 27719 */ 27720 inHouseRedirect: function (cmd, param, include_defaults, reverse_extend, createQueryStringCallback) { 27721 include_defaults = (include_defaults !== 'undefined' && include_defaults !== null && typeof (include_defaults) === 'boolean') ? include_defaults : true; 27722 reverse_extend = (reverse_extend !== 'undefined' && reverse_extend !== null && typeof (reverse_extend) === 'boolean') ? reverse_extend : false; 27723 param = (param !== 'undefined' && param !== null && typeof (param) === 'object') ? param : {}; 27724 createQueryStringCallback = (createQueryStringCallback !== 'undefined' && createQueryStringCallback !== null && typeof (createQueryStringCallback) === 'function') ? 27725 createQueryStringCallback : 27726 function (data_model) { 27727 var _queryString = $.param(data_model); 27728 return _queryString; 27729 }; 27730 var default_params = { 27731 'storeId': ANF.params.storeAttributes.idList.storeId, 27732 'catalogId': ANF.params.storeAttributes.idList.catalogId, 27733 'langId': ANF.params.storeAttributes.idList.langId 27734 }; 27735 var queryString = ''; 27736 var _param = {}; 27737 27738 if (!include_defaults) { 27739 default_params = {}; 27740 } 27741 27742 if (reverse_extend) { 27743 $.extend(_param, param, default_params); 27744 } else { 27745 $.extend(_param, default_params, param); 27746 } 27747 queryString = createQueryStringCallback(_param); 27748 27749 windowService.location.set(cmd + '?' + queryString); 27750 }, 27751 27752 init: function () { 27753 /** 27754 * cookies-on-site -- whether or not the user has already seen the "cookies" text (if cookie exists) 27755 * Andy Little, ECOMM-9424: Change to allow business to change cookie banner text on the UK sites. The script checks the 27756 * current cookie value against the one in the database. When the text changes, the db value needs to be changed and 27757 * the code knows to redisplay the banner. Setting the cookie value in the db to 'on' displays the banner 27758 * every time, setting it to 'off' never displays the banner, otherwise set the value to the MMYY of the text 27759 * change to ensure that a value isn't reused. 27760 * */ 27761 // Make sure it's a UK site, the user isn't on an iPad running lower than iOS 5, and it's not a checkout page, 27762 // I don't know why, this was here before 27763 } 27764 }; 27765 })(jQuery, ANF); 27766}); 27767/*! Picturefill - v2.3.1 - 2015-04-09 27768* http://scottjehl.github.io/picturefill 27769* Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT */ 27770window.matchMedia||(window.matchMedia=function(){"use strict";var a=window.styleMedia||window.media;if(!a){var b=document.createElement("style"),c=document.getElementsByTagName("script")[0],d=null;b.type="text/css",b.id="matchmediajs-test",c.parentNode.insertBefore(b,c),d="getComputedStyle"in window&&window.getComputedStyle(b,null)||b.currentStyle,a={matchMedium:function(a){var c="@media "+a+"{ #matchmediajs-test { width: 1px; } }";return b.styleSheet?b.styleSheet.cssText=c:b.textContent=c,"1px"===d.width}}}return function(b){return{matches:a.matchMedium(b||"all"),media:b||"all"}}}()),function(a,b,c){"use strict";function d(b){"object"==typeof module&&"object"==typeof module.exports?module.exports=b:'function' === typeof redesign.define && redesign.define.amd&&redesign.define("picturefill",[],function(){return b}),"object"==typeof a&&(a.picturefill=b)}function e(a){var b,c,d,e,f,i=a||{};b=i.elements||g.getAllElements();for(var j=0,k=b.length;k>j;j++)if(c=b[j],d=c.parentNode,e=void 0,f=void 0,"IMG"===c.nodeName.toUpperCase()&&(c[g.ns]||(c[g.ns]={}),i.reevaluate||!c[g.ns].evaluated)){if(d&&"PICTURE"===d.nodeName.toUpperCase()){if(g.removeVideoShim(d),e=g.getMatch(c,d),e===!1)continue}else e=void 0;(d&&"PICTURE"===d.nodeName.toUpperCase()||!g.sizesSupported&&c.srcset&&h.test(c.srcset))&&g.dodgeSrcset(c),e?(f=g.processSourceSet(e),g.applyBestCandidate(f,c)):(f=g.processSourceSet(c),(void 0===c.srcset||c[g.ns].srcset)&&g.applyBestCandidate(f,c)),c[g.ns].evaluated=!0}}function f(){function c(){clearTimeout(d),d=setTimeout(h,60)}g.initTypeDetects(),e();var d,f=setInterval(function(){return e(),/^loaded|^i|^c/.test(b.readyState)?void clearInterval(f):void 0},250),h=function(){e({reevaluate:!0})};a.addEventListener?a.addEventListener("resize",c,!1):a.attachEvent&&a.attachEvent("onresize",c)}if(a.HTMLPictureElement)return void d(function(){});b.createElement("picture");var g=a.picturefill||{},h=/\s+\+?\d+(e\d+)?w/;g.ns="picturefill",function(){g.srcsetSupported="srcset"in c,g.sizesSupported="sizes"in c,g.curSrcSupported="currentSrc"in c}(),g.trim=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},g.makeUrl=function(){var a=b.createElement("a");return function(b){return a.href=b,a.href}}(),g.restrictsMixedContent=function(){return"https:"===a.location.protocol},g.matchesMedia=function(b){return a.matchMedia&&a.matchMedia(b).matches},g.getDpr=function(){return a.devicePixelRatio||1},g.getWidthFromLength=function(a){var c;if(!a||a.indexOf("%")>-1!=!1||!(parseFloat(a)>0||a.indexOf("calc(")>-1))return!1;a=a.replace("vw","%"),g.lengthEl||(g.lengthEl=b.createElement("div"),g.lengthEl.style.cssText="border:0;display:block;font-size:1em;
27770left:0;margin:0;padding:0;position:absolute;visibility:hidden",g.lengthEl.className="helper-from-picturefill-js"),g.lengthEl.style.width="0px";try{g.lengthEl.style.width=a}catch(d){}return b.body.appendChild(g.lengthEl),c=g.lengthEl.offsetWidth,0>=c&&(c=!1),b.body.removeChild(g.lengthEl),c},g.detectTypeSupport=function(b,c){var d=new a.Image;return d.onerror=function(){g.types[b]=!1,e()},d.onload=function(){g.types[b]=1===d.width,e()},d.src=c,"pending"},g.types=g.types||{},g.initTypeDetects=function(){g.types["image/jpeg"]=!0,g.types["image/gif"]=!0,g.types["image/png"]=!0,g.types["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),g.types["image/webp"]=g.detectTypeSupport("image/webp","data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=")},g.verifyTypeSupport=function(a){var b=a.getAttribute("type");if(null===b||""===b)return!0;var c=g.types[b];return"string"==typeof c&&"pending"!==c?(g.types[b]=g.detectTypeSupport(b,c),"pending"):"function"==typeof c?(c(),"pending"):c},g.parseSize=function(a){var b=/(\([^)]+\))?\s*(.+)/g.exec(a);return{media:b&&b[1],length:b&&b[2]}},g.findWidthFromSourceSize=function(c){for(var d,e=g.trim(c).split(/\s*,\s*/),f=0,h=e.length;h>f;f++){var i=e[f],j=g.parseSize(i),k=j.length,l=j.media;if(k&&(!l||g.matchesMedia(l))&&(d=g.getWidthFromLength(k)))break}return d||Math.max(a.innerWidth||0,b.documentElement.clientWidth)},g.parseSrcset=function(a){for(var b=[];""!==a;){a=a.replace(/^\s+/g,"");var c,d=a.search(/\s/g),e=null;if(-1!==d){c=a.slice(0,d);var f=c.slice(-1);if((","===f||""===c)&&(c=c.replace(/,+$/,""),e=""),a=a.slice(d+1),null===e){var g=a.indexOf(",");-1!==g?(e=a.slice(0,g),a=a.slice(g+1)):(e=a,a="")}}else c=a,a="";(c||e)&&b.push({url:c,descriptor:e})}return b},g.parseDescriptor=function(a,b){var c,d=b||"100vw",e=a&&a.replace(/(^\s+|\s+$)/g,""),f=g.findWidthFromSourceSize(d);if(e)for(var h=e.split(" "),i=h.length-1;i>=0;i--){var j=h[i],k=j&&j.slice(j.length-1);if("h"!==k&&"w"!==k||g.sizesSupported){if("x"===k){var l=j&&parseFloat(j,10);c=l&&!isNaN(l)?l:1}}else c=parseFloat(parseInt(j,10)/f)}return c||1},g.getCandidatesFromSourceSet=function(a,b){for(var c=g.parseSrcset(a),d=[],e=0,f=c.length;f>e;e++){var h=c[e];d.push({url:h.url,resolution:g.parseDescriptor(h.descriptor,b)})}return d},g.dodgeSrcset=function(a){a.srcset&&(a[g.ns].srcset=a.srcset,a.srcset="",a.setAttribute("data-pfsrcset",a[g.ns].srcset))},g.processSourceSet=function(a){var b=a.getAttribute("srcset"),c=a.getAttribute("sizes"),d=[];return"IMG"===a.nodeName.toUpperCase()&&a[g.ns]&&a[g.ns].srcset&&(b=a[g.ns].srcset),b&&(d=g.getCandidatesFromSourceSet(b,c)),d},g.backfaceVisibilityFix=function(a){var b=a.style||{},c="webkitBackfaceVisibility"in b,d=b.zoom;c&&(b.zoom=".999",c=a.offsetWidth,b.zoom=d)},g.setIntrinsicSize=function(){var c={},d=function(a,b,c){b&&a.setAttribute("width",parseInt(b/c,10))};return function(e,f){var h;e[g.ns]&&!a.pfStopIntrinsicSize&&(void 0===e[g.ns].dims&&(e[g.ns].dims=e.getAttribute("width")||e.getAttribute("height")),e[g.ns].dims||(f.url in c?d(e,c[f.url],f.resolution):(h=b.createElement("img"),h.onload=function(){if(c[f.url]=h.width,!c[f.url])try{b.body.appendChild(h),c[f.url]=h.width||h.offsetWidth,b.body.removeChild(h)}catch(a){}e.src===f.url&&d(e,c[f.url],f.resolution),e=null,h.onload=null,h=null},h.src=f.url)))}}(),g.applyBestCandidate=function(a,b){var c,d,e;a.sort(g.ascendingSort),d=a.length,e=a[d-1];for(var f=0;d>f;f++)if(c=a[f],c.resolution>=g.getDpr()){e=c;break}e&&(e.url=g.makeUrl(e.url),b.src!==e.url&&(g.restrictsMixedContent()&&"http:"===e.url.substr(0,"http:".length).toLowerCase()?void 0!==window.console&&console.warn("Blocked mixed content image "+e.url):(b.src=e.url,g.curSrcSupported||(b.currentSrc=b.src),g.backfaceVisibilityFix(b))),g.setIntrinsicSize(b,e))},g.ascendingSort=function(a,b){return a.resolution-b.resolution},g.removeVideoShim=function(a){var b=a.getElementsByTagName("video");if(b.length){for(var c=b[0],d=c.getElementsByTagName("source");d.length;)a.insertBefore(d[0],c);c.parentNode.removeChild(c)}},g.getAllElements=function(){for(var a=[],c=b.getElementsByTagName("img"),d=0,e=c.length;e>d;d++){var f=c[d];("PICTURE"===f.parentNode.nodeName.toUpperCase()||null!==f.getAttribute("srcset")||f[g.ns]&&null!==f[g.ns].srcset)&&a.push(f)}return a},g.getMatch=function(a,b){for(var c,d=b.childNodes,e=0,f=d.length;f>e;e++){var h=d[e];if(1===h.nodeType){if(h===a)return c;
27770if("SOURCE"===h.nodeName.toUpperCase()){null!==h.getAttribute("src")&&void 0!==typeof console&&console.warn("The `src` attribute is invalid on `picture` `source` element; instead, use `srcset`.");var i=h.getAttribute("media");if(h.getAttribute("srcset")&&(!i||g.matchesMedia(i))){var j=g.verifyTypeSupport(h);if(j===!0){c=h;break}if("pending"===j)return!1}}}}return c},f(),e._=g,d(e)}(window,window.document,new window.Image); 27771redesign.define("base/js/global/lib/picturefill.min", function(){}); 27772 27773/* 27774 _ _ _ _ 27775 ___| (_) ___| | __ (_)___ 27776/ __| | |/ __| |/ / | / __| 27777\__ \ | | (__| < _ | \__ \ 27778|___/_|_|\___|_|\_(_)/ |___/ 27779 |__/ 27780 27781 Version: 1.8.1 27782 Author: Ken Wheeler 27783 Website: http://kenwheeler.github.io 27784 Docs: http://kenwheeler.github.io/slick 27785 Repo: http://github.com/kenwheeler/slick 27786 Issues: http://github.com/kenwheeler/slick/issues 27787 27788 */ 27789/* global window, document, define, jQuery, setInterval, clearInterval */ 27790;(function(factory) { 27791 'use strict'; 27792 if (typeof redesign.define === 'function' && redesign.define.amd) { 27793 redesign.define('slickSlider',['jquery'], factory); 27794 } else if (typeof exports !== 'undefined') { 27795 module.exports = factory(require('jquery')); 27796 } else { 27797 factory(jQuery); 27798 } 27799 27800}(function($) { 27801 'use strict'; 27802 var Slick = window.Slick || {}; 27803 27804 Slick = (function() { 27805 27806 var instanceUid = 0; 27807 27808 function Slick(element, settings) { 27809 27810 var _ = this, dataSettings; 27811 27812 _.defaults = { 27813 accessibility: true, 27814 adaptiveHeight: false, 27815 appendArrows: $(element), 27816 appendDots: $(element), 27817 arrows: true, 27818 asNavFor: null, 27819 prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>', 27820 nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>', 27821 autoplay: false, 27822 autoplaySpeed: 3000, 27823 centerMode: false, 27824 centerPadding: '50px', 27825 cssEase: 'ease', 27826 customPaging: function(slider, i) { 27827 return $('<button type="button" />').text(i + 1); 27828 }, 27829 dots: false, 27830 dotsClass: 'slick-dots', 27831 draggable: true, 27832 easing: 'linear', 27833 edgeFriction: 0.35, 27834 fade: false, 27835 focusOnSelect: false, 27836 focusOnChange: false, 27837 infinite: true, 27838 initialSlide: 0, 27839 lazyLoad: 'ondemand', 27840 mobileFirst: false, 27841 pauseOnHover: true, 27842 pauseOnFocus: true, 27843 pauseOnDotsHover: false, 27844 respondTo: 'window', 27845 responsive: null, 27846 rows: 1, 27847 rtl: false, 27848 slide: '', 27849 slidesPerRow: 1, 27850 slidesToShow: 1, 27851 slidesToScroll: 1, 27852 speed: 500, 27853 swipe: true, 27854 swipeToSlide: false, 27855 touchMove: true, 27856 touchThreshold: 5, 27857 useCSS: true, 27858 useTransform: true, 27859 variableWidth: false, 27860 vertical: false, 27861 verticalSwiping: false, 27862 waitForAnimate: true, 27863 zIndex: 1000 27864 }; 27865 27866 _.initials = { 27867 animating: false, 27868 dragging: false, 27869 autoPlayTimer: null, 27870 currentDirection: 0, 27871 currentLeft: null, 27872 currentSlide: 0, 27873 direction: 1, 27874 $dots: null, 27875 listWidth: null, 27876 listHeight: null, 27877 loadIndex: 0, 27878 $nextArrow: null, 27879 $prevArrow: null, 27880 scrolling: false, 27881 slideCount: null, 27882 slideWidth: null, 27883 $slideTrack: null, 27884 $slides: null, 27885 sliding: false, 27886 slideOffset: 0, 27887 swipeLeft: null, 27888 swiping: false, 27889 $list: null, 27890 touchObject: {}, 27891 transformsEnabled: false,
27892 unslicked: false 27893 }; 27894 27895 $.extend(_, _.initials); 27896 27897 _.activeBreakpoint = null; 27898 _.animType = null; 27899 _.animProp = null; 27900 _.breakpoints = []; 27901 _.breakpointSettings = []; 27902 _.cssTransitions = false; 27903 _.focussed = false; 27904 _.interrupted = false; 27905 _.hidden = 'hidden'; 27906 _.paused = true; 27907 _.positionProp = null; 27908 _.respondTo = null; 27909 _.rowCount = 1; 27910 _.shouldClick = true; 27911 _.$slider = $(element); 27912 _.$slidesCache = null; 27913 _.transformType = null; 27914 _.transitionType = null; 27915 _.visibilityChange = 'visibilitychange'; 27916 _.windowWidth = 0; 27917 _.windowTimer = null; 27918 27919 dataSettings = $(element).data('slick') || {}; 27920 27921 _.options = $.extend({}, _.defaults, settings, dataSettings); 27922 27923 _.currentSlide = _.options.initialSlide; 27924 27925 _.originalSettings = _.options; 27926 27927 if (typeof document.mozHidden !== 'undefined') { 27928 _.hidden = 'mozHidden'; 27929 _.visibilityChange = 'mozvisibilitychange'; 27930 } else if (typeof document.webkitHidden !== 'undefined') { 27931 _.hidden = 'webkitHidden'; 27932 _.visibilityChange = 'webkitvisibilitychange'; 27933 } 27934 27935 _.autoPlay = $.proxy(_.autoPlay, _); 27936 _.autoPlayClear = $.proxy(_.autoPlayClear, _); 27937 _.autoPlayIterator = $.proxy(_.autoPlayIterator, _); 27938 _.changeSlide = $.proxy(_.changeSlide, _); 27939 _.clickHandler = $.proxy(_.clickHandler, _); 27940 _.selectHandler = $.proxy(_.selectHandler, _); 27941 _.setPosition = $.proxy(_.setPosition, _); 27942 _.swipeHandler = $.proxy(_.swipeHandler, _); 27943 _.dragHandler = $.proxy(_.dragHandler, _); 27944 _.keyHandler = $.proxy(_.keyHandler, _); 27945 27946 _.instanceUid = instanceUid++; 27947 27948 // A simple way to check for HTML strings 27949 // Strict HTML recognition (must start with <) 27950 // Extracted from jQuery v1.11 source 27951 _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/; 27952 27953 27954 _.registerBreakpoints(); 27955 _.init(true); 27956 27957 } 27958 27959 return Slick; 27960 27961 }()); 27962 27963 Slick.prototype.activateADA = function() { 27964 var _ = this; 27965 27966 _.$slideTrack.find('.slick-active').attr({ 27967 'aria-hidden': 'false' 27968 }).find('a, input, button, select').attr({ 27969 'tabindex': '0' 27970 }); 27971 27972 }; 27973 27974 Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) { 27975 27976 var _ = this; 27977 27978 if (typeof(index) === 'boolean') { 27979 addBefore = index; 27980 index = null; 27981 } else if (index < 0 || (index >= _.slideCount)) { 27982 return false; 27983 } 27984 27985 _.unload(); 27986 27987 if (typeof(index) === 'number') { 27988 if (index === 0 && _.$slides.length === 0) { 27989 $(markup).appendTo(_.$slideTrack); 27990 } else if (addBefore) { 27991 $(markup).insertBefore(_.$slides.eq(index)); 27992 } else { 27993 $(markup).insertAfter(_.$slides.eq(index)); 27994 } 27995 } else { 27996 if (addBefore === true) { 27997 $(markup).prependTo(_.$slideTrack); 27998 } else { 27999 $(markup).appendTo(_.$slideTrack); 28000 } 28001 } 28002 28003 _.$slides = _.$slideTrack.children(this.options.slide); 28004 28005 _.$slideTrack.children(this.options.slide).detach(); 28006 28007 _.$slideTrack.append(_.$slides); 28008 28009 _.$slides.each(function(index, element) { 28010 $(element).attr('data-slick-index', index); 28011 }); 28012 28013 _.$slidesCache = _.$slides; 28014 28015 _.reinit(); 28016 28017 }; 28018 28019 Slick.prototype.animateHeight = function() { 28020 var _ = this; 28021 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 28022 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 28023 _.$list.animate({ 28024 height: targetHeight 28025 }, _.options.speed); 28026 } 28027 }; 28028 28029 Slick.prototype.animateSlide = function(targetLeft, callback) { 28030 28031 var animProps = {}, 28032 _ = this; 28033 28034 _.animateHeight(); 28035 28036 if (_.options.rtl === true && _.options.vertical === false) { 28037 targetLeft = -targetLeft; 28038 } 28039 if (_.transformsEnabled === false) { 28040 if (_.options.vertical === false) { 28041 _.$slideTrack.animate({ 28042 left: targetLeft 28043 }, _.options.speed, _.options.easing, callback); 28044 } else { 28045 _.$slideTrack.animate({ 28046 top: targetLeft 28047 }, _.options.speed, _.options.easing, callback); 28048 } 28049 28050 } else { 28051 28052 if (_.cssTransitions === false) { 28053 if (_.options.rtl === true) { 28054 _.currentLeft = -(_.currentLeft); 28055 } 28056 $({ 28057 animStart: _.currentLeft 28058 }).animate({ 28059 animStart: targetLeft 28060 }, { 28061 duration: _.options.speed, 28062 easing: _.options.easing, 28063 step: function(now) { 28064 now = Math.ceil(now); 28065 if (_.options.vertical === false) { 28066 animProps[_.animType] = 'translate(' + 28067 now + 'px, 0px)'; 28068 _.$slideTrack.css(animProps); 28069 } else { 28070 animProps[_.animType] = 'translate(0px,' + 28071 now + 'px)'; 28072 _.$slideTrack.css(animProps); 28073 } 28074 }, 28075 complete: function() { 28076 if (callback) { 28077 callback.call(); 28078 } 28079 } 28080 }); 28081 28082 } else { 28083 28084 _.applyTransition();
28085 targetLeft = Math.ceil(targetLeft); 28086 28087 if (_.options.vertical === false) { 28088 animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)'; 28089 } else { 28090 animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)'; 28091 } 28092 _.$slideTrack.css(animProps); 28093 28094 if (callback) { 28095 setTimeout(function() { 28096 28097 _.disableTransition(); 28098 28099 callback.call(); 28100 }, _.options.speed); 28101 } 28102 28103 } 28104 28105 } 28106 28107 }; 28108 28109 Slick.prototype.getNavTarget = function() { 28110 28111 var _ = this, 28112 asNavFor = _.options.asNavFor; 28113 28114 if ( asNavFor && asNavFor !== null ) { 28115 asNavFor = $(asNavFor).not(_.$slider); 28116 } 28117 28118 return asNavFor; 28119 28120 }; 28121 28122 Slick.prototype.asNavFor = function(index) { 28123 28124 var _ = this, 28125 asNavFor = _.getNavTarget(); 28126 28127 if ( asNavFor !== null && typeof asNavFor === 'object' ) { 28128 asNavFor.each(function() { 28129 var target = $(this).slick('getSlick'); 28130 if(!target.unslicked) { 28131 target.slideHandler(index, true); 28132 } 28133 }); 28134 } 28135 28136 }; 28137 28138 Slick.prototype.applyTransition = function(slide) { 28139 28140 var _ = this, 28141 transition = {}; 28142 28143 if (_.options.fade === false) { 28144 transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase; 28145 } else { 28146 transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase; 28147 } 28148 28149 if (_.options.fade === false) { 28150 _.$slideTrack.css(transition); 28151 } else { 28152 _.$slides.eq(slide).css(transition); 28153 } 28154 28155 }; 28156 28157 Slick.prototype.autoPlay = function() { 28158 28159 var _ = this; 28160 28161 _.autoPlayClear(); 28162 28163 if ( _.slideCount > _.options.slidesToShow ) { 28164 _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed ); 28165 } 28166 28167 }; 28168 28169 Slick.prototype.autoPlayClear = function() { 28170 28171 var _ = this; 28172 28173 if (_.autoPlayTimer) { 28174 clearInterval(_.autoPlayTimer); 28175 } 28176 28177 }; 28178 28179 Slick.prototype.autoPlayIterator = function() { 28180 28181 var _ = this, 28182 slideTo = _.currentSlide + _.options.slidesToScroll; 28183 28184 if ( !_.paused && !_.interrupted && !_.focussed ) { 28185 28186 if ( _.options.infinite === false ) { 28187 28188 if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) { 28189 _.direction = 0; 28190 } 28191 28192 else if ( _.direction === 0 ) { 28193 28194 slideTo = _.currentSlide - _.options.slidesToScroll; 28195 28196 if ( _.currentSlide - 1 === 0 ) { 28197 _.direction = 1; 28198 } 28199 28200 } 28201 28202 } 28203 28204 _.slideHandler( slideTo ); 28205 28206 } 28207 28208 }; 28209 28210 Slick.prototype.buildArrows = function() { 28211 28212 var _ = this; 28213 28214 if (_.options.arrows === true ) { 28215 28216 _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow'); 28217 _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow'); 28218 28219 if( _.slideCount > _.options.slidesToShow ) { 28220 28221 _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 28222 _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex'); 28223 28224 if (_.htmlExpr.test(_.options.prevArrow)) { 28225 _.$prevArrow.prependTo(_.options.appendArrows); 28226 } 28227 28228 if (_.htmlExpr.test(_.options.nextArrow)) { 28229 _.$nextArrow.appendTo(_.options.appendArrows); 28230 } 28231 28232 if (_.options.infinite !== true) { 28233 _.$prevArrow 28234 .addClass('slick-disabled') 28235 .attr('aria-disabled', 'true'); 28236 } 28237 28238 } else { 28239 28240 _.$prevArrow.add( _.$nextArrow ) 28241 28242 .addClass('slick-hidden') 28243 .attr({ 28244 'aria-disabled': 'true', 28245 'tabindex': '-1' 28246 }); 28247 28248 } 28249 28250 } 28251 28252 }; 28253 28254 Slick.prototype.buildDots = function() { 28255 28256 var _ = this, 28257 i, dot; 28258 28259 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 28260 28261 _.$slider.addClass('slick-dotted'); 28262 28263 dot = $('<ul />').addClass(_.options.dotsClass); 28264 28265 for (i = 0; i <= _.getDotCount(); i += 1) { 28266 dot.append($('<li />').append(_.options.customPaging.call(this, _, i))); 28267 } 28268 28269 _.$dots = dot.appendTo(_.options.appendDots); 28270 28271 _.$dots.find('li').first().addClass('slick-active'); 28272 28273 } 28274 28275 }; 28276 28277 Slick.prototype.buildOut = function() { 28278 28279 var _ = this; 28280 28281 _.$slides = 28282 _.$slider 28283 .children( _.options.slide + ':not(.slick-cloned)') 28284 .addClass('slick-slide'); 28285 28286 _.slideCount = _.$slides.length; 28287 28288 _.$slides.each(function(index, element) { 28289 $(element) 28290 .attr('data-slick-index', index) 28291 .data('originalStyling', $(element).attr('style') || ''); 28292 }); 28293 28294 _.$slider.addClass('slick-slider'); 28295 28296 _.$slideTrack = (_.slideCount === 0) ? 28297 $('<div class="slick-track"/>').appendTo(_.$slider) : 28298 _.$slides.wrapAll('<div class="slick-track"/>').parent(); 28299 28300 _.$list = _.$slideTrack.wrap( 28301 '<div class="slick-list"/>').parent(); 28302 _.$slideTrack.css('opacity', 0); 28303 28304 if (_.options.centerMode === true || _.options.swipeToSlide === true) {
28305 _.options.slidesToScroll = 1; 28306 } 28307 28308 $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading'); 28309 28310 _.setupInfinite(); 28311 28312 _.buildArrows(); 28313 28314 _.buildDots(); 28315 28316 _.updateDots(); 28317 28318 28319 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 28320 28321 if (_.options.draggable === true) { 28322 _.$list.addClass('draggable'); 28323 } 28324 28325 }; 28326 28327 Slick.prototype.buildRows = function() { 28328 28329 var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection; 28330 28331 newSlides = document.createDocumentFragment(); 28332 originalSlides = _.$slider.children(); 28333 28334 if(_.options.rows > 0) { 28335 28336 slidesPerSection = _.options.slidesPerRow * _.options.rows; 28337 numOfSlides = Math.ceil( 28338 originalSlides.length / slidesPerSection 28339 ); 28340 28341 for(a = 0; a < numOfSlides; a++){ 28342 var slide = document.createElement('div'); 28343 for(b = 0; b < _.options.rows; b++) { 28344 var row = document.createElement('div'); 28345 for(c = 0; c < _.options.slidesPerRow; c++) { 28346 var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c)); 28347 if (originalSlides.get(target)) { 28348 row.appendChild(originalSlides.get(target)); 28349 } 28350 } 28351 slide.appendChild(row); 28352 } 28353 newSlides.appendChild(slide); 28354 } 28355 28356 _.$slider.empty().append(newSlides); 28357 _.$slider.children().children().children() 28358 .css({ 28359 'width':(100 / _.options.slidesPerRow) + '%', 28360 'display': 'inline-block' 28361 }); 28362 28363 } 28364 28365 }; 28366 28367 Slick.prototype.checkResponsive = function(initial, forceUpdate) { 28368 28369 var _ = this, 28370 breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false; 28371 var sliderWidth = _.$slider.width(); 28372 var windowWidth = window.innerWidth || $(window).width(); 28373 28374 if (_.respondTo === 'window') { 28375 respondToWidth = windowWidth; 28376 } else if (_.respondTo === 'slider') { 28377 respondToWidth = sliderWidth; 28378 } else if (_.respondTo === 'min') { 28379 respondToWidth = Math.min(windowWidth, sliderWidth); 28380 } 28381 28382 if ( _.options.responsive && 28383 _.options.responsive.length && 28384 _.options.responsive !== null) { 28385 28386 targetBreakpoint = null; 28387 28388 for (breakpoint in _.breakpoints) { 28389 if (_.breakpoints.hasOwnProperty(breakpoint)) { 28390 if (_.originalSettings.mobileFirst === false) { 28391 if (respondToWidth < _.breakpoints[breakpoint]) { 28392 targetBreakpoint = _.breakpoints[breakpoint]; 28393 } 28394 } else { 28395 if (respondToWidth > _.breakpoints[breakpoint]) { 28396 targetBreakpoint = _.breakpoints[breakpoint]; 28397 } 28398 } 28399 } 28400 } 28401 28402 if (targetBreakpoint !== null) { 28403 if (_.activeBreakpoint !== null) { 28404 if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) { 28405 _.activeBreakpoint = 28406 targetBreakpoint; 28407 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 28408 _.unslick(targetBreakpoint); 28409 } else { 28410 _.options = $.extend({}, _.originalSettings, 28411 _.breakpointSettings[ 28412 targetBreakpoint]); 28413 if (initial === true) { 28414 _.currentSlide = _.options.initialSlide; 28415 } 28416 _.refresh(initial); 28417 }
28418 triggerBreakpoint = targetBreakpoint; 28419 } 28420 } else { 28421 _.activeBreakpoint = targetBreakpoint; 28422 if (_.breakpointSettings[targetBreakpoint] === 'unslick') { 28423 _.unslick(targetBreakpoint); 28424 } else { 28425 _.options = $.extend({}, _.originalSettings, 28426 _.breakpointSettings[ 28427 targetBreakpoint]); 28428 if (initial === true) { 28429 _.currentSlide = _.options.initialSlide; 28430 } 28431 _.refresh(initial); 28432 } 28433 triggerBreakpoint = targetBreakpoint; 28434 } 28435 } else { 28436 if (_.activeBreakpoint !== null) { 28437 _.activeBreakpoint = null; 28438 _.options = _.originalSettings; 28439 if (initial === true) { 28440 _.currentSlide = _.options.initialSlide; 28441 } 28442 _.refresh(initial); 28443 triggerBreakpoint = targetBreakpoint; 28444 } 28445 } 28446 28447 // only trigger breakpoints during an actual break. not on initialize. 28448 if( !initial && triggerBreakpoint !== false ) { 28449 _.$slider.trigger('breakpoint', [_, triggerBreakpoint]); 28450 } 28451 } 28452 28453 }; 28454 28455 Slick.prototype.changeSlide = function(event, dontAnimate) { 28456 28457 var _ = this, 28458 $target = $(event.currentTarget), 28459 indexOffset, slideOffset, unevenOffset; 28460 28461 // If target is a link, prevent default action. 28462 if($target.is('a')) { 28463 event.preventDefault(); 28464 } 28465 28466 // If target is not the <li> element (ie: a child), find the <li>. 28467 if(!$target.is('li')) { 28468 $target = $target.closest('li'); 28469 } 28470 28471 unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0); 28472 indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll; 28473 28474 switch (event.data.message) { 28475 28476 case 'previous': 28477 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset; 28478 if (_.slideCount > _.options.slidesToShow) { 28479 _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate); 28480 } 28481 break; 28482 28483 case 'next': 28484 slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset; 28485 if (_.slideCount > _.options.slidesToShow) { 28486 _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate); 28487 } 28488 break; 28489 28490 case 'index': 28491 var index = event.data.index === 0 ? 0 : 28492 event.data.index || $target.index() * _.options.slidesToScroll; 28493 28494 _.slideHandler(_.checkNavigable(index), false, dontAnimate); 28495 $target.children().trigger('focus'); 28496 break; 28497 28498 default: 28499 return; 28500 } 28501 28502 }; 28503 28504 Slick.prototype.checkNavigable = function(index) { 28505 28506 var _ = this, 28507 navigables, prevNavigable; 28508 28509 navigables = _.getNavigableIndexes(); 28510 prevNavigable = 0; 28511 if (index > navigables[navigables.length - 1]) { 28512 index = navigables[navigables.length - 1]; 28513 } else { 28514 for (var n in navigables) { 28515 if (index < navigables[n]) { 28516 index = prevNavigable; 28517 break; 28518 } 28519 prevNavigable = navigables[n]; 28520 } 28521 } 28522 28523 return index; 28524 }; 28525 28526 Slick.prototype.cleanUpEvents = function() { 28527 28528 var _ = this; 28529 28530 if (_.options.dots && _.$dots !== null) { 28531 28532 $('li', _.$dots) 28533 .off('click.slick', _.changeSlide) 28534 .off('mouseenter.slick', $.proxy(_.interrupt, _, true)) 28535 .off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 28536 28537 if (_.options.accessibility === true) { 28538 _.$dots.off('keydown.slick', _.keyHandler); 28539 } 28540 } 28541 28542 _.$slider.off('focus.slick blur.slick'); 28543 28544 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 28545 _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide); 28546 _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide); 28547 28548 if (_.options.accessibility === true) { 28549 _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler); 28550 _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler); 28551 } 28552 } 28553 28554 _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler); 28555 _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler); 28556 _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
28557 _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler); 28558 28559 _.$list.off('click.slick', _.clickHandler); 28560 28561 $(document).off(_.visibilityChange, _.visibility); 28562 28563 _.cleanUpSlideEvents(); 28564 28565 if (_.options.accessibility === true) { 28566 _.$list.off('keydown.slick', _.keyHandler); 28567 } 28568 28569 if (_.options.focusOnSelect === true) { 28570 $(_.$slideTrack).children().off('click.slick', _.selectHandler); 28571 } 28572 28573 $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange); 28574 28575 $(window).off('resize.slick.slick-' + _.instanceUid, _.resize); 28576 28577 $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault); 28578 28579 $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition); 28580 28581 }; 28582 28583 Slick.prototype.cleanUpSlideEvents = function() { 28584 28585 var _ = this; 28586 28587 _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true)); 28588 _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false)); 28589 28590 }; 28591 28592 Slick.prototype.cleanUpRows = function() { 28593 28594 var _ = this, originalSlides; 28595 28596 if(_.options.rows > 0) { 28597 originalSlides = _.$slides.children().children(); 28598 originalSlides.removeAttr('style'); 28599 _.$slider.empty().append(originalSlides); 28600 } 28601 28602 }; 28603 28604 Slick.prototype.clickHandler = function(event) { 28605 28606 var _ = this; 28607 28608 if (_.shouldClick === false) { 28609 event.stopImmediatePropagation(); 28610 event.stopPropagation(); 28611 event.preventDefault(); 28612 } 28613 28614 }; 28615 28616 Slick.prototype.destroy = function(refresh) { 28617 28618 var _ = this; 28619 28620 _.autoPlayClear(); 28621 28622 _.touchObject = {}; 28623 28624 _.cleanUpEvents(); 28625 28626 $('.slick-cloned', _.$slider).detach(); 28627 28628 if (_.$dots) { 28629 _.$dots.remove(); 28630 } 28631 28632 if ( _.$prevArrow && _.$prevArrow.length ) { 28633 28634 _.$prevArrow 28635 .removeClass('slick-disabled slick-arrow slick-hidden') 28636 .removeAttr('aria-hidden aria-disabled tabindex') 28637 .css('display',''); 28638 28639 if ( _.htmlExpr.test( _.options.prevArrow )) { 28640 _.$prevArrow.remove(); 28641 } 28642 } 28643 28644 if ( _.$nextArrow && _.$nextArrow.length ) { 28645 28646 _.$nextArrow 28647 .removeClass('slick-disabled slick-arrow slick-hidden') 28648 .removeAttr('aria-hidden aria-disabled tabindex') 28649 .css('display',''); 28650 28651 if ( _.htmlExpr.test( _.options.nextArrow )) { 28652 _.$nextArrow.remove(); 28653 } 28654 } 28655 28656 28657 if (_.$slides) { 28658 28659 _.$slides 28660 .removeClass('slick-slide slick-active slick-center slick-visible slick-current') 28661 .removeAttr('aria-hidden') 28662 .removeAttr('data-slick-index') 28663 .each(function(){ 28664 $(this).attr('style', $(this).data('originalStyling')); 28665 }); 28666 28667 _.$slideTrack.children(this.options.slide).detach(); 28668 28669 _.$slideTrack.detach(); 28670 28671 _.$list.detach(); 28672 28673 _.$slider.append(_.$slides); 28674 } 28675 28676 _.cleanUpRows(); 28677 28678 _.$slider.removeClass('slick-slider'); 28679 _.$slider.removeClass('slick-initialized'); 28680 _.$slider.removeClass('slick-dotted'); 28681 28682 _.unslicked = true; 28683 28684 if(!refresh) { 28685 _.$slider.trigger('destroy', [_]); 28686 } 28687 28688 }; 28689 28690 Slick.prototype.disableTransition = function(slide) { 28691 28692 var _ = this, 28693 transition = {}; 28694 28695 transition[_.transitionType] = ''; 28696 28697 if (_.options.fade === false) { 28698 _.$slideTrack.css(transition); 28699 } else { 28700 _.$slides.eq(slide).css(transition); 28701 } 28702 28703 }; 28704 28705 Slick.prototype.fadeSlide = function(slideIndex, callback) { 28706 28707 var _ = this; 28708 28709 if (_.cssTransitions === false) { 28710 28711 _.$slides.eq(slideIndex).css({ 28712 zIndex: _.options.zIndex 28713 }); 28714 28715 _.$slides.eq(slideIndex).animate({ 28716 opacity: 1 28717 }, _.options.speed, _.options.easing, callback); 28718 28719 } else { 28720 28721 _.applyTransition(slideIndex); 28722 28723 _.$slides.eq(slideIndex).css({ 28724 opacity: 1, 28725 zIndex: _.options.zIndex 28726 }); 28727 28728 if (callback) { 28729 setTimeout(function() { 28730 28731 _.disableTransition(slideIndex); 28732 28733 callback.call(); 28734 }, _.options.speed); 28735 } 28736 28737 } 28738 28739 }; 28740 28741 Slick.prototype.fadeSlideOut = function(slideIndex) { 28742 28743 var _ = this; 28744 28745 if (_.cssTransitions === false) { 28746 28747 _.$slides.eq(slideIndex).animate({ 28748 opacity: 0, 28749 zIndex: _.options.zIndex - 2 28750 }, _.options.speed, _.options.easing); 28751 28752 } else { 28753 28754 _.applyTransition(slideIndex); 28755 28756 _.$slides.eq(slideIndex).css({ 28757 opacity: 0, 28758 zIndex: _.options.zIndex - 2 28759 }); 28760 28761 } 28762 28763 }; 28764
28765 Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) { 28766 28767 var _ = this; 28768 28769 if (filter !== null) { 28770 28771 _.$slidesCache = _.$slides; 28772 28773 _.unload(); 28774 28775 _.$slideTrack.children(this.options.slide).detach(); 28776 28777 _.$slidesCache.filter(filter).appendTo(_.$slideTrack); 28778 28779 _.reinit(); 28780 28781 } 28782 28783 }; 28784 28785 Slick.prototype.focusHandler = function() { 28786 28787 var _ = this; 28788 28789 _.$slider 28790 .off('focus.slick blur.slick') 28791 .on('focus.slick blur.slick', '*', function(event) { 28792 28793 event.stopImmediatePropagation(); 28794 var $sf = $(this); 28795 28796 setTimeout(function() { 28797 28798 if( _.options.pauseOnFocus ) { 28799 _.focussed = $sf.is(':focus'); 28800 _.autoPlay(); 28801 } 28802 28803 }, 0); 28804 28805 }); 28806 }; 28807 28808 Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() { 28809 28810 var _ = this; 28811 return _.currentSlide; 28812 28813 }; 28814 28815 Slick.prototype.getDotCount = function() { 28816 28817 var _ = this; 28818 28819 var breakPoint = 0; 28820 var counter = 0; 28821 var pagerQty = 0; 28822 28823 if (_.options.infinite === true) { 28824 if (_.slideCount <= _.options.slidesToShow) { 28825 ++pagerQty; 28826 } else { 28827 while (breakPoint < _.slideCount) { 28828 ++pagerQty; 28829 breakPoint = counter + _.options.slidesToScroll; 28830 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 28831 } 28832 } 28833 } else if (_.options.centerMode === true) { 28834 pagerQty = _.slideCount; 28835 } else if(!_.options.asNavFor) { 28836 pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll); 28837 }else { 28838 while (breakPoint < _.slideCount) { 28839 ++pagerQty; 28840 breakPoint = counter + _.options.slidesToScroll; 28841 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 28842 } 28843 } 28844 28845 return pagerQty - 1; 28846 28847 }; 28848 28849 Slick.prototype.getLeft = function(slideIndex) { 28850 28851 var _ = this, 28852 targetLeft, 28853 verticalHeight, 28854 verticalOffset = 0, 28855 targetSlide, 28856 coef; 28857 28858 _.slideOffset = 0; 28859 verticalHeight = _.$slides.first().outerHeight(true); 28860 28861 if (_.options.infinite === true) { 28862 if (_.slideCount > _.options.slidesToShow) { 28863 _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1; 28864 coef = -1 28865 28866 if (_.options.vertical === true && _.options.centerMode === true) { 28867 if (_.options.slidesToShow === 2) { 28868 coef = -1.5; 28869 } else if (_.options.slidesToShow === 1) { 28870 coef = -2 28871 } 28872 } 28873 verticalOffset = (verticalHeight * _.options.slidesToShow) * coef; 28874 } 28875 if (_.slideCount % _.options.slidesToScroll !== 0) { 28876 if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) { 28877 if (slideIndex > _.slideCount) { 28878 _.slideOffset = ((_.options.slidesToShow - (sl
28878ideIndex - _.slideCount)) * _.slideWidth) * -1; 28879 verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1; 28880 } else { 28881 _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1; 28882 verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1; 28883 } 28884 } 28885 } 28886 } else { 28887 if (slideIndex + _.options.slidesToShow > _.slideCount) { 28888 _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth; 28889 verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight; 28890 } 28891 } 28892 28893 if (_.slideCount <= _.options.slidesToShow) { 28894 _.slideOffset = 0; 28895 verticalOffset = 0; 28896 } 28897 28898 if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) { 28899 _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2); 28900 } else if (_.options.centerMode === true && _.options.infinite === true) { 28901 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth; 28902 } else if (_.options.centerMode === true) { 28903 _.slideOffset = 0; 28904 _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2); 28905 } 28906 28907 if (_.options.vertical === false) { 28908 targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset; 28909 } else { 28910 targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset; 28911 } 28912 28913 if (_.options.variableWidth === true) { 28914
28915 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 28916 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 28917 } else { 28918 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow); 28919 } 28920 28921 if (_.options.rtl === true) { 28922 if (targetSlide[0]) { 28923 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 28924 } else { 28925 targetLeft = 0; 28926 } 28927 } else { 28928 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 28929 } 28930 28931 if (_.options.centerMode === true) { 28932 if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) { 28933 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex); 28934 } else { 28935 targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1); 28936 } 28937 28938 if (_.options.rtl === true) { 28939 if (targetSlide[0]) { 28940 targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1; 28941 } else { 28942 targetLeft = 0; 28943 } 28944 } else { 28945 targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0; 28946 } 28947 28948 targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2; 28949 } 28950 } 28951 28952 return targetLeft; 28953 28954 }; 28955 28956 Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) { 28957 28958 var _ = this; 28959 28960 return _.options[option]; 28961 28962 }; 28963 28964 Slick.prototype.getNavigableIndexes = function() { 28965 28966 var _ = this, 28967 breakPoint = 0, 28968 counter = 0, 28969 indexes = [], 28970 max; 28971 28972 if (_.options.infinite === false) { 28973 max = _.slideCount; 28974 } else { 28975 breakPoint = _.options.slidesToScroll * -1; 28976 counter = _.options.slidesToScroll * -1; 28977 max = _.slideCount * 2; 28978 } 28979 28980 while (breakPoint < max) { 28981 indexes.push(breakPoint); 28982 breakPoint = counter + _.options.slidesToScroll; 28983 counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow; 28984 } 28985 28986 return indexes; 28987 28988 }; 28989 28990 Slick.prototype.getSlick = function() { 28991 28992 return this; 28993 28994 }; 28995 28996 Slick.prototype.getSlideCount = function() { 28997 28998 var _ = this, 28999 slidesTraversed, swipedSlide, centerOffset; 29000 29001 centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0; 29002 29003 if (_.options.swipeToSlide === true) { 29004 _.$slideTrack.find('.slick-slide').each(function(index, slide) { 29005 if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) { 29006 swipedSlide = slide; 29007 return false; 29008 } 29009 }); 29010 29011 slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1; 29012 29013 return slidesTraversed; 29014 29015 } else { 29016 return _.options.slidesToScroll; 29017 } 29018 29019 }; 29020 29021 Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) { 29022 29023 var _ = this; 29024 29025 _.changeSlide({ 29026 data: { 29027 message: 'index', 29028 index: parseInt(slide) 29029 } 29030 }, dontAnimate); 29031 29032 }; 29033 29034 Slick.prototype.init = function(creation) { 29035 29036 var _ = this; 29037 29038 if (!$(_.$slider).hasClass('slick-initialized')) { 29039 29040 $(_.$slider).addClass('slick-initialized'); 29041 29042 _.buildRows(); 29043 _.buildOut(); 29044 _.setProps(); 29045 _.startLoad(); 29046 _.loadSlider(); 29047 _.initializeEvents(); 29048 _.updateArrows(); 29049 _.updateDots(); 29050 _.checkResponsive(true); 29051 _.focusHandler(); 29052 29053 } 29054 29055 if (creation) { 29056 _.$slider.trigger('init', [_]); 29057 } 29058 29059 if (_.options.accessibility === true) { 29060 _.initADA(); 29061 } 29062 29063 if ( _.options.autoplay ) { 29064 29065 _.paused = false;
29066 _.autoPlay(); 29067 29068 } 29069 29070 }; 29071 29072 Slick.prototype.initADA = function() { 29073 var _ = this, 29074 numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow), 29075 tabControlIndexes = _.getNavigableIndexes().filter(function(val) { 29076 return (val >= 0) && (val < _.slideCount); 29077 }); 29078 29079 _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({ 29080 'aria-hidden': 'true', 29081 'tabindex': '-1' 29082 }).find('a, input, button, select').attr({ 29083 'tabindex': '-1' 29084 }); 29085 29086 if (_.$dots !== null) { 29087 _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) { 29088 var slideControlIndex = tabControlIndexes.indexOf(i); 29089 29090 $(this).attr({ 29091 'role': 'tabpanel', 29092 'id': 'slick-slide' + _.instanceUid + i, 29093 'tabindex': -1 29094 }); 29095 29096 if (slideControlIndex !== -1) { 29097 var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex 29098 if ($('#' + ariaButtonControl).length) { 29099 $(this).attr({ 29100 'aria-describedby': ariaButtonControl 29101 }); 29102 } 29103 } 29104 }); 29105 29106 _.$dots.attr('role', 'tablist').find('li').each(function(i) { 29107 var mappedSlideIndex = tabControlIndexes[i]; 29108 29109 $(this).attr({ 29110 'role': 'presentation' 29111 }); 29112 29113 $(this).find('button').first().attr({ 29114 'role': 'tab', 29115 'id': 'slick-slide-control' + _.instanceUid + i, 29116 'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex, 29117 'aria-label': (i + 1) + ' of ' + numDotGroups, 29118 'aria-selected': null, 29119 'tabindex': '-1' 29120 }); 29121 29122 }).eq(_.currentSlide).find('button').attr({ 29123 'aria-selected': 'true', 29124 'tabindex': '0' 29125 }).end(); 29126 } 29127 29128 for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) { 29129 if (_.options.focusOnChange) { 29130 _.$slides.eq(i).attr({'tabindex': '0'}); 29131 } else { 29132 _.$slides.eq(i).removeAttr('tabindex'); 29133 } 29134 } 29135 29136 _.activateADA(); 29137 29138 }; 29139 29140 Slick.prototype.initArrowEvents = function() { 29141 29142 var _ = this; 29143 29144 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 29145 _.$prevArrow 29146 .off('click.slick') 29147 .on('click.slick', { 29148 message: 'previous' 29149 }, _.changeSlide); 29150 _.$nextArrow 29151 .off('click.slick') 29152 .on('click.slick', { 29153 message: 'next' 29154 }, _.changeSlide); 29155 29156 if (_.options.accessibility === true) { 29157 _.$prevArrow.on('keydown.slick', _.keyHandler); 29158 _.$nextArrow.on('keydown.slick', _.keyHandler); 29159 } 29160 } 29161 29162 }; 29163 29164 Slick.prototype.initDotEvents = function() { 29165 29166 var _ = this; 29167 29168 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 29169 $('li', _.$dots).on('click.slick', { 29170 message: 'index' 29171 }, _.changeSlide); 29172 29173 if (_.options.accessibility === true) { 29174 _.$dots.on('keydown.slick', _.keyHandler); 29175 } 29176 } 29177 29178 if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) { 29179 29180 $('li', _.$dots) 29181 .on('mouseenter.slick', $.proxy(_.interrupt, _, true)) 29182 .on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 29183 29184 } 29185 29186 }; 29187 29188 Slick.prototype.initSlideEvents = function() { 29189 29190 var _ = this; 29191 29192 if ( _.options.pauseOnHover ) { 29193 29194 _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
29195 _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false)); 29196 29197 } 29198 29199 }; 29200 29201 Slick.prototype.initializeEvents = function() { 29202 29203 var _ = this; 29204 29205 _.initArrowEvents(); 29206 29207 _.initDotEvents(); 29208 _.initSlideEvents(); 29209 29210 _.$list.on('touchstart.slick mousedown.slick', { 29211 action: 'start' 29212 }, _.swipeHandler); 29213 _.$list.on('touchmove.slick mousemove.slick', { 29214 action: 'move' 29215 }, _.swipeHandler); 29216 _.$list.on('touchend.slick mouseup.slick', { 29217 action: 'end' 29218 }, _.swipeHandler); 29219 _.$list.on('touchcancel.slick mouseleave.slick', { 29220 action: 'end' 29221 }, _.swipeHandler); 29222 29223 _.$list.on('click.slick', _.clickHandler); 29224 29225 $(document).on(_.visibilityChange, $.proxy(_.visibility, _)); 29226 29227 if (_.options.accessibility === true) { 29228 _.$list.on('keydown.slick', _.keyHandler); 29229 } 29230 29231 if (_.options.focusOnSelect === true) { 29232 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 29233 } 29234 29235 $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _)); 29236 29237 $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _)); 29238 29239 $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault); 29240 29241 $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition); 29242 $(_.setPosition); 29243 29244 }; 29245 29246 Slick.prototype.initUI = function() { 29247 29248 var _ = this; 29249 29250 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 29251 29252 _.$prevArrow.show(); 29253 _.$nextArrow.show(); 29254 29255 } 29256 29257 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 29258 29259 _.$dots.show(); 29260 29261 } 29262 29263 }; 29264 29265 Slick.prototype.keyHandler = function(event) { 29266 29267 var _ = this; 29268 //Dont slide if the cursor is inside the form fields and arrow keys are pressed 29269 if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) { 29270 if (event.keyCode === 37 && _.options.accessibility === true) { 29271 _.changeSlide({ 29272 data: { 29273 message: _.options.rtl === true ? 'next' : 'previous' 29274 } 29275 }); 29276 } else if (event.keyCode === 39 && _.options.accessibility === true) { 29277 _.changeSlide({ 29278 data: { 29279 message: _.options.rtl === true ? 'previous' : 'next' 29280 } 29281 }); 29282 } 29283 } 29284 29285 }; 29286 29287 Slick.prototype.lazyLoad = function() { 29288 29289 var _ = this, 29290 loadRange, cloneRange, rangeStart, rangeEnd; 29291 29292 function loadImages(imagesScope) { 29293 29294 $('img[data-lazy]', imagesScope).each(function() { 29295 29296 var image = $(this), 29297 imageSource = $(this).attr('data-lazy'), 29298 imageSrcSet = $(this).attr('data-srcset'), 29299 imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'), 29300 imageToLoad = document.createElement('img'); 29301 29302 imageToLoad.onload = function() { 29303 29304 image 29305 .animate({ opacity: 0 }, 100, function() { 29306 29307 if (imageSrcSet) { 29308 image 29309 .attr('srcset', imageSrcSet ); 29310 29311 if (imageSizes) { 29312 image 29313 .attr('sizes', imageSizes ); 29314 } 29315 } 29316 29317 image 29318 .attr('src', imageSource) 29319 .animate({ opacity: 1 }, 200, function() { 29320 image 29321 .removeAttr('data-lazy data-srcset data-sizes') 29322 .removeClass('slick-loading'); 29323 }); 29324 _.$slider.trigger('lazyLoaded', [_, image, imageSource]); 29325 }); 29326 29327 }; 29328 29329 imageToLoad.onerror = function() { 29330 29331 image 29332 .removeAttr( 'data-lazy' ) 29333 .removeClass( 'slick-loading' ) 29334 .addClass( 'slick-lazyload-error' ); 29335 29336 _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); 29337 29338 }; 29339 29340 imageToLoad.src = imageSource; 29341 29342 }); 29343 29344 } 29345 29346 if (_.options.centerMode === true) { 29347 if (_.options.infinite === true) { 29348 rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1); 29349 rangeEnd = rangeStart + _.options.slidesToShow + 2; 29350 } else { 29351 rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1)); 29352 rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide; 29353 } 29354 } else {
29355 rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide; 29356 rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow); 29357 if (_.options.fade === true) { 29358 if (rangeStart > 0) rangeStart--; 29359 if (rangeEnd <= _.slideCount) rangeEnd++; 29360 } 29361 } 29362 29363 loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd); 29364 29365 if (_.options.lazyLoad === 'anticipated') { 29366 var prevSlide = rangeStart - 1, 29367 nextSlide = rangeEnd, 29368 $slides = _.$slider.find('.slick-slide'); 29369 29370 for (var i = 0; i < _.options.slidesToScroll; i++) { 29371 if (prevSlide < 0) prevSlide = _.slideCount - 1; 29372 loadRange = loadRange.add($slides.eq(prevSlide)); 29373 loadRange = loadRange.add($slides.eq(nextSlide)); 29374 prevSlide--; 29375 nextSlide++; 29376 } 29377 } 29378 29379 loadImages(loadRange); 29380 29381 if (_.slideCount <= _.options.slidesToShow) { 29382 cloneRange = _.$slider.find('.slick-slide'); 29383 loadImages(cloneRange); 29384 } else 29385 if (_.currentSlide >= _.slideCount - _.options.slidesToShow) { 29386 cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow); 29387 loadImages(cloneRange); 29388 } else if (_.currentSlide === 0) { 29389 cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1); 29390 loadImages(cloneRange); 29391 } 29392 29393 }; 29394 29395 Slick.prototype.loadSlider = function() { 29396 29397 var _ = this; 29398 29399 _.setPosition(); 29400 29401 _.$slideTrack.css({ 29402 opacity: 1 29403 }); 29404 29405 _.$slider.removeClass('slick-loading'); 29406 29407 _.initUI(); 29408 29409 if (_.options.lazyLoad === 'progressive') { 29410 _.progressiveLazyLoad(); 29411 } 29412 29413 }; 29414 29415 Slick.prototype.next = Slick.prototype.slickNext = function() { 29416 29417 var _ = this; 29418 29419 _.changeSlide({ 29420 data: { 29421 message: 'next' 29422 } 29423 }); 29424 29425 }; 29426 29427 Slick.prototype.orientationChange = function() { 29428 29429 var _ = this; 29430 29431 _.checkResponsive(); 29432 _.setPosition(); 29433 29434 }; 29435 29436 Slick.prototype.pause = Slick.prototype.slickPause = function() { 29437 29438 var _ = this; 29439 29440 _.autoPlayClear(); 29441 _.paused = true; 29442 29443 }; 29444 29445 Slick.prototype.play = Slick.prototype.slickPlay = function() { 29446 29447 var _ = this; 29448 29449 _.autoPlay(); 29450 _.options.autoplay = true; 29451 _.paused = false; 29452 _.focussed = false; 29453 _.interrupted = false; 29454 29455 }; 29456 29457 Slick.prototype.postSlide = function(index) { 29458 29459 var _ = this; 29460 29461 if( !_.unslicked ) { 29462 29463 _.$slider.trigger('afterChange', [_, index]); 29464 29465 _.animating = false; 29466 29467 if (_.slideCount > _.options.slidesToShow) { 29468 _.setPosition(); 29469 } 29470 29471 _.swipeLeft = null; 29472 29473 if ( _.options.autoplay ) { 29474 _.autoPlay(); 29475 } 29476 29477 if (_.options.accessibility === true) { 29478 _.initADA(); 29479 29480 if (_.options.focusOnChange) { 29481 var $currentSlide = $(_.$slides.get(_.currentSlide)); 29482 $currentSlide.attr('tabindex', 0).focus(); 29483 } 29484 } 29485 29486 } 29487 29488 }; 29489 29490 Slick.prototype.prev = Slick.prototype.slickPrev = function() { 29491 29492 var _ = this; 29493 29494 _.changeSlide({ 29495 data: { 29496 message: 'previous' 29497 } 29498 }); 29499 29500 }; 29501 29502 Slick.prototype.preventDefault = function(event) { 29503 29504 event.preventDefault(); 29505 29506 }; 29507 29508 Slick.prototype.progressiveLazyLoad = function( tryCount ) { 29509 29510 tryCount = tryCount || 1; 29511 29512 var _ = this, 29513 $imgsToLoad = $( 'img[data-lazy]', _.$slider ), 29514 image, 29515 imageSource, 29516 imageSrcSet, 29517 imageSizes, 29518 imageToLoad; 29519 29520 if ( $imgsToLoad.length ) { 29521 29522 image = $imgsToLoad.first(); 29523 imageSource = image.attr('data-lazy'); 29524 imageSrcSet = image.attr('data-srcset'); 29525 imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes'); 29526 imageToLoad = document.createElement('img'); 29527 29528 imageToLoad.onload = function() { 29529 29530 if (imageSrcSet) { 29531 image 29532 .attr('srcset', imageSrcSet ); 29533 29534 if (imageSizes) { 29535 image 29536 .attr('sizes', imageSizes ); 29537 } 29538 } 29539 29540 image 29541 .attr( 'src', imageSource ) 29542 .removeAttr('data-lazy data-srcset data-sizes') 29543 .removeClass('slick-loading'); 29544 29545 if ( _.options.adaptiveHeight === true ) { 29546 _.setPosition(); 29547 } 29548 29549 _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]); 29550 _.progressiveLazyLoad(); 29551 29552 }; 29553 29554 imageToLoad.onerror = function() { 29555 29556 if ( tryCount < 3 ) { 29557 29558 /** 29559 * try to load the image 3 times, 29560 * leave a slight delay so we don't get 29561 * servers blocking the request. 29562 */ 29563 setTimeout( function() { 29564 _.progressiveLazyLoad( tryCount + 1 ); 29565 }, 500 ); 29566 29567 } else { 29568 29569 image 29570 .removeAttr( 'data-lazy' ) 29571 .removeClass( 'slick-loading' ) 29572 .addClass( 'slick-lazyload-error' ); 29573 29574 _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]); 29575 29576 _.progressiveLazyLoad(); 29577 29578 } 29579 29580 }; 29581 29582 imageToLoad.src = imageSource; 29583 29584 } else { 29585 29586 _.$slider.trigger('allImagesLoaded', [ _ ]); 29587 29588 } 29589 29590 }; 29591 29592 Slick.prototype.refresh = function( initializing ) { 29593 29594 var _ = this, currentSlide, lastVisibleIndex; 29595 29596 lastVisibleIndex = _.slideCount - _.options.slidesToShow; 29597 29598 // in non-infinite sliders, we don't want to go past the 29599 // last visible index. 29600 if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) { 29601 _.currentSlide = lastVisibleIndex; 29602 } 29603 29604 // if less slides than to show, go to start. 29605 if ( _.slideCount <= _.options.slidesToShow ) { 29606 _.currentSlide = 0; 29607 29608 } 29609 29610 currentSlide = _.currentSlide; 29611 29612 _.destroy(true); 29613 29614 $.extend(_, _.initials, { currentSlide: currentSlide }); 29615
29616 _.init(); 29617 29618 if( !initializing ) { 29619 29620 _.changeSlide({ 29621 data: { 29622 message: 'index', 29623 index: currentSlide 29624 } 29625 }, false); 29626 29627 } 29628 29629 }; 29630 29631 Slick.prototype.registerBreakpoints = function() { 29632 29633 var _ = this, breakpoint, currentBreakpoint, l, 29634 responsiveSettings = _.options.responsive || null; 29635 29636 if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) { 29637 29638 _.respondTo = _.options.respondTo || 'window'; 29639 29640 for ( breakpoint in responsiveSettings ) { 29641 29642 l = _.breakpoints.length-1; 29643 29644 if (responsiveSettings.hasOwnProperty(breakpoint)) { 29645 currentBreakpoint = responsiveSettings[breakpoint].breakpoint; 29646 29647 // loop through the breakpoints and cut out any existing 29648 // ones with the same breakpoint number, we don't want dupes. 29649 while( l >= 0 ) { 29650 if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) { 29651 _.breakpoints.splice(l,1); 29652 } 29653 l--; 29654 } 29655 29656 _.breakpoints.push(currentBreakpoint); 29657 _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings; 29658 29659 } 29660 29661 } 29662 29663 _.breakpoints.sort(function(a, b) { 29664 return ( _.options.mobileFirst ) ? a-b : b-a; 29665 }); 29666 29667 } 29668 29669 }; 29670 29671 Slick.prototype.reinit = function() { 29672 29673 var _ = this; 29674 29675 _.$slides = 29676 _.$slideTrack 29677 .children(_.options.slide) 29678 .addClass('slick-slide'); 29679 29680 _.slideCount = _.$slides.length; 29681 29682 if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) { 29683 _.currentSlide = _.currentSlide - _.options.slidesToScroll; 29684 } 29685 29686 if (_.slideCount <= _.options.slidesToShow) { 29687 _.currentSlide = 0; 29688 } 29689 29690 _.registerBreakpoints(); 29691 29692 _.setProps(); 29693 _.setupInfinite(); 29694 _.buildArrows(); 29695 _.updateArrows(); 29696 _.initArrowEvents(); 29697 _.buildDots(); 29698 _.updateDots(); 29699 _.initDotEvents(); 29700 _.cleanUpSlideEvents(); 29701 _.initSlideEvents(); 29702 29703 _.checkResponsive(false, true); 29704 29705 if (_.options.focusOnSelect === true) { 29706 $(_.$slideTrack).children().on('click.slick', _.selectHandler); 29707 } 29708 29709 _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0); 29710 29711 _.setPosition(); 29712 _.focusHandler(); 29713 29714 _.paused = !_.options.autoplay; 29715 _.autoPlay(); 29716 29717 _.$slider.trigger('reInit', [_]); 29718 29719 }; 29720 29721 Slick.prototype.resize = function() { 29722 29723 var _ = this; 29724 29725 if ($(window).width() !== _.windowWidth) { 29726 clearTimeout(_.windowDelay); 29727 _.windowDelay = window.setTimeout(function() { 29728 _.windowWidth = $(window).width(); 29729 _.checkResponsive(); 29730 if( !_.unslicked ) { _.setPosition(); } 29731 }, 50); 29732 } 29733 }; 29734 29735 Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) { 29736 29737 var _ = this; 29738 29739 if (typeof(index) === 'boolean') { 29740 removeBefore = index; 29741 index = removeBefore === true ? 0 : _.slideCount - 1; 29742 } else { 29743 index = removeBefore === true ? --index : index; 29744 } 29745 29746 if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) { 29747 return false; 29748 } 29749 29750 _.unload(); 29751 29752 if (removeAll === true) { 29753 _.$slideTrack.children().remove(); 29754 } else { 29755 _.$slideTrack.children(this.options.slide).eq(index).remove(); 29756 } 29757 29758 _.$slides = _.$slideTrack.children(this.options.slide); 29759 29760 _.$slideTrack.children(this.options.slide).detach(); 29761 29762 _.$slideTrack.append(_.$slides); 29763 29764 _.$slidesCache = _.$slides; 29765 29766 _.reinit(); 29767 29768 }; 29769 29770 Slick.prototype.setCSS = function(position) { 29771 29772 var _ = this, 29773 positionProps = {}, 29774 x, y; 29775 29776 if (_.options.rtl === true) { 29777 position = -position; 29778 } 29779 x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px'; 29780 y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px'; 29781 29782 positionProps[_.positionProp] = position; 29783 29784 if (_.transformsEnabled === false) { 29785 _.$slideTrack.css(positionProps); 29786 } else { 29787 positionProps = {}; 29788 if (_.cssTransitions === false) { 29789 positionProps[_.animType] = 'translate(' + x + ', ' + y + ')'; 29790 _.$slideTrack.css(positionProps); 29791 } else { 29792 positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)'; 29793 _.$slideTrack.css(positionProps); 29794 } 29795 } 29796 29797 }; 29798 29799 Slick.prototype.setDimensions = function() { 29800 29801 var _ = this; 29802 29803 if (_.options.vertical === false) { 29804 if (_.options.centerMode === true) { 29805 _.$list.css({ 29806 padding: ('0px ' + _.options.centerPadding) 29807 }); 29808 } 29809 } else { 29810 _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow); 29811 if (_.options.centerMode === true) { 29812 _.$list.css({ 29813 padding: (_.options.centerPadding + ' 0px') 29814 }); 29815 } 29816 } 29817 29818 _.listWidth = _.$list.width(); 29819 _.listHeight = _.$list.height(); 29820 29821 29822 if (_.options.vertical === false && _.options.variableWidth === false) { 29823 _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow); 29824 _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length))); 29825 29826 } else if (_.options.variableWidth === true) { 29827 _.$slideTrack.width(5000 * _.slideCount); 29828 } else { 29829 _.slideWidth = Math.ceil(_.listWidth); 29830 _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length))); 29831 } 29832 29833 var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width(); 29834 if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset); 29835 29836 }; 29837 29838 Slick.prototype.setFade = function() { 29839 29840 var _ = this, 29841 targetLeft; 29842 29843 _.$slides.each(function(index, element) { 29844 targetLeft = (_.slideWidth * index) * -1; 29845 if (_.options.rtl === true) { 29846 $(element).css({ 29847 position: 'relative', 29848 right: targetLeft, 29849 top: 0, 29850 zIndex: _.options.zIndex - 2, 29851 opacity: 0 29852 }); 29853 } else { 29854 $(element).css({ 29855 position: 'relative', 29856 left: targetLeft, 29857 top: 0, 29858 zIndex: _.options.zIndex - 2, 29859 opacity: 0 29860 }); 29861 } 29862 }); 29863 29864 _.$slides.eq(_.currentSlide).css({ 29865 zIndex: _.options.zIndex - 1, 29866 opacity: 1 29867 }); 29868 29869 }; 29870 29871 Slick.prototype.setHeight = function() { 29872 29873 var _ = this; 29874 29875 if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) { 29876 var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true); 29877 _.$list.css('height', targetHeight); 29878 } 29879 29880 }; 29881 29882 Slick.prototype.setOption = 29883 Slick.prototype.slickSetOption = function() { 29884 29885 /** 29886 * accepts arguments in format of: 29887 * 29888 * - for changing a single option's value: 29889 * .slick("setOption", option, value, refresh ) 29890 * 29891 * - for changing a set of responsive options: 29892 * .slick("setOption", 'responsive', [{}, ...], refresh ) 29893 * 29894 * - for updating multiple values at once (not responsive) 29895 * .slick("setOption", { 'option': value, ... }, refresh ) 29896 */ 29897 29898 var _ = this, l, item, option, value, refresh = false, t
29898ype; 29899 29900 if( $.type( arguments[0] ) === 'object' ) { 29901 29902 option = arguments[0]; 29903 refresh = arguments[1]; 29904 type = 'multiple'; 29905 29906 } else if ( $.type( arguments[0] ) === 'string' ) { 29907 29908 option = arguments[0]; 29909 value = arguments[1]; 29910 refresh = arguments[2]; 29911 29912 if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) { 29913 29914 type = 'responsive'; 29915 29916 } else if ( typeof arguments[1] !== 'undefined' ) { 29917 29918 type = 'single'; 29919 29920 } 29921 29922 } 29923 29924 if ( type === 'single' ) { 29925 29926 _.options[option] = value; 29927 29928 29929 } else if ( type === 'multiple' ) { 29930 29931 $.each( option , function( opt, val ) { 29932 29933 _.options[opt] = val; 29934 29935 }); 29936 29937 29938 } else if ( type === 'responsive' ) { 29939 29940 for ( item in value ) { 29941 29942 if( $.type( _.options.responsive ) !== 'array' ) { 29943 29944 _.options.responsive = [ value[item] ]; 29945 29946 } else { 29947 29948 l = _.options.responsive.length-1; 29949 29950 // loop through the responsive object and splice out duplicates. 29951 while( l >= 0 ) { 29952 29953 if( _.options.responsive[l].breakpoint === value[item].breakpoint ) { 29954 29955 _.options.responsive.splice(l,1); 29956 29957 } 29958 29959 l--; 29960 29961 } 29962 29963 _.options.responsive.push( value[item] ); 29964 29965 } 29966 29967 } 29968 29969 } 29970 29971 if ( refresh ) { 29972 29973 _.unload(); 29974 _.reinit(); 29975 29976 } 29977 29978 }; 29979 29980 Slick.prototype.setPosition = function() { 29981 29982 var _ = this; 29983 29984 _.setDimensions(); 29985 29986 _.setHeight(); 29987 29988 if (_.options.fade === false) { 29989 _.setCSS(_.getLeft(_.currentSlide)); 29990 } else { 29991 _.setFade(); 29992 } 29993 29994 _.$slider.trigger('setPosition', [_]); 29995 29996 }; 29997 29998 Slick.prototype.setProps = function() { 29999 30000 var _ = this, 30001 bodyStyle = document.body.style; 30002 30003 _.positionProp = _.options.vertical === true ? 'top' : 'left'; 30004 30005 if (_.positionProp === 'top') { 30006 _.$slider.addClass('slick-vertical'); 30007 } else { 30008 _.$slider.removeClass('slick-vertical'); 30009 } 30010 30011 if (bodyStyle.WebkitTransition !== undefined || 30012 bodyStyle.MozTransition !== undefined || 30013 bodyStyle.msTransition !== undefined) { 30014 if (_.options.useCSS === true) { 30015 _.cssTransitions = true; 30016 } 30017 } 30018 30019 if ( _.options.fade ) { 30020 if ( typeof _.options.zIndex === 'number' ) { 30021 if( _.options.zIndex < 3 ) { 30022 _.options.zIndex = 3; 30023 } 30024 } else { 30025 _.options.zIndex = _.defaults.zIndex; 30026 } 30027 } 30028 30029 if (bodyStyle.OTransform !== undefined) { 30030 _.animType = 'OTransform'; 30031 _.transformType = '-o-transform'; 30032 _.transitionType = 'OTransition'; 30033 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
30034 } 30035 if (bodyStyle.MozTransform !== undefined) { 30036 _.animType = 'MozTransform'; 30037 _.transformType = '-moz-transform'; 30038 _.transitionType = 'MozTransition'; 30039 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false; 30040 } 30041 if (bodyStyle.webkitTransform !== undefined) { 30042 _.animType = 'webkitTransform'; 30043 _.transformType = '-webkit-transform'; 30044 _.transitionType = 'webkitTransition'; 30045 if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false; 30046 } 30047 if (bodyStyle.msTransform !== undefined) { 30048 _.animType = 'msTransform'; 30049 _.transformType = '-ms-transform'; 30050 _.transitionType = 'msTransition'; 30051 if (bodyStyle.msTransform === undefined) _.animType = false; 30052 } 30053 if (bodyStyle.transform !== undefined && _.animType !== false) { 30054 _.animType = 'transform'; 30055 _.transformType = 'transform'; 30056 _.transitionType = 'transition'; 30057 } 30058 _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false); 30059 }; 30060 30061 30062 Slick.prototype.setSlideClasses = function(index) { 30063 30064 var _ = this, 30065 centerOffset, allSlides, indexOffset, remainder; 30066 30067 allSlides = _.$slider 30068 .find('.slick-slide') 30069 .removeClass('slick-active slick-center slick-current') 30070 .attr('aria-hidden', 'true'); 30071 30072 _.$slides 30073 .eq(index) 30074 .addClass('slick-current'); 30075 30076 if (_.options.centerMode === true) { 30077 30078 var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0; 30079 30080 centerOffset = Math.floor(_.options.slidesToShow / 2); 30081 30082 if (_.options.infinite === true) { 30083 30084 if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) { 30085 _.$slides 30086 .slice(index - centerOffset + evenCoef, index + centerOffset + 1) 30087 .addClass('slick-active') 30088 .attr('aria-hidden', 'false'); 30089 30090 } else { 30091 30092 indexOffset = _.options.slidesToShow + index; 30093 allSlides 30094 .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2) 30095 .addClass('slick-active') 30096 .attr('aria-hidden', 'false'); 30097 30098 } 30099 30100 if (index === 0) { 30101 30102 allSlides 30103 .eq(allSlides.length - 1 - _.options.slidesToShow) 30104 .addClass('slick-center'); 30105 30106 } else if (index === _.slideCount - 1) { 30107 30108 allSlides 30109 .eq(_.options.slidesToShow) 30110 .addClass('slick-center'); 30111 30112 } 30113 30114 } 30115 30116 _.$slides 30117 .eq(index) 30118 .addClass('slick-center'); 30119 30120 } else { 30121 30122 if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) { 30123 30124 _.$slides 30125 .slice(index, index + _.options.slidesToShow) 30126 .addClass('slick-active') 30127 .attr('aria-hidden', 'false'); 30128 30129 } else if (allSlides.length <= _.options.slidesToShow) { 30130 30131 allSlides 30132 .addClass('slick-active') 30133 .attr('aria-hidden', 'false'); 30134 30135 } else { 30136 30137 remainder = _.slideCount % _.options.slidesToShow; 30138 indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index; 30139 30140 if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) { 30141 30142 allSlides 30143 .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder) 30144 .addClass('slick-active') 30145 .attr('aria-hidden', 'false'); 30146 30147 } else { 30148 30149 allSlides 30150 .slice(indexOffset, indexOffset + _.options.slidesToShow) 30151 .addClass('slick-active') 30152 .attr('aria-hidden', 'false'); 30153 30154 } 30155 30156 } 30157 30158 } 30159 30160 if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') { 30161 _.lazyLoad(); 30162 } 30163 }; 30164 30165 Slick.prototype.setupInfinite = function() { 30166 30167 var _ = this, 30168 i, slideIndex, infiniteCount; 30169 30170 if (_.options.fade === true) {
30171 _.options.centerMode = false; 30172 } 30173 30174 if (_.options.infinite === true && _.options.fade === false) { 30175 30176 slideIndex = null; 30177 30178 if (_.slideCount > _.options.slidesToShow) { 30179 30180 if (_.options.centerMode === true) { 30181 infiniteCount = _.options.slidesToShow + 1; 30182 } else { 30183 infiniteCount = _.options.slidesToShow; 30184 } 30185 30186 for (i = _.slideCount; i > (_.slideCount - 30187 infiniteCount); i -= 1) { 30188 slideIndex = i - 1; 30189 $(_.$slides[slideIndex]).clone(true).attr('id', '') 30190 .attr('data-slick-index', slideIndex - _.slideCount) 30191 .prependTo(_.$slideTrack).addClass('slick-cloned'); 30192 } 30193 for (i = 0; i < infiniteCount + _.slideCount; i += 1) { 30194 slideIndex = i; 30195 $(_.$slides[slideIndex]).clone(true).attr('id', '') 30196 .attr('data-slick-index', slideIndex + _.slideCount) 30197 .appendTo(_.$slideTrack).addClass('slick-cloned'); 30198 } 30199 _.$slideTrack.find('.slick-cloned').find('[id]').each(function() { 30200 $(this).attr('id', ''); 30201 }); 30202 30203 } 30204 30205 } 30206 30207 }; 30208 30209 Slick.prototype.interrupt = function( toggle ) { 30210 30211 var _ = this; 30212 30213 if( !toggle ) { 30214 _.autoPlay(); 30215 } 30216 _.interrupted = toggle; 30217 30218 }; 30219 30220 Slick.prototype.selectHandler = function(event) { 30221 30222 var _ = this; 30223 30224 var targetElement = 30225 $(event.target).is('.slick-slide') ? 30226 $(event.target) : 30227 $(event.target).parents('.slick-slide'); 30228 30229 var index = parseInt(targetElement.attr('data-slick-index')); 30230 30231 if (!index) index = 0; 30232 30233 if (_.slideCount <= _.options.slidesToShow) { 30234 30235 _.slideHandler(index, false, true); 30236 return; 30237 30238 } 30239 30240 _.slideHandler(index); 30241 30242 }; 30243 30244 Slick.prototype.slideHandler = function(index, sync, dontAnimate) { 30245 30246 var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null, 30247 _ = this, navTarget; 30248 30249 sync = sync || false; 30250 30251 if (_.animating === true && _.options.waitForAnimate === true) { 30252 return; 30253 } 30254 30255 if (_.options.fade === true && _.currentSlide === index) { 30256 return; 30257 } 30258 30259 if (sync === false) { 30260 _.asNavFor(index); 30261 } 30262 30263 targetSlide = index; 30264 targetLeft = _.getLeft(targetSlide); 30265 slideLeft = _.getLeft(_.currentSlide); 30266 30267 _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft; 30268 30269 if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) { 30270 if (_.options.fade === false) { 30271 targetSlide = _.currentSlide; 30272 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 30273 _.animateSlide(slideLeft, function() { 30274 _.postSlide(targetSlide); 30275 }); 30276 } else { 30277 _.postSlide(targetSlide); 30278 } 30279 } 30280 return; 30281 } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) { 30282 if (_.options.fade === false) { 30283 targetSlide = _.currentSlide; 30284 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 30285 _.animateSlide(slideLeft, function() { 30286 _.postSlide(targetSlide); 30287 }); 30288 } else { 30289 _.postSlide(targetSlide); 30290 } 30291 } 30292 return; 30293 } 30294 30295 if ( _.options.autoplay ) { 30296 clearInterval(_.autoPlayTimer); 30297 } 30298 30299 if (targetSlide < 0) { 30300 if (_.slideCount % _.options.slidesToScroll !== 0) { 30301 animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll); 30302 } else { 30303 animSlide = _.slideCount + targetSlide; 30304 } 30305 }
30305 else if (targetSlide >= _.slideCount) { 30306 if (_.slideCount % _.options.slidesToScroll !== 0) { 30307 animSlide = 0; 30308 } else { 30309 animSlide = targetSlide - _.slideCount; 30310 } 30311 } else { 30312 animSlide = targetSlide; 30313 } 30314 30315 _.animating = true; 30316 30317 _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]); 30318 30319 oldSlide = _.currentSlide; 30320 _.currentSlide = animSlide; 30321 30322 _.setSlideClasses(_.currentSlide); 30323 30324 if ( _.options.asNavFor ) { 30325 30326 navTarget = _.getNavTarget(); 30327 navTarget = navTarget.slick('getSlick'); 30328 30329 if ( navTarget.slideCount <= navTarget.options.slidesToShow ) { 30330 navTarget.setSlideClasses(_.currentSlide); 30331 } 30332 30333 } 30334 30335 _.updateDots(); 30336 _.updateArrows(); 30337 30338 if (_.options.fade === true) { 30339 if (dontAnimate !== true) { 30340 30341 _.fadeSlideOut(oldSlide); 30342 30343 _.fadeSlide(animSlide, function() { 30344 _.postSlide(animSlide); 30345 }); 30346 30347 } else { 30348 _.postSlide(animSlide); 30349 } 30350 _.animateHeight(); 30351 return; 30352 } 30353 30354 if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) { 30355 _.animateSlide(targetLeft, function() { 30356 _.postSlide(animSlide); 30357 }); 30358 } else { 30359 _.postSlide(animSlide); 30360 } 30361 30362 }; 30363 30364 Slick.prototype.startLoad = function() { 30365 30366 var _ = this; 30367 30368 if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) { 30369 30370 _.$prevArrow.hide(); 30371 _.$nextArrow.hide(); 30372 30373 } 30374 30375 if (_.options.dots === true && _.slideCount > _.options.slidesToShow) { 30376 30377 _.$dots.hide(); 30378 30379 } 30380 30381 _.$slider.addClass('slick-loading'); 30382 30383 }; 30384 30385 Slick.prototype.swipeDirection = function() { 30386 30387 var xDist, yDist, r, swipeAngle, _ = this; 30388 30389 xDist = _.touchObject.startX - _.touchObject.curX; 30390 yDist = _.touchObject.startY - _.touchObject.curY; 30391 r = Math.atan2(yDist, xDist); 30392 30393 swipeAngle = Math.round(r * 180 / Math.PI); 30394 if (swipeAngle < 0) { 30395 swipeAngle = 360 - Math.abs(swipeAngle); 30396 } 30397 30398 if ((swipeAngle <= 45) && (swipeAngle >= 0)) { 30399 return (_.options.rtl === false ? 'left' : 'right'); 30400 } 30401 if ((swipeAngle <= 360) && (swipeAngle >= 315)) { 30402 return (_.options.rtl === false ? 'left' : 'right'); 30403 } 30404 if ((swipeAngle >= 135) && (swipeAngle <= 225)) { 30405 return (_.options.rtl === false ? 'right' : 'left'); 30406 } 30407 if (_.options.verticalSwiping === true) { 30408 if ((swipeAngle >= 35) && (swipeAngle <= 135)) { 30409 return 'down'; 30410 } else { 30411 return 'up'; 30412 } 30413 } 30414 30415 return 'vertical'; 30416 30417 }; 30418 30419 Slick.prototype.swipeEnd = function(event) { 30420 30421 var _ = this, 30422 slideCount, 30423 direction; 30424 30425 _.dragging = false; 30426 _.swiping = false; 30427 30428 if (_.scrolling) { 30429 _.scrolling = false; 30430 return false; 30431 } 30432 30433 _.interrupted = false; 30434 _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true; 30435 30436 if ( _.touchObject.curX === undefined ) { 30437 return false; 30438 } 30439 30440 if ( _.touchObject.edgeHit === true ) { 30441 _.$slider.trigger('edge', [_, _.swipeDirection() ]); 30442 } 30443 30444 if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) { 30445 30446 direction = _.swipeDirection(); 30447 30448 switch ( direction ) { 30449 30450 case 'left': 30451 case 'down': 30452 30453 slideCount = 30454 _.options.swipeToSlide ? 30455 _.checkNavigable( _.currentSlide + _.getSlideCount() ) : 30456 _.currentSlide + _.getSlideCount(); 30457 30458 _.currentDirection = 0; 30459 30460 break; 30461 30462 case 'right': 30463 case 'up': 30464 30465 slideCount =
30466 _.options.swipeToSlide ? 30467 _.checkNavigable( _.currentSlide - _.getSlideCount() ) : 30468 _.currentSlide - _.getSlideCount(); 30469 30470 _.currentDirection = 1; 30471 30472 break; 30473 30474 default: 30475 30476 30477 } 30478 30479 if( direction != 'vertical' ) { 30480 30481 _.slideHandler( slideCount ); 30482 _.touchObject = {}; 30483 _.$slider.trigger('swipe', [_, direction ]); 30484 30485 } 30486 30487 } else { 30488 30489 if ( _.touchObject.startX !== _.touchObject.curX ) { 30490 30491 _.slideHandler( _.currentSlide ); 30492 _.touchObject = {}; 30493 30494 } 30495 30496 } 30497 30498 }; 30499 30500 Slick.prototype.swipeHandler = function(event) { 30501 30502 var _ = this; 30503 30504 if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) { 30505 return; 30506 } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) { 30507 return; 30508 } 30509 30510 _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ? 30511 event.originalEvent.touches.length : 1; 30512 30513 _.touchObject.minSwipe = _.listWidth / _.options 30514 .touchThreshold; 30515 30516 if (_.options.verticalSwiping === true) { 30517 _.touchObject.minSwipe = _.listHeight / _.options 30518 .touchThreshold; 30519 } 30520 30521 switch (event.data.action) { 30522 30523 case 'start': 30524 _.swipeStart(event); 30525 break; 30526 30527 case 'move': 30528 _.swipeMove(event); 30529 break; 30530 30531 case 'end': 30532 _.swipeEnd(event); 30533 break; 30534 30535 } 30536 30537 }; 30538 30539 Slick.prototype.swipeMove = function(event) { 30540 30541 var _ = this, 30542 edgeWasHit = false, 30543 curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength; 30544 30545 touches = event.originalEvent !== undefined ? event.originalEvent.touches : null; 30546 30547 if (!_.dragging || _.scrolling || touches && touches.length !== 1) { 30548 return false; 30549 } 30550 30551 curLeft = _.getLeft(_.currentSlide); 30552 30553 _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX; 30554 _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY; 30555 30556 _.touchObject.swipeLength = Math.round(Math.sqrt( 30557 Math.pow(_.touchObject.curX - _.touchObject.startX, 2))); 30558 30559 verticalSwipeLength = Math.round(Math.sqrt( 30560 Math.pow(_.touchObject.curY - _.touchObject.startY, 2))); 30561 30562 if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) { 30563 _.scrolling = true; 30564 return false; 30565 } 30566 30567 if (_.options.verticalSwiping === true) { 30568 _.touchObject.swipeLength = verticalSwipeLength; 30569 } 30570 30571 swipeDirection = _.swipeDirection(); 30572 30573 if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) { 30574 _.swiping = true; 30575 event.preventDefault(); 30576 } 30577 30578 positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1); 30579 if (_.options.verticalSwiping === true) { 30580 positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1; 30581 } 30582 30583 30584 swipeLength = _.touchObject.swipeLength; 30585 30586 _.touchObject.edgeHit = false; 30587 30588 if (_.options.infinite === false) { 30589 if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) { 30590 swipeLength = _.touchObject.swipeLength * _.options.edgeFriction; 30591 _.touchObject.edgeHit = true; 30592 } 30593 } 30594 30595 if (_.options.vertical === false) { 30596 _.swipeLeft = curLeft + swipeLength * positionOffset; 30597 } else { 30598 _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset; 30599 } 30600 if (_.options.verticalSwiping === true) { 30601 _.swipeLeft = curLeft + swipeLength * positionOffset; 30602 } 30603 30604 if (_.options.fade === true || _.options.touchMove === false) { 30605 return false;
30606 } 30607 30608 if (_.animating === true) { 30609 _.swipeLeft = null; 30610 return false; 30611 } 30612 30613 _.setCSS(_.swipeLeft); 30614 30615 }; 30616 30617 Slick.prototype.swipeStart = function(event) { 30618 30619 var _ = this, 30620 touches; 30621 30622 _.interrupted = true; 30623 30624 if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) { 30625 _.touchObject = {}; 30626 return false; 30627 } 30628 30629 if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) { 30630 touches = event.originalEvent.touches[0]; 30631 } 30632 30633 _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX; 30634 _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY; 30635 30636 _.dragging = true; 30637 30638 }; 30639 30640 Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() { 30641 30642 var _ = this; 30643 30644 if (_.$slidesCache !== null) { 30645 30646 _.unload(); 30647 30648 _.$slideTrack.children(this.options.slide).detach(); 30649 30650 _.$slidesCache.appendTo(_.$slideTrack); 30651 30652 _.reinit(); 30653 30654 } 30655 30656 }; 30657 30658 Slick.prototype.unload = function() { 30659 30660 var _ = this; 30661 30662 $('.slick-cloned', _.$slider).remove(); 30663 30664 if (_.$dots) { 30665 _.$dots.remove(); 30666 } 30667 30668 if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) { 30669 _.$prevArrow.remove(); 30670 } 30671 30672 if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) { 30673 _.$nextArrow.remove(); 30674 } 30675 30676 _.$slides 30677 .removeClass('slick-slide slick-active slick-visible slick-current') 30678 .attr('aria-hidden', 'true') 30679 .css('width', ''); 30680 30681 }; 30682 30683 Slick.prototype.unslick = function(fromBreakpoint) { 30684 30685 var _ = this; 30686 _.$slider.trigger('unslick', [_, fromBreakpoint]); 30687 _.destroy(); 30688 30689 }; 30690 30691 Slick.prototype.updateArrows = function() { 30692 30693 var _ = this, 30694 centerOffset; 30695 30696 centerOffset = Math.floor(_.options.slidesToShow / 2); 30697 30698 if ( _.options.arrows === true && 30699 _.slideCount > _.options.slidesToShow && 30700 !_.options.infinite ) { 30701 30702 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 30703 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 30704 30705 if (_.currentSlide === 0) { 30706 30707 _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 30708 _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 30709 30710 } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) { 30711 30712 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 30713 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 30714 30715 } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) { 30716 30717 _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true'); 30718 _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false'); 30719 30720 } 30721 30722 } 30723 30724 }; 30725 30726 Slick.prototype.updateDots = function() { 30727 30728 var _ = this; 30729 30730 if (_.$dots !== null) { 30731 30732 _.$dots 30733 .find('li') 30734 .removeClass('slick-active') 30735 .end(); 30736 30737 _.$dots 30738 .find('li') 30739 .eq(Math.floor(_.currentSlide / _.options.slidesToScroll)) 30740 .addClass('slick-active'); 30741 30742 } 30743 30744 }; 30745 30746 Slick.prototype.visibility = function() { 30747 30748 var _ = this; 30749 30750 if ( _.options.autoplay ) { 30751 30752 if ( document[_.hidden] ) { 30753 30754 _.interrupted = true; 30755 30756 } else { 30757 30758 _.interrupted = false; 30759 30760 } 30761 30762 } 30763 30764 }; 30765 30766 $.fn.slick = function() { 30767 var _ = this, 30768 opt = arguments[0], 30769 args = Array.prototype.slice.call(arguments, 1), 30770 l = _.length, 30771 i, 30772 ret; 30773 for (i = 0; i < l; i++) { 30774 if (typeof opt == 'object' || typeof opt == 'undefined') 30775 _[i].slick = new Slick(_[i], opt); 30776 else 30777 ret = _[i].slick[opt].apply(_[i].slick, args); 30778 if (typeof ret != 'undefined') return ret; 30779 } 30780 return _; 30781 }; 30782 30783})); 30784 30785redesign.require([
30786 'src/tmp/es6/src/util/flag', 30787 'util/analytics/pageLoadEventHandler', 30788 'util/analytics/event', 30789 'coreServices/tombstone', 30790 'jquery', 30791 'base/js/global/lib/jquery.migrate', 30792 'jquery_menuAim', 30793 'jquery_spin', 30794 'base/js/global/lib/LAB', 30795 'jquery_hammer', 30796 'jquery_waypoint', 30797 'base/js/site/catalog/giftcard', 30798 'base/js/include/imageLoadFix', 30799 'base/js/site/global/validate', 30800 'base/js/site/global/global', 30801 'base/js/global/lib/picturefill.min', 30802 'slickSlider', 30803 'coreServices/signifyd/deviceFingerprint' 30804], 30805function legacyInit( 30806 flagPromise, 30807 pageLoadEventHandler, 30808 analyticsEvent 30809) { 30810 /** 30811 * @namespace init 30812 * @description load global init. 30813 * @returns {undefined} 30814 */ 30815 ANF.init = function mainInit() { 30816 var here = $('body').attr('id'); 30817 var sections = []; 30818 var isFirstIteration = true; // Flag so that we do not run ANF.init over again 30819 var currentSection = ANF; 30820 30821 $(window).trigger('application:initializing'); 30822 30823 if (here !== undefined) { 30824 sections = here.split('-'); 30825 } 30826 30827 do { 30828 if (typeof currentSection.global === 'object' && typeof currentSection.global.init === 'function') { 30829 currentSection.global.init(); 30830 } 30831 30832 // Do not want this function to become a never ending loop so we need to 30833 if (!isFirstIteration && typeof currentSection.init === 'function') { 30834 currentSection.init(); 30835 } 30836 if (isFirstIteration) { 30837 isFirstIteration = false; 30838 } 30839 30840 currentSection = (sections.length > 0) ? currentSection[sections.shift()] : null; 30841 } while (currentSection && typeof currentSection === 'object'); 30842 30843 $(ANF).trigger('application:initialized'); 30844 ANF.deferredStart.resolve(); 30845 analyticsEvent.init(); 30846 if (window.digitalData.get('flag.analytics-crs-disable-algonomy-coupling') === true) { 30847 window.digitalData.subscribe('event:crs-app.analytics-subscriptions-initialized', () => { 30848 pageLoadEventHandler.triggerAnalyticsPageLoadEvent(); 30849 }); 30850 } else { 30851 pageLoadEventHandler.triggerDefaultPageLoadEvent(); 30852 } 30853 var crsApplicationInitialized = new CustomEvent('crs-application-initialized'); 30854 window.dispatchEvent(crsApplicationInitialized); 30855 }; 30856 30857 // Disabling the next line to do OOB jQuery 30858 // eslint-disable-next-line new-cap 30859 ANF.deferredStart = ANF.deferredStart || $.Deferred(); 30860 30861 $(document).ready(function jqReady() { 30862 setTimeout(function initHandler() { 30863 // this is the access point of the site. 30864 flagPromise.then(ANF.init); 30865 }, 0); 30866 }); 30867}); 30868 30869redesign.define("src/hol/js/legacy/desktop/global.js", function(){}); 30870 30871// Underscore.js 1.9.1 30872// http://underscorejs.org 30873// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 30874// Underscore may be freely distributed under the MIT license. 30875!function(){var n="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},r=n._,e=Array.prototype,o=Object.prototype,s="undefined"!=typeof Symbol?Symbol.prototype:null,u=e.push,c=e.slice,p=o.toString,i=o.hasOwnProperty,t=Array.isArray,a=Object.keys,l=Object.create,f=function(){},h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"==typeof exports||exports.nodeType?n._=h:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=h),exports._=h),h.VERSION="1.9.1";var v,y=function(u,i,n){if(void 0===i)return u;switch(null==n?3:n){case 1:return function(n){return u.call(i,n)};case 3:return function(n,r,t){return u.call(i,n,r,t)};case 4:return function(n,r,t,e){return u.call(i,n,r,t,e)}}return function(){return u.apply(i,arguments)}},d=function(n,r,t){return h.iteratee!==v?h.iteratee(n,r):null==n?h.identity:h.isFunction(n)?y(n,r,t):h.isObject(n)&&!h.isArray(n)?h.matcher(n):h.property(n)};h.iteratee=v=function(n,r){return d(n,r,1/0)};var g=function(u,i){return i=null==i?u.length-1:+i,function(){for(var n=Math.max(arguments.length-i,0),r=Array(n),t=0;t<n;t++)r[t]=arguments[t+i];switch(i){case 0:return u.call(this,r);case 1:return u.call(this,arguments[0],r);case 2:return u.call(this,arguments[0],arguments[1],r)}var e=Array(i+1);for(t=0;t<i;t++)e[t]=arguments[t];return e[i]=r,u.apply(this,e)}}
30875,m=function(n){if(!h.isObject(n))return{};if(l)return l(n);f.prototype=n;var r=new f;return f.prototype=null,r},b=function(r){return function(n){return null==n?void 0:n[r]}},j=function(n,r){return null!=n&&i.call(n,r)},x=function(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0},_=Math.pow(2,53)-1,A=b("length"),w=function(n){var r=A(n);return"number"==typeof r&&0<=r&&r<=_};h.each=h.forEach=function(n,r,t){var e,u;if(r=y(r,t),w(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;e<u;e++)r(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,r,t){r=d(r,t);for(var e=!w(n)&&h.keys(n),u=(e||n).length,i=Array(u),o=0;o<u;o++){var a=e?e[o]:o;i[o]=r(n[a],a,n)}return i};var O=function(c){return function(n,r,t,e){var u=3<=arguments.length;return function(n,r,t,e){var u=!w(n)&&h.keys(n),i=(u||n).length,o=0<c?0:i-1;for(e||(t=n[u?u[o]:o],o+=c);0<=o&&o<i;o+=c){var a=u?u[o]:o;t=r(t,n[a],a,n)}return t}(n,y(r,e,4),t,u)}};h.reduce=h.foldl=h.inject=O(1),h.reduceRight=h.foldr=O(-1),h.find=h.detect=function(n,r,t){var e=(w(n)?h.findIndex:h.findKey)(n,r,t);if(void 0!==e&&-1!==e)return n[e]},h.filter=h.select=function(n,e,r){var u=[];return e=d(e,r),h.each(n,function(n,r,t){e(n,r,t)&&u.push(n)}),u},h.reject=function(n,r,t){return h.filter(n,h.negate(d(r)),t)},h.every=h.all=function(n,r,t){r=d(r,t);for(var e=!w(n)&&h.keys(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(!r(n[o],o,n))return!1}return!0},h.some=h.any=function(n,r,t){r=d(r,t);for(var e=!w(n)&&h.keys(n),u=(e||n).length,i=0;i<u;i++){var o=e?e[i]:i;if(r(n[o],o,n))return!0}return!1},h.contains=h.includes=h.include=function(n,r,t,e){return w(n)||(n=h.values(n)),("number"!=typeof t||e)&&(t=0),0<=h.indexOf(n,r,t)},h.invoke=g(function(n,t,e){var u,i;return h.isFunction(t)?i=t:h.isArray(t)&&(u=t.slice(0,-1),t=t[t.length-1]),h.map(n,function(n){var r=i;if(!r){if(u&&u.length&&(n=x(n,u)),null==n)return;r=n[t]}return null==r?r:r.apply(n,e)})}),h.pluck=function(n,r){return h.map(n,h.property(r))},h.where=function(n,r){return h.filter(n,h.matcher(r))},h.findWhere=function(n,r){return h.find(n,h.matcher(r))},h.max=function(n,e,r){var t,u,i=-1/0,o=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,c=(n=w(n)?n:h.values(n)).length;a<c;a++)null!=(t=n[a])&&i<t&&(i=t);else e=d(e,r),h.each(n,function(n,r,t){u=e(n,r,t),(o<u||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},h.min=function(n,e,r){var t,u,i=1/0,o=1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,c=(n=w(n)?n:h.values(n)).length;a<c;a++)null!=(t=n[a])&&t<i&&(i=t);else e=d(e,r),h.each(n,function(n,r,t){((u=e(n,r,t))<o||u===1/0&&i===1/0)&&(i=n,o=u)});return i},h.shuffle=function(n){return h.sample(n,1/0)},h.sample=function(n,r,t){if(null==r||t)return w(n)||(n=h.values(n)),n[h.random(n.length-1)];var e=w(n)?h.clone(n):h.values(n),u=A(e);r=Math.max(Math.min(r,u),0);for(var i=u-1,o=0;o<r;o++){var a=h.random(o,i),c=e[o];e[o]=e[a],e[a]=c}return e.slice(0,r)},h.sortBy=function(n,e,r){var u=0;return e=d(e,r),h.pluck(h.map(n,function(n,r,t){return{value:n,index:u++,criteria:e(n,r,t)}}).sort(function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(e<t||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index}),"value")};var k=function(o,r){return function(e,u,n){var i=r?[[],[]]:{};return u=d(u,n),h.each(e,function(n,r){var t=u(n,r,e);o(i,n,t)}),i}};h.groupBy=k(function(n,r,t){j(n,t)?n[t].push(r):n[t]=[r]}),h.indexBy=k(function(n,r,t){n[t]=r}),h.countBy=k(function(n,r,t){j(n,t)?n[t]++:n[t]=1});var S=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;h.toArray=function(n){return n?h.isArray(n)?c.call(n):h.isString(n)?n.match(S):w(n)?h.map(n,h.identity):h.values(n):[]},h.size=function(n){return null==n?0:w(n)?n.length:h.keys(n).length},h.partition=k(function(n,r,t){n[t?0:1].push(r)},!0),h.first=h.head=h.take=function(n,r,t){return null==n||n.length<1?null==r?void 0:[]:null==r||t?n[0]:h.initial(n,n.length-r)},h.initial=function(n,r,t){return c.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))},h.last=function(n,r,t){return null==n||n.length<1?null==r?void 0:[]:null==r||t?n[n.length-1]:h.rest(n,Math.max(0,n.length-r))},h.rest=h.tail=h.drop=function(n,r,t){return c.call(n,null==r||t?1:r)},h.compact=function(n){return h.filter(n,Boolean)};var M=function(n,r,t,e){for(var u=(e=e||[]).length,i=0,o=A(n);i<o;i++){var a=n[i];if(w(a)&&(h.isArray(a)||h.isArguments(a)))if(r)for(var c=0,l=a.length;c<l;
30875)e[u++]=a[c++];else M(a,r,t,e),u=e.length;else t||(e[u++]=a)}return e};h.flatten=function(n,r){return M(n,r,!1)},h.without=g(function(n,r){return h.difference(n,r)}),h.uniq=h.unique=function(n,r,t,e){h.isBoolean(r)||(e=t,t=r,r=!1),null!=t&&(t=d(t,e));for(var u=[],i=[],o=0,a=A(n);o<a;o++){var c=n[o],l=t?t(c,o,n):c;r&&!t?(o&&i===l||u.push(c),i=l):t?h.contains(i,l)||(i.push(l),u.push(c)):h.contains(u,c)||u.push(c)}return u},h.union=g(function(n){return h.uniq(M(n,!0,!0))}),h.intersection=function(n){for(var r=[],t=arguments.length,e=0,u=A(n);e<u;e++){var i=n[e];if(!h.contains(r,i)){var o;for(o=1;o<t&&h.contains(arguments[o],i);o++);o===t&&r.push(i)}}return r},h.difference=g(function(n,r){return r=M(r,!0,!0),h.filter(n,function(n){return!h.contains(r,n)})}),h.unzip=function(n){for(var r=n&&h.max(n,A).length||0,t=Array(r),e=0;e<r;e++)t[e]=h.pluck(n,e);return t},h.zip=g(h.unzip),h.object=function(n,r){for(var t={},e=0,u=A(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t};var F=function(i){return function(n,r,t){r=d(r,t);for(var e=A(n),u=0<i?0:e-1;0<=u&&u<e;u+=i)if(r(n[u],u,n))return u;return-1}};h.findIndex=F(1),h.findLastIndex=F(-1),h.sortedIndex=function(n,r,t,e){for(var u=(t=d(t,e,1))(r),i=0,o=A(n);i<o;){var a=Math.floor((i+o)/2);t(n[a])<u?i=a+1:o=a}return i};var E=function(i,o,a){return function(n,r,t){var e=0,u=A(n);if("number"==typeof t)0<i?e=0<=t?t:Math.max(t+u,e):u=0<=t?Math.min(t+1,u):t+u+1;else if(a&&t&&u)return n[t=a(n,r)]===r?t:-1;if(r!=r)return 0<=(t=o(c.call(n,e,u),h.isNaN))?t+e:-1;for(t=0<i?e:u-1;0<=t&&t<u;t+=i)if(n[t]===r)return t;return-1}};h.indexOf=E(1,h.findIndex,h.sortedIndex),h.lastIndexOf=E(-1,h.findLastIndex),h.range=function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),i=0;i<e;i++,n+=t)u[i]=n;return u},h.chunk=function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(c.call(n,e,e+=r));return t};var N=function(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var i=m(n.prototype),o=n.apply(i,u);return h.isObject(o)?o:i};h.bind=g(function(r,t,e){if(!h.isFunction(r))throw new TypeError("Bind must be called on a function");var u=g(function(n){return N(r,u,t,this,e.concat(n))});return u}),h.partial=g(function(u,i){var o=h.partial.placeholder,a=function(){for(var n=0,r=i.length,t=Array(r),e=0;e<r;e++)t[e]=i[e]===o?arguments[n++]:i[e];for(;n<arguments.length;)t.push(arguments[n++]);return N(u,a,this,this,t)};return a}),(h.partial.placeholder=h).bindAll=g(function(n,r){var t=(r=M(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=h.bind(n[e],n)}}),h.memoize=function(e,u){var i=function(n){var r=i.cache,t=""+(u?u.apply(this,arguments):n);return j(r,t)||(r[t]=e.apply(this,arguments)),r[t]};return i.cache={},i},h.delay=g(function(n,r,t){return setTimeout(function(){return n.apply(null,t)},r)}),h.defer=h.partial(h.delay,h,1),h.throttle=function(t,e,u){var i,o,a,c,l=0;u||(u={});var f=function(){l=!1===u.leading?0:h.now(),i=null,c=t.apply(o,a),i||(o=a=null)},n=function(){var n=h.now();l||!1!==u.leading||(l=n);var r=e-(n-l);return o=this,a=arguments,r<=0||e<r?(i&&(clearTimeout(i),i=null),l=n,c=t.apply(o,a),i||(o=a=null)):i||!1===u.trailing||(i=setTimeout(f,r)),c};return n.cancel=function(){clearTimeout(i),l=0,i=o=a=null},n},h.debounce=function(t,e,u){var i,o,a=function(n,r){i=null,r&&(o=t.apply(n,r))},n=g(function(n){if(i&&clearTimeout(i),u){var r=!i;i=setTimeout(a,e),r&&(o=t.apply(this,n))}else i=h.delay(a,e,this,n);return o});return n.cancel=function(){clearTimeout(i),i=null},n},h.wrap=function(n,r){return h.partial(r,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},h.after=function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},h.before=function(n,r){var t;return function(){return 0<--n&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}},h.once=h.partial(h.before,2),h.restArguments=g;var I=!{toString:null}.propertyIsEnumerable("toString"),T=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleStr
30875ing"],B=function(n,r){var t=T.length,e=n.constructor,u=h.isFunction(e)&&e.prototype||o,i="constructor";for(j(n,i)&&!h.contains(r,i)&&r.push(i);t--;)(i=T[t])in n&&n[i]!==u[i]&&!h.contains(r,i)&&r.push(i)};h.keys=function(n){if(!h.isObject(n))return[];if(a)return a(n);var r=[];for(var t in n)j(n,t)&&r.push(t);return I&&B(n,r),r},h.allKeys=function(n){if(!h.isObject(n))return[];var r=[];for(var t in n)r.push(t);return I&&B(n,r),r},h.values=function(n){for(var r=h.keys(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e},h.mapObject=function(n,r,t){r=d(r,t);for(var e=h.keys(n),u=e.length,i={},o=0;o<u;o++){var a=e[o];i[a]=r(n[a],a,n)}return i},h.pairs=function(n){for(var r=h.keys(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},h.invert=function(n){for(var r={},t=h.keys(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r},h.functions=h.methods=function(n){var r=[];for(var t in n)h.isFunction(n[t])&&r.push(t);return r.sort()};var R=function(c,l){return function(n){var r=arguments.length;if(l&&(n=Object(n)),r<2||null==n)return n;for(var t=1;t<r;t++)for(var e=arguments[t],u=c(e),i=u.length,o=0;o<i;o++){var a=u[o];l&&void 0!==n[a]||(n[a]=e[a])}return n}};h.extend=R(h.allKeys),h.extendOwn=h.assign=R(h.keys),h.findKey=function(n,r,t){r=d(r,t);for(var e,u=h.keys(n),i=0,o=u.length;i<o;i++)if(r(n[e=u[i]],e,n))return e};var q,K,z=function(n,r,t){return r in t};h.pick=g(function(n,r){var t={},e=r[0];if(null==n)return t;h.isFunction(e)?(1<r.length&&(e=y(e,r[1])),r=h.allKeys(n)):(e=z,r=M(r,!1,!1),n=Object(n));for(var u=0,i=r.length;u<i;u++){var o=r[u],a=n[o];e(a,o,n)&&(t[o]=a)}return t}),h.omit=g(function(n,t){var r,e=t[0];return h.isFunction(e)?(e=h.negate(e),1<t.length&&(r=t[1])):(t=h.map(M(t,!1,!1),String),e=function(n,r){return!h.contains(t,r)}),h.pick(n,e,r)}),h.defaults=R(h.allKeys,!0),h.create=function(n,r){var t=m(n);return r&&h.extendOwn(t,r),t},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,r){return r(n),n},h.isMatch=function(n,r){var t=h.keys(r),e=t.length;if(null==n)return!e;for(var u=Object(n),i=0;i<e;i++){var o=t[i];if(r[o]!==u[o]||!(o in u))return!1}return!0},q=function(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var u=typeof n;return("function"===u||"object"===u||"object"==typeof r)&&K(n,r,t,e)},K=function(n,r,t,e){n instanceof h&&(n=n._wrapped),r instanceof h&&(r=r._wrapped);var u=p.call(n);if(u!==p.call(r))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+r;case"[object Number]":return+n!=+n?+r!=+r:0==+n?1/+n==1/r:+n==+r;case"[object Date]":case"[object Boolean]":return+n==+r;case"[object Symbol]":return s.valueOf.call(n)===s.valueOf.call(r)}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof r)return!1;var o=n.constructor,a=r.constructor;if(o!==a&&!(h.isFunction(o)&&o instanceof o&&h.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in r)return!1}e=e||[];for(var c=(t=t||[]).length;c--;)if(t[c]===n)return e[c]===r;if(t.push(n),e.push(r),i){if((c=n.length)!==r.length)return!1;for(;c--;)if(!q(n[c],r[c],t,e))return!1}else{var l,f=h.keys(n);if(c=f.length,h.keys(r).length!==c)return!1;for(;c--;)if(l=f[c],!j(r,l)||!q(n[l],r[l],t,e))return!1}return t.pop(),e.pop(),!0},h.isEqual=function(n,r){return q(n,r)},h.isEmpty=function(n){return null==n||(w(n)&&(h.isArray(n)||h.isString(n)||h.isArguments(n))?0===n.length:0===h.keys(n).length)},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=t||function(n){return"[object Array]"===p.call(n)},h.isObject=function(n){var r=typeof n;return"function"===r||"object"===r&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(r){h["is"+r]=function(n){return p.call(n)==="[object "+r+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return j(n,"callee")});var D=n.document&&n.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof D&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return!h.isSymbol(n)&&isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&isNaN(n)},h.isBoolean=function(n){return!0===n||!1===n||"[object Boolean]"===p.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return void 0===n},h.has=function(n,r){if(!h.isArray(r))return j(n,r);for(var t=r.length,e=0;e<t;e++){var u=r[e];if(null==n||!i.call(n,u))return!1;n=n[u]}return!!t},h.noConflict=function(){return n._=r,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(r){return h.isArray(r)?function(n){return x(n,r)}:b(r)},h.propertyOf=function(r){return null==r?function(){}:function(n){return h.isArray(n)?x(r,n):r[n]}},h.matcher=h.matches=function(r){return r=h.extendOwn({},r),function(n){return h.isMatch(n,r)}},h.times=function(n,r,t){var e=Array(Math.max(0,n));r=y(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},h.random=function(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var L={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},P=h.invert(L),W=function(r){var t=function(n){return r[n]},n="(?:"+h.keys(r).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=W(L),h.unescape=W(P),h.result=function(n,r,t){h.isArray(r)||(r=[r]);var e=r.length;if(!e)return h.isFunction(t)?t.call(n):t;for(var u=0;u<e;u++){var i=null==n?void 0:n[r[u]];void 0===i&&(i=t,u=e),n=h.isFunction(i)?i.call(n):i}return n};
30875var C=0;h.uniqueId=function(n){var r=++C+"";return n?n+r:r},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,U={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},V=/\\|'|\r|\n|\u2028|\u2029/g,$=function(n){return"\\"+U[n]};h.template=function(i,n,r){!n&&r&&(n=r),n=h.defaults({},n,h.templateSettings);var t,e=RegExp([(n.escape||J).source,(n.interpolate||J).source,(n.evaluate||J).source].join("|")+"|$","g"),o=0,a="__p+='";i.replace(e,function(n,r,t,e,u){return a+=i.slice(o,u).replace(V,$),o=u+n.length,r?a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":t?a+="'+\n((__t=("+t+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",n.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{t=new Function(n.variable||"obj","_",a)}catch(n){throw n.source=a,n}var u=function(n){return t.call(this,n,h)},c=n.variable||"obj";return u.source="function("+c+"){\n"+a+"}",u},h.chain=function(n){var r=h(n);return r._chain=!0,r};var G=function(n,r){return n._chain?h(r).chain():r};h.mixin=function(t){return h.each(h.functions(t),function(n){var r=h[n]=t[n];h.prototype[n]=function(){var n=[this._wrapped];return u.apply(n,arguments),G(this,r.apply(h,n))}}),h},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var t=e[r];h.prototype[r]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==r&&"splice"!==r||0!==n.length||delete n[0],G(this,n)}}),h.each(["concat","join","slice"],function(n){var r=e[n];h.prototype[n]=function(){return G(this,r.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},h.prototype.valueOf=h.prototype.toJSON=h.prototype.value,h.prototype.toString=function(){return String(this._wrapped)},'function' === typeof redesign.define && redesign.define.amd&&redesign.define("underscore",[],function(){return h})}(); 30876redesign.define('anfcoreHandlebarsHelpers/util/makeHelper', ['exports'], function (exports) { 30877 'use strict'; 30878 30879 Object.defineProperty(exports, "__esModule", { 30880 value: true 30881 }); 30882 var makeHelper = function makeHelper(func, helperName) { 30883 return Object.defineProperty(func, 'helperName', { 30884 value: '' + String(helperName), 30885 configurable: false, 30886 enumerable: false, 30887 writable: false 30888 }); 30889 }; 30890 30891 exports['default'] = makeHelper; 30892}); 30893redesign.define('anfcoreHandlebarsHelpers/concat', ['exports', './util/makeHelper'], function (exports, _makeHelper) { 30894 'use strict'; 30895 30896 Object.defineProperty(exports, "__esModule", { 30897 value: true 30898 }); 30899 30900 var _makeHelper2 = _interopRequireDefault(_makeHelper); 30901 30902 function _interopRequireDefault(obj) { 30903 return obj && obj.__esModule ? obj : { 30904 default: obj 30905 }; 30906 } 30907 30908 var stringTypes = function stringTypes(x) { 30909 return typeof x === 'string'; 30910 }; 30911 30912 var concat = function concat() { 30913 for (var _len = arguments.length, strings = Array(_len), _key = 0; _key < _len; _key++) { 30914 strings[_key] = arguments[_key]; 30915 } 30916 30917 return [].concat(strings).filter(stringTypes).join(''); 30918 }; 30919 30920 exports['default'] = (0, _makeHelper2['default'])(concat, 'concat'); 30921}); 30922redesign.define('dsHelper/_registerHelper',[ 30923 'handlebars' 30924], function _registerHelper(Handlebars) { 30925 'use strict'; 30926 30927 function registerHelper(name, fn) { 30928 var _name = (typeof name === 'string') ? name.trim() : ''; 30929 if (typeof fn !== 'function') return; 30930 if (!_name) return; 30931 if (Handlebars.helpers[_name]) return; 30932 30933 Handlebars.registerHelper(_name, fn); 30934 } 30935 30936 return registerHelper; 30937}); 30938 30939 30940redesign.define('dsHelper/concat',[ 30941 'anfcoreHandlebarsHelpers/concat', 30942 './_registerHelper' 30943], function registerGetId(helper, registerHelper) { 30944 'use strict'; 30945 registerHelper(helper.default.helperName, helper.default); 30946}); 30947 30948redesign.define('anfcoreHandlebarsHelpers/getId', ['exports', './util/makeHelper'], function (exports, _makeHelper) { 30949 'use strict'; 30950 30951 Object.defineProperty(exports, "__esModule", { 30952 value: true 30953 }); 30954 30955 var _makeHelper2 = _interopRequireDefault(_makeHelper); 30956 30957 function _interopRequireDefault(obj) { 30958 return obj && obj.__esModule ? obj : { 30959 default: obj 30960 }; 30961 } 30962 30963 var ids = {}; 30964 30965 function getId(baseId, block) { 30966 ids[baseId] = Object.prototype.hasOwnProperty.call(ids, baseId) ? ids[baseId] : String(baseId) + '-' + String(Math.random().toString(36).substring(3)); 30967 30968 return block.fn(ids[baseId]); 30969 } 30970 30971 exports['default'] = (0, _makeHelper2['default'])(getId, 'getId'); 30972}); 30973redesign.define('dsHelper/getId',[ 30974 'anfcoreHandlebarsHelpers/getId', 30975 './_registerHelper' 30976], function registerGetId(helper, registerHelper) { 30977 'use strict'; 30978 registerHelper(helper.default.helperName, helper.default); 30979}); 30980 30981redesign.define('anfcoreHandlebarsHelpers/is', ['exports', './util/makeHelper'], function (exports, _makeHelper) { 30982 'use strict'; 30983 30984 Object.defineProperty(exports, "__esModule", { 30985 value: true 30986 }); 30987 30988 var _makeHelper2 = _interopRequireDefault(_makeHelper); 30989 30990 function _interopRequireDefault(obj) { 30991 return obj && obj.__esModule ? obj : { 30992 default: obj 30993 }; 30994 } 30995 30996 function is(leftValue, rightValue, context) { 30997 return leftValue === rightValue ? context.fn(this) : context.
30997inverse(this); 30998 } 30999 31000 exports['default'] = (0, _makeHelper2['default'])(is, 'is'); 31001}); 31002redesign.define('dsHelper/is',[ 31003 'anfcoreHandlebarsHelpers/is', 31004 './_registerHelper' 31005], function registerIs(helper, registerHelper) { 31006 'use strict'; 31007 registerHelper(helper.default.helperName, helper.default); 31008}); 31009 31010redesign.define('anfcoreHandlebarsHelpers/repeat', ['exports', './util/makeHelper'], function (exports, _makeHelper) { 31011 'use strict'; 31012 31013 Object.defineProperty(exports, "__esModule", { 31014 value: true 31015 }); 31016 31017 var _makeHelper2 = _interopRequireDefault(_makeHelper); 31018 31019 function _interopRequireDefault(obj) { 31020 return obj && obj.__esModule ? obj : { 31021 default: obj 31022 }; 31023 } 31024 31025 function repeat(n, block) { 31026 var accum = ''; 31027 31028 for (var i = 0; i < n; i += 1) { 31029 accum += block.fn(i); 31030 } 31031 31032 return accum; 31033 } 31034 31035 exports['default'] = (0, _makeHelper2['default'])(repeat, 'repeat'); 31036}); 31037redesign.define('dsHelper/repeat',[ 31038 'anfcoreHandlebarsHelpers/repeat', 31039 './_registerHelper' 31040], function registerRepeat(helper, registerHelper) { 31041 'use strict'; 31042 registerHelper(helper.default.helperName, helper.default); 31043}); 31044 31045redesign.define('anfcoreHandlebarsHelpers/requiredValue', ['exports', './util/makeHelper'], function (exports, _makeHelper) { 31046 'use strict'; 31047 31048 Object.defineProperty(exports, "__esModule", { 31049 value: true 31050 }); 31051 31052 var _makeHelper2 = _interopRequireDefault(_makeHelper); 31053 31054 function _interopRequireDefault(obj) { 31055 return obj && obj.__esModule ? obj : { 31056 default: obj 31057 }; 31058 } 31059 31060 function requiredValue(context, options) { 31061 if (typeof context !== 'string') { 31062 throw new Error('Missing required parameter'); 31063 } 31064 31065 return options.fn(this); 31066 } 31067 31068 exports['default'] = (0, _makeHelper2['default'])(requiredValue, 'requiredValue'); 31069}); 31070redesign.define('dsHelper/requiredValue',[ 31071 'anfcoreHandlebarsHelpers/requiredValue', 31072 './_registerHelper' 31073], function registerRequiredValue(helper, registerHelper) { 31074 'use strict'; 31075 registerHelper(helper.default.helperName, helper.default); 31076}); 31077 31078redesign.define('dsHelper/times',[ 31079 'anfcoreHandlebarsHelpers/repeat', 31080 './_registerHelper' 31081], function registerTimes(helper, registerHelper) { 31082 'use strict'; 31083 registerHelper('times', helper.default); 31084}); 31085 31086redesign.define('wcsHelper/JSONtoString',[ 31087 'handlebars' 31088], function helper( 31089 handlebars 31090) { 31091 'use strict'; 31092 handlebars.registerHelper('JSONtoString', function helperFn(obj) { 31093 return JSON.stringify(obj); 31094 }); 31095}); 31096 31097redesign.define('wcsHelper/and',[ 31098 'handlebars' 31099], function helper( 31100 handlebars 31101) { 31102 'use strict'; 31103 handlebars.registerHelper('and', function helperFn() { 31104 return Array.prototype.slice.call(arguments).every(Boolean); 31105 }); 31106}); 31107 31108redesign.define('wcsHelper/arrayLookup',[ 31109 'handlebars' 31110], function helper( 31111 handlebars 31112) { 31113 'use strict'; 31114 handlebars.registerHelper('arrayLookup', function helperFn(array, objectProperty, expectation) { 31115 return $.grep(array, function (arrayItem) { 31116 return (arrayItem[objectProperty] === expectation); 31117 }).length > 0; 31118 }); 31119}); 31120 31121redesign.define('wcsHelper/checkout_button',[ 31122 'handlebars' 31123], function helper( 31124 handlebars 31125) { 31126 'use strict'; 31127 handlebars.registerHelper('checkout_button', function helperFn(options) { 31128 var attributes = []; 31129 var attribute = null; 31130 var data = null; 31131 31132 if (options.data && options.hash.hasOwnProperty('data-state')) { 31133 data = handlebars.createFrame(options.data); 31134 31135 data['data-state'] = options.hash['data-state']; 31136 31137 // eslint-disable-next-line no-param-reassign 31138 options.data = data; 31139 } 31140 31141 for (attribute in options.hash) { 31142 if (options.hash.hasOwnProperty(attribute)) { 31143 attributes.push(handlebars.escapeExpression(attribute) + "='" + handlebars.escapeExpression(options.hash[attribute]) + "'"); 31144 } 31145 } 31146 31147 return new handlebars.SafeString('<button ' + attributes.join(' ') + '>' + options.fn(this, { data: options.data }) + '</button>'); 31148 }); 31149}); 31150 31151redesign.define('wcsHelper/checkout_button_state',[ 31152 'handlebars' 31153], function helper( 31154 handlebars 31155) { 31156 'use strict'; 31157 handlebars.registerHelper('checkout_button_state', function helperFn(options) { 31158 var state = (options.hash.name) ? handlebars.escapeExpression(options.hash.name) : ''; 31159 var tmntName = (options.hash.tmnt) ? handlebars.escapeExpression(options.hash.tmnt) : ''; 31160 var ariaName = (options.hash.aria) ? handlebars.escapeExpression(options.hash.aria) : ''; 31161 var parameters = (options.hash.tmnt) ? handlebars.escapeExpression(options.hash.parameters) : ''; 31162 var tmntMessage = $.extend({}, ANF.messaging.checkout.TMNT[tmntName]); 31163 var ariaMessage = ANF.messaging.checkout.TMNT[ariaName] || ''; 31164 var isHidden = (typeof options.data['data-state'] === 'string' && options.data['data-state'] === state) ? false : true; 31165 var markup = ''; 31166 var parametersRegEx = /{([0-9]+)}/g; 31167 31168 if (state !== '') { 31169 if (!_.isEmpty(tmntMessage)) { 31170 parameters = parameters.split('|'); 31171 31172 tmntMessage.value = tmntMessage.value.replace(parametersRegEx, function ($0, $1) { 31173 return parameters[$1]; 31174 }); 31175
31176 markup = "<span data-state='" + state + "' data-property='" + tmntMessage.key + "' aria-hidden='" + isHidden + "'>" + tmntMessage.value + '</span>'; 31177 } else if (ariaMessage !== '') { 31178 markup = "<span data-state='" + state + "' data-property='" + ariaMessage.key + "' aria-label='" + ariaMessage.value + "' aria-hidden='" + isHidden + "'></span>"; 31179 } 31180 } 31181 31182 return new handlebars.SafeString(markup); 31183 }); 31184}); 31185 31186redesign.define('wcsHelper/checkout_concat',[ 31187 'handlebars' 31188], function helper( 31189 handlebars 31190) { 31191 'use strict'; 31192 handlebars.registerHelper('checkout_concat', function helperFn() { 31193 return Array.prototype.slice.call(arguments, 0, -1).join(''); 31194 }); 31195}); 31196 31197redesign.define('wcsHelper/contains',[ 31198 'handlebars' 31199], function helper( 31200 handlebars 31201) { 31202 'use strict'; 31203 handlebars.registerHelper('contains', function helperFn() { 31204 var arr = Array.prototype.slice.call(arguments); 31205 return (arr.indexOf(arr.shift()) > -1); 31206 }); 31207}); 31208 31209redesign.define('wcsHelper/eq',[ 31210 'handlebars' 31211], function helper( 31212 handlebars 31213) { 31214 'use strict'; 31215 handlebars.registerHelper('eq', function helperFn(v1, v2) { 31216 return v1 === v2; 31217 }); 31218}); 31219 31220redesign.define('wcsHelper/equal',[ 31221 'handlebars' 31222], function helper( 31223 handlebars 31224) { 31225 'use strict'; 31226 handlebars.registerHelper('equal', function helperFn(leftValue, rightValue, options) { 31227 if (leftValue === rightValue) { 31228 return options.fn(this); 31229 } 31230 return options.inverse(this); 31231 }); 31232}); 31233 31234redesign.define('wcsHelper/error',[ 31235 'handlebars' 31236], function helper( 31237 handlebars 31238) { 31239 'use strict'; 31240 handlebars.registerHelper('error', function helperFn(options) { 31241 var errorClass = handlebars.escapeExpression(options.hash.class); 31242 var message = options.hash.message; 31243 var expandedMessage = options.hash.expandedMessage; 31244 var hasMessage = (typeof message === 'object' && message !== null) ? true : false; 31245 var hasExpandedMessage = (typeof expandedMessage === 'object' && expandedMessage !== null) ? true : false; 31246 var hasErrorClass = (typeof errorClass !== 'undefined' && errorClass !== null && errorClass !== '') ? true : false; 31247 var markup = ''; 31248 var errorArray = []; 31249 var errorObject = null; 31250 var tmntObject = $.extend(true, {}, ANF.messaging.checkout.TMNT); 31251 var index = 0; 31252 var parameter = options.hash.parameter; 31253 31254 if (hasMessage) { 31255 errorArray.push({ 31256 'key': message.errorKey || message.key, 31257 'value': message.errorMessage || message.value, 31258 'errorClass': 'error-message' 31259 }); 31260 31261 if (hasExpandedMessage) { 31262 errorArray.push({ 31263 'key': expandedMessage.errorKey || expandedMessage.key, 31264 'value': expandedMessage.errorMessage || expandedMessage.value, 31265 'errorClass': 'error-explained' 31266 }); 31267 } 31268 } else if (typeof message !== 'undefined') { 31269 message = handlebars.escapeExpression(message); 31270 31271 if (typeof tmntObject[message] === 'object') { 31272 tmntObject[message].errorClass = 'error-message'; 31273 errorArray.push(tmntObject[message]); 31274 31275 if (typeof expandedMessage !== 'undefined') { 31276 expandedMessage = handlebars.escapeExpression(expandedMessage); 31277 if (typeof tmntObject[expandedMessage] === 'object') { 31278 tmntObject[expandedMessage].errorClass = 'error-explained'; 31279 errorArray.push(tmntObject[expandedMessage]); 31280 } 31281 } 31282 } 31283 } 31284 31285 31286 for (; index < errorArray.length; index += 1) { 31287 errorObject = errorArray[index]; 31288 31289 if (hasErrorClass) { 31290 errorObject.errorClass = 'error-' + errorClass; 31291 } 31292 31293 if (parameter && parameter.length) { 31294 if (_.isString(parameter)) { 31295 parameter = parameter.split('|'); 31296 } 31297 31298 // eslint-disable-next-line no-loop-func 31299 errorObject.value = errorObject.value.replace(/{([0-9]+)}/g, function replamentFn($0, $1) { 31300 return parameter[$1]; 31301 }); 31302 } 31303 31304 markup += "<p class='" + errorObject.errorClass + "' data-property='" + errorObject.key + "'>" + errorObject.value + '</p>'; 31305 } 31306 31307 return new handlebars.SafeString(markup); 31308 }); 31309}); 31310 31311redesign.define('wcsHelper/espot',[ 31312 'handlebars' 31313], function helper( 31314 handlebars 31315) { 31316 'use strict'; 31317 handlebars.registerHelper('espot', function helperFn(options) { 31318 var eSpot = (options && options.hash && options.hash.name) ? ANF.messaging.checkout.eSpots[options.hash.name] : ''; 31319 31320 return new handlebars.SafeString(eSpot); 31321 }); 31322}); 31323 31324redesign.define('wcsHelper/firstN',[ 31325 'handlebars' 31326], function helper( 31327 handlebars 31328) { 31329 'use strict'; 31330 handlebars.registerHelper('firstN', function helperFn(leftValue, rightValue, options) { 31331 if (leftValue < rightValue) { 31332 return options.fn(this); 31333 } 31334 return options.inverse(this); 31335 }); 31336}); 31337 31338 31339redesign.define('polyfill/Object/assign',[], function () { 31340 "use strict"; 31341 31342 if (typeof Object.assign !== 'function') { 31343 // Must be writable: true, enumerable: false, configurable: true 31344 Object.defineProperty(Object, "assign", { 31345 value: function assign(target) { // .length of function is 2 31346 if (target === null || target === undefined) { // TypeError if undefined or null 31347 throw new TypeError('Cannot convert undefined or null to object'); 31348 } 31349 31350 var to = Object(target); 31351 31352 for (var index = 1; index < arguments.length; index++) { 31353 var nextSource = arguments[index]; 31354 31355 if (nextSource !== null && nextSource !== undefined) { // Skip over if undefined or null 31356 for (var nextKey in nextSource) { 31357 // Avoid bugs when hasOwnProperty is shadowed 31358 if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { 31359 to[nextKey] = nextSource[nextKey]; 31360 } 31361 } 31362 } 31363 } 31364 return to; 31365 }, 31366 writable: true, 31367 configurable: true 31368 }); 31369 } 31370 31371 return Object.assign; 31372}); 31373 31374redesign.define('polyfill/Array/forEach',[], function () { 31375 "use strict"; 31376 31377 // Production steps of ECMA-262, Edition 5, 15.4.4.18 31378 // Reference: http://es5.github.io/#x15.4.4.18 31379 if (!Array.prototype.forEach) { 31380 31381 Array.prototype.forEach = function(callback/*, thisArg*/) { 31382 31383 var T, k; 31384 31385 if (this == null) { 31386 throw new TypeError('this is null or not defined'); 31387 } 31388 31389 // 1. Let O be the result of calling toObject() passing the 31390 // |this| value as the argument. 31391 var O = Object(this); 31392 31393 // 2. Let lenValue be the result of calling the Get() internal 31394 // method of O with the argument "length". 31395 // 3. Let len be toUint32(lenValue). 31396 var len = O.length >>> 0; 31397 31398 // 4. If isCallable(callback) is false, throw a TypeError exception. 31399 // See: http://es5.github.com/#x9.11 31400 if (typeof callback !== 'function') { 31401 throw new TypeError(callback + ' is not a function'); 31402 } 31403 31404 // 5. If thisArg was supplied, let T be thisArg; else let 31405 // T be undefined. 31406 if (arguments.length > 1) { 31407 T = arguments[1]; 31408 } 31409 31410 // 6. Let k be 0. 31411 k = 0; 31412 31413 // 7. Repeat while k < len. 31414 while (k < len) { 31415 31416 var kValue; 31417 31418 // a. Let Pk be ToString(k). 31419 // This is implicit for LHS operands of the in operator. 31420 // b. Let kPresent be the result of calling the HasProperty 31421 // internal method of O with argument Pk. 31422 // This step can be combined with c. 31423 // c. If kPresent is true, then 31424 if (k in O) { 31425 31426 // i. Let kValue be the result of calling the Get internal 31427 // method of O with argument Pk. 31428 kValue = O[k]; 31429 31430 // ii. Call the Call internal method of callback with T as 31431 // the this value and argument list containing kValue, k, and O. 31432 callback.call(T, kValue, k, O); 31433 } 31434 // d. Increase k by 1. 31435 k++; 31436 } 31437 // 8. return undefined. 31438 }; 31439 } 31440 31441 return Array.forEach 31442}); 31443 31444redesign.define('coreClass/ANFImage',[ 31445 'anfUtil/constants', 31446 'anfUtil/testFramework', 31447 '!polyfill/Object/assign', 31448 '!polyfill/Array/forEach' 31449], function classANFImage(coreConstants, test) { 31450 'use strict'; 31451 31452 /** 31453 * @namespace ANFImage 31454 * @param {String} imageName - the name of the image 31455 * @property {string} extraLargeUrl - the extra large url for the image 31456 * @property {string} largeUrl - the large url for the image 31457 * @property {string} mediumUrl - the medium url for the image 31458 * @property {string} smallUrl - the small url for the image 31459 * @property {string} url - the url for the image 31460 * @returns {ANFImage} ANFImage instance 31461 * @constructor 31462 * @exports ANFImage 31463 */ 31464 function ANFImage(imageName) { 31465 var myEncode = true; 31466 var myImageName = ''; 31467 var myIsSizePresetEnabled = true; 31468 var myWidth = 800; 31469 var myPolicy = ''; 31470 var myExtensionType = ''; 31471 31472 Object.defineProperties(this, { 31473 /** 31474 * @memberOf ANFImage 31475 * @property {Object[]} args - list of query string object's name, value pairs 31476 * @property {String} args[].name - the name of the query string var 31477 * @property {String} args[].value - the value of the query string var 31478 */ 31479 args: { 31480 enumerable: true, 31481 value: [], 31482 writable: false 31483 }, 31484 /** 31485 * @memberOf ANFImage 31486 * @property {Boolean} encode - flag to encode the arguments in the query string 31487 */ 31488 encode: { 31489 enumerable: true, 31490 get: function getterEncode() { 31491 return myEncode; 31492 }, 31493 set: function setterEncode(encode) { 31494 if (test.type.not.boolean(encode)) {
31495 throw new Error('Supplied encode is not valid'); 31496 } 31497 myEncode = encode; 31498 } 31499 }, 31500 /** 31501 * @memberor ANFImage 31502 * @property {String} imageName - the name of the image 31503 */ 31504 imageName: { 31505 enumerable: true, 31506 get: function getterImageName() { 31507 return myImageName; 31508 }, 31509 set: function setterImageName(newMyImageName) { 31510 myImageName = newMyImageName; 31511 } 31512 }, 31513 /** 31514 * @memberOf ANFImage 31515 * @property {String[]} presets - list presets to be applied to the image 31516 */ 31517 presets: { 31518 enumerable: true, 31519 value: [], 31520 writable: false 31521 }, 31522 /** 31523 * @memberor ANFImage 31524 * @property {Boolean} isSizePresetEnabled - the flag if we get the size specific url 31525 */ 31526 isSizePresetEnabled: { 31527 enumerable: true, 31528 get: function getterisSizePresetEnabled() { 31529 return myIsSizePresetEnabled; 31530 }, 31531 set: function setterisSizePresetEnabled(newMyIsSizePresetEnabled) { 31532 if (test.type.not.boolean(newMyIsSizePresetEnabled)) { 31533 throw new TypeError('Supplied isSizePresetEnabled is invalid'); 31534 } 31535 myIsSizePresetEnabled = newMyIsSizePresetEnabled; 31536 } 31537 }, 31538 policy: { 31539 enumerable: true, 31540 get: function getterPolicy() { 31541 return myPolicy; 31542 }, 31543 set: function setterPolicy(newPolicy) { 31544 if (test.string.not.empty(newPolicy, true)) { 31545 throw new TypeError('Supplied policy is invalid'); 31546 } 31547 myPolicy = newPolicy; 31548 } 31549 }, 31550 extensionType: { 31551 enumerable: true, 31552 get: function getterExtensionType() { 31553 return myExtensionType; 31554 }, 31555 set: function setterExtensionType(newExtensionType) { 31556 if (Object.values(ANFImage.extensionTypes).indexOf(newExtensionType) === -1) { 31557 throw new TypeError('Supplied extensionType is invalid'); 31558 } 31559 myExtensionType = newExtensionType; 31560 } 31561 }, 31562 /** 31563 * @memberOf ANFImage 31564 * @property {Number} width - the width of the container that the image will occupy 31565 */ 31566 width: { 31567 enumerable: true, 31568 get: function getterWidth() { 31569 return myWidth; 31570 }, 31571 set: function setterWidth(width) { 31572 if (test.type.not.number(width)) { 31573 throw new Error('Supplied width is not valid'); 31574 } 31575 myWidth = width; 31576 } 31577 } 31578 }); 31579 31580 this.imageName = imageName || ''; 31581 31582 return this; 31583 } 31584 31585 Object.defineProperties(ANFImage, { 31586 sizePolicies: { 31587 value: Object.freeze({ 31588 EXTRA_LARGE: 'product-extra-large', 31589 LARGE: 'product-large', 31590 MEDIUM: 'product-medium', 31591 SMALL: 'product-small' 31592 }) 31593 }, 31594 /** 31595 * @description Lookup map of the acceptable image size presets 31596 * @static 31597 * @memberOf ANFImage 31598 * @readonly 31599 * @type {Readonly<{SMALL: string, MEDIUM: string, LARGE: string, EXTRA_LARGE: string}>} 31600 */ 31601 sizePresets: { 31602 value: Object.freeze({ 31603 EXTRA_LARGE: 'product-extra-large-' + coreConstants.anf('params.urls.STATIC_DIR'), 31604 LARGE: 'product-large-' + coreConstants.anf('params.urls.STATIC_DIR'), 31605 MEDIUM: 'product-medium-' + coreConstants.anf('params.urls.STATIC_DIR'), 31606 SMALL: 'product-small-' + coreConstants.anf('params.urls.STATIC_DIR') 31607 }) 31608 }, 31609 /** 31610 * @description look up map fo the size range for acceptable image size presets 31611 * @static 31612 * @memberOf ANFImage 31613 * @readonly 31614 */ 31615 sizePresetsRange: { 31616 value: Object.freeze({ 31617 EXTRA_LARGE: Object.freeze({ 31618 min: 801, 31619 max: null 31620 }), 31621 LARGE: Object.freeze({ 31622 min: 401, 31623 max: 800 31624 }), 31625 MEDIUM: Object.freeze({ 31626 min: 201, 31627 max: 400 31628 }), 31629 SMALL: Object.freeze({ 31630 min: 0, 31631 max: 200 31632 }) 31633 }) 31634 }, 31635 31636 extensionTypes: { 31637 value: Object.freeze({ 31638 PNG: 'png', 31639 JPEG: 'jpg', 31640 GIF: 'gif' 31641 }) 31642 } 31643 }); 31644 31645 /** 31646 * @private 31647 * @param {ANFImage} anfImage - the instance of ANFImage 31648 * @param {String} sizePreset - the size preset to use 31649 * @param {String} sizePolicy - the size policy to use 31650 * @returns {string} the constructed url 31651 */ 31652 function buildUrl(anfImage, sizePreset, sizePolicy) { 31653 var search = []; 31654 var paramifedArgs; 31655 var presets = Array.from(anfImage.presets); 31656 var presetString; 31657 var extensionType = anfImage.extensionType; 31658 var url = [ 31659 coreConstants.anf('params.urls.IMAGEURL'), 31660 anfImage.imageName 31661 ]; 31662 31663 var args = Array.from(anfImage.args); 31664 // TODO: remove this when we eliminate need for switch around policies vs presets 31665 if (coreConstants.anf('params.storeAttributes.hasAIMPolicies')) { 31666 if (test.string.not.empty(sizePolicy, false)) { 31667 args.push({ 31668 name: 'policy', 31669 value: sizePolicy 31670 }); 31671 } 31672 if (extensionType) { 31673 url.push('.' + extensionType); 31674 } 31675 } else { 31676 if (test.string.not.empty(sizePreset, false)) { 31677 presets.push(sizePreset); 31678 } 31679 31680 if (extensionType) { 31681 presets.push(extensionType.toUpperCase()); 31682 } 31683
31684 if (presets.length) { 31685 presetString = presets 31686 .map(function nomalizePreset(preset) { 31687 return '$' + preset + '$'; 31688 }) 31689 .join(''); 31690 31691 search.push(presetString); 31692 } 31693 } 31694 31695 if (args.length) { 31696 paramifedArgs = $.param(args); 31697 31698 if (!anfImage.encode) { 31699 paramifedArgs = decodeURIComponent(paramifedArgs); 31700 } 31701 31702 search.push(paramifedArgs); 31703 } 31704 31705 if (search.length) { 31706 url.push('?'); 31707 url.push(search.join('&')); 31708 } 31709 31710 return url.join(''); 31711 } 31712 31713 /** 31714 * Get the function to build the url by a specific size 31715 * @param {String} size - the size amount of space available for the image 31716 * @param {String} policy - the size policy for the image 31717 * @returns {function(): string} function to build the url based off the size 31718 */ 31719 function getUrlBySizeFN(size, policy) { 31720 return function getUrlBySize() { 31721 return buildUrl(this, size, policy); 31722 }; 31723 } 31724 31725 Object.defineProperties(ANFImage.prototype, { 31726 /** 31727 * @memberOf ANFImage 31728 * @readonly 31729 * @property {string} extraLargeUrl - the extra large url for the image 31730 */ 31731 extraLargeUrl: { 31732 get: getUrlBySizeFN(ANFImage.sizePresets.EXTRA_LARGE, ANFImage.sizePolicies.EXTRA_LARGE) 31733 }, 31734 /** 31735 * @memberOf ANFImage 31736 * @readonly 31737 * @property {string} largeUrl - the large url for the image 31738 */ 31739 largeUrl: { 31740 get: getUrlBySizeFN(ANFImage.sizePresets.LARGE, ANFImage.sizePolicies.LARGE) 31741 }, 31742 /** 31743 * @memberOf ANFImage 31744 * @readonly 31745 * @property {string} mediumUrl - the medium url for the image 31746 */ 31747 mediumUrl: { 31748 get: getUrlBySizeFN(ANFImage.sizePresets.MEDIUM, ANFImage.sizePolicies.MEDIUM) 31749 }, 31750 /** 31751 * @memberOf ANFImage 31752 * @readonly 31753 * @property {string} smallUrl - the small url for the image 31754 */ 31755 smallUrl: { 31756 get: getUrlBySizeFN(ANFImage.sizePresets.SMALL, ANFImage.sizePolicies.SMALL) 31757 }, 31758 /** 31759 * @memberOf ANFImage 31760 * @readonly 31761 * @property {string} url - the url for the image 31762 */ 31763 url: { 31764 get: function computedPropertyUrl() { 31765 return this.getUrl(); 31766 } 31767 }, 31768 presetName: { 31769 get: function computedPropertyPresetName() { 31770 return this.getPresetName(); 31771 } 31772 } 31773 }); 31774 31775 /** 31776 * Set the encode flag 31777 * @memberOf ANFImage 31778 * @param {Boolean} encode - value to set encode to 31779 * @returns {ANFImage} ANFImage instance 31780 */ 31781 ANFImage.prototype.setEncode = function setEncode(encode) { 31782 this.encode = encode; 31783 return this; 31784 }; 31785 31786 /** 31787 * Set the isSizePresetEnabled flag 31788 * @memberOf ANFImage 31789 * @param {Boolean} isSizePresetEnabled - value to set isSizePresetEnabled to 31790 * @returns {ANFImage} ANFImage instance 31791 */ 31792 ANFImage.prototype.setSizePresetEnabled = function setSizePresetEnabled(isSizePresetEnabled) { 31793 this.isSizePresetEnabled = isSizePresetEnabled; 31794 return this; 31795 }; 31796 31797 /** 31798 * Set the width used to determine which preset to use when isSizePresetEnabled is true 31799 * @memberOf ANFImage 31800 * @param {Number} width - the new width 31801 * @returns {ANFImage} ANFImage instance 31802 */ 31803 ANFImage.prototype.setWidth = function setWidth(width) { 31804 this.width = width; 31805 return this; 31806 }; 31807 31808 /** 31809 * Set the name of the image 31810 * @memberOf ANFImage 31811 * @param {String} imageName - the name of the image 31812 * @returns {ANFImage} ANFImage instance 31813 */ 31814 ANFImage.prototype.setImageName = function setImageName(imageName) { 31815 this.imageName = imageName; 31816 return this; 31817 }; 31818 31819 /** 31820 * adds a new preset to the list of presets 31821 * @memberOf ANFImage 31822 * @param {String} preset - name of the preset to add 31823 * @returns {ANFImage} ANFImage instance 31824 */ 31825 ANFImage.prototype.addPreset = function addPreset(preset) { 31826 var myPreset = typeof preset === 'string' ? preset.trim() : preset; 31827 31828 if (myPreset && this.presets.indexOf(myPreset) === -1) { 31829 this.presets.push(preset); 31830 } 31831 return this; 31832 }; 31833 31834 ANFImage.prototype.setExtensionType = function setExtensionType(extensionType) { 31835 this.extensionType = extensionType; 31836 return this; 31837 }; 31838 31839 /** 31840 * removes a preset from the list of presets 31841 * @memberOf ANFImage 31842 * @param {String} preset - name of the preset to be removed 31843 * @returns {ANFImage} ANFImage instance 31844 */ 31845 ANFImage.prototype.removePreset = function removePreset(preset) { 31846 var newPresets = Array.from(this.presets); 31847 var self = this; 31848 31849 // Need to celar out the presets this way b/c presets is not a 31850 // writeable propety, there for doing `this.presets = ...` 31851 // will throw an error 31852 while (this.presets.length > 0) { 31853 this.presets.pop(); 31854 } 31855 31856 newPresets 31857 .filter(function filterOutPreset(p) { 31858 return p !== preset; 31859 }
31859).forEach(function repopulatePresets(p) { 31860 self.addPreset(p); 31861 }); 31862 31863 return this; 31864 }; 31865 31866 /** 31867 * Add an argument to the list of arguments to use when building the image's query string 31868 * @memberOf ANFImage 31869 * @param {String} name - the name of the query string parameter 31870 * @param {String} value - the value of the query string parameter 31871 * @returns {ANFImage} ANFImage instance 31872 */ 31873 ANFImage.prototype.addArg = function addArg(name, value) { 31874 this.args.push({ 31875 name: name, 31876 value: value 31877 }); 31878 31879 return this; 31880 }; 31881 31882 /** 31883 * Remove all instances of the argument with the supplied name from the list of arguments to use when building the image's query string 31884 * @memberOf ANFImage 31885 * @param {String} name - name of the query string parameter(s) to be removed 31886 * @returns {ANFImage} ANFImage instance 31887 */ 31888 ANFImage.prototype.removeArg = function removeArg(name) { 31889 var newArgs = Array.from(this.args); 31890 var self = this; 31891 31892 // Need to celar out the Args this way b/c Args is not a 31893 // writeable propety, there for doing `this.Args = ...` 31894 // will throw an error 31895 while (this.args.length > 0) { 31896 this.args.pop(); 31897 } 31898 31899 newArgs 31900 .filter(function filterOutArg(arg) { 31901 return arg.name !== name; 31902 }
31902).forEach(function repopulateArgs(arg) { 31903 self.addArg(arg.name, arg.value); 31904 }); 31905 31906 return this; 31907 }; 31908 31909 /** 31910 * Clone the current instance of ANFImage 31911 * @memberOf ANFImage 31912 * @returns {ANFImage} Clone of ANFImage instance 31913 */ 31914 ANFImage.prototype.clone = function clone() { 31915 var newImage = new ANFImage(this.imageName); 31916 31917 this.args.forEach(function argsMapper(arg) { 31918 newImage.addArg(arg.name, arg.value); 31919 }); 31920 31921 this.presets.forEach(function argsMapper(preset) { 31922 newImage.addPreset(preset); 31923 }); 31924 31925 newImage 31926 .setEncode(this.encode) 31927 .setSizePresetEnabled(this.isSizePresetEnabled) 31928 .setWidth(this.width); 31929 31930 return newImage; 31931 }; 31932 31933 /** 31934 * Retrieves the image's url based off the ANFImage instance 31935 * @memberOf ANFImage 31936 * @returns {string} url 31937 */ 31938 ANFImage.prototype.getUrl = function getUrl() { 31939 var url; 31940 31941 if (this.isSizePresetEnabled) { 31942 if (test.number.inRange(this.width, ANFImage.sizePresetsRange.SMALL.min, ANFImage.sizePresetsRange.SMALL.max)) { 31943 url = this.getSmallUrl(); 31944 } else if (test.number.inRange(this.width, ANFImage.sizePresetsRange.MEDIUM.min, ANFImage.sizePresetsRange.MEDIUM.max)) { 31945 url = this.getMediumUrl(); 31946 } else if (test.number.inRange(this.width, ANFImage.sizePresetsRange.LARGE.min, ANFImage.sizePresetsRange.LARGE.max)) { 31947 url = this.getLargeUrl(); 31948 } else { 31949 url = this.getExtraLargeUrl(); 31950 } 31951 } else { 31952 url = buildUrl(this, null, this.policy); 31953 } 31954 31955 return url; 31956 }; 31957 31958 ANFImage.prototype.getPresetName = function getPresetName() { 31959 var presetName; 31960 31961 if (this.isSizePresetEnabled) { 31962 if (test.number.inRange(this.width, ANFImage.sizePresetsRange.SMALL.min, ANFImage.sizePresetsRange.SMALL.max)) { 31963 presetName = ANFImage.sizePresets.SMALL; 31964 } else if (test.number.inRange(this.width, ANFImage.sizePresetsRange.MEDIUM.min, ANFImage.sizePresetsRange.MEDIUM.max)) { 31965 presetName = ANFImage.sizePresets.MEDIUM; 31966 } else if (test.number.inRange(this.width, ANFImage.sizePresetsRange.LARGE.min, ANFImage.sizePresetsRange.LARGE.max)) { 31967 presetName = ANFImage.sizePresets.LARGE; 31968 } else { 31969 presetName = ANFImage.sizePresets.EXTRA_LARGE; 31970 } 31971 } 31972 31973 return presetName; 31974 }; 31975 31976 /** 31977 * Retrieves the image's small url based off the ANFImage instance 31978 * @memberOf ANFImage 31979 * @returns {string} url 31980 */ 31981 ANFImage.prototype.getSmallUrl = getUrlBySizeFN(ANFImage.sizePresets.SMALL, ANFImage.sizePolicies.SMALL); 31982 31983 /** 31984 * Retrieves the image's medium url based off the ANFImage instance 31985 * @memberOf ANFImage 31986 * @returns {string} url 31987 */ 31988 ANFImage.prototype.getMediumUrl = getUrlBySizeFN(ANFImage.sizePresets.MEDIUM, ANFImage.sizePolicies.MEDIUM); 31989 31990 /** 31991 * Retrieves the image's large url based off the ANFImage instance 31992 * @memberOf ANFImage 31993 * @returns {string} url 31994 */ 31995 ANFImage.prototype.getLargeUrl = getUrlBySizeFN(ANFImage.sizePresets.LARGE, ANFImage.sizePolicies.LARGE); 31996 31997 /** 31998 * Retrieves the image's extra large url based off the ANFImage instance 31999 * @memberOf ANFImage 32000 * @returns {string} url 32001 */ 32002 ANFImage.prototype.getExtraLargeUrl = getUrlBySizeFN(ANFImage.sizePresets.EXTRA_LARGE, ANFImage.sizePolicies.EXTRA_LARGE); 32003 32004 32005 /** 32006 * Get a new instance of AMFImage. Takes same parameters as the constructor 32007 * @static 32008 * @memberOf ANFImage 32009 * @returns {ANFImage} ANFImage instance 32010 */ 32011 ANFImage.instance = function instance() { 32012 var ANFImageInstance = Object.create(ANFImage.prototype); 32013 ANFImage.apply(ANFImageInstance, arguments); 32014 return ANFImageInstance; 32015 }; 32016 32017 return ANFImage; 32018}); 32019 32020redesign.define('wcsHelper/getSrcUrl',[ 32021 'handlebars', 32022 'coreClass/ANFImage' 32023], function helper( 32024 handlebars, 32025 ANFImage 32026) { 32027 'use strict'; 32028 32029 function getImageUrl(imageId) { 32030 return ANFImage.instance() 32031 .setImageName(imageId) 32032 .setWidth(70) 32033 .url; 32034 } 32035 32036 handlebars.registerHelper('getSrcUrl', function registerHelperCallback(product) { 32037 return getImageUrl(product.imageId); 32038 }); 32039}); 32040 32041redesign.define('wcsHelper/gridFacetTileSize',[ 32042 'handlebars' 32043], function helpers(Handlebars) { 32044 'use strict'; 32045 32046 var largeFacets = [ 32047 'ads_f43001_ntk_cs', 32048 'ads_f43002_ntk_cs', 32049 'ads_f43003_ntk_cs', 32050 'colorFamily' 32051 ]; 32052 32053 Handlebars.registerHelper('gridFacetTileSize', function gridFacetTileSize(facetId) { 32054 return (largeFacets.indexOf(facetId) > -1) 32055 ? 'large' 32056 : 'xl'; 32057 }); 32058}); 32059 32060redesign.define('wcsHelper/hasErrors',[ 32061 'handlebars' 32062], function helper( 32063 handlebars 32064) { 32065 'use strict'; 32066 handlebars.registerHelper('hasErrors', function helperFn(options) {
32067 var validationObject = options.data.root.validation; 32068 var errorTypes = (options.hash.type) ? options.hash.type.split(' ') : []; 32069 var errorKeys = (options.hash.errorKey) ? options.hash.errorKey.split(' ') : []; 32070 var hasValidationObject = (typeof validationObject !== 'undefined' && typeof validationObject === 'object' && validationObject !== null) ? true : false; 32071 var hasInvalidFields = (hasValidationObject && (typeof validationObject.invalidFields !== 'undefined' && validationObject.invalidFields instanceof Array && validationObject.invalidFields.length > 0)) ? true : false; 32072 var isValidationValid = (hasValidationObject && typeof validationObject.valid !== 'undefined') ? validationObject.valid : true; 32073 var hasErrors = (isValidationValid === false && hasInvalidFields === true) ? true : false; 32074 var foundItems = null; 32075 32076 if (hasErrors === true) { 32077 if (hasInvalidFields && (errorTypes.length || errorKeys.length)) { 32078 foundItems = $.grep(validationObject.invalidFields, function grepHandler(invalidErrorField) { 32079 return (!errorTypes.length || errorTypes.indexOf(invalidErrorField.type) > -1) && (!errorKeys.length || errorKeys.indexOf(invalidErrorField.message.errorKey) > -1); 32080 }); 32081 32082 if (foundItems.length > 0) { 32083 return options.fn(foundItems); 32084 } 32085 return options.inverse(this); 32086 } 32087 return options.fn(this); 32088 } 32089 return options.inverse(this); 32090 }); 32091}); 32092 32093redesign.define('wcsHelper/hasMultipleCountries',[ 32094 'handlebars' 32095], function helper( 32096 handlebars 32097) { 32098 'use strict'; 32099 handlebars.registerHelper('hasMultipleCountries', function helperFn(options) { 32100 var displayType = (options.hash.displayType) ? handlebars.escapeExpression(options.hash.displayType) + 'Country' : null; 32101 var config = options.data.root.config; 32102 var listOfValidCountries = (config && config.countries) ? _.filter(config.countries, function (country) { 32103 return country[displayType] === true; 32104 }) : []; 32105 32106 if (listOfValidCountries.length > 1) { 32107 return options.fn(this); 32108 } 32109 return options.inverse(this); 32110 }); 32111}); 32112 32113 32114redesign.define('polyfill/Array/from',[], function () { 32115 "use strict"; 32116 32117 // Production steps of ECMA-262, Edition 6, 22.1.2.1 32118 if (!Array.from) { 32119 Array.from = (function () { 32120 var toStr = Object.prototype.toString; 32121 var isCallable = function (fn) { 32122 return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; 32123 }; 32124 var toInteger = function (value) { 32125 var number = Number(value); 32126 if (isNaN(number)) { return 0; } 32127 if (number === 0 || !isFinite(number)) { return number; } 32128 return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); 32129 }; 32130 var maxSafeInteger = Math.pow(2, 53) - 1; 32131 var toLength = function (value) { 32132 var len = toInteger(value); 32133 return Math.min(Math.max(len, 0), maxSafeInteger); 32134 }; 32135 32136 // The length property of the from method is 1. 32137 return function from(arrayLike/*, mapFn, thisArg */) { 32138 // 1. Let C be the this value. 32139 var C = this; 32140 32141 // 2. Let items be ToObject(arrayLike). 32142 var items = Object(arrayLike); 32143 32144 // 3. ReturnIfAbrupt(items). 32145 if (arrayLike == null) { 32146 throw new TypeError('Array.from requires an array-like object - not null or undefined'); 32147 } 32148 32149 // 4. If mapfn is undefined, then let mapping be false. 32150 var mapFn = arguments.length > 1 ? arguments[1] : void undefined; 32151 var T; 32152 if (typeof mapFn !== 'undefined') { 32153 // 5. else 32154 // 5. a If IsCallable(mapfn) is false, throw a TypeError exception. 32155 if (!isCallable(mapFn)) { 32156 throw new TypeError('Array.from: when provided, the second argument must be a function'); 32157 } 32158 32159 // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined. 32160 if (arguments.length > 2) { 32161 T = arguments[2]; 32162 } 32163 } 32164 32165 // 10. Let lenValue be Get(items, "length"). 32166 // 11. Let len be ToLength(lenValue). 32167 var len = toLength(items.length); 32168 32169 // 13. If IsConstructor(C) is true, then 32170 // 13. a. Let A be the result of calling the [[Construct]] internal method 32171 // of C with an argument list containing the single item len. 32172 // 14. a. Else, Let A be ArrayCreate(len). 32173 var A = isCallable(C) ? Object(new C(len)) : new Array(len); 32174 32175 // 16. Let k be 0. 32176 var k = 0; 32177 // 17. Repeat, while k < len… (also steps a - h) 32178 var kValue; 32179 while (k < len) { 32180 kValue = items[k]; 32181 if (mapFn) { 32182 A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); 32183 } else { 32184 A[k] = kValue; 32185 } 32186 k += 1; 32187 } 32188 // 18. Let putStatus be Put(A, "length", len, true). 32189 A.length = len; 32190 // 20. Return A. 32191 return A; 32192 }; 32193 }()); 32194 } 32195 32196 return Array.from; 32197 32198}); 32199redesign.define('wcsHelper/i18n',[ 32200 'handlebars', 32201 'anfUtil/constants', 32202 '!polyfill/Array/from', 32203 '!polyfill/Object/assign' 32204], function i18n(handlebars, coreConstants) { 32205 'use strict'; 32206 32207 function argsToIndexedMapReducer(acc, value, index) { 32208 var newIndexValue = {}; 32209 newIndexValue[index.toString()] = value; 32210 return Object.assign({}, acc, newIndexValue); 32211 } 32212 32213 handlebars.registerHelper('i18n', function helperFn() { 32214 var argMap; 32215 var args; 32216 var i18nKey; 32217 var options; 32218 var replacementMap; 32219 32220 args = Array.from(arguments); 32221 i18nKey = args.shift(); 32222 options = $.extend(true, {}, args.pop()); 32223 argMap = args.reduce(argsToIndexedMapReducer, {}); 32224 32225 replacementMap = Object.assign({}, argMap, options.hash); 32226 return coreConstants.i18n(i18nKey, replacementMap, options.replaceMissingPlaceholders); 32227 }); 32228}); 32229 32230redesign.define('wcsHelper/isLoggedIn',[ 32231 'handlebars' 32232], function helper( 32233 handlebars 32234) { 32235 'use strict'; 32236 handlebars.registerHelper('isLoggedIn', function helperFn(options) { 32237 if ($('body').attr('data-loggedin') === 'true') { 32238 return options.fn(this); 32239 } 32240 return options.inverse(this); 32241 }); 32242}); 32243 32244redesign.define('wcsHelper/isSiteRegion',[ 32245 'handlebars' 32246], function helper( 32247 handlebars 32248) { 32249 'use strict'; 32250 handlebars.registerHelper('isSiteRegion', function helperFn(pipeDelimitedCountries) { 32251 var regionFilter = function regionFilter(regionCode) {
32252 return ANF.params.storeAttributes.siteList['is' + regionCode + 'Site']; 32253 }; 32254 var isRegionCodes = (pipeDelimitedCountries) ? handlebars.escapeExpression(pipeDelimitedCountries).split('|') : []; 32255 var isRegionWasFound = !!_.find(isRegionCodes, regionFilter); 32256 32257 return !isRegionCodes.length || isRegionWasFound; 32258 }); 32259}); 32260 32261redesign.define('checkoutModules/V3/helpers/constants',[],function constants() { 32262 'use strict'; 32263 32264 var publicMembers = { 32265 'addressTypes': { 32266 'homeDelivery': ['SB', 'S', 'B'], 32267 'popins': ['P'], 32268 'pudos': ['CP'], 32269 'billing': ['B'] 32270 }, 32271 'addressTypesLowerCase': { 32272 'homedelivery': 'SB', 32273 'popins': 'P', 32274 'pudos': 'CP', 32275 'billing': 'B', 32276 'getitbychristmas': 'SB', 32277 'directtodesk': 'SB' 32278 }, 32279 'addressTypeMap': { 32280 'SB': 'homeDelivery', 32281 'S': 'homeDelivery', 32282 'B': 'homeDelivery', 32283 'P': 'popins', 32284 'CP': 'pudos' 32285 }, 32286 'brandCodes': { 32287 'anf': 'anf', 32288 'acf': 'anf', 32289 'gh': 'gh', 32290 'hco': 'hol', 32291 'hol': 'hol', 32292 'kid': 'kids', 32293 'kids': 'kids' 32294 }, 32295 'siteCountry': ANF.params.storeAttributes.countryFromIP || ANF.params.storeAttributes.country, 32296 'shipModeIds': { 32297 'popins': ['22158', '22208'], 32298 'pudos': ['20808', '23258'] 32299 }, 32300 'defaultState': function defaultState(country) { 32301 var state = null; 32302 32303 if (country === 'US') { 32304 state = (ANF.params && ANF.params.env && ANF.params.env.isHollister) ? 'CA' : 'NY'; 32305 } else if (country === 'CA') { 32306 state = 'AB'; 32307 } 32308 return state; 32309 }, 32310 'sanitizeBrand': function sanitizeBrand(brand) { 32311 return this.brandCodes[brand.toLowerCase()]; 32312 }, 32313 'defaultCardPayment': function defaultCardPayment() { 32314 return { 32315 paymentCode: '021', 32316 paymentId: 'credit-card', 32317 paymentType: 'credit card' 32318 }; 32319 }, 32320 'defaultGiftcardPayment': function defaultGiftcardPayment() { 32321 return { 32322 paymentCode: 'gift-card', 32323 paymentId: 'gift-card', 32324 paymentType: 'gift card' 32325 }; 32326 } 32327 }; 32328 32329 return publicMembers; 32330}); 32331 32332redesign.define('wcsHelper/isValidCardBrand',[ 32333 'handlebars', 32334 'checkoutModules/V3/helpers/constants' 32335], function helper( 32336 handlebars, 32337 constants 32338) { 32339 'use strict'; 32340 32341 handlebars.registerHelper('isValidCardBrand', function helperFn(cardBrand, orderTotal) { 32342 var siteCountry = (constants.siteCountry === 'UK') ? 'GB' : constants.siteCountry; 32343 var currentPaymentInfoFn; 32344 var cardBrandFn = _.propertyOf(cardBrand); 32345 // As per the config API, if the countries array is empty, then the payment method is valid for all countries. 32346 // If it is not empty, then it is only valid for the country codes in the array. 32347 if (cardBrandFn('countries') && (cardBrandFn('countries').length === 0 || cardBrandFn('countries').indexOf(siteCountry) !== -1)) { 32348 if (cardBrandFn('visibility') && cardBrandFn('visibility').countrySpecificPaymentInfo) { 32349 currentPaymentInfoFn = _.propertyOf(_.findWhere(cardBrand.visibility.countrySpecificPaymentInfo, { 'country': siteCountry })); 32350 32351 return !(currentPaymentInfoFn('orderTotalLimit') && currentPaymentInfoFn('orderTotalLimit') < orderTotal); 32352 } 32353 return true; 32354 } 32355 return false; 32356 }); 32357}); 32358 32359redesign.define('wcsHelper/moduleState',[ 32360 'handlebars' 32361], function helper( 32362 handlebars 32363) { 32364 'use strict'; 32365 handlebars.registerHelper('moduleState', function helperFn(options) { 32366 var currentModuleState = options.data.root.moduleState; 32367 var expectedModuleState = handlebars.escapeExpression(options.hash.is); 32368 32369 if (currentModuleState === expectedModuleState) { 32370 return options.fn(this); 32371 } 32372 return options.inverse(this); 32373 }); 32374}); 32375 32376redesign.define('wcsHelper/ne',[ 32377 'handlebars' 32378], function helper( 32379 handlebars 32380) { 32381 'use strict'; 32382 handlebars.registerHelper('ne', function helperFn(v1, v2) { 32383 return v1 !== v2; 32384 }); 32385}); 32386 32387redesign.define('wcsHelper/notEmptyString',[ 32388 'handlebars', 32389 'anfUtil/testFramework' 32390], function helper( 32391 handlebars, 32392 test 32393) { 32394 'use strict'; 32395 handlebars.registerHelper('notEmptyString', function helperFn(value) { 32396 if (test.object.not.empty(value, false)) return value; 32397 if (test.string.not.empty(value, false)) return value; 32398 return ''; 32399 }); 32400}); 32401 32402redesign.define('wcsHelper/or',[ 32403 'handlebars' 32404], function helper( 32405 handlebars 32406) { 32407 'use strict'; 32408 handlebars.registerHelper('or', function helperFn() { 32409 return Array.prototype.slice.call(arguments, 0, -1).some(Boolean); 32410 }); 32411}); 32412 32413redesign.define('wcsHelper/repudiationItemsToRemove',[ 32414 'handlebars' 32415], function helper( 32416 handlebars 32417) { 32418 'use strict'; 32419 handlebars.registerHelper('repudiationItemsToRemove', function helperFn(options) { 32420 var items = (options && options.hash && options.hash.items) ? options.hash.items : []; 32421 var itemsToRemoveString = ''; 32422 var index = items.length - 1; 32423 32424 for (; index >= 0; index -= 1) { 32425 itemsToRemoveString += items[index].orderItemId || items[index].itemToRemove; 32426 32427 if (index > 0) { 32428 itemsToRemoveString += ','; 32429 } 32430 } 32431 32432 return new handlebars.SafeString(encodeURIComponent(itemsToRemoveString)); 32433 }); 32434}); 32435 32436redesign.define('wcsHelper/sanitize',[ 32437 'handlebars' 32438], function sanitize(Handlebars) { 32439 'use strict'; 32440 32441 Handlebars.registerHelper('sanitize', function helper(text) { 32442 return text.replace('&', '&').replace('"', '"'); 32443 }); 32444}); 32445 32446redesign.define('wcsHelper/sanitizeFacetName',[ 32447 'handlebars' 32448], function helpers(Handlebars) { 32449 'use strict'; 32450 Handlebars.registerHelper('sanitizeFacetName', function sanitizeFacetName(str) { 32451 return str.replace(/\W+/g, '-').toLowerCase(); 32452 }); 32453}); 32454 32455redesign.define('wcsHelper/selectedDeliveryMethod',[ 32456 'handlebars', 32457 'checkoutModules/V3/helpers/constants' 32458], function helper( 32459 handlebars, 32460 constants 32461) { 32462 'use strict'; 32463 /** 32464 * Helper to conditionally control rendering based on selected delivery method. 32465 * Uses addresses["<selected address"].addressType from cart model to determine selected delivery method. 32466 * 32467 * Template syntax for this helper: 32468 * {{#selectedDeliveryMethod is="<expected delivery method>"}} 32469 * {{/selectedDeliveryMethod}}
32470 * Example: 32471 * {{#selectedDeliveryMethod is="HOME"}} 32472 * {{/selectedDeliveryMethod}} 32473 */ 32474 handlebars.registerHelper('selectedDeliveryMethod', function helperFn(options) { 32475 var deliveryMethod = _.propertyOf(constants.addressTypeMap)(options.data.root.addresses[options.data.root.addresses.activeShippingAddress].addressType); 32476 var expectedDeliveryMethod = handlebars.escapeExpression(options.hash.is); 32477 var isHomeDelivery = (expectedDeliveryMethod === 'HOME' && deliveryMethod === 'homeDelivery') || options.data.root.shipMethod && options.data.root.shipMethod.shipModeType === 'SameDayDelivery'; 32478 var isAltDelivery = (expectedDeliveryMethod === 'PICKUP_POINT' && (deliveryMethod === 'popins' || deliveryMethod === 'pudos')); 32479 var isExpectedMethod = isHomeDelivery || isAltDelivery; 32480 32481 if (isExpectedMethod) { 32482 return options.fn(this); 32483 } 32484 return options.inverse(this); 32485 }); 32486}); 32487 32488redesign.define('wcsHelper/siteCountry',[ 32489 'handlebars', 32490 'checkoutModules/V3/helpers/constants' 32491], function helper( 32492 handlebars, 32493 constants 32494) { 32495 'use strict'; 32496 handlebars.registerHelper('siteCountry', function helperFn(options) { 32497 var isCountryCodes = (options.hash.is) ? handlebars.escapeExpression(options.hash.is) : ''; 32498 var notCountryCodes = (options.hash.not) ? handlebars.escapeExpression(options.hash.not) : ''; 32499 var siteCountry = (constants.siteCountry === 'UK') ? 'GB' : constants.siteCountry; 32500 32501 if ((!isCountryCodes || isCountryCodes.indexOf(siteCountry) !== -1) && (!notCountryCodes || notCountryCodes.indexOf(siteCountry) === -1)) { 32502 return options.fn(this); 32503 } 32504 return options.inverse(this); 32505 }); 32506}); 32507 32508redesign.define('wcsHelper/siteRegion',[ 32509 'handlebars' 32510], function helper( 32511 handlebars 32512) { 32513 'use strict'; 32514 32515 /** 32516 * Helper to conditionally control rendering based on site region. 32517 * Site regions are: US, CA, UK, EU, & WD 32518 * 32519 * Example template syntax for this helper: 32520 * {{#siteRegion is="<pipe separated expected site regions>"}} 32521 * {{/siteRegion}} 32522 * 32523 * or 32524 * 32525 * {{#siteRegion not="<pipe separated expected site regions>"}} 32526 * {{/siteRegion}} 32527 * 32528 * Example: 32529 * {{#siteRegion is="US|WD"}} 32530 * {{/siteRegion}} 32531 * 32532 * or 32533 * 32534 * {{#siteRegion not="EU|UK"}} 32535 * {{/siteRegion}} 32536 */ 32537 handlebars.registerHelper('siteRegion', function helperFn(options) { 32538 var regionFilter = function regionFilter(regionCode) { 32539 return ANF.params.storeAttributes.siteList['is' + regionCode + 'Site']; 32540 }; 32541 var isRegionCodes = (options.hash.is) ? handlebars.escapeExpression(options.hash.is).split('|') : []; 32542 var notRegionCodes = (options.hash.not) ? handlebars.escapeExpression(options.hash.not).split('|') : []; 32543 var isRegionWasFound = !!_.find(isRegionCodes, regionFilter); 32544 var notRegionWasFound = !!_.find(notRegionCodes, regionFilter); 32545 32546 if ((!isRegionCodes.length || isRegionWasFound) && (!notRegionCodes.length || !notRegionWasFound)) { 32547 return options.fn(this); 32548 } 32549 return options.inverse(this); 32550 }); 32551}); 32552 32553redesign.define('wcsHelper/sizeGuide_formatMeasurementUnit',[ 32554 'handlebars' 32555], function helper( 32556 handlebars 32557) { 32558 'use strict'; 32559 handlebars.registerHelper('sizeGuide_formatMeasurementUnit', function formatMeasurementUnit(unit) { 32560 if (unit.indexOf('in') !== -1) { 32561 return '(in)'; 32562 } 32563 32564 if (unit.indexOf('cm') !== -1) { 32565 return '(cm)'; 32566 } 32567 32568 return ''; 32569 }); 32570}); 32571 32572redesign.define('wcsHelper/sizeGuide_tableCellClassNames',[ 32573 'handlebars' 32574], function helper( 32575 handlebars 32576) { 32577 'use strict'; 32578 handlebars.registerHelper('sizeGuide_tableCellClassNames', function tableCellClassNames(unit, country, defaultRegion) { 32579 var classes = ''; 32580 if (country.length > 0) { 32581 if (defaultRegion === country.toLowerCase()) { 32582 classes = 'selected'; 32583 } 32584 32585 return classes + ' size-guide__country-column size-guide__country-' + country; 32586 } 32587 32588 if (unit.indexOf('in') !== -1 || unit.indexOf('lb') !== -1) { 32589 return 'size-guide__inch-column'; 32590 } 32591 32592 if (unit.indexOf('cm') !== -1 || unit.indexOf('kg') !== -1) { 32593 return 'size-guide__centimeter-column'; 32594 } 32595 32596 return ''; 32597 });}); 32598 32599redesign.define('wcsHelper/sizeGuide_zipRowData',[ 32600 'handlebars' 32601], function helper( 32602 handlebars 32603) { 32604 'use strict'; 32605 handlebars.registerHelper('sizeGuide_zipRowData', function zipRowData(types) { 32606 function zipValuesReducer(acc, type) { 32607 var i; 32608 for (i = 0; i <= type.values.length - 1; i++) { 32609 if (!acc[i]) { 32610 acc[i] = []; 32611 } 32612 32613 acc[i].push({ 32614 value: type.values[i], 32615 country: type.country, 32616 unit: type.unit 32617 }); 32618 } 32619 32620 return acc; 32621 } 32622 32623 return types.reduce(zipValuesReducer, []); 32624 }); 32625}); 32626 32627redesign.define('wcsHelper/standardUrlParams',[ 32628 'handlebars' 32629], function helper( 32630 handlebars 32631) { 32632 'use strict'; 32633 handlebars.registerHelper('standardUrlParams', function helperFn() { 32634 var storeId = ANF.params.storeAttributes.idList.storeId; 32635 var langId = ANF.params.storeAttributes.idList.langId; 32636 var catalogId = ANF.params.storeAttributes.idList.catalogId; 32637 32638 return new handlebars.SafeString('?storeId=' + storeId + '&langId=' + langId + '&catalogId=' + catalogId); 32639 }); 32640}); 32641 32642redesign.define('coreServices/i18nHandlebarsHelper',[ 32643 'handlebars', 32644 'anfUtil/testFramework', 32645 'anfUtil/constants', 32646 '!polyfill/Array/from', 32647 '!polyfill/Object/assign' 32648], function i18n(handlebars, test, coreConstants) { 32649 'use strict'; 32650 32651 function argsToIndexedMapReducer(acc, value, index) { 32652 var newIndexValue = {}; 32653 newIndexValue[index.toString()] = value; 32654 return Object.assign({}, acc, newIndexValue); 32655 } 32656 32657 return { 32658 'helperName': 'i18n', 32659 'fn': function fn() { 32660 var argMap; 32661 var args; 32662 var i18nKey; 32663 var options; 32664 var replacementMap; 32665 32666 args = Array.from(arguments); 32667 i18nKey = args.shift(); 32668 options = $.extend(true, {}, args.pop()); 32669 argMap = args.reduce(argsToIndexedMapReducer, {}); 32670 32671 replacementMap = Object.assign({}, argMap, options.hash); 32672 return coreConstants.i18n(i18nKey, replacementMap, options.replaceMissingPlaceholders); 32673 } 32674 }; 32675}); 32676 32677redesign.define('coreServices/tmntHandleBarsHelper',[ 32678 'coreServices/i18nHandlebarsHelper', 32679 '!polyfill/Array/from' 32680], function baseTMNTHelper(i18nHandleBarsHelper) { 32681 'use strict'; 32682 32683 return function getTMNTHelperByArea(messagingContext, replaceMissingPlaceholders) { 32684 var myOptions = { 32685 replaceMissingPlaceholders: replaceMissingPlaceholders 32686 }; 32687 return function tmntHelper() { 32688 var args = Array.from(arguments); 32689 var context = args.shift(); 32690 var i18nArguments = []; 32691 var newContext = {}; 32692 var options = $.extend(true, {}, myOptions, args.pop()); 32693 32694 i18nArguments = i18nArguments.concat( 32695 messagingContext.concat('.', context, '.value'), 32696 args, 32697 [options] 32698 ); 32699 32700 newContext.key = context; 32701 newContext.value = i18nHandleBarsHelper.fn.apply(this, i18nArguments); 32702 32703 // returns the handlebar expression, or the single TMNT value 32704 return (options.fn) ? options.fn(newContext) : newContext.value; 32705 }; 32706 }; 32707}); 32708 32709redesign.define('wcsHelper/tmntAccount',[ 32710 'handlebars', 32711 'coreServices/tmntHandleBarsHelper' 32712], function helper( 32713 handlebars, 32714 getTMNTHelper 32715) { 32716 'use strict'; 32717 handlebars.registerHelper('tmntAccount', getTMNTHelper('account.TMNT', true)); 32718}); 32719 32720redesign.define('wcsHelper/tmntCatalog',[ 32721 'handlebars', 32722 'coreServices/tmntHandleBarsHelper' 32723], function helpers( 32724 handlebars, 32725 getTMNTHelper) { 32726 'use strict'; 32727 32728 handlebars.registerHelper('tmntCatalog', getTMNTHelper('catalogV2.TMNT')); 32729}); 32730 32731redesign.define('wcsHelper/tmntCheckout',[ 32732 'handlebars', 32733 'coreServices/tmntHandleBarsHelper' 32734], function helper( 32735 handlebars, 32736 getTMNTHelper 32737) { 32738 'use strict'; 32739 handlebars.registerHelper('tmntCheckout', getTMNTHelper('checkout.TMNT', true)); 32740}); 32741 32742redesign.define('wcsHelper/tmntGlobal',[ 32743 'handlebars', 32744 'coreServices/tmntHandleBarsHelper' 32745], function helper( 32746 handlebars, 32747 getTMNTHelper 32748) { 32749 'use strict'; 32750 handlebars.registerHelper('tmntGlobal', getTMNTHelper('global.TMNT', true)); 32751}); 32752 32753redesign.define('wcsHelper/tmntProduct',[ 32754 'handlebars', 32755 'coreServices/tmntHandleBarsHelper' 32756], function helpers(Handlebars, getTMNTHelper) { 32757 'use strict'; 32758 Handlebars.registerHelper('tmntProduct', getTMNTHelper('product.TMNT')); 32759}); 32760 32761redesign.define('wcsHelper/toLowerCase',[ 32762 'handlebars' 32763], function helper( 32764 handlebars 32765) { 32766 'use strict'; 32767 handlebars.registerHelper('toLowerCase', function helperFn(str) { 32768 return str.toLowerCase(); 32769 }); 32770}); 32771 32772redesign.define('dsPartial/helpers/class-list',['handlebars'], function(Handlebars) { 32773 32774this["ANF"] = this["ANF"] || {}; 32775this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32776 32777Handlebars.registerPartial("helpers/class-list", this["ANF"]["templates"]["helpers/class-list"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32778 return " " 32779 + container.escapeExpression(container.lambda(depth0, depth0)) 32780 + "\n"; 32781},"3":function(container,depth0,helpers,partials,data) { 32782 return container.escapeExpression(container.lambda((depth0 != null ? depth0["class-list"] : depth0), depth0)); 32783},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32784 var stack1; 32785 32786 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["class-list"] : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : ""); 32787},"useData":true})); 32788 32789return this["ANF"]; 32790 32791}); 32792redesign.define('dsPartial/helpers/theme',['handlebars'], function(Handlebars) { 32793 32794this["ANF"] = this["ANF"] || {}; 32795this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32796 32797Handlebars.registerPartial("helpers/theme", this["ANF"]["templates"]["helpers/theme"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32798 return "data-theme=\"" 32799 + container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)) 32800 + "\""; 32801},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32802 var stack1; 32803
32804 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 32805 + "\n"; 32806},"useData":true})); 32807 32808return this["ANF"]; 32809 32810}); 32811redesign.define('dsPartial/error-message',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/theme'], function(Handlebars) { 32812 32813this["ANF"] = this["ANF"] || {}; 32814this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32815 32816Handlebars.registerPartial("error-message", this["ANF"]["templates"]["error-message"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32817 return "data-variant=\"" 32818 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 32819 + "\""; 32820},"3":function(container,depth0,helpers,partials,data) { 32821 var stack1; 32822 32823 return ((stack1 = container.lambda((depth0 != null ? depth0["error-message-text"] : depth0), depth0)) != null ? stack1 : ""); 32824},"5":function(container,depth0,helpers,partials,data) { 32825 return ""; 32826},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32827 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 32828 32829 return "<div role=\"alert\" id=\"" 32830 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 32831 + "-error-message\"\n class=\"error-message js-error-message " 32832 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 32833 + "\" tabindex=\"-1\"\n" 32834 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 32835 + " " 32836 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 32837 + ">\n " 32838 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["error-message-text"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 32839 + "\n " 32840 + ((stack1 = container.invokePartial(partials["error-message-partial"],depth0,{"name":"error-message-partial","fn":container.program(5, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 32841 + "\n</div>\n"; 32842},"usePartial":true,"useData":true})); 32843 32844return this["ANF"]; 32845 32846}); 32847redesign.define('dsPartial/field-group',['handlebars','dsHelper/requiredValue','dsPartial/helpers/class-list','dsPartial/error-message'], function(Handlebars) { 32848 32849this["ANF"] = this["ANF"] || {}; 32850this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32851 32852Handlebars.registerPartial("field-group", this["ANF"]["templates"]["field-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32853 var stack1; 32854 32855 return " <fieldset class=\"field-group js-field-group " 32856 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 32857 + "\" " 32858 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 32859 + ">\n" 32860 + ((stack1 = container.invokePartial(partials["custom-legend"],depth0,{"name":"custom-legend","fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 32861 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 32862 + ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 32863 + " </fieldset>\n"; 32864},"2":function(container,depth0,helpers,partials,data) { 32865 return "aria-invalid=\"true\""; 32866},"4":function(container,depth0,helpers,partials,data) { 32867 return " <legend class=\"screen-reader-text\">" 32868 + container.escapeExpression(container.lambda((depth0 != null ? depth0.label : depth0), depth0)) 32869 + "</legend>\n"; 32870},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32871 var stack1; 32872 32873 return ((stack1 = helpers.requiredValue.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.label : depth0),{"name":"requiredValue","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 32874},"usePartial":true,"useData":true})); 32875 32876return this["ANF"]; 32877 32878}); 32879redesign.define('dsPartial/helpers/autocomplete',['handlebars'], function(Handlebars) { 32880 32881this["ANF"] = this["ANF"] || {}; 32882this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32883 32884Handlebars.registerPartial("helpers/autocomplete", this["ANF"]["templates"]["helpers/autocomplete"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32885 var alias1=container.lambda, alias2=container.escapeExpression; 32886 32887 return " autocomplete=\"" 32888 + alias2(alias1((depth0 != null ? depth0.autocomplete : depth0), depth0)) 32889 + "\" x-autocompletetype=\"" 32890 + alias2(alias1((depth0 != null ? depth0.autocomplete : depth0), depth0)) 32891 + "\" "; 32892},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32893 var stack1; 32894
32895 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.autocomplete : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 32896},"useData":true})); 32897 32898return this["ANF"]; 32899 32900}); 32901redesign.define('dsPartial/helpers/data-prop',['handlebars'], function(Handlebars) { 32902 32903this["ANF"] = this["ANF"] || {}; 32904this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32905 32906Handlebars.registerPartial("helpers/data-prop", this["ANF"]["templates"]["helpers/data-prop"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32907 var stack1; 32908 32909 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["data-prop"] : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); 32910},"2":function(container,depth0,helpers,partials,data) { 32911 var alias1=container.lambda, alias2=container.escapeExpression; 32912 32913 return " data-" 32914 + alias2(alias1((data && data.key), depth0)) 32915 + "=\"" 32916 + alias2(alias1(depth0, depth0)) 32917 + "\"\n"; 32918},"4":function(container,depth0,helpers,partials,data) { 32919 var stack1; 32920 32921 return " " 32922 + ((stack1 = container.lambda((depth0 != null ? depth0["data-prop"] : depth0), depth0)) != null ? stack1 : "") 32923 + "\n"; 32924},"6":function(container,depth0,helpers,partials,data) { 32925 var stack1; 32926 32927 return ((stack1 = container.invokePartial(helpers.lookup.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,"inline-prop",{"name":"lookup","hash":{},"data":data}),depth0,{"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 32928},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32929 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 32930 32931 return ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["data-prop"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 32932 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["inline-prop"] : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 32933},"usePartial":true,"useData":true})); 32934 32935return this["ANF"]; 32936 32937}); 32938redesign.define('dsPartial/helpers/data-filled',['handlebars'], function(Handlebars) { 32939 32940this["ANF"] = this["ANF"] || {}; 32941this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32942 32943Handlebars.registerPartial("helpers/data-filled", this["ANF"]["templates"]["helpers/data-filled"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32944 return " data-filled=\"true\""; 32945},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32946 var stack1; 32947 32948 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.value : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 32949},"useData":true})); 32950 32951return this["ANF"]; 32952 32953}); 32954redesign.define('dsPartial/helpers/disabled',['handlebars'], function(Handlebars) { 32955 32956this["ANF"] = this["ANF"] || {}; 32957this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32958 32959Handlebars.registerPartial("helpers/disabled", this["ANF"]["templates"]["helpers/disabled"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32960 return " disabled aria-disabled=\"true\""; 32961},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32962 var stack1; 32963 32964 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.disabled : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 32965 + "\n"; 32966},"useData":true})); 32967 32968return this["ANF"]; 32969 32970}); 32971redesign.define('dsPartial/helpers/invalid',['handlebars'], function(Handlebars) { 32972 32973this["ANF"] = this["ANF"] || {}; 32974this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32975 32976Handlebars.registerPartial("helpers/invalid", this["ANF"]["templates"]["helpers/invalid"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32977 return " aria-invalid=\"true\"\n"; 32978},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32979 var stack1; 32980
32981 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 32982},"useData":true})); 32983 32984return this["ANF"]; 32985 32986}); 32987redesign.define('dsPartial/helpers/name',['handlebars'], function(Handlebars) { 32988 32989this["ANF"] = this["ANF"] || {}; 32990this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 32991 32992Handlebars.registerPartial("helpers/name", this["ANF"]["templates"]["helpers/name"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 32993 return " name=\"" 32994 + container.escapeExpression(container.lambda((depth0 != null ? depth0.name : depth0), depth0)) 32995 + "\"\n"; 32996},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 32997 var stack1; 32998 32999 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.name : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33000},"useData":true})); 33001 33002return this["ANF"]; 33003 33004}); 33005redesign.define('dsPartial/helpers/required',['handlebars'], function(Handlebars) { 33006 33007this["ANF"] = this["ANF"] || {}; 33008this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33009 33010Handlebars.registerPartial("helpers/required", this["ANF"]["templates"]["helpers/required"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33011 return " required aria-required=\"true\""; 33012},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33013 var stack1; 33014 33015 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33016 + "\n"; 33017},"useData":true})); 33018 33019return this["ANF"]; 33020 33021}); 33022redesign.define('dsPartial/drop-down',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/theme','dsPartial/helpers/autocomplete','dsPartial/helpers/data-prop','dsPartial/helpers/data-filled','dsPartial/helpers/disabled','dsPartial/helpers/invalid','dsPartial/helpers/name','dsPartial/helpers/required','dsHelper/is','dsPartial/error-message'], function(Handlebars) { 33023 33024this["ANF"] = this["ANF"] || {}; 33025this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33026 33027Handlebars.registerPartial("drop-down", this["ANF"]["templates"]["drop-down"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33028 return "data-brand=\"" 33029 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 33030 + "\""; 33031},"3":function(container,depth0,helpers,partials,data) { 33032 return " aria-describedby=\"" 33033 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 33034 + "-error-message\""; 33035},"5":function(container,depth0,helpers,partials,data) { 33036 return " <option label=\" \" disabled selected></option>\n"; 33037},"7":function(container,depth0,helpers,partials,data,blockParams,depths) { 33038 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 33039 33040 return " <option value=\"" 33041 + alias2(alias1((depth0 != null ? depth0.value : depth0), depth0)) 33042 + "\"" 33043 + ((stack1 = helpers.is.call(depth0 != null ? depth0 : (container.nullContext || {}),(depths[1] != null ? depths[1].value : depths[1]),(depth0 != null ? depth0.value : depth0),{"name":"is","hash":{},"fn":container.program(8, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33044 + ">" 33045 + alias2(alias1((depth0 != null ? depth0.title : depth0), depth0)) 33046 + "</option>\n"; 33047},"8":function(container,depth0,helpers,partials,data) { 33048 return " selected"; 33049},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 33050 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 33051 33052 return "<div class=\"drop-down js-drop-down " 33053 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33054 + "\"\n " 33055 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33056 + "\n " 33057 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33058 + ">\n <select\n" 33059 + ((stack1 = container.invokePartial(partials["helpers/autocomplete"],depth0,{"name":"helpers/autocomplete","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33060 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33061 + ((stack1 = container.invokePartial(partials["helpers/data-filled"],depth0,{"name":"helpers/data-filled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33062 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33063 + ((stack1 = container.invokePartial(partials["helpers/invalid"],depth0,{"name":"helpers/invalid","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33064 + ((stack1 = container.invokePartial(partials["helpers/name"],depth0,{"name":"helpers/name","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33065 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33066 + " " 33067 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33068 + "\n id=\"" 33069 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 33070 + "\">\n" 33071 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.value : depth0),{"name":"unless","hash":{},"fn":container.program(5, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33072 + " <optgroup label=\"" 33073 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 33074 + "\">\n" 33075 + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.options : depth0),{"name":"each","hash":{},"fn":container.program(7, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33076 + " </optgroup>\n </select>\n <label class=\"placeholder\" for=\"" 33077 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 33078 + "\">\n " 33079 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 33080 + "\n </label>\n <span class=\"float-label\">" 33081 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 33082 + "</span>\n <span class=\"arrow-icon\" aria-hidden=\"true\"></span>\n" 33083 + ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33084 + "</div>\n"; 33085},"usePartial":true,"useData":true,"useDepths":true})); 33086 33087return this["ANF"]; 33088 33089}); 33090redesign.define('dsPartial/helpers/maxlength',['handlebars'], function(Handlebars) { 33091 33092this["ANF"] = this["ANF"] || {}; 33093this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33094 33095Handlebars.registerPartial("helpers/maxlength", this["ANF"]["templates"]["helpers/maxlength"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33096 return " maxlength=\"" 33097 + container.escapeExpression(container.lambda((depth0 != null ? depth0.maxlength : depth0), depth0)) 33098 + "\"\n"; 33099},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33100 var stack1; 33101
33102 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.maxlength : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33103},"useData":true})); 33104 33105return this["ANF"]; 33106 33107}); 33108redesign.define('dsPartial/helpers/readonly',['handlebars'], function(Handlebars) { 33109 33110this["ANF"] = this["ANF"] || {}; 33111this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33112 33113Handlebars.registerPartial("helpers/readonly", this["ANF"]["templates"]["helpers/readonly"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33114 return " readonly=\"" 33115 + container.escapeExpression(container.lambda((depth0 != null ? depth0.readonly : depth0), depth0)) 33116 + "\"\n"; 33117},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33118 var stack1; 33119 33120 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.readonly : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33121},"useData":true})); 33122 33123return this["ANF"]; 33124 33125}); 33126redesign.define('dsPartial/helpers/additional-attrs',['handlebars'], function(Handlebars) { 33127 33128this["ANF"] = this["ANF"] || {}; 33129this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33130 33131Handlebars.registerPartial("helpers/additional-attrs", this["ANF"]["templates"]["helpers/additional-attrs"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33132 var alias1=container.lambda, alias2=container.escapeExpression; 33133 33134 return " " 33135 + alias2(alias1((data && data.key), depth0)) 33136 + " = \"" 33137 + alias2(alias1(depth0, depth0)) 33138 + "\"\n"; 33139},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33140 var stack1; 33141 33142 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["additional-attrs"] : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33143},"useData":true})); 33144 33145return this["ANF"]; 33146 33147}); 33148redesign.define('dsPartial/input-field',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/theme','dsPartial/helpers/autocomplete','dsPartial/helpers/name','dsPartial/helpers/data-prop','dsPartial/helpers/disabled','dsPartial/helpers/invalid','dsPartial/helpers/maxlength','dsPartial/helpers/readonly','dsPartial/helpers/required','dsPartial/helpers/data-filled','dsPartial/helpers/additional-attrs','dsHelper/getId','dsPartial/error-message'], function(Handlebars) { 33149 33150this["ANF"] = this["ANF"] || {}; 33151this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33152 33153Handlebars.registerPartial("input-field", this["ANF"]["templates"]["input-field"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33154 return "data-brand=\"" 33155 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 33156 + "\""; 33157},"3":function(container,depth0,helpers,partials,data) { 33158 return " data-single-entry=\"true\""; 33159},"5":function(container,depth0,helpers,partials,data) { 33160 return " data-secondary-action=\"true\""; 33161},"7":function(container,depth0,helpers,partials,data) { 33162 return container.escapeExpression(container.lambda((depth0 != null ? depth0.type : depth0), depth0)); 33163},"9":function(container,depth0,helpers,partials,data) { 33164 return "text"; 33165},"11":function(container,depth0,helpers,partials,data) { 33166 return "role=\"" 33167 + container.escapeExpression(container.lambda((depth0 != null ? depth0.role : depth0), depth0)) 33168 + "\""; 33169},"13":function(container,depth0,helpers,partials,data) { 33170 return " aria-describedby=\"" 33171 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 33172 + "-error-message\""; 33173},"15":function(container,depth0,helpers,partials,data) { 33174 var stack1; 33175 33176 return ((stack1 = helpers.getId.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.id : depth0),{"name":"getId","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33177},"16":function(container,depth0,helpers,partials,data) { 33178 var alias1=container.lambda, alias2=container.escapeExpression; 33179 33180 return " id=\"" 33181 + alias2(alias1(depth0, depth0)) 33182 + "\">\n <label for=\"" 33183 + alias2(alias1(depth0, depth0)) 33184 + "\"\n"; 33185},"18":function(container,depth0,helpers,partials,data) { 33186 var alias1=container.lambda, alias2=container.escapeExpression; 33187 33188 return " id=\"" 33189 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 33190 + "\">\n <label for=\"" 33191 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 33192 + "\"\n"; 33193},"20":function(container,depth0,helpers,partials,data) { 33194 return " <div data-icon=\"" 33195 + container.escapeExpression(container.lambda((depth0 != null ? depth0.icon : depth0), depth0)) 33196 + "\" aria-hidden=\"true\"></div>\n"; 33197},"22":function(container,depth0,helpers,partials,data) { 33198 var stack1; 33199 33200 return ((stack1 = container.invokePartial(partials["secondary-action"],depth0,{"name":"secondary-action","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33201},"24":function(container,depth0,helpers,partials,data) { 33202 var stack1; 33203 33204 return ((stack1 = container.invokePartial(partials["single-entry-button"],depth0,{"name":"single-entry-button","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33205},"26":function(container,depth0,helpers,partials,data,blockParams,depths) { 33206 var stack1; 33207 33208 return ((stack1 = helpers.getId.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.id : depth0),{"name":"getId","hash":{},"fn":container.program(27, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33209},"27":function(container,depth0,helpers,partials,data,blockParams,depths) { 33210 var stack1; 33211 33212 return ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","hash":{"error-message-text":(depths[1] != null ? depths[1]["error-message-text"] : depths[1]),"id":depth0},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33213},"29":function(container,depth0,helpers,partials,data) { 33214 var stack1; 33215 33216 return ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33217},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 33218 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 33219 33220 return "<div class=\"input-field js-input-field " 33221 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33222 + "\"\n " 33223 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33224 + "\n " 33225 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["single-entry"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33226 + "\n " 33227 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["secondary-action"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33228 + "\n " 33229 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33230 + ">\n <input\n" 33231 + ((stack1 = container.invokePartial(partials["helpers/autocomplete"],depth0,{"name":"helpers/autocomplete","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33232 + ((stack1 = container.invokePartial(partials["helpers/name"],depth0,{"name":"helpers/name","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33233 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33234 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33235 + ((stack1 = container.invokePartial(partials["helpers/invalid"],depth0,{"name":"helpers/invalid","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33236 + ((stack1 = container.invokePartial(partials["helpers/maxlength"],depth0,{"name":"helpers/maxlength","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33237 + ((stack1 = container.invokePartial(partials["helpers/readonly"],depth0,{"name":"helpers/readonly","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33238 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33239 + ((stack1 = container.invokePartial(partials["helpers/data-filled"],depth0,{"name":"helpers/data-filled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33240 + ((stack1 = container.invokePartial(partials["helpers/additional-attrs"],depth0,{"name":"helpers/additional-attrs","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33241 + " class=\"" 33242 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","hash":{"class-list":(depth0 != null ? depth0["input-class-list"] : depth0)},"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33243 + "\"\n placeholder=\"" 33244 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 33245 + "\"\n type=\"" 33246 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0, blockParams, depths),"inverse":container.program(9, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 33247 + "\"\n " 33248 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.role : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33249 + "\n value=\"" 33250 + alias3(alias2((depth0 != null ? depth0.value : depth0), depth0)) 33251 + "\"\n " 33252 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33253 + "\n" 33254 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.generateId : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0, blockParams, depths),"inverse":container.program(18, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 33255 + " class=\"float-label\">" 33256 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 33257 + "</label>\n" 33258 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(20, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33259 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["secondary-action"] : depth0),{"name":"if","hash":{},"fn":container.program(22, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33260 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["single-entry"] : depth0),{"name":"if","hash":{},"fn":container.program(24, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33261 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.generateId : depth0),{"name":"if","hash":{},"fn":container.program(26, data, 0, blockParams, depths),"inverse":container.program(29, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 33262 + "</div>\n"; 33263},"usePartial":true,"useData":true,"useDepths":true})); 33264 33265return this["ANF"]; 33266 33267});
33268redesign.define('corePartial/birthdayField',['handlebars','dsPartial/field-group','dsPartial/drop-down','dsHelper/concat','dsPartial/input-field'], function(Handlebars) { 33269 33270this["ANF"] = this["ANF"] || {}; 33271this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33272 33273Handlebars.registerPartial("birthdayField", this["ANF"]["templates"]["birthdayField"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33274 var stack1; 33275 33276 return "\n" 33277 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.useEuropeanDateFormat : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") 33278 + "\n\n"; 33279},"2":function(container,depth0,helpers,partials,data) { 33280 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 33281 33282 return ((stack1 = container.invokePartial(partials["drop-down"],depth0,{"name":"drop-down","hash":{"required":true,"error-message-text":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_INCORRECT_DAY_ERROR : stack1),"class-list":"birthday-field__items","options":((stack1 = (depth0 != null ? depth0.dateData : depth0)) != null ? stack1.dayOptions : stack1),"data-prop":"data-property='GLB_DAY'","label":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_DAY : stack1),"name":"birthDay","id":helpers.concat.call(alias1,(depth0 != null ? depth0.idPrefix : depth0),"-birth-date-field",{"name":"concat","hash":{},"data":data})},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33283 + ((stack1 = container.invokePartial(partials["drop-down"],depth0,{"name":"drop-down","hash":{"required":true,"error-message-text":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_INCORRECT_MONTH_ERROR : stack1),"class-list":"birthday-field__items","options":((stack1 = (depth0 != null ? depth0.dateData : depth0)) != null ? stack1.monthOptions : stack1),"data-prop":"data-property='GLB_MONTH'","label":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_MONTH : stack1),"name":"birthMonth","id":helpers.concat.call(alias1,(depth0 != null ? depth0.idPrefix : depth0),"-birth-month-field",{"name":"concat","hash":{},"data":data})},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33284 + ((stack1 = container.invokePartial(partials["input-field"],depth0,{"name":"input-field","hash":{"required":true,"name":"birthYear","type":"number","data-prop":"data-property='GLB_YEAR'","label":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_YEAR : stack1),"error-message-text":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_INCORRECT_YEAR_ERROR : stack1),"id":helpers.concat.call(alias1,(depth0 != null ? depth0.idPrefix : depth0),"-birth-year-field",{"name":"concat","hash":{},"data":data}),"class-list":"birthday-field__items"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33285},"4":function(container,depth0,helpers,partials,data) { 33286 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 33287 33288 return ((stack1 = container.invokePartial(partials["drop-down"],depth0,{"name":"drop-down","hash":{"required":false,"error-message-text":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_INCORRECT_MONTH_ERROR : stack1),"class-list":"birthday-field__items","options":((stack1 = (depth0 != null ? depth0.dateData : depth0)) != null ? stack1.monthOptions : stack1),"data-prop":"data-property='GLB_MONTH'","label":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_MONTH : stack1),"name":"birthMonth","id":helpers.concat.call(alias1,(depth0 != null ? depth0.idPrefix : depth0),"-birth-month-field",{"name":"concat","hash":{},"data":data})},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33289 + ((stack1 = container.invokePartial(partials["drop-down"],depth0,{"name":"drop-down","hash":{"required":false,"error-message-text":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_INCORRECT_DAY_ERROR : stack1),"class-list":"birthday-field__items","options":((stack1 = (depth0 != null ? depth0.dateData : depth0)) != null ? stack1.dayOptions : stack1),"data-prop":"data-property='GLB_DAY'","label":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_DAY : stack1),"name":"birthDay","id":helpers.concat.call(alias1,(depth0 != null ? depth0.idPrefix : depth0),"-birth-date-field",{"name":"concat","hash":{},"data":data})},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33290 + ((stack1 = container.invokePartial(partials["input-field"],depth0,{"name":"input-field","hash":{"required":false,"name":"birthYear","type":"number","data-prop":"data-property='GLB_YEAR'","label":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_YEAR : stack1),"error-message-text":((stack1 = (depth0 != null ? depth0.tmnts : depth0)) != null ? stack1.GLB_INCORRECT_YEAR_ERROR : stack1),"id":helpers.concat.call(alias1,(depth0 != null ? depth0.idPrefix : depth0),"-birth-year-field",{"name":"concat","hash":{},"data":data}),"class-list":"birthday-field__items"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33291},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33292 var stack1; 33293 33294 return ((stack1 = container.invokePartial(partials["field-group"],depth0,{"name":"field-group","hash":{"class-list":"birthday-field__list","label":"Birthday"},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33295},"usePartial":true,"useData":true})); 33296 33297return this["ANF"]; 33298 33299}); 33300redesign.define('dsPartial/link',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
33300data-prop'], function(Handlebars) { 33301 33302this["ANF"] = this["ANF"] || {}; 33303this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33304 33305Handlebars.registerPartial("link", this["ANF"]["templates"]["link"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33306 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 33307 33308 return " <a href=\"" 33309 + alias2(alias1((depth0 != null ? depth0.href : depth0), depth0)) 33310 + "\"\n" 33311 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.target : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33312 + " class=\"" 33313 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33314 + "\"\n" 33315 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33316 + " data-theme=\"" 33317 + alias2(alias1((depth0 != null ? depth0.theme : depth0), depth0)) 33318 + "\"\n >\n" 33319 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33320 + " </a>\n"; 33321},"2":function(container,depth0,helpers,partials,data) { 33322 return " target=\"" 33323 + container.escapeExpression(container.lambda((depth0 != null ? depth0.target : depth0), depth0)) 33324 + "\"\n rel=\"noreferrer noopener\"\n"; 33325},"4":function(container,depth0,helpers,partials,data) { 33326 var stack1; 33327 33328 return " <button class=\"link-button " 33329 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33330 + "\"\n" 33331 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33332 + " data-theme=\"" 33333 + container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)) 33334 + "\"\n type=\"button\"\n >\n" 33335 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33336 + " </button>\n"; 33337},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33338 var stack1; 33339 33340 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.href : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); 33341},"usePartial":true,"useData":true})); 33342 33343return this["ANF"]; 33344 33345}); 33346redesign.define('dsPartial/helpers/button/current-state',['handlebars'], function(Handlebars) { 33347 33348this["ANF"] = this["ANF"] || {}; 33349this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33350 33351Handlebars.registerPartial("helpers/button/current-state", this["ANF"]["templates"]["helpers/button/current-state"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33352 return " data-state=\"" 33353 + container.escapeExpression(container.lambda((depth0 != null ? depth0["current-state"] : depth0), depth0)) 33354 + "\"\n"; 33355},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33356 var stack1; 33357 33358 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["current-state"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33359},"useData":true})); 33360 33361return this["ANF"]; 33362 33363}); 33364redesign.define('dsPartial/helpers/button/button-type',['handlebars'], function(Handlebars) { 33365 33366this["ANF"] = this["ANF"] || {}; 33367this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33368 33369Handlebars.registerPartial("helpers/button/button-type", this["ANF"]["templates"]["helpers/button/button-type"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33370 return " type=\"" 33371 + container.escapeExpression(container.lambda((depth0 != null ? depth0["button-type"] : depth0), depth0)) 33372 + "\"\n"; 33373},"3":function(container,depth0,helpers,partials,data) { 33374 return " type=\"button\"\n"; 33375},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33376 var stack1; 33377
33378 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["button-type"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : ""); 33379},"useData":true})); 33380 33381return this["ANF"]; 33382 33383}); 33384redesign.define('dsPartial/button',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/disabled','dsPartial/helpers/button/current-state','dsPartial/helpers/button/button-type','dsPartial/helpers/data-prop'], function(Handlebars) { 33385 33386this["ANF"] = this["ANF"] || {}; 33387this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33388 33389Handlebars.registerPartial("button", this["ANF"]["templates"]["button"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33390 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 33391 33392 return " <a href=\"" 33393 + alias2(alias1((depth0 != null ? depth0.href : depth0), depth0)) 33394 + "\"\n" 33395 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.target : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33396 + " class=\"button " 33397 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33398 + "\"\n data-brand=\"" 33399 + alias2(alias1((depth0 != null ? depth0.brand : depth0), depth0)) 33400 + "\"\n data-theme=\"" 33401 + alias2(alias1((depth0 != null ? depth0.theme : depth0), depth0)) 33402 + "\"\n data-variant=\"" 33403 + alias2(alias1((depth0 != null ? depth0.variant : depth0), depth0)) 33404 + "\"\n >\n" 33405 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33406 + " </a>\n"; 33407},"2":function(container,depth0,helpers,partials,data) { 33408 return " target=\"" 33409 + container.escapeExpression(container.lambda((depth0 != null ? depth0.target : depth0), depth0)) 33410 + "\"\n rel=\"noreferrer noopener\"\n"; 33411},"4":function(container,depth0,helpers,partials,data) { 33412 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 33413 33414 return " <button\n class=\"button ds-override " 33415 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33416 + "\"\n data-brand=\"" 33417 + alias2(alias1((depth0 != null ? depth0.brand : depth0), depth0)) 33418 + "\"\n" 33419 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33420 + ((stack1 = container.invokePartial(partials["helpers/button/current-state"],depth0,{"name":"helpers/button/current-state","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33421 + ((stack1 = container.invokePartial(partials["helpers/button/button-type"],depth0,{"name":"helpers/button/button-type","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33422 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33423 + " " 33424 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["full-width"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33425 + "\n " 33426 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.shape : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33427 + "\n" 33428 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["data-disabled"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33429 + " data-theme=\"" 33430 + alias2(alias1((depth0 != null ? depth0.theme : depth0), depth0)) 33431 + "\"\n data-variant=\"" 33432 + alias2(alias1((depth0 != null ? depth0.variant : depth0), depth0)) 33433 + "\"\n" 33434 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.value : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33435 + ">\n" 33436 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.label : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(15, data, 0),"data":data})) != null ? stack1 : "") 33437 + " </button>\n"; 33438},"5":function(container,depth0,helpers,partials,data) { 33439 return "data-full-width=\"" 33440 + container.escapeExpression(container.lambda((depth0 != null ? depth0["full-width"] : depth0), depth0)) 33441 + "\""; 33442},"7":function(container,depth0,helpers,partials,data) { 33443 return "data-shape=\"" 33444 + container.escapeExpression(container.lambda((depth0 != null ? depth0.shape : depth0), depth0)) 33445 + "\""; 33446},"9":function(container,depth0,helpers,partials,data) { 33447 return " data-disabled=\"true\"\n"; 33448},"11":function(container,depth0,helpers,partials,data) { 33449 return " value=\"" 33450 + container.escapeExpression(container.lambda((depth0 != null ? depth0.value : depth0), depth0)) 33451 + "\"\n "; 33452},"13":function(container,depth0,helpers,partials,data) { 33453 var alias1=container.lambda, alias2=container.escapeExpression; 33454
33455 return " <span>\n <span class=\"screen-reader-text\">" 33456 + alias2(alias1((depth0 != null ? depth0["before-label"] : depth0), depth0)) 33457 + "</span>\n " 33458 + alias2(alias1((depth0 != null ? depth0.label : depth0), depth0)) 33459 + "\n <span class=\"screen-reader-text\">" 33460 + alias2(alias1((depth0 != null ? depth0["after-label"] : depth0), depth0)) 33461 + "</span>\n </span>\n"; 33462},"15":function(container,depth0,helpers,partials,data) { 33463 var stack1; 33464 33465 return ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33466},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33467 var stack1; 33468 33469 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.href : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); 33470},"usePartial":true,"useData":true})); 33471 33472return this["ANF"]; 33473 33474}); 33475redesign.define('dsPartial/button-with-link',['handlebars','dsPartial/helpers/class-list','dsPartial/button'], function(Handlebars) { 33476 33477this["ANF"] = this["ANF"] || {}; 33478this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33479 33480Handlebars.registerPartial("button-with-link", this["ANF"]["templates"]["button-with-link"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33481 var stack1; 33482 33483 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"label":(depth0 != null ? depth0["button-label"] : depth0),"variant":(depth0 != null ? depth0["button-variant"] : depth0),"type":"button","class-list":"button-with-link-button"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33484},"3":function(container,depth0,helpers,partials,data) { 33485 var stack1; 33486 33487 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"label":(depth0 != null ? depth0["button-label"] : depth0),"variant":"secondary","type":"button","class-list":"button-with-link-button"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33488},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33489 var stack1; 33490 33491 return "<div class=\"button-with-link " 33492 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33493 + "\">\n" 33494 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["button-variant"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 33495 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"label":(depth0 != null ? depth0["link-label"] : depth0),"variant":"button-as-link","type":"button","class-list":"button-with-link-hyperlink"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33496 + "</div>\n"; 33497},"usePartial":true,"useData":true})); 33498 33499return this["ANF"]; 33500 33501}); 33502redesign.define('corePartial/cartNotification',['handlebars','dsPartial/link','dsPartial/button-with-link'], function(Handlebars) { 33503 33504this["ANF"] = this["ANF"] || {}; 33505this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33506 33507Handlebars.registerPartial("cartNotification", this["ANF"]["templates"]["cartNotification"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33508 return " " 33509 + container.escapeExpression(container.lambda((depth0 != null ? depth0.bagCount : depth0), depth0)) 33510 + "\n"; 33511},"3":function(container,depth0,helpers,partials,data) { 33512 var stack1; 33513 33514 return ((stack1 = container.invokePartial(partials.link,depth0,{"name":"link","hash":{"href":((stack1 = (depth0 != null ? depth0.urls : depth0)) != null ? stack1.cartURL : stack1),"data-prop":"data-property=GLB_CART_REMINDER_ITEMS_IN_BAG_MESSAGE","class-list":"bodyMsg bagNav"},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33515 + "\n"; 33516},"4":function(container,depth0,helpers,partials,data) { 33517 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 33518 33519 return " " 33520 + alias2(alias1((depth0 != null ? depth0.bagCount : depth0), depth0)) 33521 + " " 33522 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.itemsInBagMessage : stack1)) != null ? stack1.value : stack1), depth0)) 33523 + "\n"; 33524},"6":function(container,depth0,helpers,partials,data) { 33525 var stack1; 33526 33527 return ((stack1 = container.invokePartial(partials.link,depth0,{"name":"link","hash":{"href":((stack1 = (depth0 != null ? depth0.urls : depth0)) != null ? stack1.cartURL : stack1),"data-prop":"data-property=GLB_CART_REMINDER_ITEM_IN_BAG_MESSAGE","class-list":"bodyMsg bagNav"},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33528},"7":function(container,depth0,helpers,partials,data) { 33529 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 33530 33531 return " " 33532 + alias2(alias1((depth0 != null ? depth0.bagCount : depth0), depth0)) 33533 + " " 33534 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.itemInBagMessage : stack1)) != null ? stack1.value : stack1), depth0)) 33535 + "\n"; 33536},"9":function(container,depth0,helpers,partials,data) { 33537 return " id=\"button-link\" "; 33538},"11":function(container,depth0,helpers,partials,data) { 33539 return ""; 33540},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 33541 var stack1, alias1=container.lambda; 33542 33543 return "<div id=\"cartReminder\" class='cartReminder'>\n" 33544 + ((stack1 = container.invokePartial(partials.link,depth0,{"name":"link","hash":{"href":((stack1 = (depth0 != null ? depth0.urls : depth0)) != null ? stack1.cartURL : stack1),"class-list":"bagIcon"},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33545 + "\n <p class='reminderMsg' data-property='" 33546 + container.escapeExpression(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.reminderMessage : stack1)) != null ? stack1.key : stack1), depth0)) 33547 + "'>\n " 33548 + ((stack1 = alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.reminderMessage : stack1)) != null ? stack1.value : stack1), depth0)) != null ? stack1 : "") 33549 + "</p>\n\n"
33550 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.multipleItems : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.program(6, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 33551 + "\n\n\n " 33552 + ((stack1 = container.invokePartial(partials["button-with-link"],depth0,{"name":"button-with-link","hash":{"link-label":((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.noThanksMessage : stack1)) != null ? stack1.value : stack1),"button-label":((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.buttonText : stack1)) != null ? stack1.value : stack1),"button-variant":"primary","inline-prop":"dataProperties"},"fn":container.program(11, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33553 + "\n\n</div>"; 33554},"main_d": function(fn, props, container, depth0, data, blockParams, depths) { 33555 33556 var decorators = container.decorators; 33557 33558 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(9, data, 0, blockParams, depths),"inverse":container.noop,"args":["dataProperties"],"data":data}) || fn; 33559 return fn; 33560 } 33561 33562,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true})); 33563 33564return this["ANF"]; 33565 33566}); 33567redesign.define('dsPartial/helpers/full-width',['handlebars'], function(Handlebars) { 33568 33569this["ANF"] = this["ANF"] || {}; 33570this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33571 33572Handlebars.registerPartial("helpers/full-width", this["ANF"]["templates"]["helpers/full-width"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33573 return " data-full-width=\"" 33574 + container.escapeExpression(container.lambda((depth0 != null ? depth0["full-width"] : depth0), depth0)) 33575 + "\"\n"; 33576},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33577 var stack1; 33578 33579 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["full-width"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33580},"useData":true})); 33581 33582return this["ANF"]; 33583 33584}); 33585redesign.define('dsPartial/link-as-button',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsPartial/helpers/full-width'], function(Handlebars) { 33586 33587this["ANF"] = this["ANF"] || {}; 33588this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33589 33590Handlebars.registerPartial("link-as-button", this["ANF"]["templates"]["link-as-button"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33591 return " aria-label=\"" 33592 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 33593 + "\"\n"; 33594},"3":function(container,depth0,helpers,partials,data) { 33595 return " target=\"" 33596 + container.escapeExpression(container.lambda((depth0 != null ? depth0.target : depth0), depth0)) 33597 + "\"\n"; 33598},"5":function(container,depth0,helpers,partials,data) { 33599 return " data-theme=\"" 33600 + container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)) 33601 + "\"\n "; 33602},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33603 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 33604 33605 return "<a\n href=\"" 33606 + alias2(alias1((depth0 != null ? depth0.href : depth0), depth0)) 33607 + "\"\n class=\"link-as-" 33608 + alias2(alias1((depth0 != null ? depth0["button-type"] : depth0), depth0)) 33609 + "-button " 33610 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33611 + "\"\n" 33612 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33613 + ((stack1 = container.invokePartial(partials["helpers/full-width"],depth0,{"name":"helpers/full-width","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33614 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["aria-label"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33615 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.target : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33616 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33617 + ">\n" 33618 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33619 + "</a>\n"; 33620},"usePartial":true,"useData":true})); 33621 33622return this["ANF"]; 33623 33624});
33625redesign.define('corePartial/checkoutButton',['handlebars','dsPartial/link-as-button','dsHelper/concat','wcsHelper/i18n'], function(Handlebars) { 33626 33627this["ANF"] = this["ANF"] || {}; 33628this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33629 33630Handlebars.registerPartial("checkoutButton", this["ANF"]["templates"]["checkoutButton"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33631 return " " 33632 + container.escapeExpression(helpers.i18n.call(depth0 != null ? depth0 : (container.nullContext || {}),"checkout.TMNT.checkoutHeading.value",{"name":"i18n","hash":{},"data":data})) 33633 + "\n"; 33634},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33635 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 33636 33637 return ((stack1 = container.invokePartial(partials["link-as-button"],depth0,{"name":"link-as-button","hash":{"aria-label":helpers.i18n.call(alias1,"checkout.TMNT.checkoutHeading.value",{"name":"i18n","hash":{},"data":data}),"href":((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.href : stack1),"class-list":helpers.concat.call(alias1,"checkout-btn ",((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.hideCheckoutButtonClass : stack1),((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.showCheckoutButtonClass : stack1),{"name":"concat","hash":{},"data":data}),"data-prop":helpers.concat.call(alias1,"data-property=\"",helpers.i18n.call(alias1,"checkout.TMNT.checkoutHeading.key",{"name":"i18n","hash":{},"data":data}),"\"",{"name":"concat","hash":{},"data":data}),"button-type":"primary"},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33638},"usePartial":true,"useData":true})); 33639 33640return this["ANF"]; 33641 33642}); 33643redesign.define('dsPartial/modal',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop'], function(Handlebars) { 33644 33645this["ANF"] = this["ANF"] || {}; 33646this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33647 33648Handlebars.registerPartial("modal", this["ANF"]["templates"]["modal"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33649 return " data-full-screen=\"true\""; 33650},"3":function(container,depth0,helpers,partials,data) { 33651 return " data-full-bleed=\"true\""; 33652},"5":function(container,depth0,helpers,partials,data) { 33653 return " <h2 class=\"modal-heading-text js-modal-heading-text\">" 33654 + container.escapeExpression(container.lambda((depth0 != null ? depth0.title : depth0), depth0)) 33655 + "</h2>\n"; 33656},"7":function(container,depth0,helpers,partials,data) { 33657 return " data-close-button-theme=\"" 33658 + container.escapeExpression(container.lambda((depth0 != null ? depth0["close-button-theme"] : depth0), depth0)) 33659 + "\""; 33660},"9":function(container,depth0,helpers,partials,data) { 33661 return " " 33662 + container.escapeExpression(container.lambda((depth0 != null ? depth0.closeText : depth0), depth0)) 33663 + "\n"; 33664},"11":function(container,depth0,helpers,partials,data) { 33665 return " Close\n "; 33666},"13":function(container,depth0,helpers,partials,data) { 33667 return ""; 33668},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33669 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 33670 33671 return "<div class=\"modal modal-z-index js-modal js-lock-tabs " 33672 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33673 + "\"\n " 33674 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["full-screen"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33675 + "\n " 33676 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["full-bleed"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33677 + "\n data-open=\"false\"\n data-variant=\"" 33678 + alias3(alias2((depth0 != null ? depth0.variant : depth0), depth0)) 33679 + "\"\n id=\"" 33680 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 33681 + "\"\n tabindex=\"-1\"\n" 33682 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33683 + ">\n <div class=\"js-first-tab-buffer\"></div>\n <div class=\"modal-overflow-wrapper\">\n <button aria-hidden=\"true\" class=\"modal-backdrop js-close-modal\" type=\"button\" tabindex=\"-1\"></button>
33683\n <div class=\"modal-block modal-height modal-width modal-block-bg\" role=\"dialog\" aria-labelledby=\"" 33684 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 33685 + "-label\">\n <div class=\"modal-heading\">\n <div class=\"modal-heading-title js-modal-heading\" id=\"" 33686 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 33687 + "-label\" tabindex=\"-1\">\n" 33688 + ((stack1 = container.invokePartial(partials["custom-header"],depth0,{"name":"custom-header","fn":container.program(5, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33689 + " </div>\n <button class=\"modal-close-button js-close-modal\"\n " 33690 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["close-button-theme"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33691 + " type=\"button\">\n <span class=\"screen-reader-text\">\n" 33692 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.closeText : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(11, data, 0),"data":data})) != null ? stack1 : "") 33693 + " " 33694 + alias3(alias2((depth0 != null ? depth0.title : depth0), depth0)) 33695 + "\n </span>\n <span aria-hidden=\"true\" class=\"modal-close-icon\"></span>\n </button>\n </div>\n <div class=\"modal-content\">\n" 33696 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33697 + " </div>\n " 33698 + ((stack1 = container.invokePartial(partials["modal-footer"],depth0,{"name":"modal-footer","fn":container.program(13, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33699 + "\n </div>\n </div>\n <div class=\"js-last-tab-buffer\"></div>\n</div>\n"; 33700},"usePartial":true,"useData":true})); 33701 33702return this["ANF"]; 33703 33704}); 33705redesign.define('corePartial/core_ajaxModal',['handlebars','dsPartial/modal'], function(Handlebars) { 33706 33707this["ANF"] = this["ANF"] || {}; 33708this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33709 33710Handlebars.registerPartial("core_ajaxModal", this["ANF"]["templates"]["core_ajaxModal"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33711 return " <div class=\"js-loading loading\">\n\n <p class=\"screen-reader-text\">" 33712 + container.escapeExpression(container.lambda((depth0 != null ? depth0.screenReaderText : depth0), depth0)) 33713 + "</p>\n </div>\n <div class=\"js-body body\"></div>\n"; 33714},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33715 var stack1; 33716 33717 return ((stack1 = container.invokePartial(partials.modal,depth0,{"name":"modal","hash":{"variant":(depth0 != null ? depth0.variant : depth0),"class-list":"ajax-modal","title":(depth0 != null ? depth0.title : depth0),"id":(depth0 != null ? depth0.id : depth0)},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33718 + "\n"; 33719},"usePartial":true,"useData":true})); 33720 33721return this["ANF"]; 33722 33723}); 33724redesign.define('corePartial/core_ajaxModalFail',['handlebars'], function(Handlebars) { 33725 33726this["ANF"] = this["ANF"] || {}; 33727this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33728 33729Handlebars.registerPartial("core_ajaxModalFail", this["ANF"]["templates"]["core_ajaxModalFail"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33730 var alias1=container.lambda, alias2=container.escapeExpression; 33731 33732 return "<div class=\"ajax-modal--fail\">\n <div class=\"ajax-modal__primary-msg\">\n " 33733 + alias2(alias1((depth0 != null ? depth0.primary_msg : depth0), depth0)) 33734 + "\n </div>\n <div class=\"ajax-modal__secondary-msg\">\n " 33735 + alias2(alias1((depth0 != null ? depth0.secondary_msg : depth0), depth0)) 33736 + "\n </div>\n</div>"; 33737},"useData":true})); 33738 33739return this["ANF"]; 33740 33741}); 33742redesign.define('dsPartial/button-state',['handlebars','dsPartial/helpers/
33742data-prop'], function(Handlebars) { 33743 33744this["ANF"] = this["ANF"] || {}; 33745this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33746 33747Handlebars.registerPartial("button-state", this["ANF"]["templates"]["button-state"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33748 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 33749 33750 return " <span data-state=\"" 33751 + alias2(alias1((depth0 != null ? depth0.state : depth0), depth0)) 33752 + "\" data-icon=\"" 33753 + alias2(alias1((depth0 != null ? depth0.icon : depth0), depth0)) 33754 + "\" data-hidden=\"" 33755 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.active : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") 33756 + "\" " 33757 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["icon-only"] : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33758 + " " 33759 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33760 + " aria-hidden=\"true\"></span>\n"; 33761},"2":function(container,depth0,helpers,partials,data) { 33762 return "false"; 33763},"4":function(container,depth0,helpers,partials,data) { 33764 return "true"; 33765},"6":function(container,depth0,helpers,partials,data) { 33766 return "class=\"icon-only\""; 33767},"8":function(container,depth0,helpers,partials,data) { 33768 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 33769 33770 return " <span data-state=\"" 33771 + container.escapeExpression(container.lambda((depth0 != null ? depth0.state : depth0), depth0)) 33772 + "\" class=\"spin-container " 33773 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["icon-only"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33774 + "\" data-hidden=\"" 33775 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.active : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") 33776 + "\" aria-hidden=\"true\"\n " 33777 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.disabled : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33778 + "\n " 33779 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33780 + ">\n <span class=\"spinner\"></span>\n </span>\n"; 33781},"9":function(container,depth0,helpers,partials,data) { 33782 return "icon-only"; 33783},"11":function(container,depth0,helpers,partials,data) { 33784 return " data-disabled=\"true\""; 33785},"13":function(container,depth0,helpers,partials,data) { 33786 var stack1; 33787 33788 return " <span class=\"screen-reader-text\">\n" 33789 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.label : depth0),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.program(16, data, 0),"data":data})) != null ? stack1 : "") 33790 + " </span>\n"; 33791},"14":function(container,depth0,helpers,partials,data) { 33792 var stack1; 33793 33794 return " " 33795 + ((stack1 = container.lambda((depth0 != null ? depth0.label : depth0), depth0)) != null ? stack1 : "") 33796 + "\n"; 33797},"16":function(container,depth0,helpers,partials,data) { 33798 var stack1; 33799 33800 return " " 33801 + ((stack1 = container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) != null ? stack1 : "") 33802 + "\n"; 33803},"18":function(container,depth0,helpers,partials,data) { 33804 var stack1; 33805 33806 return " " 33807 + ((stack1 = container.lambda((depth0 != null ? depth0.label : depth0), depth0)) != null ? stack1 : "") 33808 + "\n"; 33809},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33810 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 33811 33812 return ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33813 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.spinner : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33814 + "<span\n data-state=\"" 33815 + container.escapeExpression(container.lambda((depth0 != null ? depth0.state : depth0), depth0)) 33816 + "\"\n data-hidden=\"" 33817 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.active : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") 33818 + "\"\n " 33819 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.disabled : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33820 + "\n" 33821 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33822 + ">\n" 33823 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["icon-only"] : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(18, data, 0),"data":data})) != null ? stack1 : "") 33824 + "</span>\n"; 33825},"usePartial":true,"useData":true})); 33826 33827return this["ANF"]; 33828 33829});
33830redesign.define('corePartial/core_button',['handlebars','dsPartial/button','dsPartial/button-state'], function(Handlebars) { 33831 33832this["ANF"] = this["ANF"] || {}; 33833this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33834 33835Handlebars.registerPartial("core_button", this["ANF"]["templates"]["core_button"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33836 var stack1; 33837 33838 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.states : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33839},"2":function(container,depth0,helpers,partials,data) { 33840 var stack1; 33841 33842 return ((stack1 = container.invokePartial(partials["button-state"],depth0,{"name":"button-state","hash":{"active":(depth0 != null ? depth0.isActive : depth0),"spinner":(depth0 != null ? depth0.hasSpinner : depth0),"disabled":(depth0 != null ? depth0.isDisabled : depth0),"aria-label":(depth0 != null ? depth0.ariaLabel : depth0),"label":(depth0 != null ? depth0.label : depth0),"state":(depth0 != null ? depth0.state : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33843},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33844 var stack1; 33845 33846 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"data-disabled":(depth0 != null ? depth0.isCurrentStateDisabled : depth0),"current-state":(depth0 != null ? depth0.currentState : depth0),"variant":(depth0 != null ? depth0.variant : depth0),"type":(depth0 != null ? depth0.type : depth0)},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33847 + "\n\n"; 33848},"usePartial":true,"useData":true})); 33849 33850return this["ANF"]; 33851 33852}); 33853redesign.define('dsPartial/vertical-separator',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/theme'], function(Handlebars) { 33854 33855this["ANF"] = this["ANF"] || {}; 33856this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33857 33858Handlebars.registerPartial("vertical-separator", this["ANF"]["templates"]["vertical-separator"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33859 var stack1; 33860 33861 return "<div class=\"vertical-separator " 33862 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33863 + "\" " 33864 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33865 + ">\n" 33866 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33867 + "</div>\n"; 33868},"usePartial":true,"useData":true})); 33869 33870return this["ANF"]; 33871 33872}); 33873redesign.define('dsPartial/flag-block',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsPartial/helpers/theme'], function(Handlebars) { 33874 33875this["ANF"] = this["ANF"] || {}; 33876this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33877 33878Handlebars.registerPartial("flag-block", this["ANF"]["templates"]["flag-block"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33879 return " data-variant=\"" 33880 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 33881 + "\"\n"; 33882},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33883 var stack1; 33884 33885 return "<span\n class=\"flag-block " 33886 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33887 + "\"\n"
33888 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33889 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33890 + " " 33891 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33892 + ">\n <span class=\"flag-block-icon\" data-country-code=\"" 33893 + container.escapeExpression(container.lambda((depth0 != null ? depth0["country-code"] : depth0), depth0)) 33894 + "\"></span>\n <span class=\"flag-block-text\">" 33895 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33896 + "</span>\n</span>\n"; 33897},"usePartial":true,"useData":true})); 33898 33899return this["ANF"]; 33900 33901}); 33902redesign.define('dsPartial/country-selector',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsPartial/vertical-separator','dsPartial/flag-block','dsPartial/button'], function(Handlebars) { 33903 33904this["ANF"] = this["ANF"] || {}; 33905this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33906 33907Handlebars.registerPartial("country-selector", this["ANF"]["templates"]["country-selector"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33908 var stack1; 33909 33910 return " " 33911 + ((stack1 = container.invokePartial(partials["flag-block"],depth0,{"name":"flag-block","hash":{"country-code":(depth0 != null ? depth0["country-code"] : depth0),"class-list":(depth0 != null ? depth0.flagBlockClassList : depth0)},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33912 + "\n <span>\n" 33913 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"inline-prop":(depth0 != null ? depth0.buttonInlineProp : depth0),"data-prop":(depth0 != null ? depth0.buttonDataProp : depth0),"class-list":(depth0 != null ? depth0["button-class-list"] : depth0),"aria-label":(depth0 != null ? depth0.buttonAriaLabel : depth0),"label":(depth0 != null ? depth0.buttonLabel : depth0),"variant":"button-as-link","type":"button"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33914 + " </span>\n"; 33915},"2":function(container,depth0,helpers,partials,data) { 33916 return container.escapeExpression(container.lambda((depth0 != null ? depth0.label : depth0), depth0)); 33917},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33918 var stack1; 33919 33920 return "<div class=\"country-selector " 33921 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33922 + "\" " 33923 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33924 + ">\n" 33925 + ((stack1 = container.invokePartial(partials["vertical-separator"],depth0,{"name":"vertical-separator","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33926 + "</div>\n"; 33927},"usePartial":true,"useData":true})); 33928 33929return this["ANF"]; 33930 33931}); 33932redesign.define('dsPartial/icon-link',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop'], function(Handlebars) { 33933 33934this["ANF"] = this["ANF"] || {}; 33935this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33936 33937Handlebars.registerPartial("icon-link", this["ANF"]["templates"]["icon-link"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33938 return "role=\"" 33939 + container.escapeExpression(container.lambda((depth0 != null ? depth0.role : depth0), depth0)) 33940 + "\""; 33941},"3":function(container,depth0,helpers,partials,data) { 33942 return "screen-reader-text"; 33943},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33944 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 33945 33946 return "<a\n class=\"icon-link " 33947 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33948 + "\"\n href=\"" 33949 + alias2(alias1((depth0 != null ? depth0.href : depth0), depth0)) 33950 + "\"\n" 33951 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33952 + " " 33953 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.role : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33954 + "\n>\n <span class=\"icon-link-icon\" data-icon=\"" 33955 + alias2(alias1((depth0 != null ? depth0["data-icon"] : depth0), depth0)) 33956 + "\" aria-hidden=\"true\"></span>\n <span class=\"icon-link-text " 33957 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["screen-reader-text"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 33958 + "\">" 33959 + alias2(alias1((depth0 != null ? depth0["icon-link-text"] : depth0), depth0)) 33960 + ((stack1 = alias1((data && data["partial-block"]), depth0)) != null ? stack1 : "") 33961 + "</span>\n</a>\n"; 33962},"usePartial":true,"useData":true})); 33963 33964return this["ANF"]; 33965 33966}); 33967redesign.define('dsPartial/list-menu',['handlebars','dsPartial/helpers/class-list','dsPartial/icon-link'], function(Handlebars) { 33968 33969this["ANF"] = this["ANF"] || {}; 33970this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 33971 33972Handlebars.registerPartial("list-menu", this["ANF"]["templates"]["list-menu"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 33973 var alias1=container.lambda, alias2=container.escapeExpression; 33974 33975 return " role=\"menu\" aria-labelledby=\"" 33976 + alias2(alias1((depth0 != null ? depth0["controlling-id"] : depth0), depth0)) 33977 + "\" aria-hidden=\"true\" id=\"list-menu-" 33978 + alias2(alias1((depth0 != null ? depth0["controlling-id"] : depth0), depth0)) 33979 + "\""; 33980},"3":function(container,depth0,helpers,partials,data) { 33981 var stack1; 33982 33983 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["icon-link"] : depth0),{"name":"each","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 33984},"4":function(container,depth0,helpers,partials,data) { 33985 var stack1; 33986 33987 return " <li>\n" 33988 + ((stack1 = container.invokePartial(partials["icon-link"],depth0,{"name":"icon-link","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33989 + " </li>\n"; 33990},"6":function(container,depth0,helpers,partials,data) { 33991 var stack1; 33992 33993 return ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 33994},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 33995 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 33996 33997 return "<ul class=\"list-menu " 33998 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 33999 + "\"\n" 34000 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["aria-menu"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34001 + ">\n\n" 34002 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["icon-link"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") 34003 + "</ul>\n"; 34004},"usePartial":true,"useData":true})); 34005 34006return this["ANF"]; 34007 34008}); 34009redesign.define('dsPartial/list-menu-option-button',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
34009data-prop'], function(Handlebars) { 34010 34011this["ANF"] = this["ANF"] || {}; 34012this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34013 34014Handlebars.registerPartial("list-menu-option-button", this["ANF"]["templates"]["list-menu-option-button"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34015 return "selected"; 34016},"3":function(container,depth0,helpers,partials,data) { 34017 return "data-state=\"selected\""; 34018},"5":function(container,depth0,helpers,partials,data) { 34019 return " type=\"" 34020 + container.escapeExpression(container.lambda((depth0 != null ? depth0["button-type"] : depth0), depth0)) 34021 + "\"\n"; 34022},"7":function(container,depth0,helpers,partials,data) { 34023 return "<span class=\"screen-reader-text toggle-screen-reader-text\">" 34024 + container.escapeExpression(container.lambda((depth0 != null ? depth0["selected-label"] : depth0), depth0)) 34025 + "</span>"; 34026},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34027 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 34028 34029 return "<li class=\"list-menu-option " 34030 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.selected : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34031 + " " 34032 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34033 + "\"\n " 34034 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.selected : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34035 + "\n " 34036 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34037 + ">\n <button class=\"list-menu-option-button " 34038 + container.escapeExpression(container.lambda((depth0 != null ? depth0["button-class"] : depth0), depth0)) 34039 + "\"\n" 34040 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["button-type"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34041 + " >\n " 34042 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["selected-label"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34043 + "\n" 34044 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34045 + " </button>\n</li>\n"; 34046},"usePartial":true,"useData":true})); 34047 34048return this["ANF"]; 34049 34050}); 34051redesign.define('corePartial/countrySelectionWidget',['handlebars','dsPartial/country-selector','dsPartial/modal','dsHelper/concat','dsPartial/list-menu','dsPartial/list-menu-option-button','dsPartial/flag-block'], function(Handlebars) { 34052 34053this["ANF"] = this["ANF"] || {}; 34054this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34055 34056Handlebars.registerPartial("countrySelectionWidget", this["ANF"]["templates"]["countrySelectionWidget"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34057 return "data-modal=\"" 34058 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 34059 + "__modal\""; 34060},"3":function(container,depth0,helpers,partials,data,blockParams,depths) { 34061 var stack1; 34062 34063 return ((stack1 = container.invokePartial(partials["list-menu"],depth0,{"name":"list-menu","fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34064},"4":function(container,depth0,helpers,partials,data,blockParams,depths) { 34065 var stack1; 34066 34067 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.countryList : depth0),{"name":"each","hash":{},"fn":container.program(5, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34068},"5":function(container,depth0,helpers,partials,data,blockParams,depths) { 34069 var stack1; 34070 34071 return " \n" 34072 + ((stack1 = container.invokePartial(partials["list-menu-option-button"],depth0,{"name":"list-menu-option-button","hash":{"inline-prop":"selectionDataProps","selected":(depth0 != null ? depth0.selected : depth0),"class-list":"country-change-widget__selection js-close-modal","selected-label":"Selected"},"fn":container.program(8, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34073},"6":function(container,depth0,helpers,partials,data) { 34074 var alias1=container.lambda, alias2=container.escapeExpression; 34075 34076 return "data-country-code=\"" 34077 + alias2(alias1((depth0 != null ? depth0.countryCode : depth0), depth0)) 34078 + "\" data-country-name=\"" 34079 + alias2(alias1((depth0 != null ? depth0.countryName : depth0), depth0)) 34080 + "\""; 34081},"8":function(container,depth0,helpers,partials,data) { 34082 var stack1; 34083 34084 return ((stack1 = container.invokePartial(partials["flag-block"],depth0,{"name":"flag-block","hash":{"country-code":(depth0 != null ? depth0.countryCode : depth0)},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34085},"9":function(container,depth0,helpers,partials,data) { 34086 return " " 34087 + container.escapeExpression(container.lambda((depth0 != null ? depth0.countryName : depth0), depth0)) 34088 + "\n"; 34089},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 34090 var stack1; 34091 34092 return "\n<div id=\"" 34093 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 34094 + "\" class=\"country-change-widget\">\n \n" 34095 + ((stack1 = container.invokePartial(partials["country-selector"],depth0,{"name":"country-selector","hash":{"flagBlockClassList":"country-change-widget__flag-block","buttonInlineProp":"buttonDataProps","button-class-list":"js-open-modal","buttonAriaLabel":(depth0 != null ? depth0.changeButtonAriaLabel : depth0),"buttonLabel":(depth0 != null ? depth0.changeButtonLabel : depth0),"label":(depth0 != null ? depth0.selectedCountryName : depth0),"country-code":(depth0 != null ? depth0.selectedCountryCode : depth0)},"data":data,"indent":"\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34096 + ((stack1 = container.invokePartial(partials.modal,depth0,{"name":"modal","hash":{"title":(depth0 != null ? depth0.modalTitle : depth0),"id":helpers.concat.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.id : depth0),"__modal",{"name":"concat","hash":{},"data":data})},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34097 + "</div>\n"; 34098},"main_d": function(fn, props, container, depth0, data, blockParams, depths) { 34099 34100 var decorators = container.decorators; 34101 34102 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"args":["buttonDataProps"],"data":data}) || fn; 34103 return fn; 34104 } 34105 34106,"useDecorators":true,"5_d": function(fn, props, container, depth0, data, blockParams, depths) { 34107 34108 var decorators = container.decorators; 34109 34110 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(6, data, 0, blockParams, depths),"inverse":container.noop,"args":["selectionDataProps"],"data":data}) || fn; 34111 return fn; 34112 } 34113 34114,"usePartial":true,"useData":true,"useDepths":true})); 34115 34116return this["ANF"]; 34117 34118}); 34119redesign.define('dsPartial/progress-bar',['handlebars'], function(Handlebars) { 34120 34121this["ANF"] = this["ANF"] || {}; 34122this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34123 34124Handlebars.registerPartial("progress-bar", this["ANF"]["templates"]["progress-bar"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34125 return container.escapeExpression(container.lambda((depth0 != null ? depth0["class-list"] : depth0), depth0)); 34126},"3":function(container,depth0,helpers,partials,data) { 34127 var stack1; 34128
34129 return " <span aria-hidden=\"true\" class=\"progress-bar-prelabel\">" 34130 + ((stack1 = container.lambda((depth0 != null ? depth0.preLabel : depth0), depth0)) != null ? stack1 : "") 34131 + "</span>\n"; 34132},"5":function(container,depth0,helpers,partials,data) { 34133 var stack1; 34134 34135 return " <span aria-hidden=\"true\" class=\"progress-bar-postlabel\">" 34136 + ((stack1 = container.lambda((depth0 != null ? depth0.postLabel : depth0), depth0)) != null ? stack1 : "") 34137 + "</span>\n"; 34138},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34139 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 34140 34141 return "<div class=\"progress-bar js-progress-bar" 34142 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["class-list"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34143 + "\">\n" 34144 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.preLabel : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34145 + " <progress class=\"js-progress-element\" aria-hidden=\"true\" data-value=\"" 34146 + alias3(alias2((depth0 != null ? depth0.value : depth0), depth0)) 34147 + "\" value=\"0\" max=\"" 34148 + alias3(alias2((depth0 != null ? depth0.max : depth0), depth0)) 34149 + "\"></progress>\n" 34150 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.postLabel : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34151 + "</div>\n"; 34152},"useData":true})); 34153 34154return this["ANF"]; 34155 34156}); 34157redesign.define('corePartial/freeShippingProgress',['handlebars','wcsHelper/i18n','dsPartial/progress-bar'], function(Handlebars) { 34158 34159this["ANF"] = this["ANF"] || {}; 34160this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34161 34162Handlebars.registerPartial("freeShippingProgress", this["ANF"]["templates"]["freeShippingProgress"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34163 var stack1; 34164 34165 return " <div class=\"free-shipping-text\">\n" 34166 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.amountToFreeShipping : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") 34167 + " </div>\n" 34168 + ((stack1 = container.invokePartial(partials["progress-bar"],depth0,{"name":"progress-bar","hash":{"value":(depth0 != null ? depth0.value : depth0),"max":(depth0 != null ? depth0.max : depth0),"postLabel":(depth0 != null ? depth0.postLabel : depth0),"preLabel":(depth0 != null ? depth0.preLabel : depth0)},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34169},"2":function(container,depth0,helpers,partials,data) { 34170 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 34171 34172 return " <div class=\"free-shipping-amount\" data-property=\"" 34173 + ((stack1 = helpers.i18n.call(alias1,"global.TMNT.freeShippingAmount.key",{"name":"i18n","hash":{},"data":data})) != null ? stack1 : "") 34174 + "\">\n " 34175 + ((stack1 = helpers.i18n.call(alias1,"global.TMNT.freeShippingAmount.value",(depth0 != null ? depth0.amountToFreeShippingFmt : depth0),{"name":"i18n","hash":{},"data":data})) != null ? stack1 : "") 34176 + "\n </div>\n"; 34177},"4":function(container,depth0,helpers,partials,data) { 34178 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 34179 34180 return " <div class=\"free-shipping-earned\" data-property=\"" 34181 + ((stack1 = helpers.i18n.call(alias1,"global.TMNT.freeShippingEarned.key",{"name":"i18n","hash":{},"data":data})) != null ? stack1 : "") 34182 + "\">\n " 34183 + ((stack1 = helpers.i18n.call(alias1,"global.TMNT.freeShippingEarned.value",{"name":"i18n","hash":{},"data":data})) != null ? stack1 : "") 34184 + "\n </div>\n"; 34185},"6":function(container,depth0,helpers,partials,data) { 34186 return ""; 34187},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34188 var stack1; 34189
34190 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isVisible : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34191},"usePartial":true,"useData":true})); 34192 34193return this["ANF"]; 34194 34195}); 34196redesign.define('corePartial/lowInventory',['handlebars','dsPartial/link','dsPartial/button-with-link'], function(Handlebars) { 34197 34198this["ANF"] = this["ANF"] || {}; 34199this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34200 34201Handlebars.registerPartial("lowInventory", this["ANF"]["templates"]["lowInventory"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34202 return ""; 34203},"3":function(container,depth0,helpers,partials,data) { 34204 return " id=\"button-link\" "; 34205},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 34206 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34207 34208 return "<div class='cartReminder lowInventory'>\n " 34209 + ((stack1 = container.invokePartial(partials.link,depth0,{"name":"link","hash":{"href":"#","class-list":"clockIcon"},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34210 + "\n <p class='reminderHeader' data-property='" 34211 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.lowInventoryHeaderMessage : stack1)) != null ? stack1.key : stack1), depth0)) 34212 + "'>\n " 34213 + ((stack1 = alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.lowInventoryHeaderMessage : stack1)) != null ? stack1.value : stack1), depth0)) != null ? stack1 : "") 34214 + "</p>\n <p class='reminderMsg' data-property='" 34215 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.lowInventoryMessage : stack1)) != null ? stack1.key : stack1), depth0)) 34216 + "'>" 34217 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.lowInventoryMessage : stack1)) != null ? stack1.value : stack1), depth0)) 34218 + "\n </p>\n\n " 34219 + ((stack1 = container.invokePartial(partials["button-with-link"],depth0,{"name":"button-with-link","hash":{"link-label":((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.noThanksMessage : stack1)) != null ? stack1.value : stack1),"button-label":((stack1 = ((stack1 = (depth0 != null ? depth0.messaging : depth0)) != null ? stack1.buttonText : stack1)) != null ? stack1.value : stack1),"button-variant":"primary","inline-prop":"dataProperties"},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34220 + "\n</div>"; 34221},"main_d": function(fn, props, container, depth0, data, blockParams, depths) { 34222 34223 var decorators = container.decorators; 34224 34225 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"args":["dataProperties"],"data":data}) || fn; 34226 return fn; 34227 } 34228 34229,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true})); 34230 34231return this["ANF"]; 34232 34233}); 34234redesign.define('dsPartial/transaction-summary',['handlebars','dsPartial/helpers/class-list','dsPartial/transaction-summary','dsPartial/link','dsPartial/button','dsHelper/is'], function(Handlebars) { 34235 34236this["ANF"] = this["ANF"] || {}; 34237this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34238 34239Handlebars.registerPartial("transaction-summary", this["ANF"]["templates"]["transaction-summary"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34240 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 34241 34242 return " <tr>\n <td class=\"transaction-summary-item-label\">\n" 34243 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.label : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34244 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.link : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34245 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.button : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34246 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.count : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34247 + " </td>\n <td class=\"transaction-summary-item-amount\">\n" 34248 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.free : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(15, data, 0),"data":data})) != null ? stack1 : "") 34249 + " </td>\n </tr>\n"; 34250},"2":function(container,depth0,helpers,partials,data) { 34251 return container.escapeExpression(container.lambda((depth0 != null ? depth0.label : depth0), depth0)); 34252},"4":function(container,depth0,helpers,partials,data) { 34253 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34254 34255 return " <a href=\"" 34256 + alias2(alias1(((stack1 = (depth0 != null ? depth0.link : depth0)) != null ? stack1.href : stack1), depth0)) 34257 + "\" class=\"transaction-summary-link\">" 34258 + alias2(alias1(((stack1 = (depth0 != null ? depth0.link : depth0)) != null ? stack1.label : stack1), depth0)) 34259 + "</a>\n"; 34260},"6":function(container,depth0,helpers,partials,data) { 34261 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34262 34263 return " <button class=\"button-as-link\" " 34264 + alias2(alias1(((stack1 = (depth0 != null ? depth0.button : depth0)) != null ? stack1["data-prop"] : stack1), depth0)) 34265 + " type=\"button\">" 34266 + alias2(alias1(((stack1 = (depth0 != null ? depth0.button : depth0)) != null ? stack1.label : stack1), depth0)) 34267 + "</button>\n"; 34268},"8":function(container,depth0,helpers,partials,data) { 34269 return " (" 34270 + container.escapeExpression(container.lambda((depth0 != null ? depth0.count : depth0), depth0)) 34271 + ")\n"; 34272},"10":function(container,depth0,helpers,partials,data) { 34273 var stack1; 34274
34275 return ((stack1 = helpers.is.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.amount : depth0),0,{"name":"is","hash":{},"fn":container.program(11, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : ""); 34276},"11":function(container,depth0,helpers,partials,data) { 34277 return " <span class=\"transaction-summary-negative\">" 34278 + container.escapeExpression(container.lambda((depth0 != null ? depth0.free : depth0), depth0)) 34279 + "</span>\n"; 34280},"13":function(container,depth0,helpers,partials,data) { 34281 var stack1; 34282 34283 return " " 34284 + ((stack1 = container.lambda((depth0 != null ? depth0["amount-formatted"] : depth0), depth0)) != null ? stack1 : "") 34285 + "\n"; 34286},"15":function(container,depth0,helpers,partials,data) { 34287 var stack1; 34288 34289 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.negative : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : ""); 34290},"16":function(container,depth0,helpers,partials,data) { 34291 var stack1; 34292 34293 return " <span class=\"transaction-summary-negative\">" 34294 + ((stack1 = container.lambda((depth0 != null ? depth0["amount-formatted"] : depth0), depth0)) != null ? stack1 : "") 34295 + "</span>\n"; 34296},"18":function(container,depth0,helpers,partials,data) { 34297 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda; 34298 34299 return " <tr class=\"transaction-summary-footer\">\n <td class=\"" 34300 + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.footer : depth0)) != null ? stack1.negative : stack1),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.program(21, data, 0),"data":data})) != null ? stack1 : "") 34301 + "\">\n <span class=\"transaction-summary-tooltip-wrapper\">\n " 34302 + container.escapeExpression(alias2(((stack1 = (depth0 != null ? depth0.footer : depth0)) != null ? stack1.label : stack1), depth0)) 34303 + "\n " 34304 + ((stack1 = container.invokePartial(partials["transaction-summary-tooltip"],depth0,{"name":"transaction-summary-tooltip","fn":container.program(23, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34305 + "\n </span>\n </td>\n <td class=\"transaction-summary-item-amount " 34306 + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.footer : depth0)) != null ? stack1.negative : stack1),{"name":"if","hash":{},"fn":container.program(25, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34307 + "\">" 34308 + ((stack1 = alias2(((stack1 = (depth0 != null ? depth0.footer : depth0)) != null ? stack1["amount-formatted"] : stack1), depth0)) != null ? stack1 : "") 34309 + "</td>\n </tr>\n"; 34310},"19":function(container,depth0,helpers,partials,data) { 34311 return "transaction-summary-item-question transaction-summary-negative"; 34312},"21":function(container,depth0,helpers,partials,data) { 34313 return "transaction-summary-item-label"; 34314},"23":function(container,depth0,helpers,partials,data) { 34315 return ""; 34316},"25":function(container,depth0,helpers,partials,data) { 34317 return "transaction-summary-negative"; 34318},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34319 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 34320 34321 return "<table class=\"transaction-summary " 34322 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34323 + "\" role=\"presentation\">\n <caption class=\"transaction-summary-caption\">\n <span class=\"transaction-summary-caption-text\">" 34324 + alias2(alias1((depth0 != null ? depth0["transaction-summary"] : depth0), depth0)) 34325 + "</span>\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">
34325\n <span class=\"transaction-summary-col-header-text\">" 34326 + alias2(alias1((depth0 != null ? depth0["transaction-item"] : depth0), depth0)) 34327 + "</span>\n </th>\n <th scope=\"col\">\n <span class=\"transaction-summary-col-header-text\">" 34328 + ((stack1 = alias1((depth0 != null ? depth0.price : depth0), depth0)) != null ? stack1 : "") 34329 + "</span>\n </th>\n </tr>\n </thead>\n <tbody>\n" 34330 + ((stack1 = helpers.each.call(alias3,(depth0 != null ? depth0.items : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34331 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.footer : depth0),{"name":"if","hash":{},"fn":container.program(18, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34332 + " </tbody>\n</table>\n"; 34333},"usePartial":true,"useData":true})); 34334 34335return this["ANF"]; 34336 34337}); 34338redesign.define('dsPartial/pagination',['handlebars','dsPartial/helpers/class-list','dsHelper/is'], function(Handlebars) { 34339 34340this["ANF"] = this["ANF"] || {}; 34341this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34342 34343Handlebars.registerPartial("pagination", this["ANF"]["templates"]["pagination"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34344 return "data-type=\"abbreviated\""; 34345},"3":function(container,depth0,helpers,partials,data) { 34346 return " disabled"; 34347},"5":function(container,depth0,helpers,partials,data) { 34348 return container.escapeExpression(container.lambda((depth0 != null ? depth0["skip-to-first-page-button-spoken-word-label"] : depth0), depth0)) 34349 + "\n "; 34350},"7":function(container,depth0,helpers,partials,data) { 34351 return "Skip To First Page"; 34352},"9":function(container,depth0,helpers,partials,data) { 34353 return container.escapeExpression(container.lambda((depth0 != null ? depth0["previous-page-button-spoken-word-label"] : depth0), depth0)) 34354 + "\n "; 34355},"11":function(container,depth0,helpers,partials,data) { 34356 return "Previous Page"; 34357},"13":function(container,depth0,helpers,partials,data) { 34358 return " aria-live=\"assertive\" ";
34359},"15":function(container,depth0,helpers,partials,data,blockParams,depths) { 34360 var stack1; 34361 34362 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.pages : depth0),{"name":"each","hash":{},"fn":container.program(16, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34363},"16":function(container,depth0,helpers,partials,data,blockParams,depths) { 34364 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34365 34366 return " <li>\n <div class=\"pagination-item js-pagination-page\"\n " 34367 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.active : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34368 + " aria-label=\"Page " 34369 + alias2(alias1((depth0 != null ? depth0.label : depth0), depth0)) 34370 + " of " 34371 + alias2(alias1(((stack1 = (depths[1] != null ? depths[1].pages : depths[1])) != null ? stack1.length : stack1), depth0)) 34372 + "\">\n <span class=\"pagination-item-text\">" 34373 + alias2(alias1((depth0 != null ? depth0.label : depth0), depth0)) 34374 + " of " 34375 + alias2(alias1(((stack1 = (depths[1] != null ? depths[1].pages : depths[1])) != null ? stack1.length : stack1), depth0)) 34376 + "</span>\n </div>\n </li>\n"; 34377},"17":function(container,depth0,helpers,partials,data) { 34378 return " aria-current=\"page\""; 34379},"19":function(container,depth0,helpers,partials,data) { 34380 var stack1; 34381 34382 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.pages : depth0),{"name":"each","hash":{},"fn":container.program(20, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34383},"20":function(container,depth0,helpers,partials,data) { 34384 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34385 34386 return " <li>\n <button type=\"button\" class=\"pagination-item js-pagination-page\"\n " 34387 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.active : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34388 + "\n aria-label=\"Page " 34389 + alias2(alias1((depth0 != null ? depth0.label : depth0), depth0)) 34390 + "\">\n <span class=\"pagination-item-text\">" 34391 + alias2(alias1((depth0 != null ? depth0.label : depth0), depth0)) 34392 + "</span>\n </button>\n </li>\n"; 34393},"22":function(container,depth0,helpers,partials,data) { 34394 return container.escapeExpression(container.lambda((depth0 != null ? depth0["next-page-button-spoken-word-label"] : depth0), depth0)) 34395 + "\n "; 34396},"24":function(container,depth0,helpers,partials,data) { 34397 return "Next Page"; 34398},"26":function(container,depth0,helpers,partials,data) { 34399 return container.escapeExpression(container.lambda((depth0 != null ? depth0["skip-to-last-page-button-spoken-word-label"] : depth0), depth0)) 34400 + "\n "; 34401},"28":function(container,depth0,helpers,partials,data) { 34402 return "Skip To Last Page"; 34403},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 34404 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 34405 34406 return "<nav\n aria-label=\"Pagination\"\n class=\"pagination js-pagination " 34407 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34408 + "\"\n data-js-component=\"pagination\"\n " 34409 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.type : depth0),"abbreviated",{"name":"is","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34410 + "\n id=\"" 34411 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 34412 + "\">\n\n <button aria-controls=\"" 34413 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 34414 + "-control\" type=\"button\" class=\"pagination-item js-control-first control-first pagination-control-button\"" 34415 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.prevDisabled : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34416 + ">\n <span class=\"pagination-control-label\">\n " 34417 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["skip-to-first-page-button-spoken-word-label"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0, blockParams, depths),"inverse":container.program(7, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 34418 + "\n </span>\n <span class=\"pagination-item-text pagination-item-text-beginning\"></span>\n </button>\n\n <button aria-controls=\"" 34419 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 34420 + "-control\" type=\"button\" class=\"pagination-item js-control-prev control-prev pagination-control-button\"\n " 34421 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.prevDisabled : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34422 + ">\n <span class=\"pagination-control-label\">\n " 34423 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["previous-page-button-spoken-word-label"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0, blockParams, depths),"inverse":container.program(11, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 34424 + "\n </span>\n <span class=\"pagination-item-text pagination-item-text-prev\"></span>\n </button>\n\n <ul class=\"js-pagination-pages pagination-pages\" id=\"" 34425 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 34426 + "-control\" " 34427 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.type : depth0),"abbreviated",{"name":"is","hash":{},"fn":container.program(13, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34428 + ">\n" 34429 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.type : depth0),"abbreviated",{"name":"is","hash":{},"fn":container.program(15, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34430 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.type : depth0),"abbreviated",{"name":"is","hash":{},"fn":container.noop,"inverse":container.program(19, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 34431 + " </ul>\n\n <button aria-controls=\"" 34432 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 34433 + "-control\" type=\"button\" class=\"pagination-item js-control-next control-next pagination-control-button\"" 34434 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.nextDisabled : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34435 + ">\n <span class=\"pagination-control-label\">\n " 34436 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["next-page-button-spoken-word-label"] : depth0),{"name":"if","hash":{},"fn":container.program(22, data, 0, blockParams, depths),"inverse":container.program(24, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 34437 + "\n </span>\n <span class=\"pagination-item-text pagination-item-text-next\"></span>\n </button>\n\n <button aria-controls=\"" 34438 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 34439 + "-control\" type=\"button\" class=\"pagination-item js-control-last control-last pagination-control-button\"\n " 34440 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.nextDisabled : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34441 + ">\n <span class=\"pagination-control-label\">\n " 34442 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["skip-to-last-page-button-spoken-word-label"] : depth0),{"name":"if","hash":{},"fn":container.program(26, data, 0, blockParams, depths),"inverse":container.program(28, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 34443 + "\n </span>\n <span class=\"pagination-item-text pagination-item-text-end\"></span>\n </button>\n\n</nav>\n"; 34444},"usePartial":true,"useData":true,"useDepths":true})); 34445 34446return this["ANF"]; 34447 34448}); 34449redesign.define('dsPartial/product-template',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
34449data-prop'], function(Handlebars) { 34450 34451this["ANF"] = this["ANF"] || {}; 34452this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34453 34454Handlebars.registerPartial("product-template", this["ANF"]["templates"]["product-template"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34455 return ""; 34456},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34457 var stack1; 34458 34459 return "<div class=\"product-template " 34460 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34461 + "\" " 34462 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34463 + " >\n <div class=\"product-header\">\n " 34464 + ((stack1 = container.invokePartial(partials["product-header"],depth0,{"name":"product-header","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34465 + "\n </div>\n\n <div class=\"product-image-section\">\n " 34466 + ((stack1 = container.invokePartial(partials["product-image-section"],depth0,{"name":"product-image-section","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34467 + "\n </div>\n\n <div class=\"product-content\">\n " 34468 + ((stack1 = container.invokePartial(partials["product-content"],depth0,{"name":"product-content","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34469 + "\n </div>\n\n <div class=\"product-secondary-content\">\n " 34470 + ((stack1 = container.invokePartial(partials["product-secondary-content"],depth0,{"name":"product-secondary-content","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34471 + "\n </div>\n\n <div class=\"product-footer\">\n " 34472 + ((stack1 = container.invokePartial(partials["product-footer"],depth0,{"name":"product-footer","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34473 + "\n </div>\n</div>\n"; 34474},"usePartial":true,"useData":true})); 34475 34476return this["ANF"]; 34477 34478}); 34479redesign.define('dsPartial/product-image',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 34480 34481this["ANF"] = this["ANF"] || {}; 34482this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34483 34484Handlebars.registerPartial("product-image", this["ANF"]["templates"]["product-image"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34485 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34486 34487 return "<div class=\"product-image " 34488 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34489 + "\">\n <img alt=\"" 34490 + alias2(alias1((depth0 != null ? depth0.alt : depth0), depth0)) 34491 + "\" src=\"" 34492 + alias2(alias1((depth0 != null ? depth0.src : depth0), depth0)) 34493 + "\">\n</div>\n"; 34494},"usePartial":true,"useData":true})); 34495 34496return this["ANF"]; 34497 34498}); 34499redesign.define('dsPartial/product-detail',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 34500 34501this["ANF"] = this["ANF"] || {}; 34502this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34503 34504Handlebars.registerPartial("product-detail", this["ANF"]["templates"]["product-detail"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34505 var stack1; 34506 34507 return "<p class=\"product-detail " 34508 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34509 + "\" data-variant=\"" 34510 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 34511 + "\">\n" 34512 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34513 + "</p>\n"; 34514},"usePartial":true,"useData":true})); 34515 34516return this["ANF"]; 34517 34518});
34519redesign.define('dsPartial/helpers/data-brand',['handlebars'], function(Handlebars) { 34520 34521this["ANF"] = this["ANF"] || {}; 34522this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34523 34524Handlebars.registerPartial("helpers/data-brand", this["ANF"]["templates"]["helpers/data-brand"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34525 return " data-brand=\"" 34526 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 34527 + "\""; 34528},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34529 var stack1; 34530 34531 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34532 + "\n"; 34533},"useData":true})); 34534 34535return this["ANF"]; 34536 34537}); 34538redesign.define('dsPartial/product-name',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-brand'], function(Handlebars) { 34539 34540this["ANF"] = this["ANF"] || {}; 34541this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34542 34543Handlebars.registerPartial("product-name", this["ANF"]["templates"]["product-name"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34544 return " data-size=\"" 34545 + container.escapeExpression(container.lambda((depth0 != null ? depth0.size : depth0), depth0)) 34546 + "\""; 34547},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34548 var stack1; 34549 34550 return "<div class=\"product-name product-name-font-size " 34551 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34552 + "\"\n " 34553 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.size : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34554 + "\n " 34555 + ((stack1 = container.invokePartial(partials["helpers/data-brand"],depth0,{"name":"helpers/data-brand","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34556 + ">\n" 34557 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34558 + "</div>\n"; 34559},"usePartial":true,"useData":true})); 34560 34561return this["ANF"]; 34562 34563}); 34564redesign.define('dsPartial/product-price',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop'], function(Handlebars) { 34565 34566this["ANF"] = this["ANF"] || {}; 34567this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34568 34569Handlebars.registerPartial("product-price", this["ANF"]["templates"]["product-price"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34570 return "data-brand=\"" 34571 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 34572 + "\""; 34573},"3":function(container,depth0,helpers,partials,data) { 34574 return " <span class=\"clearance-badge\">" 34575 + container.escapeExpression(container.lambda((depth0 != null ? depth0["clearance-text"] : depth0), depth0)) 34576 + "</span>\n"; 34577},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34578 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 34579 34580 return "<span class=\"product-price " 34581 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34582 + "\"\n " 34583 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34584 + "\n data-variant=\"" 34585 + alias3(alias2((depth0 != null ? depth0.type : depth0), depth0)) 34586 + "\"\n" 34587 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34588 + ">\n <span class=\"screen-reader-text\">" 34589 + alias3(alias2((depth0 != null ? depth0.description : depth0), depth0)) 34590 + "</span>\n <span class=\"product-price-text-wrapper\" aria-hidden=\"true\">\n" 34591 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34592 + " </span>\n" 34593 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["clearance-text"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34594 + "</span>\n"; 34595},"usePartial":true,"useData":true})); 34596 34597return this["ANF"]; 34598 34599}); 34600redesign.define('dsPartial/product-price-text',['handlebars'], function(Handlebars) { 34601 34602this["ANF"] = this["ANF"] || {}; 34603this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34604 34605Handlebars.registerPartial("product-price-text", this["ANF"]["templates"]["product-price-text"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34606 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34607 34608 return "<span class=\"product-price-text product-price-font-size\" data-variant=\"" 34609 + alias2(alias1((depth0 != null ? depth0.type : depth0), depth0)) 34610 + "\" data-size=\"" 34611 + alias2(alias1((depth0 != null ? depth0.size : depth0), depth0)) 34612 + "\">"
34613 + ((stack1 = alias1((depth0 != null ? depth0["formatted-price"] : depth0), depth0)) != null ? stack1 : "") 34614 + "</span>\n"; 34615},"useData":true})); 34616 34617return this["ANF"]; 34618 34619}); 34620redesign.define('corePartial/minibag',['handlebars','dsPartial/transaction-summary','corePartial/freeShippingProgress','corePartial/checkoutButton','dsPartial/link-as-button','dsPartial/pagination','dsPartial/product-template','dsPartial/product-image','dsPartial/product-detail','dsHelper/concat','dsPartial/product-name','dsPartial/product-price','dsPartial/product-price-text'], function(Handlebars) { 34621 34622this["ANF"] = this["ANF"] || {}; 34623this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34624 34625Handlebars.registerPartial("minibag", this["ANF"]["templates"]["minibag"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34626 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34627 34628 return " <a class=\"rs-mini-bag__title\" href=\"" 34629 + alias2(alias1(((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.href : stack1), depth0)) 34630 + "\">\n " 34631 + alias2(alias1(((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.linkLabel : stack1), depth0)) 34632 + "\n </a>\n"; 34633},"3":function(container,depth0,helpers,partials,data) { 34634 var stack1; 34635 34636 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.isVisible : stack1),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34637},"4":function(container,depth0,helpers,partials,data) { 34638 var stack1; 34639 34640 return ((stack1 = container.invokePartial(partials["transaction-summary"],(depth0 != null ? depth0.props : depth0),{"name":"transaction-summary","data":data,"indent":"\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34641},"6":function(container,depth0,helpers,partials,data) { 34642 var stack1; 34643 34644 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.isVisible : stack1),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34645},"7":function(container,depth0,helpers,partials,data) { 34646 var stack1; 34647 34648 return " <p class=\"promo-wrapper\">\n " 34649 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.text : stack1), depth0)) 34650 + "\n </p>\n"; 34651},"9":function(container,depth0,helpers,partials,data,blockParams,depths) { 34652 var stack1; 34653 34654 return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.isCartEmpty : stack1),{"name":"unless","hash":{},"fn":container.program(10, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34655},"10":function(container,depth0,helpers,partials,data,blockParams,depths) { 34656 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 34657 34658 return ((stack1 = helpers["with"].call(alias1,(depths[1] != null ? depths[1].freeShippingMessage : depths[1]),{"name":"with","hash":{},"fn":container.program(11, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34659 + ((stack1 = helpers["with"].call(alias1,(depths[1] != null ? depths[1].checkoutButton : depths[1]),{"name":"with","hash":{},"fn":container.program(13, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34660},"11":function(container,depth0,helpers,partials,data) { 34661 var stack1; 34662 34663 return ((stack1 = container.invokePartial(partials.freeShippingProgress,depth0,{"name":"freeShippingProgress","data":data,"indent":"\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34664},"13":function(container,depth0,helpers,partials,data) { 34665 var stack1; 34666
34667 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.showCheckoutButton : stack1),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34668},"14":function(container,depth0,helpers,partials,data) { 34669 var stack1; 34670 34671 return ((stack1 = container.invokePartial(partials.checkoutButton,depth0,{"name":"checkoutButton","data":data,"indent":"\t\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34672},"16":function(container,depth0,helpers,partials,data) { 34673 var stack1; 34674 34675 return ((stack1 = container.invokePartial(partials["link-as-button"],depth0,{"name":"link-as-button","hash":{"aria-label":((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.buttonLabel : stack1),"href":((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.href : stack1),"button-type":((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.buttonType : stack1),"class-list":"bag-details-link"},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34676},"17":function(container,depth0,helpers,partials,data) { 34677 var stack1; 34678 34679 return " " 34680 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.buttonLabel : stack1), depth0)) 34681 + "\n"; 34682},"19":function(container,depth0,helpers,partials,data) { 34683 var stack1; 34684 34685 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.isVisible : stack1),{"name":"if","hash":{},"fn":container.program(20, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34686},"20":function(container,depth0,helpers,partials,data) { 34687 var stack1; 34688 34689 return ((stack1 = container.invokePartial(partials.pagination,(depth0 != null ? depth0.props : depth0),{"name":"pagination","data":data,"indent":"\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34690},"22":function(container,depth0,helpers,partials,data,blockParams,depths) { 34691 var stack1; 34692 34693 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.isCartEmpty : stack1),{"name":"if","hash":{},"fn":container.program(23, data, 0, blockParams, depths),"inverse":container.program(25, data, 0, blockParams, depths),"data":data})) != null ? stack1 : ""); 34694},"23":function(container,depth0,helpers,partials,data) { 34695 var stack1; 34696 34697 return " <div class=\"rs-mini-bag__product-list rs-mini-bag__product-list--empty\">\n <p>" 34698 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.emptyCartText : stack1), depth0)) 34699 + "</p>\n </div>\n"; 34700},"25":function(container,depth0,helpers,partials,data,blockParams,depths) { 34701 var stack1; 34702 34703 return " <ul class=\"rs-mini-bag__product-list\">\n" 34704 + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.items : stack1),{"name":"each","hash":{},"fn":container.program(26, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34705 + " </ul>\n"; 34706},"26":function(container,depth0,helpers,partials,data,blockParams,depths) { 34707 var stack1; 34708 34709 return " <li class=\"rs-mini-bag__product-wrapper\">\n" 34710 + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.blankItem : depth0),{"name":"unless","hash":{},"fn":container.program(27, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34711 + " </li>\n"; 34712},"27":function(container,depth0,helpers,partials,data,blockParams,depths) { 34713 var stack1; 34714 34715 return "\n" 34716 + ((stack1 = container.invokePartial(partials["product-template"],depth0,{"name":"product-template","hash":{"data-
34716prop":(depth0 != null ? depth0.productTemplateProps : depth0),"class-list":"rs-mini-bag__product"},"fn":container.program(28, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34717},"28":function(container,depth0,helpers,partials,data,blockParams,depths) { 34718 return "\n\n\n"; 34719},"29":function(container,depth0,helpers,partials,data) { 34720 var stack1; 34721 34722 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isPersonalizedFierce : depth0),{"name":"if","hash":{},"fn":container.program(30, data, 0),"inverse":container.program(32, data, 0),"data":data})) != null ? stack1 : ""); 34723},"30":function(container,depth0,helpers,partials,data) { 34724 var stack1; 34725 34726 return ((stack1 = container.invokePartial(partials["product-image"],depth0,{"name":"product-image","hash":{"class-list":(depth0 != null ? depth0.classList : depth0),"alt":(depth0 != null ? depth0.imageAltTagValue : depth0),"src":(depth0 != null ? depth0.imgURL : depth0)},"data":data,"indent":"\t\t\t\t\t\t\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34727},"32":function(container,depth0,helpers,partials,data) { 34728 var stack1; 34729 34730 return " <a href=\"" 34731 + container.escapeExpression(container.lambda((depth0 != null ? depth0.productURL : depth0), depth0)) 34732 + "\" tabindex=\"0\">\n" 34733 + ((stack1 = container.invokePartial(partials["product-image"],depth0,{"name":"product-image","hash":{"class-list":(depth0 != null ? depth0.classList : depth0),"alt":(depth0 != null ? depth0.imageAltTagValue : depth0),"src":(depth0 != null ? depth0.imgURL : depth0)},"data":data,"indent":"\t\t\t\t\t\t\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34734 + " </a>\n"; 34735},"34":function(container,depth0,helpers,partials,data) { 34736 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 34737 34738 return "\n <div class=\"rs-mini-bag__product-action-items\">\n" 34739 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.hasEdit : depth0),{"name":"if","hash":{},"fn":container.program(35, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34740 + "\n" 34741 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.hasRemove : depth0),{"name":"if","hash":{},"fn":container.program(37, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34742 + " </div>\n <div class=\"product-details\">\n" 34743 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.hasGenderBadge : depth0),{"name":"if","hash":{},"fn":container.program(39, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34744 + "\n" 34745 + ((stack1 = container.invokePartial(partials["product-name"],depth0,{"name":"product-name","fn":container.program(42, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34746 + "\n" 34747 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.hasDiscount : depth0),{"name":"if","hash":{},"fn":container.program(44, data, 0),"inverse":container.program(47, data, 0),"data":data})) != null ? stack1 : "") 34748 + " </div>\n"; 34749},"35":function(container,depth0,helpers,partials,data) { 34750 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34751 34752 return " <a class=\"product-actions rs-mini-bag-product__edit product-quickview__edit-button product-quickview__button\" href=\"" 34753 + alias2(alias1((depth0 != null ? depth0.productURL : depth0), depth0)) 34754 + "\" data-seq=\"" 34755 + alias2(alias1(((stack1 = (depth0 != null ? depth0.item : depth0)) != null ? stack1.swatchSequence : stack1), depth0)) 34756 + "\" data-faceout=\"prod1\" data-sku=\"" 34757 + alias2(alias1((depth0 != null ? depth0.shortSku : depth0), depth0)) 34758 + "\" data-orderItemId=\"" 34759 + alias2(alias1((depth0 != null ? depth0.orderItemId : depth0), depth0)) 34760 + "\" data-productId=\"" 34761 + alias2(alias1((depth0 != null ? depth0.productId : depth0), depth0)) 34762 + "\" data-collectionId=\"" 34763 + alias2(alias1((depth0 != null ? depth0.collection : depth0), depth0)) 34764 + "\" tabindex=\"0\" data-product-brand=\"" 34765 + alias2(alias1(((stack1 = (depth0 != null ? depth0.item : depth0)) != null ? stack1.brand : stack1), depth0)) 34766 + "\" data-title=\"" 34767 + alias2(alias1((depth0 != null ? depth0.editText : depth0), depth0)) 34768 + "\" >" 34769 + alias2(alias1((depth0 != null ? depth0.editText : depth0), depth0)) 34770 + "</a>\n"; 34771},"37":function(container,depth0,helpers,partials,data) { 34772 var alias1=container.lambda, alias2=container.escapeExpression; 34773 34774 return " <a class=\"product-actions rs-mini-bag-product__remove\" data-title=\"" 34775 + alias2(alias1((depth0 != null ? depth0.removeText : depth0), depth0)) 34776 + "\" href=\"#\" data-property=\"GLB_REMOVE\" data-orderitemid=\"" 34777 + alias2(alias1((depth0 != null ? depth0.orderItemId : depth0), depth0)) 34778 + "\" tabindex=\"0\">\n " 34779 + alias2(alias1((depth0 != null ? depth0.removeText : depth0), depth0)) 34780 + "\n </a>\n"; 34781},"39":function(container,depth0,helpers,partials,data) { 34782 var stack1; 34783 34784 return ((stack1 = container.invokePartial(partials["product-detail"],depth0,{"name":"product-detail","hash":{"class-list":helpers.concat.call(depth0 != null ? depth0 : (container.nullContext || {}),"rs-mini-bag-product__gender ",((stack1 = (depth0 != null ? depth0.item : depth0)) != null ? stack1.brand : stack1),{"name":"concat","hash":{},"data":data})},"fn":container.program(40, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34785},"40":function(container,depth0,helpers,partials,data) { 34786 var stack1; 34787 34788 return " " 34789 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.item : depth0)) != null ? stack1.departmentName : stack1), depth0)) 34790 + "\n"; 34791},"42":function(container,depth0,helpers,partials,data) { 34792 var stack1; 34793 34794 return " " 34795 + ((stack1 = container.lambda((depth0 != null ? depth0.productName : depth0), depth0)) != null ? stack1 : "") 34796 + "\n"; 34797},"44":function(container,depth0,helpers,partials,data) { 34798 var stack1; 34799 34800 return ((stack1 = container.invokePartial(partials["product-price"],depth0,{"name":"product-price","hash":{"data-aui":"member-price","description":helpers.concat.call(depth0 != null ? depth0 : (container.nullContext || {}),"Was ",(depth0 != null ? depth0.listPriceFmt : depth0)," Now ",(depth0 != null ? depth0.priceFmt : depth0),{"name":"concat","hash":{},"data":data})},"fn":container.program(45, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34801},"45":function(container,depth0,helpers,partials,data) { 34802 var stack1; 34803 34804 return ((stack1 = container.invokePartial(partials["product-price-text"],depth0,{"name":"product-price-text","hash":{"type":"original","formatted-
34804price":(depth0 != null ? depth0.listPriceFmt : depth0)},"data":data,"indent":"\t\t\t\t\t\t\t\t\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34805 + ((stack1 = container.invokePartial(partials["product-price-text"],depth0,{"name":"product-price-text","hash":{"type":(depth0 != null ? depth0.priceType : depth0),"formatted-price":(depth0 != null ? depth0.priceFmt : depth0)},"data":data,"indent":"\t\t\t\t\t\t\t\t\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34806},"47":function(container,depth0,helpers,partials,data) { 34807 var stack1; 34808 34809 return ((stack1 = container.invokePartial(partials["product-price"],depth0,{"name":"product-price","hash":{"description":(depth0 != null ? depth0.priceFmt : depth0)},"fn":container.program(48, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34810},"48":function(container,depth0,helpers,partials,data) { 34811 var stack1; 34812 34813 return ((stack1 = container.invokePartial(partials["product-price-text"],depth0,{"name":"product-price-text","hash":{"formatted-price":(depth0 != null ? depth0.priceFmt : depth0)},"data":data,"indent":"\t\t\t\t\t\t\t\t\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34814},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 34815 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 34816 34817 return "<div class=\"rs-mini-bag\">\n <div class=\"rs-mini-bag__header\">\n" 34818 + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.detailsButton : depth0),{"name":"with","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34819 + "\n" 34820 + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.transactionSummary : depth0),{"name":"with","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34821 + "\n" 34822 + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.promoText : depth0),{"name":"with","hash":{},"fn":container.program(6, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34823 + " </div>\n\n <div class=\"rs-nav-menu__content\">\n" 34824 + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.products : depth0),{"name":"with","hash":{},"fn":container.program(9, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34825 + "\n" 34826 + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.detailsButton : depth0),{"name":"with","hash":{},"fn":container.program(16, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34827 + "\n <hr>\n\n" 34828 + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.pagination : depth0),{"name":"with","hash":{},"fn":container.program(19, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34829 + "\n" 34830 + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.products : depth0),{"name":"with","hash":{},"fn":container.program(22, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34831 + " </div>\n</div>\n"; 34832},"28_d": function(fn, props, container, depth0, data, blockParams, depths) { 34833 34834 var decorators = container.decorators; 34835 34836 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(29, data, 0, blockParams, depths),"inverse":container.noop,"args":["product-image-section"],"data":data}) || fn; 34837 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(34, data, 0, blockParams, depths),"inverse":container.noop,"args":["product-footer"],"data":data}) || fn; 34838 return fn; 34839 } 34840 34841,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true})); 34842 34843return this["ANF"]; 34844 34845}); 34846redesign.define('dsPartial/discount-card',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
34846data-prop','dsPartial/helpers/invalid','dsHelper/getId','dsPartial/error-message'], function(Handlebars) { 34847 34848this["ANF"] = this["ANF"] || {}; 34849this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34850 34851Handlebars.registerPartial("discount-card", this["ANF"]["templates"]["discount-card"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34852 var stack1; 34853 34854 return ((stack1 = helpers.getId.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.id : depth0),{"name":"getId","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34855},"2":function(container,depth0,helpers,partials,data) { 34856 return " id=\"" 34857 + container.escapeExpression(container.lambda(depth0, depth0)) 34858 + "\"\n"; 34859},"4":function(container,depth0,helpers,partials,data) { 34860 return " id=\"" 34861 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 34862 + "\"\n"; 34863},"6":function(container,depth0,helpers,partials,data) { 34864 var stack1; 34865 34866 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.generateId : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.program(10, data, 0),"data":data})) != null ? stack1 : ""); 34867},"7":function(container,depth0,helpers,partials,data) { 34868 var stack1; 34869 34870 return ((stack1 = helpers.getId.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.id : depth0),{"name":"getId","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34871},"8":function(container,depth0,helpers,partials,data) { 34872 return " aria-describedby=\"" 34873 + container.escapeExpression(container.lambda(depth0, depth0)) 34874 + "-error-message\"\n"; 34875},"10":function(container,depth0,helpers,partials,data) { 34876 return " id=\"" 34877 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 34878 + "\"\n"; 34879},"12":function(container,depth0,helpers,partials,data) { 34880 var stack1; 34881 34882 return ((stack1 = container.invokePartial(partials["discount-badge"],depth0,{"name":"discount-badge","fn":container.program(13, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34883},"13":function(container,depth0,helpers,partials,data) { 34884 return ""; 34885},"15":function(container,depth0,helpers,partials,data,blockParams,depths) { 34886 var stack1; 34887 34888 return ((stack1 = helpers.getId.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.id : depth0),{"name":"getId","hash":{},"fn":container.program(16, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34889},"16":function(container,depth0,helpers,partials,data,blockParams,depths) { 34890 var stack1; 34891 34892 return ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","hash":{"error-message-text":(depths[1] != null ? depths[1]["error-message-text"] : depths[1]),"id":depth0},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34893},"18":function(container,depth0,helpers,partials,data) { 34894 var stack1; 34895 34896 return ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","hash":{"error-message-text":(depth0 != null ? depth0["error-message-text"] : depth0),"id":(depth0 != null ? depth0.id : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34897},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 34898 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 34899 34900 return "<div class=\"discount-card " 34901 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34902 + "\"\n data-variant=\"" 34903 + alias2(alias1((depth0 != null ? depth0.variant : depth0), depth0)) 34904 + "\"\n data-theme=\"" 34905 + alias2(alias1((depth0 != null ? depth0.theme : depth0), depth0)) 34906 + "\"\n data-expired=\"" 34907 + alias2(alias1((depth0 != null ? depth0.expired : depth0), depth0)) 34908 + "\"\n" 34909 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34910 + ((stack1 = container.invokePartial(partials["helpers/invalid"],depth0,{"name":"helpers/invalid","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34911 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.generateId : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.program(4, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 34912 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34913 + ">\n <div class=\"discount-content\">\n <div class=\"discount-info\">\n" 34914 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.badgeContent : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34915 + " <div class=\"discount-info-content\">\n <div class=\"discount-title\">\n" 34916 + ((stack1 = container.invokePartial(partials["discount-title"],depth0,{"name":"discount-title","fn":container.program(13, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34917 + " </div>
34917\n <span class=\"discount-description\">\n" 34918 + ((stack1 = container.invokePartial(partials["discount-description"],depth0,{"name":"discount-description","fn":container.program(13, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34919 + " </span>\n <span class=\"discount-details\">\n" 34920 + ((stack1 = container.invokePartial(partials["discount-details"],depth0,{"name":"discount-details","fn":container.program(13, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34921 + " </span>\n </div>\n </div>\n <div class=\"discount-actions\">\n" 34922 + ((stack1 = container.invokePartial(partials["discount-actions"],depth0,{"name":"discount-actions","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34923 + " </div>\n </div>\n" 34924 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.generateId : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0, blockParams, depths),"inverse":container.program(18, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 34925 + "</div>\n"; 34926},"usePartial":true,"useData":true,"useDepths":true})); 34927 34928return this["ANF"]; 34929 34930}); 34931redesign.define('dsPartial/graphic-badge',['handlebars','dsPartial/helpers/theme','dsPartial/helpers/class-list','dsPartial/helpers/data-prop'], function(Handlebars) { 34932 34933this["ANF"] = this["ANF"] || {}; 34934this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34935 34936Handlebars.registerPartial("graphic-badge", this["ANF"]["templates"]["graphic-badge"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 34937 return "data-state=\"" 34938 + container.escapeExpression(container.lambda((depth0 != null ? depth0["data-state"] : depth0), depth0)) 34939 + "\""; 34940},"3":function(container,depth0,helpers,partials,data) { 34941 return container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-hidden"] : depth0), depth0)); 34942},"5":function(container,depth0,helpers,partials,data) { 34943 return "true"; 34944},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 34945 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 34946 34947 return "<div class=\"graphic-badge\"\n" 34948 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["data-state"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 34949 + "\n" 34950 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34951 + "aria-hidden=\"" 34952 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["aria-hidden"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") 34953 + "\"\n" 34954 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34955 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 34956 + ">\n <div class=\"graphic-badge-inner\">\n <span class=\"graphic-badge-value\">" 34957 + ((stack1 = container.lambda((depth0 != null ? depth0.badgeContent : depth0), depth0)) != null ? stack1 : "") 34958 + "</span>\n </div>\n</div>\n"; 34959},"usePartial":true,"useData":true})); 34960 34961return this["ANF"]; 34962 34963}); 34964redesign.define('corePartial/rewardCoupons',['handlebars','dsPartial/discount-card','dsPartial/graphic-badge','wcsHelper/i18n','dsHelper/getId','wcsHelper/tmntAccount','dsPartial/button'], function(Handlebars) { 34965 34966this["ANF"] = this["ANF"] || {}; 34967this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 34968 34969Handlebars.registerPartial("rewardCoupons", this["ANF"]["templates"]["rewardCoupons"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { 34970 var stack1; 34971
34972 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.coupons : depth0)) != null ? stack1.length : stack1),{"name":"if","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34973},"2":function(container,depth0,helpers,partials,data,blockParams,depths) { 34974 var stack1; 34975 34976 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.coupons : depth0),{"name":"each","hash":{},"fn":container.program(3, data, 1, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34977},"3":function(container,depth0,helpers,partials,data,blockParams,depths) { 34978 var stack1; 34979 34980 return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = ((stack1 = ((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.children : stack1)) != null ? stack1.rewards : stack1)) != null ? stack1.props : stack1),{"name":"with","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34981},"4":function(container,depth0,helpers,partials,data,blockParams,depths) { 34982 var stack1; 34983 34984 return ((stack1 = container.invokePartial(partials["discount-card"],depth0,{"name":"discount-card","hash":{"error-message-text":((stack1 = ((stack1 = ((stack1 = (depth0 != null ? depth0.children : depth0)) != null ? stack1["error-message"] : stack1)) != null ? stack1.props : stack1)) != null ? stack1["error-message-text"] : stack1),"invalid":((stack1 = ((stack1 = ((stack1 = (depth0 != null ? depth0.children : depth0)) != null ? stack1["error-message"] : stack1)) != null ? stack1.props : stack1)) != null ? stack1.invalid : stack1),"badgeContent":(depth0 != null ? depth0.badgeContent : depth0),"variant":(depth0 != null ? depth0.variant : depth0),"id":(depth0 != null ? depth0.id : depth0)},"fn":container.program(5, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34985},"5":function(container,depth0,helpers,partials,data,blockParams,depths) { 34986 return ""; 34987},"6":function(container,depth0,helpers,partials,data) { 34988 var stack1; 34989 34990 return ((stack1 = container.invokePartial(partials["graphic-badge"],depth0,{"name":"graphic-badge","data":data,"indent":"\t\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 34991},"8":function(container,depth0,helpers,partials,data) { 34992 var stack1; 34993 34994 return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = ((stack1 = (depth0 != null ? depth0.children : depth0)) != null ? stack1["discount-title"] : stack1)) != null ? stack1.props : stack1),{"name":"with","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 34995},"9":function(container,depth0,helpers,partials,data) { 34996 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 34997 34998 return " <h2 class=\"h4\" data-property=\"" 34999 + alias2(alias1((depth0 != null ? depth0.offerHeaderKey : depth0), depth0)) 35000 + "\">" 35001 + ((stack1 = alias1((depth0 != null ? depth0.offerHeader : depth0), depth0)) != null ? stack1 : "") 35002 + "</h2>\n <h2 class=\"h4\" data-property=\"" 35003 + alias2(alias1((depth0 != null ? depth0.associatedPromoKey : depth0), depth0)) 35004 + "\">" 35005 + ((stack1 = alias1((depth0 != null ? depth0.associatedPromoName : depth0), depth0)) != null ? stack1 : "") 35006 + "</h2>\n" 35007 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.offerSubHeader : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35008},"10":function(container,depth0,helpers,partials,data) { 35009 var stack1; 35010 35011 return " <h3 class=\"bounce-back-subheader\">" 35012 + ((stack1 = container.lambda((depth0 != null ? depth0.offerSubHeader : depth0), depth0)) != null ? stack1 : "") 35013 + "</h3>\n"; 35014},"12":function(container,depth0,helpers,partials,data) { 35015 var stack1; 35016 35017 return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = ((stack1 = (depth0 != null ? depth0.children : depth0)) != null ? stack1["discount-description"] : stack1)) != null ? stack1.props : stack1),{"name":"with","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35018},"13":function(container,depth0,helpers,partials,data) { 35019 return " <span>Sub text</span>\n"; 35020},"15":function(container,depth0,helpers,partials,data) { 35021 var stack1; 35022 35023 return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = ((stack1 = (depth0 != null ? depth0.children : depth0)) != null ? stack1["discount-description"] : stack1)) != null ? stack1.props : stack1),{"name":"with","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35024},"16":function(container,depth0,helpers,partials,data) { 35025 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35026 35027 return " <span data-property=\"" 35028 + ((stack1 = helpers.i18n.call(alias1,"template.rewardCoupons.loyaltyExp.key",{"name":"i18n","hash":{},"data":data})) != null ? stack1 : "") 35029 + "\">" 35030 + ((stack1 = helpers.i18n.call(alias1,"template.rewardCoupons.loyaltyExp.value",{"name":"i18n","hash":{"0":(depth0 != null ? depth0.couponExpiryDate : depth0)},"data":data})) != null ? stack1 : "") 35031 + "</span>\n"; 35032},"18":function(container,depth0,helpers,partials,data) { 35033 var stack1; 35034 35035 return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = ((stack1 = (depth0 != null ? depth0.children : depth0)) != null ? stack1["discount-details"] : stack1)) != null ? stack1.props : stack1),{"name":"with","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35036},"19":function(container,depth0,helpers,partials,data) { 35037 var stack1, alias1=container.lambda, alias2=helpers.blockHelperMissing, alias3=depth0 != null ? depth0 : (container.nullContext || {}), alias4=container.escapeExpression; 35038 35039 return " <a target=\"_blank\" href=\"" 35040 + ((stack1 = alias2.call(depth0,alias1((depth0 != null ? depth0.isPromotion : depth0), depth0),{"name":"isPromotion","hash":{},"fn":container.program(20, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35041 + ((stack1 = alias2.call(depth0,alias1((depth0 != null ? depth0.isPromotion : depth0), depth0),{"name":"isPromotion","hash":{},"fn":container.noop,"inverse":container.program(22, data, 0),"data":data})) != null ? stack1 : "") 35042 + "\"\n aria-describedby=\"discount-title_exclusions_apply\" class=\"open-modal-link\" data-property=\"" 35043 + alias4(helpers.lookup.call(alias3,(depth0 != null ? depth0.exclusionsApplyTMNT : depth0),"key",{"name":"lookup","hash":{},"data":data})) 35044 + "\">" 35045 + alias4(helpers.lookup.call(alias3,(depth0 != null ? depth0.exclusionsApplyTMNT : depth0),"value",{"name":"lookup","hash":{},"data":data})) 35046 + "</a>\n"; 35047},"20":function(container,depth0,helpers,partials,data) { 35048 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 35049 35050 return alias2(alias1(((stack1 = ((stack1 = ((stack1 = ((stack1 = (data && data.root)) && stack1.DS_Models)) && stack1.component)) && stack1.props)) && stack1.offerUrl), depth0)) 35051 + alias2(alias1((depth0 != null ? depth0.associatedPromoKey : depth0), depth0)); 35052},"22":function(container,depth0,helpers,partials,data) { 35053 var stack1; 35054 35055 return container.escapeExpression(container.lambda(((stack1 = ((stack1 = ((stack1 = ((stack1 = (data && data.root)) && stack1.DS_Models)) && stack1.component)) && stack1.props)) && stack1.detailsUrl), depth0)); 35056},"24":function(container,depth0,helpers,partials,data) { 35057 var stack1; 35058
35059 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = ((stack1 = ((stack1 = ((stack1 = (data && data.root)) && stack1.DS_Models)) && stack1.component)) && stack1.props)) && stack1.hasDiscountMessage),{"name":"if","hash":{},"fn":container.program(25, data, 0),"inverse":container.program(27, data, 0),"data":data})) != null ? stack1 : ""); 35060},"25":function(container,depth0,helpers,partials,data) { 35061 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35062 35063 return " <div class=\"discount-status\">\n <div class=\"discount-message\" data-property=\"" 35064 + ((stack1 = helpers.i18n.call(alias1,"template.rewardCoupons.loyaltyApplyAtBagOrCheckoutOrInStore.key",{"name":"i18n","hash":{},"data":data})) != null ? stack1 : "") 35065 + "\">" 35066 + ((stack1 = helpers.i18n.call(alias1,"template.rewardCoupons.loyaltyApplyAtBagOrCheckoutOrInStore.value",{"name":"i18n","hash":{},"data":data})) != null ? stack1 : "") 35067 + "</div>\n </div>\n"; 35068},"27":function(container,depth0,helpers,partials,data) { 35069 var stack1; 35070 35071 return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = ((stack1 = (depth0 != null ? depth0.children : depth0)) != null ? stack1["discount-actions"] : stack1)) != null ? stack1.props : stack1),{"name":"with","hash":{},"fn":container.program(28, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35072},"28":function(container,depth0,helpers,partials,data) { 35073 var stack1; 35074 35075 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.couponApplied : depth0),{"name":"if","hash":{},"fn":container.program(29, data, 0),"inverse":container.program(36, data, 0),"data":data})) != null ? stack1 : ""); 35076},"29":function(container,depth0,helpers,partials,data) { 35077 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.escapeExpression; 35078 35079 return " <div class=\"discount-status\">\n <div class=\"discount-applied " 35080 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.lastActedOn : depth0),{"name":"if","hash":{},"fn":container.program(30, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35081 + "\"" 35082 + ((stack1 = helpers.getId.call(alias1,"rewards",{"name":"getId","hash":{},"fn":container.program(32, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35083 + " aria-label=\"" 35084 + alias2(container.lambda((depth0 != null ? depth0.associatedPromoName : depth0), depth0)) 35085 + " " 35086 + alias2(helpers.lookup.call(alias1,helpers.tmntAccount.call(alias1,"applied",{"name":"tmntAccount","hash":{},"data":data}),"value",{"name":"lookup","hash":{},"data":data})) 35087 + "\">\n <span class=\"applied-icon\" aria-hidden=\"true\"></span>\n <span class=\"applied-text\" data-property=\"" 35088 + ((stack1 = helpers.i18n.call(alias1,"template.rewardCoupons.used-discount.key",{"name":"i18n","hash":{},"data":data})) != null ? stack1 : "") 35089 + "\">" 35090 + ((stack1 = helpers.i18n.call(alias1,"template.rewardCoupons.used-discount.value",{"name":"i18n","hash":{},"data":data})) != null ? stack1 : "") 35091 + "</span>\n </div>\n" 35092 + ((stack1 = helpers["with"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.children : depth0)) != null ? stack1.button : stack1)) != null ? stack1.props : stack1),{"name":"with","hash":{},"fn":container.program(34, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35093 + " </div>\n"; 35094},"30":function(container,depth0,helpers,partials,data) { 35095 return "js-message-add"; 35096},"32":function(container,depth0,helpers,partials,data) { 35097 return " id=\"" 35098 + container.escapeExpression(container.lambda(depth0, depth0)) 35099 + "\""; 35100},"34":function(container,depth0,helpers,partials,data) { 35101 var stack1; 35102 35103 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"type":"button"},"data":data,"indent":"\t\t\t\t\t\t\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35104},"36":function(container,depth0,helpers,partials,data) { 35105 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35106 35107 return ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.lastActedOn : depth0),{"name":"if","hash":{},"fn":container.program(37, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35108 + ((stack1 = helpers["with"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.children : depth0)) != null ? stack1.button : stack1)) != null ? stack1.props : stack1),{"name":"with","hash":{},"fn":container.program(39, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35109},"37":function(container,depth0,helpers,partials,data) { 35110 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 35111 35112 return "<span class=\"js-message-remove screen-reader-text\"" 35113 + ((stack1 = helpers.getId.call(alias1,"rewards",{"name":"getId","hash":{},"fn":container.program(32, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35114 + " data-property=\"" 35115 + alias3(alias2((depth0 != null ? depth0.associatedPromoKey : depth0), depth0)) 35116 + "\">" 35117 + alias3(alias2((depth0 != null ? depth0.associatedPromoName : depth0), depth0)) 35118 + " " 35119 + alias3(helpers.lookup.call(alias1,helpers.tmntAccount.call(alias1,"removed",{"name":"tmntAccount","hash":{},"data":data}),"value",{"name":"lookup","hash":{},"data":data})) 35120 + "</span>"; 35121},"39":function(container,depth0,helpers,partials,data) { 35122 var stack1; 35123 35124 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"type":"button"},"data":data,"indent":"\t\t\t\t\t\t\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35125},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 35126 var stack1; 35127 35128 return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.children : depth0),{"name":"with","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35129},"5_d": function(fn, props, container, depth0, data, blockParams, depths) { 35130 35131 var decorators = container.decorators; 35132 35133 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(6, data, 0, blockParams, depths),"inverse":container.noop,"args":["discount-badge"],"data":data}) || fn; 35134 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(8, data, 0, blockParams, depths),"inverse":container.noop,"args":["discount-title"],"data":data}) || fn; 35135 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(12, data, 0, blockParams, depths),"inverse":container.noop,"args":["discount-description"],"data":data}) || fn; 35136 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(15, data, 0, blockParams, depths),"inverse":container.noop,"args":["discount-description"],"data":data}) || fn; 35137 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(18, data, 0, blockParams, depths),"inverse":container.noop,"args":["discount-details"],"data":data}) || fn; 35138 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(24, data, 0, blockParams, depths),"inverse":container.noop,"args":["discount-actions"],"data":data}) || fn; 35139 return fn; 35140 } 35141 35142,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true})); 35143 35144return this["ANF"]; 35145 35146}); 35147redesign.define('dsPartial/account-form',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 35148 35149this["ANF"] = this["ANF"] || {}; 35150this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35151 35152Handlebars.registerPartial("account-form", this["ANF"]["templates"]["account-form"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35153 var stack1; 35154 35155 return "<div class=\"account-form " 35156 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35157 + "\">\n <div class=\"account-form-inner-wrapper\">\n" 35158 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35159 + " </div>\n</div>\n"; 35160},"usePartial":true,"useData":true})); 35161 35162return this["ANF"]; 35163 35164}); 35165redesign.define('dsPartial/account-form-group',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 35166 35167this["ANF"] = this["ANF"] || {}; 35168this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35169 35170Handlebars.registerPartial("account-form-group", this["ANF"]["templates"]["account-form-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35171 return " data-transition=\"" 35172 + container.escapeExpression(container.lambda((depth0 != null ? depth0.transition : depth0), depth0)) 35173 + "\"\n"; 35174},"3":function(container,depth0,helpers,partials,data) { 35175 return " data-display=\"false\"\n"; 35176},"5":function(container,depth0,helpers,partials,data) { 35177 return " data-display=\"true\"\n "; 35178},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35179 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35180 35181 return "<div class=\"account-form-group " 35182 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35183 + "\"\n" 35184 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.transition : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35185 + "\n" 35186 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.hidden : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") 35187 + ">\n" 35188 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35189 + "</div>\n"; 35190},"usePartial":true,"useData":true})); 35191 35192return this["ANF"]; 35193 35194}); 35195redesign.define('dsPartial/account-form-content',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 35196 35197this["ANF"] = this["ANF"] || {}; 35198this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35199 35200Handlebars.registerPartial("account-form-content", this["ANF"]["templates"]["account-form-content"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35201 return " data-align=\"" 35202 + container.escapeExpression(container.lambda((depth0 != null ? depth0.align : depth0), depth0)) 35203 + "\"\n"; 35204},"3":function(container,depth0,helpers,partials,data) { 35205 return " data-transition=\"" 35206 + container.escapeExpression(container.lambda((depth0 != null ? depth0.transition : depth0), depth0)) 35207 + "\"\n"; 35208},"5":function(container,depth0,helpers,partials,data) { 35209 return " data-header=\"" 35210 + container.escapeExpression(container.lambda((depth0 != null ? depth0.header : depth0), depth0)) 35211 + "\"\n"; 35212},"7":function(container,depth0,helpers,partials,data) { 35213 return " data-display=\"false\"\n"; 35214},"9":function(container,depth0,helpers,partials,data) { 35215 return " data-display=\"true\"\n "; 35216},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35217 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35218 35219 return "<div class=\"account-form-content " 35220 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35221 + "\"\n" 35222 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.align : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35223 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.transition : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35224 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.header : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35225 + "\n" 35226 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.hidden : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") 35227 + ">\n" 35228 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35229 + "</div>\n"; 35230},"usePartial":true,"useData":true})); 35231 35232return this["ANF"]; 35233 35234}); 35235redesign.define('dsPartial/step',['handlebars'], function(Handlebars) { 35236 35237this["ANF"] = this["ANF"] || {}; 35238this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35239 35240Handlebars.registerPartial("step", this["ANF"]["templates"]["step"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35241 return "aria-label=\"" 35242 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 35243 + "\""; 35244},"3":function(container,depth0,helpers,partials,data) { 35245 return "aria-hidden=\"true\""; 35246},"5":function(container,depth0,helpers,partials,data) { 35247 return "data-icon=\"" 35248 + container.escapeExpression(container.lambda((depth0 != null ? depth0["step-icon"] : depth0), depth0)) 35249 + "\""; 35250},"7":function(container,depth0,helpers,partials,data) { 35251 return "data-text=\"" 35252 + container.escapeExpression(container.lambda((depth0 != null ? depth0["step-text"] : depth0), depth0)) 35253 + "\""; 35254},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35255 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 35256 35257 return "<span " 35258 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["aria-label"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 35259 + " class=\"step\" data-state=\"" 35260 + alias3(alias2((depth0 != null ? depth0.state : depth0), depth0)) 35261 + "\" data-theme=\"" 35262 + alias3(alias2((depth0 != null ? depth0.theme : depth0), depth0)) 35263 + "\">\n <span class=\"step-inner\" " 35264 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["step-icon"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 35265 + "></span>\n</span>\n"; 35266},"useData":true})); 35267 35268return this["ANF"]; 35269 35270}); 35271redesign.define('dsPartial/icon-heading',['handlebars','dsPartial/helpers/class-list','dsPartial/step'], function(Handlebars) { 35272 35273this["ANF"] = this["ANF"] || {}; 35274this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35275 35276Handlebars.registerPartial("icon-heading", this["ANF"]["templates"]["icon-heading"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35277 return "data-layout=\"" 35278 + container.escapeExpression(container.lambda((depth0 != null ? depth0.layout : depth0), depth0)) 35279 + "\""; 35280},"3":function(container,depth0,helpers,partials,data) { 35281 return "data-variant=\"" 35282 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 35283 + "\""; 35284},"5
35284":function(container,depth0,helpers,partials,data) { 35285 var stack1; 35286 35287 return " data-icon=\"" 35288 + container.escapeExpression(container.lambda((depth0 != null ? depth0.icon : depth0), depth0)) 35289 + "\"\n" 35290 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["aria-label"] : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.program(8, data, 0),"data":data})) != null ? stack1 : "") 35291 + " "; 35292},"6":function(container,depth0,helpers,partials,data) { 35293 return " aria-label=\"" 35294 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 35295 + "\"\n"; 35296},"8":function(container,depth0,helpers,partials,data) { 35297 return " aria-hidden=\"true\"\n"; 35298},"10":function(container,depth0,helpers,partials,data) { 35299 var alias1=container.lambda, alias2=container.escapeExpression; 35300 35301 return "<img src=\"" 35302 + alias2(alias1((depth0 != null ? depth0.image : depth0), depth0)) 35303 + "\" alt=\"" 35304 + alias2(alias1((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 35305 + "\">"; 35306},"12":function(container,depth0,helpers,partials,data) { 35307 var stack1; 35308 35309 return ((stack1 = container.invokePartial(partials.step,depth0,{"name":"step","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35310},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35311 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35312 35313 return "<div class=\"icon-heading " 35314 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35315 + "\"\n " 35316 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.layout : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35317 + "\n data-theme=\"" 35318 + container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)) 35319 + "\"\n " 35320 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35321 + "\n>\n <div class=\"icon-heading-icon\"\n" 35322 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35323 + ">\n " 35324 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.image : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35325 + "\n " 35326 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.step : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35327 + "\n </div>\n <div class=\"icon-heading-text\">" 35328 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35329 + "</div>\n</div>\n"; 35330},"usePartial":true,"useData":true})); 35331 35332return this["ANF"]; 35333 35334}); 35335redesign.define('corePartial/successModal',['handlebars','dsPartial/account-form','dsPartial/account-form-group','dsPartial/account-form-content','dsPartial/icon-heading','dsPartial/button'], function(Handlebars) { 35336 35337this["ANF"] = this["ANF"] || {}; 35338this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35339 35340Handlebars.registerPartial("successModal", this["ANF"]["templates"]["successModal"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35341 var stack1; 35342 35343 return " <div class=\"success-modal__container\">\n " 35344 + ((stack1 = container.lambda(((stack1 = (depth0 != null ? depth0.espot : depth0)) != null ? stack1.markup : stack1), depth0)) != null ? stack1 : "") 35345 + "\n </div>\n"; 35346},"3":function(container,depth0,helpers,partials,data) { 35347 var stack1; 35348 35349 return ((stack1 = container.invokePartial(partials["account-form"],depth0,{"name":"account-form","hash":{"class-list":"success-modal__container"},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35350},"4":function(container,depth0,helpers,partials,data) { 35351 var stack1; 35352 35353 return ((stack1 = container.invokePartial(partials["account-form-group"],depth0,{"name":"account-form-group","f
35353n":container.program(5, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35354},"5":function(container,depth0,helpers,partials,data) { 35355 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35356 35357 return ((stack1 = container.invokePartial(partials["account-form-content"],depth0,{"name":"account-form-content","fn":container.program(6, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35358 + "\n" 35359 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.successModalComponentParams : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35360 + " \n" 35361 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.buttonSectionParams : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35362},"6":function(container,depth0,helpers,partials,data) { 35363 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 35364 35365 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.iconSection : depth0)) != null ? stack1.iconImageUrl : stack1),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.program(10, data, 0),"data":data})) != null ? stack1 : "") 35366 + " <div class=\"success-body__text " 35367 + alias2(alias1(((stack1 = (depth0 != null ? depth0.bodySectionParams : depth0)) != null ? stack1.bodyClasses : stack1), depth0)) 35368 + "\" data-property=\"" 35369 + alias2(alias1(((stack1 = (depth0 != null ? depth0.bodySectionParams : depth0)) != null ? stack1.tmntKey : stack1), depth0)) 35370 + "\">\n " 35371 + ((stack1 = alias1(((stack1 = (depth0 != null ? depth0.bodySectionParams : depth0)) != null ? stack1.tmntValue : stack1), depth0)) != null ? stack1 : "") 35372 + "\n </div>\n"; 35373},"7":function(container,depth0,helpers,partials,data) { 35374 var stack1; 35375 35376 return ((stack1 = container.invokePartial(partials["icon-heading"],depth0,{"name":"icon-heading","hash":{"variant":"large","class-list":((stack1 = (depth0 != null ? depth0.headerSectionParams : depth0)) != null ? stack1.headerClasses : stack1),"image":((stack1 = (depth0 != null ? depth0.iconSection : depth0)) != null ? stack1.iconImageUrl : stack1)},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35377},"8":function(container,depth0,helpers,partials,data) { 35378 var stack1, alias1=container.lambda; 35379 35380 return " <div class=\"success-header__text\" data-property=\"" 35381 + container.escapeExpression(alias1(((stack1 = (depth0 != null ? depth0.headerSectionParams : depth0)) != null ? stack1.tmntKey : stack1), depth0)) 35382 + "\">\n " 35383 + ((stack1 = alias1(((stack1 = (depth0 != null ? depth0.headerSectionParams : depth0)) != null ? stack1.tmntValue : stack1), depth0)) != null ? stack1 : "") 35384 + "\n </div>\n"; 35385},"10":function(container,depth0,helpers,partials,data) { 35386 var stack1; 35387 35388 return ((stack1 = container.invokePartial(partials["icon-heading"],depth0,{"name":"icon-heading","hash":{"variant":"large","class-list":((stack1 = (depth0 != null ? depth0.headerSectionParams : depth0)) != null ? stack1.headerClasses : stack1),"icon":"checkmark-circle"},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35389},"12":function(container,depth0,helpers,partials,data) { 35390 var stack1; 35391 35392 return ((stack1 = container.invokePartial(partials["account-form-content"],depth0,{"name":"account-form-content","hash":{"class-list":"body-section__component"},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35393},"13":function(container,depth0,helpers,partials,data) { 35394 var stack1; 35395 35396 return " " 35397 + ((stack1 = container.lambda((depth0 != null ? depth0.bodySectionComponent : depth0), depth0)) != null ? stack1 : "") 35398 + "\n"; 35399},"15":function(container,depth0,helpers,partials,data) { 35400 var stack1; 35401 35402 return ((stack1 = container.invokePartial(partials["account-form-content"],depth0,{"name":"account-form-content","hash":{"class-list":"success-body__button"},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35403},"16":function(container,depth0,helpers,partials,data) { 35404 var stack1; 35405 35406 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"class-list":((stack1 = (depth0 != null ? depth0.buttonSectionParams : depth0)) != null ? stack1.buttonClasse
35406s : stack1),"data-prop":"data-full-width=\"true\"","label":((stack1 = (depth0 != null ? depth0.buttonSectionParams : depth0)) != null ? stack1.tmntValue : stack1),"variant":"secondary-button","type":"button"},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35407},"17":function(container,depth0,helpers,partials,data) { 35408 return ""; 35409},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35410 var stack1; 35411 35412 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.espot : depth0)) != null ? stack1.markup : stack1),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : ""); 35413},"usePartial":true,"useData":true})); 35414 35415return this["ANF"]; 35416 35417}); 35418redesign.define('dsPartial/accordion-group',['handlebars'], function(Handlebars) { 35419 35420this["ANF"] = this["ANF"] || {}; 35421this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35422 35423Handlebars.registerPartial("accordion-group", this["ANF"]["templates"]["accordion-group"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35424 var stack1; 35425 35426 return "<div class=\"accordion-group\">\n" 35427 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35428 + "</div>"; 35429},"usePartial":true,"useData":true})); 35430 35431return this["ANF"]; 35432 35433}); 35434redesign.define('dsPartial/accordion',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsHelper/is','dsPartial/step'], function(Handlebars) { 35435 35436this["ANF"] = this["ANF"] || {}; 35437this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35438 35439Handlebars.registerPartial("accordion", this["ANF"]["templates"]["accordion"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35440 return "true"; 35441},"3":function(container,depth0,helpers,partials,data) { 35442 return "false"; 35443},"5":function(container,depth0,helpers,partials,data) { 35444 return " data-linked-to=\"" 35445 + container.escapeExpression(container.lambda((depth0 != null ? depth0["linked-to"] : depth0), depth0)) 35446 + "\"\n"; 35447},"7":function(container,depth0,helpers,partials,data) { 35448 return " data-state=\"" 35449 + container.escapeExpression(container.lambda((depth0 != null ? depth0["data-state"] : depth0), depth0)) 35450 + "\""; 35451},"9":function(container,depth0,helpers,partials,data) { 35452 var stack1; 35453 35454 return ((stack1 = helpers.is.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["data-state"] : depth0),"complete",{"name":"is","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(12, data, 0),"data":data})) != null ? stack1 : ""); 35455},"10":function(container,depth0,helpers,partials,data) { 35456 var stack1; 35457 35458 return ((stack1 = container.invokePartial(partials.step,depth0,{"name":"step","hash":{"step-icon":"check","theme":(depth0 != null ? depth0["brand-theme"] : depth0),"aria-label":(depth0 != null ? depth0["status-aria-label"] : depth0),"state":(depth0 != null ? depth0["data-state"] : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35459},"12":function(container,depth0,helpers,partials,data) { 35460 var stack1; 35461 35462 return ((stack1 = container.invokePartial(partials.step,depth0,{"name":"step","hash":{"step-text":(depth0 != null ? depth0.step : depth0),"theme":(depth0 != null ? depth0["brand-theme"] : depth0),"aria-label":(depth0 != null ? depth0["status-aria-label"] : depth0),"state":(depth0 != null ? depth0["data-state"] : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35463},"14":function(container,depth0,helpers,partials,data) { 35464 return "<span class=\"accordion-label-icon\" data-icon=\"" 35465 + container.escapeExpression(container.lambda((depth0 != null ? depth0["label-icon"] : depth0), depth0)) 35466 + "\" aria-hidden=\"true\"></span>"; 35467},"16":function(container,depth0,helpers,partials,data) { 35468 return "class=\"" 35469 + container.escapeExpression(container.lambda((depth0 != null ? depth0["heading-class"] : depth0), depth0)) 35470 + "\""; 35471},"18":function(container,depth0,helpers,partials,data) { 35472 return "class=\"h3\""; 35473},"20":function(container,depth0,helpers,partials,data) { 35474 var stack1; 35475 35476 return "<span class=\"accordion-description\">" 35477 + ((stack1 = container.lambda((depth0 != null ? depth0.description : depth0), depth0)) != null ? stack1 : "") 35478 + "</span>"; 35479},"22":function(container,depth0,helpers,partials,data) { 35480 return container.escapeExpression(container.lambda((depth0 != null ? depth0.icon : depth0), depth0)); 35481},"24":function(container,depth0,helpers,partials,data) { 35482 return "plus"; 35483},"26":function(container,depth0,helpers,partials,data) { 35484 var stack1; 35485 35486 return " data-animated=\"true\"\n"
35487 + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.expanded : depth0),{"name":"unless","hash":{},"fn":container.program(27, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35488},"27":function(container,depth0,helpers,partials,data) { 35489 return " style=\"max-height: 0px;\"\n"; 35490},"29":function(container,depth0,helpers,partials,data) { 35491 return " data-animated=\"false\"\n"; 35492},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35493 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 35494 35495 return "<div class=\"accordion accordion-" 35496 + alias2(alias1((depth0 != null ? depth0.type : depth0), depth0)) 35497 + " " 35498 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35499 + "\"\n" 35500 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35501 + " data-type=\"" 35502 + alias2(alias1((depth0 != null ? depth0.type : depth0), depth0)) 35503 + "\"\n data-brand=\"" 35504 + alias2(alias1((depth0 != null ? depth0["brand-name"] : depth0), depth0)) 35505 + "\"\n data-brand-theme=\"" 35506 + alias2(alias1((depth0 != null ? depth0["brand-theme"] : depth0), depth0)) 35507 + "\"\n data-expanded-variant=\"" 35508 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["expanded-variant"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 35509 + "\"\n data-expanded=\"" 35510 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.expanded : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 35511 + "\"\n>\n <div class=\"heading\" role=\"heading\" aria-level=\"" 35512 + alias2(alias1((depth0 != null ? depth0["heading-level"] : depth0), depth0)) 35513 + "\" data-state=\"" 35514 + alias2(alias1((depth0 != null ? depth0["data-state"] : depth0), depth0)) 35515 + "\">\n <button\n aria-expanded=\"" 35516 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.expanded : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 35517 + "\"\n class=\"accordion-trigger js-accordion-trigger " 35518 + alias2(alias1((depth0 != null ? depth0.type : depth0), depth0)) 35519 + "\"\n data-animated=\"" 35520 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.animated : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 35521 + "\"\n" 35522 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["linked-to"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35523 + " id=\"" 35524 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 35525 + "\"\n type=\"button\"\n aria-controls=\"" 35526 + alias2(alias1((depth0 != null ? depth0["panel-id"] : depth0), depth0)) 35527 + "\"" 35528 + ((stack1 = helpers.is.call(alias3,(depth0 != null ? depth0.type : depth0),"numbered",{"name":"is","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35529 + ">" 35530 + ((stack1 = helpers.is.call(alias3,(depth0 != null ? depth0.type : depth0),"numbered",{"name":"is","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35531 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["label-icon"] : depth0),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35532 + "<span class=\"accordion-title\"><span " 35533 + ((stack1 = helpers.is.call(alias3,(depth0 != null ? depth0.type : depth0),"floating",{"name":"is","hash":{},"fn":container.program(16, data, 0),"inverse":container.program(18, data, 0),"data":data})) != null ? stack1 : "") 35534 + ">" 35535 + ((stack1 = alias1((depth0 != null ? depth0.title : depth0), depth0)) != null ? stack1 : "") 35536 + "</span>" 35537 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(20, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35538 + "</span><span class=\"accordion-icon\" aria-hidden=\"true\" data-icon=\"" 35539 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(22, data, 0),"inverse":container.program(24, data, 0),"data":data})) != null ? stack1 : "") 35540 + "\"></span></button>\n </div>\n <div id=\"" 35541 + alias2(alias1((depth0 != null ? depth0["panel-id"] : depth0), depth0)) 35542 + "\"\n aria-labelledby=\"" 35543 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 35544 + "\"\n class=\"accordion-panel js-accordion-panel\"\n aria-hidden=\"" 35545 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.exp
35545anded : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(1, data, 0),"data":data})) != null ? stack1 : "") 35546 + "\"\n role=\"region\"\n" 35547 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.animated : depth0),{"name":"if","hash":{},"fn":container.program(26, data, 0),"inverse":container.program(29, data, 0),"data":data})) != null ? stack1 : "") 35548 + " >\n <div class=\"js-accordion-panel-content accordion-panel-content\">\n" 35549 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35550 + " </div>\n </div>\n <div class=\"accordion-border\"></div>\n</div>\n"; 35551},"usePartial":true,"useData":true})); 35552 35553return this["ANF"]; 35554 35555}); 35556redesign.define('dsPartial/section-heading',['handlebars'], function(Handlebars) { 35557 35558this["ANF"] = this["ANF"] || {}; 35559this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35560 35561Handlebars.registerPartial("section-heading", this["ANF"]["templates"]["section-heading"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35562 return "align-right"; 35563},"3":function(container,depth0,helpers,partials,data) { 35564 return ""; 35565},"5":function(container,depth0,helpers,partials,data) { 35566 var stack1; 35567 35568 return " role=\"heading\"\n" 35569 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["heading-level"] : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.program(8, data, 0),"data":data})) != null ? stack1 : ""); 35570},"6":function(container,depth0,helpers,partials,data) { 35571 return " aria-level=\"" 35572 + container.escapeExpression(container.lambda((depth0 != null ? depth0["heading-level"] : depth0), depth0)) 35573 + "\"\n"; 35574},"8":function(container,depth0,helpers,partials,data) { 35575 return " aria-level=\"2\"\n"; 35576},"10":function(container,depth0,helpers,partials,data) { 35577 return " <div class=\"icon\" data-icon=\"" 35578 + container.escapeExpression(container.lambda((depth0 != null ? depth0.icon : depth0), depth0)) 35579 + "\" aria-hidden=\"true\"></div>\n"; 35580},"12":function(container,depth0,helpers,partials,data) { 35581 var alias1=container.lambda, alias2=container.escapeExpression; 35582 35583 return " <a href=\"" 35584 + alias2(alias1((depth0 != null ? depth0.url : depth0), depth0)) 35585 + "\" class=\"link\">" 35586 + alias2(alias1((depth0 != null ? depth0.text : depth0), depth0)) 35587 + "</a>\n"; 35588},"14":function(container,depth0,helpers,partials,data) { 35589 var stack1; 35590 35591 return " <div class=\"h3\">\n " 35592 + container.escapeExpression(container.lambda((depth0 != null ? depth0.heading : depth0), depth0)) 35593 + "\n" 35594 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.text : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35595 + " </div>\n"; 35596},"15":function(container,depth0,helpers,partials,data) { 35597 return " <span class=\"text\"> " 35598 + container.escapeExpression(container.lambda((depth0 != null ? depth0.text : depth0), depth0)) 35599 + "</span>\n"; 35600},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35601 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35602 35603 return "<div class=\"section-heading " 35604 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["align-right"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35605 + "\"\n\n" 35606 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["align-right"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") 35607 + ">\n" 35608 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35609 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.url : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.program(14, data, 0),"data":data})) != null ? stack1 : "") 35610 + "</div>\n"; 35611},"useData":true})); 35612 35613return this["ANF"]; 35614 35615}); 35616redesign.define('dsPartial/account-block',['handlebars','dsPartial/section-heading'], function(Handlebars) { 35617 35618this["ANF"] = this["ANF"] || {}; 35619this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35620 35621Handlebars.registerPartial("account-block", this["ANF"]["templates"]["account-block"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35622 var stack1; 35623 35624 return ((stack1 = container.invokePartial(partials["section-heading"],(depth0 != null ? depth0["section-heading-right"] : depth0),{"name":"section-heading","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35625},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35626 var stack1; 35627 35628 return "<div class=\"account-block\">\n <div class=\"heading\">\n <div class=\"section-header-container\">\n" 35629 + ((stack1 = container.invokePartial(partials["section-heading"],(depth0 != null ? depth0["section-heading"] : depth0),{"name":"section-heading","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
35630 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["section-heading-right"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35631 + " </div>\n <div class=\"section-divider\"></div>\n </div>\n <div class=\"content\">\n" 35632 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35633 + " </div>\n</div>\n"; 35634},"usePartial":true,"useData":true})); 35635 35636return this["ANF"]; 35637 35638}); 35639redesign.define('dsPartial/account-modal-inner-wrapper',['handlebars'], function(Handlebars) { 35640 35641this["ANF"] = this["ANF"] || {}; 35642this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35643 35644Handlebars.registerPartial("account-modal-inner-wrapper", this["ANF"]["templates"]["account-modal-inner-wrapper"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35645 var stack1; 35646 35647 return "<div class=\"account-modal-inner-wrapper\">\n" 35648 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35649 + "</div>\n"; 35650},"usePartial":true,"useData":true})); 35651 35652return this["ANF"]; 35653 35654}); 35655redesign.define('dsPartial/account-navigation-content',['handlebars'], function(Handlebars) { 35656 35657this["ANF"] = this["ANF"] || {}; 35658this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35659 35660Handlebars.registerPartial("account-navigation-content", this["ANF"]["templates"]["account-navigation-content"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35661 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 35662 35663 return "<div class=\"account-navigation-content\" data-full-width=\"" 35664 + alias2(alias1((depth0 != null ? depth0["full-width"] : depth0), depth0)) 35665 + "\" data-mobile=\"" 35666 + alias2(alias1((depth0 != null ? depth0.mobile : depth0), depth0)) 35667 + "\">\n" 35668 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35669 + "</div>\n"; 35670},"usePartial":true,"useData":true})); 35671 35672return this["ANF"]; 35673 35674}); 35675redesign.define('dsPartial/account-navigation',['handlebars'], function(Handlebars) { 35676 35677this["ANF"] = this["ANF"] || {}; 35678this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35679 35680Handlebars.registerPartial("account-navigation", this["ANF"]["templates"]["account-navigation"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35681 var stack1; 35682 35683 return "<div class=\"account-navigation\">\n" 35684 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35685 + "</div>\n"; 35686},"usePartial":true,"useData":true})); 35687 35688return this["ANF"]; 35689 35690}); 35691redesign.define('dsPartial/account-page-template',['handlebars'], function(Handlebars) { 35692 35693this["ANF"] = this["ANF"] || {}; 35694this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35695 35696Handlebars.registerPartial("account-page-template", this["ANF"]["templates"]["account-page-template"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35697 var stack1; 35698 35699 return "<div class=\"account-page-template\">\n <div class=\"main-navigation\">\n" 35700 + ((stack1 = container.invokePartial(partials["main-navigation"],depth0,{"name":"main-navigation","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35701 + " </div>\n <div class=\"account-page-wrapper\">\n <div class=\"account-page-navigation\" role=\"complimentary\">\n" 35702 + ((stack1 = container.invokePartial(partials["account-page-navigation"],depth0,{"name":"account-page-navigation","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
35703 + " </div>\n <div class=\"account-page-content\">\n" 35704 + ((stack1 = container.invokePartial(partials["account-page-content"],depth0,{"name":"account-page-content","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35705 + " </div>\n </div>\n</div>\n"; 35706},"usePartial":true,"useData":true})); 35707 35708return this["ANF"]; 35709 35710}); 35711redesign.define('dsPartial/add-to-bag-widget',['handlebars'], function(Handlebars) { 35712 35713this["ANF"] = this["ANF"] || {}; 35714this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35715 35716Handlebars.registerPartial("add-to-bag-widget", this["ANF"]["templates"]["add-to-bag-widget"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35717 return ""; 35718},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35719 var stack1; 35720 35721 return "<div class=\"add-to-bag-widget\">\n " 35722 + ((stack1 = container.invokePartial(partials["the-drop-down"],depth0,{"name":"the-drop-down","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35723 + "\n\n <div class=\"add-to-bag-button js-add-to-bag-widget\">\n " 35724 + ((stack1 = container.invokePartial(partials["the-button"],depth0,{"name":"the-button","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35725 + "\n </div>\n\n <div class=\"save-product-icon\">\n " 35726 + ((stack1 = container.invokePartial(partials["the-icon-button"],depth0,{"name":"the-icon-button","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35727 + "\n </div>\n</div>"; 35728},"usePartial":true,"useData":true})); 35729 35730return this["ANF"]; 35731 35732}); 35733redesign.define('dsPartial/helpers/variant',['handlebars'], function(Handlebars) { 35734 35735this["ANF"] = this["ANF"] || {}; 35736this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35737 35738Handlebars.registerPartial("helpers/variant", this["ANF"]["templates"]["helpers/variant"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35739 return " data-variant=\"" 35740 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 35741 + "\""; 35742},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35743 var stack1; 35744 35745 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35746 + "\n"; 35747},"useData":true})); 35748 35749return this["ANF"]; 35750 35751}); 35752redesign.define('dsPartial/collapsing-input',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/variant','dsPartial/input-field'], function(Handlebars) { 35753 35754this["ANF"] = this["ANF"] || {}; 35755this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35756 35757Handlebars.registerPartial("collapsing-input", this["ANF"]["templates"]["collapsing-input"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35758 return "data-placeholder-on-focus=\"" 35759 + container.escapeExpression(container.lambda((depth0 != null ? depth0["placeholder-on-focus"] : depth0), depth0)) 35760 + "\""; 35761},"3":function(container,depth0,helpers,partials,data,blockParams,depths) { 35762 return ""; 35763},"4":function(container,depth0,helpers,partials,data) { 35764 return " <button aria-label=\"" 35765 + container.escapeExpression(container.lambda((depth0 != null ? depth0.label : depth0), depth0)) 35766 + "\" class=\"input-field-action-button\" type=\"submit\" data-icon=\"zoom-neutral\"></button>\n"; 35767},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 35768 var stack1; 35769 35770 return "<div \n " 35771 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["placeholder-on-focus"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35772 + "\n class=\"collapsing-input " 35773 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35774 + "\"\n" 35775 + ((stack1 = container.invokePartial(partials["helpers/variant"],depth0,{"name":"helpers/variant","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35776 + " data-size=\"" 35777 + container.escapeExpression(container.lambda((depth0 != null ? depth0.size : depth0), depth0)) 35778 + "\"\n data-visible=\"false\"\n data-showing=\"false\">\n" 35779 + ((stack1 = container.invokePartial(partials["input-field"],depth0,{"name":"input-field","hash":{"type":"search","secondary-action":true},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35780 + "</div>\n"; 35781},"3_d": function(fn, props, container, depth0, data, blockParams, depths) { 35782 35783 var decorators = container.decorators; 35784 35785 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["secondary-action"],"data":data}) || fn; 35786 return fn; 35787 } 35788 35789,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true})); 35790 35791return this["ANF"]; 35792 35793}); 35794redesign.define('dsPartial/search-input-field',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/theme','dsPartial/helpers/autocomplete','dsPartial/helpers/name','dsPartial/helpers/
35794data-prop','dsPartial/helpers/maxlength','dsPartial/helpers/data-filled','dsPartial/helpers/additional-attrs'], function(Handlebars) { 35795 35796this["ANF"] = this["ANF"] || {}; 35797this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35798 35799Handlebars.registerPartial("search-input-field", this["ANF"]["templates"]["search-input-field"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35800 return "data-brand=\"" 35801 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 35802 + "\""; 35803},"3":function(container,depth0,helpers,partials,data) { 35804 return container.escapeExpression(container.lambda((depth0 != null ? depth0.type : depth0), depth0)); 35805},"5":function(container,depth0,helpers,partials,data) { 35806 return "text"; 35807},"7":function(container,depth0,helpers,partials,data) { 35808 return "role=\"" 35809 + container.escapeExpression(container.lambda((depth0 != null ? depth0.role : depth0), depth0)) 35810 + "\""; 35811},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 35812 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 35813 35814 return "<div class=\"search-input-field js-search-input-field " 35815 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35816 + "\"\n " 35817 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35818 + "\n " 35819 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35820 + ">\n<input\n" 35821 + ((stack1 = container.invokePartial(partials["helpers/autocomplete"],depth0,{"name":"helpers/autocomplete","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35822 + ((stack1 = container.invokePartial(partials["helpers/name"],depth0,{"name":"helpers/name","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35823 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35824 + ((stack1 = container.invokePartial(partials["helpers/maxlength"],depth0,{"name":"helpers/maxlength","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35825 + ((stack1 = container.invokePartial(partials["helpers/data-filled"],depth0,{"name":"helpers/data-filled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35826 + ((stack1 = container.invokePartial(partials["helpers/additional-attrs"],depth0,{"name":"helpers/additional-attrs","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35827 + " class=\"" 35828 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","hash":{"class-list":(depth0 != null ? depth0["search-input-class-list"] : depth0)},"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35829 + "\"\n placeholder=\"" 35830 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 35831 + "\"\n type=\"" 35832 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.type : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") 35833 + "\"\n " 35834 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.role : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35835 + "\n value=\"" 35836 + alias3(alias2((depth0 != null ? depth0.value : depth0), depth0)) 35837 + "\"\n id=\"" 35838 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 35839 + "\">\n <label for=\"" 35840 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 35841 + "\" class=\"float-label\">" 35842 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 35843 + "</label>\n <button aria-label=\"Clear\" class=\"input-field-action-button clear-button js-clear-button\" type=\"button\" data-icon=\"close-circle\"></button>\n <button aria-label=\"" 35844 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 35845 + "\" class=\"input-field-action-button search-button\" type=\"submit\" data-icon=\"search\"></button>\n</div>\n"; 35846},"usePartial":true,"useData":true})); 35847 35848return this["ANF"]; 35849 35850}); 35851redesign.define('dsPartial/auto-suggest',['handlebars','dsPartial/collapsing-input','dsPartial/search-input-field','dsPartial/helpers/class-list','dsPartial/helpers/additional-attrs'], function(Handlebars) { 35852 35853this["ANF"] = this["ANF"] || {}; 35854this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35855 35856Handlebars.registerPartial("auto-suggest", this["ANF"]["templates"]["auto-suggest"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35857 var stack1; 35858 35859 return ((stack1 = container.invokePartial(partials["collapsing-input"],(depth0 != null ? depth0.searchTerm : depth0),{"name":"collapsing-input","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35860},"3":function(container,depth0,helpers,partials,data) { 35861 var stack1; 35862 35863 return ((stack1 = container.invokePartial(partials["search-input-field"],(depth0 != null ? depth0.searchTerm : depth0),{"name":"search-input-field","f
35863n":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35864},"4":function(container,depth0,helpers,partials,data) { 35865 return ""; 35866},"6":function(container,depth0,helpers,partials,data,blockParams,depths) { 35867 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 35868 35869 return " <li id=\"" 35870 + alias2(alias1((depths[1] != null ? depths[1].id : depths[1]), depth0)) 35871 + "-item-" 35872 + alias2(alias1((data && data.index), depth0)) 35873 + "\" class=\"js-auto-suggest-list-item\" aria-label=\"" 35874 + alias2(alias1(((stack1 = blockParams[0][0]) != null ? stack1.value : stack1), depth0)) 35875 + "\" data-value=\"" 35876 + alias2(alias1(((stack1 = blockParams[0][0]) != null ? stack1.value : stack1), depth0)) 35877 + "\" data-index=\"" 35878 + alias2(alias1((data && data.index), depth0)) 35879 + "\" role=\"option\" >\n <span class=\"search-item\" aria-hidden=\"true\">\n <span class=\"list-item-content\">\n " 35880 + ((stack1 = alias1(((stack1 = blockParams[0][0]) != null ? stack1.content : stack1), depth0)) != null ? stack1 : "") 35881 + "\n </span>\n </span>\n </li>\n"; 35882},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 35883 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35884 35885 return "<div class=\"auto-suggest\">\n" 35886 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.collapsible : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.program(3, data, 0, blockParams, depths),"data":data,"blockParams":blockParams})) != null ? stack1 : "") 35887 + " <div class=\"screen-reader-text js-auto-suggest-status\" role=\"status\" aria-atomic=\"true\" aria-live=\"polite\"></div>\n <div class=\"auto-suggest-list-menu-wrapper " 35888 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"blockParams":blockParams,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35889 + "\" id=\"" 35890 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 35891 + "\" " 35892 + ((stack1 = container.invokePartial(partials["helpers/additional-attrs"],depth0,{"name":"helpers/additional-attrs","data":data,"blockParams":blockParams,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35893 + ">\n <ul class=\"auto-suggest-list-menu\">\n" 35894 + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0["list-items"] : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 1, blockParams, depths),"inverse":container.noop,"data":data,"blockParams":blockParams})) != null ? stack1 : "") 35895 + " </ul>\n </div>\n</div>\n"; 35896},"usePartial":true,"useData":true,"useDepths":true,"useBlockParams":true})); 35897 35898return this["ANF"]; 35899 35900}); 35901redesign.define('dsPartial/badge',['handlebars','dsPartial/helpers/full-width','dsPartial/helpers/button/current-state','dsPartial/button','dsPartial/button-state'], function(Handlebars) { 35902 35903this["ANF"] = this["ANF"] || {}; 35904this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 35905 35906Handlebars.registerPartial("badge", this["ANF"]["templates"]["badge"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 35907 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35908 35909 return " <div class=\"badge\"\n " 35910 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.attached : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 35911 + "\n data-status=\"" 35912 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.status : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") 35913 + "\"\n data-theme=\"" 35914 + container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)) 35915 + "\"\n >\n" 35916 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35917 + " </div>\n"; 35918},"2":function(container,depth0,helpers,partials,data) { 35919 return "data-attached=\"" 35920 + container.escapeExpression(container.lambda((depth0 != null ? depth0.attached : depth0), depth0)) 35921 + "\""; 35922},"4":function(container,depth0,helpers,partials,data) { 35923 return container.escapeExpression(container.lambda((depth0 != null ? depth0.status : depth0), depth0)); 35924},"6":function(container,depth0,helpers,partials,data) { 35925 return "default"; 35926},"8":function(container,depth0,helpers,partials,data,blockParams,depths) { 35927 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 35928 35929 return " <div class=\"badge legacy-badge " 35930 + ((stack1 = helpers["with"].call(alias1,((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.variant : stack1),{"name":"with","hash":{},"fn":container.program(9, data, 0, blockParams, depths),"inverse":container.program(11, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 35931 + "\"\n\n" 35932 + ((stack1 = helpers["with"].call(alias1,((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.attached : stack1),{"name":"with","hash":{},"fn":container.program(13, data, 0, blockParams, depths),"inverse":container.program(15, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 35933 + "\n" 35934 + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.props : depth0),{"name":"with","hash":{},"fn":container.program(18, data, 0, blockParams, depths),"inverse":container.program(18, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 35935 + "\n" 35936 + ((stack1 = helpers["with"].call(alias1,((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1["text-align"] : stack1),{"name":"with","hash":{},"fn":container.program(20, data, 0, blockParams, depths),"inverse":container.program(22, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 35937 + " >\n" 35938 + ((stack1 = helpers["if"].call(alias1,(data && data["partial-block"]),{"n
35938ame":"if","hash":{},"fn":container.program(25, data, 0, blockParams, depths),"inverse":container.program(27, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 35939 + " </div>\n"; 35940},"9":function(container,depth0,helpers,partials,data) { 35941 return container.escapeExpression(container.lambda(depth0, depth0)); 35942},"11":function(container,depth0,helpers,partials,data) { 35943 return container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)); 35944},"13":function(container,depth0,helpers,partials,data) { 35945 return " data-attached=\"" 35946 + container.escapeExpression(container.lambda(depth0, depth0)) 35947 + "\"\n"; 35948},"15":function(container,depth0,helpers,partials,data) { 35949 var stack1; 35950 35951 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.attached : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35952},"16":function(container,depth0,helpers,partials,data) { 35953 return " data-attached=\"" 35954 + container.escapeExpression(container.lambda((depth0 != null ? depth0.attached : depth0), depth0)) 35955 + "\"\n "; 35956},"18":function(container,depth0,helpers,partials,data) { 35957 var stack1; 35958 35959 return ((stack1 = container.invokePartial(partials["helpers/full-width"],depth0,{"name":"helpers/full-width","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 35960 + ((stack1 = container.invokePartial(partials["helpers/button/current-state"],depth0,{"name":"helpers/button/current-state","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35961},"20":function(container,depth0,helpers,partials,data) { 35962 return " data-text-align=\"" 35963 + container.escapeExpression(container.lambda(depth0, depth0)) 35964 + "\"\n"; 35965},"22":function(container,depth0,helpers,partials,data) { 35966 var stack1; 35967 35968 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["text-align"] : depth0),{"name":"if","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35969},"23":function(container,depth0,helpers,partials,data) { 35970 return " data-text-align=\"" 35971 + container.escapeExpression(container.lambda((depth0 != null ? depth0["text-align"] : depth0), depth0)) 35972 + "\"\n "; 35973},"25":function(container,depth0,helpers,partials,data) { 35974 var stack1; 35975 35976 return ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35977},"27":function(container,depth0,helpers,partials,data,blockParams,depths) { 35978 var stack1; 35979 35980 return " <span>" 35981 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.message : stack1), depth0)) 35982 + "</span>\n" 35983 + ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.props : depth0)) != null ? stack1.children : stack1),{"name":"with","hash":{},"fn":container.program(28, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35984},"28":function(container,depth0,helpers,partials,data,blockParams,depths) { 35985 var stack1; 35986 35987 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.buttons : depth0),{"name":"each","hash":{},"fn":container.program(29, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35988},"29":function(container,depth0,helpers,partials,data,blockParams,depths) { 35989 var stack1; 35990 35991 return ((stack1 = container.invokePartial(partials.button,(depth0 != null ? depth0.props : depth0),{"name":"button","fn":container.program(30, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 35992},"30":function(container,depth0,helpers,partials,data,blockParams,depths) { 35993 var stack1; 35994 35995 return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depths[1] != null ? depths[1].props : depths[1]),{"name":"with","hash":{},"fn":container.program(31, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 35996},"31":function(container,depth0,helpers,partials,data) { 35997 var stack1; 35998 35999 return ((stack1 = helpers["with"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.children : depth0),{"name":"with","hash":{},"fn":container.program(32, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 36000},"32":function(container,depth0,helpers,partials,data) { 36001 var stack1; 36002 36003 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["button-states"] : depth0),{"name":"each","hash":{},"fn":container.program(33, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 36004},"33":function(container,depth0,helpers,partials,data) { 36005 var stack1; 36006 36007 return ((stack1 = container.invokePartial(partials["button-state"],(depth0 != null ? depth0.props : depth0),{"name":"button-state","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36008},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 36009 var stack1; 36010
36011 return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.props : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.program(8, data, 0, blockParams, depths),"data":data})) != null ? stack1 : ""); 36012},"usePartial":true,"useData":true,"useDepths":true})); 36013 36014return this["ANF"]; 36015 36016}); 36017redesign.define('dsPartial/banner',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 36018 36019this["ANF"] = this["ANF"] || {}; 36020this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36021 36022Handlebars.registerPartial("banner", this["ANF"]["templates"]["banner"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36023 return container.escapeExpression(container.lambda((depth0 != null ? depth0.orientation : depth0), depth0)); 36024},"3":function(container,depth0,helpers,partials,data) { 36025 return "vertical"; 36026},"5":function(container,depth0,helpers,partials,data) { 36027 return container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)); 36028},"7":function(container,depth0,helpers,partials,data) { 36029 return "default"; 36030},"9":function(container,depth0,helpers,partials,data) { 36031 return container.escapeExpression(container.lambda((depth0 != null ? depth0.background : depth0), depth0)); 36032},"11":function(container,depth0,helpers,partials,data) { 36033 return "none"; 36034},"13":function(container,depth0,helpers,partials,data) { 36035 return "data-inset=\"" 36036 + container.escapeExpression(container.lambda((depth0 != null ? depth0.inset : depth0), depth0)) 36037 + "\""; 36038},"15":function(container,depth0,helpers,partials,data) { 36039 return ""; 36040},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36041 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 36042 36043 return "<div class=\"banner " 36044 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36045 + "\"\n data-brand=\"" 36046 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 36047 + "\"\n data-orientation=\"" 36048 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.orientation : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 36049 + "\"\n data-theme=\"" 36050 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 36051 + "\"\n data-background=\"" 36052 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.background : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(11, data, 0),"data":data})) != null ? stack1 : "") 36053 + "\"\n " 36054 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.inset : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36055 + "\n>\n <div class=\"banner-background\">\n " 36056 + ((stack1 = container.invokePartial(partials["banner-background"],depth0,{"name":"banner-background","fn":container.program(15, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36057 + "\n </div>\n\n <div class=\"banner-content\">\n <div class=\"banner-lockup\">\n " 36058 + ((stack1 = container.invokePartial(partials["banner-lockup"],depth0,{"name":"banner-lockup","fn":container.program(15, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36059 + "\n </div>\n\n <div class=\"banner-buttons\">\n " 36060 + ((stack1 = container.invokePartial(partials["banner-buttons"],depth0,{"name":"banner-buttons","fn":container.program(15, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36061 + "\n </div>\n\n <div class=\"banner-legal\">\n " 36062 + ((stack1 = container.invokePartial(partials["banner-legal"],depth0,{"name":"banner-legal","fn":container.program(15, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36063 + "\n </div>\n </div>\n</div>\n"; 36064},"usePartial":true,"useData":true})); 36065 36066return this["ANF"]; 36067 36068}); 36069redesign.define('dsPartial/breadcrumbs',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 36070 36071this["ANF"] = this["ANF"] || {}; 36072this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36073 36074Handlebars.registerPartial("breadcrumbs", this["ANF"]["templates"]["breadcrumbs"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36075 var alias1=container.lambda, alias2=container.escapeExpression; 36076 36077 return " <li>\n <a href=\"" 36078 + alias2(alias1((depth0 != null ? depth0.href : depth0), depth0)) 36079 + "\">" 36080 + alias2(alias1((depth0 != null ? depth0.label : depth0), depth0)) 36081 + "</a>\n </li>\n"; 36082},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36083 var stack1; 36084 36085 return "<nav aria-label=\"" 36086 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 36087 + "\" class=\"breadcrumb " 36088 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36089 + "\">\n <ol>\n" 36090 + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.links : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36091 + " </ol>\n</nav>\n"; 36092},"usePartial":true,"useData":true})); 36093 36094return this["ANF"]; 36095 36096}); 36097redesign.define('dsPartial/bullet-list',['handlebars'], function(Handlebars) { 36098 36099this["ANF"] = this["ANF"] || {}; 36100this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36101 36102Handlebars.registerPartial("bullet-list", this["ANF"]["templates"]["bullet-list"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36103 return " <li>" 36104 + container.escapeExpression(container.lambda(depth0, depth0)) 36105 + "</li>\n"; 36106},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36107 var stack1; 36108 36109 return "<ul class=\"bullet-list\">\n" 36110 + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["list-items"] : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36111 + "</ul>\n"; 36112},"useData":true})); 36113 36114return this["ANF"]; 36115 36116}); 36117redesign.define('dsPartial/bullet-list-with-title',['handlebars','dsPartial/bullet-list'], function(Handlebars) { 36118 36119this["ANF"] = this["ANF"] || {}; 36120this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36121 36122Handlebars.registerPartial("bullet-list-with-title", this["ANF"]["templates"]["bullet-list-with-title"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36123 var stack1; 36124 36125 return "<div class=\"bullet-list-with-title\">\n <p class=\"h3 bullet-list-title\">" 36126 + container.escapeExpression(container.lambda((depth0 != null ? depth0.title : depth0), depth0)) 36127 + "</p>\n" 36128 + ((stack1 = container.invokePartial(partials["bullet-list"],depth0,{"name":"bullet-list","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36129 + "</div>\n"; 36130},"usePartial":true,"useData":true})); 36131 36132return this["ANF"]; 36133 36134}); 36135redesign.define('dsPartial/button-group',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 36136 36137this["ANF"] = this["ANF"] || {}; 36138this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36139 36140Handlebars.registerPartial("button-group", this["ANF"]["templates"]["button-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36141 return " data-variant=\"" 36142 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 36143 + "\""; 36144},"3":function(container,depth0,helpers,partials,data) { 36145 return " data-orientation=\"" 36146 + container.escapeExpression(container.lambda((depth0 != null ? depth0.orientation : depth0), depth0)) 36147 + "\""; 36148},"5":function(container,depth0,helpers,partials,data) { 36149 return "data-margin-bottom=\"" 36150 + container.escapeExpression(container.lambda((depth0 != null ? depth0["margin-bottom"] : depth0), depth0)) 36151 + "\""; 36152},"7":function(container,depth0,helpers,partials,data) { 36153 return "data-margin-top=\"" 36154 + container.escapeExpression(container.lambda((depth0 != null ? depth0["margin-top"] : depth0), depth0)) 36155 + "\""; 36156},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36157 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 36158 36159 return "<div class=\"button-group " 36160 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36161 + "\"\n " 36162 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36163 + "\n " 36164 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.orientation : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36165 + "\n " 36166 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["margin-bottom"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36167 + "\n " 36168 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["margin-top"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36169 + "\n>\n" 36170 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36171 + "</div>\n"; 36172},"usePartial":true,"useData":true})); 36173 36174return this["ANF"]; 36175 36176}); 36177redesign.define('dsPartial/card-input',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 36178 36179this["ANF"] = this["ANF"] || {}; 36180this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36181 36182Handlebars.registerPartial("card-input", this["ANF"]["templates"]["card-input"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36183 var stack1; 36184 36185 return "<div class=\"card-input " 36186 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36187 + "\">\n <div class=\"card-input-field\">\n" 36188 + ((stack1 = container.invokePartial(partials["card-input-field"],depth0,{"name":"card-input-field","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36189 + " </div>\n <div class=\"card-input-icon\">\n" 36190 + ((stack1 = container.invokePartial(partials["card-input-icon"],depth0,{"name":"card-input-icon","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36191 + " </div>\n</div>\n"; 36192},"usePartial":true,"useData":true})); 36193 36194return this["ANF"]; 36195 36196}); 36197redesign.define('dsPartial/carousel-slide',['handlebars'], function(Handlebars) { 36198 36199this["ANF"] = this["ANF"] || {}; 36200this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36201 36202Handlebars.registerPartial("carousel-slide", this["ANF"]["templates"]["carousel-slide"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36203 return "true"; 36204},"3":function(container,depth0,helpers,partials,data) { 36205 return "false"; 36206},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36207 var stack1; 36208 36209 return "<div class=\"carousel-slide js-carousel-slide\"\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label=\"" 36210 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 36211 + "\"\n data-showing=\""
36212 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.show : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 36213 + "\"\n>\n" 36214 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36215 + "</div>\n"; 36216},"usePartial":true,"useData":true})); 36217 36218return this["ANF"]; 36219 36220}); 36221redesign.define('dsPartial/icon-button',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/disabled','dsPartial/helpers/button/current-state','dsPartial/helpers/button/button-type','dsPartial/helpers/data-prop','dsPartial/helpers/variant','dsPartial/helpers/theme'], function(Handlebars) { 36222 36223this["ANF"] = this["ANF"] || {}; 36224this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36225 36226Handlebars.registerPartial("icon-button", this["ANF"]["templates"]["icon-button"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36227 return " value=\"" 36228 + container.escapeExpression(container.lambda((depth0 != null ? depth0.value : depth0), depth0)) 36229 + "\"\n "; 36230},"3":function(container,depth0,helpers,partials,data) { 36231 var stack1; 36232 36233 return " <span class=\"screen-reader-text\">\n" 36234 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.label : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") 36235 + " </span>\n <span data-icon=\"" 36236 + container.escapeExpression(container.lambda((depth0 != null ? depth0.icon : depth0), depth0)) 36237 + "\"></span>\n"; 36238},"4":function(container,depth0,helpers,partials,data) { 36239 var stack1; 36240 36241 return " " 36242 + ((stack1 = container.lambda((depth0 != null ? depth0.label : depth0), depth0)) != null ? stack1 : "") 36243 + "\n"; 36244},"6":function(container,depth0,helpers,partials,data) { 36245 return " " 36246 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 36247 + "\n"; 36248},"8":function(container,depth0,helpers,partials,data) { 36249 var stack1; 36250 36251 return ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","hash":{"icon-only":true},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36252},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36253 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 36254 36255 return "<button\n class=\"icon-button " 36256 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36257 + "\"\n" 36258 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36259 + ((stack1 = container.invokePartial(partials["helpers/button/current-state"],depth0,{"name":"helpers/button/current-state","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36260 + ((stack1 = container.invokePartial(partials["helpers/button/button-type"],depth0,{"name":"helpers/button/button-type","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36261 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36262 + ((stack1 = container.invokePartial(partials["helpers/variant"],depth0,{"name":"helpers/variant","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36263 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36264 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.value : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36265 + ">\n" 36266 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(8, data, 0),"data":data})) != null ? stack1 : "") 36267 + "</button>\n"; 36268},"usePartial":true,"useData":true})); 36269 36270return this["ANF"]; 36271 36272}); 36273redesign.define('dsPartial/carousel',['handlebars','dsPartial/helpers/class-list','dsPartial/icon-button'], function(Handlebars) { 36274 36275this["ANF"] = this["ANF"] || {}; 36276this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36277 36278Handlebars.registerPartial("carousel", this["ANF"]["templates"]["carousel"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36279 return "true"; 36280},"3":function(container,depth0,helpers,partials,data) { 36281 return "false"; 36282},"5":function(container,depth0,helpers,partials,data) { 36283 return container.escapeExpression(container.lambda((depth0 != null ? depth0.speed : depth0), depth0)); 36284},"7":function(container,depth0,helpers,partials,data) { 36285 return "medium"; 36286},"9":function(container,depth0,helpers,partials,data) { 36287 return container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)); 36288},"11":function(container,depth0,helpers,partials,data) { 36289 return "default"; 36290},"13":function(container,depth0,helpers,partials,data) { 36291 return container.escapeExpression(container.lambda((depth0 != null ? depth0["button-position"] : depth0), depth0)); 36292},"15":function(container,depth0,helpers,partials,data) { 36293 return "bottom-left"; 36294},"17":function(container,depth0,helpers,partials,data) { 36295 var alias1=container.lambda, alias2=container.escapeExpression; 36296
36297 return " <span class=\"carousel-play-label\">\n <span data-icon=\"play\" aria-hidden=\"true\"></span>\n <span class=\"screen-reader-text\">" 36298 + alias2(alias1((depth0 != null ? depth0["play-label"] : depth0), depth0)) 36299 + "</span>\n </span>\n <span class=\"carousel-pause-label\">\n <span data-icon=\"pause\" aria-hidden=\"true\"></span>\n <span class=\"screen-reader-text\">" 36300 + alias2(alias1((depth0 != null ? depth0["pause-label"] : depth0), depth0)) 36301 + "</span>\n </span>\n"; 36302},"19":function(container,depth0,helpers,partials,data) { 36303 return " <span data-icon=\"left-thin\" aria-hidden=\"true\"></span>\n <span class=\"screen-reader-text\">" 36304 + container.escapeExpression(container.lambda((depth0 != null ? depth0["previous-label"] : depth0), depth0)) 36305 + "</span>\n"; 36306},"21":function(container,depth0,helpers,partials,data) { 36307 return " <span data-icon=\"right-thin\" aria-hidden=\"true\"></span>\n <span class=\"screen-reader-text\">" 36308 + container.escapeExpression(container.lambda((depth0 != null ? depth0["next-label"] : depth0), depth0)) 36309 + "</span>\n"; 36310},"23":function(container,depth0,helpers,partials,data) { 36311 return "off"; 36312},"25":function(container,depth0,helpers,partials,data) { 36313 return "polite"; 36314},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36315 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 36316 36317 return "<div class=\"carousel js-carousel " 36318 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36319 + "\"\n role=\"group\"\n aria-roledescription=\"carousel\"\n aria-label=\"" 36320 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 36321 + "\"\n data-autoplay=\"" 36322 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.autoplay : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 36323 + "\"\n data-speed=\"" 36324 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.speed : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 36325 + "\"\n data-theme=\"" 36326 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(11, data, 0),"data":data})) != null ? stack1 : "") 36327 + "\"\n data-button-position=\"" 36328 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["button-position"] : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(15, data, 0),"data":data})) != null ? stack1 : "") 36329 + "\"\n>\n <div class=\"carousel-controls\">\n" 36330 + ((stack1 = container.invokePartial(partials["icon-button"],depth0,{"name":"icon-button","hash":{"variant":"square","class-list":"carousel-rotation js-carousel-rotation"},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36331 + "\n" 36332 + ((stack1 = container.invokePartial(partials["icon-button"],depth0,{"name":"icon-button","hash":{"variant":"square","class-list":"carousel-previous js-carousel-previous"},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36333 + "\n" 36334 + ((stack1 = container.invokePartial(partials["icon-button"],depth0,{"name":"icon-button","hash":{"variant":"square","class-list":"carousel-next js-carousel-next"},"fn":container.program(21, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36335 + " </div>\n <div class=\"carousel-slide-group js-carousel-slide-group\" aria-atomic=\"false\" aria-live=\"" 36336 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.autoplay : depth0),{"name":"if","hash":{},"fn":container.program(23, data, 0),"inverse":container.program(25, data, 0),"data":data})) != null ? stack1 : "") 36337 + "\">\n" 36338 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36339 + " </div>\n</div>"; 36340},"usePartial":true,"useData":true})); 36341 36342return this["ANF"]; 36343 36344}); 36345redesign.define('dsPartial/checkbox-group',['handlebars'], function(Handlebars) { 36346 36347this["ANF"] = this["ANF"] || {}; 36348this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36349 36350Handlebars.registerPartial("checkbox-group", this["ANF"]["templates"]["checkbox-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36351 var stack1; 36352 36353 return " <legend>
36353\n <span class=\"checkbox-group-title\">\n <span class=\"h4\">" 36354 + container.escapeExpression(container.lambda((depth0 != null ? depth0.title : depth0), depth0)) 36355 + "</span>\n" 36356 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.optional : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36357 + " </span>\n </legend>\n " 36358 + ((stack1 = container.invokePartial(partials["title-content"],depth0,{"name":"title-content","fn":container.program(7, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36359 + "\n"; 36360},"2":function(container,depth0,helpers,partials,data) { 36361 var stack1; 36362 36363 return " <span>\n" 36364 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.optionalText : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") 36365 + " </span>\n"; 36366},"3":function(container,depth0,helpers,partials,data) { 36367 return " " 36368 + container.escapeExpression(container.lambda((depth0 != null ? depth0.optionalText : depth0), depth0)) 36369 + "\n"; 36370},"5":function(container,depth0,helpers,partials,data) { 36371 return " (Optional)\n"; 36372},"7":function(container,depth0,helpers,partials,data) { 36373 return ""; 36374},"9":function(container,depth0,helpers,partials,data) { 36375 return " <legend class=\"screen-reader-text\">\n " 36376 + container.escapeExpression(container.lambda((depth0 != null ? depth0.legend : depth0), depth0)) 36377 + "\n </legend>\n"; 36378},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36379 var stack1; 36380 36381 return "<div class=\"checkbox-group\">\n <fieldset>\n" 36382 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.title : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") 36383 + " <div class=\"checkbox-group-content\">\n" 36384 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36385 + " </div>\n </fieldset>\n</div>"; 36386},"usePartial":true,"useData":true})); 36387 36388return this["ANF"]; 36389 36390}); 36391redesign.define('dsPartial/helpers/checked',['handlebars'], function(Handlebars) { 36392 36393this["ANF"] = this["ANF"] || {}; 36394this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36395 36396Handlebars.registerPartial("helpers/checked", this["ANF"]["templates"]["helpers/checked"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36397 return " checked"; 36398},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36399 var stack1; 36400 36401 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.checked : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 36402},"useData":true})); 36403 36404return this["ANF"]; 36405 36406}); 36407redesign.define('dsPartial/checkbox',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/checked','dsPartial/helpers/data-prop','dsPartial/helpers/disabled','dsPartial/helpers/invalid','dsPartial/helpers/name','dsPartial/helpers/required','dsPartial/error-message'], function(Handlebars) { 36408 36409this["ANF"] = this["ANF"] || {}; 36410this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36411 36412Handlebars.registerPartial("checkbox", this["ANF"]["templates"]["checkbox"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36413 return "data-brand=\"" 36414 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 36415 + "\""; 36416},"3":function(container,depth0,helpers,partials,data) { 36417 return " value=\"" 36418 + container.escapeExpression(container.lambda((depth0 != null ? depth0.value : depth0), depth0)) 36419 + "\""; 36420},"5":function(container,depth0,helpers,partials,data) { 36421 return " aria-describedby=\"" 36422 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 36423 + "-error-message\""; 36424},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36425 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 36426 36427 return "<div class=\"checkbox js-checkbox " 36428 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36429 + "\"\n " 36430 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36431 + "\n>\n <input id=\"" 36432 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 36433 + "\"\n type=\"checkbox\"\n" 36434 + ((stack1 = container.invokePartial(partials["helpers/checked"],depth0,{"name":"helpers/checked","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36435 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36436 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36437 + ((stack1 = container.invokePartial(partials["helpers/invalid"],depth0,{"name":"helpers/invalid","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36438 + ((stack1 = container.invokePartial(partials["helpers/name"],depth0,{"name":"helpers/name","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36439 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36440 + " " 36441 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.value : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36442 + "\n " 36443 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36444 + ">\n <label for=\"" 36445 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 36446 + "\">\n <span class=\"checkbox-icon\" aria-hidden=\"true\"></span>\n <span class=\"checkbox-text\">" 36447 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36448 + "</span>\n </label>\n" 36449 + ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36450 + "</div>\n"; 36451},"usePartial":true,"useData":true})); 36452 36453return this["ANF"]; 36454 36455}); 36456redesign.define('dsPartial/content-card',['handlebars','dsPartial/helpers/class-list','dsPartial/badge'], function(Handlebars) { 36457 36458this["ANF"] = this["ANF"] || {}; 36459this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36460 36461Handlebars.registerPartial("content-card", this["ANF"]["templates"]["content-card"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36462 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 36463 36464 return "<a href=\"" 36465 + container.escapeExpression(container.lambda((depth0 != null ? depth0.href : depth0), depth0)) 36466 + "\"\n class=\"content-card content-card-clickable " 36467 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36468 + "\"\n " 36469 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36470 + "\n>\n <div class=\"content-media\">\n " 36471 + ((stack1 = container.invokePartial(partials["content-media"],depth0,{"name":"content-media","fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36472 + "\n </div>\n <div class=\"content-container\">\n <div class=\"content-badge\">\n" 36473 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["badge-label"] : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
36474 + " </div>\n <div class=\"content-date\">\n " 36475 + ((stack1 = container.invokePartial(partials["content-date"],depth0,{"name":"content-date","fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36476 + "\n </div>\n <div class=\"content-title\">\n " 36477 + ((stack1 = container.invokePartial(partials["content-title"],depth0,{"name":"content-title","fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36478 + "\n </div>\n <div class=\"content-body\">\n" 36479 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36480 + " </div>\n <div class=\"content-footer\">\n <div class=\"content-cta-1\">\n " 36481 + ((stack1 = container.invokePartial(partials["content-cta-1"],depth0,{"name":"content-cta-1","fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36482 + "\n <span class=\"cta-icon\" data-icon=\"arrow-right\" aria-hidden=\"true\"></span>\n </div>\n </div>\n </div>\n</a>\n"; 36483},"2":function(container,depth0,helpers,partials,data) { 36484 return " data-variant=\"" 36485 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 36486 + "\""; 36487},"4":function(container,depth0,helpers,partials,data) { 36488 return ""; 36489},"6":function(container,depth0,helpers,partials,data) { 36490 var stack1; 36491 36492 return ((stack1 = container.invokePartial(partials.badge,depth0,{"name":"badge","hash":{"attached":true},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36493},"7":function(container,depth0,helpers,partials,data) { 36494 var stack1; 36495 36496 return " " 36497 + ((stack1 = container.lambda((depth0 != null ? depth0["badge-label"] : depth0), depth0)) != null ? stack1 : "") 36498 + "\n"; 36499},"9":function(container,depth0,helpers,partials,data) { 36500 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 36501 36502 return "<div\n class=\"content-card " 36503 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36504 + "\"\n " 36505 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36506 + "\n>\n <div class=\"content-media\">\n " 36507 + ((stack1 = container.invokePartial(partials["content-media"],depth0,{"name":"content-media","fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36508 + "\n </div>\n <div class=\"content-container\">\n <div class=\"content-badge\">\n" 36509 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["badge-label"] : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36510 + " </div>\n <div class=\"content-title\">\n " 36511 + ((stack1 = container.invokePartial(partials["content-title"],depth0,{"name":"content-title","fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36512 + "\n </div>\n <div class=\"content-body\">\n" 36513 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
36514 + " </div>\n <div class=\"content-footer\">\n <div class=\"content-cta-1\">\n " 36515 + ((stack1 = container.invokePartial(partials["content-cta-1"],depth0,{"name":"content-cta-1","fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36516 + "\n </div>\n <div class=\"content-cta-2\">\n " 36517 + ((stack1 = container.invokePartial(partials["content-cta-2"],depth0,{"name":"content-cta-2","fn":container.program(4, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36518 + "\n </div>\n </div>\n </div>\n</div>\n"; 36519},"10":function(container,depth0,helpers,partials,data) { 36520 var stack1; 36521 36522 return ((stack1 = container.invokePartial(partials.badge,depth0,{"name":"badge","hash":{"attached":true},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36523},"11":function(container,depth0,helpers,partials,data) { 36524 var stack1; 36525 36526 return " " 36527 + ((stack1 = container.lambda((depth0 != null ? depth0["badge-label"] : depth0), depth0)) != null ? stack1 : "") 36528 + "\n"; 36529},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36530 var stack1; 36531 36532 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.href : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : ""); 36533},"usePartial":true,"useData":true})); 36534 36535return this["ANF"]; 36536 36537}); 36538redesign.define('dsPartial/countdown',['handlebars'], function(Handlebars) { 36539 36540this["ANF"] = this["ANF"] || {}; 36541this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36542 36543Handlebars.registerPartial("countdown", this["ANF"]["templates"]["countdown"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36544 return ""; 36545},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36546 var stack1; 36547 36548 return "<span\n class=\"js-countdown countdown js-countdown-active\"\n role=\"timer\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-datetime=\"" 36549 + container.escapeExpression(container.lambda((depth0 != null ? depth0.datetime : depth0), depth0)) 36550 + "\"\n>\n <span class=\"countdown-active-node js-countdown-active-node\">\n " 36551 + ((stack1 = container.invokePartial(partials["countdown-active"],depth0,{"name":"countdown-active","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36552 + "\n </span>\n <span class=\"countdown-expired-node js-countdown-expired-node\" aria-hidden=\"true\">\n " 36553 + ((stack1 = container.invokePartial(partials["countdown-expired"],depth0,{"name":"countdown-expired","fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36554 + "\n </span>\n</span>\n"; 36555},"usePartial":true,"useData":true})); 36556 36557return this["ANF"]; 36558 36559}); 36560redesign.define('dsPartial/data-card',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsPartial/button'], function(Handlebars) { 36561 36562this["ANF"] = this["ANF"] || {}; 36563this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36564 36565Handlebars.registerPartial("data-card", this["ANF"]["templates"]["data-card"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36566 return "data-header"; 36567},"3":function(container,depth0,helpers,partials,data) { 36568 return "data-theme=\"" 36569 + container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)) 36570 + "\""; 36571},"5":function(container,depth0,helpers,partials,data) { 36572 var stack1; 36573 36574 return " "
36575 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["header-text"] : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36576 + "\n"; 36577},"6":function(container,depth0,helpers,partials,data) { 36578 return "<p class=\"h3\">" 36579 + container.escapeExpression(container.lambda((depth0 != null ? depth0["header-text"] : depth0), depth0)) 36580 + "</p>"; 36581},"8":function(container,depth0,helpers,partials,data) { 36582 var stack1; 36583 36584 return ((stack1 = container.invokePartial(partials.button,(depth0 != null ? depth0.button : depth0),{"name":"button","hash":{"variant":"button-as-link","class-list":(depth0 != null ? depth0["data-card-button-class-list"] : depth0)},"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36585},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36586 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 36587 36588 return "<div class=\"data-card " 36589 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36590 + "\"\n data-variant=\"" 36591 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 36592 + "\"\n " 36593 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["header-text"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36594 + "\n " 36595 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36596 + "\n" 36597 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36598 + ">\n <div class=\"data-card-header\">\n" 36599 + ((stack1 = container.invokePartial(partials["custom-header"],depth0,{"name":"custom-header","fn":container.program(5, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36600 + " " 36601 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.button : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36602 + "\n </div>\n <div class=\"data-card-content\">\n" 36603 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36604 + " </div>\n</div>"; 36605},"usePartial":true,"useData":true})); 36606 36607return this["ANF"]; 36608 36609}); 36610redesign.define('dsPartial/disclosure',['handlebars','dsPartial/helpers/data-prop','dsPartial/helpers/class-list'], function(Handlebars) { 36611 36612this["ANF"] = this["ANF"] || {}; 36613this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36614 36615Handlebars.registerPartial("disclosure", this["ANF"]["templates"]["disclosure"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36616 var stack1; 36617 36618 return " <div class=\"label-and-button-container\">\n <div class=\"html-label\">\n" 36619 + ((stack1 = container.invokePartial(partials["html-label"],depth0,{"name":"html-label","fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36620 + " </div>\n"; 36621},"2":function(container,depth0,helpers,partials,data) { 36622 return ""; 36623},"4":function(container,depth0,helpers,partials,data) { 36624 return "true"; 36625},"6":function(container,depth0,helpers,partials,data) { 36626 return "false"; 36627},"8":function(container,depth0,helpers,partials,data) { 36628 return "aria-label=\"" 36629 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 36630 + "\""; 36631},"10":function(container,depth0,helpers,partials,data) { 36632 var stack1; 36633
36634 return " <span class=\"disclosure-content\">\n <span class=\"disclosure-label\">" 36635 + container.escapeExpression(container.lambda((depth0 != null ? depth0["button-label"] : depth0), depth0)) 36636 + "</span>\n" 36637 + ((stack1 = container.invokePartial(partials["button-content"],depth0,{"name":"button-content","fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36638 + " </span>\n"; 36639},"12":function(container,depth0,helpers,partials,data) { 36640 return container.escapeExpression(container.lambda((depth0 != null ? depth0.icon : depth0), depth0)); 36641},"14":function(container,depth0,helpers,partials,data) { 36642 return "down-thin"; 36643},"16":function(container,depth0,helpers,partials,data) { 36644 return " </div>\n"; 36645},"18":function(container,depth0,helpers,partials,data) { 36646 var stack1; 36647 36648 return ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36649},"20":function(container,depth0,helpers,partials,data) { 36650 return " <p>" 36651 + container.escapeExpression(container.lambda((depth0 != null ? depth0.description : depth0), depth0)) 36652 + "</p>\n"; 36653},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36654 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 36655 36656 return "<div\n" 36657 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36658 + " class=\"disclosure " 36659 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36660 + "\">\n" 36661 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["button-label"] : depth0),{"name":"if","hash":{},"fn":container.noop,"inverse":container.program(1, data, 0),"data":data})) != null ? stack1 : "") 36662 + " <button\n aria-controls=\"disclosure-control-" 36663 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 36664 + "\"\n aria-expanded=\"" 36665 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.expanded : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") 36666 + "\"\n " 36667 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["aria-label"] : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36668 + "\n class=\"js-disclosure\"\n id=\"" 36669 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 36670 + "\"\n type=\"button\">\n" 36671 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["button-label"] : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36672 + " <span class=\"disclosure-icon\" aria-hidden=\"true\" data-icon=\"" 36673 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.program(14, data, 0),"data":data})) != null ? stack1 : "") 36674 + "\"></span></button>\n" 36675 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["button-label"] : depth0),{"name":"if","hash":{},"fn":container.noop,"inverse":container.program(16, data, 0),"data":data})) != null ? stack1 : "") 36676 + " <div\n aria-hidden=\"" 36677 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.expanded : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") 36678 + "\"\n aria-labelledby=\"" 36679 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 36680 + "\"\n class=\"disclosure-panel\"\n data-animated=\"" 36681 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.animated : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") 36682 + "\"\n id=\"disclosure-control-" 36683 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 36684 + "\"\n role=\"region\">\n" 36685 + ((stack1 = helpers["if"].call(alias1,(data && data["partial-block"]),{"n
36685ame":"if","hash":{},"fn":container.program(18, data, 0),"inverse":container.program(20, data, 0),"data":data})) != null ? stack1 : "") 36686 + " </div>\n</div>\n"; 36687},"usePartial":true,"useData":true})); 36688 36689return this["ANF"]; 36690 36691}); 36692redesign.define('dsPartial/document',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 36693 36694this["ANF"] = this["ANF"] || {}; 36695this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36696 36697Handlebars.registerPartial("document", this["ANF"]["templates"]["document"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36698 var stack1; 36699 36700 return "<div class=\"document " 36701 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36702 + "\">\n" 36703 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":"\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36704 + "</div>\n"; 36705},"usePartial":true,"useData":true})); 36706 36707return this["ANF"]; 36708 36709}); 36710redesign.define('dsPartial/faux-button',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop'], function(Handlebars) { 36711 36712this["ANF"] = this["ANF"] || {}; 36713this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36714 36715Handlebars.registerPartial("faux-button", this["ANF"]["templates"]["faux-button"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36716 var stack1; 36717 36718 return "<div class=\"faux-button js-faux-button " 36719 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36720 + "\"\n" 36721 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36722 + " tabindex=\"0\" role=\"button\">\n\n" 36723 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36724 + "\n</div>\n"; 36725},"usePartial":true,"useData":true})); 36726 36727return this["ANF"]; 36728 36729}); 36730redesign.define('dsPartial/file-attachment',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/additional-attrs','dsPartial/helpers/data-prop','dsPartial/icon-button'], function(Handlebars) { 36731 36732this["ANF"] = this["ANF"] || {}; 36733this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36734 36735Handlebars.registerPartial("file-attachment", this["ANF"]["templates"]["file-attachment"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36736 return "data-files-label=\"" 36737 + container.escapeExpression(container.lambda((depth0 != null ? depth0["files-label-text"] : depth0), depth0)) 36738 + "\""; 36739},"3":function(container,depth0,helpers,partials,data) { 36740 return ""; 36741},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36742 var stack1; 36743 36744 return "<span class=\"file-attachment " 36745 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36746 + "\"\n" 36747 + ((stack1 = container.invokePartial(partials["helpers/additional-attrs"],depth0,{"name":"helpers/additional-attrs","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36748 + " " 36749 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36750 + ">\n <span class=\"h4 file-name js-file-name\" "
36751 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["files-label-text"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36752 + ">\n " 36753 + container.escapeExpression(container.lambda((depth0 != null ? depth0.filename : depth0), depth0)) 36754 + "\n </span>\n" 36755 + ((stack1 = container.invokePartial(partials["icon-button"],depth0,{"name":"icon-button","hash":{"theme":"inverse","label":(depth0 != null ? depth0["remove-button-label"] : depth0),"current-state":"off","type":"button","icon":"close-thick","class-list":"file-remove-button js-file-remove-button"},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36756 + "</span>\n"; 36757},"usePartial":true,"useData":true})); 36758 36759return this["ANF"]; 36760 36761}); 36762redesign.define('dsPartial/file-input',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/additional-attrs','dsPartial/helpers/data-prop','dsPartial/helpers/disabled','dsPartial/helpers/invalid','dsPartial/helpers/name','dsPartial/helpers/required','dsPartial/button','dsPartial/file-attachment','dsPartial/error-message'], function(Handlebars) { 36763 36764this["ANF"] = this["ANF"] || {}; 36765this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36766 36767Handlebars.registerPartial("file-input", this["ANF"]["templates"]["file-input"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36768 return "aria-describedby=\"" 36769 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 36770 + "-error-message\""; 36771},"3":function(container,depth0,helpers,partials,data) { 36772 var stack1; 36773 36774 return ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","hash":{"error-message-text":(depth0 != null ? depth0["error-message-text"] : depth0),"id":(depth0 != null ? depth0.id : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36775},"5":function(container,depth0,helpers,partials,data) { 36776 var stack1; 36777 36778 return ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36779},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36780 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 36781 36782 return "<div class=\"file-input js-file-input " 36783 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36784 + "\" data-hide-attachments=\"true\">\n <input type=\"file\" class=\"js-open-file-input\" accept=\"" 36785 + alias2(alias1((depth0 != null ? depth0.accept : depth0), depth0)) 36786 + "\"\n" 36787 + ((stack1 = container.invokePartial(partials["helpers/additional-attrs"],depth0,{"name":"helpers/additional-attrs","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36788 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36789 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36790 + ((stack1 = container.invokePartial(partials["helpers/invalid"],depth0,{"name":"helpers/invalid","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36791 + ((stack1 = container.invokePartial(partials["helpers/name"],depth0,{"name":"helpers/name","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36792 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36793 + " " 36794 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36795 + "\n id=\"" 36796 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 36797 + "\"\n aria-label=\"" 36798 + alias2(alias1((depth0 != null ? depth0.label : depth0), depth0)) 36799 + "\"\n multiple />\n" 36800 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"full-width":(depth0 != null ? depth0["open-button-full-width"] : depth0),"label":(depth0 != null ? depth0["open-button-label"] : depth0),"variant":(depth0 != null ? depth0["open-button-variant"] : depth0),"disabled":(depth0 != null ? depth0.disabled : depth0),"type":"button","class-list":"open-file-button js-open-file"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36801 + " <div class=\"file-input-attachments-container\">\n" 36802 + ((stack1 = container.invokePartial(partials["file-attachment"],depth0,{"name":"file-attachment","hash":{"remove-button-label":(depth0 != null ? depth0["remove-button-label"] : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36803 + " </div>\n" 36804 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["error-message-text"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36805 + ((stack1 = helpers["if"].call(alias3,(data && data["partial-block"]),{"n
36805ame":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36806 + "</div>\n"; 36807},"usePartial":true,"useData":true})); 36808 36809return this["ANF"]; 36810 36811}); 36812redesign.define('dsPartial/heading-banner',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 36813 36814this["ANF"] = this["ANF"] || {}; 36815this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36816 36817Handlebars.registerPartial("heading-banner", this["ANF"]["templates"]["heading-banner"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36818 var stack1; 36819 36820 return "<div class=\"heading-banner " 36821 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36822 + "\"\n data-variant=\"" 36823 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 36824 + "\"\n>\n" 36825 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36826 + "</div>\n"; 36827},"usePartial":true,"useData":true})); 36828 36829return this["ANF"]; 36830 36831}); 36832redesign.define('dsPartial/slider',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 36833 36834this["ANF"] = this["ANF"] || {}; 36835this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36836 36837Handlebars.registerPartial("slider", this["ANF"]["templates"]["slider"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36838 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 36839 36840 return "<div class=\"slider ds-slider\">\n <div class=\"js-early-dots\"></div>\n <div\n id=\"" 36841 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 36842 + "\"\n class=\"slider-auto js-slider " 36843 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36844 + "\"\n data-load=\"auto\"\n data-variant=\"" 36845 + alias2(alias1((depth0 != null ? depth0.variant : depth0), depth0)) 36846 + "\"\n data-load=\"" 36847 + alias2(alias1((depth0 != null ? depth0["data-load"] : depth0), depth0)) 36848 + "\"\n data-slider=\"" 36849 + alias2(alias1((depth0 != null ? depth0["data-slider"] : depth0), depth0)) 36850 + "\"\n >\n" 36851 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36852 + " </div>\n</div>\n"; 36853},"usePartial":true,"useData":true})); 36854 36855return this["ANF"]; 36856 36857}); 36858redesign.define('dsPartial/headline',['handlebars','dsPartial/slider','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsPartial/icon-button','dsPartial/button-state'], function(Handlebars) { 36859 36860this["ANF"] = this["ANF"] || {}; 36861this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36862 36863Handlebars.registerPartial("headline", this["ANF"]["templates"]["headline"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36864 return "js-headline"; 36865},"3":function(container,depth0,helpers,partials,data) { 36866 return "data-brand=\"" 36867 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 36868 + "\""; 36869},"5":function(container,depth0,helpers,partials,data) { 36870 return container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)); 36871},"7":function(container,depth0,helpers,partials,data) { 36872 return container.escapeExpression(container.lambda((depth0 != null ? depth0.style : depth0), depth0)); 36873},"9":function(container,depth0,helpers,partials,data) { 36874 return "data-style=\"" 36875 + container.escapeExpression(container.lambda((depth0 != null ? depth0.style : depth0), depth0)) 36876 + "\""; 36877},"11":function(container,depth0,helpers,partials,data) { 36878 return container.escapeExpression(container.lambda((depth0 != null ? depth0.speed : depth0), depth0)); 36879},"13":function(container,depth0,helpers,partials,data) { 36880 return "medium"; 36881},"15":function(container,depth0,helpers,partials,data) { 36882 return container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)); 36883},"17":function(container,depth0,helpers,partials,data) { 36884 return "default"; 36885},"19":function(container,depth0,helpers,partials,data) { 36886 return "data-highlighted=\"" 36887 + container.escapeExpression(container.lambda((depth0 != null ? depth0.highlighted : depth0), depth0)) 36888 + "\""; 36889},"21":function(container,depth0,helpers,partials,data) { 36890 return "data-size=\"" 36891 + container.escapeExpression(container.lambda((depth0 != null ? depth0.size : depth0), depth0)) 36892 + "\""; 36893},"23":function(container,depth0,helpers,partials,data) { 36894 return "data-padding-top=\"" 36895 + container.escapeExpression(container.lambda((depth0 != null ? depth0["padding-top"] : depth0), depth0)) 36896 + "\""; 36897},"25":function(container,depth0,helpers,partials,data) { 36898 return "data-margin-top=\"" 36899 + container.escapeExpression(container.lambda((depth0 != null ? depth0["margin-top"] : depth0), depth0)) 36900 + "\""; 36901},"27":function(container,depth0,helpers,partials,data) { 36902 return "data-margin-bottom=\"" 36903 + container.escapeExpression(container.lambda((depth0 != null ? depth0["margin-bottom"] : depth0), depth0)) 36904 + "\""; 36905},"29":function(container,depth0,helpers,partials,data) { 36906 return "data-no-text-transform=\"" 36907 + container.escapeExpression(container.lambda((depth0 != null ? depth0["no-text-transform"] : depth0), depth0)) 36908 + "\""; 36909},"31":function(container,depth0,helpers,partials,data) { 36910 var stack1; 36911 36912 return ((stack1 = container.invokePartial(partials["icon-button"],depth0,{"name":"icon-button","hash":{"class-list":"headline-slider-button js-
36912headline-slider-button","current-state":"playing","variant":"square","type":"button"},"fn":container.program(32, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36913},"32":function(container,depth0,helpers,partials,data) { 36914 var stack1; 36915 36916 return ((stack1 = container.invokePartial(partials["button-state"],depth0,{"name":"button-state","hash":{"active":false,"aria-label":(depth0 != null ? depth0["play-label"] : depth0),"icon":"play","state":"paused"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36917 + ((stack1 = container.invokePartial(partials["button-state"],depth0,{"name":"button-state","hash":{"active":true,"aria-label":(depth0 != null ? depth0["pause-label"] : depth0),"icon":"pause","state":"playing"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 36918},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36919 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 36920 36921 return "<span class=\"headline " 36922 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.slider : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36923 + " " 36924 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36925 + "\"\n " 36926 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36927 + "\n data-variant=\"" 36928 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 36929 + "\"\n " 36930 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.style : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36931 + "\n data-speed=\"" 36932 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.speed : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : "") 36933 + "\"\n data-theme=\"" 36934 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.program(17, data, 0),"data":data})) != null ? stack1 : "") 36935 + "\"\n " 36936 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.highlighted : depth0),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36937 + "\n " 36938 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.size : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36939 + "\n " 36940 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["padding-top"] : depth0),{"name":"if","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36941 + "\n " 36942 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["margin-top"] : depth0),{"name":"if","hash":{},"fn":container.program(25, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36943 + "\n " 36944 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["margin-bottom"] : depth0),{"name":"if","hash":{},"fn":container.program(27, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36945 + "\n data-alignment=\"" 36946 + container.escapeExpression(container.lambda((depth0 != null ? depth0.alignment : depth0), depth0)) 36947 + "\"\n " 36948 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["no-text-transform"] : depth0),{"name":"if","hash":{},"fn":container.program(29, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36949 + "\n " 36950 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36951 + ">\n" 36952 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 36953 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.slider : depth0),{"name":"if","hash":{},"fn":container.program(31, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 36954 + "</span>\n"; 36955},"usePartial":true,"useData":true})); 36956 36957return this["ANF"]; 36958 36959}); 36960redesign.define('dsPartial/helpers/aria-label',['handlebars'], function(Handlebars) { 36961 36962this["ANF"] = this["ANF"] || {}; 36963this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36964 36965Handlebars.registerPartial("helpers/aria-label", this["ANF"]["templates"]["helpers/aria-label"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36966 return " aria-label=\"" 36967 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 36968 + "\"\n"; 36969},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36970 var stack1; 36971
36972 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["aria-label"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 36973},"useData":true})); 36974 36975return this["ANF"]; 36976 36977}); 36978redesign.define('dsPartial/helpers/button/button-shape',['handlebars'], function(Handlebars) { 36979 36980this["ANF"] = this["ANF"] || {}; 36981this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 36982 36983Handlebars.registerPartial("helpers/button/button-shape", this["ANF"]["templates"]["helpers/button/button-shape"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 36984 return " data-shape=\"" 36985 + container.escapeExpression(container.lambda((depth0 != null ? depth0.shape : depth0), depth0)) 36986 + "\"\n"; 36987},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 36988 var stack1; 36989 36990 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.shape : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 36991},"useData":true})); 36992 36993return this["ANF"]; 36994 36995}); 36996redesign.define('dsPartial/helpers/data-align',['handlebars'], function(Handlebars) { 36997 36998this["ANF"] = this["ANF"] || {}; 36999this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37000 37001Handlebars.registerPartial("helpers/data-align", this["ANF"]["templates"]["helpers/data-align"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37002 return " data-align=\"" 37003 + container.escapeExpression(container.lambda((depth0 != null ? depth0.align : depth0), depth0)) 37004 + "\""; 37005},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37006 var stack1; 37007 37008 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.align : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37009 + "\n"; 37010},"useData":true})); 37011 37012return this["ANF"]; 37013 37014}); 37015redesign.define('dsPartial/helpers/data-margin-top',['handlebars'], function(Handlebars) { 37016 37017this["ANF"] = this["ANF"] || {}; 37018this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37019 37020Handlebars.registerPartial("helpers/data-margin-top", this["ANF"]["templates"]["helpers/data-margin-top"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37021 return " data-margin-top=\"" 37022 + container.escapeExpression(container.lambda((depth0 != null ? depth0["margin-top"] : depth0), depth0)) 37023 + "\""; 37024},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37025 var stack1; 37026 37027 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["margin-top"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37028 + "\n"; 37029},"useData":true})); 37030 37031return this["ANF"]; 37032 37033}); 37034redesign.define('dsPartial/helpers/data-padding-top',['handlebars'], function(Handlebars) { 37035 37036this["ANF"] = this["ANF"] || {}; 37037this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37038 37039Handlebars.registerPartial("helpers/data-padding-top", this["ANF"]["templates"]["helpers/data-padding-top"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37040 return " data-padding-top=\"" 37041 + container.escapeExpression(container.lambda((depth0 != null ? depth0["padding-top"] : depth0), depth0)) 37042 + "\""; 37043},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37044 var stack1; 37045 37046 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["padding-top"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37047 + "\n"; 37048},"useData":true})); 37049 37050return this["ANF"]; 37051 37052});
37053redesign.define('dsPartial/helpers/data-version',['handlebars'], function(Handlebars) { 37054 37055this["ANF"] = this["ANF"] || {}; 37056this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37057 37058Handlebars.registerPartial("helpers/data-version", this["ANF"]["templates"]["helpers/data-version"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37059 return " data-version=\"" 37060 + container.escapeExpression(container.lambda((depth0 != null ? depth0.version : depth0), depth0)) 37061 + "\""; 37062},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37063 var stack1; 37064 37065 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.version : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37066 + "\n"; 37067},"useData":true})); 37068 37069return this["ANF"]; 37070 37071}); 37072redesign.define('dsPartial/helpers/orientation',['handlebars'], function(Handlebars) { 37073 37074this["ANF"] = this["ANF"] || {}; 37075this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37076 37077Handlebars.registerPartial("helpers/orientation", this["ANF"]["templates"]["helpers/orientation"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37078 return " data-orientation=\"" 37079 + container.escapeExpression(container.lambda((depth0 != null ? depth0.orientation : depth0), depth0)) 37080 + "\""; 37081},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37082 var stack1; 37083 37084 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.orientation : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37085 + "\n"; 37086},"useData":true})); 37087 37088return this["ANF"]; 37089 37090}); 37091redesign.define('dsPartial/horizontal-or-separator',['handlebars'], function(Handlebars) { 37092 37093this["ANF"] = this["ANF"] || {}; 37094this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37095 37096Handlebars.registerPartial("horizontal-or-separator", this["ANF"]["templates"]["horizontal-or-separator"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37097 var stack1; 37098 37099 return "<span class=\"horizontal-or-separator\">" 37100 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37101 + "</span>\n"; 37102},"usePartial":true,"useData":true})); 37103 37104return this["ANF"]; 37105 37106}); 37107redesign.define('dsPartial/icon-block',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop'], function(Handlebars) { 37108 37109this["ANF"] = this["ANF"] || {}; 37110this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37111 37112Handlebars.registerPartial("icon-block", this["ANF"]["templates"]["icon-block"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37113 return container.escapeExpression(container.lambda((depth0 != null ? depth0["data-icon-size"] : depth0), depth0)); 37114},"3":function(container,depth0,helpers,partials,data) { 37115 return "20"; 37116},"5":function(container,depth0,helpers,partials,data) { 37117 return "data-center-vertically=\"true\""; 37118},"7":function(container,depth0,helpers,partials,data) { 37119 return "data-icon=\"" 37120 + container.escapeExpression(container.lambda((depth0 != null ? depth0["data-icon"] : depth0), depth0)) 37121 + "\""; 37122},"9":function(container,depth0,helpers,partials,data) { 37123 return "aria-hidden=\"true\""; 37124},"11":function(container,depth0,helpers,partials,data) { 37125 var alias1=container.lambda, alias2=container.escapeExpression; 37126 37127 return "<img class=\"icon-block-icon-image\" src=\"" 37128 + alias2(alias1((depth0 != null ? depth0["icon-image-url"] : depth0), depth0)) 37129 + "\" alt=\"" 37130 + alias2(alias1((depth0 != null ? depth0["icon-image-alt"] : depth0), depth0)) 37131 + "\">"; 37132},"13":function(container,depth0,helpers,partials,data) { 37133 var stack1; 37134 37135 return ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 37136},"15":function(container,depth0,helpers,partials,data) { 37137 var stack1; 37138
37139 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["icon-block-optional-content"] : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 37140},"16":function(container,depth0,helpers,partials,data) { 37141 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 37142 37143 return " <span class=\"icon-block-optional-content\">\n" 37144 + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0["icon-block-optional-content"] : depth0)) != null ? stack1["icon-block-heading"] : stack1),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37145 + ((stack1 = helpers.each.call(alias1,((stack1 = (depth0 != null ? depth0["icon-block-optional-content"] : depth0)) != null ? stack1["icon-block-text"] : stack1),{"name":"each","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37146 + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0["icon-block-optional-content"] : depth0)) != null ? stack1["icon-block-link"] : stack1)) != null ? stack1["icon-block-link-text"] : stack1),{"name":"if","hash":{},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37147 + " </span>\n"; 37148},"17":function(container,depth0,helpers,partials,data) { 37149 var stack1; 37150 37151 return " <span class=\"icon-block-heading\">" 37152 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0["icon-block-optional-content"] : depth0)) != null ? stack1["icon-block-heading"] : stack1), depth0)) 37153 + "</span>\n"; 37154},"19":function(container,depth0,helpers,partials,data) { 37155 var stack1; 37156 37157 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["icon-block-text-line"] : depth0),{"name":"if","hash":{},"fn":container.program(20, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 37158},"20":function(container,depth0,helpers,partials,data) { 37159 return " <span class=\"icon-block-text\">" 37160 + container.escapeExpression(container.lambda((depth0 != null ? depth0["icon-block-text-line"] : depth0), depth0)) 37161 + "</span>\n"; 37162},"22":function(container,depth0,helpers,partials,data) { 37163 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 37164 37165 return " <a class=\"icon-block-link\"\n href=\"" 37166 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0["icon-block-optional-content"] : depth0)) != null ? stack1["icon-block-link"] : stack1)) != null ? stack1.href : stack1), depth0)) 37167 + "\"\n" 37168 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = ((stack1 = (depth0 != null ? depth0["icon-block-optional-content"] : depth0)) != null ? stack1["icon-block-link"] : stack1)) != null ? stack1["aria-label"] : stack1),{"name":"if","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37169 + " >" 37170 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0["icon-block-optional-content"] : depth0)) != null ? stack1["icon-block-link"] : stack1)) != null ? stack1["icon-block-link-text"] : stack1), depth0)) 37171 + "</a>\n"; 37172},"23":function(container,depth0,helpers,partials,data) { 37173 var stack1; 37174 37175 return " aria-label=\"" 37176 + container.escapeExpression(container.lambda(((stack1 = ((stack1 = (depth0 != null ? depth0["icon-block-optional-content"] : depth0)) != null ? stack1["icon-block-link"] : stack1)) != null ? stack1["aria-label"] : stack1), depth0)) 37177 + "\"\n"; 37178},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37179 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 37180 37181 return "<div class=\"icon-block legacy-icon-block " 37182 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37183 + "\"\n" 37184 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37185 + " data-icon-size=\"" 37186 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["data-icon-size"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 37187 + "\"\n " 37188 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["data-center-vertically"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37189 + ">\n <span class=\"icon-block-icon\" " 37190 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["data-icon"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37191 + " " 37192 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0["icon-image-url"] : depth0),{"name":"unless","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37193 + ">" 37194 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["icon-image-url"] : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37195 + "</span>\n" 37196 + ((stack1 = helpers["if"].call(alias1,(data && data["partial-block"]),{"n
37196ame":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(15, data, 0),"data":data})) != null ? stack1 : "") 37197 + "</div>\n"; 37198},"usePartial":true,"useData":true})); 37199 37200return this["ANF"]; 37201 37202}); 37203redesign.define('dsPartial/icon-link-group',['handlebars','dsPartial/helpers/class-list','dsPartial/icon-link'], function(Handlebars) { 37204 37205this["ANF"] = this["ANF"] || {}; 37206this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37207 37208Handlebars.registerPartial("icon-link-group", this["ANF"]["templates"]["icon-link-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37209 var stack1; 37210 37211 return " <li>\n" 37212 + ((stack1 = container.invokePartial(partials["icon-link"],depth0,{"name":"icon-link","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37213 + " </li>\n"; 37214},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37215 var stack1; 37216 37217 return "<ul class=\"" 37218 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37219 + "\">\n" 37220 + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["icon-link"] : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37221 + "</ul>\n"; 37222},"usePartial":true,"useData":true})); 37223 37224return this["ANF"]; 37225 37226}); 37227redesign.define('dsPartial/inline-field-group',['handlebars','dsHelper/requiredValue','dsPartial/helpers/class-list','dsPartial/error-message'], function(Handlebars) { 37228 37229this["ANF"] = this["ANF"] || {}; 37230this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37231 37232Handlebars.registerPartial("inline-field-group", this["ANF"]["templates"]["inline-field-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37233 var stack1; 37234 37235 return " <fieldset class=\"inline-field-group js-inline-field-group " 37236 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37237 + "\" " 37238 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37239 + ">\n <legend class=\"screen-reader-text\">" 37240 + container.escapeExpression(container.lambda((depth0 != null ? depth0.label : depth0), depth0)) 37241 + "</legend>\n <div class=\"flexbox-wrapper\">\n" 37242 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37243 + ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37244 + " </div>\n </fieldset>\n"; 37245},"2":function(container,depth0,helpers,partials,data) { 37246 return "aria-invalid=\"true\""; 37247},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37248 var stack1; 37249 37250 return ((stack1 = helpers.requiredValue.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.label : depth0),{"name":"requiredValue","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 37251},"usePartial":true,"useData":true})); 37252 37253return this["ANF"]; 37254 37255}); 37256redesign.define('dsPartial/password-field',['handlebars','dsPartial/input-field','dsPartial/button','dsPartial/button-state'], function(Handlebars) { 37257 37258this["ANF"] = this["ANF"] || {}; 37259this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37260 37261Handlebars.registerPartial("password-field", this["ANF"]["templates"]["password-field"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { 37262 return ""; 37263},"2":function(container,depth0,helpers,partials,data,blockParams,depths) { 37264 var stack1; 37265 37266 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"label":false,"class-list":"password-field-button
37266js-password-field-button"},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 37267},"3":function(container,depth0,helpers,partials,data,blockParams,depths) { 37268 var stack1; 37269 37270 return ((stack1 = container.invokePartial(partials["button-state"],depth0,{"name":"button-state","hash":{"label":(depths[1] != null ? depths[1]["hidden-aria-label"] : depths[1]),"active":true,"state":"hidden","icon":"eye"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37271 + ((stack1 = container.invokePartial(partials["button-state"],depth0,{"name":"button-state","hash":{"label":(depths[1] != null ? depths[1]["showing-aria-label"] : depths[1]),"state":"showing","icon":"eye-filled"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 37272},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 37273 var stack1; 37274 37275 return "<div class=\"password-field js-password-field\" data-visible=\"false\"\n data-showing=\"false\">\n" 37276 + ((stack1 = container.invokePartial(partials["input-field"],depth0,{"name":"input-field","hash":{"autocomplete":"password","type":"password","secondary-action":true},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37277 + "</div>\n"; 37278},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { 37279 37280 var decorators = container.decorators; 37281 37282 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["secondary-action"],"data":data}) || fn; 37283 return fn; 37284 } 37285 37286,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true})); 37287 37288return this["ANF"]; 37289 37290}); 37291redesign.define('dsPartial/input-field-elevated',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsHelper/is','dsPartial/password-field','dsPartial/input-field'], function(Handlebars) { 37292 37293this["ANF"] = this["ANF"] || {}; 37294this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37295 37296Handlebars.registerPartial("input-field-elevated", this["ANF"]["templates"]["input-field-elevated"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37297 var stack1; 37298 37299 return ((stack1 = container.invokePartial(partials["password-field"],depth0,{"name":"password-field","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 37300},"3":function(container,depth0,helpers,partials,data) { 37301 var stack1; 37302 37303 return ((stack1 = container.invokePartial(partials["input-field"],depth0,{"name":"input-field","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 37304},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37305 var stack1; 37306 37307 return "<div class=\"input-field-elevated js-input-field-elevated " 37308 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37309 + "\" " 37310 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37311 + ">\n" 37312 + ((stack1 = helpers.is.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.type : depth0),"password",{"name":"is","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 37313 + "</div>\n"; 37314},"usePartial":true,"useData":true})); 37315 37316return this["ANF"]; 37317 37318}); 37319redesign.define('dsPartial/interstitial',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
37319data-prop'], function(Handlebars) { 37320 37321this["ANF"] = this["ANF"] || {}; 37322this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37323 37324Handlebars.registerPartial("interstitial", this["ANF"]["templates"]["interstitial"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37325 var stack1; 37326 37327 return " <button class=\"interstitial-close-button js-close-interstitial\"\n " 37328 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["close-button-theme"] : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37329 + " type=\"button\" >\n <span class=\"screen-reader-text\">" 37330 + container.escapeExpression(container.lambda((depth0 != null ? depth0.closeText : depth0), depth0)) 37331 + "</span>\n <span aria-hidden=\"false\" class=\"interstitial-close-icon\"></span>\n </button>\n"; 37332},"2":function(container,depth0,helpers,partials,data) { 37333 return " data-close-button-theme=\"" 37334 + container.escapeExpression(container.lambda((depth0 != null ? depth0["close-button-theme"] : depth0), depth0)) 37335 + "\""; 37336},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37337 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 37338 37339 return "<div class=\"interstitial interstitial-z-index js-interstitial js-lock-tabs " 37340 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37341 + "\"\n data-action=\"" 37342 + alias2(alias1((depth0 != null ? depth0.escapeKeyAction : depth0), depth0)) 37343 + "\"\n data-style=\"" 37344 + alias2(alias1((depth0 != null ? depth0.style : depth0), depth0)) 37345 + "\"\n id=\"" 37346 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 37347 + "\"\n tabindex=\"-1\"\n data-open=\"false\"\n " 37348 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37349 + ">\n <div class=\"js-first-tab-buffer\"></div>\n <div class=\"interstitial-overflow-wrapper\">\n <div class=\"interstitial-block interstitial-block-bg\" role=\"dialog\" aria-labelledby=\"" 37350 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 37351 + "-label\">\n" 37352 + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.hideCloseButton : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37353 + " <div class=\"interstitial-content\">\n" 37354 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37355 + " </div>\n </div>\n </div>\n <div class=\"js-last-tab-buffer\"></div>\n</div>\n"; 37356},"usePartial":true,"useData":true})); 37357 37358return this["ANF"]; 37359 37360}); 37361redesign.define('dsPartial/lateral-scroller',['handlebars'], function(Handlebars) { 37362 37363this["ANF"] = this["ANF"] || {}; 37364this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37365 37366Handlebars.registerPartial("lateral-scroller", this["ANF"]["templates"]["lateral-scroller"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37367 return "js-lateral-scroll-previous"; 37368},"3":function(container,depth0,helpers,partials,data) { 37369 return "js-lateral-scroll-left"; 37370},"5":function(container,depth0,helpers,partials,data) { 37371 return "js-lateral-scroll-next"; 37372},"7":function(container,depth0,helpers,partials,data) { 37373 return "js-lateral-scroll-right"; 37374},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37375 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 37376 37377 return "<div class=\"lateral-scroller js-lateral-scroller\" data-arrows=\"hide-left\">\n <button\n aria-hidden=\"true\"\n class=\"lateral-scroll-button lateral-scroll-left " 37378 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["paged-behavior"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 37379 + "\"\n tabindex=\"-1\"\n type=\"button\"\n >\n <span data-icon=\"left-thin\" />\n </button>\n\n <div class=\"lateral-scroller-content-container js-lateral-scroller-content-container\">\n" 37380 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37381 + " </div>\n\n <button\n aria-hidden=\"true\"\n class=\"lateral-scroll-button lateral-scroll-right " 37382 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["paged-behavior"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 37383 + "\"\n tabindex=\"-1\"\n type=\"button\"\n >\n <span data-icon=\"right-thin\" />\n </button>\n</div>\n"; 37384},"usePartial":true,"useData":true})); 37385 37386return this["ANF"]; 37387 37388}); 37389redesign.define('dsPartial/legal-text',['handlebars'], function(Handlebars) { 37390 37391this["ANF"] = this["ANF"] || {}; 37392this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37393 37394Handlebars.registerPartial("legal-text", this["ANF"]["templates"]["legal-text"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37395 return "data-brand=\"" 37396 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 37397 + "\""; 37398},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37399 var stack1; 37400 37401 return "<div class=\"legal-text\" "
37402 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37403 + " data-theme=\"" 37404 + container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)) 37405 + "\">\n" 37406 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37407 + "</div>\n"; 37408},"usePartial":true,"useData":true})); 37409 37410return this["ANF"]; 37411 37412}); 37413redesign.define('dsPartial/link-list-arrow',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop'], function(Handlebars) { 37414 37415this["ANF"] = this["ANF"] || {}; 37416this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37417 37418Handlebars.registerPartial("link-list-arrow", this["ANF"]["templates"]["link-list-arrow"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37419 var stack1; 37420 37421 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.links : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 37422},"2":function(container,depth0,helpers,partials,data) { 37423 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 37424 37425 return " <li " 37426 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["li-class-list"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37427 + " " 37428 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37429 + ">\n <a href=\"" 37430 + alias3(alias2((depth0 != null ? depth0.url : depth0), depth0)) 37431 + "\">\n" 37432 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.title : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37433 + " " 37434 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 37435 + "\n <span aria-hidden=\"true\" class=\"link-arrow\" />\n </a>\n </li>\n"; 37436},"3":function(container,depth0,helpers,partials,data) { 37437 return "class=\"" 37438 + container.escapeExpression(container.lambda((depth0 != null ? depth0["li-class-list"] : depth0), depth0)) 37439 + "\""; 37440},"5":function(container,depth0,helpers,partials,data) { 37441 return " <span class=\"link-arrow-title\">" 37442 + container.escapeExpression(container.lambda((depth0 != null ? depth0.title : depth0), depth0)) 37443 + "</span>\n"; 37444},"7":function(container,depth0,helpers,partials,data) { 37445 var stack1; 37446 37447 return ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 37448},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37449 var stack1; 37450 37451 return "<ul class=\"link-list-arrow " 37452 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37453 + "\">\n" 37454 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.links : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 37455 + "</ul>\n"; 37456},"usePartial":true,"useData":true})); 37457 37458return this["ANF"]; 37459 37460}); 37461redesign.define('dsPartial/list-menu-option-link',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
37461data-prop'], function(Handlebars) { 37462 37463this["ANF"] = this["ANF"] || {}; 37464this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37465 37466Handlebars.registerPartial("list-menu-option-link", this["ANF"]["templates"]["list-menu-option-link"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37467 return "selected"; 37468},"3":function(container,depth0,helpers,partials,data) { 37469 return "<span class=\"screen-reader-text toggle-screen-reader-text\">" 37470 + container.escapeExpression(container.lambda((depth0 != null ? depth0["selected-label"] : depth0), depth0)) 37471 + "</span>"; 37472},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37473 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda; 37474 37475 return "<li class=\"list-menu-option " 37476 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.selected : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37477 + " " 37478 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37479 + "\"\n " 37480 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37481 + ">\n <a class=\"list-menu-option-link\" href=\"" 37482 + container.escapeExpression(alias2((depth0 != null ? depth0.url : depth0), depth0)) 37483 + "\">\n " 37484 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["selected-label"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37485 + "\n " 37486 + ((stack1 = alias2((data && data["partial-block"]), depth0)) != null ? stack1 : "") 37487 + "\n </a>\n</li>\n"; 37488},"usePartial":true,"useData":true})); 37489 37490return this["ANF"]; 37491 37492}); 37493redesign.define('dsPartial/loader',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/variant','dsPartial/helpers/theme','dsHelper/is'], function(Handlebars) { 37494 37495this["ANF"] = this["ANF"] || {}; 37496this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37497 37498Handlebars.registerPartial("loader", this["ANF"]["templates"]["loader"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37499 return "aria-hidden=\"true\""; 37500},"3":function(container,depth0,helpers,partials,data) { 37501 return " <span></span><span></span><span></span><span></span><span></span><span></span>\n"; 37502},"5":function(container,depth0,helpers,partials,data) { 37503 return " <span></span><span></span>\n"; 37504},"7":function(container,depth0,helpers,partials,data) { 37505 return "<span class=\"screen-reader-text\">" 37506 + container.escapeExpression(container.lambda((depth0 != null ? depth0.label : depth0), depth0)) 37507 + "</span>"; 37508},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37509 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 37510 37511 return "<span class=\"loader " 37512 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37513 + "\" " 37514 + ((stack1 = container.invokePartial(partials["helpers/variant"],depth0,{"name":"helpers/variant","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37515 + " " 37516 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37517 + "\n " 37518 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.label : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37519 + ">" 37520 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.variant : depth0),"spinner",{"name":"is","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37521 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.variant : depth0),"dots",{"name":"is","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37522 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.label : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37523 + "\n</span>\n"; 37524},"usePartial":true,"useData":true})); 37525 37526return this["ANF"]; 37527 37528}); 37529redesign.define('dsPartial/lockup',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
37529data-prop'], function(Handlebars) { 37530 37531this["ANF"] = this["ANF"] || {}; 37532this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37533 37534Handlebars.registerPartial("lockup", this["ANF"]["templates"]["lockup"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37535 var stack1; 37536 37537 return "<div class=\"lockup " 37538 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37539 + "\"\n data-align=\"" 37540 + container.escapeExpression(container.lambda((depth0 != null ? depth0.align : depth0), depth0)) 37541 + "\"\n" 37542 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37543 + ">\n" 37544 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37545 + "</div>\n"; 37546},"usePartial":true,"useData":true})); 37547 37548return this["ANF"]; 37549 37550}); 37551redesign.define('dsPartial/logo',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-brand','dsHelper/is'], function(Handlebars) { 37552 37553this["ANF"] = this["ANF"] || {}; 37554this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37555 37556Handlebars.registerPartial("logo", this["ANF"]["templates"]["logo"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37557 return " <span class=\"screen-reader-text\">" 37558 + container.escapeExpression(container.lambda((depth0 != null ? depth0["icon-aria-label"] : depth0), depth0)) 37559 + "</span>\n"; 37560},"3":function(container,depth0,helpers,partials,data) { 37561 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 37562 37563 return ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.brand : depth0),"anf",{"name":"is","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37564 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.brand : depth0),"hol",{"name":"is","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37565 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.brand : depth0),"kids",{"name":"is","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37566 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.brand : depth0),"gh",{"name":"is","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37567 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.brand : depth0),"st",{"name":"is","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 37568},"4":function(container,depth0,helpers,partials,data) { 37569 return " <span class=\"screen-reader-text\">abercrombie and fitch</span>\n"; 37570},"6":function(container,depth0,helpers,partials,data) { 37571 return " <span class=\"screen-reader-text\">hollister</span>\n"; 37572},"8":function(container,depth0,helpers,partials,data) { 37573 return " <span class=\"screen-reader-text\">abercrombie kids</span>\n"; 37574},"10":function(container,depth0,helpers,partials,data) { 37575 var stack1; 37576 37577 return ((stack1 = helpers.is.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.type : depth0),"by-hollister",{"name":"is","hash":{},"fn":container.program(11, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : ""); 37578},"11":function(container,depth0,helpers,partials,data) { 37579 return " <span class=\"screen-reader-text\">gilly hicks by hollister</span>\n"; 37580},"13":function(container,depth0,helpers,partials,data) { 37581 return " <span class=\"screen-reader-text\">gilly hicks</span>\n"; 37582},"15":function(container,depth0,helpers,partials,data) {
37583 return " <span class=\"screen-reader-text\">social tourist</span>\n"; 37584},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37585 var stack1; 37586 37587 return "<div class=\"logo " 37588 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37589 + "\">\n <p class=\"logo-icon\" " 37590 + ((stack1 = container.invokePartial(partials["helpers/data-brand"],depth0,{"name":"helpers/data-brand","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37591 + " data-type=\"" 37592 + container.escapeExpression(container.lambda((depth0 != null ? depth0.type : depth0), depth0)) 37593 + "\" aria-hidden=\"true\"></p>\n" 37594 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["icon-aria-label"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 37595 + "</div>\n"; 37596},"usePartial":true,"useData":true})); 37597 37598return this["ANF"]; 37599 37600}); 37601redesign.define('dsPartial/menu-button',['handlebars','dsPartial/helpers/data-prop','dsPartial/helpers/class-list','dsPartial/helpers/data-filled','dsPartial/helpers/disabled','dsPartial/list-menu'], function(Handlebars) { 37602 37603this["ANF"] = this["ANF"] || {}; 37604this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37605 37606Handlebars.registerPartial("menu-button", this["ANF"]["templates"]["menu-button"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37607 var stack1; 37608 37609 return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.links : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 37610},"2":function(container,depth0,helpers,partials,data) { 37611 var alias1=container.lambda, alias2=container.escapeExpression; 37612 37613 return " <li>\n <a class=\"list-menu-option-link\" role=\"menuitem\" tabindex=\"-1\" href=\"" 37614 + alias2(alias1((depth0 != null ? depth0.href : depth0), depth0)) 37615 + "\">" 37616 + alias2(alias1((depth0 != null ? depth0.value : depth0), depth0)) 37617 + "</a>\n </li>\n"; 37618},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37619 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 37620 37621 return "<div\n" 37622 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37623 + " class=\"menu-button js-menu-button " 37624 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37625 + "\" data-scope=\"" 37626 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 37627 + "\">\n <button\n aria-controls=\"list-menu-" 37628 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 37629 + "\"\n aria-expanded=\"false\"\n aria-haspopup=\"menu\"\n id=\"" 37630 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 37631 + "\"\n" 37632 + ((stack1 = container.invokePartial(partials["helpers/data-filled"],depth0,{"name":"helpers/data-filled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37633 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37634 + " type=\"button\">\n <span class=\"button-text\">" 37635 + alias2(alias1((depth0 != null ? depth0.value : depth0), depth0)) 37636 + "</span>\n <span class=\"placeholder\">" 37637 + alias2(alias1((depth0 != null ? depth0["button-label"] : depth0), depth0)) 37638 + "</span>\n <span class=\"arrow-icon\" aria-hidden=\"true\"></span>\n </button>\n <label class=\"float-label\" for=\"" 37639 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 37640 + "\" aria-hidden=\"true\">" 37641 + alias2(alias1((depth0 != null ? depth0["button-label"] : depth0), depth0)) 37642 + "</label>\n\n" 37643 + ((stack1 = container.invokePartial(partials["list-menu"],depth0,{"name":"list-menu","hash":{"controlling-id":(depth0 != null ? depth0.id : depth0),"aria-menu":true},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37644 + "</div>\n"; 37645},"usePartial":true,"useData":true})); 37646 37647return this["ANF"]; 37648 37649}); 37650redesign.define('dsPartial/message-banner',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 37651 37652this["ANF"] = this["ANF"] || {}; 37653this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37654 37655Handlebars.registerPartial("message-banner", this["ANF"]["templates"]["message-banner"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37656 return container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)); 37657},"3":function(container,depth0,helpers,partials,data) { 37658 return "default"; 37659},"5":function(container,depth0,helpers,partials,data) { 37660 return container.escapeExpression(container.lambda((depth0 != null ? depth0.background : depth0), depth0)); 37661},"7":function(container,depth0,helpers,partials,data) { 37662 return "none"; 37663},"9":function(container,depth0,helpers,partials,data) { 37664 return ""; 37665},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37666 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 37667 37668 return "<div\n class=\"message-banner " 37669 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37670 + "\"\n data-theme=\"" 37671 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 37672 + "\"\n data-background=\"" 37673 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.background : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 37674 + "\"\n>\n <div class=\"message-banner-background\">\n " 37675 + ((stack1 = container.invokePartial(partials["message-banner-background"],depth0,{"name":"message-banner-background","fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37676 + "\n </div>\n\n <div class=\"message-banner-content\">\n <div class=\"message-banner-lockup\">\n " 37677 + ((stack1 = container.invokePartial(partials["message-banner-lockup"],depth0,{"name":"message-banner-lockup","fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37678 + "\n </div>\n\n <div class=\"message-banner-legal\">\n " 37679 + ((stack1 = container.invokePartial(partials["message-banner-legal"],depth0,{"name":"message-banner-legal","fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37680 + "\n </div>\n\n <div class=\"message-banner-buttons\">\n " 37681 + ((stack1 = container.invokePartial(partials["message-banner-buttons"],depth0,{"name":"message-banner-buttons","fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37682 + "\n </div>\n </div>\n</div>\n"; 37683},"usePartial":true,"useData":true})); 37684 37685return this["ANF"]; 37686 37687}); 37688redesign.define('dsPartial/omni-card',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
37688data-prop','dsPartial/helpers/invalid','dsPartial/error-message'], function(Handlebars) { 37689 37690this["ANF"] = this["ANF"] || {}; 37691this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37692 37693Handlebars.registerPartial("omni-card", this["ANF"]["templates"]["omni-card"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37694 return " aria-describedby=\"" 37695 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 37696 + "-error-message\""; 37697},"3":function(container,depth0,helpers,partials,data) { 37698 return ""; 37699},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37700 var stack1; 37701 37702 return "<div class=\"omni-card " 37703 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37704 + "\" " 37705 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37706 + " " 37707 + ((stack1 = container.invokePartial(partials["helpers/invalid"],depth0,{"name":"helpers/invalid","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37708 + "\n" 37709 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37710 + "\nid=\"" 37711 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 37712 + "\">\n <div class=\"omni-card-selector\">\n" 37713 + ((stack1 = container.invokePartial(partials["store-selector"],depth0,{"name":"store-selector","fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37714 + " </div>\n" 37715 + ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","hash":{"error-message-text":(depth0 != null ? depth0["error-message-text"] : depth0),"id":(depth0 != null ? depth0.id : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37716 + " <div class=\"omni-card-content\">\n" 37717 + ((stack1 = container.invokePartial(partials["store-message"],depth0,{"name":"store-message","fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37718 + "\n" 37719 + ((stack1 = container.invokePartial(partials["online-message"],depth0,{"name":"online-message","fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37720 + "\n" 37721 + ((stack1 = container.invokePartial(partials["online-estimated-message"],depth0,{"name":"online-estimated-message","fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37722 + "\n" 37723 + ((stack1 = container.invokePartial(partials["store-pickup-message"],depth0,{"name":"store-pickup-message","fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37724 + "\n" 37725 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37726 + " </div>\n</div>\n"; 37727},"usePartial":true,"useData":true})); 37728 37729return this["ANF"]; 37730 37731}); 37732redesign.define('dsPartial/omni-info',['handlebars','dsPartial/button'], function(Handlebars) { 37733 37734this["ANF"] = this["ANF"] || {}; 37735this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37736 37737Handlebars.registerPartial("omni-info", this["ANF"]["templates"]["omni-info"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37738 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 37739 37740 return " <button class=\"omni-info-help-icon-button " 37741 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0["main-text"] : depth0)) != null ? stack1["help-button"] : stack1)) != null ? stack1["class-list"] : stack1), depth0)) 37742 + "\" data-icon=\"question-outline\" " 37743 + ((stack1 = alias1(((stack1 = ((stack1 = (depth0 != null ? depth0["main-text"] : depth0)) != null ? stack1["help-button"] : stack1)) != null ? stack1["data-prop"] : stack1), depth0)) != null ? stack1 : "") 37744 + " aria-label=\"" 37745 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0["main-text"] : depth0)) != null ? stack1["help-button"] : stack1)) != null ? stack1["aria-label"] : stack1), depth0)) 37746 + "\" type=\"button\"></button>\n"; 37747},"3":function(container,depth0,helpers,partials,data) { 37748 var stack1; 37749
37750 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0["main-text"] : depth0)) != null ? stack1["help-link"] : stack1),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 37751},"4":function(container,depth0,helpers,partials,data) { 37752 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 37753 37754 return " <button class=\"omni-info-help-link " 37755 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0["main-text"] : depth0)) != null ? stack1["help-link"] : stack1)) != null ? stack1["class-list"] : stack1), depth0)) 37756 + "\" type=\"button\">" 37757 + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0["main-text"] : depth0)) != null ? stack1["help-link"] : stack1)) != null ? stack1.text : stack1), depth0)) 37758 + "</button>\n"; 37759},"6":function(container,depth0,helpers,partials,data) { 37760 var stack1; 37761 37762 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"label":((stack1 = ((stack1 = (depth0 != null ? depth0["sub-text"] : depth0)) != null ? stack1.button : stack1)) != null ? stack1.label : stack1),"variant":"button-as-link","type":"button","data-prop":((stack1 = ((stack1 = (depth0 != null ? depth0["sub-text"] : depth0)) != null ? stack1.button : stack1)) != null ? stack1["data-prop"] : stack1),"class-list":((stack1 = ((stack1 = (depth0 != null ? depth0["sub-text"] : depth0)) != null ? stack1.button : stack1)) != null ? stack1["class-list"] : stack1)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 37763},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37764 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 37765 37766 return "<div class=\"omni-info\" data-state=\"" 37767 + alias2(alias1((depth0 != null ? depth0.state : depth0), depth0)) 37768 + "\">\n <div class=\"omni-info-icon\" aria-hidden=\"true\"></div>\n <div class=\"omni-info-text-container\">\n <div class=\"omni-info-text\">\n <p>\n " 37769 + alias2(alias1(((stack1 = (depth0 != null ? depth0["main-text"] : depth0)) != null ? stack1.text : stack1), depth0)) 37770 + "\n </p>\n" 37771 + ((stack1 = helpers["if"].call(alias3,((stack1 = (depth0 != null ? depth0["main-text"] : depth0)) != null ? stack1["help-button"] : stack1),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 37772 + " </div>\n <p>" 37773 + alias2(alias1(((stack1 = (depth0 != null ? depth0["sub-text"] : depth0)) != null ? stack1.text : stack1), depth0)) 37774 + "\n" 37775 + ((stack1 = helpers["if"].call(alias3,((stack1 = (depth0 != null ? depth0["sub-text"] : depth0)) != null ? stack1.button : stack1),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37776 + " </p>\n </div>\n</div>\n"; 37777},"usePartial":true,"useData":true})); 37778 37779return this["ANF"]; 37780 37781}); 37782redesign.define('dsPartial/payment-icon',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 37783 37784this["ANF"] = this["ANF"] || {}; 37785this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37786 37787Handlebars.registerPartial("payment-icon", this["ANF"]["templates"]["payment-icon"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37788 return container.escapeExpression(container.lambda((depth0 != null ? depth0["icon-name"] : depth0), depth0)); 37789},"3":function(container,depth0,helpers,partials,data) { 37790 return "default-card"; 37791},"5":function(container,depth0,helpers,partials,data) { 37792 return " aria-hidden=\"true\"\n"; 37793},"7":function(container,depth0,helpers,partials,data) { 37794 var stack1; 37795 37796 return " aria-label=\"" 37797 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["screen-reader-text"] : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.program(1, data, 0),"data":data})) != null ? stack1 : "") 37798 + "\"\n"; 37799},"8":function(container,depth0,helpers,partials,data) { 37800 return container.escapeExpression(container.lambda((depth0 != null ? depth0["screen-reader-text"] : depth0), depth0)); 37801},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37802 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 37803 37804 return "<span class=\"payment-icon " 37805 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37806 + "\"\n role=\"img\"\n data-icon-name=\"" 37807 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["icon-name"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 37808 + "\"\n" 37809 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["hide-screen-reader-text"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 37810 + "></span>\n"; 37811},"usePartial":true,"useData":true})); 37812 37813return this["ANF"]; 37814 37815}); 37816redesign.define('dsPartial/payment-block',['handlebars','dsPartial/payment-icon','dsHelper/is'], function(Handlebars) { 37817 37818this["ANF"] = this["ANF"] || {}; 37819this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37820 37821Handlebars.registerPartial("payment-block", this["ANF"]["templates"]["payment-block"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37822 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 37823 37824 return " <p>
37824\n <span class=\"screen-reader-text\">" 37825 + alias2(alias1((depth0 != null ? depth0.endingIn : depth0), depth0)) 37826 + " " 37827 + alias2(alias1((depth0 != null ? depth0.cardNumberReadableDigits : depth0), depth0)) 37828 + "</span>\n <span aria-hidden=\"true\">" 37829 + alias2(alias1((depth0 != null ? depth0.cardNumber : depth0), depth0)) 37830 + "</span>\n </p>\n" 37831 + ((stack1 = helpers.is.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.paymentCode : depth0),"anf",{"name":"is","hash":{},"fn":container.noop,"inverse":container.program(2, data, 0),"data":data})) != null ? stack1 : ""); 37832},"2":function(container,depth0,helpers,partials,data) { 37833 var alias1=container.lambda, alias2=container.escapeExpression; 37834 37835 return " <p>\n <span class=\"screen-reader-text\">\n " 37836 + alias2(alias1((depth0 != null ? depth0.expires : depth0), depth0)) 37837 + " " 37838 + alias2(alias1((depth0 != null ? depth0.cardExpireMonth : depth0), depth0)) 37839 + " " 37840 + alias2(alias1((depth0 != null ? depth0.cardExpireYear : depth0), depth0)) 37841 + "\n </span>\n <span aria-hidden=\"true\">" 37842 + alias2(alias1((depth0 != null ? depth0.cardExpiryLabel : depth0), depth0)) 37843 + "</span>\n <span aria-hidden=\"true\">" 37844 + alias2(alias1((depth0 != null ? depth0.cardExpireMonth : depth0), depth0)) 37845 + "/" 37846 + alias2(alias1((depth0 != null ? depth0.cardExpireYear : depth0), depth0)) 37847 + "</span>\n </p>\n"; 37848},"4":function(container,depth0,helpers,partials,data) { 37849 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 37850 37851 return " <p>\n <span class=\"screen-reader-text\">" 37852 + alias2(alias1((depth0 != null ? depth0.endingIn : depth0), depth0)) 37853 + " " 37854 + alias2(alias1((depth0 != null ? depth0.maskedNumberReadableDigits : depth0), depth0)) 37855 + "</span>\n <span aria-hidden=\"true\">" 37856 + alias2(alias1((depth0 != null ? depth0.maskedNumber : depth0), depth0)) 37857 + "</span>\n </p>\n <p>\n <span class=\"screen-reader-text\">" 37858 + alias2(alias1((depth0 != null ? depth0.inTheAmountOf : depth0), depth0)) 37859 + " " 37860 + ((stack1 = alias1((depth0 != null ? depth0.amountFmt : depth0), depth0)) != null ? stack1 : "") 37861 + "</span>\n <span aria-hidden=\"true\">\n <span>" 37862 + alias2(alias1((depth0 != null ? depth0.amountLabel : depth0), depth0)) 37863 + "</span>\n " 37864 + ((stack1 = alias1((depth0 != null ? depth0.amountFmt : depth0), depth0)) != null ? stack1 : "") 37865 + "\n </span>\n </p>\n"; 37866},"6":function(container,depth0,helpers,partials,data) { 37867 var alias1=container.lambda, alias2=container.escapeExpression; 37868 37869 return " <p aria-hidden=\"true\">" 37870 + alias2(alias1((depth0 != null ? depth0.paymentLabel : depth0), depth0)) 37871 + "</p>\n <p>" 37872 + alias2(alias1((depth0 != null ? depth0.email : depth0), depth0)) 37873 + "</p>\n"; 37874},"8":function(container,depth0,helpers,partials,data) { 37875 return " <p aria-hidden=\"true\">" 37876 + container.escapeExpression(container.lambda((depth0 != null ? depth0.paymentLabel : depth0), depth0)) 37877 + "</p>\n"; 37878},"10":function(container,depth0,helpers,partials,data) { 37879 var alias1=container.lambda, alias2=container.escapeExpression; 37880 37881 return " <p aria-hidden=\"true\">" 37882 + alias2(alias1((depth0 != null ? depth0.paymentLabel : depth0), depth0)) 37883 + "</p>\n <p>" 37884 + alias2(alias1((depth0 != null ? depth0.currency : depth0), depth0)) 37885 + "</p>\n"; 37886},"12":function(container,depth0,helpers,partials,data) { 37887 var stack1; 37888 37889 return ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 37890},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37891 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 37892 37893 return "<div class=\"payment-block\">\n" 37894 + ((stack1 = container.invokePartial(partials["payment-icon"],(depth0 != null ? depth0.paymentIcon : depth0),{"name":"payment-icon","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37895 + " <div class=\"details\">\n"
37896 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.paymentType : depth0),"credit card",{"name":"is","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37897 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.paymentType : depth0),"gift card",{"name":"is","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37898 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.paymentType : depth0),"paypal",{"name":"is","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37899 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.paymentType : depth0),"Visa Checkout",{"name":"is","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37900 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.paymentType : depth0),"Apple Pay",{"name":"is","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37901 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.paymentType : depth0),"Venmo",{"name":"is","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37902 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.paymentType : depth0),"Store-JP",{"name":"is","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37903 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.paymentType : depth0),"Cash",{"name":"is","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37904 + ((stack1 = helpers["if"].call(alias1,(data && data["partial-block"]),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37905 + " </div>\n</div>\n"; 37906},"usePartial":true,"useData":true})); 37907 37908return this["ANF"]; 37909 37910}); 37911redesign.define('dsPartial/payment-tile-group',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 37912 37913this["ANF"] = this["ANF"] || {}; 37914this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37915 37916Handlebars.registerPartial("payment-tile-group", this["ANF"]["templates"]["payment-tile-group"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37917 var stack1; 37918 37919 return "<div aria-label=\"" 37920 + container.escapeExpression(container.lambda((depth0 != null ? depth0.label : depth0), depth0)) 37921 + "\"\n class=\"payment-tile-group " 37922 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37923 + "\"\n role=\"radiogroup\"\n >\n" 37924 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37925 + "</div>\n"; 37926},"usePartial":true,"useData":true})); 37927 37928return this["ANF"]; 37929 37930}); 37931redesign.define('dsPartial/picture',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 37932 37933this["ANF"] = this["ANF"] || {}; 37934this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37935 37936Handlebars.registerPartial("picture", this["ANF"]["templates"]["picture"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 37937 return "data-margin-bottom=\"" 37938 + container.escapeExpression(container.lambda((depth0 != null ? depth0["margin-bottom"] : depth0), depth0)) 37939 + "\""; 37940},"3":function(container,depth0,helpers,partials,data) { 37941 return "data-margin-top=\"" 37942 + container.escapeExpression(container.lambda((depth0 != null ? depth0["margin-top"] : depth0), depth0)) 37943 + "\""; 37944},"5":function(container,depth0,helpers,partials,data,blockParams,depths) { 37945 var stack1; 37946 37947 return " <source\n" 37948 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depths[1] != null ? depths[1].lazyLoad : depths[1]),{"name":"if","hash":{},"fn":container.program(6, data, 0, blockParams, depths),"inverse":container.program(8, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 37949 + " media=\"(min-width: " 37950 + container.escapeExpression(container.lambda((depth0 != null ? depth0.bp : depth0), depth0)) 37951 + "px)\"\n >\n"; 37952},"6":function(container,depth0,helpers,partials,data) { 37953 return " data-srcset=\"" 37954 + container.escapeExpression(container.lambda((depth0 != null ? depth0.src : depth0), depth0)) 37955 + "\"\n srcset=\"#\"\n"; 37956},"8":function(container,depth0,helpers,partials,data) { 37957 return " srcset=\"" 37958 + container.escapeExpression(container.lambda((depth0 != null ? depth0.src : depth0), depth0)) 37959 + "\"\n"; 37960},"10":function(container,depth0,helpers,partials,data) { 37961 return " data-lazy=\"true\"\n data-src=\"" 37962 + container.escapeExpression(container.lambda((depth0 != null ? depth0["fallback-src"] : depth0), depth0)) 37963 + "\"\n src=\"#\"\n"; 37964},"12":function(container,depth0,helpers,partials,data) { 37965 return " src=\"" 37966 + container.escapeExpression(container.lambda((depth0 != null ? depth0["fallback-src"] : depth0), depth0)) 37967 + "\"\n"; 37968},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 37969 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 37970 37971 return "<picture class=\"picture js-picture " 37972 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37973 + "\"\n " 37974 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["margin-bottom"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37975 + "\n " 37976 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["margin-top"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37977 + "\n>\n" 37978 + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.srcset : depth0),{"name":"each","hash":{},"fn":container.program(5, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 37979 + " <img class=\"picture-default\" alt=\"" 37980 + container.escapeExpression(container.lambda((depth0 != null ? depth0.alt : depth0), depth0)) 37981 + "\"\n" 37982 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.lazyLoad : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0, blockParams, depths),"inverse":container.program(12, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 37983 + " >\n</picture>\n"; 37984},"usePartial":true,"useData":true,"useDepths":true})); 37985 37986return this["ANF"]; 37987 37988}); 37989redesign.define('dsPartial/pipe-delimited-link',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
37989data-prop'], function(Handlebars) { 37990 37991this["ANF"] = this["ANF"] || {}; 37992this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 37993 37994Handlebars.registerPartial("pipe-delimited-link", this["ANF"]["templates"]["pipe-delimited-link"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 37995 var stack1; 37996 37997 return "<li class=\"pipe-delimited-link " 37998 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 37999 + "\" " 38000 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38001 + ">\n" 38002 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38003 + "</li>\n"; 38004},"usePartial":true,"useData":true})); 38005 38006return this["ANF"]; 38007 38008}); 38009redesign.define('dsPartial/pipe-delimited-links',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop'], function(Handlebars) { 38010 38011this["ANF"] = this["ANF"] || {}; 38012this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38013 38014Handlebars.registerPartial("pipe-delimited-links", this["ANF"]["templates"]["pipe-delimited-links"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38015 return "data-align=\"" 38016 + container.escapeExpression(container.lambda((depth0 != null ? depth0.align : depth0), depth0)) 38017 + "\""; 38018},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38019 var stack1; 38020 38021 return "<div class=\"pipe-delimited-links " 38022 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38023 + "\" " 38024 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38025 + " " 38026 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.align : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38027 + ">\n <ul>\n" 38028 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38029 + " </ul>\n</div>\n"; 38030},"usePartial":true,"useData":true})); 38031 38032return this["ANF"]; 38033 38034}); 38035redesign.define('dsPartial/tile-link',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 38036 38037this["ANF"] = this["ANF"] || {}; 38038this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38039 38040Handlebars.registerPartial("tile-link", this["ANF"]["templates"]["tile-link"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38041 return " aria-label=\"" 38042 + container.escapeExpression(container.lambda((depth0 != null ? depth0["label-text"] : depth0), depth0)) 38043 + "\"\n"; 38044},"3":function(container,depth0,helpers,partials,data) { 38045 var stack1; 38046 38047 return " aria-describedby=\"" 38048 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.parent : depth0)) != null ? stack1["additional-info-id"] : stack1), depth0)) 38049 + "\"\n"; 38050},"5":function(container,depth0,helpers,partials,data) { 38051 return " data-type=\"image\"\n"; 38052},"7":function(container,depth0,helpers,partials,data) { 38053 return " data-variant=\"" 38054 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 38055 + "\"\n"; 38056},"9":function(container,depth0,helpers,partials,data) { 38057 var alias1=container.lambda, alias2=container.escapeExpression; 38058 38059 return " <img\n class=\"tile-content\"\n src=\"" 38060 + alias2(alias1((depth0 != null ? depth0.image : depth0), depth0)) 38061 + "\"\n alt=\"" 38062 + alias2(alias1((depth0 != null ? depth0["alt-text"] : depth0), depth0)) 38063 + "\">\n"; 38064},"11":function(container,depth0,helpers,partials,data) { 38065 return container.escapeExpression(container.lambda((depth0 != null ? depth0.value : depth0), depth0)); 38066},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38067 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 38068 38069 return "<a\n" 38070 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["label-text"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38071 + "\n" 38072 + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.parent : depth0)) != null ? stack1["additional-info-text"] : stack1),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38073 + "\n" 38074 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.image : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38075 + "\n" 38076 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38077 + "\n class=\"tile-link " 38078 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38079 + "\"\n href=\"" 38080 + container.escapeExpression(container.lambda((depth0 != null ? depth0.href : depth0), depth0)) 38081 + "\">\n\n" 38082 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.image : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(11, data, 0),"data":data})) != null ? stack1 : "") 38083 + "</a>\n"; 38084},"usePartial":true,"useData":true})); 38085 38086return this["ANF"]; 38087 38088}); 38089redesign.define('dsPartial/tile-link-group',['handlebars','dsPartial/tile-link'], function(Handlebars) { 38090 38091this["ANF"] = this["ANF"] || {}; 38092this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38093 38094Handlebars.registerPartial("tile-link-group", this["ANF"]["templates"]["tile-link-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38095 var alias1=container.lambda, alias2=container.escapeExpression; 38096 38097 return " <p class=\"tile-additional-info\" id=\"" 38098 + alias2(alias1((depth0 != null ? depth0["additional-info-id"] : depth0), depth0)) 38099 + "\">\n " 38100 + alias2(alias1((depth0 != null ? depth0["additional-info-text"] : depth0), depth0)) 38101 + "\n </p>\n"; 38102},"3":function(container,depth0,helpers,partials,data,blockParams,depths) { 38103 var stack1; 38104 38105 return " <li>\n" 38106 + ((stack1 = container.invokePartial(partials["tile-link"],depth0,{"name":"tile-link","hash":{"parent":depths[1]},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38107 + " </li>\n"; 38108},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 38109 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 38110 38111 return "<div class=\"tile-group\">\n" 38112 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["additional-info-text"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38113 + " <ul class=\"tiles\" data-tile-size=\"" 38114 + alias3(alias2((depth0 != null ? depth0["tile-size"] : depth0), depth0)) 38115 + "\" data-tile-layout=\"" 38116 + alias3(alias2((depth0 != null ? depth0["tile-layout"] : depth0), depth0)) 38117 + "\">\n" 38118 + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.tiles : depth0),{"name":"each","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38119 + " </ul>\n</div>\n"; 38120},"usePartial":true,"useData":true,"useDepths":true})); 38121 38122return this["ANF"]; 38123 38124}); 38125redesign.define('dsPartial/product-card',['handlebars','dsPartial/product-price-text','dsPartial/badge','dsHelper/concat','dsPartial/button','dsPartial/product-name','dsPartial/product-price','dsPartial/tile-link-group','dsPartial/button-group'], function(Handlebars) { 38126 38127this["ANF"] = this["ANF"] || {}; 38128this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38129 38130Handlebars.registerPartial("product-card", this["ANF"]["templates"]["product-card"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38131 var stack1; 38132
38133 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["is-sale-price"] : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : ""); 38134},"2":function(container,depth0,helpers,partials,data) { 38135 var stack1; 38136 38137 return ((stack1 = container.invokePartial(partials["product-price-text"],depth0,{"name":"product-price-text","hash":{"type":"original","formatted-price":(depth0 != null ? depth0["list-price-text"] : depth0)},"data":data,"indent":"\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38138 + ((stack1 = container.invokePartial(partials["product-price-text"],depth0,{"name":"product-price-text","hash":{"type":"discount","formatted-price":(depth0 != null ? depth0["price-text"] : depth0)},"data":data,"indent":"\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 38139},"4":function(container,depth0,helpers,partials,data) { 38140 var stack1; 38141 38142 return ((stack1 = container.invokePartial(partials["product-price-text"],depth0,{"name":"product-price-text","hash":{"formatted-price":(depth0 != null ? depth0["price-text"] : depth0)},"data":data,"indent":"\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 38143},"6":function(container,depth0,helpers,partials,data) { 38144 var stack1; 38145 38146 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isWrapped : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 38147},"7":function(container,depth0,helpers,partials,data) { 38148 var stack1; 38149 38150 return " <span class=\"giftbox-icon\" data-icon=\"gift\" aria-hidden=\"true\"></span>\n <span class=\"giftbox screen-reader-text\">\n" 38151 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.program(10, data, 0),"data":data})) != null ? stack1 : "") 38152 + " </span>\n"; 38153},"8":function(container,depth0,helpers,partials,data) { 38154 return " " 38155 + container.escapeExpression(container.lambda((depth0 != null ? depth0.description : depth0), depth0)) 38156 + "\n"; 38157},"10":function(container,depth0,helpers,partials,data) { 38158 return " Gift Box Wrapped\n"; 38159},"12":function(container,depth0,helpers,partials,data) { 38160 return "data-alignment=\"" 38161 + container.escapeExpression(container.lambda((depth0 != null ? depth0.alignment : depth0), depth0)) 38162 + "\""; 38163},"14":function(container,depth0,helpers,partials,data) { 38164 return "data-status=\"" 38165 + container.escapeExpression(container.lambda((depth0 != null ? depth0["status-type"] : depth0), depth0)) 38166 + "\""; 38167},"16":function(container,depth0,helpers,partials,data) { 38168 var stack1; 38169 38170 return " <div class=\"product-card-badge\">\n" 38171 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["status-text"] : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.program(20, data, 0),"data":data})) != null ? stack1 : "") 38172 + " </div>\n"; 38173},"17":function(container,depth0,helpers,partials,data) { 38174 var stack1; 38175 38176 return ((stack1 = container.invokePartial(partials.badge,depth0,{"name":"badge","hash":{"text-align":"center","full-width":true,"attached":true,"variant":helpers.concat.call(depth0 != null ? depth0 : (container.nullContext || {}),"status ",(depth0 != null ? depth0["status-type"] : depth0),{"name":"concat","hash":{},"data":data})},"fn":container.program(18, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 38177},"18":function(container,depth0,helpers,partials,data) { 38178 return " <span>" 38179 + container.escapeExpression(container.lambda((depth0 != null ? depth0["status-text"] : depth0), depth0)) 38180 + "</span>\n"; 38181},"20":function(container,depth0,helpers,partials,data) { 38182 var stack1; 38183
38184 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["show-new-badge"] : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.program(24, data, 0),"data":data})) != null ? stack1 : ""); 38185},"21":function(container,depth0,helpers,partials,data) { 38186 var stack1; 38187 38188 return ((stack1 = container.invokePartial(partials.badge,depth0,{"name":"badge","hash":{"attached":true},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 38189},"22":function(container,depth0,helpers,partials,data) { 38190 return " <span>" 38191 + container.escapeExpression(container.lambda((depth0 != null ? depth0["new-badge-text"] : depth0), depth0)) 38192 + "</span>\n"; 38193},"24":function(container,depth0,helpers,partials,data) { 38194 return " <span class=\"badge-spacer\" aria-hidden=\"true\"> </span>\n "; 38195},"26":function(container,depth0,helpers,partials,data) { 38196 var alias1=container.lambda, alias2=container.escapeExpression; 38197 38198 return " <a class=\"product-card-link\" href=\"" 38199 + alias2(alias1((depth0 != null ? depth0["product-link"] : depth0), depth0)) 38200 + "\">\n <img class=\"product-card-image " 38201 + alias2(alias1((depth0 != null ? depth0["image-class-list"] : depth0), depth0)) 38202 + "\" src=\"" 38203 + alias2(alias1((depth0 != null ? depth0.img : depth0), depth0)) 38204 + "\" alt=\"" 38205 + alias2(alias1((depth0 != null ? depth0["alt-text"] : depth0), depth0)) 38206 + "\">\n </a>\n"; 38207},"28":function(container,depth0,helpers,partials,data) { 38208 var alias1=container.lambda, alias2=container.escapeExpression; 38209 38210 return " <img class=\"product-card-image " 38211 + alias2(alias1((depth0 != null ? depth0["image-class-list"] : depth0), depth0)) 38212 + "\" src=\"" 38213 + alias2(alias1((depth0 != null ? depth0.img : depth0), depth0)) 38214 + "\" alt=\"" 38215 + alias2(alias1((depth0 != null ? depth0["alt-text"] : depth0), depth0)) 38216 + "\">\n"; 38217},"30":function(container,depth0,helpers,partials,data) { 38218 return " <button class=\"mobile-zoom-button js-pc-mobile-zoom\" type=\"button\" aria-label=\"" 38219 + container.escapeExpression(container.lambda((depth0 != null ? depth0["zoom-button-text"] : depth0), depth0)) 38220 + "\" aria-live=\"assertive\">\n <span class=\"mobile-zoom-shape\">\n <span class=\"mobile-zoom-background\"></span>\n <span class=\"mobile-zoom-arrow\" data-icon=\"arrow-up\"></span>\n </span>\n </button>\n"; 38221},"32":function(container,depth0,helpers,partials,data,blockParams,depths) { 38222 var stack1; 38223 38224 return " <div class=\"product-card-overlay-buttons\">\n" 38225 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["show-bag-button"] : depth0),{"name":"if","hash":{},"fn":container.program(33, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38226 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"class-list":"product-card-icon save-icon icon-button js-pc-save-button"},"fn":container.program(39, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38227 + " <div class=\"product-card-action-buttons\">\n" 38228 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"class-list":"save-button js-pc-save-button"},"fn":container.program(44, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38229 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"class-list":"quickview-button js-pc-quickview-button"},"fn":container.program(49, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38230 + " </div>\n </div>\n"; 38231},"33":function(container,depth0,helpers,partials,data,blockParams,depths) { 38232 var stack1; 38233 38234 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"class-list":"product-card-icon bag-icon icon-button
38234js-pc-bag-button"},"fn":container.program(34, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 38235},"34":function(container,depth0,helpers,partials,data,blockParams,depths) { 38236 var stack1; 38237 38238 return " <span data-icon=\"" 38239 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depths[1] != null ? depths[1]["is-in-bag"] : depths[1]),{"name":"if","hash":{},"fn":container.program(35, data, 0, blockParams, depths),"inverse":container.program(37, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 38240 + "\" aria-label=\"" 38241 + container.escapeExpression(container.lambda((depths[1] != null ? depths[1]["bag-icon-label"] : depths[1]), depth0)) 38242 + "\"></span>\n"; 38243},"35":function(container,depth0,helpers,partials,data) { 38244 return "bag"; 38245},"37":function(container,depth0,helpers,partials,data) { 38246 return "bag-outline"; 38247},"39":function(container,depth0,helpers,partials,data,blockParams,depths) { 38248 var stack1; 38249 38250 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depths[1] != null ? depths[1]["is-saved"] : depths[1]),{"name":"if","hash":{},"fn":container.program(40, data, 0, blockParams, depths),"inverse":container.program(42, data, 0, blockParams, depths),"data":data})) != null ? stack1 : ""); 38251},"40":function(container,depth0,helpers,partials,data,blockParams,depths) { 38252 return " <span data-icon=\"heart-filled\" aria-label=\"" 38253 + container.escapeExpression(container.lambda((depths[1] != null ? depths[1]["saved-button-text"] : depths[1]), depth0)) 38254 + "\"></span>\n"; 38255},"42":function(container,depth0,helpers,partials,data,blockParams,depths) { 38256 return " <span data-icon=\"heart-outline\" aria-label=\"" 38257 + container.escapeExpression(container.lambda((depths[1] != null ? depths[1]["save-button-text"] : depths[1]), depth0)) 38258 + "\"></span>\n"; 38259},"44":function(container,depth0,helpers,partials,data,blockParams,depths) { 38260 var stack1; 38261 38262 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depths[1] != null ? depths[1]["is-saved"] : depths[1]),{"name":"if","hash":{},"fn":container.program(45, data, 0, blockParams, depths),"inverse":container.program(47, data, 0, blockParams, depths),"data":data})) != null ? stack1 : ""); 38263},"45":function(container,depth0,helpers,partials,data,blockParams,depths) { 38264 return " <span class=\"button-icon\" data-icon=\"heart-filled\" aria-hidden=\"true\"></span>\n <span>" 38265 + container.escapeExpression(container.lambda((depths[1] != null ? depths[1]["saved-button-text"] : depths[1]), depth0)) 38266 + "</span>\n"; 38267},"47":function(container,depth0,helpers,partials,data,blockParams,depths) { 38268 return " <span class=\"button-icon\" data-icon=\"heart-outline\" aria-hidden=\"true\"></span>\n <span>" 38269 + container.escapeExpression(container.lambda((depths[1] != null ? depths[1]["save-button-text"] : depths[1]), depth0)) 38270 + "</span>\n"; 38271},"49":function(container,depth0,helpers,partials,data,blockParams,depths) { 38272 return " <span class=\"button-icon\" data-icon=\"quickview\" aria-hidden=\"true\"></span>\n <span>" 38273 + container.escapeExpression(container.lambda((depths[1] != null ? depths[1]["quickview-button-text"] : depths[1]), depth0)) 38274 + "</span>\n"; 38275},"51":function(container,depth0,helpers,partials,data) { 38276 var stack1; 38277 38278 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["status-text"] : depth0),{"name":"if","hash":{},"fn":container.program(52, data, 0),"inverse":container.program(54, data, 0),"data":data})) != null ? stack1 : ""); 38279},"52":function(container,depth0,helpers,partials,data) { 38280 return " <span class=\"status-spacer\" aria-hidden=\"true\"> </span>\n"; 38281},"54":function(container,depth0,helpers,partials,data) { 38282 var stack1; 38283
38284 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["show-new-badge"] : depth0),{"name":"if","hash":{},"fn":container.program(55, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 38285},"55":function(container,depth0,helpers,partials,data) { 38286 return " <span class=\"status-spacer\" aria-hidden=\"true\"> </span>\n "; 38287},"57":function(container,depth0,helpers,partials,data) { 38288 return "<p>" 38289 + container.escapeExpression(container.lambda((depth0 != null ? depth0.gender : depth0), depth0)) 38290 + "</p>"; 38291},"59":function(container,depth0,helpers,partials,data) { 38292 var alias1=container.lambda, alias2=container.escapeExpression; 38293 38294 return " <div class=\"product-details\">\n <p>" 38295 + alias2(alias1((depth0 != null ? depth0.sku : depth0), depth0)) 38296 + "</p>\n <p>" 38297 + alias2(alias1((depth0 != null ? depth0.color : depth0), depth0)) 38298 + ", " 38299 + alias2(alias1((depth0 != null ? depth0.size : depth0), depth0)) 38300 + "</p>\n </div>\n"; 38301},"61":function(container,depth0,helpers,partials,data) { 38302 return " <p class=\"product-secondary-description\">" 38303 + container.escapeExpression(container.lambda(depth0, depth0)) 38304 + "</p>\n"; 38305},"63":function(container,depth0,helpers,partials,data,blockParams,depths) { 38306 var stack1; 38307 38308 return ((stack1 = container.invokePartial(partials.productPrice,depths[1],{"name":"productPrice","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 38309},"65":function(container,depth0,helpers,partials,data) { 38310 return " <span class=\"sale-text\">" 38311 + container.escapeExpression(container.lambda(depth0, depth0)) 38312 + "</span>\n"; 38313},"67":function(container,depth0,helpers,partials,data) { 38314 var stack1; 38315 38316 return " <div class=\"product-edit-links\">\n" 38317 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"label":"Edit","class-list":"js-pc-edit-button","variant":"button-as-link"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38318 + " <span aria-hidden=\"true\">|</span>\n" 38319 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"label":"Remove","class-list":"js-pc-remove-button","variant":"button-as-link"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38320 + " </div>\n"; 38321},"69":function(container,depth0,helpers,partials,data) { 38322 var stack1; 38323 38324 return " <ul class=\"product-card-swatches\" data-tile-size=\"small\">\n" 38325 + ((stack1 = container.invokePartial(partials["tile-link-group"],(depth0 != null ? depth0.swatches : depth0),{"name":"tile-link-group","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38326 + " </ul>\n"; 38327},"71":function(container,depth0,helpers,partials,data) { 38328 var stack1; 38329 38330 return " <div class=\"bogo-message\">\n" 38331 + ((stack1 = container.invokePartial(partials.badge,depth0,{"name":"badge","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38332 + " </div>\n"; 38333},"73":function(container,depth0,helpers,partials,data,blockParams,depths) { 38334 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 38335 38336 return " <div class=\"product-card-button-group-container\" " 38337 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["button-group-wrapped"] : depth0),{"name":"if","hash":{},"fn":container.program(74, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38338 + ">\n" 38339 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0["hide-product-card-badge"] : depth0),{"name":"unless","hash":{},"fn":container.program(51, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38340 + " <div class=\"button-group\" data-variant=\"vertical-collapsed\">\n" 38341 + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0["button-group"] : depth0),{"name":"each","hash":{},"fn":container.program(76, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38342 + " </div>\n </div>\n"; 38343},"74":function(container,depth0,helpers,partials,data) { 38344 return "data-wrapped=\"true\""; 38345},"76":function(container,depth0,helpers,partials,data) { 38346 var stack1; 38347 38348 return ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"variant":"tertiary-light"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 38349},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 38350 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 38351 38352 return "\n\n<div class=\"product-card\"\n " 38353 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.alignment : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38354 + "\n " 38355 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["status-type"] : depth0),{"name":"if","hash":{},"fn":container.program(14, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38356 + "\n data-brand=\"" 38357 + alias3(alias2((depth0 != null ? depth0.brand : depth0), depth0)) 38358 + "\" data-zoom-expanded=\"false\">\n <div class=\"product-card-info\">\n <div class=\"product-card-image-container\">\n" 38359 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0["hide-product-card-badge"] : depth0),{"name":"unless","hash":{},"fn":container.program(16, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38360 + " <div class=\"product-card-image-frame " 38361 + alias3(alias2((depth0 != null ? depth0["image-container-class-list"] : depth0), depth0)) 38362 + "\">\n" 38363 + ((stack1 = container.invokePartial(partials.giftBoxIcon,(depth0 != null ? depth0.giftbox : depth0),{"name":"giftBoxIcon","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38364 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["product-link"] : depth0),{"name":"if","hash":{},"fn":container.program(26, data, 0, blockParams, depths),"inverse":container.program(28, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 38365 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["show-mobile-zoom"] : depth0),{"name":"if","hash":{},"fn":container.program(30, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38366 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["show-buttons"] : depth0),{"name":"if","hash":{},"fn":container.program(32, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38367 + " </div>\n </div>\n <div class=\"product-card-description-container\">\n" 38368 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0["hide-product-card-badge"] : depth0),{"name":"unless","hash":{},"fn":container.program(51, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38369 + " <div class=\"product-card-description\">\n " 38370 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["show-gender"] : depth0),{"name":"if","hash":{},"fn":container.program(57, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38371 + "\n\n" 38372 + ((stack1 = container.invokePartial(partials["product-name"],depth0,{"name":"product-name","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38373 + "\n" 38374 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["show-product-details"] : depth0),{"name":"if","hash":{},"fn":container.program(59, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38375 + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0["secondary-descriptors"] : depth0),{"name":"each","hash":{},"fn":container.program(61, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38376 + " <div class=\"product-card-price\">\n" 38377 + ((stack1 = container.invokePartial(partials["product-price"],depth0,{"name":"product-price","hash":{"de
38377scription":(depth0 != null ? depth0["price-description"] : depth0)},"fn":container.program(63, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38378 + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0["price-descriptors"] : depth0),{"name":"each","hash":{},"fn":container.program(65, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38379 + " </div>\n </div>\n" 38380 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["is-editable"] : depth0),{"name":"if","hash":{},"fn":container.program(67, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38381 + ((stack1 = helpers["if"].call(alias1,((stack1 = ((stack1 = (depth0 != null ? depth0.swatches : depth0)) != null ? stack1.tiles : stack1)) != null ? stack1.length : stack1),{"name":"if","hash":{},"fn":container.program(69, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38382 + " </div>\n </div>\n" 38383 + ((stack1 = helpers["with"].call(alias1,(depth0 != null ? depth0.bogo : depth0),{"name":"with","hash":{},"fn":container.program(71, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38384 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["button-group"] : depth0),{"name":"if","hash":{},"fn":container.program(73, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38385 + "</div>\n"; 38386},"main_d": function(fn, props, container, depth0, data, blockParams, depths) { 38387 38388 var decorators = container.decorators; 38389 38390 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"args":["productPrice"],"data":data}) || fn; 38391 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(6, data, 0, blockParams, depths),"inverse":container.noop,"args":["giftBoxIcon"],"data":data}) || fn; 38392 return fn; 38393 } 38394 38395,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true})); 38396 38397return this["ANF"]; 38398 38399}); 38400redesign.define('dsPartial/product-image-overlay',['handlebars'], function(Handlebars) { 38401 38402this["ANF"] = this["ANF"] || {}; 38403this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38404 38405Handlebars.registerPartial("product-image-overlay", this["ANF"]["templates"]["product-image-overlay"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38406 var stack1; 38407 38408 return "<div class=\"product-image-overlay\">\n" 38409 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38410 + "</div>\n"; 38411},"usePartial":true,"useData":true})); 38412 38413return this["ANF"]; 38414 38415}); 38416redesign.define('dsPartial/progress-step',['handlebars','dsPartial/helpers/data-prop'], function(Handlebars) { 38417 38418this["ANF"] = this["ANF"] || {}; 38419this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38420 38421Handlebars.registerPartial("progress-step", this["ANF"]["templates"]["progress-step"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38422 return "data-current-step=\"true\" "; 38423},"3":function(container,depth0,helpers,partials,data) { 38424 return " aria-current=\"step\"\n"; 38425},"5":function(container,depth0,helpers,partials,data) { 38426 return " aria-label=\"" 38427 + container.escapeExpression(container.lambda((depth0 != null ? depth0.labelComplete : depth0), depth0)) 38428 + "\"\n"; 38429},"7":function(container,depth0,helpers,partials,data) { 38430 return " aria-label=\"" 38431 + container.escapeExpression(container.lambda((depth0 != null ? depth0.labelInitial : depth0), depth0)) 38432 + "\"\n"; 38433},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38434 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 38435 38436 return "<div \n" 38437 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38438 + " " 38439 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.currentStep : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38440 + "\n data-label-initial=\"" 38441 + alias3(alias2((depth0 != null ? depth0.labelInitial : depth0), depth0)) 38442 + "\"\n data-label-complete=\"" 38443 + alias3(alias2((depth0 != null ? depth0.labelComplete : depth0), depth0)) 38444 + "\"\n class=\"progress-step " 38445 + alias3(alias2((depth0 != null ? depth0.classList : depth0), depth0)) 38446 + "\" >\n <button class=\"progress-step-button\"\n" 38447 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.currentStep : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38448 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.complete : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 38449 + " type=\"button\">" 38450 + alias3(alias2((depth0 != null ? depth0["button-text"] : depth0), depth0)) 38451 + "</button>\n</div>\n"; 38452},"usePartial":true,"useData":true})); 38453 38454return this["ANF"]; 38455 38456}); 38457redesign.define('dsPartial/progress-steps',['handlebars'], function(Handlebars) { 38458 38459this["ANF"] = this["ANF"] || {}; 38460this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38461 38462Handlebars.registerPartial("progress-steps", this["ANF"]["templates"]["progress-steps"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38463 var stack1; 38464 38465 return "<div class=\"progress-steps js-progress-steps\">\n" 38466 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38467 + "</div>\n"; 38468},"usePartial":true,"useData":true})); 38469 38470return this["ANF"]; 38471 38472}); 38473redesign.define('dsPartial/promo-badge',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 38474 38475this["ANF"] = this["ANF"] || {}; 38476this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38477 38478Handlebars.registerPartial("promo-badge", this["ANF"]["templates"]["promo-badge"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38479 var stack1; 38480 38481 return "<span class=\"promo-badge " 38482 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38483 + "\">\n" 38484 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38485 + "</span>\n"; 38486},"usePartial":true,"useData":true})); 38487 38488return this["ANF"]; 38489 38490}); 38491redesign.define('dsPartial/radio-button-group',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/invalid','dsPartial/error-message'], function(Handlebars) { 38492 38493this["ANF"] = this["ANF"] || {}; 38494this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38495 38496Handlebars.registerPartial("radio-button-group", this["ANF"]["templates"]["radio-button-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38497 return "data-horizontal=\"true\""; 38498},"3":function(container,depth0,helpers,partials,data) { 38499 var stack1; 38500 38501 return " <legend class=\"radio-button-group-title\">
38501\n <span class=\"h4\">" 38502 + container.escapeExpression(container.lambda((depth0 != null ? depth0.title : depth0), depth0)) 38503 + "</span>\n" 38504 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.optional : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38505 + " </legend>\n"; 38506},"4":function(container,depth0,helpers,partials,data) { 38507 var stack1; 38508 38509 return " <span>\n" 38510 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.optionalText : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 38511 + " </span>\n"; 38512},"5":function(container,depth0,helpers,partials,data) { 38513 return " " 38514 + container.escapeExpression(container.lambda((depth0 != null ? depth0.optionalText : depth0), depth0)) 38515 + "\n"; 38516},"7":function(container,depth0,helpers,partials,data) { 38517 return " (Optional)\n"; 38518},"9":function(container,depth0,helpers,partials,data) { 38519 return " <legend class=\"screen-reader-text\">" 38520 + container.escapeExpression(container.lambda((depth0 != null ? depth0.legend : depth0), depth0)) 38521 + "</legend>\n"; 38522},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38523 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 38524 38525 return "<div class=\"radio-button-group js-radio-button-group " 38526 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38527 + "\" id=\"" 38528 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 38529 + "\" " 38530 + ((stack1 = container.invokePartial(partials["helpers/invalid"],depth0,{"name":"helpers/invalid","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38531 + ">\n <fieldset " 38532 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.horizontal : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38533 + ">\n" 38534 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.title : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") 38535 + " <div class=\"radio-button-group-content\">\n" 38536 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38537 + ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","hash":{"class-list":""},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38538 + " </div>\n </fieldset>\n</div>"; 38539},"usePartial":true,"useData":true})); 38540 38541return this["ANF"]; 38542 38543}); 38544redesign.define('dsPartial/radio-button',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/checked','dsPartial/helpers/data-prop','dsPartial/helpers/disabled','dsPartial/helpers/invalid','dsPartial/helpers/name','dsPartial/helpers/required'], function(Handlebars) { 38545 38546this["ANF"] = this["ANF"] || {}; 38547this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38548 38549Handlebars.registerPartial("radio-button", this["ANF"]["templates"]["radio-button"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38550 var stack1; 38551 38552 return " <span class=\"secondary\">" 38553 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38554 + "</span>\n"; 38555},"3":function(container,depth0,helpers,partials,data) { 38556 var stack1; 38557 38558 return "<span>" 38559 + ((stack1 = container.lambda((depth0 != null ? depth0["value-description"] : depth0), depth0)) != null ? stack1 : "") 38560 + "</span>"; 38561},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38562 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 38563
38564 return "<div class=\"radio-button js-radio-button " 38565 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38566 + "\">\n <input\n id=\"" 38567 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 38568 + "\"\n type=\"radio\"\n value=\"" 38569 + alias2(alias1((depth0 != null ? depth0.value : depth0), depth0)) 38570 + "\"\n" 38571 + ((stack1 = container.invokePartial(partials["helpers/checked"],depth0,{"name":"helpers/checked","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38572 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38573 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38574 + ((stack1 = container.invokePartial(partials["helpers/invalid"],depth0,{"name":"helpers/invalid","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38575 + ((stack1 = container.invokePartial(partials["helpers/name"],depth0,{"name":"helpers/name","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38576 + " " 38577 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38578 + ">\n <label for=\"" 38579 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 38580 + "\">\n <span class=\"custom-radio\"></span>\n <span class=\"radio-button-interior-label\">\n " 38581 + ((stack1 = alias1((depth0 != null ? depth0.description : depth0), depth0)) != null ? stack1 : "") 38582 + "\n" 38583 + ((stack1 = helpers["if"].call(alias3,(data && data["partial-block"]),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38584 + " </span>" 38585 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["value-description"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38586 + "</label>\n</div>\n"; 38587},"usePartial":true,"useData":true})); 38588 38589return this["ANF"]; 38590 38591}); 38592redesign.define('dsPartial/rating-inputs',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/required'], function(Handlebars) { 38593 38594this["ANF"] = this["ANF"] || {}; 38595this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38596 38597Handlebars.registerPartial("rating-inputs", this["ANF"]["templates"]["rating-inputs"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38598 return "aria-invalid=\"true\""; 38599},"3":function(container,depth0,helpers,partials,data) { 38600 return container.escapeExpression(container.lambda((depth0 != null ? depth0["rating-inputs-label"] : depth0), depth0)); 38601},"5":function(container,depth0,helpers,partials,data) { 38602 return "Rating Inputs "; 38603},"7":function(container,depth0,helpers,partials,data) { 38604 return container.escapeExpression(container.lambda((depth0 != null ? depth0["error-message-text"] : depth0), depth0)); 38605},"9":function(container,depth0,helpers,partials,data) { 38606 return container.escapeExpression(container.lambda((depth0 != null ? depth0["rating-1"] : depth0), depth0)); 38607},"11":function(container,depth0,helpers,partials,data) { 38608 return "1 out of 5 stars. Overall Rating: Poor."; 38609},"13":function(container,depth0,helpers,partials,data) { 38610 return container.escapeExpression(container.lambda((depth0 != null ? depth0["rating-2"] : depth0), depth0)); 38611},"15":function(container,depth0,helpers,partials,data) { 38612 return "2 out of 5 stars. Overall Rating: Fair."; 38613},"17":function(container,depth0,helpers,partials,data) { 38614 return container.escapeExpression(container.lambda((depth0 != null ? depth0["rating-3"] : depth0), depth0)); 38615},"19":function(container,depth0,helpers,partials,data) { 38616 return "3 out of 5 stars. Overall Rating: Average."; 38617},"21":function(container,depth0,helpers,partials,data) { 38618 return container.escapeExpression(container.lambda((depth0 != null ? depth0["rating-4"] : depth0), depth0)); 38619},"23":function(container,depth0,helpers,partials,data) { 38620 return "4 out of 5 stars. Overall Rating: Good."; 38621},"25":function(container,depth0,helpers,partials,data) { 38622 return container.escapeExpression(container.lambda((depth0 != null ? depth0["rating-5"] : depth0), depth0)); 38623},"27":function(container,depth0,helpers,partials,data) { 38624 return "5 out of 5 stars. Overall Rating: Excellent."; 38625},"29":function(container,depth0,helpers,partials,data) { 38626 return container.escapeExpression(container.lambda((depth0 != null ? depth0["overall-rating-label"] : depth0), depth0)); 38627},"31":function(container,depth0,helpers,partials,data) { 38628 return "Overall Rating"; 38629},"33":function(container,depth0,helpers,partials,data) { 38630 return "<sup>*</sup>"; 38631},"35":function(container,depth0,helpers,partials,data) { 38632 return "Poor"; 38633},"37":function(container,depth0,helpers,partials,data) { 38634 return "Fair"; 38635},"39":function(container,depth0,helpers,partials,data) { 38636 return "Average"; 38637},"41":function(container,depth0,helpers,partials,data) { 38638 return "Good"; 38639},"43":function(container,depth0,helpers,partials,data) {
38640 return "Excellent"; 38641},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38642 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 38643 38644 return "<div class=\"rating-inputs " 38645 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38646 + "\">\n <fieldset class=\"star-container js-star-container\" " 38647 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38648 + " >\n <legend class=\"screen-reader-text\">" 38649 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-inputs-label"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") 38650 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38651 + "</legend>\n <input id=\"" 38652 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38653 + "-1\" type=\"radio\" name=\"" 38654 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38655 + "\" value=\"1\" " 38656 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38657 + ">\n <label for=\"" 38658 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38659 + "-1\"><span>" 38660 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-1"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(11, data, 0),"data":data})) != null ? stack1 : "") 38661 + "</span></label>\n <input id=\"" 38662 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38663 + "-2\" type=\"radio\" name=\"" 38664 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38665 + "\" value=\"2\" " 38666 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38667 + ">\n <label for=\"" 38668 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38669 + "-2\"><span>" 38670 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-2"] : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(15, data, 0),"data":data})) != null ? stack1 : "") 38671 + "</span></label>\n <input id=\"" 38672 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38673 + "-3\" type=\"radio\" name=\"" 38674 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38675 + "\" value=\"3\" " 38676 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38677 + ">\n <label for=\"" 38678 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38679 + "-3\"><span>" 38680 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-3"] : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.program(19, data, 0),"data":data})) != null ? stack1 : "") 38681 + "</span></label>\n <input id=\"" 38682 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38683 + "-4\" type=\"radio\" name=\"" 38684 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38685 + "\" value=\"4\" " 38686 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38687 + ">\n <label for=\"" 38688 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38689 + "-4\"><span>" 38690 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-4"] : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.program(23, data, 0),"data":data})) != null ? stack1 : "") 38691 + "</span></label>\n <input id=\"" 38692 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38693 + "-5\" type=\"radio\" name=\"" 38694 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38695 + "\" value=\"5\" " 38696 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38697 + ">\n <label for=\"" 38698 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 38699 + "-5\"><span>" 38700 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-5"] : depth0),{"name":"if","hash":{},"fn":container.program(25, data, 0),"inverse":container.program(27, data, 0),"data":data})) != null ? stack1 : "") 38701 + "</span></label>\n </fieldset>\n <div class=\"star-label\">\n <span>" 38702 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["overall-rating-label"] : depth0),{"name":"if","hash":{},"fn":container.program(29, data, 0),"inverse":container.program(31, data, 0),"data":data})) != null ? stack1 : "") 38703 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.required : depth0),{"name":"if","hash":{},"fn":container.program(33, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
38704 + ": </span>\n <ol>\n <li>" 38705 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-1"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(35, data, 0),"data":data})) != null ? stack1 : "") 38706 + "</li>\n <li>" 38707 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-2"] : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(37, data, 0),"data":data})) != null ? stack1 : "") 38708 + "</li>\n <li>" 38709 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-3"] : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.program(39, data, 0),"data":data})) != null ? stack1 : "") 38710 + "</li>\n <li>" 38711 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-4"] : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.program(41, data, 0),"data":data})) != null ? stack1 : "") 38712 + "</li>\n <li>" 38713 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["rating-5"] : depth0),{"name":"if","hash":{},"fn":container.program(25, data, 0),"inverse":container.program(43, data, 0),"data":data})) != null ? stack1 : "") 38714 + "</li>\n </ol>\n </div>\n</div>\n"; 38715},"usePartial":true,"useData":true})); 38716 38717return this["ANF"]; 38718 38719}); 38720redesign.define('dsPartial/rating-stars',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 38721 38722this["ANF"] = this["ANF"] || {}; 38723this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38724 38725Handlebars.registerPartial("rating-stars", this["ANF"]["templates"]["rating-stars"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38726 return container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)); 38727},"3":function(container,depth0,helpers,partials,data) { 38728 return "\n Rated " 38729 + container.escapeExpression(container.lambda((depth0 != null ? depth0.rating : depth0), depth0)) 38730 + " out of 5 stars."; 38731},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38732 var stack1; 38733 38734 return "<span\n class=\"rating-stars " 38735 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38736 + "\"\n data-rating=\"" 38737 + container.escapeExpression(container.lambda((depth0 != null ? depth0.rating : depth0), depth0)) 38738 + "\">\n <span class=\"star\" aria-hidden=\"true\"></span>\n <span class=\"star\" aria-hidden=\"true\"></span>\n <span class=\"star\" aria-hidden=\"true\"></span>\n <span class=\"star\" aria-hidden=\"true\"></span>\n <span class=\"star\" aria-hidden=\"true\"></span>\n <span class=\"screen-reader-text\">" 38739 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["aria-label"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 38740 + "</span>\n</span>\n"; 38741},"usePartial":true,"useData":true})); 38742 38743return this["ANF"]; 38744 38745}); 38746redesign.define('dsPartial/rating-stars-summary',['handlebars','dsPartial/rating-stars','dsPartial/button'], function(Handlebars) { 38747 38748this["ANF"] = this["ANF"] || {}; 38749this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38750 38751Handlebars.registerPartial("rating-stars-summary", this["ANF"]["templates"]["rating-stars-summary"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38752 var stack1; 38753 38754 return ((stack1 = container.invokePartial(partials["rating-stars"],depth0,{"name":"rating-stars","hash":{"rating":(depth0 != null ? depth0.rating : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 38755},"3":function(container,depth0,helpers,partials,data) { 38756 var stack1; 38757 38758 return ((stack1 = container.invokePartial(partials["rating-stars"],depth0,{"name":"rating-stars","hash":{"aria-label":"Not Rated yet","rating":"0.0"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 38759},"5":function(container,depth0,helpers,partials,data) { 38760 return " <span class=\"rating-stars-summary-rating\" aria-hidden=\"true\">\n " 38761 + container.escapeExpression(container.lambda((depth0 != null ? depth0.rating : depth0), depth0)) 38762 + "\n </span>\n"; 38763},"7":function(container,depth0,helpers,partials,data) { 38764 var stack1; 38765 38766 return " <span class=\"rating-stars-summary-button-wrapper\">
38766\n <span aria-hidden=\"true\">(</span>\n" 38767 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"class-list":"rating-stars-summary-button","label":(depth0 != null ? depth0["review-button"] : depth0),"variant":"button-as-link","type":"button"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38768 + " <span aria-hidden=\"true\">)</span>\n </span>\n"; 38769},"9":function(container,depth0,helpers,partials,data) { 38770 return " <span class=\"rating-stars-summary-button-wrapper\">\n <span>(" 38771 + container.escapeExpression(container.lambda((depth0 != null ? depth0["review-text"] : depth0), depth0)) 38772 + ")</span>\n </span>\n"; 38773},"11":function(container,depth0,helpers,partials,data) { 38774 var stack1; 38775 38776 return " <span class=\"rating-stars-summary-button-wrapper\">\n <span class=\"rating-stars-summary-button\">\n" 38777 + ((stack1 = container.invokePartial(partials.button,depth0,{"name":"button","hash":{"class-list":"rating-stars-summary-button","label":(depth0 != null ? depth0.button : depth0),"variant":"button-as-link","type":"button"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38778 + " </span>\n </span>\n"; 38779},"13":function(container,depth0,helpers,partials,data) { 38780 return " <span class=\"rating-stars-summary-text\">\n " 38781 + container.escapeExpression(container.lambda((depth0 != null ? depth0.label : depth0), depth0)) 38782 + "\n </span>\n"; 38783},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38784 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 38785 38786 return "<span class=\"rating-stars-summary\">\n <span class=\"rating-stars-summary-stars\">\n" 38787 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.rating : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 38788 + " </span>\n" 38789 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["show-rating"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38790 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["review-button"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38791 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["review-text"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38792 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.button : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38793 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.label : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38794 + "</span>\n"; 38795},"usePartial":true,"useData":true})); 38796 38797return this["ANF"]; 38798 38799}); 38800redesign.define('dsPartial/recommended-product-card',['handlebars','dsPartial/product-card'], function(Handlebars) { 38801 38802this["ANF"] = this["ANF"] || {}; 38803this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38804 38805Handlebars.registerPartial("recommended-product-card", this["ANF"]["templates"]["recommended-product-card"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38806 var alias1=container.lambda, alias2=container.escapeExpression; 38807 38808 return " <p class=\"product-name\">\n <span class=\"screen-reader-text\">" 38809 + alias2(alias1((depth0 != null ? depth0.name : depth0), depth0)) 38810 + ", " 38811 + alias2(alias1((depth0 != null ? depth0.color : depth0), depth0)) 38812 + ", " 38813 + alias2(alias1((depth0 != null ? depth0["label-call-to-action"] : depth0), depth0)) 38814 + "</span>\n <span aria-hidden=\"true\">" 38815 + alias2(alias1((depth0 != null ? depth0.name : depth0), depth0)) 38816 + "</span>\n </p>\n"; 38817},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 38818 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 38819 38820 return "\n<div\n class=\"" 38821 + alias2(alias1((depth0 != null ? depth0["quickview-button-class-list"] : depth0), depth0)) 38822 + " js-faux-button faux-button\"\n data-showofp=\"" 38823 + alias2(alias1((depth0 != null ? depth0.showofp : depth0), depth0)) 38824 + "\"\n data-index=\"" 38825 + alias2(alias1((depth0 != null ? depth0.index : depth0), depth0)) 38826 + "\"\n data-seq=\"" 38827 + alias2(alias1((depth0 != null ? depth0.seq : depth0), depth0)) 38828 + "\"\n data-productid=\"" 38829 + alias2(alias1((depth0 != null ? depth0.productId : depth0), depth0)) 38830 + "\"\n data-categoryid=\"" 38831 + alias2(alias1((depth0 != null ? depth0.categoryId : depth0), depth0)) 38832 + "\"\n data-priceflag=\"" 38833 + alias2(alias1((depth0 != null ? depth0.priceFlag : depth0), depth0)) 38834 + "\"\n data-collectionid=\"" 38835 + alias2(alias1((depth0 != null ? depth0.collection : depth0), depth0)) 38836 + "\"\n data-cdp-product-id=\"" 38837 + alias2(alias1((depth0 != null ? depth0.kic : depth0), depth0)) 38838 + "\"\n>\n" 38839 + ((stack1 = container.invokePartial(partials["product-card"],depth0,{"name":"product-card","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38840 + "\n</div>\n"; 38841},"main_d": function(fn, props, container, depth0, data, blockParams, depths) { 38842 38843 var decorators = container.decorators; 38844 38845 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"args":["product-name"],"data":data}) || fn; 38846 return fn; 38847 } 38848 38849,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true})); 38850 38851return this["ANF"]; 38852 38853}); 38854redesign.define('dsPartial/review-card',['handlebars','dsPartial/rating-stars'], function(Handlebars) { 38855 38856this["ANF"] = this["ANF"] || {}; 38857this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38858 38859Handlebars.registerPartial("review-card", this["ANF"]["templates"]["review-card"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38860 return " <p>Size Purchased: <span>" 38861 + container.escapeExpression(container.lambda((depth0 != null ? depth0.sizePurchased : depth0), depth0)) 38862 + "</span></p>\n"; 38863},"3":function(container,depth0,helpers,partials,data) { 38864 return " <p>This item fit: <span>" 38865 + container.escapeExpression(container.lambda((depth0 != null ? depth0.itemFit : depth0), depth0)) 38866 + "</span></p>\n"; 38867},"5":function(container,depth0,helpers,partials,data) { 38868 return " <p>Would you recommend?: <span>" 38869 + container.escapeExpression(container.lambda((depth0 != null ? depth0.recommended : depth0), depth0)) 38870 + "</span></p>\n"; 38871},"7":function(container,depth0,helpers,partials,data) { 38872 var stack1; 38873 38874 return " " 38875 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.user : depth0)) != null ? stack1.nickname : stack1), depth0)) 38876 + "\n"; 38877},"9":function(container,depth0,helpers,partials,data) { 38878 return " " 38879 + container.escapeExpression(container.lambda((depth0 != null ? depth0.userNickname : depth0), depth0)) 38880 + "\n"; 38881},"11":function(container,depth0,helpers,partials,data) { 38882 var stack1; 38883
38884 return " <span class=\"user-height\">\n (" 38885 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.user : depth0)) != null ? stack1.height : stack1), depth0)) 38886 + ")\n </span>\n"; 38887},"13":function(container,depth0,helpers,partials,data) { 38888 var stack1; 38889 38890 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.userHeight : depth0),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 38891},"14":function(container,depth0,helpers,partials,data) { 38892 return " <span class=\"user-height\">\n (" 38893 + container.escapeExpression(container.lambda((depth0 != null ? depth0.userHeight : depth0), depth0)) 38894 + ")\n </span>\n"; 38895},"16":function(container,depth0,helpers,partials,data) { 38896 var stack1; 38897 38898 return " " 38899 + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.user : depth0)) != null ? stack1.location : stack1), depth0)) 38900 + "\n"; 38901},"18":function(container,depth0,helpers,partials,data) { 38902 return " " 38903 + container.escapeExpression(container.lambda((depth0 != null ? depth0.userLocation : depth0), depth0)) 38904 + "\n"; 38905},"20":function(container,depth0,helpers,partials,data) { 38906 return " " 38907 + container.escapeExpression(container.lambda((depth0 != null ? depth0.fullSubmissionDate : depth0), depth0)) 38908 + "\n"; 38909},"22":function(container,depth0,helpers,partials,data) { 38910 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 38911 38912 return " " 38913 + alias2(alias1(((stack1 = (depth0 != null ? depth0.submissionDate : depth0)) != null ? stack1.month : stack1), depth0)) 38914 + " " 38915 + alias2(alias1(((stack1 = (depth0 != null ? depth0.submissionDate : depth0)) != null ? stack1.day : stack1), depth0)) 38916 + ", " 38917 + alias2(alias1(((stack1 = (depth0 != null ? depth0.submissionDate : depth0)) != null ? stack1.year : stack1), depth0)) 38918 + "\n"; 38919},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38920 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 38921 38922 return "<div class=\"review-card\">\n <div class=\"rating\">\n" 38923 + ((stack1 = container.invokePartial(partials["rating-stars"],depth0,{"name":"rating-stars","hash":{"rating":(depth0 != null ? depth0.rating : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38924 + " </div>\n <div class=\"review-content\">\n <div class=\"title h2\">" 38925 + alias2(alias1((depth0 != null ? depth0.title : depth0), depth0)) 38926 + "</div>\n <div class=\"review-text\">\n <p>" 38927 + alias2(alias1((depth0 != null ? depth0.reviewText : depth0), depth0)) 38928 + "</p>\n </div>\n <div class=\"size-fit\">\n" 38929 + ((stack1 = helpers["if"].call(alias3,((stack1 = (depth0 != null ? depth0.sizePurchased : depth0)) != null ? stack1.length : stack1),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38930 + ((stack1 = helpers["if"].call(alias3,((stack1 = (depth0 != null ? depth0.itemFit : depth0)) != null ? stack1.length : stack1),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38931 + ((stack1 = helpers.blockHelperMissing.call(depth0,alias1((depth0 != null ? depth0.IsRecommended : depth0), depth0),{"name":"IsRecommended","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 38932 + " </div>\n </div>\n <div class=\"user-details\">\n <span class=\"user-name\">\n" 38933 + ((stack1 = helpers["if"].call(alias3,((stack1 = (depth0 != null ? depth0.user : depth0)) != null ? stack1.nickname : stack1),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") 38934 + " </span>\n" 38935 + ((stack1 = helpers["if"].call(alias3,((stack1 = ((stack1 = (depth0 != null ? depth0.user : depth0)) != null ? stack1.height : stack1)) != null ? stack1.length : stack1),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : "") 38936 + " <span class=\"dash\" aria-hidden=\"true\"></span>\n <div class=\"user-location\">\n" 38937 + ((stack1 = helpers["if"].call(alias3,((stack1 = (depth0 != null ? depth0.user : depth0)) != null ? stack1.location : stack1),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.program(18, data, 0),"data":data})) != null ? stack1 : "")
38938 + " </div>\n <span class=\"dash\" aria-hidden=\"true\"></span>\n </div>\n <div class=\"submitted-date\">\n" 38939 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.fullSubmissionDate : depth0),{"name":"if","hash":{},"fn":container.program(20, data, 0),"inverse":container.program(22, data, 0),"data":data})) != null ? stack1 : "") 38940 + " </div>\n</div>\n"; 38941},"usePartial":true,"useData":true})); 38942 38943return this["ANF"]; 38944 38945}); 38946redesign.define('dsPartial/review-summary-content',['handlebars'], function(Handlebars) { 38947 38948this["ANF"] = this["ANF"] || {}; 38949this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38950 38951Handlebars.registerPartial("review-summary-content", this["ANF"]["templates"]["review-summary-content"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38952 var stack1; 38953 38954 return "<div class=\"review-summary-content\">\n" 38955 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38956 + "</div>\n"; 38957},"usePartial":true,"useData":true})); 38958 38959return this["ANF"]; 38960 38961}); 38962redesign.define('dsPartial/review-summary-ctas',['handlebars'], function(Handlebars) { 38963 38964this["ANF"] = this["ANF"] || {}; 38965this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38966 38967Handlebars.registerPartial("review-summary-ctas", this["ANF"]["templates"]["review-summary-ctas"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38968 var stack1; 38969 38970 return "<div class=\"review-summary-ctas\">\n" 38971 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 38972 + "</div>\n"; 38973},"usePartial":true,"useData":true})); 38974 38975return this["ANF"]; 38976 38977}); 38978redesign.define('dsPartial/review-summary-heading',['handlebars'], function(Handlebars) { 38979 38980this["ANF"] = this["ANF"] || {}; 38981this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 38982 38983Handlebars.registerPartial("review-summary-heading", this["ANF"]["templates"]["review-summary-heading"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 38984 return " <div class=\"review-summary-heading\">\n <p class=\"h1\">" 38985 + container.escapeExpression(container.lambda((depth0 != null ? depth0.title : depth0), depth0)) 38986 + "</p>\n </div>\n"; 38987},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 38988 var stack1; 38989 38990 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.title : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 38991},"useData":true})); 38992 38993return this["ANF"]; 38994 38995}); 38996redesign.define('dsPartial/review-summary',['handlebars'], function(Handlebars) { 38997 38998this["ANF"] = this["ANF"] || {}; 38999this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39000 39001Handlebars.registerPartial("review-summary", this["ANF"]["templates"]["review-summary"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39002 var stack1; 39003 39004 return "<div class=\"review-summary\" data-variant=\"" 39005 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 39006 + "\">\n" 39007 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39008 + "</div>\n"; 39009},"usePartial":true,"useData":true})); 39010 39011return this["ANF"]; 39012 39013}); 39014redesign.define('dsPartial/selector',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsPartial/helpers/disabled'], function(Handlebars) { 39015 39016this["ANF"] = this["ANF"] || {}; 39017this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39018 39019Handlebars.registerPartial("selector", this["ANF"]["templates"]["selector"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39020 var stack1; 39021 39022 return "<button class=\"selector " 39023 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39024 + "\"\n type=\"button\"\n" 39025 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39026 + " " 39027 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39028 + ">\n" 39029 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39030 + " <span class=\"arrow\" aria-hidden=\"true\"></span>\n</button>\n"; 39031},"usePartial":true,"useData":true})); 39032 39033return this["ANF"]; 39034 39035}); 39036redesign.define('dsPartial/single-entry-form-button',['handlebars'], function(Handlebars) { 39037 39038this["ANF"] = this["ANF"] || {}; 39039this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39040 39041Handlebars.registerPartial("single-entry-form-button", this["ANF"]["templates"]["single-entry-form-button"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39042 var stack1; 39043 39044 return ((stack1 = container.invokePartial(partials["single-entry-button"],depth0,{"name":"single-entry-button","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 39045},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 39046 return ""; 39047},"main_d": function(fn, props, container, depth0, data, blockParams, depths) { 39048 39049 var decorators = container.decorators; 39050 39051 fn = decorators.inline(fn,props,container,{"name":"inline","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"args":["single-entry-button"],"data":data}) || fn; 39052 return fn; 39053 } 39054 39055,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true})); 39056 39057return this["ANF"]; 39058 39059}); 39060redesign.define('dsPartial/single-entry-form',['handlebars','dsPartial/input-field','dsPartial/single-entry-form-button'], function(Handlebars) { 39061 39062this["ANF"] = this["ANF"] || {}; 39063this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39064 39065Handlebars.registerPartial("single-entry-form", this["ANF"]["templates"]["single-entry-form"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39066 var stack1; 39067 39068 return ((stack1 = container.invokePartial(partials["input-field"],(depth0 != null ? depth0.input : depth0),{"name":"input-field","hash":{"brand":(depth0 != null ? depth0.brand : depth0),"single-entry":true,"id":(depth0 != null ? depth0.id : depth0)},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 39069},"2":function(container,depth0,helpers,partials,data) { 39070 var stack1; 39071 39072 return ((stack1 = container.invokePartial(partials["single-entry-form-button"],depth0,{"name":"single-entry-form-button","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 39073},"4":function(container,depth0,helpers,partials,data) { 39074 var stack1; 39075 39076 return ((stack1 = container.invokePartial(partials["input-field"],(depth0 != null ? depth0.input : depth0),{"name":"input-field","hash":{"brand":(depth0 != null ? depth0.brand : depth0),"single-entry":true},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 39077},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39078 var stack1; 39079 39080 return "<div class=\"single-entry-form\">\n"
39081 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.id : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") 39082 + "</div>\n"; 39083},"usePartial":true,"useData":true})); 39084 39085return this["ANF"]; 39086 39087}); 39088redesign.define('dsPartial/size-tile-group-input',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsPartial/helpers/checked','dsPartial/helpers/disabled'], function(Handlebars) { 39089 39090this["ANF"] = this["ANF"] || {}; 39091this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39092 39093Handlebars.registerPartial("size-tile-group-input", this["ANF"]["templates"]["size-tile-group-input"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39094 return "data-state=\"" 39095 + container.escapeExpression(container.lambda((depth0 != null ? depth0.state : depth0), depth0)) 39096 + "\""; 39097},"3":function(container,depth0,helpers,partials,data) { 39098 return "data-size=\"" 39099 + container.escapeExpression(container.lambda((depth0 != null ? depth0.size : depth0), depth0)) 39100 + "\""; 39101},"5":function(container,depth0,helpers,partials,data) { 39102 return "data-variant=\"" 39103 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 39104 + "\""; 39105},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39106 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 39107 39108 return "<div class=\"sitg-input-inner-wrapper" 39109 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39110 + "\"\n " 39111 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.state : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39112 + "\n " 39113 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.size : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39114 + "\n " 39115 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39116 + "\n " 39117 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39118 + ">\n <input " 39119 + ((stack1 = container.invokePartial(partials["helpers/checked"],depth0,{"name":"helpers/checked","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39120 + "\n" 39121 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39122 + " class=\"sitg-input\"\n id=\"" 39123 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 39124 + "\"\n name=\"" 39125 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 39126 + "\"\n type=\"" 39127 + alias3(alias2((depth0 != null ? depth0.type : depth0), depth0)) 39128 + "\"\n value=\"" 39129 + alias3(alias2((depth0 != null ? depth0.value : depth0), depth0)) 39130 + "\" />\n <div class=\"sitg-label-outer\">\n <div class=\"sitg-label-wrapper\">\n <label class=\"sitg-label\" for=\"" 39131 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 39132 + "\">\n <span class=\"sitg-label-text\">" 39133 + alias3(alias2((depth0 != null ? depth0.value : depth0), depth0)) 39134 + "</span>\n </label>\n </div>\n </div>\n</div>\n"; 39135},"usePartial":true,"useData":true})); 39136 39137return this["ANF"]; 39138 39139}); 39140redesign.define('dsPartial/size-tile-group',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
39140data-prop'], function(Handlebars) { 39141 39142this["ANF"] = this["ANF"] || {}; 39143this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39144 39145Handlebars.registerPartial("size-tile-group", this["ANF"]["templates"]["size-tile-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39146 return "data-horizontal-alignment=\"" 39147 + container.escapeExpression(container.lambda((depth0 != null ? depth0["horizontal-alignment"] : depth0), depth0)) 39148 + "\""; 39149},"3":function(container,depth0,helpers,partials,data) { 39150 return "data-vertical-alignment=\"" 39151 + container.escapeExpression(container.lambda((depth0 != null ? depth0["vertical-alignment"] : depth0), depth0)) 39152 + "\""; 39153},"5":function(container,depth0,helpers,partials,data) { 39154 return "data-state=\"" 39155 + container.escapeExpression(container.lambda((depth0 != null ? depth0.state : depth0), depth0)) 39156 + "\""; 39157},"7":function(container,depth0,helpers,partials,data) { 39158 return "data-layout=\"" 39159 + container.escapeExpression(container.lambda((depth0 != null ? depth0.layout : depth0), depth0)) 39160 + "\""; 39161},"9":function(container,depth0,helpers,partials,data) { 39162 return container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)); 39163},"11":function(container,depth0,helpers,partials,data) { 39164 return "default"; 39165},"13":function(container,depth0,helpers,partials,data) { 39166 return " class=\"h4\"\n"; 39167},"15":function(container,depth0,helpers,partials,data) { 39168 return " class=\"screen-reader-text\"\n"; 39169},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39170 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 39171 39172 return "<div class=\"size-tile-group " 39173 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39174 + "\"\n " 39175 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["horizontal-alignment"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39176 + "\n " 39177 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["vertical-alignment"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39178 + "\n " 39179 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.state : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39180 + "\n " 39181 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.layout : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39182 + "\n data-theme=\"" 39183 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(11, data, 0),"data":data})) != null ? stack1 : "") 39184 + "\"\n " 39185 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39186 + ">\n <fieldset>\n <legend\n" 39187 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["visible-legend"] : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(15, data, 0),"data":data})) != null ? stack1 : "") 39188 + " >\n " 39189 + container.escapeExpression(container.lambda((depth0 != null ? depth0.legend : depth0), depth0)) 39190 + "\n </legend>\n <div class=\"sitg-input-outer-wrapper\">\n" 39191 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39192 + " </div>\n </fieldset>\n</div>\n"; 39193},"usePartial":true,"useData":true})); 39194 39195return this["ANF"]; 39196 39197}); 39198redesign.define('dsPartial/slider-arrow',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 39199 39200this["ANF"] = this["ANF"] || {}; 39201this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39202 39203Handlebars.registerPartial("slider-arrow", this["ANF"]["templates"]["slider-arrow"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39204 return "data-reversed=\"true\""; 39205},"3":function(container,depth0,helpers,partials,data) { 39206 return "right-thin"; 39207},"5":function(container,depth0,helpers,partials,data) { 39208 return "left-thin"; 39209},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39210 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 39211 39212 return "<button class=\"slider-arrow " 39213 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39214 + "\"\n aria-label=\"" 39215 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aria-label"] : depth0), depth0)) 39216 + "\"\n " 39217 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.reversed : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39218 + "\n type=\"button\">\n <span class=\"slider-arrow-background\"></span>\n <span class=\"slider-arrow-icon\"\n data-icon=\"" 39219 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.reversed : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") 39220 + "\"></span>\n</button>\n"; 39221},"usePartial":true,"useData":true})); 39222 39223return this["ANF"]; 39224 39225}); 39226redesign.define('dsPartial/slider-indicator',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/checked'], function(Handlebars) { 39227 39228this["ANF"] = this["ANF"] || {}; 39229this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39230 39231Handlebars.registerPartial("slider-indicator", this["ANF"]["templates"]["slider-indicator"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39232 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 39233 39234 return " <li class=\"slider-indicator__slide\">\n <input id=\"" 39235 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 39236 + "\" class=\"slide-input\" type=\"radio\" name=\"" 39237 + alias2(alias1((depth0 != null ? depth0.groupName : depth0), depth0)) 39238 + "\" " 39239 + ((stack1 = container.invokePartial(partials["helpers/checked"],depth0,{"name":"helpers/checked","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39240 + ">\n <label for=\"" 39241 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 39242 + "\" class=\"slide-label\">
39242\n <span class=\"custom-slide-input\"></span>\n </label>\n </li>\n"; 39243},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39244 var stack1; 39245 39246 return "<ul id=\"" 39247 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 39248 + "\" class=\"" 39249 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39250 + "\">\n" 39251 + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.slides : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39252 + "</ul>\n"; 39253},"usePartial":true,"useData":true})); 39254 39255return this["ANF"]; 39256 39257}); 39258redesign.define('dsPartial/store-card-content',['handlebars'], function(Handlebars) { 39259 39260this["ANF"] = this["ANF"] || {}; 39261this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39262 39263Handlebars.registerPartial("store-card-content", this["ANF"]["templates"]["store-card-content"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39264 var stack1; 39265 39266 return "<div class=\"store-card-content\">\n" 39267 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39268 + "</div>\n"; 39269},"usePartial":true,"useData":true})); 39270 39271return this["ANF"]; 39272 39273}); 39274redesign.define('dsPartial/store-card',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsPartial/logo'], function(Handlebars) { 39275 39276this["ANF"] = this["ANF"] || {}; 39277this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39278 39279Handlebars.registerPartial("store-card", this["ANF"]["templates"]["store-card"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39280 return "data-map=\"true\""; 39281},"3":function(container,depth0,helpers,partials,data) { 39282 var stack1; 39283 39284 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.map : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 39285},"4":function(container,depth0,helpers,partials,data) { 39286 return "<a href=\"" 39287 + container.escapeExpression(container.lambda((depth0 != null ? depth0["map-link-url"] : depth0), depth0)) 39288 + "\" target=\"_blank\">"; 39289},"6":function(container,depth0,helpers,partials,data) { 39290 var stack1; 39291 39292 return " style=\"background-image: url(" 39293 + container.escapeExpression(container.lambda((depth0 != null ? depth0.map : depth0), depth0)) 39294 + ")\"\n" 39295 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["map-label"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39296 + " "; 39297},"7":function(container,depth0,helpers,partials,data) { 39298 return " role=\"img\"\n aria-label=\"" 39299 + container.escapeExpression(container.lambda((depth0 != null ? depth0["map-label"] : depth0), depth0)) 39300 + "\"\n"; 39301},"9":function(container,depth0,helpers,partials,data) { 39302 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 39303 39304 return "<div class=\"store-card-info\">\n <div class=\"store-card-info-icon\"\n data-brand=\"" 39305 + alias2(alias1((depth0 != null ? depth0.brand : depth0), depth0)) 39306 + "\" data-type=\"" 39307 + alias2(alias1((depth0 != null ? depth0.type : depth0), depth0)) 39308 + "\">\n" 39309 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["image-url"] : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(12, data, 0),"data":data})) != null ? stack1 : "") 39310 + "\n" 39311 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["brand-secondary"] : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39312 + " </div>\n" 39313 + ((stack1 = container.invokePartial(partials["store-name"],depth0,{"name":"store-name","fn":container.program(19, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39314 + " <p class=\"store-card-info-map-hours\"><a href=\"" 39315 + alias2(alias1((depth0 != null ? depth0["map-hours-url"] : depth0), depth0)) 39316 + "\" target=\"_blank\" rel=\"noopener\">" 39317 + alias2(alias1((depth0 != null ? depth0["map-and-hours-label"] : depth0), depth0)) 39318 + "</a></p>\n </div>"; 39319},"10":function(container,depth0,helpers,partials,data) { 39320 var alias1=container.lambda, alias2=container.escapeExpression; 39321 39322 return " <img src=\"" 39323 + alias2(alias1((depth0 != null ? depth0["image-url"] : depth0), depth0)) 39324 + "\" alt=\"" 39325 + alias2(alias1((depth0 != null ? depth0["icon-label"] : depth0), depth0)) 39326 + "\">\n"; 39327},"12":function(container,depth0,helpers,partials,data) { 39328 var stack1; 39329
39330 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.type : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(15, data, 0),"data":data})) != null ? stack1 : ""); 39331},"13":function(container,depth0,helpers,partials,data) { 39332 var stack1; 39333 39334 return ((stack1 = container.invokePartial(partials.logo,depth0,{"name":"logo","hash":{"type":(depth0 != null ? depth0.type : depth0),"brand":(depth0 != null ? depth0.brand : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 39335},"15":function(container,depth0,helpers,partials,data) { 39336 var stack1; 39337 39338 return ((stack1 = container.invokePartial(partials.logo,depth0,{"name":"logo","hash":{"type":"stacked","brand":(depth0 != null ? depth0.brand : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 39339},"17":function(container,depth0,helpers,partials,data) { 39340 var stack1; 39341 39342 return " <span data-icon=\"plus\"></span>\n" 39343 + ((stack1 = container.invokePartial(partials.logo,depth0,{"name":"logo","hash":{"type":(depth0 != null ? depth0["type-secondary"] : depth0),"brand":(depth0 != null ? depth0["brand-secondary"] : depth0)},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 39344},"19":function(container,depth0,helpers,partials,data) { 39345 return " <p class=\"store-card-info-name\">" 39346 + container.escapeExpression(container.lambda((depth0 != null ? depth0.name : depth0), depth0)) 39347 + "</p>\n"; 39348},"21":function(container,depth0,helpers,partials,data) { 39349 var stack1; 39350 39351 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.map : depth0),{"name":"if","hash":{},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39352 + " "; 39353},"22":function(container,depth0,helpers,partials,data) { 39354 return "</a>"; 39355},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39356 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 39357 39358 return "<div class=\"store-card " 39359 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39360 + "\"\n " 39361 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.map : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39362 + " data-brand=\"" 39363 + alias3(alias2((depth0 != null ? depth0.brand : depth0), depth0)) 39364 + "\" data-type=\"" 39365 + alias3(alias2((depth0 != null ? depth0.type : depth0), depth0)) 39366 + "\" data-breakpoint=\"" 39367 + alias3(alias2((depth0 != null ? depth0.breakpoint : depth0), depth0)) 39368 + "\" data-store-number=\"" 39369 + alias3(alias2((depth0 != null ? depth0.storeNumber : depth0), depth0)) 39370 + "\" data-brand-secondary=\"" 39371 + alias3(alias2((depth0 != null ? depth0["brand-secondary"] : depth0), depth0)) 39372 + "\" data-type-secondary=\"" 39373 + alias3(alias2((depth0 != null ? depth0["type-secondary"] : depth0), depth0)) 39374 + "\" " 39375 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39376 + ">\n " 39377 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["map-link-url"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39378 + "\n <div class=\"store-card-left-wrapper\"\n" 39379 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.map : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39380 + ">" 39381 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.map : depth0),{"name":"unless","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39382 + "</div>\n " 39383 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["map-link-url"] : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39384 + "\n <div class=\"store-card-right-wrapper\">\n" 39385 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39386 + " </div>\n</div>\n"; 39387},"usePartial":true,"useData":true})); 39388 39389return this["ANF"]; 39390 39391}); 39392redesign.define('dsPartial/storytelling-banner',['handlebars'], function(Handlebars) { 39393 39394this["ANF"] = this["ANF"] || {}; 39395this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39396 39397Handlebars.registerPartial("storytelling-banner", this["ANF"]["templates"]["storytelling-banner"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39398 return container.escapeExpression(container.lambda((depth0 != null ? depth0.background : depth0), depth0)); 39399},"3":function(container,depth0,helpers,partials,data) { 39400 return "none"; 39401},"5":function(container,depth0,helpers,partials,data) { 39402 return container.escapeExpression(container.lambda((depth0 != null ? depth0.orientation : depth0), depth0)); 39403},"7":function(container,depth0,helpers,partials,data) { 39404 return "vertical"; 39405},"9":function(container,depth0,helpers,partials,data) { 39406 return ""; 39407},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39408 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 39409 39410 return "<div class=\"storytelling-banner\"\n data-background=\"" 39411 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.background : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 39412 + "\"\n data-orientation=\"" 39413 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.orientation : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 39414 + "\"\n>\n <div class=\"storytelling-banner-background\">\n " 39415 + ((stack1 = container.invokePartial(partials["storytelling-banner-background"],depth0,{"name":"storytelling-banner-background","fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39416 + "\n </div>\n\n <div class=\"storytelling-banner-content-wrapper\">\n <div class=\"storytelling-banner-lockup\">\n " 39417 + ((stack1 = container.invokePartial(partials["storytelling-banner-lockup"],depth0,{"name":"storytelling-banner-lockup","fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39418 + "\n </div>\n\n <div class=\"storytelling-banner-content\">\n" 39419 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
39420 + " </div>\n </div>\n</div>\n"; 39421},"usePartial":true,"useData":true})); 39422 39423return this["ANF"]; 39424 39425}); 39426redesign.define('dsPartial/storytelling-tile',['handlebars','dsPartial/link'], function(Handlebars) { 39427 39428this["ANF"] = this["ANF"] || {}; 39429this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39430 39431Handlebars.registerPartial("storytelling-tile", this["ANF"]["templates"]["storytelling-tile"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39432 return container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)); 39433},"3":function(container,depth0,helpers,partials,data) { 39434 return "default"; 39435},"5":function(container,depth0,helpers,partials,data) { 39436 return container.escapeExpression(container.lambda((depth0 != null ? depth0["image-margin-bottom"] : depth0), depth0)); 39437},"7":function(container,depth0,helpers,partials,data) { 39438 return "\"m\""; 39439},"9":function(container,depth0,helpers,partials,data) { 39440 return ""; 39441},"11":function(container,depth0,helpers,partials,data) { 39442 return container.escapeExpression(container.lambda((depth0 != null ? depth0["content-indent"] : depth0), depth0)); 39443},"13":function(container,depth0,helpers,partials,data) { 39444 return "\"none\""; 39445},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39446 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 39447 39448 return "<div class=\"storytelling-tile\"\n data-theme=\"" 39449 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 39450 + "\"\n>\n <div class=\"storytelling-tile-collection-image\"\n data-margin-bottom=" 39451 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["image-margin-bottom"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "") 39452 + "\n >\n " 39453 + ((stack1 = container.invokePartial(partials["collection-image"],depth0,{"name":"collection-image","fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39454 + "\n </div>\n <div\n class=\"storytelling-tile-content\"\n data-content-indent=" 39455 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["content-indent"] : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : "") 39456 + "\n >\n" 39457 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39458 + " <div class=\"storytelling-tile-collection-description\">" 39459 + container.escapeExpression(container.lambda((depth0 != null ? depth0["collection-description"] : depth0), depth0)) 39460 + "</div>\n <div class=\"storytelling-tile-link\">\n " 39461 + ((stack1 = container.invokePartial(partials.link,depth0,{"name":"link","fn":container.program(9, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39462 + "\n </div>\n </div>\n</div>"; 39463},"usePartial":true,"useData":true})); 39464 39465return this["ANF"]; 39466 39467}); 39468redesign.define('dsPartial/swatch-tile-group-input',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop','dsPartial/helpers/checked','dsPartial/helpers/disabled'], function(Handlebars) { 39469 39470this["ANF"] = this["ANF"] || {}; 39471this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39472 39473Handlebars.registerPartial("swatch-tile-group-input", this["ANF"]["templates"]["swatch-tile-group-input"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39474 return "data-state=\"" 39475 + container.escapeExpression(container.lambda((depth0 != null ? depth0.state : depth0), depth0)) 39476 + "\""; 39477},"3":function(container,depth0,helpers,partials,data) { 39478 return " class=\"screen-reader-text\"\n data-label-visible=\"false\"\n"; 39479},"5":function(container,depth0,helpers,partials,data) { 39480 return " class=\"swtg-label\"\n data-label-visible=\"true\"\n"; 39481},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39482 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 39483 39484 return "<div class=\"swtg-input-inner-wrapper" 39485 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39486 + "\"\n " 39487 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.state : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39488 + " " 39489 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39490 + ">\n <input " 39491 + ((stack1 = container.invokePartial(partials["helpers/checked"],depth0,{"name":"helpers/checked","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39492 + "\n" 39493 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39494 + " class=\"swtg-input\"\n id=\"" 39495 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 39496 + "\"\n name=\"" 39497 + alias3(alias2((depth0 != null ? depth0.name : depth0), depth0)) 39498 + "\"\n type=\"" 39499 + alias3(alias2((depth0 != null ? depth0.type : depth0), depth0)) 39500 + "\"\n value=\"" 39501 + alias3(alias2((depth0 != null ? depth0.value : depth0), depth0)) 39502 + "\" />\n <div class=\"swtg-input-tile-wrapper\">\n <div class=\"swtg-image-outer-wrapper\">\n <div class=\"swtg-image-inner-wrapper\">\n <img src=\"" 39503 + alias3(alias2((depth0 != null ? depth0.image : depth0), depth0)) 39504 + "\" alt=\"\">\n </div>\n </div>\n <label\n" 39505 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["hide-label"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") 39506 + " for=\"" 39507 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 39508 + "\">\n " 39509 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 39510 + "\n </label>\n </div>\n</div>\n"; 39511},"usePartial":true,"useData":true})); 39512 39513return this["ANF"]; 39514 39515}); 39516redesign.define('dsPartial/swatch-tile-group',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
39516data-prop'], function(Handlebars) { 39517 39518this["ANF"] = this["ANF"] || {}; 39519this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39520 39521Handlebars.registerPartial("swatch-tile-group", this["ANF"]["templates"]["swatch-tile-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39522 return "data-horizontal-alignment=\"" 39523 + container.escapeExpression(container.lambda((depth0 != null ? depth0["horizontal-alignment"] : depth0), depth0)) 39524 + "\""; 39525},"3":function(container,depth0,helpers,partials,data) { 39526 return "data-vertical-alignment=\"" 39527 + container.escapeExpression(container.lambda((depth0 != null ? depth0["vertical-alignment"] : depth0), depth0)) 39528 + "\""; 39529},"5":function(container,depth0,helpers,partials,data) { 39530 return "data-state=\"" 39531 + container.escapeExpression(container.lambda((depth0 != null ? depth0.state : depth0), depth0)) 39532 + "\""; 39533},"7":function(container,depth0,helpers,partials,data) { 39534 return "data-size=\"" 39535 + container.escapeExpression(container.lambda((depth0 != null ? depth0.size : depth0), depth0)) 39536 + "\""; 39537},"9":function(container,depth0,helpers,partials,data) { 39538 return "data-layout=\"" 39539 + container.escapeExpression(container.lambda((depth0 != null ? depth0.layout : depth0), depth0)) 39540 + "\""; 39541},"11":function(container,depth0,helpers,partials,data) { 39542 return " class=\"h4\"\n"; 39543},"13":function(container,depth0,helpers,partials,data) { 39544 return " class=\"screen-reader-text\"\n"; 39545},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39546 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 39547 39548 return "<div class=\"swatch-tile-group " 39549 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39550 + "\"\n " 39551 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["horizontal-alignment"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39552 + "\n " 39553 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["vertical-alignment"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39554 + "\n " 39555 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.state : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39556 + "\n " 39557 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.size : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39558 + "\n " 39559 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.layout : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39560 + "\n " 39561 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39562 + ">\n <fieldset>\n <legend\n" 39563 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["visible-legend"] : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : "") 39564 + " >\n " 39565 + container.escapeExpression(container.lambda((depth0 != null ? depth0.legend : depth0), depth0)) 39566 + "\n </legend>\n <div class=\"swtg-input-outer-wrapper\">\n" 39567 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39568 + " </div>\n </fieldset>\n</div>\n"; 39569},"usePartial":true,"useData":true})); 39570 39571return this["ANF"]; 39572 39573}); 39574redesign.define('dsPartial/switcher',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/checked','dsPartial/helpers/
39574data-prop','dsPartial/helpers/disabled','dsPartial/helpers/name'], function(Handlebars) { 39575 39576this["ANF"] = this["ANF"] || {}; 39577this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39578 39579Handlebars.registerPartial("switcher", this["ANF"]["templates"]["switcher"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39580 return " value=\"" 39581 + container.escapeExpression(container.lambda((depth0 != null ? depth0.value : depth0), depth0)) 39582 + "\""; 39583},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39584 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 39585 39586 return "<div class=\"switcher js-switcher " 39587 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39588 + "\">\n <input id=\"" 39589 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 39590 + "\"\n type=\"checkbox\"\n" 39591 + ((stack1 = container.invokePartial(partials["helpers/checked"],depth0,{"name":"helpers/checked","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39592 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39593 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39594 + ((stack1 = container.invokePartial(partials["helpers/name"],depth0,{"name":"helpers/name","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39595 + " " 39596 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.value : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39597 + "\n >\n <label for=\"" 39598 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 39599 + "\">\n <span class=\"switcher-text\">" 39600 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39601 + "</span>\n <span class=\"switcher-control\">
39601\n <span class=\"switcher-circle\" aria-hidden=\"true\"></span>\n </span>\n </label>\n</div>\n"; 39602},"usePartial":true,"useData":true})); 39603 39604return this["ANF"]; 39605 39606}); 39607redesign.define('dsPartial/tab-link',['handlebars'], function(Handlebars) { 39608 39609this["ANF"] = this["ANF"] || {}; 39610this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39611 39612Handlebars.registerPartial("tab-link", this["ANF"]["templates"]["tab-link"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39613 return "tab-link-selected"; 39614},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39615 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 39616 39617 return "<a class=\"tab-link " 39618 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.selected : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39619 + "\" href=\"" 39620 + alias2(alias1((depth0 != null ? depth0.url : depth0), depth0)) 39621 + "\">\n <span class=\"tab-link-text\">" 39622 + alias2(alias1((depth0 != null ? depth0.label : depth0), depth0)) 39623 + "</span>\n</a>\n"; 39624},"useData":true})); 39625 39626return this["ANF"]; 39627 39628}); 39629redesign.define('dsPartial/tab-links',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 39630 39631this["ANF"] = this["ANF"] || {}; 39632this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39633 39634Handlebars.registerPartial("tab-links", this["ANF"]["templates"]["tab-links"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39635 var stack1; 39636 39637 return "<div class=\"tab-links js-tab-links " 39638 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39639 + "\">\n" 39640 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39641 + "</div>\n"; 39642},"usePartial":true,"useData":true})); 39643 39644return this["ANF"]; 39645 39646}); 39647redesign.define('dsPartial/tab-panel',['handlebars'], function(Handlebars) { 39648 39649this["ANF"] = this["ANF"] || {}; 39650this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39651 39652Handlebars.registerPartial("tab-panel", this["ANF"]["templates"]["tab-panel"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39653 return "hidden"; 39654},"3":function(container,depth0,helpers,partials,data) { 39655 return "tabindex=\"0\""; 39656},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39657 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 39658 39659 return "<div role=\"tabpanel\"\n id=\"" 39660 + alias2(alias1((depth0 != null ? depth0["tab-id"] : depth0), depth0)) 39661 + "-tab\"\n aria-labelledby=\"" 39662 + alias2(alias1((depth0 != null ? depth0["tab-id"] : depth0), depth0)) 39663 + "\"\n " 39664 + ((stack1 = helpers.unless.call(alias3,(depth0 != null ? depth0.active : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39665 + "\n class=\"tab-panel\"\n data-panel-scope=\"" 39666 + alias2(alias1((depth0 != null ? depth0.scope : depth0), depth0)) 39667 + "\"\n " 39668 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.focusable : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39669 + ">\n" 39670 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39671 + "</div>\n"; 39672},"usePartial":true,"useData":true})); 39673 39674return this["ANF"]; 39675 39676}); 39677redesign.define('dsPartial/tab',['handlebars','dsPartial/helpers/aria-label','dsPartial/helpers/class-list'], function(Handlebars) { 39678 39679this["ANF"] = this["ANF"] || {}; 39680this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39681 39682Handlebars.registerPartial("tab", this["ANF"]["templates"]["tab"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39683 return " aria-selected=\"true\"\n"; 39684},"3":function(container,depth0,helpers,partials,data) { 39685 return " aria-selected=\"false\"\n tabindex=\"-1\"\n"; 39686},"5":function(container,depth0,helpers,partials,data) { 39687 return "value=\"" 39688 + container.escapeExpression(container.lambda((depth0 != null ? depth0.value : depth0), depth0)) 39689 + "\""; 39690},"7":function(container,depth0,helpers,partials,data) { 39691 return "<span class=\"tab-button-sub-label\">" 39692 + container.escapeExpression(container.lambda((depth0 != null ? depth0["sub-label"] : depth0), depth0)) 39693 + "</span>"; 39694},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39695 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 39696 39697 return "<button\n" 39698 + ((stack1 = container.invokePartial(partials["helpers/aria-label"],depth0,{"name":"helpers/aria-label","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39699 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.active : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 39700 + "\n role=\"tab\"\n aria-controls=\"" 39701 + alias3(alias2((depth0 != null ? depth0["tab-id"] : depth0), depth0)) 39702 + "-tab\"\n class=\"tab-button " 39703 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39704 + "\"\n id=\"" 39705 + alias3(alias2((depth0 != null ? depth0["tab-id"] : depth0), depth0)) 39706 + "\"\n type=\"button\"\n" 39707 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.value : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39708 + ">\n <span class=\"tab-button-label\">" 39709 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 39710 + "</span>" 39711 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["sub-label"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39712 + "</button>\n"; 39713},"usePartial":true,"useData":true})); 39714 39715return this["ANF"]; 39716 39717}); 39718redesign.define('dsPartial/tabs',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 39719 39720this["ANF"] = this["ANF"] || {}; 39721this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39722 39723Handlebars.registerPartial("tabs", this["ANF"]["templates"]["tabs"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39724 var stack1; 39725 39726 return "<div class=\"tabs js-tabs " 39727 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39728 + "\" data-js-component=\"tabs\"\n role=\"tablist\" data-scope=\"" 39729 + container.escapeExpression(container.lambda((depth0 != null ? depth0.scope : depth0), depth0)) 39730 + "\">\n" 39731 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39732 + "</div>\n"; 39733},"usePartial":true,"useData":true})); 39734 39735return this["ANF"]; 39736 39737}); 39738redesign.define('dsPartial/tag-group',['handlebars','dsPartial/link'], function(Handlebars) { 39739 39740this["ANF"] = this["ANF"] || {}; 39741this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39742 39743Handlebars.registerPartial("tag-group", this["ANF"]["templates"]["tag-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39744 var alias1=container.lambda, alias2=container.escapeExpression; 39745 39746 return " " 39747 + alias2(alias1((depth0 != null ? depth0["clear-all-text"] : depth0), depth0)) 39748 + "\n <span class=\"screen-reader-text\">" 39749 + alias2(alias1((depth0 != null ? depth0["clear-all-text-suffix"] : depth0), depth0)) 39750 + "</span>\n"; 39751},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39752 var stack1; 39753 39754 return "<div class=\"tag-group js-tag-group\">\n" 39755 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39756 + ((stack1 = container.invokePartial(partials.link,depth0,{"name":"link","hash":{"class-list":"js-tag-group-clear-all"},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39757 + "</div>"; 39758},"usePartial":true,"useData":true})); 39759 39760return this["ANF"]; 39761 39762}); 39763redesign.define('dsPartial/tag',['handlebars'], function(Handlebars) { 39764 39765this["ANF"] = this["ANF"] || {}; 39766this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39767 39768Handlebars.registerPartial("tag", this["ANF"]["templates"]["tag"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39769 var stack1; 39770 39771 return "<div class=\"tag-group-tag js-tag-group-tag\">\n" 39772 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39773 + " <button\n aria-label=\"" 39774 + container.escapeExpression(container.lambda((depth0 != null ? depth0["clear-label"] : depth0), depth0)) 39775 + "\"\n class=\"tag-group-clear-tag js-tag-group-clear-tag\"\n type=\"button\"\n >\n <span aria-hidden=\"true\" class=\"tag-clear-icon\" data-icon=\"close\"></span>\n </button>\n</div>"; 39776},"usePartial":true,"useData":true})); 39777 39778return this["ANF"]; 39779 39780}); 39781redesign.define('dsPartial/textarea',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/invalid','dsPartial/helpers/required','dsPartial/helpers/maxlength','dsPartial/helpers/
39781data-filled','dsPartial/error-message'], function(Handlebars) { 39782 39783this["ANF"] = this["ANF"] || {}; 39784this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39785 39786Handlebars.registerPartial("textarea", this["ANF"]["templates"]["textarea"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39787 return "js-maxlength"; 39788},"3":function(container,depth0,helpers,partials,data) { 39789 return "data-brand=\"" 39790 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 39791 + "\""; 39792},"5":function(container,depth0,helpers,partials,data) { 39793 return " aria-labelledby=\"" 39794 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 39795 + "-characters-count\"\n aria-live=\"polite\"\n"; 39796},"7":function(container,depth0,helpers,partials,data) { 39797 return "aria-describedby=\"" 39798 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 39799 + "-error-message\""; 39800},"9":function(container,depth0,helpers,partials,data) { 39801 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 39802 39803 return "<small role=\"alert\" aria-live=\"polite\" aria-atomic=\"true\" class=\"maxlength\" id=\"" 39804 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 39805 + "-characters-count\">\n" 39806 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.charCountText : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(12, data, 0),"data":data})) != null ? stack1 : "") 39807 + " <span class=\"char-count\">" 39808 + alias2(alias1((depth0 != null ? depth0.maxlength : depth0), depth0)) 39809 + "</span>\n </small>\n"; 39810},"10":function(container,depth0,helpers,partials,data) { 39811 return " " 39812 + container.escapeExpression(container.lambda((depth0 != null ? depth0.charCountText : depth0), depth0)) 39813 + "\n"; 39814},"12":function(container,depth0,helpers,partials,data) { 39815 return " Characters remaining:\n"; 39816},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39817 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 39818 39819 return "<div class=\"textarea js-textarea " 39820 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.maxlength : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39821 + " " 39822 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39823 + "\"\n " 39824 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39825 + ">\n <textarea class=\"textarea-padding\"\n" 39826 + ((stack1 = container.invokePartial(partials["helpers/invalid"],depth0,{"name":"helpers/invalid","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39827 + ((stack1 = container.invokePartial(partials["helpers/required"],depth0,{"name":"helpers/required","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39828 + ((stack1 = container.invokePartial(partials["helpers/maxlength"],depth0,{"name":"helpers/maxlength","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39829 + ((stack1 = container.invokePartial(partials["helpers/data-filled"],depth0,{"name":"helpers/data-filled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39830 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.maxlength : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39831 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.invalid : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39832 + "id=\"" 39833 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 39834 + "\">" 39835 + alias3(alias2((depth0 != null ? depth0.value : depth0), depth0)) 39836 + "</textarea>\n <label for=\"" 39837 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 39838 + "\" class=\"float-label\">\n " 39839 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 39840 + "\n </label>\n <span class=\"placeholder\" aria-hidden=\"true\">" 39841 + alias3(alias2((depth0 != null ? depth0.label : depth0), depth0)) 39842 + "</span>\n" 39843 + ((stack1 = container.invokePartial(partials["error-message"],depth0,{"name":"error-message","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39844 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.maxlength : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39845 + "</div>\n"; 39846},"usePartial":true,"useData":true})); 39847 39848return this["ANF"]; 39849 39850}); 39851redesign.define('dsPartial/thumbnail',['handlebars'], function(Handlebars) { 39852 39853this["ANF"] = this["ANF"] || {}; 39854this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39855 39856Handlebars.registerPartial("thumbnail", this["ANF"]["templates"]["thumbnail"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39857 return " aria-describedby=\"" 39858 + container.escapeExpression(container.lambda((depth0 != null ? depth0.ariaDescribedBy : depth0), depth0)) 39859 + "\" "; 39860},"3":function(container,depth0,helpers,partials,data) { 39861 return " data-state=\"selected\" "; 39862},"5":function(container,depth0,helpers,partials,data) { 39863 return " data-is-video=\"true\""; 39864},"7":function(container,depth0,helpers,partials,data) {
39865 return " <span class=\"screen-reader-text\">\n " 39866 + container.escapeExpression(container.lambda((depth0 != null ? depth0.selectedText : depth0), depth0)) 39867 + "\n </span>\n"; 39868},"9":function(container,depth0,helpers,partials,data) { 39869 var stack1; 39870 39871 return " <span class=\"thumbnail-video\">\n <span class=\"screen-reader-text\">\n" 39872 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.playText : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(12, data, 0),"data":data})) != null ? stack1 : "") 39873 + " </span>\n </span>\n"; 39874},"10":function(container,depth0,helpers,partials,data) { 39875 return " " 39876 + container.escapeExpression(container.lambda((depth0 != null ? depth0.playText : depth0), depth0)) 39877 + "\n"; 39878},"12":function(container,depth0,helpers,partials,data) { 39879 return " Play Video\n"; 39880},"14":function(container,depth0,helpers,partials,data) { 39881 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 39882 39883 return " <img class=\"thumbnail-image\"\n " 39884 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.src : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39885 + "\n " 39886 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["data-src"] : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39887 + "\n alt=\"" 39888 + container.escapeExpression(container.lambda((depth0 != null ? depth0.alt : depth0), depth0)) 39889 + "\">\n"; 39890},"15":function(container,depth0,helpers,partials,data) { 39891 return " src=\"" 39892 + container.escapeExpression(container.lambda((depth0 != null ? depth0.src : depth0), depth0)) 39893 + "\" "; 39894},"17":function(container,depth0,helpers,partials,data) { 39895 return " data-src=\"" 39896 + container.escapeExpression(container.lambda((depth0 != null ? depth0["data-src"] : depth0), depth0)) 39897 + "\" "; 39898},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39899 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 39900 39901 return "<span class=\"thumbnail\" " 39902 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.ariaDescribedBy : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39903 + ">\n <span class=\"thumbnail-inner-wrapper\"\n " 39904 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.selected : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39905 + "\n " 39906 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["is-video"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39907 + ">\n" 39908 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.selected : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39909 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["is-video"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(14, data, 0),"data":data})) != null ? stack1 : "") 39910 + " </span>\n</span>\n"; 39911},"useData":true})); 39912 39913return this["ANF"]; 39914 39915}); 39916redesign.define('dsPartial/tile-input-group',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/data-prop'], function(Handlebars) { 39917 39918this["ANF"] = this["ANF"] || {}; 39919this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39920 39921Handlebars.registerPartial("tile-input-group", this["ANF"]["templates"]["tile-input-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39922 return " class=\"h4\"\n"; 39923},"3":function(container,depth0,helpers,partials,data) { 39924 return " class=\"screen-reader-text\"\n"; 39925},"5":function(container,depth0,helpers,partials,data) { 39926 var alias1=container.lambda, alias2=container.escapeExpression; 39927 39928 return " <p class=\"tile-additional-info\" id=\"" 39929 + alias2(alias1((depth0 != null ? depth0["additional-info-id"] : depth0), depth0)) 39930 + "\">\n " 39931 + alias2(alias1((depth0 != null ? depth0["additional-info-text"] : depth0), depth0)) 39932 + "\n </p>\n"; 39933},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 39934 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 39935 39936 return "<fieldset class=\"tile-group\">\n <legend id=\"" 39937 + alias2(alias1((depth0 != null ? depth0["legend-id"] : depth0), depth0)) 39938 + "\"\n" 39939 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["visible-legend"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(3, data, 0),"data":data})) != null ? stack1 : "") 39940 + " >\n " 39941 + ((stack1 = alias1((depth0 != null ? depth0.legend : depth0), depth0)) != null ? stack1 : "") 39942 + "\n </legend>\n\n" 39943 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["additional-info-text"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 39944 + "\n <ul class=\"tiles " 39945 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39946 + "\" " 39947 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39948 + " data-tile-size=\"" 39949 + alias2(alias1((depth0 != null ? depth0["tile-size"] : depth0), depth0)) 39950 + "\" data-tile-layout=\"" 39951 + alias2(alias1((depth0 != null ? depth0["tile-layout"] : depth0), depth0)) 39952 + "\">\n" 39953 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 39954 + " </ul>\n</fieldset>\n"; 39955},"usePartial":true,"useData":true})); 39956 39957return this["ANF"]; 39958 39959}); 39960redesign.define('dsPartial/tile-input',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/
39960data-prop','dsPartial/helpers/checked','dsPartial/helpers/disabled'], function(Handlebars) { 39961 39962this["ANF"] = this["ANF"] || {}; 39963this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 39964 39965Handlebars.registerPartial("tile-input", this["ANF"]["templates"]["tile-input"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 39966 return " aria-describedby=\"" 39967 + container.escapeExpression(container.lambda((depth0 != null ? depth0["additional-info-id"] : depth0), depth0)) 39968 + "\"\n"; 39969},"3":function(container,depth0,helpers,partials,data) { 39970 return " aria-label=\"" 39971 + container.escapeExpression(container.lambda((depth0 != null ? depth0["label-text"] : depth0), depth0)) 39972 + "\"\n"; 39973},"5":function(container,depth0,helpers,partials,data) { 39974 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 39975 39976 return " <label data-variant=\"" 39977 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.program(8, data, 0),"data":data})) != null ? stack1 : "") 39978 + "\" data-type=\"image\" class=\"tile-content\" for=\"" 39979 + alias3(alias2((depth0 != null ? depth0.id : depth0), depth0)) 39980 + "\">\n <img src=\"" 39981 + alias3(alias2((depth0 != null ? depth0.image : depth0), depth0)) 39982 + "\" alt=\"" 39983 + alias3(alias2((depth0 != null ? depth0.altText : depth0), depth0)) 39984 + "\">\n <span class=\"screen-reader-text toggle-screen-reader-text\">" 39985 + alias3(alias2((depth0 != null ? depth0.disableText : depth0), depth0)) 39986 + "</span>\n </label>\n" 39987 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["additional-label-text"] : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 39988},"6":function(container,depth0,helpers,partials,data) { 39989 return container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)); 39990},"8":function(container,depth0,helpers,partials,data) { 39991 return "default"; 39992},"10":function(container,depth0,helpers,partials,data) { 39993 return " <span class=\"additional-tile-text\" aria-hidden=\"true\">" 39994 + container.escapeExpression(container.lambda((depth0 != null ? depth0["additional-label-text"] : depth0), depth0)) 39995 + "</span>\n"; 39996},"12":function(container,depth0,helpers,partials,data) { 39997 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 39998 39999 return " <label data-variant=\"" 40000 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.program(8, data, 0),"data":data})) != null ? stack1 : "") 40001 + "\" class=\"tile-content\" for=\"" 40002 + container.escapeExpression(container.lambda((depth0 != null ? depth0.id : depth0), depth0)) 40003 + "\">\n <span class=\"tile-text\">" 40004 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["tile-text"] : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(15, data, 0),"data":data})) != null ? stack1 : "") 40005 + "</span>\n </label>\n"; 40006},"13":function(container,depth0,helpers,partials,data) { 40007 return container.escapeExpression(container.lambda((depth0 != null ? depth0["tile-text"] : depth0), depth0)); 40008},"15":function(container,depth0,helpers,partials,data) { 40009 return container.escapeExpression(container.lambda((depth0 != null ? depth0.value : depth0), depth0)); 40010},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 40011 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 40012 40013 return "<div class=\"tile-input " 40014 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40015 + "\" data-state=\"" 40016 + alias2(alias1((depth0 != null ? depth0.state : depth0), depth0)) 40017 + "\" " 40018 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40019 + ">\n <input\n" 40020 + ((stack1 = container.invokePartial(partials["helpers/checked"],depth0,{"name":"helpers/checked","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40021 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40022 + "\n" 40023 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["additional-info-text"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40024 + "\n" 40025 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["label-text"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40026 + "\n id=\"" 40027 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 40028 + "\"\n name=\"" 40029 + alias2(alias1((depth0 != null ? depth0.name : depth0), depth0)) 40030 + "\"\n type=\"" 40031 + alias2(alias1((depth0 != null ? depth0.type : depth0), depth0)) 40032 + "\"\n value=\"" 40033 + alias2(alias1((depth0 != null ? depth0.value : depth0), depth0)) 40034 + "\">\n\n" 40035 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.image : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(12, data, 0),"data":data})) != null ? stack1 : "") 40036 + "</div>\n"; 40037},"usePartial":true,"useData":true})); 40038 40039return this["ANF"]; 40040 40041}); 40042redesign.define('dsPartial/toaster',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 40043 40044this["ANF"] = this["ANF"] || {}; 40045this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 40046 40047Handlebars.registerPartial("toaster", this["ANF"]["templates"]["toaster"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 40048 var stack1; 40049 40050 return "<div class=\"js-toaster toaster " 40051 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40052 + "\" tabindex=\"-1\" data-direction=\"" 40053 + container.escapeExpression(container.lambda((depth0 != null ? depth0.direction : depth0), depth0)) 40054 + "\">\n" 40055 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40056 + "</div>\n"; 40057},"usePartial":true,"useData":true})); 40058 40059return this["ANF"]; 40060 40061}); 40062redesign.define('dsPartial/toggle',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/aria-label','dsPartial/helpers/
40062data-prop','dsPartial/helpers/checked','dsPartial/helpers/disabled'], function(Handlebars) { 40063 40064this["ANF"] = this["ANF"] || {}; 40065this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 40066 40067Handlebars.registerPartial("toggle", this["ANF"]["templates"]["toggle"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 40068 return "data-brand=\"" 40069 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 40070 + "\""; 40071},"3":function(container,depth0,helpers,partials,data) { 40072 return " aria-labelledby=\"" 40073 + container.escapeExpression(container.lambda((depth0 != null ? depth0["labelled-by"] : depth0), depth0)) 40074 + "\"\n"; 40075},"5":function(container,depth0,helpers,partials,data) { 40076 var stack1; 40077 40078 return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.label : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 40079},"6":function(container,depth0,helpers,partials,data) { 40080 return " aria-label=\"" 40081 + container.escapeExpression(container.lambda((depth0 != null ? depth0.label : depth0), depth0)) 40082 + "\"\n "; 40083},"8":function(container,depth0,helpers,partials,data,blockParams,depths) { 40084 var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}); 40085 40086 return " <div class=\"toggle-block\">\n <input id=\"" 40087 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 40088 + "\" class=\"toggle-radio\" type=\"radio\" name=\"" 40089 + alias2(alias1((depths[1] != null ? depths[1].name : depths[1]), depth0)) 40090 + "\" value=\"" 40091 + alias2(alias1((depth0 != null ? depth0.value : depth0), depth0)) 40092 + "\"\n" 40093 + ((stack1 = container.invokePartial(partials["helpers/aria-label"],depth0,{"name":"helpers/aria-label","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40094 + ((stack1 = container.invokePartial(partials["helpers/data-prop"],depth0,{"name":"helpers/data-prop","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40095 + ((stack1 = container.invokePartial(partials["helpers/checked"],depth0,{"name":"helpers/checked","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40096 + " " 40097 + ((stack1 = container.invokePartial(partials["helpers/disabled"],depth0,{"name":"helpers/disabled","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40098 + ">\n <label class=\"toggle-label\" for=\"" 40099 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 40100 + "\">\n" 40101 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0.icon : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40102 + ((stack1 = helpers["if"].call(alias3,(depth0 != null ? depth0["toggle-text"] : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40103 + " </label>\n </div>\n"; 40104},"9":function(container,depth0,helpers,partials,data) { 40105 var stack1; 40106 40107 return " <span class=\"icon-unchecked\" data-icon=\"" 40108 + container.escapeExpression(container.lambda((depth0 != null ? depth0.icon : depth0), depth0)) 40109 + "\"></span>\n" 40110 + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0["icon-checked"] : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); 40111},"10":function(container,depth0,helpers,partials,data) { 40112 return " <span class=\"icon-checked\" data-icon=\"" 40113 + container.escapeExpression(container.lambda((depth0 != null ? depth0["icon-checked"] : depth0), depth0)) 40114 + "\"></span>\n"; 40115},"12":function(container,depth0,helpers,partials,data) {
40116 return " <span class=\"toggle-text\">" 40117 + container.escapeExpression(container.lambda((depth0 != null ? depth0["toggle-text"] : depth0), depth0)) 40118 + "</span>\n"; 40119},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { 40120 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 40121 40122 return "<div class=\"toggle " 40123 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40124 + "\" data-variant=\"" 40125 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 40126 + "\" role=\"radiogroup\"\n " 40127 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40128 + "\n" 40129 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["labelled-by"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0, blockParams, depths),"inverse":container.program(5, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "") 40130 + ">\n" 40131 + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0["toggle-block"] : depth0),{"name":"each","hash":{},"fn":container.program(8, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40132 + "</div>\n"; 40133},"usePartial":true,"useData":true,"useDepths":true})); 40134 40135return this["ANF"]; 40136 40137}); 40138redesign.define('dsPartial/tooltip',['handlebars','dsPartial/helpers/class-list'], function(Handlebars) { 40139 40140this["ANF"] = this["ANF"] || {}; 40141this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 40142 40143Handlebars.registerPartial("tooltip", this["ANF"]["templates"]["tooltip"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 40144 var stack1, alias1=container.lambda, alias2=container.escapeExpression; 40145 40146 return "<div\n class=\"js-tooltip tooltip " 40147 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40148 + "\"\n data-reference-point=\"" 40149 + alias2(alias1((depth0 != null ? depth0["reference-point"] : depth0), depth0)) 40150 + "\"\n data-trigger-position=\"" 40151 + alias2(alias1((depth0 != null ? depth0["trigger-position"] : depth0), depth0)) 40152 + "\"\n data-variant=\"" 40153 + alias2(alias1((depth0 != null ? depth0.variant : depth0), depth0)) 40154 + "\"\n id=\"" 40155 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 40156 + "\"\n>\n <button\n aria-describedby=\"" 40157 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 40158 + "-block\"\n aria-disabled=\"true\"\n class=\"tooltip-trigger js-tooltip-trigger\"\n data-position=\"" 40159 + alias2(alias1((depth0 != null ? depth0.position : depth0), depth0)) 40160 + "\"\n type=\"button\"\n >\n <span aria-hidden=\"true\" class=\"tooltip-icon\"></span>\n <span class=\"screen-reader-text\">" 40161 + alias2(alias1((depth0 != null ? depth0["tooltip-name"] : depth0), depth0)) 40162 + "</span>\n </button>\n <div\n class=\"tooltip-block js-tooltip-block tooltip-block-width\"\n data-position=\"" 40163 + alias2(alias1((depth0 != null ? depth0.position : depth0), depth0)) 40164 + "\"\n id=\"" 40165 + alias2(alias1((depth0 != null ? depth0.id : depth0), depth0)) 40166 + "-block\"\n role=\"tooltip\"\n >\n" 40167 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40168 + " </div>\n</div>\n"; 40169},"usePartial":true,"useData":true})); 40170 40171return this["ANF"]; 40172 40173}); 40174redesign.define('dsPartial/tout-group',['handlebars'], function(Handlebars) { 40175 40176this["ANF"] = this["ANF"] || {}; 40177this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 40178 40179Handlebars.registerPartial("tout-group", this["ANF"]["templates"]["tout-group"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 40180 return " data-background=\"" 40181 + container.escapeExpression(container.lambda((depth0 != null ? depth0.background : depth0), depth0)) 40182 + "\""; 40183},"3":function(container,depth0,helpers,partials,data) { 40184 return "data-brand=\"" 40185 + container.escapeExpression(container.lambda((depth0 != null ? depth0.brand : depth0), depth0)) 40186 + "\""; 40187},"5":function(container,depth0,helpers,partials,data) { 40188 return "data-padding-horizontal=\"true\""; 40189},"7":function(container,depth0,helpers,partials,data) { 40190 return "data-padding-vertical=\"true\""; 40191},"9":function(container,depth0,helpers,partials,data) { 40192 return "data-padding-top=\"true\""; 40193},"11":function(container,depth0,helpers,partials,data) { 40194 return "data-padding-bottom=\"true\""; 40195},"13":function(container,depth0,helpers,partials,data) { 40196 return container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)); 40197},"15":function(container,depth0,helpers,partials,data) { 40198 return "horizontal-spaced"; 40199},"17":function(container,depth0,helpers,partials,data) { 40200 return container.escapeExpression(container.lambda((depth0 != null ? depth0.separator : depth0), depth0)); 40201},"19":function(container,depth0,helpers,partials,data) { 40202 return "none"; 40203},"21":function(container,depth0,helpers,partials,data) { 40204 return ""; 40205},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 40206 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 40207 40208 return "<div class=\"tout-group\"\n " 40209 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.background : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40210 + "\n " 40211 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.brand : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40212 + "\n " 40213 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["padding-horizontal"] : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40214 + "\n " 40215 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["padding-vertical"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40216 + "\n " 40217 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["padding-top"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40218 + "\n " 40219 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["padding-bottom"] : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40220 + "\n data-variant=\"" 40221 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(15, data, 0),"data":data})) != null ? stack1 : "") 40222 + "\"\n data-separator=\"" 40223 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.separator : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.program(19, data, 0),"data":data})) != null ? stack1 : "") 40224 + "\"\n>\n <div class=\"tout-group-background\">\n " 40225 + ((stack1 = container.invokePartial(partials["tout-group-background"],depth0,{"name":"tout-group-background","fn":container.program(21, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40226 + "\n </div>\n <div class=\"tout-group-wrapper\">\n <div class=\"tout-group-header\">\n " 40227 + ((stack1 = container.invokePartial(partials["tout-group-header"],depth0,{"name":"tout-group-header","fn":container.program(21, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40228 + "\n </div>\n\n <div class=\"tout-group-content\">\n" 40229 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
40230 + " </div>\n\n <div class=\"tout-group-footer\">\n " 40231 + ((stack1 = container.invokePartial(partials["tout-group-footer"],depth0,{"name":"tout-group-footer","fn":container.program(21, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40232 + "\n </div>\n </div>\n</div>\n"; 40233},"usePartial":true,"useData":true})); 40234 40235return this["ANF"]; 40236 40237}); 40238redesign.define('dsPartial/tout',['handlebars','dsPartial/helpers/class-list','dsPartial/helpers/theme'], function(Handlebars) { 40239 40240this["ANF"] = this["ANF"] || {}; 40241this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 40242 40243Handlebars.registerPartial("tout", this["ANF"]["templates"]["tout"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 40244 return " data-x-flex=\"" 40245 + container.escapeExpression(container.lambda((depth0 != null ? depth0["x-flex"] : depth0), depth0)) 40246 + "\""; 40247},"3":function(container,depth0,helpers,partials,data) { 40248 return " data-y-flex=\"" 40249 + container.escapeExpression(container.lambda((depth0 != null ? depth0["y-flex"] : depth0), depth0)) 40250 + "\""; 40251},"5":function(container,depth0,helpers,partials,data) { 40252 return " data-align=\"" 40253 + container.escapeExpression(container.lambda((depth0 != null ? depth0.align : depth0), depth0)) 40254 + "\""; 40255},"7":function(container,depth0,helpers,partials,data) { 40256 return " data-lockup-wrapper-width=\"" 40257 + container.escapeExpression(container.lambda((depth0 != null ? depth0["lockup-wrapper-width"] : depth0), depth0)) 40258 + "\""; 40259},"9":function(container,depth0,helpers,partials,data) { 40260 return " data-lockup-width=\"" 40261 + container.escapeExpression(container.lambda((depth0 != null ? depth0["lockup-width"] : depth0), depth0)) 40262 + "\""; 40263},"11":function(container,depth0,helpers,partials,data) { 40264 return " data-offset-left=\"" 40265 + container.escapeExpression(container.lambda((depth0 != null ? depth0["offset-left"] : depth0), depth0)) 40266 + "\""; 40267},"13":function(container,depth0,helpers,partials,data) { 40268 return " data-offset-right=\"" 40269 + container.escapeExpression(container.lambda((depth0 != null ? depth0["offset-right"] : depth0), depth0)) 40270 + "\""; 40271},"15":function(container,depth0,helpers,partials,data) { 40272 return " data-offset-top=\"" 40273 + container.escapeExpression(container.lambda((depth0 != null ? depth0["offset-top"] : depth0), depth0)) 40274 + "\""; 40275},"17":function(container,depth0,helpers,partials,data) { 40276 return " data-offset-bottom=\"" 40277 + container.escapeExpression(container.lambda((depth0 != null ? depth0["offset-bottom"] : depth0), depth0)) 40278 + "\""; 40279},"19":function(container,depth0,helpers,partials,data) { 40280 return " data-button-position=\"" 40281 + container.escapeExpression(container.lambda((depth0 != null ? depth0["button-position"] : depth0), depth0)) 40282 + "\""; 40283},"21":function(container,depth0,helpers,partials,data) { 40284 return " data-variant=\"" 40285 + container.escapeExpression(container.lambda((depth0 != null ? depth0.variant : depth0), depth0)) 40286 + "\""; 40287},"23":function(container,depth0,helpers,partials,data) { 40288 return " data-background=\"" 40289 + container.escapeExpression(container.lambda((depth0 != null ? depth0.background : depth0), depth0)) 40290 + "\""; 40291},"25":function(container,depth0,helpers,partials,data) { 40292 return "data-inset=\"" 40293 + container.escapeExpression(container.lambda((depth0 != null ? depth0.inset : depth0), depth0)) 40294 + "\""; 40295},"27":function(container,depth0,helpers,partials,data) { 40296 return ""; 40297},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 40298 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); 40299 40300 return "<div class=\"tout " 40301 + ((stack1 = container.invokePartial(partials["helpers/class-list"],depth0,{"name":"helpers/class-list","data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40302 + "\"\n " 40303 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["x-flex"] : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40304 + "\n " 40305 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["y-flex"] : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40306 + "\n " 40307 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.align : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40308 + "\n " 40309 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["lockup-wrapper-width"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40310 + "\n " 40311 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["lockup-width"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40312 + "\n " 40313 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["offset-left"] : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40314 + "\n " 40315 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["offset-right"] : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40316 + "\n " 40317 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["offset-top"] : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40318 + "\n " 40319 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["offset-bottom"] : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40320 + "\n " 40321 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["button-position"] : depth0),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40322 + "\n " 40323 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.variant : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40324 + "\n " 40325 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.background : depth0),{"name":"if","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40326 + "\n" 40327 + ((stack1 = container.invokePartial(partials["helpers/theme"],depth0,{"name":"helpers/theme","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40328 + " " 40329 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.inset : depth0),{"name":"if","hash":{},"fn":container.program(25, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40330 + "\n>\n <div class=\"tout-positional-content\" data-vertical-position=\"top\" data-horizontal-position=\"left\">\n " 40331 + ((stack1 = container.invokePartial(partials["tout-positional-content-top-left"],depth0,{"name":"tout-positional-content-top-left","fn":container.program(27, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40332 + "\n </div>\n <div class=\"tout-positional-content\" data-vertical-position=\"top\" data-horizontal-position=\"center\">\n " 40333 + ((stack1 = container.invokePartial(partials["tout-positional-content-top-center"],depth0,{"name":"tout-positional-content-top-center","fn":container.program(27, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40334 + "\n </div>\n <div class=\"tout-positional-content\" data-vertical-position=\"top\" data-horizontal-position=\"right\">\n " 40335 + ((stack1 = container.invokePartial(partials["tout-positional-content-top-right"],depth0,{"name":"tout-positional-content-top-right","fn":container.program(27, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40336 + "\n </div>\n <div class=\"tout-positional-content\" data-vertical-position=\"middle\" data-horizontal-position=\"left\" data-orientation=\"vertical\">\n " 40337 + ((stack1 = container.invokePartial(partials["tout-positional-content-mid
40337dle-left"],depth0,{"name":"tout-positional-content-middle-left","fn":container.program(27, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40338 + "\n </div>\n <div class=\"tout-positional-content\" data-vertical-position=\"middle\" data-horizontal-position=\"right\" data-orientation=\"vertical\">\n " 40339 + ((stack1 = container.invokePartial(partials["tout-positional-content-middle-right"],depth0,{"name":"tout-positional-content-middle-right","fn":container.program(27, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40340 + "\n </div>\n <div class=\"tout-positional-content\" data-vertical-position=\"bottom\" data-horizontal-position=\"left\">\n " 40341 + ((stack1 = container.invokePartial(partials["tout-positional-content-bottom-left"],depth0,{"name":"tout-positional-content-bottom-left","fn":container.program(27, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40342 + "\n </div>\n <div class=\"tout-positional-content\" data-vertical-position=\"bottom\" data-horizontal-position=\"center\">\n " 40343 + ((stack1 = container.invokePartial(partials["tout-positional-content-bottom-center"],depth0,{"name":"tout-positional-content-bottom-center","fn":container.program(27, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40344 + "\n </div>\n <div class=\"tout-positional-content\" data-vertical-position=\"bottom\" data-horizontal-position=\"right\">\n " 40345 + ((stack1 = container.invokePartial(partials["tout-positional-content-bottom-right"],depth0,{"name":"tout-positional-content-bottom-right","fn":container.program(27, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40346 + "\n </div>\n\n" 40347 + ((stack1 = container.invokePartial(partials["@partial-block"],depth0,{"name":"@partial-block","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40348 + "</div>\n"; 40349},"usePartial":true,"useData":true})); 40350 40351return this["ANF"]; 40352 40353}); 40354redesign.define('dsPartial/video',['handlebars','dsHelper/is','dsPartial/icon-button','dsPartial/button-state'], function(Handlebars) { 40355 40356this["ANF"] = this["ANF"] || {}; 40357this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 40358 40359Handlebars.registerPartial("video", this["ANF"]["templates"]["video"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 40360 return "aria-hidden=\"true\""; 40361},"3":function(container,depth0,helpers,partials,data) { 40362 return "js-video-wrapper"; 40363},"5":function(container,depth0,helpers,partials,data) { 40364 return "data-button-position=\"" 40365 + container.escapeExpression(container.lambda((depth0 != null ? depth0["button-position"] : depth0), depth0)) 40366 + "\""; 40367},"7":function(container,depth0,helpers,partials,data) { 40368 return "style=\"aspect-ratio: " 40369 + container.escapeExpression(container.lambda((depth0 != null ? depth0["aspect-ratio"] : depth0), depth0)) 40370 + ";\""; 40371},"9":function(container,depth0,helpers,partials,data) { 40372 return " media=\"(max-width: 768px)\"\n"; 40373},"11":function(container,depth0,helpers,partials,data) { 40374 return " media=\"(min-width: 769px)\"\n"; 40375},"13":function(container,depth0,helpers,partials,data) { 40376 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 40377 40378 return " <div class=\"video-icon-button-wrapper\">\n <button\n data-state=\"paused\"\n class=\"ds-base-button ds-base-button--primary ds-icon-button ds-icon-button--small video-icon-button js-video-button\"\n data-theme=\"" 40379 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.program(16, data, 0),"data":data})) != null ? stack1 : "") 40380 + "\"\n >
40380\n <span data-state=\"paused\" data-hidden=\"false\">\n" 40381 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.brand : depth0),"hco",{"name":"is","hash":{},"fn":container.program(18, data, 0),"inverse":container.program(20, data, 0),"data":data})) != null ? stack1 : "") 40382 + " <p class=\"screen-reader-text\">" 40383 + alias3(alias2((depth0 != null ? depth0["play-label"] : depth0), depth0)) 40384 + "</p>\n </span>\n <span data-state=\"playing\" data-hidden=\"true\">\n" 40385 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.brand : depth0),"hco",{"name":"is","hash":{},"fn":container.program(22, data, 0),"inverse":container.program(24, data, 0),"data":data})) != null ? stack1 : "") 40386 + " <p class=\"screen-reader-text\">" 40387 + alias3(alias2((depth0 != null ? depth0["pause-label"] : depth0), depth0)) 40388 + "</p>\n </span>\n </button>\n" 40389 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["has-audio"] : depth0),{"name":"if","hash":{},"fn":container.program(26, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40390 + " </div>\n"; 40391},"14":function(container,depth0,helpers,partials,data) { 40392 return container.escapeExpression(container.lambda((depth0 != null ? depth0.theme : depth0), depth0)); 40393},"16":function(container,depth0,helpers,partials,data) { 40394 return "default"; 40395},"18":function(container,depth0,helpers,partials,data) { 40396 return "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4.89301 3.34308C5.13243 3.21119 5.42464 3.22 5.65568 3.36607L15.1457 9.36607C15.3631 9.50352 15.4949 9.74279 15.4949 10C15.4949 10.2572 15.3631 10.4965 15.1457 10.6339L5.65568 16.6339C5.42464 16.78 5.13243 16.7888 4.89301 16.6569C4.65359 16.525 4.50488 16.2733 4.50488 16V4C4.50488 3.72666 4.65359 3.47496 4.89301 3.34308ZM6.00488 5.36151V14.6385L13.3414 10L6.00488 5.36151Z\" fill=\"currentColor\"/>\n</svg>\n"; 40397},"20":function(container,depth0,helpers,partials,data) { 40398 return " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.01376 3.56205C5.17337 3.47413 5.36818 3.48 5.5222 3.57738L15.0122 9.57738C15.1571 9.66902 15.245 9.82853 15.245 10C15.245 10.1715 15.1571 10.331 15.0122 10.4226L5.5222 16.4226C5.36818 16.52 5.17337 16.5259 5.01376 16.4379C4.85414 16.35 4.755 16.1822 4.755 16V4C4.755 3.81777 4.85414 3.64998 5.01376 3.56205ZM5.755 4.90767V15.0923L13.8094 10L5.755 4.90767Z\" fill=\"currentColor\"/>\n </svg>\n"; 40399},"22":function(container,depth0,helpers,partials,data) { 40400 return " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n<path d=\"M7.75 4V16H6.25V4H7.75Z\" fill=\"currentColor\"/>\n<path d=\"M13.75 4V16H12.25V4H13.75Z\" fill=\"currentColor\"/>\n</svg>\n"; 40401},"24":function(container,depth0,helpers,partials,data) { 40402 return " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path d=\"M7.5 4V16H6.5V4H7.5Z\" fill=\"currentColor\"/>\n <path d=\"M13.5 4V16H12.5V4H13.5Z\" fill=\"currentColor\"/>\n </svg>\n\n"; 40403},"26":function(container,depth0,helpers,partials,data) { 40404 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 40405 40406 return " <button\n data-state=\"muted\"\n class=\"ds-base-button ds-base-button--primary ds-icon-button ds-icon-button--small video-icon-button js-video-mute-button\"\n data-theme=\"" 40407 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.theme : depth0),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.program(16, data, 0),"data":data})) != null ? stack1 : "") 40408 + "\"\n >\n <span data-state=\"muted\" data-hidden=\"true\">\n" 40409 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.brand : depth0),"hco",{"name":"is","hash":{},"fn":container.program(27, data, 0),"inverse":container.program(29, data, 0),"data":data})) != null ? stack1 : "")
40410 + " <span class=\"screen-reader-text\">" 40411 + alias3(alias2((depth0 != null ? depth0["mute-label"] : depth0), depth0)) 40412 + "</span>\n </span>\n <span data-state=\"unmuted\" data-hidden=\"false\">\n" 40413 + ((stack1 = helpers.is.call(alias1,(depth0 != null ? depth0.brand : depth0),"hco",{"name":"is","hash":{},"fn":container.program(31, data, 0),"inverse":container.program(33, data, 0),"data":data})) != null ? stack1 : "") 40414 + " <span class=\"screen-reader-text\">" 40415 + alias3(alias2((depth0 != null ? depth0["unmute-label"] : depth0), depth0)) 40416 + "</span>\n </span>\n </button>\n"; 40417},"27":function(container,depth0,helpers,partials,data) { 40418 return " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n<path d=\"M9.72364 3.59823C10.0845 3.25181 10.6187 3.15346 11.0802 3.35017C11.5402 3.54686 11.84 3.99907 11.84 4.49966V15.5014C11.8395 16.0008 11.5412 16.4532 11.0802 16.6499C10.6186 16.8466 10.0844 16.7479 9.72364 16.4018L6.56132 13.3665H3.58749C2.9405 13.3663 2.40838 12.8745 2.34424 12.2443L2.3374 12.1164V7.8827C2.3374 7.19216 2.89746 6.63278 3.58749 6.63262H6.5623L9.72364 3.59823ZM7.38364 7.92372C7.24396 8.05778 7.05768 8.13272 6.86407 8.13272H3.8375V11.8664H6.8631C7.0567 11.8664 7.24299 11.9413 7.38266 12.0754L10.3399 14.9134V5.08564L7.38364 7.92372Z\" fill=\"currentColor\"/>\n<path d=\"M13.1623 4.96063C13.535 5.02437 13.9007 5.12266 14.2532 5.25655C14.9172 5.50875 15.5232 5.87961 16.0356 6.34939C16.5481 6.81937 16.9578 7.38 17.2378 7.9999C17.5178 8.61991 17.6626 9.28692 17.6626 9.96096C17.6626 10.6348 17.5177 11.3012 17.2378 11.9211C16.9578 12.541 16.5481 13.1015 16.0356 13.5716C15.5232 14.0414 14.9172 14.4122 14.2532 14.6644C13.9007 14.7983 13.5349 14.8966 13.1623 14.9603V13.9427C13.4136 13.8907 13.6602 13.8204 13.8987 13.7298C14.4478 13.5211 14.9437 13.2158 15.3598 12.8342C15.7758 12.4527 16.1041 12.0025 16.3266 11.5099C16.549 11.0175 16.6625 10.491 16.6626 9.96096C16.6625 9.43083 16.5491 8.90356 16.3266 8.41106C16.1041 7.9185 15.7757 7.46823 15.3598 7.08675C14.9437 6.70522 14.4477 6.39978 13.8987 6.19118C13.6602 6.10057 13.4136 6.03027 13.1623 5.97828V4.96063Z\" fill=\"currentColor\"/>\n<path d=\"M13.1623 6.97834C13.3849 7.01668 13.6035 7.07742 13.8128 7.16585C14.1765 7.31965 14.5071 7.54496 14.7845 7.82801C15.0619 8.11117 15.2814 8.44774 15.4311 8.81636C15.5806 9.18494 15.6576 9.58019 15.6576 9.97854C15.6576 10.3768 15.5805 10.7722 15.4311 11.1407C15.2815 11.5092 15.0618 11.845 14.7845 12.1281C14.5071 12.4113 14.1766 12.6364 13.8128 12.7903C13.6035 12.8787 13.3849 12.9394 13.1623 12.9778V11.9562C13.2511 11.9327 13.339 11.9053 13.4241 11.8693C13.6651 11.7673 13.8851 11.6172 14.0706 11.4279C14.2559 11.2386 14.4033 11.
404180132 14.5042 10.7647C14.6051 10.516 14.6575 10.2483 14.6576 9.97854C14.6575 9.70867 14.6052 9.44115 14.5042 9.19236C14.4033 8.94365 14.2561 8.71761 14.0706 8.52825C13.8851 8.33893 13.6651 8.18874 13.4241 8.08682C13.339 8.05084 13.2511 8.02339 13.1623 7.9999V6.97834Z\" fill=\"currentColor\"/>\n</svg>\n"; 40419},"29":function(container,depth0,helpers,partials,data) { 40420 return " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path d=\"M7.2936 7.74312C7.20712 7.8325 7.09149 7.88278 6.97162 7.88278H3.92874V12.1163H6.97072C7.09058 12.1163 7.20622 12.1666 7.29269 12.2559L10.4317 15.5002V4.49987L7.2936 7.74312ZM11.3605 15.5002L11.3505 15.6486C11.3032 15.9879 11.0959 16.2825 10.7963 16.4201C10.4535 16.5775 10.0567 16.4978 9.78868 16.2209L6.78388 13.1163H3.92874C3.44811 13.1162 3.05226 12.7229 3.00453 12.2188L3 12.1163V7.88278C3 7.3304 3.41606 6.88288 3.92874 6.88275H6.78479L9.78777 3.77914C10.0559 3.50195 10.4535 3.42259 10.7963 3.57992L10.9188 3.64828C11.1904 3.8284 11.3605 4.14935 11.3605 4.49987V15.5002Z\" fill=\"currentColor\"/>\n <path d=\"M12.8207 4.96082C13.1667 5.02456 13.5064 5.12284 13.8338 5.25673C14.4503 5.50892 15.0132 5.87976 15.489 6.34953C15.9649 6.81949 16.3454 7.3801 16.6055 7.99997C16.8655 8.61996 17 9.28694 17 9.96096C16.9999 10.6348 16.8654 11.3011 16.6055 11.921C16.3454 12.5409 15.9649 13.1014 15.489 13.5714C15.0131 14.0412 14.4504 14.412 13.8338 14.6642C13.5064 14.7981 13.1667 14.8964 12.8207 14.9601V13.9425C13.054 13.8905 13.283 13.8202 13.5045 13.7296C14.0144 13.521 14.475 13.2157 14.8614 12.8341C15.2477 12.4526 15.5526 12.0024 15.7593 11.5098C15.9658 11.0175 16.0712 10.4909 16.0713 9.96096C16.0712 9.43085 15.9658 8.9036 15.7593 8.41111C15.5526 7.91857 15.2477 7.46833 14.8614 7.08686C14.475 6.70534 14.0144 6.39992 13.5045 6.19132C13.283 6.10072 13.054 6.03042 12.8207 5.97843V4.96082Z\" fill=\"currentColor\"/>\n <path d=\"M12.8207 6.97845C13.0273 7.01679 13.2304 7.07753 13.4247 7.16596C13.7625 7.31975 14.0695 7.54505 14.3272 7.82809C14.5848 8.11124 14.7886 8.4478 14.9276 8.8164C15.0665 9.18496 15.1379 9.5802 15.138 9.97854C15.138 10.3768 15.0664 10.7722 14.9276 11.1407C14.7887 11.5091 14.5847 11.8449 14.3272 12.128C14.0695 12.4112 13.7626 12.6363 13.4247 12.7901C13.2304 12.8786 13.0273 12.9393 12.8207 12.9777V11.9561C12.9031 11.9326 12.9847 11.9052 13.0637 11.8692C13.2875 11.7673 13.4919 11.6171 13.6642 11.4278C13.8362 11.2386 13.9732 11.0132 14.0669 10.7647C14.1605 10.516 14.2092 10.2483 14.2093 9.97854C14.2092 9.70868 14.1606 9.44117 14.0669 9.19239C13.9731 8.94369 13.8364 8.71766 13.6642 8.5283C13.4919 8.33899 13.2875 8.1888 13.0637 8.08688C12.9847 8.05091 12.9031 8.02347 12.8207 7.99997V6.97845Z\" fill=\"currentColor\"/>\n </svg>\n"; 40421},"31":function(container,depth0,helpers,partials,data) { 40422 return "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n<path d=\"M9.58399 3.59823C9.94487 3.25181 10.479 3.15346 10.9405 3.35017C11.4006 3.54686 11.7003 3.99907 11.7003 4.49966V15.5014C11.6998 16.0008 11.4015 16.4532 10.9405 16.6499C10.4789 16.8466 9.9447 16.7479 9.58399 16.4018L6.42167 13.3665H3.44784C2.80086 13.3663 2.26873 12.8745 2.20459 12.2443L2.19775 12.1164V7.8827C2.19775 7.19216 2.75781 6.63278 3.44784 6.63262H6.42265L9.58399 3.59823ZM7.24399 7.92372C7.10431 8.05778 6.91803 8.13272 6.72442 8.13272H3.69785V11.8664H6.72345C6.91705 11.8664 7.10334 11.9413 7.24301 12.0754L10.2002 14.9134V5.08564L7.24399 7.92372Z\" fill=\"currentColor\"/>\n<path d=\"M17.8023 8.30558L13.802 12.3058L13.095 11.5988L17.0952 7.5985L17.8023 8.30558Z\" fill=\"currentColor\"/>\n<path d=\"M17.8023 11.5988L17.0952 12.3058L13.095 8.30558L13.802 7.5985L17.8023 11.5988Z\" fill=\"currentColor\"/>\n</svg>\n"; 40423},"33":function(container,depth0,helpers,partials,data) { 40424 return " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path d=\"M7.0166 7.74312C6.92563 7.8325 6.80399 7.88278 6.6779 7.88278H3.47697V12.1163H6.67695C6.80304 12.1163 6.92468 12.1666 7.01565 12.2559L10.3177 15.5002V4.49987L7.0166 7.74312ZM11.2947 15.5002L11.2842 15.6486C11.2344 15.9879 11.0164 16.2825 10.7012 16.4201C10.3406 16.5775 9.92326 16.4978 9.64127 16.2209L6.48041 13.1163H3.47697C2.97139 13.1162 2.55497 12.7229 2.50477 12.2188L2.5 12.1163V7.88278C2.5 7.3304 2.93767 6.88288 3.47697 6.88275H6.48136L9.64031 3.77914C9.92242 3.50195 10.3407 3.42259 10.7012 3.57992L10.83 3.64828C11.1158 3.8284 11.2947 4.14935 11.2947 4.49987V15.5002Z\" fill=\"currentColor\"/>\n <path d=\"M17.5 8.30564L13.5921 12.3058L12.9013 11.5987L16.8092 7.59859L17.5 8.30564Z\" fill=\"currentColor\"/>\n <path d=\"M17.5 11.5987L16.8092 12.3058L12.9013 8.30564L13.5921 7.59859L17.5 11.5987Z\" fill=\"currentColor\"/>\n </svg>\n\n"; 40425},"35":function(container,depth0,helpers,partials,data) { 40426 var stack1; 40427 40428 return ((stack1 = container.invokePartial(partials["icon-button"],depth0,{"name":"icon-button","hash":{"class-list":"js-video-button","current-state":"playing","variant":"square","type":"button"},"fn":container.program(36, data, 0),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 40429},"36":function(container,depth0,helpers,partials,data) { 40430 var stack1; 40431 40432 return ((stack1 = container.invokePartial(partials["button-state"],depth0,{"name":"button-state","hash":{"active":false,"aria-label":(depth0 != null ? depth0["play-label"] : depth0),"icon":"play","state":"paused"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") 40433 + ((stack1 = container.invokePartial(partials["button-state"],depth0,{"name":"button-state","hash":{"active":true,"aria-label":(depth0 != null ? depth0["pause-label"] : depth0),"icon":"pause","state":"playing"},"data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); 40434},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 40435 var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; 40436 40437 return "<div\n " 40438 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.hackathon : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40439 + "\n class=\"video " 40440 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0["disable-js"] : depth0),{"name":"unless","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40441 + "\"\n " 40442 + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.hackathon : depth0),{"name":"unless","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40443 + "\n>\n <video class=\"js-video\"\n autoplay\n muted\n loop\n webkit-playsinline\n playsinline\n preload=\"metadata\"\n poster=\"" 40444 + alias3(alias2((depth0 != null ? depth0.poster : depth0), depth0)) 40445 + "\"\n " 40446 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["aspect-ratio"] : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40447 + "\n >\n <source\n src=\"" 40448 + alias3(alias2((depth0 != null ? depth0.src : depth0), depth0)) 40449 + "\"\n type=\"video/mp4\"\n" 40450 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0["is-mobile"] : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.program(11, data, 0),"data":data})) != null ? stack1 : "") 40451 + " >\n </video>\n" 40452 + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.hackathon : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.program(35, data, 0),"data":data})) != null ? stack1 : "") 40453 + "</div>\n"; 40454},"usePartial":true,"useData":true})); 40455 40456return this["ANF"]; 40457 40458}); 40459redesign.define('dsPartial/wayfinders',['handlebars','dsHelper/repeat'], function(Handlebars) { 40460 40461this["ANF"] = this["ANF"] || {}; 40462this["ANF"]["templates"] = this["ANF"]["templates"] || {}; 40463 40464Handlebars.registerPartial("wayfinders", this["ANF"]["templates"]["wayfinders"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { 40465 return " <label class=\"wayfinder\">\n <input type=\"checkbox\" value=\"" 40466 + container.escapeExpression(container.lambda(depth0, depth0)) 40467 + "\" disabled>
40467\n <span class=\"wayfinder-box\"></span>\n </label>\n"; 40468},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { 40469 var stack1; 40470 40471 return "<div class=\"wayfinders\" aria-hidden=\"true\">\n" 40472 + ((stack1 = helpers.repeat.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.count : depth0),{"name":"repeat","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") 40473 + "</div>\n"; 40474},"useData":true})); 40475 40476return this["ANF"]; 40477 40478});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.